From 38592424c8c132f24d54541fc2f85d965eece27a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 6 Jun 2022 22:11:47 +0100 Subject: [PATCH 001/374] rename Arch to Architecture --- lgsm/functions/command_debug.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/command_debug.sh b/lgsm/functions/command_debug.sh index b6ab14fe8..086b06588 100755 --- a/lgsm/functions/command_debug.sh +++ b/lgsm/functions/command_debug.sh @@ -32,7 +32,7 @@ info_game.sh fn_print_header { echo -e "${lightblue}Distro:\t\t${default}${distroname}" - echo -e "${lightblue}Arch:\t\t${default}${arch}" + echo -e "${lightblue}Architecture:\t\t${default}${arch}" echo -e "${lightblue}Kernel:\t\t${default}${kernel}" echo -e "${lightblue}Hostname:\t\t${default}${HOSTNAME}" echo -e "${lightblue}tmux:\t\t${default}${tmuxv}" From fd4a8a4fb0ae971a18dd631edf01676b9cefd4c3 Mon Sep 17 00:00:00 2001 From: Neouni Date: Wed, 22 Jun 2022 23:24:19 +0200 Subject: [PATCH 002/374] fix(st): Networking and server rebuild update (#3898) Networking and the server has been rebuild from scratch many commands have been lost and shutdown has changed. # Description Added: servername Modified: startparameters changed, transfered over commands to new format. stopmode changed, it needs a quit command now in the console. Removed: clearinterval default.ini got removed, it's now all in setting.xml # Comment Server has been rebuild from scratch commands and dependencies have changed as a result. --- lgsm/config-default/config-lgsm/stserver/_default.cfg | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lgsm/config-default/config-lgsm/stserver/_default.cfg b/lgsm/config-default/config-lgsm/stserver/_default.cfg index 8c0f0dbf9..5c66fcca4 100644 --- a/lgsm/config-default/config-lgsm/stserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/stserver/_default.cfg @@ -10,16 +10,17 @@ ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" +servername="LinuxGSM" port="27500" queryport="27015" worldtype="Moon" +maxplayers="10" autosaveinterval=300 -clearinterval=60 worldname="moon_save" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters # Edit with care -startparameters="-batchmode -nographics -autostart -gameport=${port} -updateport=${queryport} -worldtype=${worldtype} -loadworld=${worldname} -worldname=${worldname} -autosaveinterval=${autosaveinterval} -clearallinterval=${clearinterval}" +startparameters="-NEWGAME ${worldtype} -LOADGAME ${worldname} -settings ServerName ${servername} StartLocalHost true ServerVisible true ServerMaxPlayers ${maxplayers} GamePort ${port} UpdatePort ${queryport} UPNPEnabled true AutoSave true SaveInterval ${autosaveinterval}" #### LinuxGSM Settings #### @@ -139,7 +140,7 @@ steammaster="false" # 9: GoldSrc # 10: Avorion # 11: end -stopmode="2" +stopmode="3" ## Query mode # 1: session only @@ -168,8 +169,8 @@ systemdir="${serverfiles}" executabledir="${serverfiles}" executable="./rocketstation_DedicatedServer.x86_64" servercfgdir="${systemdir}" -servercfg="default.ini" -servercfgdefault="default.ini" +servercfg="setting.xml" +servercfgdefault="setting.xml" servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory From 1c771795aead59b846f59185aa62c05312a7db19 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 22 Jun 2022 23:20:56 +0100 Subject: [PATCH 003/374] update .editorconfig --- .editorconfig | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.editorconfig b/.editorconfig index ef3ef8bd9..f20e02e1c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,3 +11,18 @@ 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 + +# BASH Files +[*.{.sh}] +indent_style = tab +indent_size = 4 From 635f4bce52ce15c76374561ee7b749dfd12f4076 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 22 Jun 2022 23:29:49 +0100 Subject: [PATCH 004/374] chore: use prettier for code tidy (#3901) * feat: start using prettier linter https://prettier.io/ * feat: prettier code formatting * feat: add super linter --- .gitattributes | 18 +- .github/ISSUE_TEMPLATE/bug-report.md | 32 +- .github/ISSUE_TEMPLATE/feature-request.md | 31 +- .github/ISSUE_TEMPLATE/new-server-request.md | 13 +- .github/dependabot.yml | 1 - .github/labeler.yml | 92 +- .github/pull_request_template.md | 31 +- .github/workflows/create-release.yml | 4 +- .github/workflows/git-sync.yml | 24 +- .github/workflows/labeler.yml | 16 +- .github/workflows/linter.yml | 55 ++ .github/workflows/lock.yml | 8 +- .github/workflows/potential-duplicates.yml | 4 +- .github/workflows/version-check.sh | 4 +- .github/workflows/version-check.yml | 10 +- CODE_OF_CONDUCT.md | 41 +- CONTRIBUTING.md | 142 +-- README.md | 22 +- lgsm/functions/README.md | 19 +- lgsm/functions/alert.sh | 86 +- lgsm/functions/alert_discord.sh | 3 +- lgsm/functions/alert_gotify.sh | 3 +- lgsm/functions/alert_ifttt.sh | 3 +- lgsm/functions/alert_mailgun.sh | 12 +- lgsm/functions/alert_pushbullet.sh | 3 +- lgsm/functions/alert_pushover.sh | 2 +- lgsm/functions/alert_rocketchat.sh | 3 +- lgsm/functions/alert_slack.sh | 3 +- lgsm/functions/alert_telegram.sh | 3 +- lgsm/functions/check.sh | 20 +- lgsm/functions/check_config.sh | 10 +- lgsm/functions/check_deps.sh | 91 +- lgsm/functions/check_ip.sh | 36 +- lgsm/functions/check_last_update.sh | 4 +- lgsm/functions/check_logs.sh | 6 +- lgsm/functions/check_permissions.sh | 60 +- lgsm/functions/check_status.sh | 2 +- lgsm/functions/check_system_requirements.sh | 6 +- lgsm/functions/check_tmuxception.sh | 6 +- lgsm/functions/check_version.sh | 2 +- lgsm/functions/command_backup.sh | 46 +- lgsm/functions/command_debug.sh | 6 +- lgsm/functions/command_details.sh | 4 +- lgsm/functions/command_dev_detect_deps.sh | 36 +- lgsm/functions/command_dev_detect_glibc.sh | 33 +- lgsm/functions/command_dev_detect_ldd.sh | 26 +- lgsm/functions/command_dev_query_raw.sh | 283 +++--- lgsm/functions/command_fastdl.sh | 67 +- .../command_install_resources_mta.sh | 2 +- lgsm/functions/command_mods_install.sh | 22 +- lgsm/functions/command_mods_remove.sh | 13 +- lgsm/functions/command_mods_update.sh | 14 +- lgsm/functions/command_monitor.sh | 184 ++-- lgsm/functions/command_postdetails.sh | 5 +- lgsm/functions/command_send.sh | 2 +- lgsm/functions/command_skeleton.sh | 2 +- lgsm/functions/command_start.sh | 31 +- lgsm/functions/command_stop.sh | 30 +- lgsm/functions/command_ts3_server_pass.sh | 4 +- lgsm/functions/command_update.sh | 2 +- lgsm/functions/command_update_linuxgsm.sh | 20 +- lgsm/functions/command_validate.sh | 2 +- lgsm/functions/command_wipe.sh | 26 +- lgsm/functions/core_dl.sh | 92 +- lgsm/functions/core_exit.sh | 6 +- lgsm/functions/core_functions.sh | 912 +++++++++--------- lgsm/functions/core_getopt.sh | 159 ++- lgsm/functions/core_github.sh | 18 +- lgsm/functions/core_legacy.sh | 4 +- lgsm/functions/core_logs.sh | 13 +- lgsm/functions/core_messages.sh | 150 +-- lgsm/functions/core_steamcmd.sh | 46 +- lgsm/functions/core_trap.sh | 2 +- lgsm/functions/fix.sh | 64 +- lgsm/functions/fix_ark.sh | 8 +- lgsm/functions/fix_arma3.sh | 2 +- lgsm/functions/fix_dst.sh | 2 +- lgsm/functions/fix_lo.sh | 10 +- lgsm/functions/fix_onset.sh | 2 +- lgsm/functions/fix_samp.sh | 4 +- lgsm/functions/fix_squad.sh | 2 +- lgsm/functions/fix_steamcmd.sh | 4 +- lgsm/functions/fix_tf2.sh | 2 +- lgsm/functions/fix_ts3.sh | 4 +- lgsm/functions/fix_vh.sh | 6 +- lgsm/functions/info_distro.sh | 67 +- lgsm/functions/info_game.sh | 282 +++--- lgsm/functions/info_messages.sh | 264 ++--- lgsm/functions/info_stats.sh | 6 +- lgsm/functions/install_config.sh | 238 ++--- lgsm/functions/install_eula.sh | 4 +- lgsm/functions/install_gslt.sh | 2 +- lgsm/functions/install_logs.sh | 2 +- lgsm/functions/install_retry.sh | 3 +- lgsm/functions/install_server_files.sh | 195 +++- lgsm/functions/install_ts3db.sh | 18 +- lgsm/functions/mods_core.sh | 142 +-- lgsm/functions/mods_list.sh | 106 +- lgsm/functions/query_gamedig.sh | 8 +- lgsm/functions/update_factorio.sh | 14 +- lgsm/functions/update_jediknight2.sh | 18 +- lgsm/functions/update_minecraft.sh | 14 +- lgsm/functions/update_minecraft_bedrock.sh | 18 +- lgsm/functions/update_mta.sh | 14 +- lgsm/functions/update_mumble.sh | 16 +- lgsm/functions/update_papermc.sh | 14 +- lgsm/functions/update_ts3.sh | 22 +- lgsm/functions/update_vintagestory.sh | 14 +- linuxgsm.sh | 72 +- tests/tests_defaultcfg/tests_defaultcfg.sh | 82 +- tests/tests_fctrserver.sh | 147 +-- tests/tests_jc2server.sh | 169 ++-- tests/tests_mcserver.sh | 151 +-- tests/tests_shellcheck.sh | 4 +- tests/tests_ts3server.sh | 147 +-- 115 files changed, 2893 insertions(+), 2663 deletions(-) create mode 100644 .github/workflows/linter.yml diff --git a/.gitattributes b/.gitattributes index bbe6490d1..cfa570e67 100644 --- a/.gitattributes +++ b/.gitattributes @@ -7,16 +7,16 @@ *.so.6 binary # Custom for Visual Studio -*.cs diff=csharp +*.cs diff=csharp # Standard to msysgit -*.doc diff=astextplain -*.DOC diff=astextplain +*.doc diff=astextplain +*.DOC diff=astextplain *.docx diff=astextplain *.DOCX diff=astextplain -*.dot diff=astextplain -*.DOT diff=astextplain -*.pdf diff=astextplain -*.PDF diff=astextplain -*.rtf diff=astextplain -*.RTF diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index 31d08d206..f0b071753 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -2,25 +2,26 @@ name: Bug Report about: Found a bug? Raise a report. title: "[BUG]" -labels: 'type: bug' -assignees: '' - +labels: "type: bug" +assignees: "" --- Issues raised here are **ONLY** for: -* LinuxGSM bugs. -* Feature suggestions. -* Code contributions. + +- LinuxGSM bugs. +- Feature suggestions. +- Code contributions. Issues raised here are **NOT** for: -* General support. -* Specific game server issues (e.g CS:GO, TF2). -* Dedicated server issues (e.g Ubuntu, CentOS). -* Anything not directly related to LinuxGSM development. + +- General support. +- Specific game server issues (e.g CS:GO, TF2). +- Dedicated server issues (e.g Ubuntu, CentOS). +- Anything not directly related to LinuxGSM development. For general support visit the **[LinuxGSM-Support](https://linuxgsm.com/support)**. -***Please use the template below, deleting the above text*** +**_Please use the template below, deleting the above text_** ## User Story @@ -28,10 +29,10 @@ As a [user description], I want [desired action] so that [desired outcome]. ## Basic info -* **Distro:** [Ubuntu 18.04] -* **Game:** [Garry's Mod] -* **Command:** [Monitor] -* **LinuxGSM version:** [v20.1.3] +- **Distro:** [Ubuntu 18.04] +- **Game:** [Garry's Mod] +- **Command:** [Monitor] +- **LinuxGSM version:** [v20.1.3] ## Further Information @@ -40,6 +41,7 @@ A clear description of what the bug is and any ideas on how to resolve it. Plus ## To Reproduce Steps to reproduce the behaviour: + 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md index 8ba27fa9f..992178f07 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -2,25 +2,26 @@ name: Feature Request about: Suggest an idea for LinuxGSM. title: "[FEATURE]" -labels: 'type: feature request' -assignees: '' - +labels: "type: feature request" +assignees: "" --- Issues raised here are **ONLY** for: -* LinuxGSM bugs. -* Feature suggestions. -* Code contributions. + +- LinuxGSM bugs. +- Feature suggestions. +- Code contributions. Issues raised here are **NOT** for: -* General support. -* Specific game server issues (e.g CS:GO, TF2). -* Dedicated server issues (e.g Ubuntu, CentOS). -* Anything not directly related to LinuxGSM development. + +- General support. +- Specific game server issues (e.g CS:GO, TF2). +- Dedicated server issues (e.g Ubuntu, CentOS). +- Anything not directly related to LinuxGSM development. For general support visit the **[LinuxGSM Support](https://linuxgsm.com/support)** page. -***Please use the template below, deleting the above text*** +**_Please use the template below, deleting the above text_** ## User Story @@ -28,10 +29,10 @@ As a [user description], I want [desired action] so that [desired outcome]. ## Basic info -* **Distro:** [Ubuntu 20.04] -* **Game:** [Garry's Mod] -* **Command:** [Monitor] -* **LinuxGSM version:** [v20.1.3] +- **Distro:** [Ubuntu 20.04] +- **Game:** [Garry's Mod] +- **Command:** [Monitor] +- **LinuxGSM version:** [v20.1.3] ## Further Information diff --git a/.github/ISSUE_TEMPLATE/new-server-request.md b/.github/ISSUE_TEMPLATE/new-server-request.md index 57bee9cbe..bedc4f506 100644 --- a/.github/ISSUE_TEMPLATE/new-server-request.md +++ b/.github/ISSUE_TEMPLATE/new-server-request.md @@ -2,9 +2,8 @@ name: New Server Request about: Suggest a new game server to be added. title: "[Server Request]" -labels: 'type: game server request' -assignees: '' - +labels: "type: game server request" +assignees: "" --- ## What game server would you like to add? @@ -17,8 +16,8 @@ Provide any useful documentation or resources that might help. ## Is the server on Steam? -* [ ] Yes -* [ ] No +- [ ] Yes +- [ ] No If yes Use SteamDB to get the appid. (https://steamdb.info). @@ -28,5 +27,5 @@ If yes Use SteamDB to get the appid. (https://steamdb.info). We only support Linux servers and do **not** support Wine. -* [ ] Yes -* [ ] No +- [ ] Yes +- [ ] No diff --git a/.github/dependabot.yml b/.github/dependabot.yml index c39f10ad4..443cf3bec 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,7 +1,6 @@ # Set update schedule for GitHub Actions version: 2 updates: - - package-ecosystem: "github-actions" directory: "/" schedule: diff --git a/.github/labeler.yml b/.github/labeler.yml index 5cd6740d4..0ceeeae72 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,98 +1,98 @@ # Add/remove 'critical' label if issue contains the words 'urgent' or 'critical' # Type "type: game server request": - - '/(Server Request)/i' + - "/(Server Request)/i" "type: bug": - - '/(bug)/i' + - "/(bug)/i" "type: feature request": - - '/(feature)/i' + - "/(feature)/i" # Commands "command: backup": - - '/(backup)/i' + - "/(backup)/i" "command: console": - - '/(console|tmux)/i' + - "/(console|tmux)/i" "command: debug": - - '/(debug)/i' + - "/(debug)/i" "command: details": - - '/(details)/i' + - "/(details)/i" "command: fast-dl": - - '/(fast-dl|fastdl)/i' + - "/(fast-dl|fastdl)/i" "command: install": - - '/(install)/i' + - "/(install)/i" "command: mods": - - '/(mods)/i' + - "/(mods)/i" "command: monitor": - - '/(monitor)/i' + - "/(monitor)/i" "command: post-details": - - '/(post-details)/i' + - "/(post-details)/i" "command: restart": - - '/(restart)/i' + - "/(restart)/i" "command: send": - - '/(send)/i' + - "/(send)/i" "command: skeleton": - - '/(skeleton)/i' + - "/(skeleton)/i" "command: start": - - '/(start)/i' + - "/(start)/i" "command: stop": - - '/(stop)/i' + - "/(stop)/i" "command: update-lgsm": - - '/(update-lgsm)/i' + - "/(update-lgsm)/i" "command: update": - - '/(update)/i' + - "/(update)/i" "command: validate": - - '/(validate)/i' + - "/(validate)/i" "command: wipe": - - '/(wipe)/i' + - "/(wipe)/i" # Distros "distro: AlmaLinux": - - '/(Alma)/i' + - "/(Alma)/i" "distro: Arch Linux": - - '/(Arch)/i' + - "/(Arch)/i" "distro: CentOS": - - '/(CentOS)/i' + - "/(CentOS)/i" "distro: Debian": - - '/(Debian)/i' + - "/(Debian)/i" "distro: Fedora": - - '/(Fedora)/i' + - "/(Fedora)/i" "distro: openSUSE": - - '/(openSUSE|suse)/i' + - "/(openSUSE|suse)/i" "distro: Rocky Linux": - - '/(Rocky)/i' + - "/(Rocky)/i" "distro: Slackware": - - '/(Slackware)/i' + - "/(Slackware)/i" "distro: Ubuntu": - - '/(Ubuntu)/i' + - "/(Ubuntu)/i" # Info "info: alerts": - - '/(alert)/i' + - "/(alert)/i" "info: dependency": - - '/(dependency|deps)/i' + - "/(dependency|deps)/i" "info: docker": - - '/(docker)/i' + - "/(docker)/i" "info: docs": - - '/(documentation|docs)/i' + - "/(documentation|docs)/i" "info: email": - - '/(postfix|sendmail|exim|smtp)/i' + - "/(postfix|sendmail|exim|smtp)/i" "info: query": - - '/(gamedig|gsquery)/i' + - "/(gamedig|gsquery)/i" "info: steamcmd": - - '/(steamcmd)/i' + - "/(steamcmd)/i" "info: systemd": - - '/(systemd)/i' + - "/(systemd)/i" "info: tmux": - - '/(tmux)/i' + - "/(tmux)/i" "info: website": - - '/(website)/i' + - "/(website)/i" # Games "game: Ark: Survival Evolved": - - '/(Ark: Survival Evolved|Ark)/i' + - "/(Ark: Survival Evolved|Ark)/i" "game: ARMA 3": - - '/(ARMA 3)/i' + - "/(ARMA 3)/i" "game: Assetto Corsa": - - '/(Assetto Corsa)/i' + - "/(Assetto Corsa)/i" "game: Avorion": - - '/(Avorion)/i' + - "/(Avorion)/i" "game: Ballistic Overkill": - - '/(Ballistic Overkill)/i' + - "/(Ballistic Overkill)/i" "game: Barotrauma": - - '/(Barotrauma)/i' + - "/(Barotrauma)/i" diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index af1c7faba..a0c40a150 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -6,29 +6,30 @@ Fixes #[issue] ## Type of change -* [ ] Bug fix (a change which fixes an issue). -* [ ] New feature (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 (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 with 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 with 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!** diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index fcc7fc837..ec426478a 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -11,8 +11,8 @@ permissions: jobs: update_release_draft: permissions: - contents: write # for release-drafter/release-drafter to create a github release - pull-requests: write # for release-drafter/release-drafter to add label to PR + contents: write # for release-drafter/release-drafter to create a github release + pull-requests: write # for release-drafter/release-drafter to add label to PR runs-on: ubuntu-latest steps: # Drafts your next Release notes as Pull Requests are merged into "master" diff --git a/.github/workflows/git-sync.yml b/.github/workflows/git-sync.yml index fb0b3c477..b43996dc6 100644 --- a/.github/workflows/git-sync.yml +++ b/.github/workflows/git-sync.yml @@ -10,16 +10,16 @@ jobs: GitHub-to-Bitbucket: runs-on: ubuntu-latest steps: - - name: webfactory/ssh-agent@v0.5.4 - uses: webfactory/ssh-agent@v0.5.4 - with: - ssh-private-key: ${{ secrets.BITBUCKET_SECRET }} + - name: webfactory/ssh-agent@v0.5.4 + uses: webfactory/ssh-agent@v0.5.4 + with: + ssh-private-key: ${{ secrets.BITBUCKET_SECRET }} - - name: wei/git-sync@v3.0.0 - uses: wei/git-sync@v3.0.0 - with: - ssh_private_key: ${{ secrets.BITBUCKET_SECRET }} - source_repo: "https://github.com/GameServerManagers/LinuxGSM" - source_branch: "refs/heads/*" - destination_repo: "git@bitbucket.org:GameServerManagers/linuxgsm.git" - destination_branch: "refs/heads/*" + - name: wei/git-sync@v3.0.0 + uses: wei/git-sync@v3.0.0 + with: + ssh_private_key: ${{ secrets.BITBUCKET_SECRET }} + source_repo: "https://github.com/GameServerManagers/LinuxGSM" + source_branch: "refs/heads/*" + destination_repo: "git@bitbucket.org:GameServerManagers/linuxgsm.git" + destination_branch: "refs/heads/*" diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index c5ea01d0a..40da37492 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -9,13 +9,13 @@ permissions: jobs: triage: permissions: - contents: read # for github/issue-labeler to get repo contents - issues: write # for github/issue-labeler to create or remove labels + contents: read # for github/issue-labeler to get repo contents + issues: write # for github/issue-labeler to create or remove labels runs-on: ubuntu-latest steps: - - uses: github/issue-labeler@v2.4 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" - configuration-path: .github/labeler.yml - not-before: - enable-versioned-regex: 0 + - uses: github/issue-labeler@v2.4 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + configuration-path: .github/labeler.yml + not-before: + enable-versioned-regex: 0 diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 000000000..7f34c51b6 --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,55 @@ +--- +################################# +################################# +## Super Linter GitHub Actions ## +################################# +################################# +name: Lint Code Base + +# +# Documentation: +# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions +# + +############################# +# Start the job on all push # +############################# +on: + push: + branches-ignore: [master, main] + # Remove the line above to run when pushing to master + pull_request: + +############### +# Set the Job # +############### +jobs: + build: + # Name the Job + name: Lint Code Base + # Set the agent to run on + runs-on: ubuntu-latest + + ################## + # Load all steps # + ################## + steps: + ########################## + # Checkout the code base # + ########################## + - name: Checkout Code + uses: actions/checkout@v2 + with: + # Full git history is needed to get a proper list of changed files within `super-linter` + fetch-depth: 0 + + ################################ + # Run Linter against code base # + ################################ + - name: Lint Code Base + uses: github/super-linter@v4 + env: + VALIDATE_ALL_CODEBASE: false + # Change to 'master' if your main branch differs + DEFAULT_BRANCH: main + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index 7c17c56bf..320b851a1 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -1,8 +1,8 @@ -name: 'Lock Threads' +name: "Lock Threads" on: schedule: - - cron: '0 0 * * *' + - cron: "0 0 * * *" permissions: contents: read @@ -10,8 +10,8 @@ permissions: jobs: lock: permissions: - issues: write # for dessant/lock-threads to lock issues - pull-requests: write # for dessant/lock-threads to lock PRs + issues: write # for dessant/lock-threads to lock issues + pull-requests: write # for dessant/lock-threads to lock PRs runs-on: ubuntu-latest steps: - uses: dessant/lock-threads@v3 diff --git a/.github/workflows/potential-duplicates.yml b/.github/workflows/potential-duplicates.yml index 8c9fe7cc7..47356dba8 100644 --- a/.github/workflows/potential-duplicates.yml +++ b/.github/workflows/potential-duplicates.yml @@ -12,9 +12,9 @@ jobs: # Issue title filter work with anymatch https://www.npmjs.com/package/anymatch. # Any matched issue will stop detection immediately. # You can specify multi filters in each line. - filter: '' + filter: "" # Exclude keywords in title before detecting. - exclude: '' + exclude: "" # Label to set, when potential duplicates are detected. label: potential-duplicate # Get issues with state to compare. Supported state: 'all', 'closed', 'open'. diff --git a/.github/workflows/version-check.sh b/.github/workflows/version-check.sh index 44215385d..f470fd02b 100644 --- a/.github/workflows/version-check.sh +++ b/.github/workflows/version-check.sh @@ -1,5 +1,5 @@ -version=$(grep "version=" linuxgsm.sh | sed -e 's/version//g'| tr -d '="') -modulesversion=$(grep "modulesversion=" lgsm/functions/core_functions.sh | sed -e 's/modulesversion//g'| tr -d '="') +version=$(grep "version=" linuxgsm.sh | sed -e 's/version//g' | tr -d '="') +modulesversion=$(grep "modulesversion=" lgsm/functions/core_functions.sh | sed -e 's/modulesversion//g' | tr -d '="') if [ "${version}" != "${modulesversion}" ]; then echo "Error! LinuxGSM version mismatch" diff --git a/.github/workflows/version-check.yml b/.github/workflows/version-check.yml index 4c06d86d7..b2aac2f87 100644 --- a/.github/workflows/version-check.yml +++ b/.github/workflows/version-check.yml @@ -18,9 +18,9 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v3 - # Runs a single command using the runners shell - - name: compare versions - run: chmod +x .github/workflows/version-check.sh; .github/workflows/version-check.sh + # Runs a single command using the runners shell + - name: compare versions + run: chmod +x .github/workflows/version-check.sh; .github/workflows/version-check.sh diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 65a0143f5..a69325281 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,4 +1,3 @@ - # Contributor Covenant Code of Conduct ## Our Pledge @@ -18,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 @@ -107,7 +106,7 @@ Violating these terms may lead to a permanent ban. ### 4. Permanent Ban **Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an +standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. **Consequence**: A permanent ban from any sort of public interaction within @@ -120,14 +119,14 @@ version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. Community Impact Guidelines were inspired by -[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. +[Mozilla's code of conduct enforcement ladder][mozilla coc]. For answers to common questions about this code of conduct, see the FAQ at -[https://www.contributor-covenant.org/faq][FAQ]. Translations are available +[https://www.contributor-covenant.org/faq][faq]. Translations are available at [https://www.contributor-covenant.org/translations][translations]. [homepage]: https://www.contributor-covenant.org [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html -[Mozilla CoC]: https://github.com/mozilla/diversity -[FAQ]: https://www.contributor-covenant.org/faq +[mozilla coc]: https://github.com/mozilla/diversity +[faq]: https://www.contributor-covenant.org/faq [translations]: https://www.contributor-covenant.org/translations diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1a2d7a3c8..7b549c795 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,32 +6,33 @@ The following is a set of guidelines for contributing to LinuxGSM, which are hos ## Table of Contents - [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) +[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) ## Code of Conduct @@ -43,24 +44,24 @@ This project and everyone participating in it is governed by the [LinuxGSM Code This section guides you through submitting a bug report for LinuxGSM. Following these guidelines help maintainers and the community understand your report 📝, reproduce the behaviour💻, and find any related reports 🔎. -Before creating bug reports, please check [this list](https://github.com/GameServerManagers/linuxgsm/blob/master/CONTRIBUTING.md#before-submitting-a-bug-report) as you might find out that you don’t need to create one. When you are creating a bug report, please [include as many details as possible](https://github.com/GameServerManagers/linuxgsm/blob/master/CONTRIBUTING.md#how-do-i-submit-a-good-bug-report). Fill out [the required template]([https://github.com/GameServerManagers/LinuxGSM/issues/new/choose](https://github.com/GameServerManagers/LinuxGSM/issues/new/choose)), the information it asks for helps us resolve issues faster. +Before creating bug reports, please check [this list](https://github.com/GameServerManagers/linuxgsm/blob/master/CONTRIBUTING.md#before-submitting-a-bug-report) as you might find out that you don’t need to create one. When you are creating a bug report, please [include as many details as possible](https://github.com/GameServerManagers/linuxgsm/blob/master/CONTRIBUTING.md#how-do-i-submit-a-good-bug-report). Fill out [the required template](<[https://github.com/GameServerManagers/LinuxGSM/issues/new/choose](https://github.com/GameServerManagers/LinuxGSM/issues/new/choose)>), the information it asks for helps us resolve issues faster. #### 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 @@ -68,31 +69,34 @@ 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**]() 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 This section guides you through submitting a game server request for LinuxGSM, Following these guidelines help maintainers and the community understand your game server request 📝. + #### 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 @@ -110,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: @@ -135,18 +139,18 @@ 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: @@ -157,10 +161,13 @@ Below is an example of the subject line for a pull request: ### Testing #### Pull Request Status Checks -When a Pull Request is submitted, a series of status check tests are conducted. These tests will assess the code quality, complete CI tests etc. To get your PR merged these status checks must pass. + +When a Pull Request is submitted, a series of status check tests are conducted. These tests will assess the code quality, complete CI tests etc. To get your PR merged these status checks must pass. #### Test Environment + It is recommended that you have a testing environment available to test your code during development. To test your own code you must change some variables within the `linuxgsm.sh` file. This will force the use of your own code branch. + ```bash ## GitHub Branch Select # Allows for the use of different function files @@ -203,10 +210,11 @@ Highlights the LinuxGSM command the Issue/PR relates to. 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. diff --git a/README.md b/README.md index 5164e0b86..70f3b9365 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ LinuxGSM -[![LinuxGSM](https://img.shields.io/badge/-LinuxGSM-2b2b2b.svg?logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAACsAAABACAYAAACDbo5ZAAAGD0lEQVR4AcWYa2wUVRvHz75c2vJ2disXoUBEVIioRAx%2BMIFA1IRwUS6KCCiIKBrvhEYiiGm5iBgk8QOGEgUUDYTttmVZWFr2UmwURS6iYAoCtmisElSsdHdbkT7%2BTzoNy%2BGc2dm54C%2F5Rdkz85x%2FZ86ZOXOYXYhIg3Phx%2FA4PAcv6f%2Btg5vhHJjP3EcZsgsshufJHH%2FAJbDztQ7aG35J1vgCXn%2BtgvrgEbLHYei9FmE3kDOUuh10OGwjZ7gEh7kZ9gNyllK3gnrg7%2BQs56DHjbCDyB0GuRF2ArnDeDfCziF3mO1G2FfJHRa4EXYpuUOxG2GXkzuUuBH2TXKH5W6ELSV3eM%2BNsOUk5yQcAY8p2uvgSPitor3MjbB1UOQXOFBvHwpbhPYWOExvL4SNUOQ7p4P2JTlzhOPmCu0vCu1PQpE2WOhk2MdJjk9y7HNwP1wEPUJbAcmZ6WTYrYolnifbxZBiibnFySHQCkUaLdY7C0V4%2FT5OhF1JcuIW6%2B0lOcvsBi2Ezao3j8Ov7Quwj52w60jNKIs1R5GatVaDDoEXSU4D7GSxbidYT3IuwjusFK0mNUVMwaZNNbl%2B%2F87hoVCom0HthaQmnG3QB0lNPcxlCvz%2B0GtlZTuorCxYYlA%2FDzbY%2FnrAgV3hCVLzCDMgEAi9wMMi9IIM%2FUwnNXWwi5mwRaSmmmXA798xq%2F3Khp420VeE1LyS6eQeBhttSXgzywCCToIUCOyYZvKLOWWwkdfd6ORVpGYJM0F5efDe9mEQHGty2BWTmhVGO4PNBmOoKzMBxmo%2FhD25dWvljSbD5hjMkb9gT9lJq63Mzi1bKkbjloc7xBWtwiRrDASCVRi%2FRxA8if%2BvrawMTzYI%2FACpeUv2KFFtDcUyTKilCHcis8G1Ga7wHpLzG8wVFs1K7jaeUKHZfIxmkj9%2FM4S9x9RGiMEudo0QbCVu9Xqn5PWEwLUk5%2FP0iaXac53I0kAH9Sau4m54lo%2FdTMfyekLYKQZ7ub34AbMMlmw5irC2VYTN0fuVMYMf8JHxJ7L7YYXAlSRnI2%2F8RtH4siTsDMz%2BZ5yS15OEXUxyDjGD1%2BvEq8MG16CDzY6JepKwT6geYbzxb0XjGMl7vwGSgzZIwo4nOa1M8Yr9Afb%2Fj8L21%2FsXaeaNZ2A6KTiEASph%2F0vF80cn4tokqu79fzfCUk2vfF4%2FFdFGEjGPHvg2yWrsDG%2F4%2BqpZB8jPOiXjWk0y5iXdM3XhKUvxBTA9UvHuvNPh%2Bzb%2BWj10z6nwuHWBbQFMvNCjKnn7qd1jS%2Fnx9VX3b6jC%2BbwOr5eMe3%2B83IcW4%2F3qgT%2BUTbA9srGaiHsn8AKiF6Ld%2FxF%2FOx6eeAJXabvK78MTTornNMd6XJTVR7%2Fj9bBjhFxV%2FMc1kJOAy2AeA%2FgrV4mFVDZFCqm8rEJ6qysCAWqK9iaztRJRbWXa4moFTELOav7jY%2FqAvoXp0Gc9NX7bIZl17%2FZl0rC1wRLeno0NvP%2B0CTcYNnS8wW6CtzNANaxzKqo9hRNOQ8rGo7tmSsMe2zWdt2frqVRcm5s2fofCgawDNHRNxnyfqgsYez4y4ADCjRM9H73hsNWafILTQdaFiSTj%2BQ%2FxA6yH7d%2BCmR8XbYr0a7VTF2N4siSsb5qdos3R6%2FjGxpULFfw7EfORnbrI9TAToX0sD40%2F2ylcGdh2Rdhg%2BSf2gka9jRTqK9%2BGwgHz7RTfVbHxirDhivdthYUvMRX8aYAD9lstvi%2B0aDL2DUZ0eCBUNNVG0IP65FLTWqPdiqdC0koHTVXe7iyNRG23QotBEy1RbTAzQyrmnYUT2rLsoA13JpcB4eVC2daBM1g2JGLekmwf5On7EJfngfZTNnVSce8bFjaTmQdvs%2FXmO%2FJVpoXdx3RSUe9O00Fj3nUdy0RLgRHiHXOPGW1h2uKZ07c9rG%2Bxyefp23pQeyBIEQoavYlakrG8fnrY5yHn2fbxXzAgw7m8bT5zkkSk4C7cpmOK21esB%2FXAQ5DzFfTo43%2BF%2FDzf0eZ4wZ3MDSjMcvD6nIeOahGgia%2FyU3HforTPkWkwnakdn0cI9jqfbPjD%2FuQLJr6644snlgX%2FApOMoyd1R5%2FxAAAAAElFTkSuQmCC)](https://linuxgsm.com) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/d19c5234dc3743d8a8a14093711ca52d)](https://www.codacy.com/gh/GameServerManagers/LinuxGSM/dashboard?utm_source=github.com&utm_medium=referral&utm_content=GameServerManagers/LinuxGSM&utm_campaign=Badge_Grade) [![Backup Repo](https://github.com/GameServerManagers/LinuxGSM/workflows/Backup%20Repo/badge.svg)](https://bitbucket.org/GameServerManagers/linuxgsm) [![Discord](https://discordapp.com/api/guilds/127498813903601664/widget.png?style=shield)](https://linuxgsm.com/discord) [![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg?v=103)](https://github.com/GameServerManagers/LinuxGSM/blob/master/LICENSE) [![made-with-bash](https://img.shields.io/badge/-Made%20with%20Bash-1f425f.svg?logo=image%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw%2FeHBhY2tldCBiZWdpbj0i77u%2FIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8%2BIDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkE3MDg2QTAyQUZCMzExRTVBMkQxRDMzMkJDMUQ4RDk3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkE3MDg2QTAzQUZCMzExRTVBMkQxRDMzMkJDMUQ4RDk3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTcwODZBMDBBRkIzMTFFNUEyRDFEMzMyQkMxRDhEOTciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTcwODZBMDFBRkIzMTFFNUEyRDFEMzMyQkMxRDhEOTciLz4gPC9yZGY6RGVzY3JpcHRpb24%2BIDwvcmRmOlJERj4gPC94OnhtcG1ldGE%2BIDw%2FeHBhY2tldCBlbmQ9InIiPz6lm45hAAADkklEQVR42qyVa0yTVxzGn7d9Wy03MS2ii8s%2BeokYNQSVhCzOjXZOFNF4jx%2BMRmPUMEUEqVG36jo2thizLSQSMd4N8ZoQ8RKjJtooaCpK6ZoCtRXKpRempbTv5ey83bhkAUphz8fznvP8znn%2B%2F3NeEEJgNBoRRSmz0ub%2FfuxEacBg%2FDmYtiCjgo5NG2mBXq%2BH5I1ogMRk9Zbd%2BQU2e1ML6VPLOyf5tvBQ8yT1lG10imxsABm7SLs898GTpyYynEzP60hO3trHDKvMigUwdeaceacqzp7nOI4n0SSIIjl36ao4Z356OV07fSQAk6xJ3XGg%2BLCr1d1OYlVHp4eUHPnerU79ZA%2F1kuv1JQMAg%2BE4O2P23EumF3VkvHprsZKMzKwbRUXFEyTvSIEmTVbrysp%2BWr8wfQHGK6WChVa3bKUmdWou%2BjpArdGkzZ41c1zG%2Fu5uGH4swzd561F%2BuhIT4%2BLnSuPsv9%2BJKIpjNr9dXYOyk7%2FBZrcjIT4eCnoKgedJP4BEqhG77E3NKP31FO7cfQA5K0dSYuLgz2TwCWJSOBzG6crzKK%2BohNfni%2Bx6OMUMMNe%2Fgf7ocbw0v0acKg6J8Ql0q%2BT%2FAXR5PNi5dz9c71upuQqCKFAD%2BYhrZLEAmpodaHO3Qy6TI3NhBpbrshGtOWKOSMYwYGQM8nJzoFJNxP2HjyIQho4PewK6hBktoDcUwtIln4PjOWzflQ%2Be5yl0yCCYgYikTclGlxadio%2BBQCSiW1UXoVGrKYwH4RgMrjU1HAB4vR6LzWYfFUCKxfS8Ftk5qxHoCUQAUkRJaSEokkV6Y%2F%2BJUOC4hn6A39NVXVBYeNP8piH6HeA4fPbpdBQV5KOx0QaL1YppX3Jgk0TwH2Vg6S3u%2BdB91%2B%2FpuNYPYFl5uP5V7ZqvsrX7jxqMXR6ff3gCQSTzFI0a1TX3wIs8ul%2Bq4HuWAAiM39vhOuR1O1fQ2gT%2F26Z8Z5vrl2OHi9OXZn995nLV9aFfS6UC9JeJPfuK0NBohWpCHMSAAsFe74WWP%2BvT25wtP9Bpob6uGqqyDnOtaeumjRu%2ByFu36VntK%2FPA5umTJeUtPWZSU9BCgud661odVp3DZtkc7AnYR33RRC708PrVi1larW7XwZIjLnd7R6SgSqWSNjU1B3F72pz5TZbXmX5vV81Yb7Lg7XT%2FUXriu8XLVqw6c6XqWnBKiiYU%2BMt3wWF7u7i91XlSEITwSAZ%2FCzAAHsJVbwXYFFEAAAAASUVORK5CYII%3D)](https://www.gnu.org/software/bash/) +[![LinuxGSM](https://img.shields.io/badge/-LinuxGSM-2b2b2b.svg?logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAACsAAABACAYAAACDbo5ZAAAGD0lEQVR4AcWYa2wUVRvHz75c2vJ2disXoUBEVIioRAx%2BMIFA1IRwUS6KCCiIKBrvhEYiiGm5iBgk8QOGEgUUDYTttmVZWFr2UmwURS6iYAoCtmisElSsdHdbkT7%2BTzoNy%2BGc2dm54C%2F5Rdkz85x%2FZ86ZOXOYXYhIg3Phx%2FA4PAcv6f%2Btg5vhHJjP3EcZsgsshufJHH%2FAJbDztQ7aG35J1vgCXn%2BtgvrgEbLHYei9FmE3kDOUuh10OGwjZ7gEh7kZ9gNyllK3gnrg7%2BQs56DHjbCDyB0GuRF2ArnDeDfCziF3mO1G2FfJHRa4EXYpuUOxG2GXkzuUuBH2TXKH5W6ELSV3eM%2BNsOUk5yQcAY8p2uvgSPitor3MjbB1UOQXOFBvHwpbhPYWOExvL4SNUOQ7p4P2JTlzhOPmCu0vCu1PQpE2WOhk2MdJjk9y7HNwP1wEPUJbAcmZ6WTYrYolnifbxZBiibnFySHQCkUaLdY7C0V4%2FT5OhF1JcuIW6%2B0lOcvsBi2Ezao3j8Ov7Quwj52w60jNKIs1R5GatVaDDoEXSU4D7GSxbidYT3IuwjusFK0mNUVMwaZNNbl%2B%2F87hoVCom0HthaQmnG3QB0lNPcxlCvz%2B0GtlZTuorCxYYlA%2FDzbY%2FnrAgV3hCVLzCDMgEAi9wMMi9IIM%2FUwnNXWwi5mwRaSmmmXA798xq%2F3Khp420VeE1LyS6eQeBhttSXgzywCCToIUCOyYZvKLOWWwkdfd6ORVpGYJM0F5efDe9mEQHGty2BWTmhVGO4PNBmOoKzMBxmo%2FhD25dWvljSbD5hjMkb9gT9lJq63Mzi1bKkbjloc7xBWtwiRrDASCVRi%2FRxA8if%2BvrawMTzYI%2FACpeUv2KFFtDcUyTKilCHcis8G1Ga7wHpLzG8wVFs1K7jaeUKHZfIxmkj9%2FM4S9x9RGiMEudo0QbCVu9Xqn5PWEwLUk5%2FP0iaXac53I0kAH9Sau4m54lo%2FdTMfyekLYKQZ7ub34AbMMlmw5irC2VYTN0fuVMYMf8JHxJ7L7YYXAlSRnI2%2F8RtH4siTsDMz%2BZ5yS15OEXUxyDjGD1%2BvEq8MG16CDzY6JepKwT6geYbzxb0XjGMl7vwGSgzZIwo4nOa1M8Yr9Afb%2Fj8L21%2FsXaeaNZ2A6KTiEASph%2F0vF80cn4tokqu79fzfCUk2vfF4%2FFdFGEjGPHvg2yWrsDG%2F4%2BqpZB8jPOiXjWk0y5iXdM3XhKUvxBTA9UvHuvNPh%2Bzb%2BWj10z6nwuHWBbQFMvNCjKnn7qd1jS%2Fnx9VX3b6jC%2BbwOr5eMe3%2B83IcW4%2F3qgT%2BUTbA9srGaiHsn8AKiF6Ld%2FxF%2FOx6eeAJXabvK78MTTornNMd6XJTVR7%2Fj9bBjhFxV%2FMc1kJOAy2AeA%2FgrV4mFVDZFCqm8rEJ6qysCAWqK9iaztRJRbWXa4moFTELOav7jY%2FqAvoXp0Gc9NX7bIZl17%2FZl0rC1wRLeno0NvP%2B0CTcYNnS8wW6CtzNANaxzKqo9hRNOQ8rGo7tmSsMe2zWdt2frqVRcm5s2fofCgawDNHRNxnyfqgsYez4y4ADCjRM9H73hsNWafILTQdaFiSTj%2BQ%2FxA6yH7d%2BCmR8XbYr0a7VTF2N4siSsb5qdos3R6%2FjGxpULFfw7EfORnbrI9TAToX0sD40%2F2ylcGdh2Rdhg%2BSf2gka9jRTqK9%2BGwgHz7RTfVbHxirDhivdthYUvMRX8aYAD9lstvi%2B0aDL2DUZ0eCBUNNVG0IP65FLTWqPdiqdC0koHTVXe7iyNRG23QotBEy1RbTAzQyrmnYUT2rLsoA13JpcB4eVC2daBM1g2JGLekmwf5On7EJfngfZTNnVSce8bFjaTmQdvs%2FXmO%2FJVpoXdx3RSUe9O00Fj3nUdy0RLgRHiHXOPGW1h2uKZ07c9rG%2Bxyefp23pQeyBIEQoavYlakrG8fnrY5yHn2fbxXzAgw7m8bT5zkkSk4C7cpmOK21esB%2FXAQ5DzFfTo43%2BF%2FDzf0eZ4wZ3MDSjMcvD6nIeOahGgia%2FyU3HforTPkWkwnakdn0cI9jqfbPjD%2FuQLJr6644snlgX%2FApOMoyd1R5%2FxAAAAAElFTkSuQmCC)](https://linuxgsm.com) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/d19c5234dc3743d8a8a14093711ca52d)](https://www.codacy.com/gh/GameServerManagers/LinuxGSM/dashboard?utm_source=github.com&utm_medium=referral&utm_content=GameServerManagers/LinuxGSM&utm_campaign=Badge_Grade) [![Backup Repo](https://github.com/GameServerManagers/LinuxGSM/workflows/Backup%20Repo/badge.svg)](https://bitbucket.org/GameServerManagers/linuxgsm) [![Discord](https://discordapp.com/api/guilds/127498813903601664/widget.png?style=shield)](https://linuxgsm.com/discord) [![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg?v=103)](https://github.com/GameServerManagers/LinuxGSM/blob/master/LICENSE) [![made-with-bash](https://img.shields.io/badge/-Made%20with%20Bash-1f425f.svg?logo=image%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw%2FeHBhY2tldCBiZWdpbj0i77u%2FIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8%2BIDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkE3MDg2QTAyQUZCMzExRTVBMkQxRDMzMkJDMUQ4RDk3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkE3MDg2QTAzQUZCMzExRTVBMkQxRDMzMkJDMUQ4RDk3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTcwODZBMDBBRkIzMTFFNUEyRDFEMzMyQkMxRDhEOTciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTcwODZBMDFBRkIzMTFFNUEyRDFEMzMyQkMxRDhEOTciLz4gPC9yZGY6RGVzY3JpcHRpb24%2BIDwvcmRmOlJERj4gPC94OnhtcG1ldGE%2BIDw%2FeHBhY2tldCBlbmQ9InIiPz6lm45hAAADkklEQVR42qyVa0yTVxzGn7d9Wy03MS2ii8s%2BeokYNQSVhCzOjXZOFNF4jx%2BMRmPUMEUEqVG36jo2thizLSQSMd4N8ZoQ8RKjJtooaCpK6ZoCtRXKpRempbTv5ey83bhkAUphz8fznvP8znn%2B%2F3NeEEJgNBoRRSmz0ub%2FfuxEacBg%2FDmYtiCjgo5NG2mBXq%2BH5I1ogMRk9Zbd%2BQU2e1ML6VPLOyf5tvBQ8yT1lG10imxsABm7SLs898GTpyYynEzP60hO3trHDKvMigUwdeaceacqzp7nOI4n0SSIIjl36ao4Z356OV07fSQAk6xJ3XGg%2BLCr1d1OYlVHp4eUHPnerU79ZA%2F1kuv1JQMAg%2BE4O2P23EumF3VkvHprsZKMzKwbRUXFEyTvSIEmTVbrysp%2BWr8wfQHGK6WChVa3bKUmdWou%2BjpArdGkzZ41c1zG%2Fu5uGH4swzd561F%2BuhIT4%2BLnSuPsv9%2BJKIpjNr9dXYOyk7%2FBZrcjIT4eCnoKgedJP4BEqhG77E3NKP31FO7cfQA5K0dSYuLgz2TwCWJSOBzG6crzKK%2BohNfni%2Bx6OMUMMNe%2Fgf7ocbw0v0acKg6J8Ql0q%2BT%2FAXR5PNi5dz9c71upuQqCKFAD%2BYhrZLEAmpodaHO3Qy6TI3NhBpbrshGtOWKOSMYwYGQM8nJzoFJNxP2HjyIQho4PewK6hBktoDcUwtIln4PjOWzflQ%2Be5yl0yCCYgYikTclGlxadio%2BBQCSiW1UXoVGrKYwH4RgMrjU1HAB4vR6LzWYfFUCKxfS8Ftk5qxHoCUQAUkRJaSEokkV6Y%2F%2BJUOC4hn6A39NVXVBYeNP8piH6HeA4fPbpdBQV5KOx0QaL1YppX3Jgk0TwH2Vg6S3u%2BdB91%2B%2FpuNYPYFl5uP5V7ZqvsrX7jxqMXR6ff3gCQSTzFI0a1TX3wIs8ul%2Bq4HuWAAiM39vhOuR1O1fQ2gT%2F26Z8Z5vrl2OHi9OXZn995nLV9aFfS6UC9JeJPfuK0NBohWpCHMSAAsFe74WWP%2BvT25wtP9Bpob6uGqqyDnOtaeumjRu%2ByFu36VntK%2FPA5umTJeUtPWZSU9BCgud661odVp3DZtkc7AnYR33RRC708PrVi1larW7XwZIjLnd7R6SgSqWSNjU1B3F72pz5TZbXmX5vV81Yb7Lg7XT%2FUXriu8XLVqw6c6XqWnBKiiYU%2BMt3wWF7u7i91XlSEITwSAZ%2FCzAAHsJVbwXYFFEAAAAASUVORK5CYII%3D)](https://www.gnu.org/software/bash/) [LinuxGSM](https://linuxgsm.com) is the command-line tool for quick, simple deployment and management of Linux dedicated game servers. @@ -15,21 +15,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. diff --git a/lgsm/functions/README.md b/lgsm/functions/README.md index c1c823fac..de008ecfa 100755 --- a/lgsm/functions/README.md +++ b/lgsm/functions/README.md @@ -3,14 +3,15 @@ These modules are scripts that are called upon by the primary script linuxgsm.sh ## Module Names + 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. diff --git a/lgsm/functions/alert.sh b/lgsm/functions/alert.sh index c62c65556..8460209c4 100755 --- a/lgsm/functions/alert.sh +++ b/lgsm/functions/alert.sh @@ -9,7 +9,7 @@ functionselfname="$(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(){ +fn_alert_log() { info_distro.sh info_game.sh info_messages.sh @@ -24,10 +24,10 @@ fn_alert_log(){ fn_info_message_gameserver_resource fn_info_message_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(){ +fn_alert_test() { fn_script_log_info "Sending test alert" alertsubject="Alert - ${selfname} - Test" alertemoji="🚧" @@ -36,7 +36,7 @@ fn_alert_test(){ alertbody="Testing LinuxGSM Alert. No action to be taken." } -fn_alert_restart(){ +fn_alert_restart() { fn_script_log_info "Sending alert: Restarted: ${executable} not running" alertsubject="Alert - ${selfname} - Restarted" alertemoji="🚨" @@ -45,7 +45,7 @@ fn_alert_restart(){ alertbody="${selfname} ${executable} not running" } -fn_alert_restart_query(){ +fn_alert_restart_query() { fn_script_log_info "Sending alert: Restarted: ${selfname}" alertsubject="Alert - ${selfname} - Restarted" alertemoji="🚨" @@ -54,7 +54,7 @@ fn_alert_restart_query(){ alertbody="Unable to query: ${selfname}" } -fn_alert_update(){ +fn_alert_update() { fn_script_log_info "Sending alert: Updated" alertsubject="Alert - ${selfname} - Updated" alertemoji="🎮" @@ -63,7 +63,7 @@ fn_alert_update(){ alertbody="${gamename} received update" } -fn_alert_check_update(){ +fn_alert_check_update() { fn_script_log_info "Sending alert: Update available" alertsubject="Alert - ${selfname} - Update available" alertemoji="🎮" @@ -72,7 +72,7 @@ fn_alert_check_update(){ alertbody="${gamename} update available" } -fn_alert_permissions(){ +fn_alert_permissions() { fn_script_log_info "Sending alert: Permissions error" alertsubject="Alert - ${selfname}: Permissions error" alertemoji="❗" @@ -81,7 +81,7 @@ fn_alert_permissions(){ alertbody="${selfname} has permissions issues" } -fn_alert_config(){ +fn_alert_config() { fn_script_log_info "Sending alert: New _default.cfg" alertsubject="Alert - ${selfname} - New _default.cfg" alertemoji="🎮" @@ -110,128 +110,128 @@ fi fn_alert_log # Generates the more info link. -if [ "${postalert}" == "on" ]&&[ -n "${postalert}" ]; then +if [ "${postalert}" == "on" ] && [ -n "${postalert}" ]; then exitbypass=1 command_postdetails.sh fn_firstcommand_reset unset exitbypass -elif [ "${postalert}" != "on" ]&&[ "${commandname}" == "TEST-ALERT" ]; then +elif [ "${postalert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then fn_print_warn_nl "More Info not enabled" fn_script_log_warn "More Info alerts not enabled" fi -if [ "${discordalert}" == "on" ]&&[ -n "${discordalert}" ]; then +if [ "${discordalert}" == "on" ] && [ -n "${discordalert}" ]; then alert_discord.sh -elif [ "${discordalert}" != "on" ]&&[ "${commandname}" == "TEST-ALERT" ]; then +elif [ "${discordalert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then fn_print_warn_nl "Discord alerts not enabled" fn_script_log_warn "Discord alerts not enabled" -elif [ -z "${discordtoken}" ]&&[ "${commandname}" == "TEST-ALERT" ]; then +elif [ -z "${discordtoken}" ] && [ "${commandname}" == "TEST-ALERT" ]; then fn_print_error_nl "Discord token not set" echo -e "* https://docs.linuxgsm.com/alerts/discord" fn_script_error "Discord token not set" fi -if [ "${emailalert}" == "on" ]&&[ -n "${email}" ]; then +if [ "${emailalert}" == "on" ] && [ -n "${email}" ]; then alert_email.sh -elif [ "${emailalert}" != "on" ]&&[ "${commandname}" == "TEST-ALERT" ]; then +elif [ "${emailalert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then fn_print_warn_nl "Email alerts not enabled" fn_script_log_warn "Email alerts not enabled" -elif [ -z "${email}" ]&&[ "${commandname}" == "TEST-ALERT" ]; then +elif [ -z "${email}" ] && [ "${commandname}" == "TEST-ALERT" ]; then fn_print_error_nl "Email not set" fn_script_log_error "Email not set" fi -if [ "${gotifyalert}" == "on" ]&&[ -n "${gotifyalert}" ]; then +if [ "${gotifyalert}" == "on" ] && [ -n "${gotifyalert}" ]; then alert_gotify.sh -elif [ "${gotifyalert}" != "on" ]&&[ "${commandname}" == "TEST-ALERT" ]; then +elif [ "${gotifyalert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then fn_print_warn_nl "Gotify alerts not enabled" fn_script_log_warn "Gotify alerts not enabled" -elif [ -z "${gotifytoken}" ]&&[ "${commandname}" == "TEST-ALERT" ]; then +elif [ -z "${gotifytoken}" ] && [ "${commandname}" == "TEST-ALERT" ]; then fn_print_error_nl "Gotify token not set" echo -e "* https://docs.linuxgsm.com/alerts/gotify" fn_script_error "Gotify token not set" -elif [ -z "${gotifywebhook}" ]&&[ "${commandname}" == "TEST-ALERT" ]; then +elif [ -z "${gotifywebhook}" ] && [ "${commandname}" == "TEST-ALERT" ]; then fn_print_error_nl "Gotify webhook not set" echo -e "* https://docs.linuxgsm.com/alerts/gotify" fn_script_error "Gotify webhook not set" fi -if [ "${iftttalert}" == "on" ]&&[ -n "${iftttalert}" ]; then +if [ "${iftttalert}" == "on" ] && [ -n "${iftttalert}" ]; then alert_ifttt.sh -elif [ "${iftttalert}" != "on" ]&&[ "${commandname}" == "TEST-ALERT" ]; then +elif [ "${iftttalert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then fn_print_warn_nl "IFTTT alerts not enabled" fn_script_log_warn "IFTTT alerts not enabled" -elif [ -z "${ifttttoken}" ]&&[ "${commandname}" == "TEST-ALERT" ]; then +elif [ -z "${ifttttoken}" ] && [ "${commandname}" == "TEST-ALERT" ]; then fn_print_error_nl "IFTTT token not set" echo -e "* https://docs.linuxgsm.com/alerts/ifttt" fn_script_error "IFTTT token not set" fi -if [ "${mailgunalert}" == "on" ]&&[ -n "${mailgunalert}" ]; then +if [ "${mailgunalert}" == "on" ] && [ -n "${mailgunalert}" ]; then alert_mailgun.sh -elif [ "${mailgunalert}" != "on" ]&&[ "${commandname}" == "TEST-ALERT" ]; then +elif [ "${mailgunalert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then fn_print_warn_nl "Mailgun alerts not enabled" fn_script_log_warn "Mailgun alerts not enabled" -elif [ -z "${mailguntoken}" ]&&[ "${commandname}" == "TEST-ALERT" ]; then +elif [ -z "${mailguntoken}" ] && [ "${commandname}" == "TEST-ALERT" ]; then fn_print_error_nl "Mailgun token not set" echo -e "* https://docs.linuxgsm.com/alerts/mailgun" fn_script_error "Mailgun token not set" fi -if [ "${pushbulletalert}" == "on" ]&&[ -n "${pushbullettoken}" ]; then +if [ "${pushbulletalert}" == "on" ] && [ -n "${pushbullettoken}" ]; then alert_pushbullet.sh -elif [ "${pushbulletalert}" != "on" ]&&[ "${commandname}" == "TEST-ALERT" ]; then +elif [ "${pushbulletalert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then fn_print_warn_nl "Pushbullet alerts not enabled" fn_script_log_warn "Pushbullet alerts not enabled" -elif [ -z "${pushbullettoken}" ]&&[ "${commandname}" == "TEST-ALERT" ]; then +elif [ -z "${pushbullettoken}" ] && [ "${commandname}" == "TEST-ALERT" ]; then fn_print_error_nl "Pushbullet token not set" echo -e "* https://docs.linuxgsm.com/alerts/pushbullet" fn_script_error "Pushbullet token not set" fi -if [ "${pushoveralert}" == "on" ]&&[ -n "${pushoveralert}" ]; then +if [ "${pushoveralert}" == "on" ] && [ -n "${pushoveralert}" ]; then alert_pushover.sh -elif [ "${pushoveralert}" != "on" ]&&[ "${commandname}" == "TEST-ALERT" ]; then +elif [ "${pushoveralert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then fn_print_warn_nl "Pushover alerts not enabled" fn_script_log_warn "Pushover alerts not enabled" -elif [ -z "${pushovertoken}" ]&&[ "${commandname}" == "TEST-ALERT" ]; then +elif [ -z "${pushovertoken}" ] && [ "${commandname}" == "TEST-ALERT" ]; then fn_print_error_nl "Pushover token not set" echo -e "* https://docs.linuxgsm.com/alerts/pushover" fn_script_error "Pushover token not set" fi -if [ "${telegramalert}" == "on" ]&&[ -n "${telegramtoken}" ]; then +if [ "${telegramalert}" == "on" ] && [ -n "${telegramtoken}" ]; then alert_telegram.sh -elif [ "${telegramalert}" != "on" ]&&[ "${commandname}" == "TEST-ALERT" ]; then +elif [ "${telegramalert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then fn_print_warn_nl "Telegram Messages not enabled" fn_script_log_warn "Telegram Messages not enabled" -elif [ -z "${telegramtoken}" ]&&[ "${commandname}" == "TEST-ALERT" ]; then +elif [ -z "${telegramtoken}" ] && [ "${commandname}" == "TEST-ALERT" ]; then fn_print_error_nl "Telegram token not set." echo -e "* https://docs.linuxgsm.com/alerts/telegram" fn_script_error "Telegram token not set." -elif [ -z "${telegramchatid}" ]&&[ "${commandname}" == "TEST-ALERT" ]; then +elif [ -z "${telegramchatid}" ] && [ "${commandname}" == "TEST-ALERT" ]; then fn_print_error_nl "Telegram chat id not set." echo -e "* https://docs.linuxgsm.com/alerts/telegram" fn_script_error "Telegram chat id not set." fi -if [ "${rocketchatalert}" == "on" ]&&[ -n "${rocketchatalert}" ]; then +if [ "${rocketchatalert}" == "on" ] && [ -n "${rocketchatalert}" ]; then alert_rocketchat.sh -elif [ "${rocketchatalert}" != "on" ]&&[ "${commandname}" == "TEST-ALERT" ]; then +elif [ "${rocketchatalert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then fn_print_warn_nl "Rocketchat alerts not enabled" fn_script_log_warn "Rocketchat alerts not enabled" -elif [ -z "${rocketchattoken}" ]&&[ "${commandname}" == "TEST-ALERT" ]; then +elif [ -z "${rocketchattoken}" ] && [ "${commandname}" == "TEST-ALERT" ]; then fn_print_error_nl "Rocketchat token not set" #echo -e "* https://docs.linuxgsm.com/alerts/slack" fn_script_error "Rocketchat token not set" fi -if [ "${slackalert}" == "on" ]&&[ -n "${slackalert}" ]; then +if [ "${slackalert}" == "on" ] && [ -n "${slackalert}" ]; then alert_slack.sh -elif [ "${slackalert}" != "on" ]&&[ "${commandname}" == "TEST-ALERT" ]; then +elif [ "${slackalert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then fn_print_warn_nl "Slack alerts not enabled" fn_script_log_warn "Slack alerts not enabled" -elif [ -z "${slacktoken}" ]&&[ "${commandname}" == "TEST-ALERT" ]; then +elif [ -z "${slacktoken}" ] && [ "${commandname}" == "TEST-ALERT" ]; then fn_print_error_nl "Slack token not set" echo -e "* https://docs.linuxgsm.com/alerts/slack" fn_script_error "Slack token not set" diff --git a/lgsm/functions/alert_discord.sh b/lgsm/functions/alert_discord.sh index 9db56da3f..770817516 100755 --- a/lgsm/functions/alert_discord.sh +++ b/lgsm/functions/alert_discord.sh @@ -7,7 +7,8 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -json=$(cat </dev/null)" ]; then - array_deps_required+=( mailutils postfix ) - elif [ "$(command -v rpm 2>/dev/null)" ]; then - array_deps_required+=( mailx postfix ) + array_deps_required+=(sendmail) + elif [ "$(command -v dpkg-query 2> /dev/null)" ]; then + array_deps_required+=(mailutils postfix) + elif [ "$(command -v rpm 2> /dev/null)" ]; then + array_deps_required+=(mailx postfix) fi else - if [ "$(command -v dpkg-query 2>/dev/null)" ]; then - array_deps_required+=( mailutils postfix ) - elif [ "$(command -v rpm 2>/dev/null)" ]; then - array_deps_required+=( mailx postfix ) + if [ "$(command -v dpkg-query 2> /dev/null)" ]; then + array_deps_required+=(mailutils postfix) + elif [ "$(command -v rpm 2> /dev/null)" ]; then + array_deps_required+=(mailx postfix) fi fi fi } -fn_install_missing_deps(){ +fn_install_missing_deps() { # If any dependencies are not installed. if [ "${#array_deps_missing[*]}" != "0" ]; then if [ "${commandname}" == "INSTALL" ]; then @@ -143,9 +143,8 @@ fn_install_missing_deps(){ fi fi - # Add sudo dpkg --add-architecture i386 if using i386 packages. - if [ "$(command -v dpkg-query 2>/dev/null)" ]; then + if [ "$(command -v dpkg-query 2> /dev/null)" ]; then if printf '%s\n' "${array_deps_required[@]}" | grep -q -P 'i386'; then i386installcommand="sudo dpkg --add-architecture i386; " fi @@ -162,13 +161,13 @@ fn_install_missing_deps(){ echo -en "...\r" sleep 1 echo -en " \r" - if [ "$(command -v dpkg-query 2>/dev/null)" ]; then + if [ "$(command -v dpkg-query 2> /dev/null)" ]; then cmd="echo steamcmd steam/question select \"I AGREE\" | sudo debconf-set-selections; echo steamcmd steam/license note '' | sudo debconf-set-selections; ${i386installcommand}sudo apt-get update; sudo apt-get -y install ${array_deps_missing[*]}" eval "${cmd}" - elif [ "$(command -v dnf 2>/dev/null)" ]; then + elif [ "$(command -v dnf 2> /dev/null)" ]; then cmd="sudo dnf -y install ${array_deps_missing[*]}" eval "${cmd}" - elif [ "$(command -v yum 2>/dev/null)" ]; then + elif [ "$(command -v yum 2> /dev/null)" ]; then cmd="sudo yum -y install ${array_deps_missing[*]}" eval "${cmd}" fi @@ -182,11 +181,11 @@ fn_install_missing_deps(){ # If automatic dependency install is unavailable. if [ "${autodepinstall}" != "0" ]; then - if [ "$(command -v dpkg-query 2>/dev/null)" ]; then + if [ "$(command -v dpkg-query 2> /dev/null)" ]; then echo -e "${i386installcommand}sudo apt update; sudo apt install ${array_deps_missing[*]}" - elif [ "$(command -v dnf 2>/dev/null)" ]; then + elif [ "$(command -v dnf 2> /dev/null)" ]; then echo -e "sudo dnf install ${array_deps_missing[*]}" - elif [ "$(command -v yum 2>/dev/null)" ]; then + elif [ "$(command -v yum 2> /dev/null)" ]; then echo -e "sudo yum install ${array_deps_missing[*]}" fi fi @@ -210,7 +209,7 @@ fn_install_missing_deps(){ fi } -fn_check_loop(){ +fn_check_loop() { # Loop though required depenencies checking if they are installed. for deptocheck in ${array_deps_required[*]}; do fn_deps_detector @@ -221,21 +220,21 @@ fn_check_loop(){ } # Checks if dependency is installed or not. -fn_deps_detector(){ +fn_deps_detector() { ## Check. # SteamCMD: Will be removed from required array if no appid is present or non-free repo is not available. # This will cause SteamCMD to be installed using tar. - if [ "${deptocheck}" == "libsdl2-2.0-0:i386" ]&&[ -z "${appid}" ]; then - array_deps_required=( "${array_deps_required[@]/libsdl2-2.0-0:i386}" ) + if [ "${deptocheck}" == "libsdl2-2.0-0:i386" ] && [ -z "${appid}" ]; then + array_deps_required=("${array_deps_required[@]/libsdl2-2.0-0:i386/}") steamcmdstatus=1 - elif [ "${deptocheck}" == "steamcmd" ]&&[ -z "${appid}" ]; then - array_deps_required=( "${array_deps_required[@]/steamcmd}" ) + elif [ "${deptocheck}" == "steamcmd" ] && [ -z "${appid}" ]; then + array_deps_required=("${array_deps_required[@]/steamcmd/}") steamcmdstatus=1 - elif [ "${deptocheck}" == "steamcmd" ]&&[ "${distroid}" == "debian" ]&& ! grep -qE "^deb .*non-free" /etc/apt/sources.list; then - array_deps_required=( "${array_deps_required[@]/steamcmd}" ) + elif [ "${deptocheck}" == "steamcmd" ] && [ "${distroid}" == "debian" ] && ! grep -qE "^deb .*non-free" /etc/apt/sources.list; then + array_deps_required=("${array_deps_required[@]/steamcmd/}") steamcmdstatus=1 # Java: Added for users using Oracle JRE to bypass check. - elif [[ ${deptocheck} == "openjdk"* ]]||[[ ${deptocheck} == "java"* ]]; then + elif [[ ${deptocheck} == "openjdk"* ]] || [[ ${deptocheck} == "java"* ]]; then # Is java already installed? if [ -n "${javaversion}" ]; then # Added for users using Oracle JRE to bypass check. @@ -246,7 +245,7 @@ fn_deps_detector(){ fi # Mono: A Mono repo needs to be installed. elif [ "${deptocheck}" == "mono-complete" ]; then - if [ -n "${monoversion}" ]&&[ "${monoversion}" -ge "5" ]; then + if [ -n "${monoversion}" ] && [ "${monoversion}" -ge "5" ]; then # Mono >= 5.0.0 already installed. depstatus=0 monostatus=0 @@ -255,13 +254,13 @@ fn_deps_detector(){ depstatus=1 monostatus=1 fi - elif [ "$(command -v dpkg-query 2>/dev/null)" ]; then - dpkg-query -W -f='${Status}' "${deptocheck}" 2>/dev/null | grep -q -P '^install ok installed' + elif [ "$(command -v dpkg-query 2> /dev/null)" ]; then + dpkg-query -W -f='${Status}' "${deptocheck}" 2> /dev/null | grep -q -P '^install ok installed' depstatus=$? - elif [ "$(command -v dnf 2>/dev/null)" ]; then + elif [ "$(command -v dnf 2> /dev/null)" ]; then dnf list installed "${deptocheck}" > /dev/null 2>&1 depstatus=$? - elif [ "$(command -v rpm 2>/dev/null)" ]; then + elif [ "$(command -v rpm 2> /dev/null)" ]; then rpm -q "${deptocheck}" > /dev/null 2>&1 depstatus=$? fi @@ -286,11 +285,11 @@ fn_deps_detector(){ fi # If SteamCMD requirements are not met install will fail. if [ -n "${appid}" ]; then - for steamcmddeptocheck in ${array_deps_required_steamcmd[*]}; do - if [ "${deptocheck}" != "steamcmd" ]&&[ "${deptocheck}" == "${steamcmddeptocheck}" ]; then - steamcmdfail=1 - fi - done + for steamcmddeptocheck in ${array_deps_required_steamcmd[*]}; do + if [ "${deptocheck}" != "steamcmd" ] && [ "${deptocheck}" == "${steamcmddeptocheck}" ]; then + steamcmdfail=1 + fi + done fi fi unset depstatus @@ -326,10 +325,10 @@ fi info_distro.sh -if [ ! -f "${tmpdir}/dependency-no-check.tmp" ]&&[ ! -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then +if [ ! -f "${tmpdir}/dependency-no-check.tmp" ] && [ ! -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then # Check that the distro dependency csv file exists. fn_check_file_github "lgsm/data" "${distroid}-${distroversioncsv}.csv" - if [ -n "${checkflag}" ]&&[ "${checkflag}" == "0" ]; then + if [ -n "${checkflag}" ] && [ "${checkflag}" == "0" ]; then fn_fetch_file_github "lgsm/data" "${distroid}-${distroversioncsv}.csv" "lgsm/data" "chmodx" "norun" "noforce" "nohash" fi fi @@ -338,7 +337,7 @@ fi if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then depall=$(awk -F, '$1=="all" {$1=""; print $0}' "${datadir}/${distroid}-${distroversioncsv}.csv") depsteamcmd=$(awk -F, '$1=="steamcmd" {$1=""; print $0}' "${datadir}/${distroid}-${distroversioncsv}.csv") - depshortname=$(awk -v shortname="$shortname" -F, '$1==shortname {$1=""; print $0}' "${datadir}/${distroid}-${distroversioncsv}.csv") + depshortname=$(awk -v shortname="$shortname" -F, '$1==shortname {$1=""; print $0}' "${datadir}/${distroid}-${distroversioncsv}.csv") # Generate array of missing deps. array_deps_missing=() @@ -351,11 +350,11 @@ if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then fn_check_loop # Warn the user that dependency checking is unavailable for their distro. -elif [ "${commandname}" == "INSTALL" ]||[ -n "${checkflag}" ]&&[ "${checkflag}" != "0" ]; then +elif [ "${commandname}" == "INSTALL" ] || [ -n "${checkflag}" ] && [ "${checkflag}" != "0" ]; then fn_print_warning_nl "LinuxGSM dependency checking currently unavailable for ${distroname}." # Prevent future dependency checking if unavailable for the distro. echo "${version}" > "${tmpdir}/dependency-no-check.tmp" -elif [ -f "${tmpdir}/dependency-no-check.tmp" ]; then +elif [ -f "${tmpdir}/dependency-no-check.tmp" ]; then # Allow LinuxGSM to try a dependency check if LinuxGSM has been recently updated. nocheckversion=$(cat "${tmpdir}/dependency-no-check.tmp") if [ "${version}" != "${nocheckversion}" ]; then diff --git a/lgsm/functions/check_ip.sh b/lgsm/functions/check_ip.sh index 0dafbbcdc..fc5d70f2c 100755 --- a/lgsm/functions/check_ip.sh +++ b/lgsm/functions/check_ip.sh @@ -10,17 +10,17 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" info_game.sh -ip_commands_array=( "/bin/ip" "/usr/sbin/ip" "ip") +ip_commands_array=("/bin/ip" "/usr/sbin/ip" "ip") for ip_command in "${ip_commands_array[@]}"; do - if [ "$(command -v ${ip_command} 2>/dev/null)" ]; then + if [ "$(command -v ${ip_command} 2> /dev/null)" ]; then ipcommand="${ip_command}" break fi done -ethtool_commands_array=( "/bin/ethtool" "/usr/sbin/ethtool" "ethtool") +ethtool_commands_array=("/bin/ethtool" "/usr/sbin/ethtool" "ethtool") for ethtool_command in "${ethtool_commands_array[@]}"; do - if [ "$(command -v ${ethtool_command} 2>/dev/null)" ]; then + if [ "$(command -v ${ethtool_command} 2> /dev/null)" ]; then ethtoolcommand="${ethtool_command}" break fi @@ -32,27 +32,27 @@ getipwc=$(${ipcommand} -o -4 addr | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\ # Check if server has multiple IP addresses # If the IP variable has been set by user. -if [ -n "${ip}" ]&&[ "${ip}" != "0.0.0.0" ]; then - queryips=( "${ip}" ) - webadminip=( "${ip}" ) - telnetip=( "${ip}" ) +if [ -n "${ip}" ] && [ "${ip}" != "0.0.0.0" ]; then + queryips=("${ip}") + webadminip=("${ip}") + telnetip=("${ip}") # If game config does have an IP set. -elif [ -n "${configip}" ]&&[ "${configip}" != "0.0.0.0" ];then - queryips=( "${configip}" ) +elif [ -n "${configip}" ] && [ "${configip}" != "0.0.0.0" ]; then + queryips=("${configip}") ip="${configip}" - webadminip=( "${configip}" ) - telnetip=( "${configip}" ) + webadminip=("${configip}") + telnetip=("${configip}") # If there is only 1 server IP address. # Some IP details can automaticly use the one IP elif [ "${getipwc}" == "1" ]; then - queryips=( $(echo "${getip}") ) + queryips=($(echo "${getip}")) ip="0.0.0.0" - webadminip=( "${getip}" ) - telnetip=( "${getip}" ) + webadminip=("${getip}") + telnetip=("${getip}") # If no ip is set by the user and server has more than one IP. else - queryips=( $(echo "${getip}") ) + queryips=($(echo "${getip}")) ip="0.0.0.0" - webadminip=( "${ip}" ) - telnetip=( "${ip}" ) + webadminip=("${ip}") + telnetip=("${ip}") fi diff --git a/lgsm/functions/check_last_update.sh b/lgsm/functions/check_last_update.sh index 07e9d3883..ee86c0ba1 100755 --- a/lgsm/functions/check_last_update.sh +++ b/lgsm/functions/check_last_update.sh @@ -16,8 +16,8 @@ if [ -f "${lockdir}/lastupdate.lock" ]; then fi check_status.sh -if [ -f "${lockdir}/lastupdate.lock" ]&&[ "${status}" != "0" ]; then - if [ ! -f "${lockdir}/${selfname}-laststart.lock" ]||[ "${laststart}" -lt "${lastupdate}" ]; then +if [ -f "${lockdir}/lastupdate.lock" ] && [ "${status}" != "0" ]; then + if [ ! -f "${lockdir}/${selfname}-laststart.lock" ] || [ "${laststart}" -lt "${lastupdate}" ]; then fn_print_info "${selfname} has not been restarted since last update" fn_script_log_info "${selfname} has not been restarted since last update" command_restart.sh diff --git a/lgsm/functions/check_logs.sh b/lgsm/functions/check_logs.sh index b8dad203c..fa3df92d1 100755 --- a/lgsm/functions/check_logs.sh +++ b/lgsm/functions/check_logs.sh @@ -7,7 +7,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_check_logs(){ +fn_check_logs() { fn_print_dots "Checking for log files" fn_print_info_nl "Checking for log files: Creating log files" checklogs=1 @@ -15,12 +15,12 @@ fn_check_logs(){ } # Create directories for the script and console logs. -if [ ! -d "${lgsmlogdir}" ]||[ ! -d "${consolelogdir}" ]; then +if [ ! -d "${lgsmlogdir}" ] || [ ! -d "${consolelogdir}" ]; then fn_check_logs fi # Create gamelogdir. # If variable exists gamelogdir exists and log/server does not. -if [ "${gamelogdir}" ]&&[ -d "${gamelogdir}" ]&&[ ! -d "${logdir}/server" ]; then +if [ "${gamelogdir}" ] && [ -d "${gamelogdir}" ] && [ ! -d "${logdir}/server" ]; then fn_check_logs fi diff --git a/lgsm/functions/check_permissions.sh b/lgsm/functions/check_permissions.sh index 4c8fda389..92a76600b 100755 --- a/lgsm/functions/check_permissions.sh +++ b/lgsm/functions/check_permissions.sh @@ -7,7 +7,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_check_ownership(){ +fn_check_ownership() { if [ -f "${rootdir}/${selfname}" ]; then if [ "$(find "${rootdir}/${selfname}" -not -user "$(whoami)" | wc -l)" -ne "0" ]; then selfownissue=1 @@ -23,7 +23,7 @@ fn_check_ownership(){ filesownissue=1 fi fi - if [ "${selfownissue}" == "1" ]||[ "${funcownissue}" == "1" ]||[ "${filesownissue}" == "1" ]; then + if [ "${selfownissue}" == "1" ] || [ "${funcownissue}" == "1" ] || [ "${filesownissue}" == "1" ]; then fn_print_fail_nl "Ownership issues found" fn_script_log_fatal "Ownership issues found" fn_print_information_nl "The current user ($(whoami)) does not have ownership of the following files:" @@ -36,7 +36,7 @@ fn_check_ownership(){ if [ "${funcownissue}" == "1" ]; then find "${functionsdir}" -not -user "$(whoami)" -printf "%u\t%g\t%p\n" fi - if [ "${filesownissue}" == "1" ]; then + if [ "${filesownissue}" == "1" ]; then find "${serverfiles}" -not -user "$(whoami)" -printf "%u\t%g\t%p\n" fi @@ -52,7 +52,7 @@ fn_check_ownership(){ fi } -fn_check_permissions(){ +fn_check_permissions() { if [ -d "${functionsdir}" ]; then if [ "$(find "${functionsdir}" -type f -not -executable | wc -l)" -ne "0" ]; then fn_print_fail_nl "Permissions issues found" @@ -78,7 +78,7 @@ fn_check_permissions(){ # Grab the first and second digit for user and group permission. userrootdirperm="${rootdirperm:0:1}" grouprootdirperm="${rootdirperm:1:1}" - if [ "${userrootdirperm}" != "7" ]&&[ "${grouprootdirperm}" != "7" ]; then + if [ "${userrootdirperm}" != "7" ] && [ "${grouprootdirperm}" != "7" ]; then fn_print_fail_nl "Permissions issues found" fn_script_log_fatal "Permissions issues found" fn_print_information_nl "The following directory does not have the correct permissions:" @@ -102,9 +102,9 @@ fn_check_permissions(){ userexecperm="${execperm:0:1}" groupexecperm="${execperm:1:1}" # Check for invalid user permission. - if [ "${userexecperm}" == "0" ]||[ "${userexecperm}" == "2" ]||[ "${userexecperm}" == "4" ]||[ "${userexecperm}" == "6" ]; then + if [ "${userexecperm}" == "0" ] || [ "${userexecperm}" == "2" ] || [ "${userexecperm}" == "4" ] || [ "${userexecperm}" == "6" ]; then # If user permission is invalid, then check for invalid group permissions. - if [ "${groupexecperm}" == "0" ]||[ "${groupexecperm}" == "2" ]||[ "${groupexecperm}" == "4" ]||[ "${groupexecperm}" == "6" ]; then + if [ "${groupexecperm}" == "0" ] || [ "${groupexecperm}" == "2" ] || [ "${groupexecperm}" == "4" ] || [ "${groupexecperm}" == "6" ]; then # If permission issues are found. fn_print_warn_nl "Permissions issue found" fn_script_log_warn "Permissions issue found" @@ -122,18 +122,18 @@ fn_check_permissions(){ # Grab the first and second digit for user and group permission. userexecperm="${execperm:0:1}" groupexecperm="${execperm:1:1}" - if [ "${userexecperm}" == "0" ]||[ "${userexecperm}" == "2" ]||[ "${userexecperm}" == "4" ]||[ "${userexecperm}" == "6" ]; then - if [ "${groupexecperm}" == "0" ]||[ "${groupexecperm}" == "2" ]||[ "${groupexecperm}" == "4" ]||[ "${groupexecperm}" == "6" ]; then - # If errors are still found. - fn_print_fail_nl "The following file could not be set executable:" - ls -l "${executabledir}/${execname}" - fn_script_log_warn "The following file could not be set executable:" - fn_script_log_info "${executabledir}/${execname}" - if [ "${monitorflag}" == "1" ]; then - alert="permissions" - alert.sh - fi - core_exit.sh + if [ "${userexecperm}" == "0" ] || [ "${userexecperm}" == "2" ] || [ "${userexecperm}" == "4" ] || [ "${userexecperm}" == "6" ]; then + if [ "${groupexecperm}" == "0" ] || [ "${groupexecperm}" == "2" ] || [ "${groupexecperm}" == "4" ] || [ "${groupexecperm}" == "6" ]; then + # If errors are still found. + fn_print_fail_nl "The following file could not be set executable:" + ls -l "${executabledir}/${execname}" + fn_script_log_warn "The following file could not be set executable:" + fn_script_log_info "${executabledir}/${execname}" + if [ "${monitorflag}" == "1" ]; then + alert="permissions" + alert.sh + fi + core_exit.sh fi fi fi @@ -144,26 +144,26 @@ fn_check_permissions(){ ## The following fn_sys_perm_* functions checks for permission errors in /sys directory. # Checks for permission errors in /sys directory. -fn_sys_perm_errors_detect(){ +fn_sys_perm_errors_detect() { # Reset test variables. sysdirpermerror="0" classdirpermerror="0" netdirpermerror="0" # Check permissions. # /sys, /sys/class and /sys/class/net should be readable & executable. - if [ ! -r "/sys" ]||[ ! -x "/sys" ]; then + if [ ! -r "/sys" ] || [ ! -x "/sys" ]; then sysdirpermerror="1" fi - if [ ! -r "/sys/class" ]||[ ! -x "/sys/class" ]; then + if [ ! -r "/sys/class" ] || [ ! -x "/sys/class" ]; then classdirpermerror="1" fi - if [ ! -r "/sys/class/net" ]||[ ! -x "/sys/class/net" ]; then + if [ ! -r "/sys/class/net" ] || [ ! -x "/sys/class/net" ]; then netdirpermerror="1" fi } # Display a message on how to fix the issue manually. -fn_sys_perm_fix_manually_msg(){ +fn_sys_perm_fix_manually_msg() { echo -e "" fn_print_information_nl "This error causes servers to fail starting properly" fn_script_log_info "This error causes servers to fail starting properly." @@ -180,7 +180,7 @@ fn_sys_perm_fix_manually_msg(){ } # Attempt to fix /sys related permission errors if sudo is available, exits otherwise. -fn_sys_perm_errors_fix(){ +fn_sys_perm_errors_fix() { if sudo -n true > /dev/null 2>&1; then fn_print_dots "Automatically fixing /sys permissions" fn_script_log_info "Automatically fixing /sys permissions." @@ -195,7 +195,7 @@ fn_sys_perm_errors_fix(){ fi # Run check again to see if it's fixed. fn_sys_perm_errors_detect - if [ "${sysdirpermerror}" == "1" ]||[ "${classdirpermerror}" == "1" ]||[ "${netdirpermerror}" == "1" ]; then + if [ "${sysdirpermerror}" == "1" ] || [ "${classdirpermerror}" == "1" ] || [ "${netdirpermerror}" == "1" ]; then fn_print_error "Could not fix /sys permissions" fn_script_log_error "Could not fix /sys permissions." fn_sleep_time @@ -206,16 +206,16 @@ fn_sys_perm_errors_fix(){ fn_script_log_pass "Permissions in /sys fixed" fi else - # Show the user how to fix. - fn_sys_perm_fix_manually_msg + # Show the user how to fix. + fn_sys_perm_fix_manually_msg fi } # Processes to the /sys related permission errors check & fix/info. -fn_sys_perm_error_process(){ +fn_sys_perm_error_process() { fn_sys_perm_errors_detect # If any error was found. - if [ "${sysdirpermerror}" == "1" ]||[ "${classdirpermerror}" == "1" ]||[ "${netdirpermerror}" == "1" ]; then + if [ "${sysdirpermerror}" == "1" ] || [ "${classdirpermerror}" == "1" ] || [ "${netdirpermerror}" == "1" ]; then fn_print_error_nl "Permission error(s) found in /sys" fn_script_log_error "Permission error(s) found in /sys" # Run the fix diff --git a/lgsm/functions/check_status.sh b/lgsm/functions/check_status.sh index 670669e50..28ec38eb2 100755 --- a/lgsm/functions/check_status.sh +++ b/lgsm/functions/check_status.sh @@ -7,4 +7,4 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -status=$(tmux list-sessions -F "#{session_name}" 2>/dev/null | grep -Ecx "^${sessionname}") +status=$(tmux list-sessions -F "#{session_name}" 2> /dev/null | grep -Ecx "^${sessionname}") diff --git a/lgsm/functions/check_system_requirements.sh b/lgsm/functions/check_system_requirements.sh index cc72288fb..bfe597135 100755 --- a/lgsm/functions/check_system_requirements.sh +++ b/lgsm/functions/check_system_requirements.sh @@ -26,19 +26,19 @@ elif [ "${shortname}" == "arma3" ]; then elif [ "${shortname}" == "rust" ]; then ramrequirementmb="4000" ramrequirementgb="4" -elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "pmc" ]||[ "${shortname}" == "wmc" ]; then +elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ] || [ "${shortname}" == "wmc" ]; then ramrequirementmb="1000" ramrequirementgb="1" elif [ "${shortname}" == "pstbs" ]; then ramrequirementmb="2000" ramrequirementgb="2" -elif [ "${shortname}" == "ns2" ]||[ "${shortname}" == "ns2c" ]; then +elif [ "${shortname}" == "ns2" ] || [ "${shortname}" == "ns2c" ]; then ramrequirementmb="1000" ramrequirementgb="1" elif [ "${shortname}" == "st" ]; then ramrequirementmb="1000" ramrequirementgb="1" -elif [ "${shortname}" == "pvr" ];then +elif [ "${shortname}" == "pvr" ]; then ramrequirementmb="2000" ramrequirementgb="2" fi diff --git a/lgsm/functions/check_tmuxception.sh b/lgsm/functions/check_tmuxception.sh index e11b55861..64705a3a8 100755 --- a/lgsm/functions/check_tmuxception.sh +++ b/lgsm/functions/check_tmuxception.sh @@ -7,8 +7,8 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_check_is_in_tmux(){ - if [ "${TMUX}" ]; then +fn_check_is_in_tmux() { + if [ "${TMUX}" ]; then fn_print_fail_nl "tmuxception error: Sorry Cobb you cannot start a tmux session inside of a tmux session." fn_script_log_fatal "Tmuxception error: Attempted to start a tmux session inside of a tmux session." fn_print_information_nl "LinuxGSM creates a tmux session when starting the server." @@ -18,7 +18,7 @@ fn_check_is_in_tmux(){ fi } -fn_check_is_in_screen(){ +fn_check_is_in_screen() { if [ "${STY}" ]; then fn_print_fail_nl "tmuxception error: Sorry Cobb you cannot start a tmux session inside of a screen session." fn_script_log_fatal "Tmuxception error: Attempted to start a tmux session inside of a screen session." diff --git a/lgsm/functions/check_version.sh b/lgsm/functions/check_version.sh index a0f3d4435..657e32b54 100755 --- a/lgsm/functions/check_version.sh +++ b/lgsm/functions/check_version.sh @@ -8,7 +8,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -if [ -n "${modulesversion}" ]&&[ -n "${version}" ]&&[ "${version}" != "${modulesversion}" ]; then +if [ -n "${modulesversion}" ] && [ -n "${version}" ] && [ "${version}" != "${modulesversion}" ]; then exitbypass=1 echo -e "" fn_print_error_nl "LinuxGSM version mismatch" diff --git a/lgsm/functions/command_backup.sh b/lgsm/functions/command_backup.sh index adce957c9..0dfabcd03 100644 --- a/lgsm/functions/command_backup.sh +++ b/lgsm/functions/command_backup.sh @@ -13,7 +13,7 @@ fn_firstcommand_set check.sh # Trap to remove lockfile on quit. -fn_backup_trap(){ +fn_backup_trap() { echo -e "" echo -en "backup ${backupname}.tar.gz..." fn_print_canceled_eol_nl @@ -30,7 +30,7 @@ fn_backup_trap(){ } # Check if a backup is pending or has been aborted using backup.lock. -fn_backup_check_lockfile(){ +fn_backup_check_lockfile() { if [ -f "${lockdir}/backup.lock" ]; then fn_print_info_nl "Lock file found: Backup is currently running" fn_script_log_error "Lock file found: Backup is currently running: ${lockdir}/backup.lock" @@ -39,7 +39,7 @@ fn_backup_check_lockfile(){ } # Initialisation. -fn_backup_init(){ +fn_backup_init() { # Backup file name with selfname and current date. backupname="${selfname}-$(date '+%Y-%m-%d-%H%M%S')" @@ -47,7 +47,7 @@ fn_backup_init(){ fn_print_dots "Backup starting" fn_script_log_info "Backup starting" fn_print_ok_nl "Backup starting" - if [ ! -d "${backupdir}" ]||[ "${backupcount}" == "0" ]; then + if [ ! -d "${backupdir}" ] || [ "${backupcount}" == "0" ]; then fn_print_info_nl "There are no previous backups" else if [ "${lastbackupdaysago}" == "0" ]; then @@ -62,7 +62,7 @@ fn_backup_init(){ } # Check if server is started and whether to stop it. -fn_backup_stop_server(){ +fn_backup_stop_server() { check_status.sh # Server is running but will not be stopped. if [ "${stoponbackup}" == "off" ]; then @@ -82,7 +82,7 @@ fn_backup_stop_server(){ } # Create required folders. -fn_backup_dir(){ +fn_backup_dir() { # Create backupdir if it doesn't exist. if [ ! -d "${backupdir}" ]; then mkdir -p "${backupdir}" @@ -90,17 +90,17 @@ fn_backup_dir(){ } # Migrate Backups from old dir before refactor -fn_backup_migrate_olddir(){ +fn_backup_migrate_olddir() { # Check if old backup dir is there before the refactor and move the backups if [ -d "${rootdir}/backups" ]; then if [ "${rootdir}/backups" != "${backupdir}" ]; then fn_print_dots "Backup directory is being migrated" fn_script_log_info "Backup directory is being migrated" fn_script_log_info "${rootdir}/backups > ${backupdir}" - mv "${rootdir}/backups/"* "${backupdir}" 2>/dev/null + mv "${rootdir}/backups/"* "${backupdir}" 2> /dev/null exitcode=$? if [ "${exitcode}" -eq 0 ]; then - rmdir "${rootdir}/backups" 2>/dev/null + rmdir "${rootdir}/backups" 2> /dev/null exitcode=$? fi if [ "${exitcode}" -eq 0 ]; then @@ -114,7 +114,7 @@ fn_backup_migrate_olddir(){ fi } -fn_backup_create_lockfile(){ +fn_backup_create_lockfile() { # Create lockfile. date '+%s' > "${lockdir}/backup.lock" fn_script_log_info "Lockfile generated" @@ -124,7 +124,7 @@ fn_backup_create_lockfile(){ } # Compressing files. -fn_backup_compression(){ +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" @@ -133,7 +133,7 @@ fn_backup_compression(){ excludedir=$(fn_backup_relpath) # Check that excludedir is a valid path. - if [ ! -d "${excludedir}" ] ; then + if [ ! -d "${excludedir}" ]; then fn_print_fail_nl "Problem identifying the previous backup directory for exclusion." fn_script_log_fatal "Problem identifying the previous backup directory for exclusion" core_exit.sh @@ -157,17 +157,17 @@ fn_backup_compression(){ } # Clear old backups according to maxbackups and maxbackupdays variables. -fn_backup_prune(){ +fn_backup_prune() { # Clear if backup variables are set. - if [ "${maxbackups}" ]&&[ -n "${maxbackupdays}" ]; then + if [ "${maxbackups}" ] && [ -n "${maxbackupdays}" ]; then # How many backups there are. info_distro.sh # How many backups exceed maxbackups. - backupquotadiff=$((backupcount-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.gz" -mtime +"${maxbackupdays}" | wc -l) # If anything can be cleared. - if [ "${backupquotadiff}" -gt "0" ]||[ "${backupsoudatedcount}" -gt "0" ]; then + if [ "${backupquotadiff}" -gt "0" ] || [ "${backupsoudatedcount}" -gt "0" ]; then fn_print_dots "Pruning" fn_script_log_info "Backup pruning activated" fn_print_ok_nl "Pruning" @@ -220,32 +220,32 @@ fn_backup_relpath() { # Compare the leading entries of each array. These common elements will be clipped off. # for the relative path output. - for ((base=0; base<${#rdirtoks[@]}; base++)); do + for ((base = 0; base < ${#rdirtoks[@]}; base++)); do [[ "${rdirtoks[$base]}" != "${bdirtoks[$base]}" ]] && break done # Next, climb out of the remaining rootdir location with updir references. - for ((x=base;x<${#rdirtoks[@]};x++)); do + for ((x = base; x < ${#rdirtoks[@]}; x++)); do echo -n "../" done # Climb down the remaining components of the backupdir location. - for ((x=base;x<$(( ${#bdirtoks[@]} - 1 ));x++)); do + for ((x = base; x < $((${#bdirtoks[@]} - 1)); x++)); do echo -n "${bdirtoks[$x]}/" done # In the event there were no directories left in the backupdir above to # traverse down, just add a newline. Otherwise at this point, there is # one remaining directory component in the backupdir to navigate. - if (( "$base" < "${#bdirtoks[@]}" )) ; then - echo -e "${bdirtoks[ $(( ${#bdirtoks[@]} - 1)) ]}" + if (("$base" < "${#bdirtoks[@]}")); then + echo -e "${bdirtoks[$((${#bdirtoks[@]} - 1))]}" else echo fi } # Start the server if it was stopped for the backup. -fn_backup_start_server(){ +fn_backup_start_server() { if [ -n "${startserver}" ]; then exitbypass=1 command_start.sh diff --git a/lgsm/functions/command_debug.sh b/lgsm/functions/command_debug.sh index 086b06588..190a8c527 100755 --- a/lgsm/functions/command_debug.sh +++ b/lgsm/functions/command_debug.sh @@ -11,7 +11,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set # Trap to remove lockfile on quit. -fn_lockfile_trap(){ +fn_lockfile_trap() { # Remove lockfile. rm -f "${lockdir:?}/${selfname}.lock" # resets terminal. Servers can sometimes mess up the terminal on exit. @@ -70,7 +70,7 @@ fi fn_reload_startparameters echo -e "${lightblue}Start parameters:${default}" -if [ "${engine}" == "source" ]||[ "${engine}" == "goldsrc" ]; then +if [ "${engine}" == "source" ] || [ "${engine}" == "goldsrc" ]; then echo -e "${executable} ${startparameters} -debug" elif [ "${engine}" == "quake" ]; then echo -e "${executable} ${startparameters} -condebug" @@ -111,7 +111,7 @@ else fi # Note: do not add double quotes to ${executable} ${startparameters}. -if [ "${engine}" == "source" ]||[ "${engine}" == "goldsrc" ]; then +if [ "${engine}" == "source" ] || [ "${engine}" == "goldsrc" ]; then eval "${executable} ${startparameters} -debug" elif [ "${engine}" == "quake" ]; then eval "${executable} ${startparameters} -condebug" diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index 2daeeb2f7..08d9f031b 100755 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -15,7 +15,7 @@ check.sh info_distro.sh info_game.sh info_messages.sh -if [ "${querymode}" == "2" ]||[ "${querymode}" == "3" ]; then +if [ "${querymode}" == "2" ] || [ "${querymode}" == "3" ]; then for queryip in "${queryips[@]}"; do query_gamedig.sh if [ "${querystatus}" == "0" ]; then @@ -30,7 +30,7 @@ fn_info_message_gameserver fn_info_message_script fn_info_message_backup # Some game servers do not have parms. -if [ "${shortname}" != "jc2" ]&&[ "${shortname}" != "dst" ]&&[ "${shortname}" != "pz" ]&&[ "${engine}" != "renderware" ]; then +if [ "${shortname}" != "jc2" ] && [ "${shortname}" != "dst" ] && [ "${shortname}" != "pz" ] && [ "${engine}" != "renderware" ]; then fn_info_message_commandlineparms fi fn_info_message_ports_edit diff --git a/lgsm/functions/command_dev_detect_deps.sh b/lgsm/functions/command_dev_detect_deps.sh index 976bf94dc..d16b74418 100755 --- a/lgsm/functions/command_dev_detect_deps.sh +++ b/lgsm/functions/command_dev_detect_deps.sh @@ -15,26 +15,26 @@ echo -e "Dependencies Checker" echo -e "=================================" echo -e "Checking directory: " echo -e "${serverfiles}" -if [ "$(command -v eu-readelf 2>/dev/null)" ]; then +if [ "$(command -v eu-readelf 2> /dev/null)" ]; then readelf=eu-readelf -elif [ "$(command -v readelf 2>/dev/null)" ]; then +elif [ "$(command -v readelf 2> /dev/null)" ]; then readelf=readelf else echo -e "readelf/eu-readelf not installed" fi files=$(find "${serverfiles}" | wc -l) -find "${serverfiles}" -type f -print0 | -while IFS= read -r -d $'\0' line; do - if [ "${readelf}" == "eu-readelf" ]; then - ${readelf} -d "${line}" 2>/dev/null | grep NEEDED| awk '{ print $4 }' | sed 's/\[//g;s/\]//g' >> "${tmpdir}/.depdetect_readelf" - else - ${readelf} -d "${line}" 2>/dev/null | grep NEEDED | awk '{ print $5 }' | sed 's/\[//g;s/\]//g' >> "${tmpdir}/.depdetect_readelf" - fi - echo -n "${i} / ${files}" $'\r' - ((i++)) -done +find "${serverfiles}" -type f -print0 \ + | while IFS= read -r -d $'\0' line; do + if [ "${readelf}" == "eu-readelf" ]; then + ${readelf} -d "${line}" 2> /dev/null | grep NEEDED | awk '{ print $4 }' | sed 's/\[//g;s/\]//g' >> "${tmpdir}/.depdetect_readelf" + else + ${readelf} -d "${line}" 2> /dev/null | grep NEEDED | awk '{ print $5 }' | sed 's/\[//g;s/\]//g' >> "${tmpdir}/.depdetect_readelf" + fi + echo -n "${i} / ${files}" $'\r' + ((i++)) + done -sort "${tmpdir}/.depdetect_readelf" |uniq >"${tmpdir}/.depdetect_readelf_uniq" +sort "${tmpdir}/.depdetect_readelf" | uniq > "${tmpdir}/.depdetect_readelf_uniq" touch "${tmpdir}/.depdetect_centos_list" touch "${tmpdir}/.depdetect_ubuntu_list" @@ -42,7 +42,7 @@ touch "${tmpdir}/.depdetect_debian_list" while read -r lib; do echo -e "${lib}" - libs_array=( libm.so.6 libc.so.6 libtcmalloc_minimal.so.4 libpthread.so.0 libdl.so.2 libnsl.so.1 libgcc_s.so.1 librt.so.1 ld-linux.so.2 libdbus-glib-1.so.2 libgio-2.0.so.0 libglib-2.0.so.0 libGL.so.1 libgobject-2.0.so.0 libnm-glib.so.4 libnm-util.so.2 ) + libs_array=(libm.so.6 libc.so.6 libtcmalloc_minimal.so.4 libpthread.so.0 libdl.so.2 libnsl.so.1 libgcc_s.so.1 librt.so.1 ld-linux.so.2 libdbus-glib-1.so.2 libgio-2.0.so.0 libglib-2.0.so.0 libGL.so.1 libgobject-2.0.so.0 libnm-glib.so.4 libnm-util.so.2) for lib_file in "${libs_array[@]}"; do if [ "${lib}" == "${lib_file}" ]; then echo -e "glibc.i686" >> "${tmpdir}/.depdetect_centos_list" @@ -52,7 +52,7 @@ while read -r lib; do fi done - libs_array=( libawt.so libjava.so libjli.so libjvm.so libnet.so libnio.so libverify.so ) + libs_array=(libawt.so libjava.so libjli.so libjvm.so libnet.so libnio.so libverify.so) for lib_file in "${libs_array[@]}"; do if [ "${lib}" == "${lib_file}" ]; then echo -e "java-1.8.0-openjdk" >> "${tmpdir}/.depdetect_centos_list" @@ -62,7 +62,7 @@ while read -r lib; do fi done - libs_array=( libtier0.so libtier0_srv.so libvstdlib_srv.so Core.so libvstdlib.so libtier0_s.so Editor.so Engine.so liblua.so libsteam_api.so ld-linux-x86-64.so.2 libPhysX3_x86.so libPhysX3Common_x86.so libPhysX3Cooking_x86.so) + libs_array=(libtier0.so libtier0_srv.so libvstdlib_srv.so Core.so libvstdlib.so libtier0_s.so Editor.so Engine.so liblua.so libsteam_api.so ld-linux-x86-64.so.2 libPhysX3_x86.so libPhysX3Common_x86.so libPhysX3Cooking_x86.so) for lib_file in "${libs_array[@]}"; do # Known shared libs what dont requires dependencies. if [ "${lib}" == "${lib_file}" ]; then @@ -85,12 +85,12 @@ while read -r lib; do echo -e "libcurl4-gnutls-dev:i386" >> "${tmpdir}/.depdetect_ubuntu_list" echo -e "libcurl4-gnutls-dev:i386" >> "${tmpdir}/.depdetect_debian_list" libdetected=1 - elif [ "${lib}" == "libspeex.so.1" ]||[ "${lib}" == "libspeexdsp.so.1" ]; then + elif [ "${lib}" == "libspeex.so.1" ] || [ "${lib}" == "libspeexdsp.so.1" ]; then echo -e "speex.i686" >> "${tmpdir}/.depdetect_centos_list" echo -e "speex:i386" >> "${tmpdir}/.depdetect_ubuntu_list" echo -e "speex:i386" >> "${tmpdir}/.depdetect_debian_list" libdetected=1 - elif [ "${lib}" == "./libSDL-1.2.so.0" ]||[ "${lib}" == "libSDL-1.2.so.0" ]; then + elif [ "${lib}" == "./libSDL-1.2.so.0" ] || [ "${lib}" == "libSDL-1.2.so.0" ]; then echo -e "SDL.i686" >> "${tmpdir}/.depdetect_centos_list" echo -e "libsdl1.2debian" >> "${tmpdir}/.depdetect_ubuntu_list" echo -e "libsdl1.2debian" >> "${tmpdir}/.depdetect_debian_list" diff --git a/lgsm/functions/command_dev_detect_glibc.sh b/lgsm/functions/command_dev_detect_glibc.sh index 304d255fd..73280e55d 100755 --- a/lgsm/functions/command_dev_detect_glibc.sh +++ b/lgsm/functions/command_dev_detect_glibc.sh @@ -34,8 +34,7 @@ elif [ -f "${serverfiles}" ]; then fi echo -e "" - -glibc_check_dir_array=( steamcmddir serverfiles ) +glibc_check_dir_array=(steamcmddir serverfiles) for glibc_check_var in "${glibc_check_dir_array[@]}"; do if [ "${glibc_check_var}" == "serverfiles" ]; then glibc_check_dir="${serverfiles}" @@ -47,23 +46,23 @@ for glibc_check_var in "${glibc_check_dir_array[@]}"; do if [ -d "${glibc_check_dir}" ]; then glibc_check_files=$(find "${glibc_check_dir}" | wc -l) - find "${glibc_check_dir}" -type f -print0 | - while IFS= read -r -d $'\0' line; do - glibcversion=$(objdump -T "${line}" 2>/dev/null | grep -oP "GLIBC[^ ]+" | grep -v GLIBCXX | sort | uniq | sort -r --version-sort | head -n 1) - if [ "${glibcversion}" ]; then - echo -e "${glibcversion}: ${line}" >>"${tmpdir}/detect_glibc_files_${glibc_check_var}.tmp" - fi - objdump -T "${line}" 2>/dev/null | grep -oP "GLIBC[^ ]+" >>"${tmpdir}/detect_glibc_${glibc_check_var}.tmp" - echo -n "${i} / ${glibc_check_files}" $'\r' - ((i++)) - done - echo -e "" - echo -e "" - echo -e "${glibc_check_name} glibc Requirements" - echo -e "=================================" + find "${glibc_check_dir}" -type f -print0 \ + | while IFS= read -r -d $'\0' line; do + glibcversion=$(objdump -T "${line}" 2> /dev/null | grep -oP "GLIBC[^ ]+" | grep -v GLIBCXX | sort | uniq | sort -r --version-sort | head -n 1) + if [ "${glibcversion}" ]; then + echo -e "${glibcversion}: ${line}" >> "${tmpdir}/detect_glibc_files_${glibc_check_var}.tmp" + fi + objdump -T "${line}" 2> /dev/null | grep -oP "GLIBC[^ ]+" >> "${tmpdir}/detect_glibc_${glibc_check_var}.tmp" + echo -n "${i} / ${glibc_check_files}" $'\r' + ((i++)) + done + echo -e "" + echo -e "" + echo -e "${glibc_check_name} glibc Requirements" + echo -e "=================================" if [ -f "${tmpdir}/detect_glibc_files_${glibc_check_var}.tmp" ]; then echo -e "Required glibc" - cat "${tmpdir}/detect_glibc_${glibc_check_var}.tmp" | sort | uniq | sort -r --version-sort | head -1 |tee -a "${tmpdir}/detect_glibc_highest.tmp" + 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" diff --git a/lgsm/functions/command_dev_detect_ldd.sh b/lgsm/functions/command_dev_detect_ldd.sh index 7d6e942a1..43630d4e9 100755 --- a/lgsm/functions/command_dev_detect_ldd.sh +++ b/lgsm/functions/command_dev_detect_ldd.sh @@ -31,21 +31,19 @@ touch "${tmpdir}/detect_ldd.tmp" touch "${tmpdir}/detect_ldd_not_found.tmp" files=$(find "${serverfiles}" | wc -l) -find "${serverfiles}" -type f -print0 | -while IFS= read -r -d $'\0' line; do - if ldd "${line}" 2>/dev/null | grep -v "not a dynamic executable" - then - echo -e "${line}" >> "${tmpdir}/detect_ldd.tmp" - ldd "${line}" 2>/dev/null | grep -v "not a dynamic executable" >> "${tmpdir}/detect_ldd.tmp" - if ldd "${line}" 2>/dev/null | grep -v "not a dynamic executable" | grep "not found" - then - echo -e "${line}" >> "${tmpdir}/detect_ldd_not_found.tmp" - ldd "${line}" 2>/dev/null | grep -v "not a dynamic executable" | grep "not found" >> "${tmpdir}/detect_ldd_not_found.tmp" +find "${serverfiles}" -type f -print0 \ + | while IFS= read -r -d $'\0' line; do + if ldd "${line}" 2> /dev/null | grep -v "not a dynamic executable"; then + echo -e "${line}" >> "${tmpdir}/detect_ldd.tmp" + ldd "${line}" 2> /dev/null | grep -v "not a dynamic executable" >> "${tmpdir}/detect_ldd.tmp" + if ldd "${line}" 2> /dev/null | grep -v "not a dynamic executable" | grep "not found"; then + echo -e "${line}" >> "${tmpdir}/detect_ldd_not_found.tmp" + ldd "${line}" 2> /dev/null | grep -v "not a dynamic executable" | grep "not found" >> "${tmpdir}/detect_ldd_not_found.tmp" + fi fi - fi - echo -n "$i / $files" $'\r' - ((i++)) -done + echo -n "$i / $files" $'\r' + ((i++)) + done echo -e "" echo -e "" echo -e "All" diff --git a/lgsm/functions/command_dev_query_raw.sh b/lgsm/functions/command_dev_query_raw.sh index c9123ebcb..91db16584 100755 --- a/lgsm/functions/command_dev_query_raw.sh +++ b/lgsm/functions/command_dev_query_raw.sh @@ -26,175 +26,174 @@ echo -e "" echo -e "${lightgreen}Game Server Ports${default}" echo -e "==================================================================" { -echo -e "${lightblue}Port Name \tPort Number \tStatus \tTCP \tUDP${default}" -if [ -v port ]; then - echo -e "Game: \t${port} \t$(ss -tupl|grep ${port}|wc -l) \t$(ss -tupl|grep ${port}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${port}|grep udp|awk '{ print $2 }')" -else - echo -e "Game:" -fi -if [ "${shortname}" == "rw" ]; then - if [ -v port2 ]; then - echo -e "Game+1: \t${port2} \t$(ss -tupl|grep ${port}|wc -l) \t$(ss -tupl|grep ${port2}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${port2}|grep udp|awk '{ print $2 }')" + echo -e "${lightblue}Port Name \tPort Number \tStatus \tTCP \tUDP${default}" + if [ -v port ]; then + echo -e "Game: \t${port} \t$(ss -tupl | grep ${port} | wc -l) \t$(ss -tupl | grep ${port} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${port} | grep udp | awk '{ print $2 }')" else - echo -e "Game+1:" + echo -e "Game:" fi + if [ "${shortname}" == "rw" ]; then + if [ -v port2 ]; then + echo -e "Game+1: \t${port2} \t$(ss -tupl | grep ${port} | wc -l) \t$(ss -tupl | grep ${port2} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${port2} | grep udp | awk '{ print $2 }')" + else + echo -e "Game+1:" + fi - if [ -v port3 ]; then - echo -e "Game+2: \t${port3} \t$(ss -tupl|grep ${port}|wc -l) \t$(ss -tupl|grep ${port3}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${port3}|grep udp|awk '{ print $2 }')" - else - echo -e "Game+2:" + if [ -v port3 ]; then + echo -e "Game+2: \t${port3} \t$(ss -tupl | grep ${port} | wc -l) \t$(ss -tupl | grep ${port3} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${port3} | grep udp | awk '{ print $2 }')" + else + echo -e "Game+2:" + fi + + if [ -v port4 ]; then + echo -e "Game+3: \t${port4} \t$(ss -tupl | grep ${port} | wc -l) \t$(ss -tupl | grep ${port4} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${port4} | grep udp | awk '{ print $2 }')" + else + echo -e "Game+3:" + fi fi - if [ -v port4 ]; then - echo -e "Game+3: \t${port4} \t$(ss -tupl|grep ${port}|wc -l) \t$(ss -tupl|grep ${port4}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${port4}|grep udp|awk '{ print $2 }')" + if [ -v port401 ]; then + echo -e "Game+400: \t${port401} \t$(ss -tupl | grep ${port401} | wc -l) \t$(ss -tupl | grep ${port401} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${port401} | grep udp | awk '{ print $2 }')" else - echo -e "Game+3:" + echo -e "Game+400:" fi -fi - -if [ -v port401 ]; then - echo -e "Game+400: \t${port401} \t$(ss -tupl|grep ${port401}|wc -l) \t$(ss -tupl|grep ${port401}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${port401}|grep udp|awk '{ print $2 }')" -else - echo -e "Game+400:" -fi - -if [ -v portipv6 ]; then - echo -e "Game ipv6: \t${portipv6} \t$(ss -tupl|grep ${portipv6}|wc -l) \t$(ss -tupl|grep ${portipv6}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${portipv6}|grep udp|awk '{ print $2 }')" -else - echo -e "Game ipv6:" -fi -if [ -v queryport ]; then - echo -e "Query: \t${queryport} \t$(ss -tupl|grep ${queryport}|wc -l) \t$(ss -tupl|grep ${queryport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${queryport}|grep udp|awk '{ print $2 }')" -else - echo -e "Query:" -fi + if [ -v portipv6 ]; then + echo -e "Game ipv6: \t${portipv6} \t$(ss -tupl | grep ${portipv6} | wc -l) \t$(ss -tupl | grep ${portipv6} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${portipv6} | grep udp | awk '{ print $2 }')" + else + echo -e "Game ipv6:" + fi -if [ -v httpport ]; then - echo -e "HTTP: \t${httpport} \t$(ss -tupl|grep ${httpport}|wc -l) \t$(ss -tupl|grep ${httpport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${httpport}|grep udp|awk '{ print $2 }')" -else - echo -e "HTTP:" -fi + if [ -v queryport ]; then + echo -e "Query: \t${queryport} \t$(ss -tupl | grep ${queryport} | wc -l) \t$(ss -tupl | grep ${queryport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${queryport} | grep udp | awk '{ print $2 }')" + else + echo -e "Query:" + fi -if [ -v httpqueryport ]; then - echo -e "HTTP Query: \t${httpqueryport} \t$(ss -tupl|grep ${httpqueryport}|wc -l) \t$(ss -tupl|grep ${httpqueryport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${httpqueryport}|grep udp|awk '{ print $2 }')" -else - echo -e "HTTP Query:" -fi + if [ -v httpport ]; then + echo -e "HTTP: \t${httpport} \t$(ss -tupl | grep ${httpport} | wc -l) \t$(ss -tupl | grep ${httpport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${httpport} | grep udp | awk '{ print $2 }')" + else + echo -e "HTTP:" + fi + if [ -v httpqueryport ]; then + echo -e "HTTP Query: \t${httpqueryport} \t$(ss -tupl | grep ${httpqueryport} | wc -l) \t$(ss -tupl | grep ${httpqueryport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${httpqueryport} | grep udp | awk '{ print $2 }')" + else + echo -e "HTTP Query:" + fi -if [ -v webadminport ]; then - echo -e "Web Admin: \t${webadminport} \t$(ss -tupl|grep ${webadminport}|wc -l) \t$(ss -tupl|grep ${webadminport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${webadminport}|grep udp|awk '{ print $2 }')" -else - echo -e "Web Admin:" -fi + if [ -v webadminport ]; then + echo -e "Web Admin: \t${webadminport} \t$(ss -tupl | grep ${webadminport} | wc -l) \t$(ss -tupl | grep ${webadminport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${webadminport} | grep udp | awk '{ print $2 }')" + else + echo -e "Web Admin:" + fi -if [ -v clientport ]; then - echo -e "Client: \t${clientport} \t$(ss -tupl|grep ${clientport}|wc -l) \t$(ss -tupl|grep ${clientport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${clientport}|grep udp|awk '{ print $2 }')" -else - echo -e "Client:" -fi + if [ -v clientport ]; then + echo -e "Client: \t${clientport} \t$(ss -tupl | grep ${clientport} | wc -l) \t$(ss -tupl | grep ${clientport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${clientport} | grep udp | awk '{ print $2 }')" + else + echo -e "Client:" + fi -if [ -v rconport ]; then - echo -e "RCON: \t${rconport} \t$(ss -tupl|grep ${rconport}|wc -l) \t$(ss -tupl|grep ${rconport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${rconport}|grep udp|awk '{ print $2 }')" -else - echo -e "RCON:" -fi + if [ -v rconport ]; then + echo -e "RCON: \t${rconport} \t$(ss -tupl | grep ${rconport} | wc -l) \t$(ss -tupl | grep ${rconport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${rconport} | grep udp | awk '{ print $2 }')" + else + echo -e "RCON:" + fi -if [ -v rawport ]; then - echo -e "RAW UDP Socket: \t${rawport} \t$(ss -tupl|grep ${rawport}|wc -l) \t$(ss -tupl|grep ${rawport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${rawport}|grep udp|awk '{ print $2 }')" -else - echo -e "RAW UDP Socket:" -fi + if [ -v rawport ]; then + echo -e "RAW UDP Socket: \t${rawport} \t$(ss -tupl | grep ${rawport} | wc -l) \t$(ss -tupl | grep ${rawport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${rawport} | grep udp | awk '{ print $2 }')" + else + echo -e "RAW UDP Socket:" + fi -if [ -v masterport ]; then - echo -e "Game: Master: \t${masterport} \t$(ss -tupl|grep ${masterport}|wc -l) \t$(ss -tupl|grep ${masterport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${masterport}|grep udp|awk '{ print $2 }')" -else - echo -e "Game: Master:" -fi + if [ -v masterport ]; then + echo -e "Game: Master: \t${masterport} \t$(ss -tupl | grep ${masterport} | wc -l) \t$(ss -tupl | grep ${masterport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${masterport} | grep udp | awk '{ print $2 }')" + else + echo -e "Game: Master:" + fi -if [ -v steamport ]; then - echo -e "Steam: \t${steamport} \t$(ss -tupl|grep ${steamport}|wc -l) \t$(ss -tupl|grep ${steamport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${steamport}|grep udp|awk '{ print $2 }')" -else - echo -e "Steam:" -fi + if [ -v steamport ]; then + echo -e "Steam: \t${steamport} \t$(ss -tupl | grep ${steamport} | wc -l) \t$(ss -tupl | grep ${steamport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${steamport} | grep udp | awk '{ print $2 }')" + else + echo -e "Steam:" + fi -if [ -v steamauthport ]; then - echo -e "Steam: Auth: \t${steamauthport} \t$(ss -tupl|grep ${steamauthport}|wc -l) \t$(ss -tupl|grep ${steamauthport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${steamauthport}|grep udp|awk '{ print $2 }')" -else - echo -e "Steam: Auth:" -fi + if [ -v steamauthport ]; then + echo -e "Steam: Auth: \t${steamauthport} \t$(ss -tupl | grep ${steamauthport} | wc -l) \t$(ss -tupl | grep ${steamauthport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${steamauthport} | grep udp | awk '{ print $2 }')" + else + echo -e "Steam: Auth:" + fi -if [ -v steammasterport ]; then - echo -e "Steam: Master: \t${steammasterport} \t$(ss -tupl|grep ${steammasterport}|wc -l) \t$(ss -tupl|grep ${steammasterport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${steammasterport}|grep udp|awk '{ print $2 }')" -else - echo -e "Steam: Master:" -fi + if [ -v steammasterport ]; then + echo -e "Steam: Master: \t${steammasterport} \t$(ss -tupl | grep ${steammasterport} | wc -l) \t$(ss -tupl | grep ${steammasterport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${steammasterport} | grep udp | awk '{ print $2 }')" + else + echo -e "Steam: Master:" + fi -if [ -v steamqueryport ]; then - echo -e "Steam: Query: \t${steamqueryport} \t$(ss -tupl|grep ${steamqueryport}|wc -l) \t$(ss -tupl|grep ${steamqueryport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${steamqueryport}|grep udp|awk '{ print $2 }')" -else - echo -e "Steam: Query:" -fi -if [ -v beaconport ]; then - echo -e "Beacon: \t${beaconport} \t$(ss -tupl|grep ${beaconport}|wc -l) \t$(ss -tupl|grep ${beaconport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${beaconport}|grep udp|awk '{ print $2 }')" -else - echo -e "Beacon:" -fi + if [ -v steamqueryport ]; then + echo -e "Steam: Query: \t${steamqueryport} \t$(ss -tupl | grep ${steamqueryport} | wc -l) \t$(ss -tupl | grep ${steamqueryport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${steamqueryport} | grep udp | awk '{ print $2 }')" + else + echo -e "Steam: Query:" + fi + if [ -v beaconport ]; then + echo -e "Beacon: \t${beaconport} \t$(ss -tupl | grep ${beaconport} | wc -l) \t$(ss -tupl | grep ${beaconport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${beaconport} | grep udp | awk '{ print $2 }')" + else + echo -e "Beacon:" + fi -if [ -v appport ]; then - echo -e "App: \t${appport} \t$(ss -tupl|grep ${appport}|wc -l) \t$(ss -tupl|grep ${appport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${appport}|grep udp|awk '{ print $2 }')" -else - echo -e "App:" -fi + if [ -v appport ]; then + echo -e "App: \t${appport} \t$(ss -tupl | grep ${appport} | wc -l) \t$(ss -tupl | grep ${appport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${appport} | grep udp | awk '{ print $2 }')" + else + echo -e "App:" + fi -if [ -v telnetport ]; then - echo -e "Telnet: \t${telnetport} \t$(ss -tupl|grep ${telnetport}|wc -l) \t$(ss -tupl|grep ${telnetport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${telnetport}|grep udp|awk '{ print $2 }')" -else - echo -e "Telnet:" -fi + if [ -v telnetport ]; then + echo -e "Telnet: \t${telnetport} \t$(ss -tupl | grep ${telnetport} | wc -l) \t$(ss -tupl | grep ${telnetport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${telnetport} | grep udp | awk '{ print $2 }')" + else + echo -e "Telnet:" + fi -if [ -v sourcetvport ]; then - echo -e "SourceTV: \t${sourcetvport} \t$(ss -tupl|grep ${sourcetvport}|wc -l) \t$(ss -tupl|grep ${sourcetvport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${sourcetvport}|grep udp|awk '{ print $2 }')" -else - echo -e "SourceTV:" -fi + if [ -v sourcetvport ]; then + echo -e "SourceTV: \t${sourcetvport} \t$(ss -tupl | grep ${sourcetvport} | wc -l) \t$(ss -tupl | grep ${sourcetvport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${sourcetvport} | grep udp | awk '{ print $2 }')" + else + echo -e "SourceTV:" + fi -if [ -v fileport ]; then - echo -e "File: \t${fileport} \t$(ss -tupl|grep ${fileport}|wc -l) \t$(ss -tupl|grep ${fileport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${fileport}|grep udp|awk '{ print $2 }')" -else - echo -e "File:" -fi + if [ -v fileport ]; then + echo -e "File: \t${fileport} \t$(ss -tupl | grep ${fileport} | wc -l) \t$(ss -tupl | grep ${fileport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${fileport} | grep udp | awk '{ print $2 }')" + else + echo -e "File:" + fi -if [ -v udplinkport ]; then - echo -e "UDP Link: \t${udplinkport} \t$(ss -tupl|grep ${udplinkport}|wc -l) \t$(ss -tupl|grep ${udplinkport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${udplinkport}|grep udp|awk '{ print $2 }')" -else - echo -e "UDP Link:" -fi + if [ -v udplinkport ]; then + echo -e "UDP Link: \t${udplinkport} \t$(ss -tupl | grep ${udplinkport} | wc -l) \t$(ss -tupl | grep ${udplinkport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${udplinkport} | grep udp | awk '{ print $2 }')" + else + echo -e "UDP Link:" + fi -if [ -v voiceport ]; then - echo -e "Voice: \t${voiceport} \t$(ss -tupl|grep ${voiceport}|wc -l) \t$(ss -tupl|grep ${voiceport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${voiceport}|grep udp|awk '{ print $2 }')" -else - echo -e "Voice:" -fi + if [ -v voiceport ]; then + echo -e "Voice: \t${voiceport} \t$(ss -tupl | grep ${voiceport} | wc -l) \t$(ss -tupl | grep ${voiceport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${voiceport} | grep udp | awk '{ print $2 }')" + else + echo -e "Voice:" + fi -if [ -v voiceunusedport ]; then - echo -e "Voice (Unused): \t${voiceunusedport} \t$(ss -tupl|grep ${voiceunusedport}|wc -l) \t$(ss -tupl|grep ${voiceunusedport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${voiceunusedport}|grep udp|awk '{ print $2 }')" -else - echo -e "Voice (Unused):" -fi + if [ -v voiceunusedport ]; then + echo -e "Voice (Unused): \t${voiceunusedport} \t$(ss -tupl | grep ${voiceunusedport} | wc -l) \t$(ss -tupl | grep ${voiceunusedport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${voiceunusedport} | grep udp | awk '{ print $2 }')" + else + echo -e "Voice (Unused):" + fi -if [ -v battleeyeport ]; then - echo -e "BattleEye: \t${battleeyeport} \t$(ss -tupl|grep ${battleeyeport}|wc -l) \t$(ss -tupl|grep ${battleeyeport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${battleeyeport}|grep udp|awk '{ print $2 }')" -else - echo -e "BattleEye:" -fi + if [ -v battleeyeport ]; then + echo -e "BattleEye: \t${battleeyeport} \t$(ss -tupl | grep ${battleeyeport} | wc -l) \t$(ss -tupl | grep ${battleeyeport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${battleeyeport} | grep udp | awk '{ print $2 }')" + else + echo -e "BattleEye:" + fi -if [ -v statsport ]; then - echo -e "Stats: \t${battleeyeport} \t$(ss -tupl|grep ${statsport}|wc -l) \t$(ss -tupl|grep ${statsport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${statsport}|grep udp|awk '{ print $2 }')" -else - echo -e "Stats:" -fi + if [ -v statsport ]; then + echo -e "Stats: \t${battleeyeport} \t$(ss -tupl | grep ${statsport} | wc -l) \t$(ss -tupl | grep ${statsport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${statsport} | grep udp | awk '{ print $2 }')" + else + echo -e "Stats:" + fi } | column -s $'\t' -t echo -e "" @@ -211,10 +210,10 @@ echo -e "" echo -e "${lightgreen}Gamedig Raw Output${default}" echo -e "=================================" echo -e "" -if [ ! "$(command -v gamedig 2>/dev/null)" ]; then +if [ ! "$(command -v gamedig 2> /dev/null)" ]; then fn_print_failure_nl "gamedig not installed" fi -if [ ! "$(command -v jq 2>/dev/null)" ]; then +if [ ! "$(command -v jq 2> /dev/null)" ]; then fn_print_failure_nl "jq not installed" fi for queryip in "${queryips[@]}"; do diff --git a/lgsm/functions/command_fastdl.sh b/lgsm/functions/command_fastdl.sh index d6ab960bd..e90ccc5e0 100755 --- a/lgsm/functions/command_fastdl.sh +++ b/lgsm/functions/command_fastdl.sh @@ -24,7 +24,7 @@ luafastdlfile="lgsm_cl_force_fastdl.lua" luafastdlfullpath="${luasvautorundir}/${luafastdlfile}" # Check if bzip2 is installed. -if [ ! "$(command -v bzip2 2>/dev/null)" ]; then +if [ ! "$(command -v bzip2 2> /dev/null)" ]; then fn_print_fail "bzip2 is not installed" fn_script_log_fatal "bzip2 is not installed" core_exit.sh @@ -64,7 +64,7 @@ if [ "${shortname}" == "gmod" ]; then fi # Clears any fastdl directory content. -fn_clear_old_fastdl(){ +fn_clear_old_fastdl() { # Clearing old FastDL. if [ -d "${fastdldir}" ]; then echo -en "clearing existing FastDL directory ${fastdldir}..." @@ -81,7 +81,7 @@ fn_clear_old_fastdl(){ fi } -fn_fastdl_dirs(){ +fn_fastdl_dirs() { # Check and create directories. if [ ! -d "${webdir}" ]; then echo -en "creating web directory ${webdir}..." @@ -112,7 +112,7 @@ fn_fastdl_dirs(){ } # Using this gist https://gist.github.com/agunnerson-ibm/efca449565a3e7356906 -fn_human_readable_file_size(){ +fn_human_readable_file_size() { local abbrevs=( $((1 << 60)):ZB $((1 << 50)):EB @@ -142,7 +142,7 @@ fn_human_readable_file_size(){ } # Provides info about the fastdl directory content and prompts for confirmation. -fn_fastdl_preview(){ +fn_fastdl_preview() { # Remove any file list. if [ -f "${tmpdir}/fastdl_files_to_compress.txt" ]; then rm -f "${tmpdir:?}/fastdl_files_to_compress.txt" @@ -152,13 +152,14 @@ fn_fastdl_preview(){ # Garry's Mod if [ "${shortname}" == "gmod" ]; then cd "${systemdir}" || exit - allowed_extentions_array=( "*.ain" "*.bsp" "*.mdl" "*.mp3" "*.ogg" "*.otf" "*.pcf" "*.phy" "*.png" "*.svg" "*.vtf" "*.vmt" "*.vtx" "*.vvd" "*.ttf" "*.wav" ) + allowed_extentions_array=("*.ain" "*.bsp" "*.mdl" "*.mp3" "*.ogg" "*.otf" "*.pcf" "*.phy" "*.png" "*.svg" "*.vtf" "*.vmt" "*.vtx" "*.vvd" "*.ttf" "*.wav") for allowed_extention in "${allowed_extentions_array[@]}"; do fileswc=0 tput sc while read -r ext; do ((fileswc++)) - tput rc; tput el + tput rc + tput el echo -e "gathering ${allowed_extention} : ${fileswc}..." echo -e "${ext}" >> "${tmpdir}/fastdl_files_to_compress.txt" done < <(find . -type f -iname "${allowed_extention}") @@ -170,30 +171,32 @@ fn_fastdl_preview(){ done # Source engine else - fastdl_directories_array=( "maps" "materials" "models" "particles" "sound" "resources" ) + fastdl_directories_array=("maps" "materials" "models" "particles" "sound" "resources") for directory in "${fastdl_directories_array[@]}"; do if [ -d "${systemdir}/${directory}" ]; then if [ "${directory}" == "maps" ]; then - local allowed_extentions_array=( "*.bsp" "*.ain" "*.nav" "*.jpg" "*.txt" ) + local allowed_extentions_array=("*.bsp" "*.ain" "*.nav" "*.jpg" "*.txt") elif [ "${directory}" == "materials" ]; then - local allowed_extentions_array=( "*.vtf" "*.vmt" "*.vbf" "*.png" "*.svg" ) + local allowed_extentions_array=("*.vtf" "*.vmt" "*.vbf" "*.png" "*.svg") elif [ "${directory}" == "models" ]; then - local allowed_extentions_array=( "*.vtx" "*.vvd" "*.mdl" "*.phy" "*.jpg" "*.png" "*.vmt" "*.vtf" ) + local allowed_extentions_array=("*.vtx" "*.vvd" "*.mdl" "*.phy" "*.jpg" "*.png" "*.vmt" "*.vtf") elif [ "${directory}" == "particles" ]; then - local allowed_extentions_array=( "*.pcf" ) + local allowed_extentions_array=("*.pcf") elif [ "${directory}" == "sound" ]; then - local allowed_extentions_array=( "*.wav" "*.mp3" "*.ogg" ) + local allowed_extentions_array=("*.wav" "*.mp3" "*.ogg") fi for allowed_extention in "${allowed_extentions_array[@]}"; do fileswc=0 tput sc while read -r ext; do ((fileswc++)) - tput rc; tput el + tput rc + tput el echo -e "gathering ${directory} ${allowed_extention} : ${fileswc}..." echo -e "${ext}" >> "${tmpdir}/fastdl_files_to_compress.txt" done < <(find "${systemdir}/${directory}" -type f -iname "${allowed_extention}") - tput rc; tput el + tput rc + tput el echo -e "gathering ${directory} ${allowed_extention} : ${fileswc}..." if [ ${fileswc} != 0 ]; then fn_print_ok_eol_nl @@ -211,14 +214,14 @@ fn_fastdl_preview(){ # Calculates total file size. while read -r dufile; do filesize=$(stat -c %s "${dufile}") - filesizetotal=$(( filesizetotal+filesize )) + filesizetotal=$((filesizetotal + filesize)) exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl fn_script_log_fatal "Calculating total file size." core_exit.sh fi - done <"${tmpdir}/fastdl_files_to_compress.txt" + done < "${tmpdir}/fastdl_files_to_compress.txt" else fn_print_fail_eol_nl "generating file list" fn_script_log_fatal "Generating file list." @@ -234,14 +237,15 @@ fn_fastdl_preview(){ } # Builds Garry's Mod fastdl directory content. -fn_fastdl_gmod(){ +fn_fastdl_gmod() { cd "${systemdir}" || exit for allowed_extention in "${allowed_extentions_array[@]}"; do fileswc=0 tput sc while read -r fastdlfile; do ((fileswc++)) - tput rc; tput el + tput rc + tput el echo -e "copying ${allowed_extention} : ${fileswc}..." cp --parents "${fastdlfile}" "${fastdldir}" exitcode=$? @@ -305,30 +309,31 @@ fn_fastdl_gmod(){ while read -r dufile; do filesize=$(du -b "${dufile}" | awk '{ print $1 }') filesizetotal=$((filesizetotal + filesize)) - done <"${tmpdir}/fastdl_files_to_compress.txt" + done < "${tmpdir}/fastdl_files_to_compress.txt" fi } -fn_fastdl_source(){ +fn_fastdl_source() { for directory in "${fastdl_directories_array[@]}"; do if [ -d "${systemdir}/${directory}" ]; then if [ "${directory}" == "maps" ]; then - local allowed_extentions_array=( "*.bsp" "*.ain" "*.nav" "*.jpg" "*.txt" ) + local allowed_extentions_array=("*.bsp" "*.ain" "*.nav" "*.jpg" "*.txt") elif [ "${directory}" == "materials" ]; then - local allowed_extentions_array=( "*.vtf" "*.vmt" "*.vbf" "*.png" "*.svg" ) + local allowed_extentions_array=("*.vtf" "*.vmt" "*.vbf" "*.png" "*.svg") elif [ "${directory}" == "models" ]; then - local allowed_extentions_array=( "*.vtx" "*.vvd" "*.mdl" "*.phy" "*.jpg" "*.png" ) + local allowed_extentions_array=("*.vtx" "*.vvd" "*.mdl" "*.phy" "*.jpg" "*.png") elif [ "${directory}" == "particles" ]; then - local allowed_extentions_array=( "*.pcf" ) + local allowed_extentions_array=("*.pcf") elif [ "${directory}" == "sound" ]; then - local allowed_extentions_array=( "*.wav" "*.mp3" "*.ogg" ) + local allowed_extentions_array=("*.wav" "*.mp3" "*.ogg") fi for allowed_extention in "${allowed_extentions_array[@]}"; do fileswc=0 tput sc while read -r fastdlfile; do ((fileswc++)) - tput rc; tput el + tput rc + tput el echo -e "copying ${directory} ${allowed_extention} : ${fileswc}..." fn_sleep_time # get relative path of file in the dir @@ -357,7 +362,7 @@ fn_fastdl_source(){ } # Builds the fastdl directory content. -fn_fastdl_build(){ +fn_fastdl_build() { # Copy all needed files for FastDL. echo -e "copying files to ${fastdldir}" fn_script_log_info "Copying files to ${fastdldir}" @@ -370,7 +375,7 @@ fn_fastdl_build(){ } # Generate lua file that will force download any file into the FastDL directory. -fn_fastdl_gmod_dl_enforcer(){ +fn_fastdl_gmod_dl_enforcer() { # Clear old lua file. if [ -f "${luafastdlfullpath}" ]; then echo -en "removing existing download enforcer: ${luafastdlfile}..." @@ -406,7 +411,7 @@ fn_fastdl_gmod_dl_enforcer(){ } # Compresses FastDL files using bzip2. -fn_fastdl_bzip2(){ +fn_fastdl_bzip2() { while read -r filetocompress; do echo -en "\r\033[Kcompressing ${filetocompress}..." bzip2 -f "${filetocompress}" @@ -418,7 +423,7 @@ fn_fastdl_bzip2(){ else fn_script_log_pass "Compressing ${filetocompress}" fi - done < <(find "${fastdldir:?}" \( -type f ! -name "*.bz2" \)) + done < <(find "${fastdldir:?}" \( -type f ! -name "*.bz2" \)) fn_print_ok_eol_nl } diff --git a/lgsm/functions/command_install_resources_mta.sh b/lgsm/functions/command_install_resources_mta.sh index 3a94444a3..15f5be22f 100755 --- a/lgsm/functions/command_install_resources_mta.sh +++ b/lgsm/functions/command_install_resources_mta.sh @@ -10,7 +10,7 @@ commandaction="Default Resources" functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set -fn_install_resources(){ +fn_install_resources() { echo -e "" echo -e "Installing Default Resources" echo -e "=================================" diff --git a/lgsm/functions/command_mods_install.sh b/lgsm/functions/command_mods_install.sh index a5eaaf83c..0edbe5bc0 100755 --- a/lgsm/functions/command_mods_install.sh +++ b/lgsm/functions/command_mods_install.sh @@ -21,7 +21,7 @@ if [ "${installedmodscount}" -gt "0" ]; then echo -e "Installed addons/mods" echo -e "=================================" # Go through all available commands, get details and display them to the user. - for ((llindex=0; llindex < ${#installedmodslist[@]}; llindex++)); do + for ((llindex = 0; llindex < ${#installedmodslist[@]}; llindex++)); do # Current mod is the "llindex" value of the array we're going through. currentmod="${installedmodslist[llindex]}" fn_mod_get_info @@ -40,9 +40,9 @@ compatiblemodslistindex=0 while [ "${compatiblemodslistindex}" -lt "${#compatiblemodslist[@]}" ]; do # Set values for convenience. displayedmodname="${compatiblemodslist[compatiblemodslistindex]}" - displayedmodcommand="${compatiblemodslist[compatiblemodslistindex+1]}" - displayedmodsite="${compatiblemodslist[compatiblemodslistindex+2]}" - displayedmoddescription="${compatiblemodslist[compatiblemodslistindex+3]}" + displayedmodcommand="${compatiblemodslist[compatiblemodslistindex + 1]}" + displayedmodsite="${compatiblemodslist[compatiblemodslistindex + 2]}" + displayedmoddescription="${compatiblemodslist[compatiblemodslistindex + 3]}" # Output mods to the user. echo -e "${displayedmodname} - ${displayedmoddescription} - ${displayedmodsite}" echo -e " * ${cyan}${displayedmodcommand}${default}" @@ -65,8 +65,8 @@ while [[ ! " ${availablemodscommands[@]} " =~ " ${usermodselect} " ]]; 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 + 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." @@ -100,11 +100,11 @@ if [ "${modcommand}" == "amxmodx" ]; then fn_mod_exist "metamod" fi -if [ "${modcommand}" == "amxmodxcs" ] || - [ "${modcommand}" == "amxmodxdod" ] || - [ "${modcommand}" == "amxmodxtfc" ] || - [ "${modcommand}" == "amxmodxns" ] || - [ "${modcommand}" == "amxmodxts" ]; then +if [ "${modcommand}" == "amxmodxcs" ] \ + || [ "${modcommand}" == "amxmodxdod" ] \ + || [ "${modcommand}" == "amxmodxtfc" ] \ + || [ "${modcommand}" == "amxmodxns" ] \ + || [ "${modcommand}" == "amxmodxts" ]; then fn_mod_exist "amxmodx" fi diff --git a/lgsm/functions/command_mods_remove.sh b/lgsm/functions/command_mods_remove.sh index 8647a21ed..7127dcb3c 100755 --- a/lgsm/functions/command_mods_remove.sh +++ b/lgsm/functions/command_mods_remove.sh @@ -21,7 +21,7 @@ echo -e "=================================" # Displays list of installed mods. # Generates list to display to user. fn_mods_installed_list -for ((mlindex=0; mlindex < ${#installedmodslist[@]}; mlindex++)); do +for ((mlindex = 0; mlindex < ${#installedmodslist[@]}; mlindex++)); do # Current mod is the "mlindex" value of the array we are going through. currentmod="${installedmodslist[mlindex]}" # Get mod info. @@ -36,7 +36,7 @@ while [[ ! " ${installedmodslist[@]} " =~ " ${usermodselect} " ]]; 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 + if [ "${usermodselect}" == "exit" ] || [ "${usermodselect}" == "abort" ]; then core_exit.sh # Supplementary output upon invalid user input. elif [[ ! " ${availablemodscommands[@]} " =~ " ${usermodselect} " ]]; then @@ -68,9 +68,9 @@ while [ "${modfileline}" -le "${modsfilelistsize}" ]; do currentfileremove=$(sed "${modfileline}q;d" "${modsdir}/${modcommand}-files.txt") # If file or directory exists, then remove it. - if [ -f "${modinstalldir}/${currentfileremove}" ]||[ -d "${modinstalldir}/${currentfileremove}" ]; then + if [ -f "${modinstalldir}/${currentfileremove}" ] || [ -d "${modinstalldir}/${currentfileremove}" ]; then rm -rf "${modinstalldir:?}/${currentfileremove:?}" - ((exitcode=$?)) + ((exitcode = $?)) if [ "${exitcode}" != 0 ]; then fn_script_log_fatal "Removing ${modinstalldir}/${currentfileremove}" break @@ -78,7 +78,8 @@ while [ "${modfileline}" -le "${modsfilelistsize}" ]; do fn_script_log_pass "Removing ${modinstalldir}/${currentfileremove}" fi fi - tput rc; tput el + tput rc + tput el echo -e "removing ${modprettyname} ${modfileline} / ${modsfilelistsize} : ${currentfileremove}..." ((modfileline++)) done @@ -127,7 +128,7 @@ fi # Oxide fix # Oxide replaces server files, so a validate is required after uninstall. -if [ "${engine}" == "unity3d" ]&&[[ "${modprettyname}" == *"Oxide"* ]]; then +if [ "${engine}" == "unity3d" ] && [[ "${modprettyname}" == *"Oxide"* ]]; then fn_print_information_nl "Validating to restore original ${gamename} files replaced by Oxide" fn_script_log "Validating to restore original ${gamename} files replaced by Oxide" exitbypass="1" diff --git a/lgsm/functions/command_mods_update.sh b/lgsm/functions/command_mods_update.sh index 50bbf9d67..c2f7b42b5 100755 --- a/lgsm/functions/command_mods_update.sh +++ b/lgsm/functions/command_mods_update.sh @@ -15,25 +15,25 @@ mods_core.sh # Prevents specific files being overwritten upon update (set by ${modkeepfiles}). # For that matter, remove cfg files after extraction before copying them to destination. -fn_remove_cfg_files(){ - if [ "${modkeepfiles}" != "OVERWRITE" ]&&[ "${modkeepfiles}" != "NOUPDATE" ]; then +fn_remove_cfg_files() { + if [ "${modkeepfiles}" != "OVERWRITE" ] && [ "${modkeepfiles}" != "NOUPDATE" ]; then echo -e "the following files/directories will be preserved:" fn_sleep_time # Count how many files there are to remove. filestopreserve=$(echo -e "${modkeepfiles}" | awk -F ';' '{ print NF }') # Test all subvalues of "modkeepfiles" using the ";" separator. - for ((preservefilesindex=1; preservefilesindex < filestopreserve; preservefilesindex++)); do + for ((preservefilesindex = 1; preservefilesindex < filestopreserve; preservefilesindex++)); do # Put the current file we are looking for into a variable. - filetopreserve=$(echo -e "${modkeepfiles}" | awk -F ';' -v x=${preservefilesindex} '{ print $x }' ) + filetopreserve=$(echo -e "${modkeepfiles}" | awk -F ';' -v x=${preservefilesindex} '{ print $x }') echo -e " * serverfiles/${filetopreserve}" # If it matches an existing file that have been extracted delete the file. - if [ -f "${extractdir}/${filetopreserve}" ]||[ -d "${extractdir}/${filetopreserve}" ]; then + if [ -f "${extractdir}/${filetopreserve}" ] || [ -d "${extractdir}/${filetopreserve}" ]; then rm -r "${extractdir:?}/${filetopreserve}" # Write the file path in a tmp file, to rebuild a full file list as it is rebuilt upon update. if [ ! -f "${modsdir}/.removedfiles.tmp" ]; then touch "${modsdir}/.removedfiles.tmp" fi - echo -e "${filetopreserve}" >> "${modsdir}/.removedfiles.tmp" + echo -e "${filetopreserve}" >> "${modsdir}/.removedfiles.tmp" fi done fi @@ -45,7 +45,7 @@ fn_print_info_nl "Update addons/mods: ${installedmodscount} addons/mods will be fn_script_log_info "${installedmodscount} mods or addons will be updated" fn_mods_installed_list # Go through all available commands, get details and display them to the user. -for ((ulindex=0; ulindex < ${#installedmodslist[@]}; ulindex++)); do +for ((ulindex = 0; ulindex < ${#installedmodslist[@]}; ulindex++)); do # Current mod is the "ulindex" value of the array we're going through. currentmod="${installedmodslist[ulindex]}" fn_mod_get_info diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index 3f4e397e2..48d3d496a 100755 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -11,7 +11,7 @@ commandaction="Monitoring" functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set -fn_monitor_check_lockfile(){ +fn_monitor_check_lockfile() { # Monitor does not run it lockfile is not found. if [ ! -f "${lockdir}/${selfname}.lock" ]; then fn_print_dots "Checking lockfile: " @@ -25,14 +25,14 @@ fn_monitor_check_lockfile(){ fi # Fix if lockfile is not unix time or contains letters - if [ -f "${lockdir}/${selfname}.lock" ]&&[[ "$(head -n 1 "${lockdir}/${selfname}.lock")" =~ [A-Za-z] ]]; then + if [ -f "${lockdir}/${selfname}.lock" ] && [[ "$(head -n 1 "${lockdir}/${selfname}.lock")" =~ [A-Za-z] ]]; then date '+%s' > "${lockdir}/${selfname}.lock" echo "${version}" >> "${lockdir}/${selfname}.lock" echo "${port}" >> "${lockdir}/${selfname}.lock" fi } -fn_monitor_check_update(){ +fn_monitor_check_update() { # Monitor will check if update is already running. if [ "$(pgrep "${selfname} update" | wc -l)" != "0" ]; then fn_print_dots "Checking active updates: " @@ -45,7 +45,7 @@ fn_monitor_check_update(){ fi } -fn_monitor_check_session(){ +fn_monitor_check_session() { fn_print_dots "Checking session: " fn_print_checking_eol fn_script_log_info "Checking session: CHECKING" @@ -66,13 +66,13 @@ fn_monitor_check_session(){ fi } -fn_monitor_check_queryport(){ +fn_monitor_check_queryport() { # Monitor will check queryport is set before continuing. - if [ -z "${queryport}" ]||[ "${queryport}" == "0" ]; then + if [ -z "${queryport}" ] || [ "${queryport}" == "0" ]; then fn_print_dots "Checking port: " fn_print_checking_eol fn_script_log_info "Checking port: CHECKING" - if [ -n "${rconenabled}" ]&&[ "${rconenabled}" != "true" ]&&[ ${shortname} == "av" ]; then + if [ -n "${rconenabled}" ] && [ "${rconenabled}" != "true" ] && [ ${shortname} == "av" ]; then fn_print_warn "Checking port: Unable to query, rcon is not enabled" fn_script_log_warn "Checking port: Unable to query, rcon is not enabled" else @@ -83,7 +83,7 @@ fn_monitor_check_queryport(){ fi } -fn_query_gsquery(){ +fn_query_gsquery() { if [ ! -f "${functionsdir}/query_gsquery.py" ]; then fn_fetch_file_github "lgsm/functions" "query_gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nohash" fi @@ -91,93 +91,93 @@ fn_query_gsquery(){ querystatus="$?" } -fn_query_tcp(){ +fn_query_tcp() { bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${queryport}'' > /dev/null 2>&1 querystatus="$?" } -fn_monitor_query(){ -# Will loop and query up to 5 times every 15 seconds. -# Query will wait up to 60 seconds to confirm server is down as server can become non-responsive during map changes. -totalseconds=0 -for queryattempt in {1..5}; do - for queryip in "${queryips[@]}"; do - fn_print_dots "Querying port: ${querymethod}: ${queryip}:${queryport} : ${totalseconds}/${queryattempt}: " - fn_print_querying_eol - fn_script_log_info "Querying port: ${querymethod}: ${queryip}:${queryport} : ${queryattempt} : QUERYING" - # querydelay - if [ "$(head -n 1 "${lockdir}/${selfname}.lock")" -gt "$(date "+%s" -d "${querydelay} mins ago")" ]; then - fn_print_ok "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: " - fn_print_delay_eol_nl - fn_script_log_info "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt} : DELAY" - fn_script_log_info "Query bypassed: ${gameservername} started less than ${querydelay} minutes ago" - fn_script_log_info "Server started: $(date -d @$(head -n 1 "${lockdir}/${selfname}.lock"))" - fn_script_log_info "Current time: $(date)" - monitorpass=1 - core_exit.sh - # will use query method selected in fn_monitor_loop - # gamedig - elif [ "${querymethod}" == "gamedig" ]; then - query_gamedig.sh - # gsquery - elif [ "${querymethod}" == "gsquery" ]; then - fn_query_gsquery - #tcp query - elif [ "${querymethod}" == "tcp" ]; then - fn_query_tcp - fi +fn_monitor_query() { + # Will loop and query up to 5 times every 15 seconds. + # Query will wait up to 60 seconds to confirm server is down as server can become non-responsive during map changes. + totalseconds=0 + for queryattempt in {1..5}; do + for queryip in "${queryips[@]}"; do + fn_print_dots "Querying port: ${querymethod}: ${queryip}:${queryport} : ${totalseconds}/${queryattempt}: " + fn_print_querying_eol + fn_script_log_info "Querying port: ${querymethod}: ${queryip}:${queryport} : ${queryattempt} : QUERYING" + # querydelay + if [ "$(head -n 1 "${lockdir}/${selfname}.lock")" -gt "$(date "+%s" -d "${querydelay} mins ago")" ]; then + fn_print_ok "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: " + fn_print_delay_eol_nl + fn_script_log_info "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt} : DELAY" + fn_script_log_info "Query bypassed: ${gameservername} started less than ${querydelay} minutes ago" + fn_script_log_info "Server started: $(date -d @$(head -n 1 "${lockdir}/${selfname}.lock"))" + fn_script_log_info "Current time: $(date)" + monitorpass=1 + core_exit.sh + # will use query method selected in fn_monitor_loop + # gamedig + elif [ "${querymethod}" == "gamedig" ]; then + query_gamedig.sh + # gsquery + elif [ "${querymethod}" == "gsquery" ]; then + fn_query_gsquery + #tcp query + elif [ "${querymethod}" == "tcp" ]; then + fn_query_tcp + fi - if [ "${querystatus}" == "0" ]; then - # Server query OK. - fn_print_ok "Querying port: ${querymethod}: ${queryip}:${queryport} : ${totalseconds}/${queryattempt}: " - fn_print_ok_eol_nl - fn_script_log_pass "Querying port: ${querymethod}: ${queryip}:${queryport} : ${queryattempt}: OK" - monitorpass=1 if [ "${querystatus}" == "0" ]; then - # Add query data to log. - if [ "${gdname}" ]; then - fn_script_log_info "Server name: ${gdname}" - fi - if [ "${gdplayers}" ]; then - fn_script_log_info "Players: ${gdplayers}/${gdmaxplayers}" - fi - if [ "${gdbots}" ]; then - fn_script_log_info "Bots: ${gdbots}" - fi - if [ "${gdmap}" ]; then - fn_script_log_info "Map: ${gdmap}" - fi - if [ "${gdgamemode}" ]; then - fn_script_log_info "Game Mode: ${gdgamemode}" - fi - - # send LinuxGSM stats if monitor is OK. - if [ "${stats}" == "on" ]||[ "${stats}" == "y" ]; then - info_stats.sh + # Server query OK. + fn_print_ok "Querying port: ${querymethod}: ${queryip}:${queryport} : ${totalseconds}/${queryattempt}: " + fn_print_ok_eol_nl + fn_script_log_pass "Querying port: ${querymethod}: ${queryip}:${queryport} : ${queryattempt}: OK" + monitorpass=1 + if [ "${querystatus}" == "0" ]; then + # Add query data to log. + if [ "${gdname}" ]; then + fn_script_log_info "Server name: ${gdname}" + fi + if [ "${gdplayers}" ]; then + fn_script_log_info "Players: ${gdplayers}/${gdmaxplayers}" + fi + if [ "${gdbots}" ]; then + fn_script_log_info "Bots: ${gdbots}" + fi + if [ "${gdmap}" ]; then + fn_script_log_info "Map: ${gdmap}" + fi + if [ "${gdgamemode}" ]; then + fn_script_log_info "Game Mode: ${gdgamemode}" + fi + + # send LinuxGSM stats if monitor is OK. + if [ "${stats}" == "on" ] || [ "${stats}" == "y" ]; then + info_stats.sh + fi fi - fi - core_exit.sh - else - # Server query FAIL. - fn_print_fail "Querying port: ${querymethod}: ${queryip}:${queryport} : ${totalseconds}/${queryattempt}: " - fn_print_fail_eol - fn_script_log_warn "Querying port: ${querymethod}: ${queryip}:${queryport} : ${queryattempt}: FAIL" - # Monitor will try gamedig (if supported) for first 30s then gsquery before restarting. - # gsquery will fail if longer than 60s - if [ "${totalseconds}" -ge "59" ]; then - # Monitor will FAIL if over 60s and trigger gane server reboot. + core_exit.sh + else + # Server query FAIL. fn_print_fail "Querying port: ${querymethod}: ${queryip}:${queryport} : ${totalseconds}/${queryattempt}: " - fn_print_fail_eol_nl + fn_print_fail_eol fn_script_log_warn "Querying port: ${querymethod}: ${queryip}:${queryport} : ${queryattempt}: FAIL" - # Send alert if enabled. - alert="restartquery" - alert.sh - command_restart.sh - fn_firstcommand_reset - core_exit.sh + # Monitor will try gamedig (if supported) for first 30s then gsquery before restarting. + # gsquery will fail if longer than 60s + if [ "${totalseconds}" -ge "59" ]; then + # Monitor will FAIL if over 60s and trigger gane server reboot. + fn_print_fail "Querying port: ${querymethod}: ${queryip}:${queryport} : ${totalseconds}/${queryattempt}: " + fn_print_fail_eol_nl + fn_script_log_warn "Querying port: ${querymethod}: ${queryip}:${queryport} : ${queryattempt}: FAIL" + # Send alert if enabled. + alert="restartquery" + alert.sh + command_restart.sh + fn_firstcommand_reset + core_exit.sh + fi fi - fi - done + done # Second counter will wait for 15s before breaking loop. for seconds in {1..15}; do fn_print_fail "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: ${cyan}WAIT${default}" @@ -187,25 +187,25 @@ for queryattempt in {1..5}; do break fi done -done + done } -fn_monitor_loop(){ +fn_monitor_loop() { # loop though query methods selected by querymode. totalseconds=0 if [ "${querymode}" == "2" ]; then - local query_methods_array=( gamedig gsquery ) + local query_methods_array=(gamedig gsquery) elif [ "${querymode}" == "3" ]; then - local query_methods_array=( gamedig ) + local query_methods_array=(gamedig) elif [ "${querymode}" == "4" ]; then - local query_methods_array=( gsquery ) + local query_methods_array=(gsquery) elif [ "${querymode}" == "5" ]; then - local query_methods_array=( tcp ) + local query_methods_array=(tcp) fi for querymethod in "${query_methods_array[@]}"; do # Will check if gamedig is installed and bypass if not. if [ "${querymethod}" == "gamedig" ]; then - if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; then + if [ "$(command -v gamedig 2> /dev/null)" ] && [ "$(command -v jq 2> /dev/null)" ]; then if [ -z "${monitorpass}" ]; then fn_monitor_query fi diff --git a/lgsm/functions/command_postdetails.sh b/lgsm/functions/command_postdetails.sh index f8b36fb61..dad44d9af 100755 --- a/lgsm/functions/command_postdetails.sh +++ b/lgsm/functions/command_postdetails.sh @@ -34,8 +34,7 @@ else info_game.sh info_distro.sh info_messages.sh - for queryip in "${queryips[@]}" - do + for queryip in "${queryips[@]}"; do query_gamedig.sh if [ "${querystatus}" == "0" ]; then break @@ -50,7 +49,7 @@ else fn_info_message_script fn_info_message_backup # Some game servers do not have parms. - if [ "${shortname}" != "jc2" ]&&[ "${shortname}" != "jc3" ]&&[ "${shortname}" != "dst" ]&&[ "${shortname}" != "pz" ]&&[ "${engine}" != "renderware" ]; then + if [ "${shortname}" != "jc2" ] && [ "${shortname}" != "jc3" ] && [ "${shortname}" != "dst" ] && [ "${shortname}" != "pz" ] && [ "${engine}" != "renderware" ]; then fn_info_message_commandlineparms fi fn_info_message_ports_edit diff --git a/lgsm/functions/command_send.sh b/lgsm/functions/command_send.sh index 4b653c0be..c143276f6 100644 --- a/lgsm/functions/command_send.sh +++ b/lgsm/functions/command_send.sh @@ -22,7 +22,7 @@ if [ "${status}" != "0" ]; then commandtosend="${userinput2}" else echo "" - commandtosend=$( fn_prompt_message "send: " ) + commandtosend=$(fn_prompt_message "send: ") fi echo "" fn_print_dots "Sending command to console: \"${commandtosend}\"" diff --git a/lgsm/functions/command_skeleton.sh b/lgsm/functions/command_skeleton.sh index 7b7d67d5f..53c4ddec5 100644 --- a/lgsm/functions/command_skeleton.sh +++ b/lgsm/functions/command_skeleton.sh @@ -11,7 +11,7 @@ fn_print_dots "Creating skeleton directory" check.sh # Find all directorys and create them in the skel directory -find "${rootdir}" -type d -not \( -path ./skel -prune \) | cpio -pdvm skel 2>/dev/null +find "${rootdir}" -type d -not \( -path ./skel -prune \) | cpio -pdvm skel 2> /dev/null exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_nl "Creating skeleton directory" diff --git a/lgsm/functions/command_start.sh b/lgsm/functions/command_start.sh index 58ecfcff7..d10240fa7 100755 --- a/lgsm/functions/command_start.sh +++ b/lgsm/functions/command_start.sh @@ -10,17 +10,17 @@ commandaction="Starting" functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set -fn_start_teamspeak3(){ +fn_start_teamspeak3() { if [ ! -f "${servercfgfullpath}" ]; then fn_print_warn_nl "${servercfgfullpath} is missing" fn_script_log_warn "${servercfgfullpath} is missing" - echo " * Creating blank ${servercfg}" + echo " * Creating blank ${servercfg}" fn_script_log_info "Creating blank ${servercfg}" fn_sleep_time - echo " * ${servercfg} can remain blank by default." + echo " * ${servercfg} can remain blank by default." fn_script_log_info "${servercfgfullpath} can remain blank by default." fn_sleep_time - echo " * ${servercfg} is located in ${servercfgfullpath}." + echo " * ${servercfg} is located in ${servercfgfullpath}." fn_script_log_info "${servercfg} is located in ${servercfgfullpath}." sleep 5 touch "${servercfgfullpath}" @@ -34,12 +34,12 @@ fn_start_teamspeak3(){ # This will allow the Jedi Knight 2 version to be printed in console on start. # Used to allow update to detect JK2MV server version. -fn_start_jk2(){ +fn_start_jk2() { fn_start_tmux tmux send -t "${sessionname}" version ENTER > /dev/null 2>&1 } -fn_start_tmux(){ +fn_start_tmux() { if [ "${parmsbypass}" ]; then startparameters="" fi @@ -57,7 +57,7 @@ fn_start_tmux(){ # Log rotation. fn_script_log_info "Rotating log files" - if [ "${engine}" == "unreal2" ]&&[ -f "${gamelog}" ]; then + if [ "${engine}" == "unreal2" ] && [ -f "${gamelog}" ]; then mv "${gamelog}" "${gamelogdate}" fi if [ -f "${lgsmlog}" ]; then @@ -91,7 +91,7 @@ fn_start_tmux(){ if [ "${tmuxv}" == "master" ]; then fn_script_log "tmux version: master (user compiled)" echo -e "tmux version: master (user compiled)" >> "${consolelog}" - if [ "${consolelogging}" == "on" ]||[ -z "${consolelogging}" ]; then + if [ "${consolelogging}" == "on" ] || [ -z "${consolelogging}" ]; then tmux pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'" fi elif [ -n "${tmuxv}" ]; then @@ -107,7 +107,7 @@ fn_start_tmux(){ https://linuxgsm.com/tmux-upgrade Currently installed: $(tmux -V)" > "${consolelog}" # Console logging enable or not set. - elif [ "${consolelogging}" == "on" ]||[ -z "${consolelogging}" ]; then + elif [ "${consolelogging}" == "on" ] || [ -z "${consolelogging}" ]; then tmux pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'" fi else @@ -140,11 +140,10 @@ fn_start_tmux(){ cat "${lgsmlogdir}/.${selfname}-tmux-error.tmp" | tee -a "${lgsmlog}" # Detected error https://linuxgsm.com/support - if grep -c "Operation not permitted" "${lgsmlogdir}/.${selfname}-tmux-error.tmp" - then - echo -e "" - echo -e "Fix" - echo -e "=================================" + if grep -c "Operation not permitted" "${lgsmlogdir}/.${selfname}-tmux-error.tmp"; then + echo -e "" + echo -e "Fix" + echo -e "=================================" if ! grep "tty:" /etc/group | grep "$(whoami)"; then echo -e "$(whoami) is not part of the tty group." fn_script_log_info "$(whoami) is not part of the tty group." @@ -172,7 +171,7 @@ fn_start_tmux(){ fn_print_ok "${servername}" fn_script_log_pass "Started ${servername}" fi - rm "${lgsmlogdir:?}/.${selfname}-tmux-error.tmp" 2>/dev/null + rm "${lgsmlogdir:?}/.${selfname}-tmux-error.tmp" 2> /dev/null echo -en "\n" } @@ -195,7 +194,7 @@ info_game.sh core_logs.sh # Will check for updates is updateonstart is yes. -if [ "${updateonstart}" == "yes" ]||[ "${updateonstart}" == "1" ]||[ "${updateonstart}" == "on" ]; then +if [ "${updateonstart}" == "yes" ] || [ "${updateonstart}" == "1" ] || [ "${updateonstart}" == "on" ]; then exitbypass=1 unset updateonstart command_update.sh diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index ef54b525c..b87185402 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -11,11 +11,11 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set # Attempts graceful shutdown by sending 'CTRL+c'. -fn_stop_graceful_ctrlc(){ +fn_stop_graceful_ctrlc() { fn_print_dots "Graceful: CTRL+c" fn_script_log_info "Graceful: CTRL+c" # Sends quit. - tmux send-keys -t "${sessionname}" C-c > /dev/null 2>&1 + tmux send-keys -t "${sessionname}" C-c > /dev/null 2>&1 # Waits up to 30 seconds giving the server time to shutdown gracefuly. for seconds in {1..30}; do check_status.sh @@ -39,13 +39,13 @@ fn_stop_graceful_ctrlc(){ # Attempts graceful shutdown by sending a specified command. # Usage: fn_stop_graceful_cmd "console_command" "timeout_in_seconds" # e.g.: fn_stop_graceful_cmd "quit" "30" -fn_stop_graceful_cmd(){ +fn_stop_graceful_cmd() { fn_print_dots "Graceful: sending \"${1}\"" fn_script_log_info "Graceful: sending \"${1}\"" # Sends specific stop command. tmux send -t "${sessionname}" ENTER "${1}" ENTER > /dev/null 2>&1 # Waits up to ${seconds} seconds giving the server time to shutdown gracefully. - for ((seconds=1; seconds<=${2}; seconds++)); do + for ((seconds = 1; seconds <= ${2}; seconds++)); do check_status.sh if [ "${status}" == "0" ]; then fn_print_ok "Graceful: sending \"${1}\": ${seconds}: " @@ -67,7 +67,7 @@ fn_stop_graceful_cmd(){ # Attempts graceful shutdown of goldsrc using rcon 'quit' command. # There is only a 3 second delay before a forced a tmux shutdown # as GoldSrc servers 'quit' command does a restart rather than shutdown. -fn_stop_graceful_goldsrc(){ +fn_stop_graceful_goldsrc() { fn_print_dots "Graceful: sending \"quit\"" fn_script_log_info "Graceful: sending \"quit\"" # sends quit @@ -83,9 +83,9 @@ fn_stop_graceful_goldsrc(){ } # telnet command for sdtd graceful shutdown. -fn_stop_graceful_sdtd_telnet(){ - if [ -z "${telnetpass}" ]||[ "${telnetpass}" == "NOT SET" ]; then - sdtd_telnet_shutdown=$( expect -c ' +fn_stop_graceful_sdtd_telnet() { + if [ -z "${telnetpass}" ] || [ "${telnetpass}" == "NOT SET" ]; then + sdtd_telnet_shutdown=$(expect -c ' proc abort {} { puts "Timeout or EOF\n" exit 1 @@ -99,7 +99,7 @@ fn_stop_graceful_sdtd_telnet(){ puts "Completed.\n" ') else - sdtd_telnet_shutdown=$( expect -c ' + sdtd_telnet_shutdown=$(expect -c ' proc abort {} { puts "Timeout or EOF\n" exit 1 @@ -120,12 +120,12 @@ fn_stop_graceful_sdtd_telnet(){ } # Attempts graceful shutdown of 7 Days To Die using telnet. -fn_stop_graceful_sdtd(){ +fn_stop_graceful_sdtd() { fn_print_dots "Graceful: telnet" fn_script_log_info "Graceful: telnet" if [ "${telnetenabled}" == "false" ]; then fn_print_info_nl "Graceful: telnet: DISABLED: Enable in ${servercfg}" - elif [ "$(command -v expect 2>/dev/null)" ]; then + elif [ "$(command -v expect 2> /dev/null)" ]; then # Tries to shutdown with both localhost and server IP. for telnetip in 127.0.0.1 ${ip}; do fn_print_dots "Graceful: telnet: ${telnetip}:${telnetport}" @@ -180,7 +180,7 @@ fn_stop_graceful_sdtd(){ } # Attempts graceful shutdown by sending /save /stop. -fn_stop_graceful_avorion(){ +fn_stop_graceful_avorion() { fn_print_dots "Graceful: /save /stop" fn_script_log_info "Graceful: /save /stop" # Sends /save. @@ -208,7 +208,7 @@ fn_stop_graceful_avorion(){ fi } -fn_stop_graceful_select(){ +fn_stop_graceful_select() { if [ "${stopmode}" == "1" ]; then fn_stop_tmux elif [ "${stopmode}" == "2" ]; then @@ -234,7 +234,7 @@ fn_stop_graceful_select(){ fi } -fn_stop_tmux(){ +fn_stop_tmux() { fn_print_dots "${servername}" fn_script_log_info "tmux kill-session: ${sessionname}: ${servername}" # Kill tmux session. @@ -251,7 +251,7 @@ fn_stop_tmux(){ } # Checks if the server is already stopped. -fn_stop_pre_check(){ +fn_stop_pre_check() { if [ "${status}" == "0" ]; then fn_print_info_nl "${servername} is already stopped" fn_script_log_error "${servername} is already stopped" diff --git a/lgsm/functions/command_ts3_server_pass.sh b/lgsm/functions/command_ts3_server_pass.sh index 1e227f3de..be0816d15 100755 --- a/lgsm/functions/command_ts3_server_pass.sh +++ b/lgsm/functions/command_ts3_server_pass.sh @@ -10,7 +10,7 @@ commandaction="Changing password" functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set -fn_serveradmin_password_prompt(){ +fn_serveradmin_password_prompt() { fn_print_header fn_print_information_nl "You are about to change the ${gamename} ServerAdmin password." fn_print_warning_nl "${gamename} will restart during this process." @@ -25,7 +25,7 @@ fn_serveradmin_password_prompt(){ fn_script_log_info "Changing password" } -fn_serveradmin_password_set(){ +fn_serveradmin_password_set() { # Start server in "new password mode". ts3serverpass="1" exitbypass="1" diff --git a/lgsm/functions/command_update.sh b/lgsm/functions/command_update.sh index 828c8c38d..5b9858e84 100755 --- a/lgsm/functions/command_update.sh +++ b/lgsm/functions/command_update.sh @@ -21,7 +21,7 @@ elif [ "${shortname}" == "mc" ]; then update_minecraft.sh elif [ "${shortname}" == "mcb" ]; then update_minecraft_bedrock.sh -elif [ "${shortname}" == "pmc" ]||[ "${shortname}" == "wmc" ]; then +elif [ "${shortname}" == "pmc" ] || [ "${shortname}" == "wmc" ]; then update_papermc.sh elif [ "${shortname}" == "mumble" ]; then update_mumble.sh diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh index e7b70f327..39a441f59 100755 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -19,9 +19,9 @@ fn_script_log_info "Updating LinuxGSM" fn_print_dots "Selecting repo" fn_script_log_info "Selecting repo" # Select remotereponame -curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh" 1>/dev/null +curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh" 1> /dev/null if [ $? != "0" ]; then - curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh" 1>/dev/null + curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh" 1> /dev/null if [ $? != "0" ]; then fn_print_fail_nl "Selecting repo: Unable to to access GitHub or Bitbucket repositories" fn_script_log_fatal "Selecting repo: Unable to to access GitHub or Bitbucket repositories" @@ -38,9 +38,9 @@ fi # Check linuxsm.sh echo -en "checking ${remotereponame} linuxgsm.sh...\c" if [ "${remotereponame}" == "GitHub" ]; then - curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh" 1>/dev/null + curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh" 1> /dev/null else - curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh" 1>/dev/null + curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh" 1> /dev/null fi if [ $? != "0" ]; then fn_print_fail_eol_nl @@ -118,9 +118,9 @@ fi echo -en "checking ${remotereponame} config _default.cfg...\c" fn_script_log_info "Checking ${remotereponame} config _default.cfg" if [ "${remotereponame}" == "GitHub" ]; then - curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg" 1>/dev/null + curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg" 1> /dev/null else - curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg" 1>/dev/null + curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg" 1> /dev/null fi if [ $? != "0" ]; then fn_print_fail_eol_nl @@ -152,9 +152,9 @@ if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then echo -en "checking ${remotereponame} config ${distroid}-${distroversioncsv}.csv...\c" fn_script_log_info "Checking ${remotereponame} ${distroid}-${distroversioncsv}.csv" if [ "${remotereponame}" == "GitHub" ]; then - curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv" 1>/dev/null + curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv" 1> /dev/null else - curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv" 1>/dev/null + curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv" 1> /dev/null fi if [ $? != "0" ]; then fn_print_fail_eol_nl @@ -189,9 +189,9 @@ if [ -n "${functionsdir}" ]; then echo -en "checking ${remotereponame} module ${functionfile}...\c" github_file_url_dir="lgsm/functions" if [ "${remotereponame}" == "GitHub" ]; then - curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}" 1>/dev/null + curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}" 1> /dev/null else - curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${functionfile}" 1>/dev/null + curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${functionfile}" 1> /dev/null fi if [ $? != 0 ]; then fn_print_error_eol_nl diff --git a/lgsm/functions/command_validate.sh b/lgsm/functions/command_validate.sh index 4c51bacb3..15257a3e2 100755 --- a/lgsm/functions/command_validate.sh +++ b/lgsm/functions/command_validate.sh @@ -10,7 +10,7 @@ commandaction="Validating" functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set -fn_validate(){ +fn_validate() { fn_print_warn "Validate might overwrite some customised files" fn_script_log_warn "${commandaction} server: Validate might overwrite some customised files" totalseconds=3 diff --git a/lgsm/functions/command_wipe.sh b/lgsm/functions/command_wipe.sh index d2d05defc..29577984e 100755 --- a/lgsm/functions/command_wipe.sh +++ b/lgsm/functions/command_wipe.sh @@ -11,7 +11,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set # Provides an exit code upon error. -fn_wipe_exit_code(){ +fn_wipe_exit_code() { exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl @@ -22,17 +22,17 @@ fn_wipe_exit_code(){ } # Removes files to wipe server. -fn_wipe_files(){ +fn_wipe_files() { fn_print_start_nl "${wipetype}" fn_script_log_info "${wipetype}" # Remove Map files - if [ -n "${serverwipe}" ]||[ -n "${mapwipe}" ]; then + if [ -n "${serverwipe}" ] || [ -n "${mapwipe}" ]; then if [ -n "$(find "${serveridentitydir}" -type f -name "*.map")" ]; then echo -en "removing .map file(s)..." fn_script_log_info "removing *.map file(s)" fn_sleep_time - find "${serveridentitydir:?}" -type f -name "*.map" -printf "%f\n" >> "${lgsmlog}" + find "${serveridentitydir:?}" -type f -name "*.map" -printf "%f\n" >> "${lgsmlog}" find "${serveridentitydir:?}" -type f -name "*.map" -delete | tee -a "${lgsmlog}" fn_wipe_exit_code else @@ -42,12 +42,12 @@ fn_wipe_files(){ fi fi # Remove Save files. - if [ -n "${serverwipe}" ]||[ -n "${mapwipe}" ]; then + if [ -n "${serverwipe}" ] || [ -n "${mapwipe}" ]; then if [ -n "$(find "${serveridentitydir}" -type f -name "*.sav*")" ]; then echo -en "removing .sav file(s)..." fn_script_log_info "removing .sav file(s)" fn_sleep_time - find "${serveridentitydir:?}" -type f -name "*.sav*" -printf "%f\n" >> "${lgsmlog}" + find "${serveridentitydir:?}" -type f -name "*.sav*" -printf "%f\n" >> "${lgsmlog}" find "${serveridentitydir:?}" -type f -name "*.sav*" -delete fn_wipe_exit_code else @@ -74,7 +74,7 @@ fn_wipe_files(){ fi } -fn_map_wipe_warning(){ +fn_map_wipe_warning() { fn_print_warn "Map wipe will reset the map data and keep blueprint data" fn_script_log_warn "Map wipe will reset the map data and keep blueprint data" totalseconds=3 @@ -89,7 +89,7 @@ fn_map_wipe_warning(){ fn_print_warn_nl "Map wipe will reset the map data and keep blueprint data" } -fn_full_wipe_warning(){ +fn_full_wipe_warning() { fn_print_warn "Server wipe will reset the map data and remove blueprint data" fn_script_log_warn "Server wipe will reset the map data and remove blueprint data" totalseconds=3 @@ -105,8 +105,8 @@ fn_full_wipe_warning(){ } # Will change the seed if the seed is not defined by the user. -fn_wipe_random_seed(){ - if [ -f "${datadir}/${selfname}-seed.txt" ]&&[ -n "${randomseed}" ]; then +fn_wipe_random_seed() { + if [ -f "${datadir}/${selfname}-seed.txt" ] && [ -n "${randomseed}" ]; then shuf -i 1-2147483647 -n 1 > "${datadir}/${selfname}-seed.txt" seed=$(cat "${datadir}/${selfname}-seed.txt") randomseed=1 @@ -118,10 +118,10 @@ fn_wipe_random_seed(){ } # A summary of what wipe is going to do. -fn_wipe_details(){ +fn_wipe_details() { fn_print_information_nl "Wipe does not remove Rust+ data." echo -en "* Wipe map data: " - if [ -n "${serverwipe}" ]||[ -n "${mapwipe}" ]; then + if [ -n "${serverwipe}" ] || [ -n "${mapwipe}" ]; then fn_print_yes_eol_nl else fn_print_no_eol_nl @@ -147,7 +147,7 @@ check.sh fix_rust.sh # Check if there is something to wipe. -if [ -n "$(find "${serveridentitydir}" -type f -name "*.map")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "*.sav*")" ]&&[ -n "$(find "${serveridentitydir}" -type f ! -name 'player.tokens.db' -name "*.db")" ]; then +if [ -n "$(find "${serveridentitydir}" -type f -name "*.map")" ] || [ -n "$(find "${serveridentitydir}" -type f -name "*.sav*")" ] && [ -n "$(find "${serveridentitydir}" -type f ! -name 'player.tokens.db' -name "*.db")" ]; then if [ -n "${serverwipe}" ]; then wipetype="Full wipe" fn_full_wipe_warning diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index 297f4101f..cc5af1809 100755 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -19,7 +19,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_dl_steamcmd(){ +fn_dl_steamcmd() { fn_print_start_nl "${remotelocation}" fn_script_log_info "${commandaction} ${selfname}: ${remotelocation}" if [ -n "${branch}" ]; then @@ -41,7 +41,7 @@ fn_dl_steamcmd(){ fi # Validate will be added as a parameter if required. - if [ "${commandname}" == "VALIDATE" ]||[ "${commandname}" == "INSTALL" ]; then + if [ "${commandname}" == "VALIDATE" ] || [ "${commandname}" == "INSTALL" ]; then validate="validate" fi @@ -53,13 +53,13 @@ fn_dl_steamcmd(){ rm -f "${steamcmdlog:?}" fi counter=0 - while [ "${counter}" == "0" ]||[ "${exitcode}" != "0" ]; do - counter=$((counter+1)) + while [ "${counter}" == "0" ] || [ "${exitcode}" != "0" ]; do + counter=$((counter + 1)) # Select SteamCMD parameters # If GoldSrc (appid 90) servers. GoldSrc (appid 90) require extra commands. if [ "${appid}" == "90" ]; then # If using a specific branch. - if [ -n "${branch}" ]&&[ -n "${betapassword}" ]; then + if [ -n "${branch}" ] && [ -n "${betapassword}" ]; then ${unbuffer} ${steamcmdcommand} +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" elif [ -n "${branch}" ]; then ${unbuffer} ${steamcmdcommand} +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" -beta "${branch}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" @@ -68,7 +68,7 @@ fn_dl_steamcmd(){ fi # Force Windows Platform type. elif [ "${steamcmdforcewindows}" == "yes" ]; then - if [ -n "${branch}" ]&&[ -n "${betapassword}" ]; then + if [ -n "${branch}" ] && [ -n "${betapassword}" ]; then ${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" elif [ -n "${branch}" ]; then ${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" @@ -77,7 +77,7 @@ fn_dl_steamcmd(){ fi # All other servers. else - if [ -n "${branch}" ]&&[ -n "${betapassword}" ]; then + if [ -n "${branch}" ] && [ -n "${betapassword}" ]; then ${unbuffer} ${steamcmdcommand} +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" elif [ -n "${branch}" ]; then ${unbuffer} ${steamcmdcommand} +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" @@ -89,7 +89,7 @@ fn_dl_steamcmd(){ # Error checking for SteamCMD. Some errors will loop to try again and some will just exit. # Check also if we have more errors than retries to be sure that we do not loop to many times and error out. exitcode=$? - if [ -n "$(grep -i "Error!" "${steamcmdlog}" | tail -1)" ]&&[ "$(grep -ic "Error!" "${steamcmdlog}")" -ge "${counter}" ] ; then + if [ -n "$(grep -i "Error!" "${steamcmdlog}" | tail -1)" ] && [ "$(grep -ic "Error!" "${steamcmdlog}")" -ge "${counter}" ]; then # Not enough space. if [ -n "$(grep "0x202" "${steamcmdlog}" | tail -1)" ]; then fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files" @@ -97,9 +97,9 @@ fn_dl_steamcmd(){ core_exit.sh # Not enough space. elif [ -n "$(grep "0x212" "${steamcmdlog}" | tail -1)" ]; then - fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files" - fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files" - core_exit.sh + fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files" + fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files" + core_exit.sh # Need tp purchase game. elif [ -n "$(grep "No subscription" "${steamcmdlog}" | tail -1)" ]; then fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Steam account does not have a license for the required game" @@ -110,13 +110,13 @@ fn_dl_steamcmd(){ fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Two-factor authentication failure" fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Two-factor authentication failure" core_exit.sh - # Incorrect Branch password - elif [ -n "$(grep "Password check for AppId" "${steamcmdlog}" | tail -1)" ]; then - fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: betapassword is incorrect" - fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: betapassword is incorrect" - core_exit.sh + # Incorrect Branch password + elif [ -n "$(grep "Password check for AppId" "${steamcmdlog}" | tail -1)" ]; then + fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: betapassword is incorrect" + fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: betapassword is incorrect" + core_exit.sh # Update did not finish. - elif [ -n "$(grep "0x402" "${steamcmdlog}" | tail -1)" ]||[ -n "$(grep "0x602" "${steamcmdlog}" | tail -1)" ]; then + elif [ -n "$(grep "0x402" "${steamcmdlog}" | tail -1)" ] || [ -n "$(grep "0x602" "${steamcmdlog}" | tail -1)" ]; then fn_print_error2_nl "${commandaction} ${selfname}: ${remotelocation}: Update required but not completed - check network" fn_script_log_error "${commandaction} ${selfname}: ${remotelocation}: Update required but not completed - check network" else @@ -141,7 +141,7 @@ fn_dl_steamcmd(){ } # Emptys contents of the LinuxGSM tmpdir. -fn_clear_tmp(){ +fn_clear_tmp() { echo -en "clearing LinuxGSM tmp directory..." if [ -d "${tmpdir}" ]; then rm -rf "${tmpdir:?}/"* @@ -156,9 +156,9 @@ fn_clear_tmp(){ fi } -fn_dl_hash(){ +fn_dl_hash() { # Runs Hash Check if available. - if [ "${hash}" != "0" ]&&[ "${hash}" != "nohash" ]&&[ "${hash}" != "nomd5" ]; then + if [ "${hash}" != "0" ] && [ "${hash}" != "nohash" ] && [ "${hash}" != "nomd5" ]; then # MD5 if [ "${#hash}" == "32" ]; then hashbin="md5sum" @@ -204,7 +204,7 @@ fn_dl_hash(){ # Extracts can be defined in code like so: # fn_dl_extract "${local_filedir}" "${local_filename}" "${extractdir}" # fn_dl_extract "/home/gameserver/lgsm/tmp" "file.tar.bz2" "/home/gamserver/serverfiles" -fn_dl_extract(){ +fn_dl_extract() { local_filedir="${1}" local_filename="${2}" extractdir="${3}" @@ -214,7 +214,7 @@ fn_dl_extract(){ if [ ! -d "${extractdir}" ]; then mkdir "${extractdir}" fi - if [ "${mime}" == "application/gzip" ]||[ "${mime}" == "application/x-gzip" ]; then + if [ "${mime}" == "application/gzip" ] || [ "${mime}" == "application/x-gzip" ]; then extractcmd=$(tar -zxf "${local_filedir}/${local_filename}" -C "${extractdir}") elif [ "${mime}" == "application/x-bzip2" ]; then extractcmd=$(tar -jxf "${local_filedir}/${local_filename}" -C "${extractdir}") @@ -239,7 +239,7 @@ fn_dl_extract(){ } # Trap to remove file download if canceled before completed. -fn_fetch_trap(){ +fn_fetch_trap() { echo -e "" echo -en "downloading ${local_filename}..." fn_print_canceled_eol_nl @@ -253,7 +253,7 @@ fn_fetch_trap(){ } # Will check a file exists and download it. Will not exit if fails to download. -fn_check_file(){ +fn_check_file() { remote_fileurl="${1}" remote_fileurl_backup="${2}" remote_fileurl_name="${3}" @@ -263,11 +263,11 @@ fn_check_file(){ if [ -n "${remote_fileurl_backup}" ]; then # counter set to 0 to allow second try counter=0 - remote_fileurls_array=( remote_fileurl remote_fileurl_backup ) + remote_fileurls_array=(remote_fileurl remote_fileurl_backup) else # counter set to 1 to not allow second try counter=1 - remote_fileurls_array=( remote_fileurl ) + remote_fileurls_array=(remote_fileurl) fi for remote_fileurl_array in "${remote_fileurls_array[@]}"; do if [ "${remote_fileurl_array}" == "remote_fileurl" ]; then @@ -277,7 +277,7 @@ fn_check_file(){ fileurl="${remote_fileurl_backup}" fileurl_name="${remote_fileurl_backup_name}" fi - counter=$((counter+1)) + counter=$((counter + 1)) echo -en "checking ${fileurl_name} ${remote_filename}...\c" curlcmd=$(curl --output /dev/null --silent --head --fail "${fileurl}" 2>&1) local exitcode=$? @@ -321,7 +321,7 @@ fn_check_file(){ fi } -fn_fetch_file(){ +fn_fetch_file() { remote_fileurl="${1}" remote_fileurl_backup="${2}" remote_fileurl_name="${3}" @@ -334,16 +334,16 @@ fn_fetch_file(){ hash="${10:-0}" # Download file if missing or download forced. - if [ ! -f "${local_filedir}/${local_filename}" ]||[ "${forcedl}" == "forcedl" ]; then + if [ ! -f "${local_filedir}/${local_filename}" ] || [ "${forcedl}" == "forcedl" ]; then # If backup fileurl exists include it. if [ -n "${remote_fileurl_backup}" ]; then # counter set to 0 to allow second try counter=0 - remote_fileurls_array=( remote_fileurl remote_fileurl_backup ) + remote_fileurls_array=(remote_fileurl remote_fileurl_backup) else # counter set to 1 to not allow second try counter=1 - remote_fileurls_array=( remote_fileurl ) + remote_fileurls_array=(remote_fileurl) fi for remote_fileurl_array in "${remote_fileurls_array[@]}"; do if [ "${remote_fileurl_array}" == "remote_fileurl" ]; then @@ -353,14 +353,14 @@ fn_fetch_file(){ fileurl="${remote_fileurl_backup}" fileurl_name="${remote_fileurl_backup_name}" fi - counter=$((counter+1)) + counter=$((counter + 1)) if [ ! -d "${local_filedir}" ]; then mkdir -p "${local_filedir}" fi # Trap will remove part downloaded files if canceled. trap fn_fetch_trap INT # Larger files show a progress bar. - if [ "${local_filename##*.}" == "bz2" ]||[ "${local_filename##*.}" == "gz" ]||[ "${local_filename##*.}" == "zip" ]||[ "${local_filename##*.}" == "jar" ]||[ "${local_filename##*.}" == "xz" ]; then + if [ "${local_filename##*.}" == "bz2" ] || [ "${local_filename##*.}" == "gz" ] || [ "${local_filename##*.}" == "zip" ] || [ "${local_filename##*.}" == "jar" ] || [ "${local_filename##*.}" == "xz" ]; then echo -en "downloading ${local_filename}..." fn_sleep_time echo -en "\033[1K" @@ -374,7 +374,7 @@ fn_fetch_file(){ # Download will fail if downloads a html file. if [ -f "${local_filedir}/${local_filename}" ]; then - if [ -n "$(head "${local_filedir}/${local_filename}" | grep "DOCTYPE" )" ]; then + if [ -n "$(head "${local_filedir}/${local_filename}" | grep "DOCTYPE")" ]; then rm "${local_filedir:?}/${local_filename:?}" local exitcode=2 fi @@ -443,7 +443,7 @@ fn_fetch_file(){ # hash: Optional, set an hash sum and will compare it against the file. # Fetches files from the Git repo. -fn_fetch_file_github(){ +fn_fetch_file_github() { github_fileurl_dir="${1}" github_fileurl_name="${2}" # For legacy versions - code can be removed at a future date @@ -451,7 +451,7 @@ fn_fetch_file_github(){ remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. - elif [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then + elif [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}" else @@ -470,10 +470,10 @@ fn_fetch_file_github(){ fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}" } -fn_check_file_github(){ +fn_check_file_github() { github_fileurl_dir="${1}" github_fileurl_name="${2}" - if [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then + if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}" else @@ -486,11 +486,11 @@ fn_check_file_github(){ } # Fetches config files from the Git repo. -fn_fetch_config(){ +fn_fetch_config() { github_fileurl_dir="${1}" github_fileurl_name="${2}" # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. - if [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then + if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}" else @@ -510,11 +510,11 @@ fn_fetch_config(){ } # Fetches modules from the Git repo during first download. -fn_fetch_function(){ +fn_fetch_function() { github_fileurl_dir="lgsm/functions" github_fileurl_name="${functionfile}" - # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. - if [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then + # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. + if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}" else @@ -534,11 +534,11 @@ fn_fetch_function(){ } # Fetches modules from the Git repo during update-lgsm. -fn_update_function(){ +fn_update_function() { github_fileurl_dir="lgsm/functions" github_fileurl_name="${functionfile}" # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. - if [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then + if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}" else @@ -563,7 +563,7 @@ fn_update_function(){ # $2 Repo name. # $3 Destination for download. # $4 Search string in releases (needed if there are more files that can be downloaded from the release pages). -fn_dl_latest_release_github(){ +fn_dl_latest_release_github() { local githubreleaseuser="${1}" local githubreleaserepo="${2}" local githubreleasedownloadpath="${3}" diff --git a/lgsm/functions/core_exit.sh b/lgsm/functions/core_exit.sh index 34379a486..93c37dfc7 100755 --- a/lgsm/functions/core_exit.sh +++ b/lgsm/functions/core_exit.sh @@ -7,7 +7,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_exit_dev_debug(){ +fn_exit_dev_debug() { if [ -f "${rootdir}/.dev-debug" ]; then echo -e "" echo -e "${functionselfname} exiting with code: ${exitcode}" @@ -25,7 +25,7 @@ fi if [ "${exitbypass}" ]; then unset exitbypass -elif [ "${exitcode}" ]&&[ "${exitcode}" != "0" ]; then +elif [ "${exitcode}" ] && [ "${exitcode}" != "0" ]; then # List LinuxGSM version in logs fn_script_log_info "LinuxGSM version: ${version}" if [ "${exitcode}" == "1" ]; then @@ -41,7 +41,7 @@ elif [ "${exitcode}" ]&&[ "${exitcode}" != "0" ]; then # remove trap. trap - INT exit "${exitcode}" -elif [ "${exitcode}" ]&&[ "${exitcode}" == "0" ]; then +elif [ "${exitcode}" ] && [ "${exitcode}" == "0" ]; then # List LinuxGSM version in logs fn_script_log_info "LinuxGSM version: ${version}" fn_script_log_pass "${functionselfname} exiting with code: ${exitcode}" diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 67ed2a59b..29d2e2ebc 100755 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -12,780 +12,780 @@ modulesversion="v22.1.0" # Core -core_dl.sh(){ -functionfile="${FUNCNAME[0]}" -if [ "$(type fn_fetch_core_dl 2>/dev/null)" ]; then - fn_fetch_core_dl "lgsm/functions" "core_dl.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" -else - fn_bootstrap_fetch_file_github "lgsm/functions" "core_dl.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" -fi +core_dl.sh() { + functionfile="${FUNCNAME[0]}" + if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then + fn_fetch_core_dl "lgsm/functions" "core_dl.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" + else + fn_bootstrap_fetch_file_github "lgsm/functions" "core_dl.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" + fi } -core_messages.sh(){ -functionfile="${FUNCNAME[0]}" -if [ "$(type fn_fetch_core_dl 2>/dev/null)" ]; then - fn_fetch_core_dl "lgsm/functions" "core_messages.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" -else - fn_bootstrap_fetch_file_github "lgsm/functions" "core_messages.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" -fi +core_messages.sh() { + functionfile="${FUNCNAME[0]}" + if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then + fn_fetch_core_dl "lgsm/functions" "core_messages.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" + else + fn_bootstrap_fetch_file_github "lgsm/functions" "core_messages.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" + fi } -core_legacy.sh(){ -functionfile="${FUNCNAME[0]}" -if [ "$(type fn_fetch_core_dl 2>/dev/null)" ]; then - fn_fetch_core_dl "lgsm/functions" "core_legacy.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" -else - fn_bootstrap_fetch_file_github "lgsm/functions" "core_legacy.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" -fi +core_legacy.sh() { + functionfile="${FUNCNAME[0]}" + if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then + fn_fetch_core_dl "lgsm/functions" "core_legacy.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" + else + fn_bootstrap_fetch_file_github "lgsm/functions" "core_legacy.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" + fi } -core_exit.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +core_exit.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -core_getopt.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +core_getopt.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -core_trap.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +core_trap.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -core_steamcmd.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +core_steamcmd.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -core_github.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +core_github.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } # Commands -command_backup.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +command_backup.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -command_console.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +command_console.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -command_debug.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +command_debug.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -command_details.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +command_details.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -command_donate.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +command_donate.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -command_postdetails.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +command_postdetails.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -command_test_alert.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +command_test_alert.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -command_monitor.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +command_monitor.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -command_start.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +command_start.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -command_stop.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +command_stop.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -command_validate.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +command_validate.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -command_install.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +command_install.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -command_install_resources_mta.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +command_install_resources_mta.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -install_squad_license.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +install_squad_license.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -command_mods_install.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +command_mods_install.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -command_mods_update.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +command_mods_update.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -command_mods_remove.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +command_mods_remove.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -command_fastdl.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +command_fastdl.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -command_ts3_server_pass.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +command_ts3_server_pass.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -command_restart.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +command_restart.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -command_skeleton.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +command_skeleton.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -command_wipe.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +command_wipe.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -command_send.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +command_send.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } # Checks -check.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +check.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -check_config.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +check_config.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -check_deps.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +check_deps.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -check_executable.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +check_executable.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -check_glibc.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +check_glibc.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -check_ip.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +check_ip.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -check_last_update.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +check_last_update.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -check_logs.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +check_logs.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -check_permissions.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +check_permissions.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -check_root.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +check_root.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -check_status.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +check_status.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -check_steamcmd.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +check_steamcmd.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -check_system_dir.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +check_system_dir.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -check_system_requirements.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +check_system_requirements.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -check_tmuxception.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +check_tmuxception.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -check_version.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +check_version.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } # Compress -compress_unreal2_maps.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +compress_unreal2_maps.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -compress_ut99_maps.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +compress_ut99_maps.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } # Mods -mods_list.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +mods_list.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -mods_core.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +mods_core.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } # Dev -command_dev_clear_functions.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +command_dev_clear_functions.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -command_dev_debug.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +command_dev_debug.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -command_dev_detect_deps.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +command_dev_detect_deps.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -command_dev_detect_glibc.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +command_dev_detect_glibc.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -command_dev_detect_ldd.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +command_dev_detect_ldd.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -command_dev_query_raw.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +command_dev_query_raw.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } # Fix -fix.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_ark.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_ark.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_av.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_av.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_arma3.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_arma3.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_armar.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_armar.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_bo.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_bo.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_cmw.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_cmw.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_csgo.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_csgo.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_dst.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_dst.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_hw.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_hw.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_ins.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_ins.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_kf.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_kf.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_kf2.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_kf2.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_lo.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_lo.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_mcb.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_mcb.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_mta.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_mta.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_nmrih.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_nmrih.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_onset.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_onset.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_ro.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_ro.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_rust.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_rust.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_rw.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_rw.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_sfc.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_sfc.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_st.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_st.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_steamcmd.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_steamcmd.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_terraria.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_terraria.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_tf2.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_tf2.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_ut3.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_ut3.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_rust.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_rust.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_samp.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_samp.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_sdtd.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_sdtd.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_sof2.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_sof2.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_squad.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_squad.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_ts3.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_ts3.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_ut2k4.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_ut2k4.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_ut.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_ut.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_unt.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_unt.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_vh.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_vh.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_wurm.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_wurm.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fix_zmr.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fix_zmr.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } # Info -info_distro.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +info_distro.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -info_game.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +info_game.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -info_messages.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +info_messages.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -info_stats.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +info_stats.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } # Alert -alert.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +alert.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -alert_discord.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +alert_discord.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -alert_email.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +alert_email.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -alert_ifttt.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +alert_ifttt.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -alert_mailgun.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +alert_mailgun.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -alert_pushbullet.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +alert_pushbullet.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -alert_pushover.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +alert_pushover.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -alert_gotify.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +alert_gotify.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -alert_telegram.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +alert_telegram.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -alert_rocketchat.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +alert_rocketchat.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -alert_slack.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +alert_slack.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } # Logs -core_logs.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +core_logs.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } # Query -query_gamedig.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +query_gamedig.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } # Update -command_update_functions.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +command_update_functions.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -command_update_linuxgsm.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +command_update_linuxgsm.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -command_update.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +command_update.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -command_check_update.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +command_check_update.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -update_ts3.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +update_ts3.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -update_minecraft.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +update_minecraft.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -update_minecraft_bedrock.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +update_minecraft_bedrock.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -update_papermc.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +update_papermc.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -update_mumble.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +update_mumble.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -update_mta.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +update_mta.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -update_factorio.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +update_factorio.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -update_jediknight2.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +update_jediknight2.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -update_steamcmd.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +update_steamcmd.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -update_vintagestory.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +update_vintagestory.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -fn_update_functions.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +fn_update_functions.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } # ## Installer functions # -fn_autoinstall(){ -autoinstall=1 -command_install.sh +fn_autoinstall() { + autoinstall=1 + command_install.sh } -install_complete.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +install_complete.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -install_config.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +install_config.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -install_factorio_save.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +install_factorio_save.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -install_dst_token.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +install_dst_token.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -install_eula.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +install_eula.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -install_gsquery.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +install_gsquery.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -install_gslt.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +install_gslt.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -install_header.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +install_header.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -install_logs.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +install_logs.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -install_retry.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +install_retry.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -install_server_dir.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +install_server_dir.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -install_server_files.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +install_server_files.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -install_stats.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +install_stats.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -install_steamcmd.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +install_steamcmd.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -install_ts3.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +install_ts3.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -install_ts3db.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +install_ts3db.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -install_ut2k4.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +install_ut2k4.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -install_dl_ut2k4.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +install_dl_ut2k4.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } -install_ut2k4_key.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function +install_ut2k4_key.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function } # Calls code required for legacy servers diff --git a/lgsm/functions/core_getopt.sh b/lgsm/functions/core_getopt.sh index 9594fa5ae..0a5a39c09 100755 --- a/lgsm/functions/core_getopt.sh +++ b/lgsm/functions/core_getopt.sh @@ -10,158 +10,157 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" ### Define all commands here. ## User commands | Trigger commands | Description # Standard commands. -cmd_install=( "i;install" "command_install.sh" "Install the server." ) -cmd_auto_install=( "ai;auto-install" "fn_autoinstall" "Install the server without prompts." ) -cmd_start=( "st;start" "command_start.sh" "Start the server." ) -cmd_stop=( "sp;stop" "command_stop.sh" "Stop the server." ) -cmd_restart=( "r;restart" "command_restart.sh" "Restart the server." ) -cmd_details=( "dt;details" "command_details.sh" "Display server information." ) -cmd_postdetails=( "pd;postdetails" "command_postdetails.sh" "Post details to termbin.com (removing passwords)." ) -cmd_backup=( "b;backup" "command_backup.sh" "Create backup archives of the server." ) -cmd_update_linuxgsm=( "ul;update-lgsm;uf;update-functions" "command_update_linuxgsm.sh" "Check and apply any LinuxGSM updates." ) -cmd_test_alert=( "ta;test-alert" "command_test_alert.sh" "Send a test alert." ) -cmd_monitor=( "m;monitor" "command_monitor.sh" "Check server status and restart if crashed." ) -cmd_skeleton=( "sk;skeleton" "command_skeleton.sh" "Create a skeleton directory." ) -cmd_donate=( "do;donate" "command_donate.sh" "Donation options." ) -cmd_send=( "sd;send" "command_send.sh" "Send command to game server console." ) +cmd_install=("i;install" "command_install.sh" "Install the server.") +cmd_auto_install=("ai;auto-install" "fn_autoinstall" "Install the server without prompts.") +cmd_start=("st;start" "command_start.sh" "Start the server.") +cmd_stop=("sp;stop" "command_stop.sh" "Stop the server.") +cmd_restart=("r;restart" "command_restart.sh" "Restart the server.") +cmd_details=("dt;details" "command_details.sh" "Display server information.") +cmd_postdetails=("pd;postdetails" "command_postdetails.sh" "Post details to termbin.com (removing passwords).") +cmd_backup=("b;backup" "command_backup.sh" "Create backup archives of the server.") +cmd_update_linuxgsm=("ul;update-lgsm;uf;update-functions" "command_update_linuxgsm.sh" "Check and apply any LinuxGSM updates.") +cmd_test_alert=("ta;test-alert" "command_test_alert.sh" "Send a test alert.") +cmd_monitor=("m;monitor" "command_monitor.sh" "Check server status and restart if crashed.") +cmd_skeleton=("sk;skeleton" "command_skeleton.sh" "Create a skeleton directory.") +cmd_donate=("do;donate" "command_donate.sh" "Donation options.") +cmd_send=("sd;send" "command_send.sh" "Send command to game server console.") # Console servers only. -cmd_console=( "c;console" "command_console.sh" "Access server console." ) -cmd_debug=( "d;debug" "command_debug.sh" "Start server directly in your terminal." ) +cmd_console=("c;console" "command_console.sh" "Access server console.") +cmd_debug=("d;debug" "command_debug.sh" "Start server directly in your terminal.") # Update servers only. -cmd_update=( "u;update" "command_update.sh" "Check and apply any server updates." ) -cmd_check_update=( "cu;check-update" "command_check_update.sh" "Check if a gameserver update is available" ) -cmd_force_update=( "fu;force-update;update-restart;ur" "forceupdate=1; command_update.sh" "Apply server updates bypassing check." ) +cmd_update=("u;update" "command_update.sh" "Check and apply any server updates.") +cmd_check_update=("cu;check-update" "command_check_update.sh" "Check if a gameserver update is available") +cmd_force_update=("fu;force-update;update-restart;ur" "forceupdate=1; command_update.sh" "Apply server updates bypassing check.") # SteamCMD servers only. -cmd_validate=( "v;validate" "command_validate.sh" "Validate server files with SteamCMD." ) +cmd_validate=("v;validate" "command_validate.sh" "Validate server files with SteamCMD.") # Server with mods-install. -cmd_mods_install=( "mi;mods-install" "command_mods_install.sh" "View and install available mods/addons." ) -cmd_mods_remove=( "mr;mods-remove" "command_mods_remove.sh" "View and remove an installed mod/addon." ) -cmd_mods_update=( "mu;mods-update" "command_mods_update.sh" "Update installed mods/addons." ) +cmd_mods_install=("mi;mods-install" "command_mods_install.sh" "View and install available mods/addons.") +cmd_mods_remove=("mr;mods-remove" "command_mods_remove.sh" "View and remove an installed mod/addon.") +cmd_mods_update=("mu;mods-update" "command_mods_update.sh" "Update installed mods/addons.") # Server specific. -cmd_change_password=( "pw;change-password" "command_ts3_server_pass.sh" "Change TS3 serveradmin password." ) -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_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." ) -cmd_fastdl=( "fd;fastdl" "command_fastdl.sh" "Build a FastDL directory." ) +cmd_change_password=("pw;change-password" "command_ts3_server_pass.sh" "Change TS3 serveradmin password.") +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_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.") +cmd_fastdl=("fd;fastdl" "command_fastdl.sh" "Build a FastDL directory.") # Dev commands. -cmd_dev_debug=( "dev;developer" "command_dev_debug.sh" "Enable developer Mode." ) -cmd_dev_detect_deps=( "dd;detect-deps" "command_dev_detect_deps.sh" "Detect required dependencies." ) -cmd_dev_detect_glibc=( "dg;detect-glibc" "command_dev_detect_glibc.sh" "Detect required glibc." ) -cmd_dev_detect_ldd=( "dl;detect-ldd" "command_dev_detect_ldd.sh" "Detect required dynamic dependencies." ) -cmd_dev_query_raw=( "qr;query-raw" "command_dev_query_raw.sh" "The raw output of gamedig and gsquery." ) -cmd_dev_clear_functions=( "cf;clear-functions" "command_dev_clear_functions.sh" "Delete the contents of the functions dir." ) - +cmd_dev_debug=("dev;developer" "command_dev_debug.sh" "Enable developer Mode.") +cmd_dev_detect_deps=("dd;detect-deps" "command_dev_detect_deps.sh" "Detect required dependencies.") +cmd_dev_detect_glibc=("dg;detect-glibc" "command_dev_detect_glibc.sh" "Detect required glibc.") +cmd_dev_detect_ldd=("dl;detect-ldd" "command_dev_detect_ldd.sh" "Detect required dynamic dependencies.") +cmd_dev_query_raw=("qr;query-raw" "command_dev_query_raw.sh" "The raw output of gamedig and gsquery.") +cmd_dev_clear_functions=("cf;clear-functions" "command_dev_clear_functions.sh" "Delete the contents of the functions dir.") ### Set specific opt here. -currentopt=( "${cmd_start[@]}" "${cmd_stop[@]}" "${cmd_restart[@]}" "${cmd_monitor[@]}" "${cmd_test_alert[@]}" "${cmd_details[@]}" "${cmd_postdetails[@]}" "${cmd_skeleton[@]}" ) +currentopt=("${cmd_start[@]}" "${cmd_stop[@]}" "${cmd_restart[@]}" "${cmd_monitor[@]}" "${cmd_test_alert[@]}" "${cmd_details[@]}" "${cmd_postdetails[@]}" "${cmd_skeleton[@]}") # Update LinuxGSM. -currentopt+=( "${cmd_update_linuxgsm[@]}" ) +currentopt+=("${cmd_update_linuxgsm[@]}") # Exclude noupdate games here. -if [ "${shortname}" == "jk2" ]||[ "${engine}" != "idtech3" ];then - if [ "${shortname}" != "bf1942" ]&&[ "${shortname}" != "bfv" ]&&[ "${engine}" != "idtech2" ]&&[ "${engine}" != "iw2.0" ]&&[ "${engine}" != "iw3.0" ]&&[ "${engine}" != "quake" ]&&[ "${shortname}" != "samp" ]&&[ "${shortname}" != "ut2k4" ]&&[ "${shortname}" != "ut99" ]; then - currentopt+=( "${cmd_update[@]}" ) +if [ "${shortname}" == "jk2" ] || [ "${engine}" != "idtech3" ]; then + if [ "${shortname}" != "bf1942" ] && [ "${shortname}" != "bfv" ] && [ "${engine}" != "idtech2" ] && [ "${engine}" != "iw2.0" ] && [ "${engine}" != "iw3.0" ] && [ "${engine}" != "quake" ] && [ "${shortname}" != "samp" ] && [ "${shortname}" != "ut2k4" ] && [ "${shortname}" != "ut99" ]; then + currentopt+=("${cmd_update[@]}") # force update for SteamCMD or Multi Theft Auto only. - if [ "${appid}" ]||[ "${shortname}" == "mta" ]; then - currentopt+=( "${cmd_force_update[@]}" ) + if [ "${appid}" ] || [ "${shortname}" == "mta" ]; then + currentopt+=("${cmd_force_update[@]}") fi fi fi # Validate and check-update command. if [ "${appid}" ]; then - currentopt+=( "${cmd_validate[@]}" "${cmd_check_update[@]}" ) + currentopt+=("${cmd_validate[@]}" "${cmd_check_update[@]}") fi # Backup. -currentopt+=( "${cmd_backup[@]}" ) +currentopt+=("${cmd_backup[@]}") # Console & Debug. -currentopt+=( "${cmd_console[@]}" "${cmd_debug[@]}" ) +currentopt+=("${cmd_console[@]}" "${cmd_debug[@]}") # Console send. if [ "${consoleinteract}" == "yes" ]; then - currentopt+=( "${cmd_send[@]}" ) + currentopt+=("${cmd_send[@]}") fi ## Game server exclusive commands. # FastDL command. if [ "${engine}" == "source" ]; then - currentopt+=( "${cmd_fastdl[@]}" ) + currentopt+=("${cmd_fastdl[@]}") fi # TeamSpeak exclusive. if [ "${shortname}" == "ts3" ]; then - currentopt+=( "${cmd_change_password[@]}" ) + currentopt+=("${cmd_change_password[@]}") fi # Unreal exclusive. if [ "${shortname}" == "rust" ]; then - currentopt+=( "${cmd_fullwipe[@]}" "${cmd_mapwipe[@]}" ) + currentopt+=("${cmd_fullwipe[@]}" "${cmd_mapwipe[@]}") fi if [ "${engine}" == "unreal2" ]; then if [ "${shortname}" == "ut2k4" ]; then - currentopt+=( "${cmd_install_cdkey[@]}" "${cmd_map_compressor_u2[@]}" ) + currentopt+=("${cmd_install_cdkey[@]}" "${cmd_map_compressor_u2[@]}") else - currentopt+=( "${cmd_map_compressor_u2[@]}" ) + currentopt+=("${cmd_map_compressor_u2[@]}") fi fi if [ "${engine}" == "unreal" ]; then - currentopt+=( "${cmd_map_compressor_u99[@]}" ) + currentopt+=("${cmd_map_compressor_u99[@]}") fi # DST exclusive. if [ "${shortname}" == "dst" ]; then - currentopt+=( "${cmd_install_dst_token[@]}" ) + currentopt+=("${cmd_install_dst_token[@]}") fi # MTA exclusive. if [ "${shortname}" == "mta" ]; then - currentopt+=( "${cmd_install_default_resources[@]}" ) + currentopt+=("${cmd_install_default_resources[@]}") fi # Squad license exclusive. if [ "${shortname}" == "squad" ]; then - currentopt+=( "${cmd_install_squad_license[@]}" ) + currentopt+=("${cmd_install_squad_license[@]}") fi ## Mods commands. -if [ "${engine}" == "source" ]||[ "${shortname}" == "rust" ]||[ "${shortname}" == "hq" ]||[ "${shortname}" == "sdtd" ]||[ "${shortname}" == "cs" ]||[ "${shortname}" == "dod" ]||[ "${shortname}" == "tfc" ]||[ "${shortname}" == "ns" ]||[ "${shortname}" == "ts" ]||[ "${shortname}" == "hldm" ]||[ "${shortname}" == "vh" ]; then - currentopt+=( "${cmd_mods_install[@]}" "${cmd_mods_remove[@]}" "${cmd_mods_update[@]}" ) +if [ "${engine}" == "source" ] || [ "${shortname}" == "rust" ] || [ "${shortname}" == "hq" ] || [ "${shortname}" == "sdtd" ] || [ "${shortname}" == "cs" ] || [ "${shortname}" == "dod" ] || [ "${shortname}" == "tfc" ] || [ "${shortname}" == "ns" ] || [ "${shortname}" == "ts" ] || [ "${shortname}" == "hldm" ] || [ "${shortname}" == "vh" ]; then + currentopt+=("${cmd_mods_install[@]}" "${cmd_mods_remove[@]}" "${cmd_mods_update[@]}") fi ## Installer. -currentopt+=( "${cmd_install[@]}" "${cmd_auto_install[@]}" ) +currentopt+=("${cmd_install[@]}" "${cmd_auto_install[@]}") ## Developer commands. -currentopt+=( "${cmd_dev_debug[@]}" ) +currentopt+=("${cmd_dev_debug[@]}") if [ -f ".dev-debug" ]; then - currentopt+=( "${cmd_dev_detect_deps[@]}" "${cmd_dev_detect_glibc[@]}" "${cmd_dev_detect_ldd[@]}" "${cmd_dev_query_raw[@]}" "${cmd_dev_clear_functions[@]}" ) + currentopt+=("${cmd_dev_detect_deps[@]}" "${cmd_dev_detect_glibc[@]}" "${cmd_dev_detect_ldd[@]}" "${cmd_dev_query_raw[@]}" "${cmd_dev_clear_functions[@]}") fi ## Donate. -currentopt+=( "${cmd_donate[@]}" ) +currentopt+=("${cmd_donate[@]}") ### Build list of available commands. optcommands=() index="0" -for ((index="0"; index < ${#currentopt[@]}; index+=3)); do +for ((index = "0"; index < ${#currentopt[@]}; index += 3)); do cmdamount=$(echo -e "${currentopt[index]}" | awk -F ';' '{ print NF }') - for ((cmdindex=1; cmdindex <= cmdamount; cmdindex++)); do - optcommands+=( "$(echo -e "${currentopt[index]}" | awk -F ';' -v x=${cmdindex} '{ print $x }')" ) + for ((cmdindex = 1; cmdindex <= cmdamount; cmdindex++)); do + optcommands+=("$(echo -e "${currentopt[index]}" | awk -F ';' -v x=${cmdindex} '{ print $x }')") done done # Shows LinuxGSM usage. -fn_opt_usage(){ +fn_opt_usage() { echo -e "Usage: $0 [option]" echo -e "" echo -e "LinuxGSM - ${gamename} - Version ${version}" @@ -171,12 +170,12 @@ fn_opt_usage(){ # Display available commands. index="0" { - for ((index="0"; index < ${#currentopt[@]}; index+=3)); do - # Hide developer commands. - if [ "${currentopt[index+2]}" != "DEVCOMMAND" ]; then - echo -e "${cyan}$(echo -e "${currentopt[index]}" | awk -F ';' '{ print $2 }')\t${default}$(echo -e "${currentopt[index]}" | awk -F ';' '{ print $1 }')\t| ${currentopt[index+2]}" - fi - done + for ((index = "0"; index < ${#currentopt[@]}; index += 3)); do + # Hide developer commands. + if [ "${currentopt[index + 2]}" != "DEVCOMMAND" ]; then + echo -e "${cyan}$(echo -e "${currentopt[index]}" | awk -F ';' '{ print $2 }')\t${default}$(echo -e "${currentopt[index]}" | awk -F ';' '{ print $1 }')\t| ${currentopt[index + 2]}" + fi + done } | column -s $'\t' -t fn_script_log_pass "Display commands" core_exit.sh @@ -188,15 +187,15 @@ if [ -z "${getopt}" ]; then fi # If command exists. for i in "${optcommands[@]}"; do - if [ "${i}" == "${getopt}" ] ; then + if [ "${i}" == "${getopt}" ]; then # Seek and run command. index="0" - for ((index="0"; index < ${#currentopt[@]}; index+=3)); do + for ((index = "0"; index < ${#currentopt[@]}; index += 3)); do currcmdamount=$(echo -e "${currentopt[index]}" | awk -F ';' '{ print NF }') - for ((currcmdindex=1; currcmdindex <= currcmdamount; currcmdindex++)); do + for ((currcmdindex = 1; currcmdindex <= currcmdamount; currcmdindex++)); do if [ "$(echo -e "${currentopt[index]}" | awk -F ';' -v x=${currcmdindex} '{ print $x }')" == "${getopt}" ]; then # Run command. - eval "${currentopt[index+1]}" + eval "${currentopt[index + 1]}" # Exit should occur in modules. Should this not happen print an error fn_print_error2_nl "Command did not exit correctly: ${getopt}" fn_script_log_error "Command did not exit correctly: ${getopt}" diff --git a/lgsm/functions/core_github.sh b/lgsm/functions/core_github.sh index 5bd4bd730..0462e65bf 100644 --- a/lgsm/functions/core_github.sh +++ b/lgsm/functions/core_github.sh @@ -9,7 +9,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" github_api="https://api.github.com" -fn_githublocalversionfile(){ +fn_githublocalversionfile() { local githubreleaseuser="${1}" local githubreleaserepo="${2}" @@ -18,12 +18,12 @@ fn_githublocalversionfile(){ # $1 githubuser/group # $2 github repo name -fn_github_get_latest_release_version(){ +fn_github_get_latest_release_version() { local githubreleaseuser="${1}" local githubreleaserepo="${2}" local githublatestreleaseurl="${github_api}/repos/${githubreleaseuser}/${githubreleaserepo}/releases/latest" - githubreleaseversion=$(curl -s --connect-timeout 10 "${githublatestreleaseurl}" | jq '.tag_name' ) + githubreleaseversion=$(curl -s --connect-timeout 10 "${githublatestreleaseurl}" | jq '.tag_name') # error if no version is there if [ -z "${githubreleaseversion}" ]; then @@ -34,14 +34,14 @@ fn_github_get_latest_release_version(){ # $1 githubuser/group # $2 github repo name -fn_github_set_latest_release_version(){ +fn_github_set_latest_release_version() { local githubreleaseuser="${1}" local githubreleaserepo="${2}" fn_githublocalversionfile "${githubreleaseuser}" "${githubreleaserepo}" local githublatestreleaseurl="${github_api}/repos/${githubreleaseuser}/${githubreleaserepo}/releases/latest" - githubreleaseversion=$(curl -s "${githublatestreleaseurl}" | jq -r '.tag_name' ) + githubreleaseversion=$(curl -s "${githublatestreleaseurl}" | jq -r '.tag_name') # error if no version is there if [ -z "${githubreleaseversion}" ]; then @@ -54,7 +54,7 @@ fn_github_set_latest_release_version(){ # $1 githubuser/group # $2 github repo name -fn_github_get_installed_version(){ +fn_github_get_installed_version() { local githubreleaseuser="${1}" local githubreleaserepo="${2}" @@ -66,7 +66,7 @@ fn_github_get_installed_version(){ # $1 githubuser/group # $2 github repo name # if a update needs to be downloaded - updateneeded is set to 1 -fn_github_compare_version(){ +fn_github_compare_version() { local githubreleaseuser="${1}" local githubreleaserepo="${2}" exitcode=0 @@ -76,7 +76,7 @@ fn_github_compare_version(){ local githublatestreleaseurl="${github_api}/repos/${githubreleaseuser}/${githubreleaserepo}/releases/latest" githublocalversion=$(cat "${githublocalversionfile}") - githubreleaseversion=$(curl -s "${githublatestreleaseurl}" | jq '.tag_name' ) + githubreleaseversion=$(curl -s "${githublatestreleaseurl}" | jq '.tag_name') # error if no version is there if [ -z "${githubreleaseversion}" ]; then @@ -91,7 +91,7 @@ fn_github_compare_version(){ echo -en "\n" else # check if version that is installed is higher than the remote version to not override it - last_version=$(echo -e "${githublocalversion}\n${githubreleaseversion}" | sort -V | head -n1 ) + last_version=$(echo -e "${githublocalversion}\n${githubreleaseversion}" | sort -V | head -n1) if [ "${githubreleaseversion}" == "${last_version}" ]; then echo -en "\n" echo -e "Update from github.com/${githubreleaseuser}/${githubreleaserepo}/ available:" diff --git a/lgsm/functions/core_legacy.sh b/lgsm/functions/core_legacy.sh index 811acfbba..f9aa51455 100755 --- a/lgsm/functions/core_legacy.sh +++ b/lgsm/functions/core_legacy.sh @@ -8,7 +8,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # This is to help the transition to v20.3.0 and above -legacy_versions_array=( v20.2.1 v20.2.0 v20.1.5 v20.1.4 v20.1.3 v20.1.2 v20.1.1 v20.1.0 v19.12.5 v19.12.4 v19.12.3 v19.12.2 v19.12.1 v19.12.0 ) +legacy_versions_array=(v20.2.1 v20.2.0 v20.1.5 v20.1.4 v20.1.3 v20.1.2 v20.1.1 v20.1.0 v19.12.5 v19.12.4 v19.12.3 v19.12.2 v19.12.1 v19.12.0) for legacy_version in "${legacy_versions_array[@]}"; do if [ "${version}" == "${legacy_version}" ]; then legacymode=1 @@ -78,7 +78,7 @@ if [ -z "${wsstartmap}" ]; then fi fi -fn_parms(){ +fn_parms() { fn_reload_startparameters parms="${startparameters}" } diff --git a/lgsm/functions/core_logs.sh b/lgsm/functions/core_logs.sh index b999cb347..1f0e27540 100755 --- a/lgsm/functions/core_logs.sh +++ b/lgsm/functions/core_logs.sh @@ -16,7 +16,7 @@ fi # For games not displaying a console, and having logs into their game directory. check_status.sh -if [ "${status}" != "0" ]&&[ "${commandname}" == "START" ]&&[ -n "${gamelogfile}" ]; then +if [ "${status}" != "0" ] && [ "${commandname}" == "START" ] && [ -n "${gamelogfile}" ]; then if [ "$(find "${systemdir}" -name "gamelog*.log")" ]; then fn_print_info "Moving game logs to ${gamelogdir}" fn_script_log_info "Moving game logs to ${gamelogdir}" @@ -38,7 +38,14 @@ if [ "$(find "${lgsmlogdir}"/ -type f -mtime +"${logdays}" | wc -l)" -ne "0" ]; darkrplogdir="${systemdir}/data/darkrp_logs" legacyserverlogdir="${logdir}/server" # Setting up counting variables - scriptcount="0" ; consolecount="0" ; gamecount="0" ; srcdscount="0" ; smcount="0" ; ulxcount="0" ; darkrpcount="0" ; legacycount="0" + scriptcount="0" + consolecount="0" + gamecount="0" + srcdscount="0" + smcount="0" + ulxcount="0" + darkrpcount="0" + legacycount="0" fn_sleep_time fn_print_info "Removing logs older than ${logdays} days" fn_script_log_info "Removing logs older than ${logdays} days" @@ -48,7 +55,7 @@ if [ "$(find "${lgsmlogdir}"/ -type f -mtime +"${logdays}" | wc -l)" -ne "0" ]; scriptcount=$(find "${lgsmlogdir}"/ -type f -mtime +"${logdays}" | wc -l) find "${lgsmlogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \; # SRCDS and unreal logfiles. - if [ "${engine}" == "unreal2" ]||[ "${engine}" == "source" ]; then + if [ "${engine}" == "unreal2" ] || [ "${engine}" == "source" ]; then find "${gamelogdir}"/ -type f -mtime +"${logdays}" | tee >> "${lgsmlog}" gamecount=$(find "${gamelogdir}"/ -type f -mtime +"${logdays}" | wc -l) find "${gamelogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \; diff --git a/lgsm/functions/core_messages.sh b/lgsm/functions/core_messages.sh index 463f833c2..5362dd3d3 100755 --- a/lgsm/functions/core_messages.sh +++ b/lgsm/functions/core_messages.sh @@ -9,7 +9,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # nl: new line: message is following by a new line. # eol: end of line: message is placed at the end of the current line. -fn_ansi_loader(){ +fn_ansi_loader() { if [ "${ansi}" != "off" ]; then # echo colors default="\e[0m" @@ -34,8 +34,8 @@ fn_ansi_loader(){ creeol="\r\033[K" } -fn_sleep_time(){ - if [ "${sleeptime}" != "0" ]||[ "${travistest}" != "1" ]; then +fn_sleep_time() { + if [ "${sleeptime}" != "0" ] || [ "${travistest}" != "1" ]; then if [ -z "${sleeptime}" ]; then sleeptime=0.5 fi @@ -46,7 +46,7 @@ fn_sleep_time(){ # Log display ######################## ## Feb 28 14:56:58 ut99-server: Monitor: -fn_script_log(){ +fn_script_log() { if [ -d "${lgsmlogdir}" ]; then if [ -n "${commandname}" ]; then echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: ${1}" >> "${lgsmlog}" @@ -57,7 +57,7 @@ fn_script_log(){ } ## Feb 28 14:56:58 ut99-server: Monitor: PASS: -fn_script_log_pass(){ +fn_script_log_pass() { if [ -d "${lgsmlogdir}" ]; then if [ -n "${commandname}" ]; then @@ -70,7 +70,7 @@ fn_script_log_pass(){ } ## Feb 28 14:56:58 ut99-server: Monitor: FATAL: -fn_script_log_fatal(){ +fn_script_log_fatal() { if [ -d "${lgsmlogdir}" ]; then if [ -n "${commandname}" ]; then echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: FATAL: ${1}" >> "${lgsmlog}" @@ -82,7 +82,7 @@ fn_script_log_fatal(){ } ## Feb 28 14:56:58 ut99-server: Monitor: ERROR: -fn_script_log_error(){ +fn_script_log_error() { if [ -d "${lgsmlogdir}" ]; then if [ -n "${commandname}" ]; then echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: ERROR: ${1}" >> "${lgsmlog}" @@ -94,7 +94,7 @@ fn_script_log_error(){ } ## Feb 28 14:56:58 ut99-server: Monitor: WARN: -fn_script_log_warn(){ +fn_script_log_warn() { if [ -d "${lgsmlogdir}" ]; then if [ -n "${commandname}" ]; then echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: WARN: ${1}" >> "${lgsmlog}" @@ -106,7 +106,7 @@ fn_script_log_warn(){ } ## Feb 28 14:56:58 ut99-server: Monitor: INFO: -fn_script_log_info(){ +fn_script_log_info() { if [ -d "${lgsmlogdir}" ]; then if [ -n "${commandname}" ]; then echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: INFO: ${1}" >> "${lgsmlog}" @@ -117,7 +117,7 @@ fn_script_log_info(){ } ## Feb 28 14:56:58 ut99-server: Monitor: UPDATE: -fn_script_log_update(){ +fn_script_log_update() { if [ -d "${lgsmlogdir}" ]; then if [ -n "${commandname}" ]; then echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: UPDATE: ${1}" >> "${lgsmlog}" @@ -131,7 +131,7 @@ fn_script_log_update(){ ################################## # [ .... ] -fn_print_dots(){ +fn_print_dots() { if [ "${commandaction}" ]; then echo -en "${creeol}[ .... ] ${commandaction} ${selfname}: $*" else @@ -140,7 +140,7 @@ fn_print_dots(){ fn_sleep_time } -fn_print_dots_nl(){ +fn_print_dots_nl() { if [ "${commandaction}" ]; then echo -e "${creeol}[ .... ] ${commandaction} ${selfname}: $*" else @@ -151,7 +151,7 @@ fn_print_dots_nl(){ } # [ OK ] -fn_print_ok(){ +fn_print_ok() { if [ "${commandaction}" ]; then echo -en "${creeol}[${green} OK ${default}] ${commandaction} ${selfname}: $*" else @@ -160,7 +160,7 @@ fn_print_ok(){ fn_sleep_time } -fn_print_ok_nl(){ +fn_print_ok_nl() { if [ "${commandaction}" ]; then echo -en "${creeol}[${green} OK ${default}] ${commandaction} ${selfname}: $*" else @@ -171,7 +171,7 @@ fn_print_ok_nl(){ } # [ FAIL ] -fn_print_fail(){ +fn_print_fail() { if [ "${commandaction}" ]; then echo -en "${creeol}[${red} FAIL ${default}] ${commandaction} ${selfname}: $*" else @@ -180,7 +180,7 @@ fn_print_fail(){ fn_sleep_time } -fn_print_fail_nl(){ +fn_print_fail_nl() { if [ "${commandaction}" ]; then echo -en "${creeol}[${red} FAIL ${default}] ${commandaction} ${selfname}: $*" else @@ -191,7 +191,7 @@ fn_print_fail_nl(){ } # [ ERROR ] -fn_print_error(){ +fn_print_error() { if [ "${commandaction}" ]; then echo -en "${creeol}[${red} ERROR ${default}] ${commandaction} ${selfname}: $*" else @@ -200,7 +200,7 @@ fn_print_error(){ fn_sleep_time } -fn_print_error_nl(){ +fn_print_error_nl() { if [ "${commandaction}" ]; then echo -en "${creeol}[${red} ERROR ${default}] ${commandaction} ${selfname}: $*" else @@ -211,7 +211,7 @@ fn_print_error_nl(){ } # [ WARN ] -fn_print_warn(){ +fn_print_warn() { if [ "${commandaction}" ]; then echo -en "${creeol}[${lightyellow} WARN ${default}] ${commandaction} ${selfname}: $*" else @@ -220,7 +220,7 @@ fn_print_warn(){ fn_sleep_time } -fn_print_warn_nl(){ +fn_print_warn_nl() { if [ "${commandaction}" ]; then echo -en "${creeol}[${lightyellow} WARN ${default}] ${commandaction} ${selfname}: $*" else @@ -231,7 +231,7 @@ fn_print_warn_nl(){ } # [ INFO ] -fn_print_info(){ +fn_print_info() { if [ "${commandaction}" ]; then echo -en "${creeol}[${cyan} INFO ${default}] ${commandaction} ${selfname}: $*" else @@ -240,7 +240,7 @@ fn_print_info(){ fn_sleep_time } -fn_print_info_nl(){ +fn_print_info_nl() { if [ "${commandaction}" ]; then echo -en "${creeol}[${cyan} INFO ${default}] ${commandaction} ${selfname}: $*" else @@ -251,7 +251,7 @@ fn_print_info_nl(){ } # [ START ] -fn_print_start(){ +fn_print_start() { if [ "${commandaction}" ]; then echo -en "${creeol}[${lightgreen} START ${default}] ${commandaction} ${selfname}: $*" else @@ -260,7 +260,7 @@ fn_print_start(){ fn_sleep_time } -fn_print_start_nl(){ +fn_print_start_nl() { if [ "${commandaction}" ]; then echo -en "${creeol}[${lightgreen} START ${default}] ${commandaction} ${selfname}: $*" else @@ -275,69 +275,69 @@ fn_print_start_nl(){ # No More Room in Hell Debug # ================================= -fn_print_header(){ +fn_print_header() { echo -e "" echo -e "${lightyellow}${gamename} ${commandaction}${default}" echo -e "=================================${default}" } # Complete! -fn_print_complete(){ +fn_print_complete() { echo -en "${green}Complete!${default} $*" fn_sleep_time } -fn_print_complete_nl(){ +fn_print_complete_nl() { echo -e "${green}Complete!${default} $*" fn_sleep_time } # Failure! -fn_print_failure(){ +fn_print_failure() { echo -en "${red}Failure!${default} $*" fn_sleep_time } -fn_print_failure_nl(){ +fn_print_failure_nl() { echo -e "${red}Failure!${default} $*" fn_sleep_time } # Error! -fn_print_error2(){ +fn_print_error2() { echo -en "${red}Error!${default} $*" fn_sleep_time } -fn_print_error2_nl(){ +fn_print_error2_nl() { echo -e "${red}Error!${default} $*" fn_sleep_time } # Warning! -fn_print_warning(){ +fn_print_warning() { echo -en "${lightyellow}Warning!${default} $*" fn_sleep_time } -fn_print_warning_nl(){ +fn_print_warning_nl() { echo -e "${lightyellow}Warning!${default} $*" fn_sleep_time } # Information! -fn_print_information(){ +fn_print_information() { echo -en "${cyan}Information!${default} $*" fn_sleep_time } -fn_print_information_nl(){ +fn_print_information_nl() { echo -e "${cyan}Information!${default} $*" fn_sleep_time } # Y/N Prompt -fn_prompt_yn(){ +fn_prompt_yn() { local prompt="$1" local initial="$2" @@ -350,23 +350,23 @@ fn_prompt_yn(){ fi while true; do - read -e -i "${initial}" -p "${prompt}" -r yn + read -e -i "${initial}" -p "${prompt}" -r yn case "${yn}" in - [Yy]|[Yy][Ee][Ss]) return 0 ;; - [Nn]|[Nn][Oo]) return 1 ;; - *) echo -e "Please answer yes or no." ;; + [Yy] | [Yy][Ee][Ss]) return 0 ;; + [Nn] | [Nn][Oo]) return 1 ;; + *) echo -e "Please answer yes or no." ;; esac done } # Prompt for message -fn_prompt_message(){ +fn_prompt_message() { while true; do unset prompt local prompt="$1" - read -e -p "${prompt}" -r answer + read -e -p "${prompt}" -r answer if fn_prompt_yn "Continue" Y; then - break; + break fi done echo "${answer}" @@ -376,160 +376,160 @@ fn_prompt_message(){ ################################## # YES -fn_print_yes_eol(){ +fn_print_yes_eol() { echo -en "${cyan}YES${default}" fn_sleep_time } -fn_print_yes_eol_nl(){ +fn_print_yes_eol_nl() { echo -e "${cyan}YES${default}" fn_sleep_time } # NO -fn_print_no_eol(){ +fn_print_no_eol() { echo -en "${red}NO${default}" fn_sleep_time } -fn_print_no_eol_nl(){ +fn_print_no_eol_nl() { echo -e "${red}NO${default}" fn_sleep_time } # OK -fn_print_ok_eol(){ +fn_print_ok_eol() { echo -en "${green}OK${default}" fn_sleep_time } -fn_print_ok_eol_nl(){ +fn_print_ok_eol_nl() { echo -e "${green}OK${default}" fn_sleep_time } # FAIL -fn_print_fail_eol(){ +fn_print_fail_eol() { echo -en "${red}FAIL${default}" fn_sleep_time } -fn_print_fail_eol_nl(){ +fn_print_fail_eol_nl() { echo -e "${red}FAIL${default}" fn_sleep_time } # ERROR -fn_print_error_eol(){ +fn_print_error_eol() { echo -en "${red}ERROR${default}" fn_sleep_time } -fn_print_error_eol_nl(){ +fn_print_error_eol_nl() { echo -e "${red}ERROR${default}" fn_sleep_time } # WAIT -fn_print_wait_eol(){ +fn_print_wait_eol() { echo -en "${cyan}WAIT${default}" fn_sleep_time } -fn_print_wait_eol_nl(){ +fn_print_wait_eol_nl() { echo -e "${cyan}WAIT${default}" fn_sleep_time } # WARN -fn_print_warn_eol(){ +fn_print_warn_eol() { echo -en "${lightyellow}WARN${default}" fn_sleep_time } -fn_print_warn_eol_nl(){ +fn_print_warn_eol_nl() { echo -e "${lightyellow}WARN${default}" fn_sleep_time } # INFO -fn_print_info_eol(){ +fn_print_info_eol() { echo -en "${cyan}INFO${default}" fn_sleep_time } -fn_print_info_eol_nl(){ +fn_print_info_eol_nl() { echo -e "${cyan}INFO${default}" fn_sleep_time } # QUERYING -fn_print_querying_eol(){ +fn_print_querying_eol() { echo -en "${cyan}QUERYING${default}" fn_sleep_time } -fn_print_querying_eol_nl(){ +fn_print_querying_eol_nl() { echo -e "${cyan}QUERYING${default}" fn_sleep_time } # CHECKING -fn_print_checking_eol(){ +fn_print_checking_eol() { echo -en "${cyan}CHECKING${default}" fn_sleep_time } -fn_print_checking_eol_nl(){ +fn_print_checking_eol_nl() { echo -e "${cyan}CHECKING${default}" fn_sleep_time } # DELAY -fn_print_delay_eol(){ +fn_print_delay_eol() { echo -en "${green}DELAY${default}" fn_sleep_time } -fn_print_delay_eol_nl(){ +fn_print_delay_eol_nl() { echo -e "${green}DELAY${default}" fn_sleep_time } # CANCELED -fn_print_canceled_eol(){ +fn_print_canceled_eol() { echo -en "${lightyellow}CANCELED${default}" fn_sleep_time } -fn_print_canceled_eol_nl(){ +fn_print_canceled_eol_nl() { echo -e "${lightyellow}CANCELED${default}" fn_sleep_time } # REMOVED -fn_print_removed_eol(){ +fn_print_removed_eol() { echo -en "${red}REMOVED${default}" fn_sleep_time } -fn_print_removed_eol_nl(){ +fn_print_removed_eol_nl() { echo -e "${red}REMOVED${default}" fn_sleep_time } # UPDATE -fn_print_update_eol(){ +fn_print_update_eol() { echo -en "${cyan}UPDATE${default}" fn_sleep_time } -fn_print_update_eol_nl(){ +fn_print_update_eol_nl() { echo -e "${cyan}UPDATE${default}" fn_sleep_time } -fn_print_ascii_logo(){ +fn_print_ascii_logo() { echo -e "" echo -e " mdMMMMbm" echo -e " mMMMMMMMMMMm" @@ -565,7 +565,7 @@ fn_print_ascii_logo(){ echo -e "" } -fn_print_restart_warning(){ +fn_print_restart_warning() { fn_print_warn "${selfname} will be restarted" fn_script_log_warn "${selfname} will be restarted" totalseconds=3 @@ -584,7 +584,7 @@ fn_print_restart_warning(){ # Useful when a command has to call upon another command causing the other command to overrite commandname variables # Used to remember the command that ran first. -fn_firstcommand_set(){ +fn_firstcommand_set() { if [ -z "${firstcommandname}" ]; then firstcommandname="${commandname}" firstcommandaction="${commandaction}" @@ -592,7 +592,7 @@ fn_firstcommand_set(){ } # Used to reset commandname variables to the command the script ran first. -fn_firstcommand_reset(){ +fn_firstcommand_reset() { commandname="${firstcommandname}" commandaction="${firstcommandaction}" } diff --git a/lgsm/functions/core_steamcmd.sh b/lgsm/functions/core_steamcmd.sh index 5fbd5db9f..92c14136a 100755 --- a/lgsm/functions/core_steamcmd.sh +++ b/lgsm/functions/core_steamcmd.sh @@ -7,8 +7,8 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_install_steamcmd(){ - if [ "${shortname}" == "ark" ]&&[ "${installsteamcmd}" == "1" ]; then +fn_install_steamcmd() { + if [ "${shortname}" == "ark" ] && [ "${installsteamcmd}" == "1" ]; then steamcmddir="${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux" fi if [ ! -d "${steamcmddir}" ]; then @@ -19,7 +19,7 @@ fn_install_steamcmd(){ chmod +x "${steamcmddir}/steamcmd.sh" } -fn_check_steamcmd_user(){ +fn_check_steamcmd_user() { # Checks if steamuser is setup. if [ "${steamuser}" == "username" ]; then fn_print_fail_nl "Steam login not set. Update steamuser in ${configdirserver}" @@ -39,10 +39,10 @@ fn_check_steamcmd_user(){ fi } -fn_check_steamcmd(){ +fn_check_steamcmd() { # Checks if SteamCMD exists when starting or updating a server. # Only install if steamcmd package is missing or steamcmd dir is missing. - if [ ! -f "${steamcmddir}/steamcmd.sh" ]&&[ -z "$(command -v steamcmd 2>/dev/null)" ]; then + if [ ! -f "${steamcmddir}/steamcmd.sh" ] && [ -z "$(command -v steamcmd 2> /dev/null)" ]; then if [ "${commandname}" == "INSTALL" ]; then fn_install_steamcmd else @@ -56,7 +56,7 @@ fn_check_steamcmd(){ fi } -fn_check_steamcmd_dir(){ +fn_check_steamcmd_dir() { # Worksround that pre-installs the correct steam directories to ensure all packages use the correct Standard. # https://github.com/ValveSoftware/steam-for-linux/issues/6976#issuecomment-610446347 @@ -86,25 +86,25 @@ fn_check_steamcmd_dir(){ fi } -fn_check_steamcmd_dir_legacy(){ +fn_check_steamcmd_dir_legacy() { # Remove old Steam installation directories ~/Steam and ${rootdir}/steamcmd - if [ -d "${rootdir}/steamcmd" ]&&[ "${steamcmddir}" == "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" ]; then + if [ -d "${rootdir}/steamcmd" ] && [ "${steamcmddir}" == "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" ]; then rm -rf "${rootdir:?}/steamcmd" fi - if [ -d "${HOME}/Steam" ]&&[ "${steamcmddir}" == "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" ]; then + if [ -d "${HOME}/Steam" ] && [ "${steamcmddir}" == "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" ]; then rm -rf "${HOME}/Steam" fi } -fn_check_steamcmd_steamapp(){ +fn_check_steamcmd_steamapp() { # Check that steamapp directory fixes issue #3481 if [ ! -d "${serverfiles}/steamapps" ]; then mkdir -p "${serverfiles}/steamapps" fi } -fn_check_steamcmd_ark(){ +fn_check_steamcmd_ark() { # Checks if SteamCMD exists in # Engine/Binaries/ThirdParty/SteamCMD/Linux # to allow ark mods to work @@ -123,9 +123,9 @@ fn_check_steamcmd_ark(){ fi } -fn_check_steamcmd_clear(){ +fn_check_steamcmd_clear() { # Will remove steamcmd dir if steamcmd package is installed. - if [ "$(command -v steamcmd 2>/dev/null)" ]&&[ -d "${rootdir}/steamcmd" ]; then + if [ "$(command -v steamcmd 2> /dev/null)" ] && [ -d "${rootdir}/steamcmd" ]; then rm -rf "${steamcmddir:?}" exitcode=$? if [ "${exitcode}" != 0 ]; then @@ -136,15 +136,15 @@ fn_check_steamcmd_clear(){ fi } -fn_check_steamcmd_exec(){ - if [ "$(command -v steamcmd 2>/dev/null)" ]; then +fn_check_steamcmd_exec() { + if [ "$(command -v steamcmd 2> /dev/null)" ]; then steamcmdcommand="steamcmd" else steamcmdcommand="./steamcmd.sh" fi } -fn_update_steamcmd_localbuild(){ +fn_update_steamcmd_localbuild() { # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" fn_appmanifest_check @@ -157,7 +157,7 @@ fn_update_steamcmd_localbuild(){ fi # Checks if localbuild variable has been set. - if [ -z "${localbuild}" ]||[ "${localbuild}" == "null" ]; then + if [ -z "${localbuild}" ] || [ "${localbuild}" == "null" ]; then fn_print_fail "Checking local build: ${remotelocation}" fn_script_log_fatal "Checking local build" core_exit.sh @@ -167,7 +167,7 @@ fn_update_steamcmd_localbuild(){ fi } -fn_update_steamcmd_remotebuild(){ +fn_update_steamcmd_remotebuild() { # Gets remote build info. if [ -d "${steamcmddir}" ]; then cd "${steamcmddir}" || exit @@ -184,7 +184,7 @@ fn_update_steamcmd_remotebuild(){ if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" fn_script_log_fatal "Checking remote build" core_exit.sh @@ -194,7 +194,7 @@ fn_update_steamcmd_remotebuild(){ fi else # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_failure "Unable to get remote build" fn_script_log_fatal "Unable to get remote build" core_exit.sh @@ -202,7 +202,7 @@ fn_update_steamcmd_remotebuild(){ fi } -fn_update_steamcmd_compare(){ +fn_update_steamcmd_compare() { fn_print_dots "Checking for update: ${remotelocation}" if [ "${localbuild}" != "${remotebuild}" ]; then fn_print_ok_nl "Checking for update: ${remotelocation}" @@ -280,12 +280,12 @@ fn_update_steamcmd_compare(){ fi } -fn_appmanifest_info(){ +fn_appmanifest_info() { appmanifestfile=$(find "${serverfiles}" -type f -name "appmanifest_${appid}.acf") appmanifestfilewc=$(find "${serverfiles}" -type f -name "appmanifest_${appid}.acf" | wc -l) } -fn_appmanifest_check(){ +fn_appmanifest_check() { fn_appmanifest_info # Multiple or no matching appmanifest files may sometimes be present. # This error is corrected if required. diff --git a/lgsm/functions/core_trap.sh b/lgsm/functions/core_trap.sh index a3eaf5675..ae2b79470 100755 --- a/lgsm/functions/core_trap.sh +++ b/lgsm/functions/core_trap.sh @@ -7,7 +7,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_exit_trap(){ +fn_exit_trap() { if [ -z "${exitcode}" ]; then exitcode=$? fi diff --git a/lgsm/functions/fix.sh b/lgsm/functions/fix.sh index f9f61162f..2d9af576e 100755 --- a/lgsm/functions/fix.sh +++ b/lgsm/functions/fix.sh @@ -9,19 +9,19 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Messages that are displayed for some fixes. -fn_fix_msg_start(){ +fn_fix_msg_start() { fn_print_dots "Applying ${fixname} fix: ${gamename}" fn_print_info "Applying ${fixname} fix: ${gamename}" fn_script_log_info "Applying ${fixname} fix: ${gamename}" } -fn_fix_msg_start_nl(){ +fn_fix_msg_start_nl() { fn_print_dots "Applying ${fixname} fix: ${gamename}" fn_print_info "Applying ${fixname} fix: ${gamename}" fn_script_log_info "Applying ${fixname} fix: ${gamename}" } -fn_fix_msg_end(){ +fn_fix_msg_end() { if [ $? != 0 ]; then fn_print_error_nl "Applying ${fixname} fix: ${gamename}" fn_script_log_error "Applying ${fixname} fix: ${gamename}" @@ -32,12 +32,12 @@ fn_fix_msg_end(){ } # Fixes that are run on start. -if [ "${commandname}" != "INSTALL" ]&&[ -z "${fixbypass}" ]; then +if [ "${commandname}" != "INSTALL" ] && [ -z "${fixbypass}" ]; then if [ "${appid}" ]; then fix_steamcmd.sh fi - if [ "${shortname}" == "arma3" ]; then + if [ "${shortname}" == "arma3" ]; then fix_arma3.sh elif [ "${shortname}" == "armar" ]; then fix_armar.sh @@ -96,32 +96,32 @@ fi # Fixes that are run on install only. if [ "${commandname}" == "INSTALL" ]; then - if [ "${shortname}" == "av" ]||[ "${shortname}" == "cmw" ]||[ "${shortname}" == "kf" ]||[ "${shortname}" == "kf2" ]||[ "${shortname}" == "lo" ]||[ "${shortname}" == "onset" ]||[ "${shortname}" == "ro" ]||[ "${shortname}" == "samp" ]||[ "${shortname}" == "ut2k4" ]||[ "${shortname}" == "ut" ]||[ "${shortname}" == "ut3" ]; then - echo -e "" - echo -e "${lightyellow}Applying Post-Install Fixes${default}" - echo -e "=================================" - fn_sleep_time - postinstall=1 - if [ "${shortname}" == "av" ]; then - fix_av.sh - elif [ "${shortname}" == "kf" ]; then - fix_kf.sh - elif [ "${shortname}" == "kf2" ]; then - fix_kf2.sh - elif [ "${shortname}" == "lo" ]; then - fix_lo.sh - elif [ "${shortname}" == "ro" ]; then - fix_ro.sh - elif [ "${shortname}" == "samp" ]; then - fix_samp.sh - elif [ "${shortname}" == "ut2k4" ]; then - fix_ut2k4.sh - elif [ "${shortname}" == "ut" ]; then - fix_ut.sh - elif [ "${shortname}" == "ut3" ]; then - fix_ut3.sh - else - fn_print_information_nl "No fixes required." - fi + if [ "${shortname}" == "av" ] || [ "${shortname}" == "cmw" ] || [ "${shortname}" == "kf" ] || [ "${shortname}" == "kf2" ] || [ "${shortname}" == "lo" ] || [ "${shortname}" == "onset" ] || [ "${shortname}" == "ro" ] || [ "${shortname}" == "samp" ] || [ "${shortname}" == "ut2k4" ] || [ "${shortname}" == "ut" ] || [ "${shortname}" == "ut3" ]; then + echo -e "" + echo -e "${lightyellow}Applying Post-Install Fixes${default}" + echo -e "=================================" + fn_sleep_time + postinstall=1 + if [ "${shortname}" == "av" ]; then + fix_av.sh + elif [ "${shortname}" == "kf" ]; then + fix_kf.sh + elif [ "${shortname}" == "kf2" ]; then + fix_kf2.sh + elif [ "${shortname}" == "lo" ]; then + fix_lo.sh + elif [ "${shortname}" == "ro" ]; then + fix_ro.sh + elif [ "${shortname}" == "samp" ]; then + fix_samp.sh + elif [ "${shortname}" == "ut2k4" ]; then + fix_ut2k4.sh + elif [ "${shortname}" == "ut" ]; then + fix_ut.sh + elif [ "${shortname}" == "ut3" ]; then + fix_ut3.sh + else + fn_print_information_nl "No fixes required." fi + fi fi diff --git a/lgsm/functions/fix_ark.sh b/lgsm/functions/fix_ark.sh index da0097cab..f8e0447e3 100755 --- a/lgsm/functions/fix_ark.sh +++ b/lgsm/functions/fix_ark.sh @@ -19,7 +19,11 @@ elif [ "${steamappsfilewc}" -eq "1" ]; then # This allows LinxuGSM to select either ~/.steam or ~/Steam. depending on what is being used steamappsfile=$(find "${HOME}" -name appworkshop_346110.acf) steamappsdir=$(dirname "${steamappsfile}") - steamappspath=$(cd "${steamappsdir}" || return; cd ../;pwd) + steamappspath=$( + cd "${steamappsdir}" || return + cd ../ + pwd + ) # removes the symlink if exists. # fixes issue with older versions of LinuxGSM linking to /home/arkserver/steamcmd @@ -41,7 +45,7 @@ elif [ "${steamappsfilewc}" -eq "1" ]; then fi # if the steamapps symlink is incorrect unlink it. - if [ -d "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux" ]&&[ -L "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps" ]&&[ "$(readlink "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps")" != "${steamappspath}" ]; then + if [ -d "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux" ] && [ -L "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps" ] && [ "$(readlink "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps")" != "${steamappspath}" ]; then fixname="incorrect steamapps symlink" fn_fix_msg_start unlink "${serverfiles:?}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps" diff --git a/lgsm/functions/fix_arma3.sh b/lgsm/functions/fix_arma3.sh index bdd85af71..bbf14c9d2 100755 --- a/lgsm/functions/fix_arma3.sh +++ b/lgsm/functions/fix_arma3.sh @@ -8,7 +8,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Fixes: 20150 Segmentation fault (core dumped) error. -if [ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Arma 3" ]||[ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Arma 3 - Other Profiles" ]; then +if [ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Arma 3" ] || [ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Arma 3 - Other Profiles" ]; then fixname="20150 Segmentation fault (core dumped)" fn_fix_msg_start mkdir -p "${XDG_DATA_HOME:="${HOME}/.local/share"}/Arma 3 - Other Profiles" diff --git a/lgsm/functions/fix_dst.sh b/lgsm/functions/fix_dst.sh index 49fce22e3..e30507dc9 100755 --- a/lgsm/functions/fix_dst.sh +++ b/lgsm/functions/fix_dst.sh @@ -9,7 +9,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Fixes: ./dontstarve_dedicated_server_nullrenderer: ./lib32/libcurl-gnutls.so.4: no version information available (required by ./dontstarve_dedicated_server_nullrenderer). # Issue only occures on CentOS as libcurl-gnutls.so.4 is called libcurl.so.4 on CentOS. -if [ -f "/etc/redhat-release" ]&&[ ! -f "${serverfiles}/bin/lib32/libcurl-gnutls.so.4" ]; then +if [ -f "/etc/redhat-release" ] && [ ! -f "${serverfiles}/bin/lib32/libcurl-gnutls.so.4" ]; then fixname="libcurl-gnutls.so.4" fn_fix_msg_start ln -s "/usr/lib/libcurl.so.4" "${serverfiles}/bin/lib32/libcurl-gnutls.so.4" diff --git a/lgsm/functions/fix_lo.sh b/lgsm/functions/fix_lo.sh index 466d6abd0..b868a55b4 100644 --- a/lgsm/functions/fix_lo.sh +++ b/lgsm/functions/fix_lo.sh @@ -8,10 +8,10 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" local APPID_FILE=${executabledir}/steam_appid.txt if [ ! -f "${APPID_FILE}" ]; then - fn_print_information "adding ${APPID_FILE} to ${gamename} server." - fn_sleep_time - echo "903950" > "${APPID_FILE}" + fn_print_information "adding ${APPID_FILE} to ${gamename} server." + fn_sleep_time + echo "903950" > "${APPID_FILE}" else - fn_print_information "${APPID_FILE} already exists. No action to be taken." - fn_sleep_time + fn_print_information "${APPID_FILE} already exists. No action to be taken." + fn_sleep_time fi diff --git a/lgsm/functions/fix_onset.sh b/lgsm/functions/fix_onset.sh index c444c1ae9..e4183999d 100755 --- a/lgsm/functions/fix_onset.sh +++ b/lgsm/functions/fix_onset.sh @@ -11,7 +11,7 @@ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}" # Fixes: Failed loading "mariadb": libmariadbclient.so.18: cannot open shared object file: No such file or directory # Issue only occures on CentOS as libmariadbclient.so.18 is called libmariadb.so.3 on CentOS. -if [ -f "/etc/redhat-release" ]&&[ ! -f "${serverfiles}/libmariadbclient.so.18" ]&&[ -f "/usr/lib64/libmariadb.so.3" ]; then +if [ -f "/etc/redhat-release" ] && [ ! -f "${serverfiles}/libmariadbclient.so.18" ] && [ -f "/usr/lib64/libmariadb.so.3" ]; then fixname="libmariadbclient.so.18" fn_fix_msg_start ln -s "/usr/lib64/libmariadb.so.3" "${serverfiles}/libmariadbclient.so.18" diff --git a/lgsm/functions/fix_samp.sh b/lgsm/functions/fix_samp.sh index 7a62bd4d1..a88bf154f 100644 --- a/lgsm/functions/fix_samp.sh +++ b/lgsm/functions/fix_samp.sh @@ -9,14 +9,14 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ -f "${servercfgfullpath}" ]; then # check if default password is set "changeme" - currentpass=$(grep -E "^rcon_password" "${servercfgfullpath}" | sed 's/^rcon_password //' ) + currentpass=$(grep -E "^rcon_password" "${servercfgfullpath}" | sed 's/^rcon_password //') defaultpass="changeme" # check if default password is set if [ "${currentpass}" == "${defaultpass}" ]; then fixname="change default rcon password" fn_fix_msg_start fn_script_log_info "changing rcon/admin password." - random=$(tr -dc A-Za-z0-9_ < /dev/urandom | head -c 8 | xargs) + random=$(tr -dc A-Za-z0-9_ < /dev/urandom | head -c 8 | xargs) rconpass="admin${random}" sed -i "s/rcon_password changeme/rcon_password ${rconpass}/g" "${servercfgfullpath}" fn_fix_msg_end diff --git a/lgsm/functions/fix_squad.sh b/lgsm/functions/fix_squad.sh index b1ba1fde2..7d5929b5d 100644 --- a/lgsm/functions/fix_squad.sh +++ b/lgsm/functions/fix_squad.sh @@ -9,7 +9,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # As the server base dir changed for the game, we need to migrate the default config from the old to the new location oldservercfg="${serverfiles}/Squad/ServerConfig/${servercfg}" -if [ -f "${oldservercfg}" ]&&[ -f "${servercfgfullpath}" ]; then +if [ -f "${oldservercfg}" ] && [ -f "${servercfgfullpath}" ]; then # diff old and new config - if it is different move the old config over the new one if [ "$(diff -c "${oldservercfg}" "${servercfgfullpath}" | wc -l)" -gt 0 ]; then fixname="Migrate server config to new Game folder" diff --git a/lgsm/functions/fix_steamcmd.sh b/lgsm/functions/fix_steamcmd.sh index abac31cfb..0162a6495 100755 --- a/lgsm/functions/fix_steamcmd.sh +++ b/lgsm/functions/fix_steamcmd.sh @@ -10,7 +10,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # function to simplify the steamclient.so fix # example # fn_fix_steamclient_so 32|64 (bit) "${serverfiles}/linux32/" -fn_fix_steamclient_so(){ +fn_fix_steamclient_so() { # $1 type of fix 32 or 64 as possible values # $2 as destination where the lib will be copied to if [ "$1" == "32" ]; then @@ -132,7 +132,7 @@ elif [ "${shortname}" == "pvr" ]; then fn_fix_steamclient_so "64" "${executabledir}" elif [ "${shortname}" == "ss3" ]; then fn_fix_steamclient_so "32" "${serverfiles}/Bin" -elif [ "${shortname}" == "tu" ];then +elif [ "${shortname}" == "tu" ]; then fn_fix_steamclient_so "64" "${executabledir}" elif [ "${shortname}" == "unt" ]; then fn_fix_steamclient_so "64" "${serverfiles}" diff --git a/lgsm/functions/fix_tf2.sh b/lgsm/functions/fix_tf2.sh index 27b35a0d2..77e41a969 100755 --- a/lgsm/functions/fix_tf2.sh +++ b/lgsm/functions/fix_tf2.sh @@ -8,7 +8,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Fixes: Team Fortress 2 Segmentation fault for Red-Hat Distros #2062. -if [ -f "/etc/redhat-release" ]&&[ ! -f "${serverfiles}/bin/libcurl-gnutls.so.4" ]; then +if [ -f "/etc/redhat-release" ] && [ ! -f "${serverfiles}/bin/libcurl-gnutls.so.4" ]; then fixname="libcurl-gnutls.so.4" fn_fix_msg_start ln -s "/usr/lib/libcurl.so.4" "${serverfiles}/bin/libcurl-gnutls.so.4" diff --git a/lgsm/functions/fix_ts3.sh b/lgsm/functions/fix_ts3.sh index 021f03764..7c7387cb6 100755 --- a/lgsm/functions/fix_ts3.sh +++ b/lgsm/functions/fix_ts3.sh @@ -17,9 +17,9 @@ fi # Fixes: failed to register local accounting service: No such file or directory. accountingfile="/dev/shm/7gbhujb54g8z9hu43jre8" -if [ -f "${accountingfile}" ]&&[ "${status}" == "0" ]; then +if [ -f "${accountingfile}" ] && [ "${status}" == "0" ]; then # Check permissions for the file if the current user owns it, if not exit. - if [ "$( stat -c %U ${accountingfile})" == "$(whoami)" ]; then + if [ "$(stat -c %U ${accountingfile})" == "$(whoami)" ]; then fixname="Delete file ${accountingfile}" fn_fix_msg_start rm -f "${accountingfile}" diff --git a/lgsm/functions/fix_vh.sh b/lgsm/functions/fix_vh.sh index 7d60916a4..ab0218873 100755 --- a/lgsm/functions/fix_vh.sh +++ b/lgsm/functions/fix_vh.sh @@ -12,10 +12,8 @@ export LD_LIBRARY_PATH=./linux64:$LD_LIBRARY_PATH modsdir="${lgsmdir}/mods" modsinstalledlistfullpath="${modsdir}/installed-mods.txt" if [ -f "${modsinstalledlistfullpath}" ]; then - if grep -qE "^valheimplus" "${modsinstalledlistfullpath}" - then - if ! grep -qE "^executable=\"./start_server_bepinex.sh\"" "${configdirserver}/${selfname}.cfg" - then + if grep -qE "^valheimplus" "${modsinstalledlistfullpath}"; then + if ! grep -qE "^executable=\"./start_server_bepinex.sh\"" "${configdirserver}/${selfname}.cfg"; then echo 'executable="./start_server_bepinex.sh"' >> "${configdirserver}/${selfname}.cfg" executable="./start_server_bepinex.sh" fi diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh index f747b0d1b..f29e621d5 100755 --- a/lgsm/functions/info_distro.sh +++ b/lgsm/functions/info_distro.sh @@ -30,9 +30,9 @@ kernel="$(uname -r)" # Distro Codename - xenial # Gathers distro info from various sources filling in missing gaps. -distro_info_array=( os-release lsb_release hostnamectl debian_version redhat-release ) +distro_info_array=(os-release lsb_release hostnamectl debian_version redhat-release) for distro_info in "${distro_info_array[@]}"; do - if [ -f "/etc/os-release" ]&&[ "${distro_info}" == "os-release" ]; then + if [ -f "/etc/os-release" ] && [ "${distro_info}" == "os-release" ]; then distroname="$(grep "PRETTY_NAME" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')" distroversion="$(grep "VERSION_ID" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')" # Special var for rhel like distros to removed point in number e.g 8.4 to just 8. @@ -40,8 +40,8 @@ for distro_info in "${distro_info_array[@]}"; do distroid="$(grep "ID=" /etc/os-release | grep -v _ID | awk -F\= '{gsub(/"/,"",$2);print $2}')" distroidlike="$(grep "ID_LIKE=" /etc/os-release | grep -v _ID | awk -F\= '{gsub(/"/,"",$2);print $2}')" distrocodename="$(grep "VERSION_CODENAME" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')" - elif [ "$(command -v lsb_release 2>/dev/null)" ]&&[ "${distro_info}" == "lsb_release" ]; then - if [ -z "${distroname}" ];then + elif [ "$(command -v lsb_release 2> /dev/null)" ] && [ "${distro_info}" == "lsb_release" ]; then + if [ -z "${distroname}" ]; then distroname="$(lsb_release -sd)" elif [ -z "${distroversion}" ]; then distroversion="$(lsb_release -sr)" @@ -50,11 +50,11 @@ for distro_info in "${distro_info_array[@]}"; do elif [ -z "${distrocodename}" ]; then distrocodename="$(lsb_release -sc)" fi - elif [ "$(command -v hostnamectl 2>/dev/null)" ]&&[ "${distro_info}" == "hostnamectl" ]; then - if [ -z "${distroname}" ];then + elif [ "$(command -v hostnamectl 2> /dev/null)" ] && [ "${distro_info}" == "hostnamectl" ]; then + if [ -z "${distroname}" ]; then distroname="$(hostnamectl | grep "Operating System" | sed 's/Operating System: //g')" fi - elif [ -f "/etc/debian_version" ]&&[ "${distro_info}" == "debian_version" ]; then + elif [ -f "/etc/debian_version" ] && [ "${distro_info}" == "debian_version" ]; then if [ -z "${distroname}" ]; then distroname="Debian $(cat /etc/debian_version)" elif [ -z "${distroversion}" ]; then @@ -62,7 +62,7 @@ for distro_info in "${distro_info_array[@]}"; do elif [ -z "${distroid}" ]; then distroid="debian" fi - elif [ -f "/etc/redhat-release" ]&&[ "${distro_info}" == "redhat-release" ]; then + elif [ -f "/etc/redhat-release" ] && [ "${distro_info}" == "redhat-release" ]; then if [ -z "${distroname}" ]; then distroname="$(cat /etc/redhat-release)" elif [ -z "${distroversion}" ]; then @@ -74,16 +74,16 @@ for distro_info in "${distro_info_array[@]}"; do done # some RHEL based distros use 8.4 instead of just 8. -if [[ "${distroidlike}" == *"rhel"* ]]||[ "${distroid}" == "rhel" ]; then +if [[ "${distroidlike}" == *"rhel"* ]] || [ "${distroid}" == "rhel" ]; then distroversioncsv="${distroversionrh}" else distroversioncsv="${distroversion}" fi # Check if distro supported by distro vendor. -if [ "$(command -v distro-info 2>/dev/null)" ]; then +if [ "$(command -v distro-info 2> /dev/null)" ]; then distrosunsupported="$(distro-info --unsupported)" - distrosunsupported_array=( "${distrosunsupported}" ) + distrosunsupported_array=("${distrosunsupported}") for distrounsupported in "${distrosunsupported_array[@]}"; do if [ "${distrounsupported}" == "${distrocodename}" ]; then distrosupport=unsupported @@ -102,7 +102,7 @@ glibcversion="$(ldd --version | sed -n '1s/.* //p')" ## tmux version # e.g: tmux 1.6 -if [ ! "$(command -V tmux 2>/dev/null)" ]; then +if [ ! "$(command -V tmux 2> /dev/null)" ]; then tmuxv="${red}NOT INSTALLED!${default}" tmuxvdigit="0" else @@ -114,25 +114,25 @@ else fi fi -if [ "$(command -V java 2>/dev/null)" ]; then +if [ "$(command -V java 2> /dev/null)" ]; then javaversion="$(java -version 2>&1 | grep "version")" fi -if [ "$(command -v mono 2>/dev/null)" ]; then +if [ "$(command -v mono 2> /dev/null)" ]; then monoversion="$(mono --version 2>&1 | grep -Po '(?<=version )\d')" fi ## Uptime -uptime="$(/dev/null)" ]; then +if [ "$(command -v numfmt 2> /dev/null)" ]; then # Issue #2005 - Kernel 3.14+ contains MemAvailable which should be used. All others will be calculated. # get the raw KB values of these fields. @@ -162,31 +162,34 @@ if [ "$(command -v numfmt 2>/dev/null)" ]; then if grep -q ^MemAvailable /proc/meminfo; then physmemactualfreekb="$(grep ^MemAvailable /proc/meminfo | awk '{print $2}')" else - physmemactualfreekb="$((physmemfreekb+physmembufferskb+physmemcachedkb))" + physmemactualfreekb="$((physmemfreekb + physmembufferskb + physmemcachedkb))" fi # Available RAM and swap. - physmemtotalmb="$((physmemtotalkb/1024))" + physmemtotalmb="$((physmemtotalkb / 1024))" physmemtotal="$(numfmt --to=iec --from=iec --suffix=B "${physmemtotalkb}K")" physmemfree="$(numfmt --to=iec --from=iec --suffix=B "${physmemactualfreekb}K")" - physmemused="$(numfmt --to=iec --from=iec --suffix=B "$((physmemtotalkb-physmemfreekb-physmembufferskb-physmemcachedkb-physmemreclaimablekb))K")" + physmemused="$(numfmt --to=iec --from=iec --suffix=B "$((physmemtotalkb - physmemfreekb - physmembufferskb - physmemcachedkb - physmemreclaimablekb))K")" physmemavailable="$(numfmt --to=iec --from=iec --suffix=B "${physmemactualfreekb}K")" - physmemcached="$(numfmt --to=iec --from=iec --suffix=B "$((physmemcachedkb+physmemreclaimablekb))K")" + physmemcached="$(numfmt --to=iec --from=iec --suffix=B "$((physmemcachedkb + physmemreclaimablekb))K")" swaptotal="$(numfmt --to=iec --from=iec --suffix=B "$(grep ^SwapTotal /proc/meminfo | awk '{print $2}')K")" swapfree="$(numfmt --to=iec --from=iec --suffix=B "$(grep ^SwapFree /proc/meminfo | awk '{print $2}')K")" - swapused="$(numfmt --to=iec --from=iec --suffix=B "$(($(grep ^SwapTotal /proc/meminfo | awk '{print $2}')-$(grep ^SwapFree /proc/meminfo | awk '{print $2}')))K")" + swapused="$(numfmt --to=iec --from=iec --suffix=B "$(($(grep ^SwapTotal /proc/meminfo | awk '{print $2}') - $(grep ^SwapFree /proc/meminfo | awk '{print $2}')))K")" # RAM usage of the game server pid # MB if [ "${gameserverpid}" ]; then - memused="$(ps --forest -o rss -g "${gameserverpid}" | awk '{s+=$1} END {print s}'| awk '{$1/=1024;printf "%.0f",$1}{print $2}')" - # % + memused="$(ps --forest -o rss -g "${gameserverpid}" | awk '{s+=$1} END {print s}' | awk '{$1/=1024;printf "%.0f",$1}{print $2}')" + # % pmemused="$(ps --forest -o %mem -g "${gameserverpid}" | awk '{s+=$1} END {print s}')" fi else # Older distros will need to use free. # Older versions of free do not support -h option. - if [ "$(free -h > /dev/null 2>&1; echo $?)" -ne "0" ]; then + if [ "$( + free -h > /dev/null 2>&1 + echo $? + )" -ne "0" ]; then humanreadable="-m" else humanreadable="-h" @@ -257,7 +260,7 @@ if [ -d "${backupdir}" ]; then # date of most recent backup. lastbackupdate="$(date -r "${lastbackup}")" # no of days since last backup. - lastbackupdaysago="$(( ( $(date +'%s') - $(date -r "${lastbackup}" +'%s') )/60/60/24 ))" + lastbackupdaysago="$((($(date +'%s') - $(date -r "${lastbackup}" +'%s')) / 60 / 60 / 24))" # size of most recent backup. lastbackupsize="$(du -h "${lastbackup}" | awk '{print $1}')" fi @@ -265,11 +268,11 @@ fi # Network Interface name netint=$(${ipcommand} -o addr | grep "${ip}" | awk '{print $2}') -netlink=$(${ethtoolcommand} "${netint}" 2>/dev/null| grep Speed | awk '{print $2}') +netlink=$(${ethtoolcommand} "${netint}" 2> /dev/null | grep Speed | awk '{print $2}') # Sets the SteamCMD glibc requirement if the game server requirement is less or not required. if [ "${appid}" ]; then - if [ "${glibc}" = "null" ]||[ -z "${glibc}" ]||[ "$(printf '%s\n'${glibc}'\n' "2.14" | sort -V | head -n 1)" != "2.14" ]; then + if [ "${glibc}" = "null" ] || [ -z "${glibc}" ] || [ "$(printf '%s\n'${glibc}'\n' "2.14" | sort -V | head -n 1)" != "2.14" ]; then glibc="2.14" fi fi diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index 88c27b4c9..57d01237d 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -14,7 +14,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # grep -v "foo" filter out lines that contain foo # cut -f1 -d "/" remove everything after / -fn_info_game_ac(){ +fn_info_game_ac() { # Config if [ ! -f "${servercfgfullpath}" ]; then httpport="${zero}" @@ -26,7 +26,7 @@ fn_info_game_ac(){ httpport=$(grep "HTTP_PORT" "${servercfgfullpath}" | tr -cd '[:digit:]') port=$(grep "TCP_PORT" "${servercfgfullpath}" | tr -cd '[:digit:]') queryport="${httpport}" - servername=$(grep "NAME" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/NAME//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| head -n 1) + servername=$(grep "NAME" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/NAME//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | head -n 1) adminpassword=$(grep "ADMIN_PASSWORD" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/ADMIN_PASSWORD//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') # Not set @@ -39,7 +39,7 @@ fn_info_game_ac(){ fi } -fn_info_game_ark(){ +fn_info_game_ark() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -60,11 +60,11 @@ fn_info_game_ark(){ port=${port:-"0"} queryport=${queryport:-"0"} rconport=${rconport:-"0"} - rawport=$((port+1)) + rawport=$((port + 1)) maxplayers=${maxplayers:-"0"} } -fn_info_game_arma3(){ +fn_info_game_arma3() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -87,13 +87,13 @@ fn_info_game_arma3(){ # Parameters port=${port:-"2302"} voiceport=${port:-"2302"} - queryport=$((port+1)) - steammasterport=$((port+2)) - voiceunusedport=$((port+3)) - battleeyeport=$((port+4)) + queryport=$((port + 1)) + steammasterport=$((port + 2)) + voiceunusedport=$((port + 3)) + battleeyeport=$((port + 4)) } -fn_info_game_armar(){ +fn_info_game_armar() { if [ -f "${servercfgfullpath}" ]; then adminpassword=$(jq -r '.adminPassword' "${servercfgfullpath}") configip=$(jq -r '.gameHostBindAddress' "${servercfgfullpath}") @@ -104,7 +104,6 @@ fn_info_game_armar(){ serverpassword=$(jq -r '.game.password' "${servercfgfullpath}") battleeyeport=1376 - # Not set adminpassword=${adminpassword:-"NOT SET"} configip=${configip:-"0.0.0.0"} @@ -138,9 +137,9 @@ fn_info_game_av() { servername=$(grep "name=" "${servercfgfullpath}" | sed 's/name=//') serverpassword=$(grep "password=" "${servercfgfullpath}" | sed 's/password=//') port=$(grep "port=" "${servercfgfullpath}" | sed 's/port=//') - queryport=$((port+3)) - steamqueryport=$((port+20)) - steammasterport=$((port+21)) + queryport=$((port + 3)) + steamqueryport=$((port + 20)) + steammasterport=$((port + 21)) rconport=$(grep "rconPort=" "${servercfgfullpath}" | sed 's/rconPort=//') rconpassword=$(grep "rconPassword=" "${servercfgfullpath}" | sed 's/rconPassword=//') @@ -162,7 +161,7 @@ fn_info_game_av() { fi } -fn_info_game_bf1942(){ +fn_info_game_bf1942() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -188,7 +187,7 @@ fn_info_game_bf1942(){ fi } -fn_info_game_bfv(){ +fn_info_game_bfv() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -214,7 +213,7 @@ fn_info_game_bfv(){ fi } -fn_info_game_bo(){ +fn_info_game_bo() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -226,7 +225,7 @@ fn_info_game_bo(){ servername=$(grep "ServerName=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') serverpassword=$(grep "Password=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') port=$(grep "ServerPort=" "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport=$((port+1)) + queryport=$((port + 1)) maxplayers=$(grep "MaxPlayers=" "${servercfgfullpath}" | tr -cd '[:digit:]') # Not set @@ -238,7 +237,7 @@ fn_info_game_bo(){ fi } -fn_info_game_bt(){ +fn_info_game_bt() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -247,7 +246,7 @@ fn_info_game_bt(){ queryport="${zero}" maxplayers="${unavailable}" else - servername=$(grep -Po 'name="\K.*(?=")' "${servercfgfullpath}") # Assuming GNU grep is used + servername=$(grep -Po 'name="\K.*(?=")' "${servercfgfullpath}") # Assuming GNU grep is used serverpassword=$(grep -Po 'password="\K.*(?=")' "${servercfgfullpath}") # Assuming GNU grep is used port=$(grep " port=" "${servercfgfullpath}" | tr -cd '[:digit:]') queryport=$(grep "queryport=" "${servercfgfullpath}" | tr -cd '[:digit:]') @@ -262,7 +261,7 @@ fn_info_game_bt(){ fi } -fn_info_game_bt1944(){ +fn_info_game_bt1944() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -282,10 +281,10 @@ fn_info_game_bt1944(){ # Parameters port=${port:-"0"} queryport=${queryport:-"0"} - rconport=$((port+2)) + rconport=$((port + 2)) } -fn_info_game_cd(){ +fn_info_game_cd() { if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" port="${zero}" @@ -305,7 +304,7 @@ fn_info_game_cd(){ fi } -fn_info_game_cmw(){ +fn_info_game_cmw() { # Config if [ ! -f "${servercfgfullpath}" ]; then adminpassword="${unavailable}" @@ -332,7 +331,7 @@ fn_info_game_cmw(){ queryport=${queryport:-"0"} } -fn_info_game_cod(){ +fn_info_game_cod() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -352,7 +351,7 @@ fn_info_game_cod(){ port=${port:-"0"} } -fn_info_game_coduo(){ +fn_info_game_coduo() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -373,9 +372,7 @@ fn_info_game_coduo(){ queryport=${port:-"28960"} } - - -fn_info_game_cod2(){ +fn_info_game_cod2() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -396,7 +393,7 @@ fn_info_game_cod2(){ queryport=${port:-"28960"} } -fn_info_game_cod4(){ +fn_info_game_cod4() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -419,7 +416,7 @@ fn_info_game_cod4(){ queryport=${port:-"28960"} } -fn_info_game_codwaw(){ +fn_info_game_codwaw() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -440,7 +437,7 @@ fn_info_game_codwaw(){ queryport=${port:-"28960"} } -fn_info_game_col(){ +fn_info_game_col() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -472,7 +469,7 @@ fn_info_game_col(){ fi } -fn_info_game_dodr(){ +fn_info_game_dodr() { # Config if [ ! -f "${servercfgfullpath}" ]; then maxplayers="${zero}" @@ -489,7 +486,7 @@ fn_info_game_dodr(){ queryport=${queryport:-"27015"} } -fn_info_game_dayz(){ +fn_info_game_dayz() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -513,11 +510,11 @@ fn_info_game_dayz(){ # Parameters port=${port:-"2302"} - steammasterport=$((port+2)) - battleeyeport=$((port+4)) + steammasterport=$((port + 2)) + battleeyeport=$((port + 4)) } -fn_info_game_dst(){ +fn_info_game_dst() { # Config if [ ! -f "${clustercfgfullpath}" ]; then servername="${unavailable}" @@ -568,7 +565,7 @@ fn_info_game_dst(){ cave=${cave:-"NOT SET"} } -fn_info_game_eco(){ +fn_info_game_eco() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -597,7 +594,7 @@ fn_info_game_eco(){ fi } -fn_info_game_etl(){ +fn_info_game_etl() { # Config if [ ! -f "${servercfgfullpath}" ]; then rconpassword="${unavailable}" @@ -626,7 +623,7 @@ fn_info_game_etl(){ fi } -fn_info_game_fctr(){ +fn_info_game_fctr() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="Factorio Server" @@ -658,7 +655,7 @@ fn_info_game_fctr(){ rconpassword=${rconpassword:-"NOT SET"} } -fn_info_game_jc2(){ +fn_info_game_jc2() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -687,7 +684,7 @@ fn_info_game_jc2(){ fi } -fn_info_game_hw(){ +fn_info_game_hw() { # Parameters servername=${servername:-"NOT SET"} port=${port:-"0"} @@ -697,7 +694,7 @@ fn_info_game_hw(){ creativemode=${creativemode:-"NOT SET"} } -fn_info_game_inss(){ +fn_info_game_inss() { # Parameters port=${port:-"0"} queryport=${queryport:-"0"} @@ -709,7 +706,7 @@ fn_info_game_inss(){ maxplayers=${maxplayers:-"0"} } -fn_info_game_jc3(){ +fn_info_game_jc3() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -747,7 +744,7 @@ fn_info_game_jc3(){ fi } -fn_info_game_jk2(){ +fn_info_game_jk2() { # Config if [ ! -f "${servercfgfullpath}" ]; then rconpassword="${unavailable}" @@ -776,7 +773,7 @@ fn_info_game_jk2(){ defaultmap=${defaultmap:-"NOT SET"} } -fn_info_game_kf(){ +fn_info_game_kf() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -797,7 +794,7 @@ fn_info_game_kf(){ serverpassword=$(sed -nr 's/^GamePassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') adminpassword=$(sed -nr 's/^AdminPassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') port=$(sed -nr 's/^Port=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport=$((port+1)) + queryport=$((port + 1)) queryportgs=$(sed -nr 's/^OldQueryPortNumber=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') steamport="20560" steammasterport="28852" @@ -827,7 +824,7 @@ fn_info_game_kf(){ defaultmap=${defaultmap:-"NOT SET"} } -fn_info_game_kf2(){ +fn_info_game_kf2() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -865,7 +862,7 @@ fn_info_game_kf2(){ defaultmap=${defaultmap:-"NOT SET"} } -fn_info_game_lo(){ +fn_info_game_lo() { # Parameters servername=${servername:-"NOT SET"} port=${port:-"0"} @@ -873,7 +870,7 @@ fn_info_game_lo(){ maxplayers=${slots:-"0"} } -fn_info_game_mc(){ +fn_info_game_mc() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -914,7 +911,7 @@ fn_info_game_mc(){ fi } -fn_info_game_mcb(){ +fn_info_game_mcb() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -944,7 +941,7 @@ fn_info_game_mcb(){ fi } -fn_info_game_mh(){ +fn_info_game_mh() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -970,7 +967,7 @@ fn_info_game_mh(){ beaconport=${beaconport:-"0"} } -fn_info_game_mohaa(){ +fn_info_game_mohaa() { # Config if [ ! -f "${servercfgfullpath}" ]; then rconpassword="${unavailable}" @@ -996,7 +993,7 @@ fn_info_game_mohaa(){ defaultmap=${defaultmap:-"NOT SET"} } -fn_info_game_mom(){ +fn_info_game_mom() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -1021,7 +1018,7 @@ fn_info_game_mom(){ beaconport=${queryport:-"15000"} } -fn_info_game_mta(){ +fn_info_game_mta() { # Config if [ ! -f "${servercfgfullpath}" ]; then port=${zero} @@ -1033,7 +1030,7 @@ fn_info_game_mta(){ maxplayers="${zero}" else port=$(grep -m 1 "serverport" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<" | tr -cd '[:digit:]') - queryport=$((port+123)) + queryport=$((port + 123)) httpport=$(grep -m 1 "httpport" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<" | tr -cd '[:digit:]') servername=$(grep -m 1 "servername" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<") serverpassword=$(grep -m 1 "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<") @@ -1057,7 +1054,7 @@ fn_info_game_mta(){ } -fn_info_game_mumble(){ +fn_info_game_mumble() { # Config if [ ! -f "${servercfgfullpath}" ]; then port="64738" @@ -1076,7 +1073,7 @@ fn_info_game_mumble(){ fi } -fn_info_game_onset(){ +fn_info_game_onset() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -1085,11 +1082,11 @@ fn_info_game_onset(){ httpport="${zero}" queryport="${zero}" else - servername=$(grep -v "servername_short" "${servercfgfullpath}" | grep "servername" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/servername//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' ) + servername=$(grep -v "servername_short" "${servercfgfullpath}" | grep "servername" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/servername//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') maxplayers=$(grep "maxplayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') port=$(grep "port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - httpport=$((port-2)) - queryport=$((port-1)) + httpport=$((port - 2)) + queryport=$((port - 1)) # Not set servername=${servername:-"NOT SET"} @@ -1100,7 +1097,7 @@ fn_info_game_onset(){ fi } -fn_info_game_pc(){ +fn_info_game_pc() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -1127,7 +1124,7 @@ fn_info_game_pc(){ fi } -fn_info_game_pc2(){ +fn_info_game_pc2() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -1154,7 +1151,7 @@ fn_info_game_pc2(){ fi } -fn_info_game_pstbs(){ +fn_info_game_pstbs() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -1180,7 +1177,7 @@ fn_info_game_pstbs(){ # Not set rconport=${rconport:-"0"} - if [ -z "${rconpassword}" ]||[ ${#rconpassword} == 1 ]; then + if [ -z "${rconpassword}" ] || [ ${#rconpassword} == 1 ]; then rconpassword="NOT SET" fi fi @@ -1196,7 +1193,7 @@ fn_info_game_pstbs(){ reservedslots=${reservedslots:-"0"} } -fn_info_game_pvr(){ +fn_info_game_pvr() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -1212,11 +1209,11 @@ fn_info_game_pvr(){ # Parameters port=${port:-"0"} - port401=$((port+400)) + port401=$((port + 400)) queryport=${port:-"0"} } -fn_info_game_pz(){ +fn_info_game_pz() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -1228,7 +1225,7 @@ fn_info_game_pz(){ gameworld="${unavailable}" else servername=$(grep "PublicName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/PublicName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "Password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^Password" | sed -e '/^#/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "Password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^Password" | sed -e '/^#/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') rconpassword=$(grep "RCONPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/RCONPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') port=$(grep "DefaultPort" "${servercfgfullpath}" | tr -cd '[:digit:]') @@ -1250,7 +1247,7 @@ fn_info_game_pz(){ } -fn_info_game_q2(){ +fn_info_game_q2() { # Config if [ ! -f "${servercfgfullpath}" ]; then rconpassword="${unavailable}" @@ -1273,7 +1270,7 @@ fn_info_game_q2(){ defaultmap=${defaultmap:-"NOT SET"} } -fn_info_game_q3(){ +fn_info_game_q3() { # Config if [ ! -f "${servercfgfullpath}" ]; then rconpassword="${unavailable}" @@ -1299,7 +1296,7 @@ fn_info_game_q3(){ defaultmap=${defaultmap:-"NOT SET"} } -fn_info_game_ql(){ +fn_info_game_ql() { # Config if [ ! -f "${servercfgfullpath}" ]; then rconpassword="${unavailable}" @@ -1334,7 +1331,7 @@ fn_info_game_ql(){ fi } -fn_info_game_qw(){ +fn_info_game_qw() { # Config if [ ! -f "${servercfgfullpath}" ]; then rconpassword="${unavailable}" @@ -1358,7 +1355,7 @@ fn_info_game_qw(){ queryport=${port} } -fn_info_game_ro(){ +fn_info_game_ro() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -1378,7 +1375,7 @@ fn_info_game_ro(){ serverpassword=$(sed -nr 's/^GamePassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') adminpassword=$(sed -nr 's/^AdminPassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') port=$(sed -nr 's/^Port=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport=$((port+1)) + queryport=$((port + 1)) steamport="20610" steammasterport="28902" lanport=$(grep "LANServerPort=" "${servercfgfullpath}" | tr -cd '[:digit:]') @@ -1406,7 +1403,7 @@ fn_info_game_ro(){ defaultmap=${defaultmap:-"NOT SET"} } -fn_info_game_rtcw(){ +fn_info_game_rtcw() { # Config if [ ! -f "${servercfgfullpath}" ]; then rconpassword="${unavailable}" @@ -1432,7 +1429,7 @@ fn_info_game_rtcw(){ defaultmap=${defaultmap:-"NOT SET"} } -fn_info_game_rust(){ +fn_info_game_rust() { # Parameters servername=${servername:-"NOT SET"} port=${port:-"0"} @@ -1452,7 +1449,7 @@ fn_info_game_rust(){ salt=${salt:-"0"} } -fn_info_game_rw(){ +fn_info_game_rw() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -1474,12 +1471,12 @@ fn_info_game_rw(){ rconport=$(grep "rcon_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') maxplayers=$(grep "settings_max_players" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') port=$(grep "server_port" "${servercfgfullpath}" | grep -v "database_mysql_server_port" | grep -v "#" | tr -cd '[:digit:]') - port2=$((port+1)) - port3=$((port+2)) - port4=$((port+3)) + port2=$((port + 1)) + port3=$((port + 2)) + port4=$((port + 3)) queryport="${port}" - httpqueryport=$((port-1)) - gamemode=$(grep "settings_default_gamemode=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/settings_default_gamemode//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + httpqueryport=$((port - 1)) + gamemode=$(grep "settings_default_gamemode=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/settings_default_gamemode//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') gameworld=$(grep "server_world_name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/server_world_name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') configip=$(grep "server_ip" "${servercfgfullpath}" | grep -v "database_mysql_server_ip" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/server_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') @@ -1501,7 +1498,7 @@ fn_info_game_rw(){ fi } -fn_info_game_samp(){ +fn_info_game_samp() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="unnamed server" @@ -1527,7 +1524,7 @@ fn_info_game_samp(){ fi } -fn_info_game_sb(){ +fn_info_game_sb() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -1560,7 +1557,7 @@ fn_info_game_sb(){ fi } -fn_info_game_sbots(){ +fn_info_game_sbots() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -1583,7 +1580,7 @@ fn_info_game_sbots(){ maxplayers=${maxplayers:-"0"} } -fn_info_game_scpsl(){ +fn_info_game_scpsl() { # Config if [ -f "${servercfgfullpath}" ]; then servername=$(sed -nr 's/^server_name: (.*)$/\1/p' "${servercfgfullpath}") @@ -1604,7 +1601,7 @@ fn_info_game_scpsl(){ queryport=${port} } -fn_info_game_sdtd(){ +fn_info_game_sdtd() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -1626,7 +1623,7 @@ fn_info_game_sdtd(){ servername=$(grep "ServerName" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") serverpassword=$(grep "ServerPassword" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") port=$(grep "ServerPort" "${servercfgfullpath}" | grep -Eo 'value="[0-9]+"' | tr -cd '[:digit:]') - port3=$((port+2)) + port3=$((port + 2)) queryport=${port:-"0"} webadminenabled=$(grep "ControlPanelEnabled" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") webadminport=$(grep "ControlPanelPort" "${servercfgfullpath}" | tr -cd '[:digit:]') @@ -1660,7 +1657,7 @@ fn_info_game_sdtd(){ fi } -fn_info_game_sf(){ +fn_info_game_sf() { # Parameters servername=${selfname:-"NOT SET"} port=${port:-"0"} @@ -1668,7 +1665,7 @@ fn_info_game_sf(){ beaconport=${beaconport:-"0"} } -fn_info_game_sof2(){ +fn_info_game_sof2() { # Config if [ ! -f "${servercfgfullpath}" ]; then rconpassword="${unavailable}" @@ -1694,7 +1691,7 @@ fn_info_game_sof2(){ defaultmap=${defaultmap:-"NOT SET"} } -fn_info_game_sol(){ +fn_info_game_sol() { # Config if [ ! -f "${servercfgfullpath}" ]; then adminpassword="${unavailable}" @@ -1708,7 +1705,7 @@ fn_info_game_sol(){ maxplayers=$(grep "Max_Players=" "${servercfgfullpath}" | tr -cd '[:digit:]') port=$(grep "Port=" "${servercfgfullpath}" | tr -cd '[:digit:]') queryport="${port}" - filesport=$((port+10)) + filesport=$((port + 10)) servername=$(grep "Server_Name=" "${servercfgfullpath}" | awk -F '=' '{print $2}') serverpassword=$(grep "Game_Password=" "${servercfgfullpath}" | awk -F '=' '{print $2}') @@ -1722,7 +1719,7 @@ fn_info_game_sol(){ fi } -fn_info_game_source(){ +fn_info_game_source() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -1748,16 +1745,16 @@ fn_info_game_source(){ clientport=${clientport:-"0"} # Steamport can be between 26901-26910 and is normaly automatically set. # Some servers might support -steamport parameter to set - if [ "${steamport}" == "0" ]||[ -v "${steamport}" ]; then + if [ "${steamport}" == "0" ] || [ -v "${steamport}" ]; then steamport="$(echo "${ssinfo}" | grep "${srcdslinuxpid}" | awk '{print $5}' | grep ":269" | cut -d ":" -f2)" fi } -fn_info_game_spark(){ +fn_info_game_spark() { defaultmap=${defaultmap:-"NOT SET"} maxplayers=${maxplayers:-"0"} port=${port:-"0"} - queryport=$((port+1)) + queryport=$((port + 1)) servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} webadminuser=${webadminuser:-"NOT SET"} @@ -1767,7 +1764,7 @@ fn_info_game_spark(){ #mods=${mods:-"NOT SET"} } -fn_info_game_squad(){ +fn_info_game_squad() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -1788,7 +1785,7 @@ fn_info_game_squad(){ rconpassword=$(grep "Password=" "${servercfgdir}/Rcon.cfg" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') rconport=${rconport:-"0"} - if [ -z "${rconpassword}" ]||[ ${#rconpassword} == 1 ]; then + if [ -z "${rconpassword}" ] || [ ${#rconpassword} == 1 ]; then rconpassword="NOT SET" fi @@ -1799,7 +1796,7 @@ fn_info_game_squad(){ queryport=${queryport:-"0"} } -fn_info_game_st(){ +fn_info_game_st() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -1829,7 +1826,7 @@ fn_info_game_st(){ worldname=${worldname:-"NOT SET"} } -fn_info_game_terraria(){ +fn_info_game_terraria() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -1853,7 +1850,7 @@ fn_info_game_terraria(){ fi } -fn_info_game_stn(){ +fn_info_game_stn() { # Config if [ -f "${servercfgfullpath}" ]; then servername=$(sed -nr 's/^ServerName="(.*)"/\1/p' "${servercfgfullpath}") @@ -1873,7 +1870,7 @@ fn_info_game_stn(){ fi } -fn_info_game_ti(){ +fn_info_game_ti() { if [ -f "${servercfgfullpath}" ]; then servername=$(sed -nr 's/^ServerName="(.*)"/\1/p' "${servercfgfullpath}") maxplayers=$(sed -nr 's/^MaxPlayerCount=([0-9]+)/\1/' "${servercfgfullpath}") @@ -1883,7 +1880,7 @@ fn_info_game_ti(){ fi } -fn_info_game_ts3(){ +fn_info_game_ts3() { # Config if [ ! -f "${servercfgfullpath}" ]; then dbplugin="${unavailable}" @@ -1918,7 +1915,7 @@ fn_info_game_ts3(){ fi } -fn_info_game_tu(){ +fn_info_game_tu() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -1934,11 +1931,11 @@ fn_info_game_tu(){ # Parameters port=${port:-"0"} - steamport=$((port+1)) + steamport=$((port + 1)) queryport=${queryport:-"0"} } -fn_info_game_tw(){ +fn_info_game_tw() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="unnamed server" @@ -1965,7 +1962,7 @@ fn_info_game_tw(){ fi } -fn_info_game_ut99(){ +fn_info_game_ut99() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -1979,17 +1976,17 @@ fn_info_game_ut99(){ webadminuser="${unavailable}" webadminpass="${unavailable}" else - servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//') - serverpassword=$(grep "GamePassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/GamePassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//') - adminpassword=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//') + servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | sed 's/\r$//') + serverpassword=$(grep "GamePassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/GamePassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | sed 's/\r$//') + adminpassword=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | sed 's/\r$//') port=$(grep "Port" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^Port" | grep -v "#" | tr -cd '[:digit:]') - queryport=$((port+1)) + queryport=$((port + 1)) queryportgs=$(grep "OldQueryPortNumber" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') beaconport=$(grep "ServerBeaconPort" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - webadminenabled=$(grep "bEnabled" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bEnabled//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//') + webadminenabled=$(grep "bEnabled" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bEnabled//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | sed 's/\r$//') httpport=$(grep "ListenPort" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - webadminuser=$(grep "AdminUsername" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminUsername//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//') - webadminpass=$(grep "UTServerAdmin.UTServerAdmin" "${servercfgfullpath}" -A 4 | grep "AdminPassword" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//') + webadminuser=$(grep "AdminUsername" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminUsername//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | sed 's/\r$//') + webadminpass=$(grep "UTServerAdmin.UTServerAdmin" "${servercfgfullpath}" -A 4 | grep "AdminPassword" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | sed 's/\r$//') # Not set servername=${servername:-"NOT SET"} @@ -2009,7 +2006,7 @@ fn_info_game_ut99(){ defaultmap=${defaultmap:-"NOT SET"} } -fn_info_game_unreal2(){ +fn_info_game_unreal2() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -2027,7 +2024,7 @@ fn_info_game_unreal2(){ serverpassword=$(sed -nr 's/^GamePassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') adminpassword=$(sed -nr 's/^AdminPassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') port=$(sed -nr 's/^Port=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport=$((port+1)) + queryport=$((port + 1)) queryportgs=$(sed -nr 's/^OldQueryPortNumber=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') webadminenabled=$(sed -nr 's/^bEnabled=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') webadminport=$(sed -nr 's/^ListenPort=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') @@ -2051,15 +2048,15 @@ fn_info_game_unreal2(){ defaultmap=${defaultmap:-"NOT SET"} } -fn_info_game_unt(){ +fn_info_game_unt() { # Parameters servername=${selfname:-"NOT SET"} port=${port:-"0"} queryport=${port} - steamport=$((port+1)) + steamport=$((port + 1)) } -fn_info_game_ut(){ +fn_info_game_ut() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -2072,10 +2069,10 @@ fn_info_game_ut(){ # Parameters port=${port:-"0"} - queryport=$((port+1)) + queryport=$((port + 1)) } -fn_info_game_unreal2k4(){ +fn_info_game_unreal2k4() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -2094,7 +2091,7 @@ fn_info_game_unreal2k4(){ serverpassword=$(sed -nr 's/^GamePassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') adminpassword=$(sed -nr 's/^AdminPassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') port=$(sed -nr 's/^Port=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport=$((port+1)) + queryport=$((port + 1)) queryportgs=$(sed -nr 's/^OldQueryPortNumber=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') lanport=$(grep "LANServerPort=" "${servercfgfullpath}" | tr -cd '[:digit:]') webadminenabled=$(sed -nr 's/^bEnabled=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') @@ -2117,7 +2114,7 @@ fn_info_game_unreal2k4(){ fi } -fn_info_game_ut3(){ +fn_info_game_ut3() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -2155,12 +2152,12 @@ fn_info_game_ut3(){ defaultmap=${defaultmap:-"NOT SET"} } -fn_info_game_vh(){ +fn_info_game_vh() { # Parameters port=${port:-"0"} # Query port only enabled if public server if [ "${public}" != "0" ]; then - queryport=$((port+1)) + queryport=$((port + 1)) else querymode="1" fi @@ -2169,7 +2166,7 @@ fn_info_game_vh(){ servername=${servername:-"NOT SET"} } -fn_info_game_vints(){ +fn_info_game_vints() { if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" maxplayers="${unavailable}" @@ -2190,7 +2187,7 @@ fn_info_game_vints(){ fi } -fn_info_game_wet(){ +fn_info_game_wet() { # Config if [ ! -f "${servercfgfullpath}" ]; then rconpassword="${unavailable}" @@ -2219,7 +2216,7 @@ fn_info_game_wet(){ fi } -fn_info_game_wf(){ +fn_info_game_wf() { # Config if [ ! -f "${servercfgfullpath}" ]; then rconpassword="${unavailable}" @@ -2242,8 +2239,7 @@ fn_info_game_wf(){ webadminport=${webadminport:-"0"} } - -fn_info_game_wmc(){ +fn_info_game_wmc() { if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" maxplayers="${zero}" @@ -2259,7 +2255,7 @@ fn_info_game_wmc(){ maxplayers=$(sed -nr 's/^player_limit: ([-]*[0-9])/\1/p' "${servercfgfullpath}") configip=$(sed -nr 's/^[ ]+host: ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+):[0-9]+/\1/p' "${servercfgfullpath}") - if [ "${maxplayers}" == "-1" ]||[ "${maxplayers}" == "0" ]; then + if [ "${maxplayers}" == "-1" ] || [ "${maxplayers}" == "0" ]; then maxplayers="UNLIMITED" fi @@ -2271,7 +2267,7 @@ fn_info_game_wmc(){ fi } -fn_info_game_wurm(){ +fn_info_game_wurm() { # Config if [ ! -f "${servercfgfullpath}" ]; then port="${zero}" @@ -2367,7 +2363,7 @@ elif [ "${shortname}" == "kf2" ]; then fn_info_game_kf2 elif [ "${shortname}" == "lo" ]; then fn_info_game_lo -elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "pmc" ]; then +elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ]; then fn_info_game_mc elif [ "${shortname}" == "mcb" ]; then fn_info_game_mcb @@ -2389,7 +2385,7 @@ elif [ "${shortname}" == "pc2" ]; then fn_info_game_pc2 elif [ "${shortname}" == "pstbs" ]; then fn_info_game_pstbs -elif [ "${shortname}" == "pvr" ];then +elif [ "${shortname}" == "pvr" ]; then fn_info_game_pvr elif [ "${shortname}" == "pz" ]; then fn_info_game_pz @@ -2415,7 +2411,7 @@ elif [ "${shortname}" == "sb" ]; then fn_info_game_sb elif [ "${shortname}" == "sbots" ]; then fn_info_game_sbots -elif [ "${shortname}" == "scpsl" ]||[ "${shortname}" == "scpslsm" ]; then +elif [ "${shortname}" == "scpsl" ] || [ "${shortname}" == "scpslsm" ]; then fn_info_game_scpsl elif [ "${shortname}" == "sdtd" ]; then fn_info_game_sdtd @@ -2465,7 +2461,7 @@ elif [ "${shortname}" == "wmc" ]; then fn_info_game_wmc elif [ "${shortname}" == "wurm" ]; then fn_info_game_wurm -elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsrc" ]; then +elif [ "${engine}" == "source" ] || [ "${engine}" == "goldsrc" ]; then fn_info_game_source elif [ "${engine}" == "unreal2" ]; then fn_info_game_unreal2 @@ -2473,7 +2469,7 @@ fi # External IP address if [ -z "${extip}" ]; then - extip="$(curl --connect-timeout 10 -s https://api.ipify.org 2>/dev/null)" + extip="$(curl --connect-timeout 10 -s https://api.ipify.org 2> /dev/null)" exitcode=$? # Should ifconfig.co return an error will use last known IP. if [ ${exitcode} -eq 0 ]; then @@ -2507,16 +2503,16 @@ fi # Steam Master Server - checks if detected by master server. # Checked after config init, as the queryport is needed if [ -z "${displaymasterserver}" ]; then - if [ "$(command -v jq 2>/dev/null)" ]; then - if [ "${ip}" ]&&[ "${port}" ]; then - if [ "${steammaster}" == "true" ]||[ "${commandname}" == "DEV-QUERY-RAW" ]; then + if [ "$(command -v jq 2> /dev/null)" ]; then + if [ "${ip}" ] && [ "${port}" ]; then + if [ "${steammaster}" == "true" ] || [ "${commandname}" == "DEV-QUERY-RAW" ]; then # Will query server IP addresses first. for queryip in "${queryips[@]}"; do - masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${queryip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" '.response.servers[] | select((.gameport == ($port|tonumber) or (.gameport == ($queryport|tonumber)))) | .addr' | wc -l 2>/dev/null)" + masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${queryip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" '.response.servers[] | select((.gameport == ($port|tonumber) or (.gameport == ($queryport|tonumber)))) | .addr' | wc -l 2> /dev/null)" done # Should that not work it will try the external IP. if [ "${masterserver}" == "0" ]; then - masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${extip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" '.response.servers[] | select((.gameport == ($port|tonumber) or (.gameport == ($queryport|tonumber)))) | .addr' | wc -l 2>/dev/null)" + masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${extip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" '.response.servers[] | select((.gameport == ($port|tonumber) or (.gameport == ($queryport|tonumber)))) | .addr' | wc -l 2> /dev/null)" fi if [ "${masterserver}" == "0" ]; then displaymasterserver="false" diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index f0def5b0e..cfad349ac 100755 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -8,7 +8,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Separator is different for details. -fn_messages_separator(){ +fn_messages_separator() { if [ "${commandname}" == "DETAILS" ]; then printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = else @@ -17,7 +17,7 @@ fn_messages_separator(){ } # Removes the passwords form all but details. -fn_info_message_password_strip(){ +fn_info_message_password_strip() { if [ "${commandname}" != "DETAILS" ]; then if [ "${serverpassword}" ]; then serverpassword="********" @@ -55,7 +55,7 @@ fn_info_message_password_strip(){ # Alert Summary # used with alertlog -fn_info_message_head(){ +fn_info_message_head() { echo -e "" echo -e "${lightyellow}Alert Summary${default}" fn_messages_separator @@ -75,7 +75,7 @@ fn_info_message_head(){ echo -e "${ip}:${port}" } -fn_info_message_distro(){ +fn_info_message_distro() { # # Distro Details # ================================= @@ -106,7 +106,7 @@ fn_info_message_distro(){ } | column -s $'\t' -t } -fn_info_message_server_resource(){ +fn_info_message_server_resource() { # # Server Resource # ================================= @@ -172,7 +172,7 @@ fn_info_message_server_resource(){ } | column -s $'\t' -t } -fn_info_message_gameserver_resource(){ +fn_info_message_gameserver_resource() { # # Game Server Resource Usage # ================================= @@ -188,7 +188,7 @@ fn_info_message_gameserver_resource(){ echo -e "${lightyellow}Game Server Resource Usage${default}" fn_messages_separator { - if [ "${status}" != "0" ]&&[ -v status ]; then + if [ "${status}" != "0" ] && [ -v status ]; then if [ -n "${cpuused}" ]; then echo -e "${lightblue}CPU Used:\t${default}${cpuused}%${default}" else @@ -204,7 +204,7 @@ fn_info_message_gameserver_resource(){ echo -e "${lightblue}Mem Used:\t${default}0%\t0MB${default}" fi } | column -s $'\t' -t - echo -e "" + echo -e "" { echo -e "${lightyellow}Storage${default}" echo -e "${lightblue}Total:\t${default}${rootdirdu}" @@ -215,7 +215,7 @@ fn_info_message_gameserver_resource(){ } | column -s $'\t' -t } -fn_info_message_gameserver(){ +fn_info_message_gameserver() { # # Counter-Strike: Global Offensive Server Details # ================================= @@ -326,15 +326,15 @@ fn_info_message_gameserver(){ echo -e "${lightblue}Maxplayers:\t${default}${maxplayers}" fi else - if [ -n "${gdplayers}" ]&&[ -n "${gdmaxplayers}" ]; then + if [ -n "${gdplayers}" ] && [ -n "${gdmaxplayers}" ]; then echo -e "${lightblue}Players:\t${default}${gdplayers}/${gdmaxplayers}" - elif [ -n "${gdplayers}" ]&&[ -n "${maxplayers}" ]; then + elif [ -n "${gdplayers}" ] && [ -n "${maxplayers}" ]; then echo -e "${lightblue}Players:\t${default}${gdplayers}/${maxplayers}" - elif [ -z "${gdplayers}" ]&&[ -n "${gdmaxplayers}" ]; then + elif [ -z "${gdplayers}" ] && [ -n "${gdmaxplayers}" ]; then echo -e "${lightblue}Players:\t${default}0/${gdmaxplayers}" - elif [ -n "${gdplayers}" ]&&[ -z "${gdmaxplayers}" ]; then + elif [ -n "${gdplayers}" ] && [ -z "${gdmaxplayers}" ]; then echo -e "${lightblue}Players:\t${default}${gdplayers}/∞" - elif [ -z "${gdplayers}" ]&&[ -z "${gdmaxplayers}" ]&&[ -n "${maxplayers}" ]; then + elif [ -z "${gdplayers}" ] && [ -z "${gdmaxplayers}" ] && [ -n "${maxplayers}" ]; then echo -e "${lightblue}Maxplayers:\t${default}${maxplayers}" fi fi @@ -500,7 +500,7 @@ fn_info_message_gameserver(){ echo -e "" } -fn_info_message_script(){ +fn_info_message_script() { # csgoserver Script Details # ================================= # Script name: csgoserver @@ -596,7 +596,7 @@ fn_info_message_script(){ } | column -s $'\t' -t } -fn_info_message_backup(){ +fn_info_message_backup() { # # Backups # ================================= @@ -609,7 +609,7 @@ fn_info_message_backup(){ echo -e "" echo -e "${lightgreen}Backups${default}" fn_messages_separator - if [ ! -d "${backupdir}" ]||[ "${backupcount}" == "0" ]; then + if [ ! -d "${backupdir}" ] || [ "${backupcount}" == "0" ]; then echo -e "No Backups created" else { @@ -628,7 +628,7 @@ fn_info_message_backup(){ fi } -fn_info_message_commandlineparms(){ +fn_info_message_commandlineparms() { # # Command-line Parameters # ================================= @@ -645,7 +645,7 @@ fn_info_message_commandlineparms(){ echo -e "${preexecutable} ${executable} ${startparameters}" } -fn_info_message_ports_edit(){ +fn_info_message_ports_edit() { # # Ports # ================================= @@ -658,20 +658,20 @@ fn_info_message_ports_edit(){ startparameterslocation="${red}UNKNOWN${default}" # engines/games that require editing in the config file. - local ports_edit_array=( "ac" "arma3" "armar" "bo" "bt" "cd" "dst" "eco" "idtech2" "idtech3" "idtech3_ql" "jc2" "jc3" "lwjgl2" "mcb" "mumble" "pc" "pc2" "pz" "qw" "refractor" "renderware" "rw" "sb" "sdtd" "st" "stn" "ts3" "tw" "terraria" "unreal" "unreal2" "unreal3" "vints" "wurm") + local ports_edit_array=("ac" "arma3" "armar" "bo" "bt" "cd" "dst" "eco" "idtech2" "idtech3" "idtech3_ql" "jc2" "jc3" "lwjgl2" "mcb" "mumble" "pc" "pc2" "pz" "qw" "refractor" "renderware" "rw" "sb" "sdtd" "st" "stn" "ts3" "tw" "terraria" "unreal" "unreal2" "unreal3" "vints" "wurm") for port_edit in "${ports_edit_array[@]}"; do if [ "${shortname}" == "ut3" ]; then startparameterslocation="${servercfgdir}/UTWeb.ini" elif [ "${shortname}" == "kf2" ]; then startparameterslocation="${servercfgdir}/LinuxServer-KFEngine.ini\n${servercfgdir}/KFWeb.ini" - elif [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]||[ "${shortname}" == "${port_edit}" ]; then + elif [ "${engine}" == "${port_edit}" ] || [ "${gamename}" == "${port_edit}" ] || [ "${shortname}" == "${port_edit}" ]; then startparameterslocation="${servercfgfullpath}" fi done # engines/games that require editing the start parameters. - local ports_edit_array=( "av" "col" "fctr" "goldsrc" "hw" "iw3.0" "ioquake3" "qfusion" "rust" "scpsl" "scpslsm" "sol" "spark" "source" "unreal4" "arma3" "dayz" "unt" "vh" ) + local ports_edit_array=("av" "col" "fctr" "goldsrc" "hw" "iw3.0" "ioquake3" "qfusion" "rust" "scpsl" "scpslsm" "sol" "spark" "source" "unreal4" "arma3" "dayz" "unt" "vh") for port_edit in "${ports_edit_array[@]}"; do - if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]||[ "${shortname}" == "${port_edit}" ]; then + if [ "${engine}" == "${port_edit}" ] || [ "${gamename}" == "${port_edit}" ] || [ "${shortname}" == "${port_edit}" ]; then startparameterslocation="${configdirserver}" fi done @@ -679,7 +679,7 @@ fn_info_message_ports_edit(){ echo -e "" } -fn_info_message_ports(){ +fn_info_message_ports() { echo -e "${lightblue}Useful port diagnostic command:${default}" if [ "${shortname}" == "armar" ]; then echo -e "ss -tuplwn | grep enfMain" @@ -687,7 +687,7 @@ fn_info_message_ports(){ echo -e "ss -tuplwn | grep AvorionServer" elif [ "${shortname}" == "bf1942" ]; then echo -e "ss -tuplwn | grep bf1942_lnxded" - elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "pmc" ]||[ "${shortname}" == "rw" ]||[ "${shortname}" == "wmc" ]; then + elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ] || [ "${shortname}" == "rw" ] || [ "${shortname}" == "wmc" ]; then echo -e "ss -tuplwn | grep java" elif [ "${shortname}" == "terraria" ]; then echo -e "ss -tuplwn | grep Main" @@ -702,7 +702,7 @@ fn_info_message_ports(){ echo -e "" } -fn_info_message_statusbottom(){ +fn_info_message_statusbottom() { echo -e "" if [ "${status}" == "0" ]; then echo -e "${lightblue}Status:\t${red}STOPPED${default}" @@ -712,7 +712,7 @@ fn_info_message_statusbottom(){ echo -e "" } -fn_info_logs(){ +fn_info_logs() { echo -e "" echo -e "${selfname} Logs" echo -e "=================================" @@ -750,7 +750,7 @@ fn_info_logs(){ else echo -e "${gamelogdir}" # dos2unix sed 's/\r//' - tail "${gamelogdir}"/* 2>/dev/null | grep -v "==>" | sed '/^$/d' | sed 's/\r//' | tail -25 + tail "${gamelogdir}"/* 2> /dev/null | grep -v "==>" | sed '/^$/d' | sed 's/\r//' | tail -25 fi echo -e "" fi @@ -766,7 +766,7 @@ fn_info_logs(){ # Query 27015 udp 1 # RCON 27020 tcp 1 -fn_port(){ +fn_port() { if [ "${1}" == "header" ]; then echo -e "${lightblue}DESCRIPTION\tPORT\tPROTOCOL\tLISTEN${default}" else @@ -777,7 +777,7 @@ fn_port(){ fi } -fn_info_message_ac(){ +fn_info_message_ac() { { fn_port "header" fn_port "Game" port udp @@ -787,7 +787,7 @@ fn_info_message_ac(){ } | column -s $'\t' -t } -fn_info_message_ark(){ +fn_info_message_ark() { { fn_port "header" fn_port "Game" port udp @@ -797,7 +797,7 @@ fn_info_message_ark(){ } | column -s $'\t' -t } -fn_info_message_arma3(){ +fn_info_message_arma3() { { fn_port "header" fn_port "Game" port udp @@ -809,7 +809,7 @@ fn_info_message_arma3(){ } | column -s $'\t' -t } -fn_info_message_armar(){ +fn_info_message_armar() { { fn_port "header" fn_port "Game" port udp @@ -818,7 +818,7 @@ fn_info_message_armar(){ } | column -s $'\t' -t } -fn_info_message_av(){ +fn_info_message_av() { { fn_port "header" fn_port "Game" port udp @@ -829,7 +829,7 @@ fn_info_message_av(){ } | column -s $'\t' -t } -fn_info_message_bf1942(){ +fn_info_message_bf1942() { { fn_port "header" fn_port "Game" port udp @@ -837,7 +837,7 @@ fn_info_message_bf1942(){ } | column -s $'\t' -t } -fn_info_message_bfv(){ +fn_info_message_bfv() { { fn_port "header" fn_port "Game" port udp @@ -845,7 +845,7 @@ fn_info_message_bfv(){ } | column -s $'\t' -t } -fn_info_message_bo(){ +fn_info_message_bo() { { fn_port "header" fn_port "Game" port udp @@ -853,7 +853,7 @@ fn_info_message_bo(){ } | column -s $'\t' -t } -fn_info_message_bt(){ +fn_info_message_bt() { { fn_port "header" fn_port "Game" port udp @@ -861,7 +861,7 @@ fn_info_message_bt(){ } | column -s $'\t' -t } -fn_info_message_bt1944(){ +fn_info_message_bt1944() { { fn_port "header" fn_port "Game" port udp @@ -870,7 +870,7 @@ fn_info_message_bt1944(){ } | column -s $'\t' -t } -fn_info_messages_cd(){ +fn_info_messages_cd() { { fn_port "header" fn_port "Game" port udp @@ -879,7 +879,7 @@ fn_info_messages_cd(){ } | column -s $'\t' -t } -fn_info_message_cmw(){ +fn_info_message_cmw() { fn_info_message_password_strip { fn_port "header" @@ -889,7 +889,7 @@ fn_info_message_cmw(){ } | column -s $'\t' -t } -fn_info_message_cod(){ +fn_info_message_cod() { { fn_port "header" fn_port "Game" port udp @@ -897,7 +897,7 @@ fn_info_message_cod(){ } | column -s $'\t' -t } -fn_info_message_coduo(){ +fn_info_message_coduo() { { fn_port "header" fn_port "Game" port udp @@ -905,7 +905,7 @@ fn_info_message_coduo(){ } | column -s $'\t' -t } -fn_info_message_cod2(){ +fn_info_message_cod2() { { fn_port "header" fn_port "Game" port udp @@ -913,7 +913,7 @@ fn_info_message_cod2(){ } | column -s $'\t' -t } -fn_info_message_cod4(){ +fn_info_message_cod4() { { fn_port "header" fn_port "Game" port udp @@ -921,7 +921,7 @@ fn_info_message_cod4(){ } | column -s $'\t' -t } -fn_info_message_codwaw(){ +fn_info_message_codwaw() { { fn_port "header" fn_port "Game" port udp @@ -929,7 +929,7 @@ fn_info_message_codwaw(){ } | column -s $'\t' -t } -fn_info_message_col(){ +fn_info_message_col() { { fn_port "header" fn_port "Game" port udp @@ -938,7 +938,7 @@ fn_info_message_col(){ } | column -s $'\t' -t } -fn_info_message_csgo(){ +fn_info_message_csgo() { { fn_port "header" fn_port "Game" port udp @@ -949,7 +949,7 @@ fn_info_message_csgo(){ } | column -s $'\t' -t } -fn_info_message_dayz(){ +fn_info_message_dayz() { { fn_port "header" fn_port "Game" port udp @@ -959,7 +959,7 @@ fn_info_message_dayz(){ } | column -s $'\t' -t } -fn_info_message_dodr(){ +fn_info_message_dodr() { { fn_port "header" fn_port "Game" port udp @@ -967,7 +967,7 @@ fn_info_message_dodr(){ } | column -s $'\t' -t } -fn_info_message_dst(){ +fn_info_message_dst() { { fn_port "header" fn_port "Game: Server" port udp @@ -977,7 +977,7 @@ fn_info_message_dst(){ } | column -s $'\t' -t } -fn_info_message_eco(){ +fn_info_message_eco() { { fn_port "header" fn_port "Game" port udp @@ -985,7 +985,7 @@ fn_info_message_eco(){ } | column -s $'\t' -t } -fn_info_message_etl(){ +fn_info_message_etl() { { fn_port "header" fn_port "Game" port udp @@ -993,7 +993,7 @@ fn_info_message_etl(){ } | column -s $'\t' -t } -fn_info_message_fctr(){ +fn_info_message_fctr() { { fn_port "header" fn_port "Game" port udp @@ -1001,7 +1001,7 @@ fn_info_message_fctr(){ } | column -s $'\t' -t } -fn_info_message_goldsrc(){ +fn_info_message_goldsrc() { { fn_port "header" fn_port "Game" port udp @@ -1009,7 +1009,7 @@ fn_info_message_goldsrc(){ } | column -s $'\t' -t } -fn_info_message_hw(){ +fn_info_message_hw() { { fn_port "header" fn_port "Game" port udp @@ -1017,7 +1017,7 @@ fn_info_message_hw(){ } | column -s $'\t' -t } -fn_info_message_ins(){ +fn_info_message_ins() { { fn_port "header" fn_port "Game" port udp @@ -1028,7 +1028,7 @@ fn_info_message_ins(){ } | column -s $'\t' -t } -fn_info_message_inss(){ +fn_info_message_inss() { { fn_port "header" fn_port "Game" port udp @@ -1037,7 +1037,7 @@ fn_info_message_inss(){ } | column -s $'\t' -t } -fn_info_message_jc2(){ +fn_info_message_jc2() { { fn_port "header" fn_port "Game" port udp @@ -1045,7 +1045,7 @@ fn_info_message_jc2(){ } | column -s $'\t' -t } -fn_info_message_jc3(){ +fn_info_message_jc3() { { fn_port "header" fn_port "Game" port udp @@ -1055,23 +1055,23 @@ fn_info_message_jc3(){ } | column -s $'\t' -t } -fn_info_message_jk2(){ +fn_info_message_jk2() { { fn_port "header" fn_port "Game" port udp } | column -s $'\t' -t } -fn_info_message_kf(){ +fn_info_message_kf() { { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - fn_port "Query (GameSpy)" queryportgs udp - fn_port "Web Admin" webadminport tcp - fn_port "LAN" lanport udp - fn_port "Steam" steamport udp - fn_port "Steam Master" steammasterport udp + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "Query (GameSpy)" queryportgs udp + fn_port "Web Admin" webadminport tcp + fn_port "LAN" lanport udp + fn_port "Steam" steamport udp + fn_port "Steam Master" steammasterport udp } | column -s $'\t' -t echo -e "" echo -e "${lightgreen}${servername} Web Admin${default}" @@ -1084,7 +1084,7 @@ fn_info_message_kf(){ } | column -s $'\t' -t } -fn_info_message_kf2(){ +fn_info_message_kf2() { fn_info_message_password_strip { fn_port "header" @@ -1103,7 +1103,7 @@ fn_info_message_kf2(){ } | column -s $'\t' -t } -fn_info_message_lo(){ +fn_info_message_lo() { { fn_port "header" fn_port "Game" port udp @@ -1111,7 +1111,7 @@ fn_info_message_lo(){ } | column -s $'\t' -t } -fn_info_message_mc(){ +fn_info_message_mc() { { fn_port "header" fn_port "Game" port tcp @@ -1120,7 +1120,7 @@ fn_info_message_mc(){ } | column -s $'\t' -t } -fn_info_message_mcb(){ +fn_info_message_mcb() { { fn_port "header" fn_port "Game" port udp @@ -1128,7 +1128,7 @@ fn_info_message_mcb(){ } | column -s $'\t' -t } -fn_info_message_mh(){ +fn_info_message_mh() { { fn_port "header" fn_port "Game" port udp @@ -1137,14 +1137,14 @@ fn_info_message_mh(){ } | column -s $'\t' -t } -fn_info_message_mohaa(){ +fn_info_message_mohaa() { { fn_port "header" fn_port "Game" port udp } | column -s $'\t' -t } -fn_info_message_mom(){ +fn_info_message_mom() { { fn_port "header" fn_port "Game" port udp @@ -1152,7 +1152,7 @@ fn_info_message_mom(){ } | column -s $'\t' -t } -fn_info_message_mta(){ +fn_info_message_mta() { { fn_port "header" fn_port "Game" port udp @@ -1163,7 +1163,7 @@ fn_info_message_mta(){ } | column -s $'\t' -t } -fn_info_message_mumble(){ +fn_info_message_mumble() { { fn_port "header" fn_port "Voice" port udp @@ -1171,7 +1171,7 @@ fn_info_message_mumble(){ } | column -s $'\t' -t } -fn_info_message_onset(){ +fn_info_message_onset() { { fn_port "header" fn_port "Game" port udp @@ -1180,7 +1180,7 @@ fn_info_message_onset(){ } | column -s $'\t' -t } -fn_info_message_pc(){ +fn_info_message_pc() { { fn_port "header" fn_port "Game" port udp @@ -1189,7 +1189,7 @@ fn_info_message_pc(){ } | column -s $'\t' -t } -fn_info_message_pc2(){ +fn_info_message_pc2() { { fn_port "header" fn_port "Game" port udp @@ -1198,7 +1198,7 @@ fn_info_message_pc2(){ } | column -s $'\t' -t } -fn_info_message_pstbs(){ +fn_info_message_pstbs() { { fn_port "header" fn_port "Game" port udp @@ -1207,7 +1207,7 @@ fn_info_message_pstbs(){ } | column -s $'\t' -t } -fn_info_message_pvr(){ +fn_info_message_pvr() { { fn_port "header" fn_port "Game" port udp @@ -1217,7 +1217,7 @@ fn_info_message_pvr(){ } | column -s $'\t' -t } -fn_info_message_pz(){ +fn_info_message_pz() { { fn_port "header" fn_port "Game" port udp @@ -1225,28 +1225,28 @@ fn_info_message_pz(){ } | column -s $'\t' -t } -fn_info_message_qw(){ +fn_info_message_qw() { { fn_port "header" fn_port "Game" port udp } | column -s $'\t' -t } -fn_info_message_q2(){ +fn_info_message_q2() { { fn_port "header" fn_port "Game" port udp } | column -s $'\t' -t } -fn_info_message_q3(){ +fn_info_message_q3() { { fn_port "header" fn_port "Game" port udp } | column -s $'\t' -t } -fn_info_message_ql(){ +fn_info_message_ql() { { fn_port "header" fn_port "Game" port udp @@ -1256,7 +1256,7 @@ fn_info_message_ql(){ } | column -s $'\t' -t } -fn_info_message_ro(){ +fn_info_message_ro() { { fn_port "header" fn_port "Game" port udp @@ -1277,14 +1277,14 @@ fn_info_message_ro(){ } | column -s $'\t' -t } -fn_info_message_rtcw(){ +fn_info_message_rtcw() { { fn_port "header" fn_port "Game" port udp } | column -s $'\t' -t } -fn_info_message_rust(){ +fn_info_message_rust() { { fn_port "header" fn_port "Game" port udp @@ -1294,7 +1294,7 @@ fn_info_message_rust(){ } | column -s $'\t' -t } -fn_info_message_rw(){ +fn_info_message_rw() { { fn_port "header" fn_port "Game" port udp @@ -1310,7 +1310,7 @@ fn_info_message_rw(){ } | column -s $'\t' -t } -fn_info_message_samp(){ +fn_info_message_samp() { { fn_port "header" fn_port "Game" port udp @@ -1318,7 +1318,7 @@ fn_info_message_samp(){ } | column -s $'\t' -t } -fn_info_message_sb(){ +fn_info_message_sb() { { fn_port "header" fn_port "Game" port udp @@ -1327,7 +1327,7 @@ fn_info_message_sb(){ } | column -s $'\t' -t } -fn_info_message_sbots(){ +fn_info_message_sbots() { { fn_port "header" fn_port "Game" port udp @@ -1335,14 +1335,14 @@ fn_info_message_sbots(){ } | column -s $'\t' -t } -fn_info_message_scpsl(){ +fn_info_message_scpsl() { { fn_port "header" fn_port "Game" port tcp } | column -s $'\t' -t } -fn_info_message_sdtd(){ +fn_info_message_sdtd() { fn_info_message_password_strip { fn_port "header" @@ -1371,7 +1371,7 @@ fn_info_message_sdtd(){ } | column -s $'\t' -t } -fn_info_message_sf(){ +fn_info_message_sf() { { fn_port "header" fn_port "Game" port udp @@ -1380,7 +1380,7 @@ fn_info_message_sf(){ } | column -s $'\t' -t } -fn_info_message_sof2(){ +fn_info_message_sof2() { { fn_port "header" fn_port "Game" port udp @@ -1388,7 +1388,7 @@ fn_info_message_sof2(){ } | column -s $'\t' -t } -fn_info_message_sol(){ +fn_info_message_sol() { { fn_port "header" fn_port "Game" port udp @@ -1396,7 +1396,7 @@ fn_info_message_sol(){ fn_port "Files" filesport tcp } | column -s $'\t' -t } -fn_info_message_source(){ +fn_info_message_source() { { fn_port "header" fn_port "Game" port udp @@ -1404,14 +1404,14 @@ fn_info_message_source(){ fn_port "RCON" rconport tcp fn_port "SourceTV" sourcetvport udp # Will not show if unaviable - if [ "${steamport}" == "0" ]||[ -v "${steamport}" ]; then + if [ "${steamport}" == "0" ] || [ -v "${steamport}" ]; then fn_port "Steam" steamport udp fi fn_port "Client" clientport udp } | column -s $'\t' -t } -fn_info_message_spark(){ +fn_info_message_spark() { fn_info_message_password_strip { fn_port "header" @@ -1429,7 +1429,7 @@ fn_info_message_spark(){ } | column -s $'\t' -t } -fn_info_message_squad(){ +fn_info_message_squad() { { fn_port "header" fn_port "Game" port udp @@ -1438,7 +1438,7 @@ fn_info_message_squad(){ } | column -s $'\t' -t } -fn_info_message_st(){ +fn_info_message_st() { { fn_port "header" fn_port "Game" port udp @@ -1453,7 +1453,7 @@ fn_info_message_st(){ } | column -s $'\t' -t } -fn_info_message_ti(){ +fn_info_message_ti() { { fn_port "header" fn_port "Game" port udp @@ -1461,7 +1461,7 @@ fn_info_message_ti(){ } | column -s $'\t' -t } -fn_info_message_ts3(){ +fn_info_message_ts3() { { fn_port "header" fn_port "Voice" port udp @@ -1474,7 +1474,7 @@ fn_info_message_ts3(){ } | column -s $'\t' -t } -fn_info_message_tw(){ +fn_info_message_tw() { { fn_port "header" fn_port "Game" port udp @@ -1482,7 +1482,7 @@ fn_info_message_tw(){ } | column -s $'\t' -t } -fn_info_message_terraria(){ +fn_info_message_terraria() { { fn_port "header" fn_port "Game" port tcp @@ -1490,7 +1490,7 @@ fn_info_message_terraria(){ } | column -s $'\t' -t } -fn_info_message_tu(){ +fn_info_message_tu() { { fn_port "header" fn_port "Game" port udp @@ -1499,7 +1499,7 @@ fn_info_message_tu(){ } | column -s $'\t' -t } -fn_info_message_unreal(){ +fn_info_message_unreal() { fn_info_message_password_strip { fn_port "header" @@ -1519,14 +1519,14 @@ fn_info_message_unreal(){ } | column -s $'\t' -t } -fn_info_message_ut2k4(){ +fn_info_message_ut2k4() { { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - fn_port "Query (GameSpy)" queryportgs udp - fn_port "Web Admin" webadminport tcp - fn_port "LAN" lanport udp + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "Query (GameSpy)" queryportgs udp + fn_port "Web Admin" webadminport tcp + fn_port "LAN" lanport udp } | column -s $'\t' -t echo -e "" echo -e "${lightgreen}${servername} Web Admin${default}" @@ -1539,7 +1539,7 @@ fn_info_message_ut2k4(){ } | column -s $'\t' -t } -fn_info_message_unreal(){ +fn_info_message_unreal() { fn_info_message_password_strip { fn_port "header" @@ -1559,7 +1559,7 @@ fn_info_message_unreal(){ } | column -s $'\t' -t } -fn_info_message_unt(){ +fn_info_message_unt() { { fn_port "header" fn_port "Game" port udp @@ -1568,7 +1568,7 @@ fn_info_message_unt(){ } | column -s $'\t' -t } -fn_info_message_ut(){ +fn_info_message_ut() { { fn_port "header" fn_port "Game" port udp @@ -1576,7 +1576,7 @@ fn_info_message_ut(){ } | column -s $'\t' -t } -fn_info_message_ut3(){ +fn_info_message_ut3() { fn_info_message_password_strip { fn_port "header" @@ -1595,7 +1595,7 @@ fn_info_message_ut3(){ } | column -s $'\t' -t } -fn_info_message_vh(){ +fn_info_message_vh() { { fn_port "header" fn_port "Game" port udp @@ -1603,14 +1603,14 @@ fn_info_message_vh(){ } | column -s $'\t' -t } -fn_info_message_vints(){ +fn_info_message_vints() { { fn_port "header" fn_port "Game" port tcp } | column -s $'\t' -t } -fn_info_message_wet(){ +fn_info_message_wet() { { fn_port "header" fn_port "Game" port udp @@ -1618,7 +1618,7 @@ fn_info_message_wet(){ } | column -s $'\t' -t } -fn_info_message_wf(){ +fn_info_message_wf() { { fn_port "header" fn_port "Game" port udp @@ -1626,7 +1626,7 @@ fn_info_message_wf(){ } | column -s $'\t' -t } -fn_info_message_wurm(){ +fn_info_message_wurm() { { fn_port "header" fn_port "Game" port tcp @@ -1634,7 +1634,7 @@ fn_info_message_wurm(){ } | column -s $'\t' -t } -fn_info_message_stn(){ +fn_info_message_stn() { { fn_port "header" fn_port "Game" port udp @@ -1642,7 +1642,7 @@ fn_info_message_stn(){ } | column -s $'\t' -t } -fn_info_message_select_engine(){ +fn_info_message_select_engine() { # Display details depending on game or engine. if [ "${shortname}" == "ac" ]; then fn_info_message_ac @@ -1712,7 +1712,7 @@ fn_info_message_select_engine(){ fn_info_message_kf2 elif [ "${shortname}" == "lo" ]; then fn_info_message_lo - elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "pmc" ]||[ "${shortname}" == "wmc" ]; then + elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ] || [ "${shortname}" == "wmc" ]; then fn_info_message_mc elif [ "${shortname}" == "mcb" ]; then fn_info_message_mcb @@ -1756,7 +1756,7 @@ fn_info_message_select_engine(){ fn_info_message_sb elif [ "${shortname}" == "sbots" ]; then fn_info_message_sbots - elif [ "${shortname}" == "scpsl" ]||[ "${shortname}" == "scpslsm" ]; then + elif [ "${shortname}" == "scpsl" ] || [ "${shortname}" == "scpslsm" ]; then fn_info_message_scpsl elif [ "${shortname}" == "sdtd" ]; then fn_info_message_sdtd diff --git a/lgsm/functions/info_stats.sh b/lgsm/functions/info_stats.sh index 03bebe420..93c01cf32 100755 --- a/lgsm/functions/info_stats.sh +++ b/lgsm/functions/info_stats.sh @@ -20,7 +20,7 @@ fi # to allow human readable uuid's. # e.g angry_proskuriakova_38a9ef76-4ae3-46a6-a895-7af474831eba -if [ ! -f "${datadir}/uuid-${selfname}.txt" ]||[ ! -f "${datadir}/uuid-install.txt" ]; then +if [ ! -f "${datadir}/uuid-${selfname}.txt" ] || [ ! -f "${datadir}/uuid-install.txt" ]; then # download dictionary words if [ ! -f "${datadir}/name-left.csv" ]; then fn_fetch_file_github "lgsm/data" "name-left.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nohash" @@ -30,7 +30,7 @@ if [ ! -f "${datadir}/uuid-${selfname}.txt" ]||[ ! -f "${datadir}/uuid-install.t fi # generate instance uuid - if [ -n "$(command -v uuidgen 2>/dev/null)" ]; then + if [ -n "$(command -v uuidgen 2> /dev/null)" ]; then uuid="$(uuidgen)" else uuid="$(cat /proc/sys/kernel/random/uuid)" @@ -40,7 +40,7 @@ if [ ! -f "${datadir}/uuid-${selfname}.txt" ]||[ ! -f "${datadir}/uuid-install.t nameright="$(shuf -n 1 "${datadir}/name-right.csv")" echo "instance_${nameleft}_${nameright}_${uuid}" > "${datadir}/uuid-${selfname}.txt" # generate install uuid if missing - if [ ! -f "${datadir}/uuid-install.txt" ];then + if [ ! -f "${datadir}/uuid-install.txt" ]; then echo "${nameleft}_${nameright}_${uuid}" > "${datadir}/uuid-install.txt" fi fi diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index a7c18b65d..597cc93c0 100755 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -8,7 +8,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Checks if server cfg dir exists, creates it if it doesn't. -fn_check_cfgdir(){ +fn_check_cfgdir() { if [ ! -d "${servercfgdir}" ]; then echo -e "creating ${servercfgdir} config directory." fn_script_log_info "creating ${servercfgdir} config directory." @@ -17,7 +17,7 @@ fn_check_cfgdir(){ } # Downloads default configs from Game-Server-Configs repo to lgsm/config-default. -fn_fetch_default_config(){ +fn_fetch_default_config() { echo -e "" echo -e "${lightyellow}Downloading ${gamename} Configs${default}" echo -e "=================================" @@ -31,7 +31,7 @@ fn_fetch_default_config(){ } # Copys default configs from Game-Server-Configs repo to server config location. -fn_default_config_remote(){ +fn_default_config_remote() { for config in "${array_configs[@]}"; do # every config is copied echo -e "copying ${config} config file." @@ -39,10 +39,10 @@ fn_default_config_remote(){ if [ "${config}" == "${servercfgdefault}" ]; then mkdir -p "${servercfgdir}" cp -nv "${lgsmdir}/config-default/config-game/${config}" "${servercfgfullpath}" - elif [ "${shortname}" == "arma3" ]&&[ "${config}" == "${networkcfgdefault}" ]; then + elif [ "${shortname}" == "arma3" ] && [ "${config}" == "${networkcfgdefault}" ]; then mkdir -p "${servercfgdir}" cp -nv "${lgsmdir}/config-default/config-game/${config}" "${networkcfgfullpath}" - elif [ "${shortname}" == "dst" ]&&[ "${config}" == "${clustercfgdefault}" ]; then + elif [ "${shortname}" == "dst" ] && [ "${config}" == "${clustercfgdefault}" ]; then cp -nv "${lgsmdir}/config-default/config-game/${clustercfgdefault}" "${clustercfgfullpath}" else mkdir -p "${servercfgdir}" @@ -53,7 +53,7 @@ fn_default_config_remote(){ } # Copys local default config to server config location. -fn_default_config_local(){ +fn_default_config_local() { echo -e "copying ${servercfgdefault} config file." cp -nv "${servercfgdir}/${servercfgdefault}" "${servercfgfullpath}" fn_sleep_time @@ -62,7 +62,7 @@ fn_default_config_local(){ # Changes some variables within the default configs. # SERVERNAME to LinuxGSM # PASSWORD to random password -fn_set_config_vars(){ +fn_set_config_vars() { if [ -f "${servercfgfullpath}" ]; then random=$(tr -dc A-Za-z0-9_ < /dev/urandom | head -c 8 | xargs) servername="LinuxGSM" @@ -71,9 +71,9 @@ fn_set_config_vars(){ fn_script_log_info "changing hostname." fn_sleep_time # prevents var from being overwritten with the servername. - if grep -q "SERVERNAME=SERVERNAME" "${lgsmdir}/config-default/config-game/${config}" 2>/dev/null; then + if grep -q "SERVERNAME=SERVERNAME" "${lgsmdir}/config-default/config-game/${config}" 2> /dev/null; then sed -i "s/SERVERNAME=SERVERNAME/SERVERNAME=${servername}/g" "${servercfgfullpath}" - elif grep -q "SERVERNAME=\"SERVERNAME\"" "${lgsmdir}/config-default/config-game/${config}" 2>/dev/null; then + elif grep -q "SERVERNAME=\"SERVERNAME\"" "${lgsmdir}/config-default/config-game/${config}" 2> /dev/null; then sed -i "s/SERVERNAME=\"SERVERNAME\"/SERVERNAME=\"${servername}\"/g" "${servercfgfullpath}" else sed -i "s/SERVERNAME/${servername}/g" "${servercfgfullpath}" @@ -94,7 +94,7 @@ fn_set_config_vars(){ } # Changes some variables within the default Don't Starve Together configs. -fn_set_dst_config_vars(){ +fn_set_dst_config_vars() { ## cluster.ini if grep -Fq "SERVERNAME" "${clustercfgfullpath}"; then echo -e "changing server name." @@ -144,7 +144,7 @@ fn_set_dst_config_vars(){ } # Lists local config file locations -fn_list_config_locations(){ +fn_list_config_locations() { echo -e "" echo -e "${lightyellow}Config File Locations${default}" echo -e "=================================" @@ -167,21 +167,21 @@ if [ "${shortname}" == "sdtd" ]; then fn_list_config_locations elif [ "${shortname}" == "ac" ]; then gamedirname="AssettoCorsa" - array_configs+=( server_cfg.ini ) + array_configs+=(server_cfg.ini) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ahl" ]; then gamedirname="ActionHalfLife" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ahl2" ]; then gamedirname="ActionSource" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars @@ -189,7 +189,7 @@ elif [ "${shortname}" == "ahl2" ]; then elif [ "${shortname}" == "ark" ]; then gamedirname="ARKSurvivalEvolved" fn_check_cfgdir - array_configs+=( GameUserSettings.ini ) + array_configs+=(GameUserSettings.ini) fn_fetch_default_config fn_default_config_remote fn_set_config_vars @@ -197,7 +197,7 @@ elif [ "${shortname}" == "ark" ]; then elif [ "${shortname}" == "arma3" ]; then gamedirname="Arma3" fn_check_cfgdir - array_configs+=( server.cfg network.cfg ) + array_configs+=(server.cfg network.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars @@ -205,21 +205,21 @@ elif [ "${shortname}" == "arma3" ]; then elif [ "${shortname}" == "armar" ]; then gamedirname="ArmaReforger" fn_check_cfgdir - array_configs+=( server.json ) + array_configs+=(server.json) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "bo" ]; then gamedirname="BallisticOverkill" - array_configs+=( config.txt ) + array_configs+=(config.txt) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "bo" ]; then gamedirname="BaseDefense" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars @@ -227,7 +227,7 @@ elif [ "${shortname}" == "bo" ]; then elif [ "${shortname}" == "bt" ]; then gamedirname="Barotrauma" fn_check_cfgdir - array_configs+=( serversettings.xml ) + array_configs+=(serversettings.xml) fn_fetch_default_config fn_default_config_remote fn_set_config_vars @@ -235,133 +235,133 @@ elif [ "${shortname}" == "bt" ]; then elif [ "${shortname}" == "bt1944" ]; then gamedirname="Battalion1944" fn_check_cfgdir - array_configs+=( DefaultGame.ini ) + array_configs+=(DefaultGame.ini) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "bf1942" ]; then gamedirname="Battlefield1942" - array_configs+=( serversettings.con ) + array_configs+=(serversettings.con) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "bfv" ]; then gamedirname="BattlefieldVietnam" - array_configs+=( serversettings.con ) + array_configs+=(serversettings.con) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "bs" ]; then gamedirname="BladeSymphony" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "bb" ]; then gamedirname="BrainBread" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "bb2" ]; then gamedirname="BrainBread2" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "bmdm" ]; then gamedirname="BlackMesa" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "cd" ]; then gamedirname="CraftingDead" - array_configs+=( properties.json ) + array_configs+=(properties.json) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "cod" ]; then gamedirname="CallOfDuty" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "coduo" ]; then gamedirname="CallOfDutyUnitedOffensive" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "cod2" ]; then gamedirname="CallOfDuty2" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "cod4" ]; then gamedirname="CallOfDuty4" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "codwaw" ]; then gamedirname="CallOfDutyWorldAtWar" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "cc" ]; then gamedirname="CodenameCURE" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "col" ]; then gamedirname="ColonySurvival" - array_configs+=( colserver.json ) + array_configs+=(colserver.json) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "cs" ]; then gamedirname="CounterStrike" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "cscz" ]; then gamedirname="CounterStrikeConditionZero" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "csgo" ]; then gamedirname="CounterStrikeGlobalOffensive" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "css" ]; then gamedirname="CounterStrikeSource" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars @@ -369,41 +369,41 @@ elif [ "${shortname}" == "css" ]; then elif [ "${shortname}" == "dayz" ]; then gamedirname="DayZ" fn_check_cfgdir - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "dod" ]; then gamedirname="DayOfDefeat" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "dodr" ]; then gamedirname="DayOfDragons" - array_configs+=( Game.ini ) + array_configs+=(Game.ini) fn_fetch_default_config fn_default_config_remote fn_list_config_locations elif [ "${shortname}" == "dods" ]; then gamedirname="DayOfDefeatSource" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "doi" ]; then gamedirname="DayOfInfamy" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "dmc" ]; then gamedirname="DeathmatchClassic" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars @@ -411,154 +411,154 @@ elif [ "${shortname}" == "dmc" ]; then elif [ "${shortname}" == "dst" ]; then gamedirname="DontStarveTogether" fn_check_cfgdir - array_configs+=( cluster.ini server.ini ) + array_configs+=(cluster.ini server.ini) fn_fetch_default_config fn_default_config_remote fn_set_dst_config_vars fn_list_config_locations elif [ "${shortname}" == "dab" ]; then gamedirname="DoubleActionBoogaloo" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "dys" ]; then gamedirname="Dystopia" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "eco" ]; then gamedirname="Eco" - array_configs+=( Network.eco ) + array_configs+=(Network.eco) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "etl" ]; then gamedirname="ETLegacy" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "fctr" ]; then gamedirname="Factorio" - array_configs+=( server-settings.json ) + array_configs+=(server-settings.json) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "fof" ]; then gamedirname="FistfulofFrags" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "gmod" ]; then gamedirname="GarrysMod" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "hldm" ]; then gamedirname="HalfLifeDeathmatch" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "hldms" ]; then gamedirname="HalfLifeDeathmatchSource" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "opfor" ]; then gamedirname="OpposingForce" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "hl2dm" ]; then gamedirname="HalfLife2Deathmatch" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ins" ]; then gamedirname="Insurgency" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ios" ]; then gamedirname="IOSoccer" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "jc2" ]; then gamedirname="JustCause2" - array_configs+=( config.lua ) + array_configs+=(config.lua) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "jc3" ]; then gamedirname="JustCause3" - array_configs+=( config.json ) + array_configs+=(config.json) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "kf" ]; then gamedirname="KillingFloor" - array_configs+=( Default.ini ) + array_configs+=(Default.ini) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "l4d" ]; then gamedirname="Left4Dead" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "l4d2" ]; then gamedirname="Left4Dead2" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations -elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "pmc" ]; then +elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ]; then gamedirname="Minecraft" - array_configs+=( server.properties ) + array_configs+=(server.properties) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "mcb" ]; then gamedirname="MinecraftBedrock" - array_configs+=( server.properties ) + array_configs+=(server.properties) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "mohaa" ]; then gamedirname="MedalOfHonorAlliedAssault" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars @@ -566,28 +566,28 @@ elif [ "${shortname}" == "mohaa" ]; then elif [ "${shortname}" == "mh" ]; then gamedirname="Mordhau" fn_check_cfgdir - array_configs+=( Game.ini ) + array_configs+=(Game.ini) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ns" ]; then gamedirname="NaturalSelection" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "nmrih" ]; then gamedirname="NoMoreRoominHell" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "nd" ]; then gamedirname="NuclearDawn" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars @@ -595,33 +595,33 @@ elif [ "${shortname}" == "nd" ]; then elif [ "${shortname}" == "mta" ]; then gamedirname="MultiTheftAuto" fn_check_cfgdir - array_configs+=( acl.xml mtaserver.conf vehiclecolors.conf ) + array_configs+=(acl.xml mtaserver.conf vehiclecolors.conf) fn_fetch_default_config fn_default_config_remote fn_list_config_locations -elif [ "${shotname}" == "mom" ];then +elif [ "${shotname}" == "mom" ]; then gamedirname="MemoriesofMars" - array_configs+=( DedicatedServerConfig.cfg) + array_configs+=(DedicatedServerConfig.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "mumble" ]; then gamedirname="Mumble" - array_configs+=( murmur.ini ) + array_configs+=(murmur.ini) fn_fetch_default_config fn_default_config_remote fn_list_config_locations elif [ "${shortname}" == "pvr" ]; then gamedirname="PavlovVR" fn_check_cfgdir - array_configs+=( Game.ini ) + array_configs+=(Game.ini) fn_fetch_default_config fn_default_config_remote fn_set_config_vars elif [ "${shortname}" == "pvkii" ]; then gamedirname="PiratesVikingandKnightsII" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars @@ -629,14 +629,14 @@ elif [ "${shortname}" == "pvkii" ]; then elif [ "${shortname}" == "pz" ]; then gamedirname="ProjectZomboid" fn_check_cfgdir - array_configs+=( server.ini ) + array_configs+=(server.ini) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "pc" ]; then gamedirname="ProjectCars" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars @@ -647,48 +647,48 @@ elif [ "${shortname}" == "pc2" ]; then fn_list_config_locations elif [ "${shortname}" == "q2" ]; then gamedirname="Quake2" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "q3" ]; then gamedirname="Quake3Arena" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ql" ]; then gamedirname="QuakeLive" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "jk2" ]; then gamedirname="JediKnightIIJediOutcast" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars elif [ "${shortname}" == "qw" ]; then gamedirname="QuakeWorld" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ricochet" ]; then gamedirname="Ricochet" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "rtcw" ]; then gamedirname="ReturnToCastleWolfenstein" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars @@ -696,124 +696,124 @@ elif [ "${shortname}" == "rtcw" ]; then elif [ "${shortname}" == "rust" ]; then gamedirname="Rust" fn_check_cfgdir - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_list_config_locations -elif [ "${shortname}" == "scpsl" ]||[ "${shortname}" == "scpslsm" ]; then +elif [ "${shortname}" == "scpsl" ] || [ "${shortname}" == "scpslsm" ]; then gamedirname="SCPSecretLaboratory" - array_configs+=( config_gameplay.txt config_localadmin.txt ) + array_configs+=(config_gameplay.txt config_localadmin.txt) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "sf" ]; then gamedirname="Satisfactory" - array_configs+=( GameUserSettings.ini ) + array_configs+=(GameUserSettings.ini) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "sol" ]; then gamedirname="Soldat" - array_configs+=( soldat.ini ) + array_configs+=(soldat.ini) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "sof2" ]; then gamedirname="SoldierOfFortune2Gold" - array_configs+=( server.cfg mapcycle.txt) + array_configs+=(server.cfg mapcycle.txt) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "sfc" ]; then gamedirname="SourceFortsClassic" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "squad" ]; then gamedirname="Squad" - array_configs+=( Admins.cfg Bans.cfg License.cfg Server.cfg Rcon.cfg ) + array_configs+=(Admins.cfg Bans.cfg License.cfg Server.cfg Rcon.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "sb" ]; then gamedirname="Starbound" - array_configs+=( starbound_server.config ) + array_configs+=(starbound_server.config) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "st" ]; then gamedirname="Stationeers" - array_configs+=( default.ini ) + array_configs+=(default.ini) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "stn" ]; then gamedirname="SurvivetheNights" - array_configs+=( ServerConfig.txt ServerUsers.txt TpPresets.json UserPermissions.json ) + array_configs+=(ServerConfig.txt ServerUsers.txt TpPresets.json UserPermissions.json) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "sven" ]; then gamedirname="SvenCoop" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "tf2" ]; then gamedirname="TeamFortress2" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "tfc" ]; then gamedirname="TeamFortressClassic" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ti" ]; then gamedirname="TheIsle" - array_configs+=( Game.ini ) + array_configs+=(Game.ini) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ts" ]; then gamedirname="TheSpecialists" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ts3" ]; then gamedirname="TeamSpeak3" - array_configs+=( ts3server.ini ) + array_configs+=(ts3server.ini) fn_fetch_default_config fn_default_config_remote fn_list_config_locations elif [ "${shortname}" == "tw" ]; then gamedirname="Teeworlds" - array_configs+=( server.cfg ctf.cfg dm.cfg duel.cfg tdm.cfg ) + array_configs+=(server.cfg ctf.cfg dm.cfg duel.cfg tdm.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "terraria" ]; then gamedirname="Terraria" - array_configs+=( serverconfig.txt ) + array_configs+=(serverconfig.txt) fn_fetch_default_config fn_default_config_remote fn_set_config_vars @@ -821,90 +821,90 @@ elif [ "${shortname}" == "terraria" ]; then elif [ "${shortname}" == "tu" ]; then gamedirname="TowerUnite" fn_check_cfgdir - array_configs+=( TowerServer.ini ) + array_configs+=(TowerServer.ini) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ut" ]; then gamedirname="UnrealTournament" - array_configs+=( Game.ini Engine.ini ) + array_configs+=(Game.ini Engine.ini) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ut2k4" ]; then gamedirname="UnrealTournament2004" - array_configs+=( UT2004.ini ) + array_configs+=(UT2004.ini) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ut99" ]; then gamedirname="UnrealTournament99" - array_configs+=( Default.ini ) + array_configs+=(Default.ini) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "unt" ]; then gamedirname="Unturned" - array_configs+=( Config.json ) + array_configs+=(Config.json) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "vints" ]; then gamedirname="VintageStory" - array_configs+=( serverconfig.json ) + array_configs+=(serverconfig.json) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "vs" ]; then gamedirname="VampireSlayer" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "wet" ]; then gamedirname="WolfensteinEnemyTerritory" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "wf" ]; then gamedirname="Warfork" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "wmc" ]; then gamedirname="Waterfall" - array_configs+=( config.yml ) + array_configs+=(config.yml) fn_fetch_default_config fn_default_config_remote fn_set_config_vars elif [ "${shortname}" == "wurm" ]; then gamedirname="WurmUnlimited" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "zmr" ]; then gamedirname="ZombieMasterReborn" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "zps" ]; then gamedirname="ZombiePanicSource" - array_configs+=( server.cfg ) + array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars diff --git a/lgsm/functions/install_eula.sh b/lgsm/functions/install_eula.sh index d7c0b0b7a..5b8b4db5d 100755 --- a/lgsm/functions/install_eula.sh +++ b/lgsm/functions/install_eula.sh @@ -9,7 +9,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ "${shortname}" == "ts3" ]; then eulaurl="https://www.teamspeak.com/en/privacy-and-terms" -elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "pmc" ]; then +elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ]; then eulaurl="https://account.mojang.com/documents/minecraft_eula" elif [ "${shortname}" == "ut" ]; then eulaurl="https://www.epicgames.com/unrealtournament/unreal-tournament-pre-alpha-test-development-build-eula" @@ -41,7 +41,7 @@ fi if [ "${shortname}" == "ts3" ]; then touch "${executabledir}/.ts3server_license_accepted" -elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "pmc" ]; then +elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ]; then touch "${serverfiles}/eula.txt" echo -e "eula=true" > "${serverfiles}/eula.txt" elif [ "${shortname}" == "ut" ]; then diff --git a/lgsm/functions/install_gslt.sh b/lgsm/functions/install_gslt.sh index a8f8065c2..1ae1ef3b0 100755 --- a/lgsm/functions/install_gslt.sh +++ b/lgsm/functions/install_gslt.sh @@ -11,7 +11,7 @@ echo -e "" echo -e "${lightyellow}Game Server Login Token${default}" echo -e "=================================" fn_sleep_time -if [ "${shortname}" == "csgo" ]||[ "${shortname}" == "css" ]||[ "${shortname}" == "nmrih" ]||[ "${shortname}" == "bs" ]; then +if [ "${shortname}" == "csgo" ] || [ "${shortname}" == "css" ] || [ "${shortname}" == "nmrih" ] || [ "${shortname}" == "bs" ]; then echo -e "GSLT is required to run a public ${gamename} server" fn_script_log_info "GSLT is required to run a public ${gamename} server" else diff --git a/lgsm/functions/install_logs.sh b/lgsm/functions/install_logs.sh index 57a41500c..80a55fb94 100755 --- a/lgsm/functions/install_logs.sh +++ b/lgsm/functions/install_logs.sh @@ -59,7 +59,7 @@ if [ "${consolelogdir}" ]; then fi # Create Game logs. -if [ "${gamelogdir}" ]&&[ ! -d "${gamelogdir}" ]; then +if [ "${gamelogdir}" ] && [ ! -d "${gamelogdir}" ]; then echo -en "installing game log dir: ${gamelogdir}..." if ! mkdir -p "${gamelogdir}"; then fn_print_fail_eol_nl diff --git a/lgsm/functions/install_retry.sh b/lgsm/functions/install_retry.sh index 080f864a2..a36b4fb38 100755 --- a/lgsm/functions/install_retry.sh +++ b/lgsm/functions/install_retry.sh @@ -8,7 +8,8 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if fn_prompt_yn "Retry install?" Y; then - command_install.sh; core_exit.sh + command_install.sh + core_exit.sh else exitcode=0 core_exit.sh diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index 91fb1743a..395d48c68 100755 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -7,61 +7,196 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_install_server_files(){ +fn_install_server_files() { if [ "${shortname}" == "ahl" ]; then - remote_fileurl="http://linuxgsm.download/ActionHalfLife/action_halflife-1.0.tar.xz"; local_filedir="${tmpdir}"; local_filename="action_halflife-1.0.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="61d7b79fd714888b6d65944fdaafa94a" + remote_fileurl="http://linuxgsm.download/ActionHalfLife/action_halflife-1.0.tar.xz" + local_filedir="${tmpdir}" + local_filename="action_halflife-1.0.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="61d7b79fd714888b6d65944fdaafa94a" elif [ "${shortname}" == "bf1942" ]; then - remote_fileurl="http://linuxgsm.download/BattleField1942/bf1942_lnxded-1.61-hacked-to-1.612.full.tar.xz"; local_filedir="${tmpdir}"; local_filename="bf1942_lnxded-1.61-hacked-to-1.612.full.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="4223bf4ed85f5162c24b2cba51249b9e" - elif [ "${shortname}" == "bfv" ];then - remote_fileurl="http://linuxgsm.download/BattlefieldVietnam/bfv_linded-v1.21-20041207_patch.tar.xz"; local_filedir="${tmpdir}"; local_filename="bfv_linded-v1.21-20041207_patch.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="e3b4962cdd9d41e23c6fed65101bccde" + remote_fileurl="http://linuxgsm.download/BattleField1942/bf1942_lnxded-1.61-hacked-to-1.612.full.tar.xz" + local_filedir="${tmpdir}" + local_filename="bf1942_lnxded-1.61-hacked-to-1.612.full.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="4223bf4ed85f5162c24b2cba51249b9e" + elif [ "${shortname}" == "bfv" ]; then + remote_fileurl="http://linuxgsm.download/BattlefieldVietnam/bfv_linded-v1.21-20041207_patch.tar.xz" + local_filedir="${tmpdir}" + local_filename="bfv_linded-v1.21-20041207_patch.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="e3b4962cdd9d41e23c6fed65101bccde" elif [ "${shortname}" == "bb" ]; then - remote_fileurl="http://linuxgsm.download/BrainBread/brainbread-v1.2-linuxserver.tar.xz"; local_filedir="${tmpdir}"; local_filename="brainbread-v1.2-linuxserver.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="55f227183b736397806d5b6db6143f15" + remote_fileurl="http://linuxgsm.download/BrainBread/brainbread-v1.2-linuxserver.tar.xz" + local_filedir="${tmpdir}" + local_filename="brainbread-v1.2-linuxserver.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="55f227183b736397806d5b6db6143f15" elif [ "${shortname}" == "cod" ]; then - remote_fileurl="http://linuxgsm.download/CallOfDuty/cod-lnxded-1.5b-full.tar.xz"; local_filedir="${tmpdir}"; local_filename="cod-lnxded-1.5-large.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="ee0ad1ccbfa1fd27fde01a4a431a5c2f" + remote_fileurl="http://linuxgsm.download/CallOfDuty/cod-lnxded-1.5b-full.tar.xz" + local_filedir="${tmpdir}" + local_filename="cod-lnxded-1.5-large.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="ee0ad1ccbfa1fd27fde01a4a431a5c2f" elif [ "${shortname}" == "coduo" ]; then - remote_fileurl="http://linuxgsm.download/CallOfDutyUnitedOffensive/coduo-lnxded-1.51b-full.tar.xz"; local_filedir="${tmpdir}"; local_filename="coduo-lnxded-1.51b-full.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="35cabccd67adcda44aaebc59405915b9" + remote_fileurl="http://linuxgsm.download/CallOfDutyUnitedOffensive/coduo-lnxded-1.51b-full.tar.xz" + local_filedir="${tmpdir}" + local_filename="coduo-lnxded-1.51b-full.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="35cabccd67adcda44aaebc59405915b9" elif [ "${shortname}" == "cod2" ]; then - remote_fileurl="http://linuxgsm.download/CallOfDuty2/cod2-lnxded-1.3-full.tar.xz"; local_filedir="${tmpdir}"; local_filename="cod2-lnxded-1.3-full.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="b8c4c611f01627dd43348e78478a3d41" + remote_fileurl="http://linuxgsm.download/CallOfDuty2/cod2-lnxded-1.3-full.tar.xz" + local_filedir="${tmpdir}" + local_filename="cod2-lnxded-1.3-full.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="b8c4c611f01627dd43348e78478a3d41" elif [ "${shortname}" == "cod4" ]; then - remote_fileurl="http://linuxgsm.download/CallOfDuty4/cod4x18_1790_lnxded.tar.xz"; local_filedir="${tmpdir}"; local_filename="cod4x18_1790_lnxded.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="30609db2afde09d22498fbab3a427d11" + remote_fileurl="http://linuxgsm.download/CallOfDuty4/cod4x18_1790_lnxded.tar.xz" + local_filedir="${tmpdir}" + local_filename="cod4x18_1790_lnxded.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="30609db2afde09d22498fbab3a427d11" elif [ "${shortname}" == "codwaw" ]; then - remote_fileurl="http://linuxgsm.download/CallOfDutyWorldAtWar/codwaw-lnxded-1.7-full.tar.xz"; local_filedir="${tmpdir}"; local_filename="codwaw-lnxded-1.7-full.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="2c6be1bb66ea631b9b2e7ae6216c6680" + remote_fileurl="http://linuxgsm.download/CallOfDutyWorldAtWar/codwaw-lnxded-1.7-full.tar.xz" + local_filedir="${tmpdir}" + local_filename="codwaw-lnxded-1.7-full.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="2c6be1bb66ea631b9b2e7ae6216c6680" elif [ "${shortname}" == "etl" ]; then - remote_fileurl="http://linuxgsm.download/WolfensteinEnemyTerritory/etlegacy-v2.78.1-i386-et-260b.tar.xz"; local_filedir="${tmpdir}"; local_filename="etlegacy-v2.78.1-i386-et-260b.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="7c08b52cb09b30eadb98ea05ef780fc7" + remote_fileurl="http://linuxgsm.download/WolfensteinEnemyTerritory/etlegacy-v2.78.1-i386-et-260b.tar.xz" + local_filedir="${tmpdir}" + local_filename="etlegacy-v2.78.1-i386-et-260b.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="7c08b52cb09b30eadb98ea05ef780fc7" elif [ "${shortname}" == "mohaa" ]; then - remote_fileurl="http://linuxgsm.download/MedalofHonorAlliedAssault/moh_revival_v1.12_RC3.5.1.tar.xz"; local_filedir="${tmpdir}"; local_filename="moh_revival_v1.12_RC3.5.1.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="7c664538999252eeaf2b6d9949416480" + remote_fileurl="http://linuxgsm.download/MedalofHonorAlliedAssault/moh_revival_v1.12_RC3.5.1.tar.xz" + local_filedir="${tmpdir}" + local_filename="moh_revival_v1.12_RC3.5.1.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="7c664538999252eeaf2b6d9949416480" elif [ "${shortname}" == "ns" ]; then - remote_fileurl="http://linuxgsm.download/NaturalSelection/ns_dedicated_server_v32.tar.xz"; local_filedir="${tmpdir}"; local_filename="ns_dedicated_server_v32.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="23ec3cadd93d8bb1c475bad5b9cce370" + remote_fileurl="http://linuxgsm.download/NaturalSelection/ns_dedicated_server_v32.tar.xz" + local_filedir="${tmpdir}" + local_filename="ns_dedicated_server_v32.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="23ec3cadd93d8bb1c475bad5b9cce370" elif [ "${shortname}" == "q2" ]; then - remote_fileurl="http://linuxgsm.download/Quake2/quake2-3.20-glibc-i386-full-linux2.0.tar.xz"; local_filedir="${tmpdir}"; local_filename="quake2-3.20-glibc-i386-full-linux2.0.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="2908164a32d4808bb720f2161f6b0c82" + remote_fileurl="http://linuxgsm.download/Quake2/quake2-3.20-glibc-i386-full-linux2.0.tar.xz" + local_filedir="${tmpdir}" + local_filename="quake2-3.20-glibc-i386-full-linux2.0.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="2908164a32d4808bb720f2161f6b0c82" elif [ "${shortname}" == "q3" ]; then - remote_fileurl="http://linuxgsm.download/Quake3/quake3-1.32c-x86-full-linux.tar.xz"; local_filedir="${tmpdir}"; local_filename="quake3-1.32c-x86-full-linux.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="b0e26d8919fe9313fb9d8ded2360f3db" + remote_fileurl="http://linuxgsm.download/Quake3/quake3-1.32c-x86-full-linux.tar.xz" + local_filedir="${tmpdir}" + local_filename="quake3-1.32c-x86-full-linux.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="b0e26d8919fe9313fb9d8ded2360f3db" elif [ "${shortname}" == "qw" ]; then - remote_fileurl="http://linuxgsm.download/QuakeWorld/nquake.server.linux.190506.full.tar.xz"; local_filedir="${tmpdir}"; local_filename="nquake.server.linux.190506.full.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="82055b7d973206c13a606db8ba288d03" + remote_fileurl="http://linuxgsm.download/QuakeWorld/nquake.server.linux.190506.full.tar.xz" + local_filedir="${tmpdir}" + local_filename="nquake.server.linux.190506.full.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="82055b7d973206c13a606db8ba288d03" elif [ "${shortname}" == "rtcw" ]; then - remote_fileurl="http://linuxgsm.download/ReturnToCastleWolfenstein/iortcw-1.51c-x86_64-server-linux-20190507.tar.xz"; local_filedir="${tmpdir}"; local_filename="iortcw-1.51c-x86_64-server-linux-20190507.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="df6ff664d37dd0d22787848bdb3cac5f" + remote_fileurl="http://linuxgsm.download/ReturnToCastleWolfenstein/iortcw-1.51c-x86_64-server-linux-20190507.tar.xz" + local_filedir="${tmpdir}" + local_filename="iortcw-1.51c-x86_64-server-linux-20190507.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="df6ff664d37dd0d22787848bdb3cac5f" elif [ "${shortname}" == "sfc" ]; then - remote_fileurl="http://linuxgsm.download/SourceFortsClassic/SFClassic-1.0-RC7-fix.tar.xz"; local_filedir="${tmpdir}"; local_filename="SFClassic-1.0-RC7-fix.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="70077137185700e28fe6bbb6021d12bc" + remote_fileurl="http://linuxgsm.download/SourceFortsClassic/SFClassic-1.0-RC7-fix.tar.xz" + local_filedir="${tmpdir}" + local_filename="SFClassic-1.0-RC7-fix.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="70077137185700e28fe6bbb6021d12bc" elif [ "${shortname}" == "sof2" ]; then - remote_fileurl="http://linuxgsm.download/SoldierOfFortune2/sof2gold-1.03.tar.xz"; local_filedir="${tmpdir}"; local_filename="sof2gold-1.03.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="201e23bab04207d00ce813d001c483d9" + remote_fileurl="http://linuxgsm.download/SoldierOfFortune2/sof2gold-1.03.tar.xz" + local_filedir="${tmpdir}" + local_filename="sof2gold-1.03.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="201e23bab04207d00ce813d001c483d9" elif [ "${shortname}" == "ts" ]; then - remote_fileurl="http://linuxgsm.download/TheSpecialists/ts-3-linux-final.tar.xz"; local_filedir="${tmpdir}"; local_filename="ts-3-linux-final.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="3c66ecff6e3644f7ac88015732a0fb93" + remote_fileurl="http://linuxgsm.download/TheSpecialists/ts-3-linux-final.tar.xz" + local_filedir="${tmpdir}" + local_filename="ts-3-linux-final.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="3c66ecff6e3644f7ac88015732a0fb93" elif [ "${shortname}" == "ut2k4" ]; then - remote_fileurl="http://linuxgsm.download/UnrealTournament2004/ut2004-server-3369-3-ultimate-linux.tar.xz"; local_filedir="${tmpdir}"; local_filename="ut2004-server-3369-3-ultimate-linux.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="9fceaab68554749f4b45be66613b9a15" + remote_fileurl="http://linuxgsm.download/UnrealTournament2004/ut2004-server-3369-3-ultimate-linux.tar.xz" + local_filedir="${tmpdir}" + local_filename="ut2004-server-3369-3-ultimate-linux.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="9fceaab68554749f4b45be66613b9a15" elif [ "${shortname}" == "ut99" ]; then - remote_fileurl="http://linuxgsm.download/UnrealTournament99/ut99-server-469b-ultimate-linux.tar.xz"; local_filedir="${tmpdir}"; local_filename="ut99-server-469b-ultimate-linux.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="dba3f1122a5e60ee45ece7422fcf78f5" + remote_fileurl="http://linuxgsm.download/UnrealTournament99/ut99-server-469b-ultimate-linux.tar.xz" + local_filedir="${tmpdir}" + local_filename="ut99-server-469b-ultimate-linux.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="dba3f1122a5e60ee45ece7422fcf78f5" elif [ "${shortname}" == "ut" ]; then - remote_fileurl="http://linuxgsm.download/UnrealTournament/UnrealTournament-Server-XAN-3525360-Linux.tar.xz"; local_filedir="${tmpdir}"; local_filename="UnrealTournament-Server-XAN-3525360-Linux.tar.xz"; chmodx="noexecute" run="norun"; force="noforce"; md5="41dd92015713a78211eaccf503b72393" + remote_fileurl="http://linuxgsm.download/UnrealTournament/UnrealTournament-Server-XAN-3525360-Linux.tar.xz" + local_filedir="${tmpdir}" + local_filename="UnrealTournament-Server-XAN-3525360-Linux.tar.xz" + chmodx="noexecute" run="norun" + force="noforce" + md5="41dd92015713a78211eaccf503b72393" elif [ "${shortname}" == "ut3" ]; then - remote_fileurl="http://linuxgsm.download/UnrealTournament3/UT3-linux-server-2.1.tar.xz"; local_filedir="${tmpdir}"; local_filename="UT3-linux-server-2.1.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="8876cca61e3f83ea08db25208bde6ac6" + remote_fileurl="http://linuxgsm.download/UnrealTournament3/UT3-linux-server-2.1.tar.xz" + local_filedir="${tmpdir}" + local_filename="UT3-linux-server-2.1.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="8876cca61e3f83ea08db25208bde6ac6" elif [ "${shortname}" == "vs" ]; then - remote_fileurl="http://linuxgsm.download/VampireSlayer/vs_l-6.0_full.tar.xz"; local_filedir="${tmpdir}"; local_filename="vs_l-6.0_full.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="b322f79e0abd31847493c52acf802667" + remote_fileurl="http://linuxgsm.download/VampireSlayer/vs_l-6.0_full.tar.xz" + local_filedir="${tmpdir}" + local_filename="vs_l-6.0_full.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="b322f79e0abd31847493c52acf802667" elif [ "${shortname}" == "wet" ]; then - remote_fileurl="http://linuxgsm.download/WolfensteinEnemyTerritory/enemy-territory.260b.tar.xz"; local_filedir="${tmpdir}"; local_filename="enemy-territory.260b.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="581a333cc7eacda2f56d5a00fe11eafa" + remote_fileurl="http://linuxgsm.download/WolfensteinEnemyTerritory/enemy-territory.260b.tar.xz" + local_filedir="${tmpdir}" + local_filename="enemy-territory.260b.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="581a333cc7eacda2f56d5a00fe11eafa" elif [ "${shortname}" == "samp" ]; then - remote_fileurl="https://files.sa-mp.com/samp037svr_R2-1.tar.gz"; local_filedir="${tmpdir}"; local_filename="samp037svr_R2-1.tar.gz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="93705e165550c97484678236749198a4" + remote_fileurl="https://files.sa-mp.com/samp037svr_R2-1.tar.gz" + local_filedir="${tmpdir}" + local_filename="samp037svr_R2-1.tar.gz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="93705e165550c97484678236749198a4" elif [ "${shortname}" == "zmr" ]; then - remote_fileurl="http://linuxgsm.download/ZombieMasterReborn/zombie_master_reborn_b5_2.tar.xz"; local_filedir="${tmpdir}"; local_filename="zombie_master_reborn_b5_2.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="4b9b9832e863d03981a40c26065792a6" + remote_fileurl="http://linuxgsm.download/ZombieMasterReborn/zombie_master_reborn_b5_2.tar.xz" + local_filedir="${tmpdir}" + local_filename="zombie_master_reborn_b5_2.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="4b9b9832e863d03981a40c26065792a6" fi fn_fetch_file "${remote_fileurl}" "" "" "" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" fn_dl_extract "${local_filedir}" "${local_filename}" "${serverfiles}" @@ -100,7 +235,7 @@ elif [ "${shortname}" == "jk2" ]; then update_jediknight2.sh elif [ "${shortname}" == "vints" ]; then update_vintagestory.sh -elif [ -z "${appid}" ]||[ "${shortname}" == "ahl" ]||[ "${shortname}" == "bd" ]||[ "${shortname}" == "bb" ]||[ "${shortname}" == "ns" ]||[ "${shortname}" == "sfc" ]||[ "${shortname}" == "ts" ]||[ "${shortname}" == "vs" ]||[ "${shortname}" == "zmr" ]; then +elif [ -z "${appid}" ] || [ "${shortname}" == "ahl" ] || [ "${shortname}" == "bd" ] || [ "${shortname}" == "bb" ] || [ "${shortname}" == "ns" ] || [ "${shortname}" == "sfc" ] || [ "${shortname}" == "ts" ] || [ "${shortname}" == "vs" ] || [ "${shortname}" == "zmr" ]; then if [ "${shortname}" == "ut" ]; then install_eula.sh fi diff --git a/lgsm/functions/install_ts3db.sh b/lgsm/functions/install_ts3db.sh index 07ab7a111..e394296de 100755 --- a/lgsm/functions/install_ts3db.sh +++ b/lgsm/functions/install_ts3db.sh @@ -7,7 +7,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_install_ts3db_mariadb(){ +fn_install_ts3db_mariadb() { if [ ! -f "${serverfiles}/libts3db_mariadb.so" ]; then echo -e "copying libmariadb.so.2...\c" cp "${serverfiles}/redist/libmariadb.so.2" "${serverfiles}" @@ -34,13 +34,13 @@ fn_install_ts3db_mariadb(){ read -rp "Enter MariaDB socket path: " mariadbsocket { - echo -e "[config]" - echo -e "host='${mariahostname}'" - echo -e "port='${mariaport}'" - echo -e "username='${mariausername}'" - echo -e "password='${mariapassword}'" - echo -e "database='${mariadbname}'" - echo -e "socket='${mariadbsocket}'" + echo -e "[config]" + echo -e "host='${mariahostname}'" + echo -e "port='${mariaport}'" + echo -e "username='${mariausername}'" + echo -e "password='${mariapassword}'" + echo -e "database='${mariadbname}'" + echo -e "socket='${mariadbsocket}'" } >> "${servercfgdir}/ts3db_mariadb.ini" sed -i "s/dbplugin=ts3db_sqlite3/dbplugin=ts3db_mariadb/g" "${servercfgfullpath}" sed -i "s/dbpluginparameter=/dbpluginparameter=ts3db_mariadb.ini/g" "${servercfgfullpath}" @@ -58,7 +58,7 @@ if [ -z "${autoinstall}" ]; then fn_install_ts3db_mariadb fi else -fn_print_information_nl "./${selfname} auto-install is uses sqlite. For MariaDB use ./${selfname} install" + fn_print_information_nl "./${selfname} auto-install is uses sqlite. For MariaDB use ./${selfname} install" fi install_eula.sh diff --git a/lgsm/functions/mods_core.sh b/lgsm/functions/mods_core.sh index 47ac70cb2..7e2d097a7 100755 --- a/lgsm/functions/mods_core.sh +++ b/lgsm/functions/mods_core.sh @@ -17,7 +17,7 @@ modsinstalledlistfullpath="${modsdir}/${modsinstalledlist}" ## Installation. # Download management. -fn_mod_install_files(){ +fn_mod_install_files() { fn_fetch_file "${modurl}" "" "" "" "${modstmpdir}" "${modfilename}" # Check if variable is valid checking if file has been downloaded and exists. if [ ! -f "${modstmpdir}/${modfilename}" ]; then @@ -32,7 +32,7 @@ fn_mod_install_files(){ } # Convert mod files to lowercase if needed. -fn_mod_lowercase(){ +fn_mod_lowercase() { # Checking lowercase settings from mods array definition if [ "${modlowercase}" == "LowercaseOn" ]; then echo -en "converting ${modprettyname} files to lowercase..." @@ -63,13 +63,13 @@ fn_mod_lowercase(){ core_exit.sh fi fi - done < <(find "${extractdir}" -depth -name '*[[:upper:]]*') - fn_print_ok_eol_nl - fi + done < <(find "${extractdir}" -depth -name '*[[:upper:]]*') + fn_print_ok_eol_nl + fi } # Create ${modcommand}-files.txt containing the full extracted file/directory list. -fn_mod_create_filelist(){ +fn_mod_create_filelist() { echo -en "building ${modcommand}-files.txt..." fn_sleep_time # ${modsdir}/${modcommand}-files.txt. @@ -90,7 +90,7 @@ fn_mod_create_filelist(){ } # Copy the mod into serverfiles. -fn_mod_copy_destination(){ +fn_mod_copy_destination() { echo -en "copying ${modprettyname} to ${modinstalldir}..." fn_sleep_time cp -Rf "${extractdir}/." "${modinstalldir}/" @@ -105,7 +105,7 @@ fn_mod_copy_destination(){ } # Add the mod to the installed-mods.txt. -fn_mod_add_list(){ +fn_mod_add_list() { if [ -z "$(sed -n "/^${modcommand}$/p" "${modsinstalledlistfullpath}")" ]; then echo -e "${modcommand}" >> "${modsinstalledlistfullpath}" fn_script_log_info "${modcommand} added to ${modsinstalledlist}" @@ -113,7 +113,7 @@ fn_mod_add_list(){ } # Prevent sensitive directories from being erased upon uninstall by removing them from: ${modcommand}-files.txt. -fn_mod_tidy_files_list(){ +fn_mod_tidy_files_list() { # Check file list validity. fn_check_mod_files_list # Output to the user @@ -126,7 +126,7 @@ fn_mod_tidy_files_list(){ # generate elements to remove from list. removefromlistamount=$(echo -e "${removefromlist}" | awk -F ';' '{ print NF }') # Test all subvalue of "removefromlist" using the ";" separator. - for ((filesindex=1; filesindex < removefromlistamount; filesindex++)); do + for ((filesindex = 1; filesindex < removefromlistamount; filesindex++)); do # Put current file into test variable. removefilevar=$(echo -e "${removefromlist}" | awk -F ';' -v x=${filesindex} '{ print $x }') # Delete line(s) matching exactly. @@ -193,15 +193,15 @@ fn_mod_tidy_files_list(){ ## Information Gathering. # Get details of a mod any (relevant and unique, such as full mod name or install command) value. -fn_mod_get_info(){ +fn_mod_get_info() { # Variable to know when job is done. modinfocommand="0" # Find entry in global array. - for ((index=0; index <= ${#mods_global_array[@]}; index++)); do + for ((index = 0; index <= ${#mods_global_array[@]}; index++)); do # When entry is found. if [ "${mods_global_array[index]}" == "${currentmod}" ]; then # Go back to the previous "MOD" separator. - for ((index=index; index <= ${#mods_global_array[@]}; index--)); do + for ((index = index; index <= ${#mods_global_array[@]}; index--)); do # When "MOD" is found. if [ "${mods_global_array[index]}" == "MOD" ]; then # Get info. @@ -226,31 +226,31 @@ fn_mod_get_info(){ } # Define all variables for a mod at once when index is set to a separator. -fn_mods_define(){ -if [ -z "$index" ]; then - fn_script_log_fatal "index variable not set. Please report an issue." - fn_print_error "index variable not set. Please report an issue." - echo -e "* https://github.com/GameServerManagers/LinuxGSM/issues" - core_exit.sh -fi - modcommand="${mods_global_array[index+1]}" - modprettyname="${mods_global_array[index+2]}" - modurl="${mods_global_array[index+3]}" - modfilename="${mods_global_array[index+4]}" - modsubdirs="${mods_global_array[index+5]}" - modlowercase="${mods_global_array[index+6]}" - modinstalldir="${mods_global_array[index+7]}" - modkeepfiles="${mods_global_array[index+8]}" - modengines="${mods_global_array[index+9]}" - modgames="${mods_global_array[index+10]}" - modexcludegames="${mods_global_array[index+11]}" - modsite="${mods_global_array[index+12]}" - moddescription="${mods_global_array[index+13]}" +fn_mods_define() { + if [ -z "$index" ]; then + fn_script_log_fatal "index variable not set. Please report an issue." + fn_print_error "index variable not set. Please report an issue." + echo -e "* https://github.com/GameServerManagers/LinuxGSM/issues" + core_exit.sh + fi + modcommand="${mods_global_array[index + 1]}" + modprettyname="${mods_global_array[index + 2]}" + modurl="${mods_global_array[index + 3]}" + modfilename="${mods_global_array[index + 4]}" + modsubdirs="${mods_global_array[index + 5]}" + modlowercase="${mods_global_array[index + 6]}" + modinstalldir="${mods_global_array[index + 7]}" + modkeepfiles="${mods_global_array[index + 8]}" + modengines="${mods_global_array[index + 9]}" + modgames="${mods_global_array[index + 10]}" + modexcludegames="${mods_global_array[index + 11]}" + modsite="${mods_global_array[index + 12]}" + moddescription="${mods_global_array[index + 13]}" } # Builds list of installed mods. # using installed-mods.txt grabing mod info from mods_list.sh. -fn_mods_installed_list(){ +fn_mods_installed_list() { fn_mods_count_installed # Set/reset variables. installedmodsline="1" @@ -265,7 +265,7 @@ fn_mods_installed_list(){ # Get mod info to make sure mod exists. fn_mod_get_info # Add the mod to available commands. - installedmodslist+=( "${modcommand}" ) + installedmodslist+=("${modcommand}") # Increment line check. ((installedmodsline++)) done @@ -275,13 +275,13 @@ fn_mods_installed_list(){ } # Loops through mods_global_array to define available mods & provide available commands for mods installation. -fn_mods_available(){ +fn_mods_available() { # First, reset variables. compatiblemodslist=() availablemodscommands=() # Find compatible games. # Find separators through the global array. - for ((index="0"; index <= ${#mods_global_array[@]}; index++)); do + for ((index = "0"; index <= ${#mods_global_array[@]}; index++)); do # If current value is a separator; then. if [ "${mods_global_array[index]}" == "${modseparator}" ]; then # Set mod variables. @@ -291,9 +291,9 @@ fn_mods_available(){ # If game is compatible. if [ "${modcompatibility}" == "1" ]; then # Put it into an array to prepare user output. - compatiblemodslist+=( "${modprettyname}" "${modcommand}" "${modsite}" "${moddescription}" ) + compatiblemodslist+=("${modprettyname}" "${modcommand}" "${modsite}" "${moddescription}") # Keep available commands in an array to make life easier. - availablemodscommands+=( "${modcommand}" ) + availablemodscommands+=("${modcommand}") fi fi done @@ -302,7 +302,7 @@ fn_mods_available(){ ## Mod compatibility check. # Find out if a game is compatible with a mod from a modgames (list of games supported by a mod) variable. -fn_compatible_mod_games(){ +fn_compatible_mod_games() { # Reset test value. modcompatiblegame="0" # If value is set to GAMES (ignore). @@ -310,9 +310,9 @@ fn_compatible_mod_games(){ # How many games we need to test. gamesamount=$(echo -e "${modgames}" | awk -F ';' '{ print NF }') # Test all subvalue of "modgames" using the ";" separator. - for ((gamevarindex=1; gamevarindex < gamesamount; gamevarindex++)); do + for ((gamevarindex = 1; gamevarindex < gamesamount; gamevarindex++)); do # Put current game name into modtest variable. - gamemodtest=$( echo -e "${modgames}" | awk -F ';' -v x=${gamevarindex} '{ print $x }' ) + gamemodtest=$(echo -e "${modgames}" | awk -F ';' -v x=${gamevarindex} '{ print $x }') # If game name matches. if [ "${gamemodtest}" == "${gamename}" ]; then # Mod is compatible. @@ -323,7 +323,7 @@ fn_compatible_mod_games(){ } # Find out if an engine is compatible with a mod from a modengines (list of engines supported by a mod) variable. -fn_compatible_mod_engines(){ +fn_compatible_mod_engines() { # Reset test value. modcompatibleengine="0" # If value is set to ENGINES (ignore). @@ -331,9 +331,9 @@ fn_compatible_mod_engines(){ # How many engines we need to test. enginesamount=$(echo -e "${modengines}" | awk -F ';' '{ print NF }') # Test all subvalue of "modengines" using the ";" separator. - for ((gamevarindex=1; gamevarindex < ${enginesamount}; gamevarindex++)); do + for ((gamevarindex = 1; gamevarindex < ${enginesamount}; gamevarindex++)); do # Put current engine name into modtest variable. - enginemodtest=$( echo -e "${modengines}" | awk -F ';' -v x=${gamevarindex} '{ print $x }' ) + enginemodtest=$(echo -e "${modengines}" | awk -F ';' -v x=${gamevarindex} '{ print $x }') # If engine name matches. if [ "${enginemodtest}" == "${engine}" ]; then # Mod is compatible. @@ -344,7 +344,7 @@ fn_compatible_mod_engines(){ } # Find out if a game is not compatible with a mod from a modnotgames (list of games not supported by a mod) variable. -fn_not_compatible_mod_games(){ +fn_not_compatible_mod_games() { # Reset test value. modeincompatiblegame="0" # If value is set to NOTGAMES (ignore). @@ -352,9 +352,9 @@ fn_not_compatible_mod_games(){ # How many engines we need to test. excludegamesamount=$(echo -e "${modexcludegames}" | awk -F ';' '{ print NF }') # Test all subvalue of "modexcludegames" using the ";" separator. - for ((gamevarindex=1; gamevarindex < excludegamesamount; gamevarindex++)); do + for ((gamevarindex = 1; gamevarindex < excludegamesamount; gamevarindex++)); do # Put current engine name into modtest variable. - excludegamemodtest=$( echo -e "${modexcludegames}" | awk -F ';' -v x=${gamevarindex} '{ print $x }' ) + excludegamemodtest=$(echo -e "${modexcludegames}" | awk -F ';' -v x=${gamevarindex} '{ print $x }') # If engine name matches. if [ "${excludegamemodtest}" == "${gamename}" ]; then # Mod is compatible. @@ -365,14 +365,14 @@ fn_not_compatible_mod_games(){ } # Sums up if a mod is compatible or not with modcompatibility=0/1. -fn_mod_compatible_test(){ +fn_mod_compatible_test() { # Test game and engine compatibility. fn_compatible_mod_games fn_compatible_mod_engines fn_not_compatible_mod_games if [ "${modeincompatiblegame}" == "1" ]; then modcompatibility="0" - elif [ "${modcompatibleengine}" == "1" ]||[ "${modcompatiblegame}" == "1" ]; then + elif [ "${modcompatibleengine}" == "1" ] || [ "${modcompatiblegame}" == "1" ]; then modcompatibility="1" else modcompatibility="0" @@ -382,7 +382,7 @@ fn_mod_compatible_test(){ ## Directory management. # Create mods files and directories if it doesn't exist. -fn_create_mods_dir(){ +fn_create_mods_dir() { # Create lgsm data modsdir. if [ ! -d "${modsdir}" ]; then echo -en "creating LinuxGSM mods data directory ${modsdir}..." @@ -420,7 +420,7 @@ fn_create_mods_dir(){ } # Create tmp download mod directory. -fn_mods_create_tmp_dir(){ +fn_mods_create_tmp_dir() { if [ ! -d "${modstmpdir}" ]; then mkdir -p "${modstmpdir}" exitcode=$? @@ -437,7 +437,7 @@ fn_mods_create_tmp_dir(){ } # Remove the tmp mod download directory when finished. -fn_mods_clear_tmp_dir(){ +fn_mods_clear_tmp_dir() { if [ -d "${modstmpdir}" ]; then echo -en "clearing mod download directory ${modstmpdir}..." rm -fr "${modstmpdir:?}" @@ -459,7 +459,7 @@ fn_mods_clear_tmp_dir(){ } # Counts how many mods were installed. -fn_mods_count_installed(){ +fn_mods_count_installed() { if [ -f "${modsinstalledlistfullpath}" ]; then installedmodscount=$(wc -l < "${modsinstalledlistfullpath}") else @@ -468,7 +468,7 @@ fn_mods_count_installed(){ } # Exits if no mods were installed. -fn_mods_check_installed(){ +fn_mods_check_installed() { # Count installed mods. fn_mods_count_installed # If no mods are found. @@ -482,10 +482,10 @@ fn_mods_check_installed(){ } # Checks that mod files list exists and isn't empty. -fn_check_mod_files_list(){ +fn_check_mod_files_list() { # File list must exist and be valid before any operation on it. if [ -f "${modsdir}/${modcommand}-files.txt" ]; then - # How many lines is the file list. + # How many lines is the file list. modsfilelistsize=$(wc -l < "${modsdir}/${modcommand}-files.txt") # If file list is empty. if [ "${modsfilelistsize}" -eq 0 ]; then @@ -501,7 +501,7 @@ fn_check_mod_files_list(){ fi } -fn_mod_exist(){ +fn_mod_exist() { modreq=$1 # requires one parameter, the mod if [ -f "${modsdir}/${modreq}-files.txt" ]; then @@ -516,7 +516,7 @@ fn_mod_exist(){ fi } -fn_mod_required_fail_exist(){ +fn_mod_required_fail_exist() { modreq=$1 # requires one parameter, the mod fn_script_log_fatal "${modreq}-files.txt is empty: unable to find ${modreq} installed" @@ -525,7 +525,7 @@ fn_mod_required_fail_exist(){ core_exit.sh } -fn_mod_liblist_gam_filenames(){ +fn_mod_liblist_gam_filenames() { # clear variables just in case moddll="" modso="" @@ -537,37 +537,37 @@ fn_mod_liblist_gam_filenames(){ moddll="mp.dll" modso="cs.so" moddylib="cs.dylib" - ;; + ;; "Day of Defeat") moddll="dod.dll" modso="dod.so" moddylib="dod.dylib" - ;; + ;; "Team Fortress Classic") moddll="tfc.dll" modso="tfc.so" moddylib="tfc.dylib" - ;; + ;; "Natural Selection") moddll="ns.dll" modso="ns_i386.so" moddylib="" - ;; + ;; "The Specialists") moddll="mp.dll" modso="ts_i386.so" moddylib="" - ;; + ;; "Half-Life: Deathmatch") moddll="hl.dll" modso="hl.so" moddylib="hl.dylib" - ;; + ;; esac } # modifers for liblist.gam to add/remote metamod binaries -fn_mod_install_liblist_gam_file(){ +fn_mod_install_liblist_gam_file() { fn_mod_liblist_gam_filenames @@ -625,7 +625,7 @@ fn_mod_install_liblist_gam_file(){ fi } -fn_mod_remove_liblist_gam_file(){ +fn_mod_remove_liblist_gam_file() { fn_mod_liblist_gam_filenames @@ -683,7 +683,7 @@ fn_mod_remove_liblist_gam_file(){ fi } -fn_mod_install_amxmodx_file(){ +fn_mod_install_amxmodx_file() { # does plugins.ini exist? if [ -f "${modinstalldir}/addons/metamod/plugins.ini" ]; then # since it does exist, is the entry already in plugins.ini @@ -718,9 +718,9 @@ fn_mod_install_amxmodx_file(){ fi } -fn_mod_remove_amxmodx_file(){ +fn_mod_remove_amxmodx_file() { if [ -f "${modinstalldir}/addons/metamod/plugins.ini" ]; then - # since it does exist, is the entry already in plugins.ini + # since it does exist, is the entry already in plugins.ini logentry="line (linux addons/amxmodx/dlls/amxmodx_mm_i386.so) removed from ${modinstalldir}/addons/metamod/plugins.ini" echo -en "removing amxmodx_mm_i386.so in plugins.ini..." grep -q "linux addons/amxmodx/dlls/amxmodx_mm_i386.so" "${modinstalldir}/addons/metamod/plugins.ini" diff --git a/lgsm/functions/mods_list.sh b/lgsm/functions/mods_list.sh index ed9be2121..8ea31561f 100755 --- a/lgsm/functions/mods_list.sh +++ b/lgsm/functions/mods_list.sh @@ -92,7 +92,7 @@ movementapilatestlink="https://github.com/danzayau/MovementAPI/releases/download # Oxide oxiderustlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/OxideMod/Oxide.Rust/releases/latest | jq -r '.assets[]|select(.browser_download_url | contains("linux")) | .browser_download_url') oxidehurtworldlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/OxideMod/Oxide.Hurtworld/releases/latest | jq -r '.assets[].browser_download_url') -oxidesdtdlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/OxideMod/Oxide.SevenDaysToDie/releases/latest | jq -r '.assets[]|select(.browser_download_url | contains("linux")) | .browser_download_url' ) +oxidesdtdlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/OxideMod/Oxide.SevenDaysToDie/releases/latest | jq -r '.assets[]|select(.browser_download_url | contains("linux")) | .browser_download_url') # Valheim Plus valeimpluslatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/valheimPlus/ValheimPlus/releases/latest | jq -r '.assets[]|select(.browser_download_url | contains("UnixServer.tar.gz")) | .browser_download_url') @@ -122,77 +122,77 @@ modseparator="MOD" # [13] | "Short Description" a description showed to the user upon installation/removal # Half-life 1 Engine Mods -mod_info_metamod=( MOD "metamod" "Metamod" "${metamodurl}" "${metamodlatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/metamod/plugins.ini;" "ENGINES" "Counter-Strike 1.6;Day of Defeat;Team Fortress Classic;Natural Selection;The Specialists;Half-Life: Deathmatch;" "NOTGAMES" "https://github.com/alliedmodders/metamod-hl1" "Plugins Framework" ) -mod_info_base_amxx=( MOD "amxmodx" "AMX Mod X: Base" "${amxxbaseurl}" "${amxxbaselatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/amxmodx/configs;" "ENGINES" "Counter-Strike 1.6;Day of Defeat;Team Fortress Classic;Natural Selection;The Specialists;Half-Life: Deathmatch;" "NOTGAMES" "https://www.amxmodx.org" "Admin Features (requires Metamod)" ) +mod_info_metamod=(MOD "metamod" "Metamod" "${metamodurl}" "${metamodlatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/metamod/plugins.ini;" "ENGINES" "Counter-Strike 1.6;Day of Defeat;Team Fortress Classic;Natural Selection;The Specialists;Half-Life: Deathmatch;" "NOTGAMES" "https://github.com/alliedmodders/metamod-hl1" "Plugins Framework") +mod_info_base_amxx=(MOD "amxmodx" "AMX Mod X: Base" "${amxxbaseurl}" "${amxxbaselatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/amxmodx/configs;" "ENGINES" "Counter-Strike 1.6;Day of Defeat;Team Fortress Classic;Natural Selection;The Specialists;Half-Life: Deathmatch;" "NOTGAMES" "https://www.amxmodx.org" "Admin Features (requires Metamod)") # CS 1.6 (HL1) Engine Mods -mod_info_cs_amxx=( MOD "amxmodxcs" "AMX Mod X: Counter-Strike" "${amxxcsurl}" "${amxxcslatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/amxmodx/configs;" "ENGINES" "Counter-Strike 1.6;" "NOTGAMES" "https://www.amxmodx.org" "Admin Features (requires Metamod & AMX Mod X: Base)" ) +mod_info_cs_amxx=(MOD "amxmodxcs" "AMX Mod X: Counter-Strike" "${amxxcsurl}" "${amxxcslatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/amxmodx/configs;" "ENGINES" "Counter-Strike 1.6;" "NOTGAMES" "https://www.amxmodx.org" "Admin Features (requires Metamod & AMX Mod X: Base)") # DOD (HL1) Engine Mods -mod_info_dod_amxx=( MOD "amxmodxdod" "AMX Mod X: Day of Defeat" "${amxxdodurl}" "${amxxdodlatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/amxmodx/configs;" "ENGINES" "Day of Defeat;" "NOTGAMES" "https://www.amxmodx.org" "Admin Features (requires Metamod & AMX Mod X: Base)" ) +mod_info_dod_amxx=(MOD "amxmodxdod" "AMX Mod X: Day of Defeat" "${amxxdodurl}" "${amxxdodlatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/amxmodx/configs;" "ENGINES" "Day of Defeat;" "NOTGAMES" "https://www.amxmodx.org" "Admin Features (requires Metamod & AMX Mod X: Base)") # TFC (HL1) Engine Mods -mod_info_tfc_amxx=( MOD "amxmodxtfc" "AMX Mod X: Team Fortress Classic" "${amxxtfcurl}" "${amxxtfclatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/amxmodx/configs;" "ENGINES" "Team Fortress Classic;" "NOTGAMES" "https://www.amxmodx.org" "Admin Features (requires Metamod & AMX Mod X: Base)" ) +mod_info_tfc_amxx=(MOD "amxmodxtfc" "AMX Mod X: Team Fortress Classic" "${amxxtfcurl}" "${amxxtfclatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/amxmodx/configs;" "ENGINES" "Team Fortress Classic;" "NOTGAMES" "https://www.amxmodx.org" "Admin Features (requires Metamod & AMX Mod X: Base)") # NS (Natural Selection) (HL1) Engine Mods -mod_info_ns_amxx=( MOD "amxmodxns" "AMX Mod X: Natural Selection" "${amxxnsurl}" "${amxxnslatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/amxmodx/configs;" "ENGINES" "Natural Selection;" "NOTGAMES" "https://www.amxmodx.org" "Admin Features (requires Metamod & AMX Mod X: Base)" ) +mod_info_ns_amxx=(MOD "amxmodxns" "AMX Mod X: Natural Selection" "${amxxnsurl}" "${amxxnslatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/amxmodx/configs;" "ENGINES" "Natural Selection;" "NOTGAMES" "https://www.amxmodx.org" "Admin Features (requires Metamod & AMX Mod X: Base)") # TS (The Specialists) (HL1) Engine Mods -mod_info_ts_amxx=( MOD "amxmodxts" "AMX Mod X: The Specialists" "${amxxtsurl}" "${amxxtslatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/amxmodx/configs;" "ENGINES" "The Specialists;" "NOTGAMES" "https://www.amxmodx.org" "Admin Features (requires Metamod & AMX Mod X: Base)" ) +mod_info_ts_amxx=(MOD "amxmodxts" "AMX Mod X: The Specialists" "${amxxtsurl}" "${amxxtslatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/amxmodx/configs;" "ENGINES" "The Specialists;" "NOTGAMES" "https://www.amxmodx.org" "Admin Features (requires Metamod & AMX Mod X: Base)") # Source mods -mod_info_metamodsource=( MOD "metamodsource" "Metamod: Source" "${metamodsourceurl}" "${metamodsourcelatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/metamod/metaplugins.ini;" "source;" "GAMES" "NOTGAMES" "https://www.sourcemm.net" "Plugins Framework" ) -mod_info_sourcemod=( MOD "sourcemod" "SourceMod" "${sourcemodurl}" "${sourcemodlatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "source;" "GAMES" "NOTGAMES" "http://www.sourcemod.net" "Admin Features (requires Metamod: Source)" ) -mod_info_steamworks=( MOD "steamworks" "SteamWorks" "${steamworksurl}" "${steamworkslatestfile}" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/KyleSanderson/SteamWorks" "Exposing SteamWorks functions to SourcePawn" ) -mod_info_stripper=( MOD "stripper" "Stripper Source" "http://www.bailopan.net/stripper/snapshots/1.2/stripper-1.2.2-git129-linux.tar.gz" "stripper-1.2.2-git129-linux.tar.gz" "0" "LowercaseOff" "${systemdir}" "addons/stripper/maps;" "ENGINES" "Counter-Strike: Global Offensive;Counter-Strike: Source;Day of Defeat: Source;Half Life: Deathmatch;Half Life 2: Deathmatch;Insurgency;Left 4 Dead;Left 4 Dead 2;Nuclear Dawn;Team Fortress 2;" "NOTGAMES" "http://www.bailopan.net/stripper/" "Add or remove objects from map (requires MetaMod)") +mod_info_metamodsource=(MOD "metamodsource" "Metamod: Source" "${metamodsourceurl}" "${metamodsourcelatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/metamod/metaplugins.ini;" "source;" "GAMES" "NOTGAMES" "https://www.sourcemm.net" "Plugins Framework") +mod_info_sourcemod=(MOD "sourcemod" "SourceMod" "${sourcemodurl}" "${sourcemodlatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "source;" "GAMES" "NOTGAMES" "http://www.sourcemod.net" "Admin Features (requires Metamod: Source)") +mod_info_steamworks=(MOD "steamworks" "SteamWorks" "${steamworksurl}" "${steamworkslatestfile}" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/KyleSanderson/SteamWorks" "Exposing SteamWorks functions to SourcePawn") +mod_info_stripper=(MOD "stripper" "Stripper Source" "http://www.bailopan.net/stripper/snapshots/1.2/stripper-1.2.2-git129-linux.tar.gz" "stripper-1.2.2-git129-linux.tar.gz" "0" "LowercaseOff" "${systemdir}" "addons/stripper/maps;" "ENGINES" "Counter-Strike: Global Offensive;Counter-Strike: Source;Day of Defeat: Source;Half Life: Deathmatch;Half Life 2: Deathmatch;Insurgency;Left 4 Dead;Left 4 Dead 2;Nuclear Dawn;Team Fortress 2;" "NOTGAMES" "http://www.bailopan.net/stripper/" "Add or remove objects from map (requires MetaMod)") # CS:GO Mods -mod_info_gokz=( MOD "gokz" "GOKZ" "${gokzlatestlink}" "${gokzlatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/KZGlobalTeam/gokz" "GOKZ ${gokzlatestversion} - Implements the KZ game mode (requires SourceMod and MetaMod)" ) -mod_info_ttt=( MOD "ttt" "Trouble in Terrorist Town" "https://csgottt.com/downloads/ttt-latest-dev-${sourcemodversion}.zip" "ttt-latest.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/Bara/TroubleinTerroristTown" "Implements the TTT game mode (requires SourceMod and MetaMod)" ) -mod_info_get5=( MOD "get5" "Get 5" "${get5url}" "${get5latestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/get5" "Plugin for competitive matches/scrims (requires SourceMod and MetaMod)" ) -mod_info_prac=( MOD "prac" "csgo practice mode" "${csgopracticelatestlink}" "${csgopracticelatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/csgo-practice-mode" "Practice Mode is a sourcemod plugin for helping players/teams run practices." ) -mod_info_pug=( MOD "pug" "PUG" "${csgopuglatestlink}" "${csgopuglatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/csgo-pug-setup" "plugin for setting up private pug/10man games" ) -mod_info_dhook=( MOD "dhook" "dhook" "https://forums.alliedmods.net/attachment.php?attachmentid=190123&d=1625050030" "dhooks-2.2.0d17.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://forums.alliedmods.net/showpost.php?p=2588686&postcount=589" "DHooks 2.2.0 - Required for GOKZ" ) -mod_info_movement=( MOD "movementapi" "movementapi" "${movementapilatestlink}" "${movementapilatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/danzayau/MovementAPI" "Movement API ${movementapilatestversion} - Required for GOKZ" ) -mod_info_cleaner=( MOD "cleaner" "cleaner" "https://github.com/e54385991/console-cleaner/archive/refs/heads/master.zip" "console-cleaner.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/e54385991/console-cleaner" "Console Cleaner - Optional for GOKZ" ) +mod_info_gokz=(MOD "gokz" "GOKZ" "${gokzlatestlink}" "${gokzlatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/KZGlobalTeam/gokz" "GOKZ ${gokzlatestversion} - Implements the KZ game mode (requires SourceMod and MetaMod)") +mod_info_ttt=(MOD "ttt" "Trouble in Terrorist Town" "https://csgottt.com/downloads/ttt-latest-dev-${sourcemodversion}.zip" "ttt-latest.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/Bara/TroubleinTerroristTown" "Implements the TTT game mode (requires SourceMod and MetaMod)") +mod_info_get5=(MOD "get5" "Get 5" "${get5url}" "${get5latestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/get5" "Plugin for competitive matches/scrims (requires SourceMod and MetaMod)") +mod_info_prac=(MOD "prac" "csgo practice mode" "${csgopracticelatestlink}" "${csgopracticelatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/csgo-practice-mode" "Practice Mode is a sourcemod plugin for helping players/teams run practices.") +mod_info_pug=(MOD "pug" "PUG" "${csgopuglatestlink}" "${csgopuglatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/csgo-pug-setup" "plugin for setting up private pug/10man games") +mod_info_dhook=(MOD "dhook" "dhook" "https://forums.alliedmods.net/attachment.php?attachmentid=190123&d=1625050030" "dhooks-2.2.0d17.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://forums.alliedmods.net/showpost.php?p=2588686&postcount=589" "DHooks 2.2.0 - Required for GOKZ") +mod_info_movement=(MOD "movementapi" "movementapi" "${movementapilatestlink}" "${movementapilatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/danzayau/MovementAPI" "Movement API ${movementapilatestversion} - Required for GOKZ") +mod_info_cleaner=(MOD "cleaner" "cleaner" "https://github.com/e54385991/console-cleaner/archive/refs/heads/master.zip" "console-cleaner.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/e54385991/console-cleaner" "Console Cleaner - Optional for GOKZ") # Garry's Mod Addons -mod_info_ulib=( MOD "ulib" "ULib" "https://codeload.github.com/TeamUlysses/ulib/zip/master" "ulib-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://ulyssesmod.net" "Complete Framework" ) -mod_info_ulx=( MOD "ulx" "ULX" "https://codeload.github.com/TeamUlysses/ulx/zip/master" "ulx-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://ulyssesmod.net" "Admin Panel (requires ULib)" ) -mod_info_utime=( MOD "utime" "UTime" "https://github.com/TeamUlysses/utime/archive/master.zip" "utime-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://ulyssesmod.net" "Keep track of players play time" ) -mod_info_uclip=( MOD "uclip" "UClip" "https://github.com/TeamUlysses/uclip/archive/master.zip" "uclip-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://ulyssesmod.net" "An alternative to noclip" ) -mod_info_acf=( MOD "acf" "Armoured Combat Framework" "https://github.com/nrlulz/ACF/archive/master.zip" "acf-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "acf-master/lua/acf/shared/guns;" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/nrlulz/ACF" "Realistic Wepons & Engines" ) -mod_info_acf_missiles=( MOD "acfmissiles" "ACF Missiles" "https://github.com/Bubbus/ACF-Missiles/archive/master.zip" "acf-missiles-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/Bubbus/ACF-Missiles" "More missiles for ACF" ) -mod_info_advdupe2=( MOD "advdupe2" "Advanced Duplicator 2" "https://github.com/wiremod/advdupe2/archive/master.zip" "advdupe2-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://www.wiremod.com" "Save your constructions. Second version" ) -mod_info_pac3=( MOD "pac3" "PAC3" "https://github.com/CapsAdmin/pac3/archive/master.zip" "pac3-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/CapsAdmin/pac3" "Advanced player model customization" ) -mod_info_wiremod=( MOD "wiremod" "Wiremod" "https://github.com/wiremod/wire/archive/master.zip" "wire-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/wiremod/wire" "Base Wiremod Addon") -mod_info_wiremodextras=( MOD "wiremod-extras" "Wiremod Extras" "https://github.com/wiremod/wire-extras/archive/master.zip" "wire-extras-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/wiremod/wire-extras/" "Addition to Wiremod, Extra Content") -mod_info_advduplicator=( MOD "advdupe1" "Advanced Duplicator 1" "https://github.com/wiremod/advduplicator/archive/master.zip" "advduplicator-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/wiremod/advduplicator" "Save your constructions. First version" ) -mod_info_trackassemblytool=( MOD "trackassemblytool" "Track Assembly Tool" "https://github.com/dvdvideo1234/trackassemblytool/archive/master.zip" "trackassemblytool-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/TrackAssemblyTool" "Assembles segmented track. Supports wire" ) -mod_info_physpropertiesadv=( MOD "physpropertiesadv" "Phys Properties Adv" "https://github.com/dvdvideo1234/physpropertiesadv/archive/master.zip" "physpropertiesadv-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/PhysPropertiesAdv" "Advanced configurable properties" ) -mod_info_controlsystemse2=( MOD "controlsystemse2" "Control Systems E2" "https://github.com/dvdvideo1234/controlsystemse2/archive/master.zip" "controlsystemse2-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/ControlSystemsE2" "PID controllers and fast traces for E2. Minor included in wire-extas" ) -mod_info_e2pistontiming=( MOD "e2pistontiming" "E2 Piston Timing" "https://github.com/dvdvideo1234/e2pistontiming/archive/master.zip" "e2pistontiming-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/E2PistonTiming" "Routine driven piston engine timings for E2" ) -mod_info_propcannontool=( MOD "propcannontool" "Prop Cannon Tool" "https://github.com/dvdvideo1234/propcannontool/archive/master.zip" "propcannontool-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/PropCannonTool" "Cannon entity that can fire props. Supports wire" ) -mod_info_gearassemblytool=( MOD "gearassemblytool" "Gear Assembly Tool" "https://github.com/dvdvideo1234/gearassemblytool/archive/master.zip" "gearassemblytool-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/GearAssemblyTool" "Assembles segmented gearbox" ) -mod_info_spinnertool=( MOD "spinnertool" "Spinner Tool" "https://github.com/dvdvideo1234/spinnertool/archive/master.zip" "spinnertool-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/SpinnerTool" "Torque lever controlled spinner. Supports wire" ) -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" ) -mod_info_darkrp=( MOD "darkrp" "DarkRP" "https://github.com/FPtje/DarkRP/archive/master.zip" "darkrp-master.zip" "0" "LowercaseOn" "${systemdir}/gamemodes" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://darkrp.com" "Most popular gamemode" ) -mod_info_darkrpmodification=( MOD "darkrpmodification" "DarkRP Modification" "https://github.com/FPtje/darkrpmodification/archive/master.zip" "darkrpmodification-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "NOUPDATE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://darkrp.com" "Customize DarkRP settings" ) -mod_info_laserstool=( MOD "laserstool" "Laser STool" "https://github.com/dvdvideo1234/laserstool/archive/main.zip" "laserstool-main.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/LaserSTool" "Scripted tool that spawns laser entities, simulates light rays and even kill players" ) +mod_info_ulib=(MOD "ulib" "ULib" "https://codeload.github.com/TeamUlysses/ulib/zip/master" "ulib-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://ulyssesmod.net" "Complete Framework") +mod_info_ulx=(MOD "ulx" "ULX" "https://codeload.github.com/TeamUlysses/ulx/zip/master" "ulx-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://ulyssesmod.net" "Admin Panel (requires ULib)") +mod_info_utime=(MOD "utime" "UTime" "https://github.com/TeamUlysses/utime/archive/master.zip" "utime-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://ulyssesmod.net" "Keep track of players play time") +mod_info_uclip=(MOD "uclip" "UClip" "https://github.com/TeamUlysses/uclip/archive/master.zip" "uclip-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://ulyssesmod.net" "An alternative to noclip") +mod_info_acf=(MOD "acf" "Armoured Combat Framework" "https://github.com/nrlulz/ACF/archive/master.zip" "acf-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "acf-master/lua/acf/shared/guns;" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/nrlulz/ACF" "Realistic Wepons & Engines") +mod_info_acf_missiles=(MOD "acfmissiles" "ACF Missiles" "https://github.com/Bubbus/ACF-Missiles/archive/master.zip" "acf-missiles-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/Bubbus/ACF-Missiles" "More missiles for ACF") +mod_info_advdupe2=(MOD "advdupe2" "Advanced Duplicator 2" "https://github.com/wiremod/advdupe2/archive/master.zip" "advdupe2-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://www.wiremod.com" "Save your constructions. Second version") +mod_info_pac3=(MOD "pac3" "PAC3" "https://github.com/CapsAdmin/pac3/archive/master.zip" "pac3-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/CapsAdmin/pac3" "Advanced player model customization") +mod_info_wiremod=(MOD "wiremod" "Wiremod" "https://github.com/wiremod/wire/archive/master.zip" "wire-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/wiremod/wire" "Base Wiremod Addon") +mod_info_wiremodextras=(MOD "wiremod-extras" "Wiremod Extras" "https://github.com/wiremod/wire-extras/archive/master.zip" "wire-extras-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/wiremod/wire-extras/" "Addition to Wiremod, Extra Content") +mod_info_advduplicator=(MOD "advdupe1" "Advanced Duplicator 1" "https://github.com/wiremod/advduplicator/archive/master.zip" "advduplicator-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/wiremod/advduplicator" "Save your constructions. First version") +mod_info_trackassemblytool=(MOD "trackassemblytool" "Track Assembly Tool" "https://github.com/dvdvideo1234/trackassemblytool/archive/master.zip" "trackassemblytool-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/TrackAssemblyTool" "Assembles segmented track. Supports wire") +mod_info_physpropertiesadv=(MOD "physpropertiesadv" "Phys Properties Adv" "https://github.com/dvdvideo1234/physpropertiesadv/archive/master.zip" "physpropertiesadv-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/PhysPropertiesAdv" "Advanced configurable properties") +mod_info_controlsystemse2=(MOD "controlsystemse2" "Control Systems E2" "https://github.com/dvdvideo1234/controlsystemse2/archive/master.zip" "controlsystemse2-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/ControlSystemsE2" "PID controllers and fast traces for E2. Minor included in wire-extas") +mod_info_e2pistontiming=(MOD "e2pistontiming" "E2 Piston Timing" "https://github.com/dvdvideo1234/e2pistontiming/archive/master.zip" "e2pistontiming-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/E2PistonTiming" "Routine driven piston engine timings for E2") +mod_info_propcannontool=(MOD "propcannontool" "Prop Cannon Tool" "https://github.com/dvdvideo1234/propcannontool/archive/master.zip" "propcannontool-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/PropCannonTool" "Cannon entity that can fire props. Supports wire") +mod_info_gearassemblytool=(MOD "gearassemblytool" "Gear Assembly Tool" "https://github.com/dvdvideo1234/gearassemblytool/archive/master.zip" "gearassemblytool-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/GearAssemblyTool" "Assembles segmented gearbox") +mod_info_spinnertool=(MOD "spinnertool" "Spinner Tool" "https://github.com/dvdvideo1234/spinnertool/archive/master.zip" "spinnertool-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/SpinnerTool" "Torque lever controlled spinner. Supports wire") +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") +mod_info_darkrp=(MOD "darkrp" "DarkRP" "https://github.com/FPtje/DarkRP/archive/master.zip" "darkrp-master.zip" "0" "LowercaseOn" "${systemdir}/gamemodes" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://darkrp.com" "Most popular gamemode") +mod_info_darkrpmodification=(MOD "darkrpmodification" "DarkRP Modification" "https://github.com/FPtje/darkrpmodification/archive/master.zip" "darkrpmodification-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "NOUPDATE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://darkrp.com" "Customize DarkRP settings") +mod_info_laserstool=(MOD "laserstool" "Laser STool" "https://github.com/dvdvideo1234/laserstool/archive/main.zip" "laserstool-main.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/LaserSTool" "Scripted tool that spawns laser entities, simulates light rays and even kill players") # Oxidemod -mod_info_rustoxide=( MOD "rustoxide" "Oxide for Rust" "${oxiderustlatestlink}" "Oxide.Rust-linux.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Rust;" "NOTGAMES" "https://umod.org/games/rust" "Allows for the use of plugins" ) -mod_info_hwoxide=( MOD "hwoxide" "Oxide for Hurtworld" "${oxidehurtworldlatestlink}" "Oxide.Hurtworld.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Hurtworld;" "NOTGAMES" "https://umod.org/games/hurtworld" "Allows for the use of plugins" ) -mod_info_sdtdoxide=( MOD "sdtdoxide" "Oxide for 7 Days To Die" "${oxidesdtdlatestlink}" "Oxide.SevenDaysToDie.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "7 Days To Die;" "NOTGAMES" "https://umod.org/games/7-days-to-die" "Allows for the use of plugins" ) +mod_info_rustoxide=(MOD "rustoxide" "Oxide for Rust" "${oxiderustlatestlink}" "Oxide.Rust-linux.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Rust;" "NOTGAMES" "https://umod.org/games/rust" "Allows for the use of plugins") +mod_info_hwoxide=(MOD "hwoxide" "Oxide for Hurtworld" "${oxidehurtworldlatestlink}" "Oxide.Hurtworld.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Hurtworld;" "NOTGAMES" "https://umod.org/games/hurtworld" "Allows for the use of plugins") +mod_info_sdtdoxide=(MOD "sdtdoxide" "Oxide for 7 Days To Die" "${oxidesdtdlatestlink}" "Oxide.SevenDaysToDie.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "7 Days To Die;" "NOTGAMES" "https://umod.org/games/7-days-to-die" "Allows for the use of plugins") # ValheimPlus -mod_info_valheimplus=( MOD "valheimplus" "Valheim PLUS" "${valeimpluslatestlink}" "ValheimPlus.tar.gz" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Valheim;" "NOTGAMES" "https://github.com/valheimPlus/ValheimPlus" "Mod to improve Valheim gameplay") +mod_info_valheimplus=(MOD "valheimplus" "Valheim PLUS" "${valeimpluslatestlink}" "ValheimPlus.tar.gz" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Valheim;" "NOTGAMES" "https://github.com/valheimPlus/ValheimPlus" "Mod to improve Valheim gameplay") # REQUIRED: Set all mods info into the global array -mods_global_array=( "${mod_info_metamod[@]}" "${mod_info_base_amxx[@]}" "${mod_info_cs_amxx[@]}" "${mod_info_dod_amxx[@]}" "${mod_info_tfc_amxx[@]}" "${mod_info_ns_amxx[@]}" "${mod_info_ts_amxx[@]}" "${mod_info_metamodsource[@]}" "${mod_info_sourcemod[@]}" "${mod_info_steamworks[@]}" "${mod_info_gokz[@]}" "${mod_info_ttt[@]}" "${mod_info_get5[@]}" "${mod_info_prac[@]}" "${mod_info_pug[@]}" "${mod_info_dhook[@]}" "${mod_info_movement[@]}" "${mod_info_cleaner[@]}" "${mod_info_ulib[@]}" "${mod_info_ulx[@]}" "${mod_info_utime[@]}" "${mod_info_uclip[@]}" "${mod_info_acf[@]}" "${mod_info_acf_missiles[@]}" "${mod_info_acf_sweps[@]}" "${mod_info_advdupe2[@]}" "${mod_info_pac3[@]}" "${mod_info_wiremod[@]}" "${mod_info_wiremodextras[@]}" "${mod_info_darkrp[@]}" "${mod_info_darkrpmodification[@]}" "${mod_info_rustoxide[@]}" "${mod_info_hwoxide[@]}" "${mod_info_sdtdoxide[@]}" "${mod_info_advduplicator[@]}" "${mod_info_trackassemblytool[@]}" "${mod_info_physpropertiesadv[@]}" "${mod_info_controlsystemse2[@]}" "${mod_info_e2pistontiming[@]}" "${mod_info_propcannontool[@]}" "${mod_info_gearassemblytool[@]}" "${mod_info_spinnertool[@]}" "${mod_info_surfacefrictiontool[@]}" "${mod_info_magneticdipole[@]}" "${mod_info_environmentorganizer[@]}" "${mod_info_precision_alignment[@]}" "${mod_info_improved_stacker[@]}" "${mod_info_improved_weight[@]}" "${mod_info_improved_antinoclip[@]}" "${mod_info_laserstool[@]}" "${mod_info_valheimplus[@]}" ) +mods_global_array=("${mod_info_metamod[@]}" "${mod_info_base_amxx[@]}" "${mod_info_cs_amxx[@]}" "${mod_info_dod_amxx[@]}" "${mod_info_tfc_amxx[@]}" "${mod_info_ns_amxx[@]}" "${mod_info_ts_amxx[@]}" "${mod_info_metamodsource[@]}" "${mod_info_sourcemod[@]}" "${mod_info_steamworks[@]}" "${mod_info_gokz[@]}" "${mod_info_ttt[@]}" "${mod_info_get5[@]}" "${mod_info_prac[@]}" "${mod_info_pug[@]}" "${mod_info_dhook[@]}" "${mod_info_movement[@]}" "${mod_info_cleaner[@]}" "${mod_info_ulib[@]}" "${mod_info_ulx[@]}" "${mod_info_utime[@]}" "${mod_info_uclip[@]}" "${mod_info_acf[@]}" "${mod_info_acf_missiles[@]}" "${mod_info_acf_sweps[@]}" "${mod_info_advdupe2[@]}" "${mod_info_pac3[@]}" "${mod_info_wiremod[@]}" "${mod_info_wiremodextras[@]}" "${mod_info_darkrp[@]}" "${mod_info_darkrpmodification[@]}" "${mod_info_rustoxide[@]}" "${mod_info_hwoxide[@]}" "${mod_info_sdtdoxide[@]}" "${mod_info_advduplicator[@]}" "${mod_info_trackassemblytool[@]}" "${mod_info_physpropertiesadv[@]}" "${mod_info_controlsystemse2[@]}" "${mod_info_e2pistontiming[@]}" "${mod_info_propcannontool[@]}" "${mod_info_gearassemblytool[@]}" "${mod_info_spinnertool[@]}" "${mod_info_surfacefrictiontool[@]}" "${mod_info_magneticdipole[@]}" "${mod_info_environmentorganizer[@]}" "${mod_info_precision_alignment[@]}" "${mod_info_improved_stacker[@]}" "${mod_info_improved_weight[@]}" "${mod_info_improved_antinoclip[@]}" "${mod_info_laserstool[@]}" "${mod_info_valheimplus[@]}") diff --git a/lgsm/functions/query_gamedig.sh b/lgsm/functions/query_gamedig.sh index 32b70aac2..43f748bcc 100755 --- a/lgsm/functions/query_gamedig.sh +++ b/lgsm/functions/query_gamedig.sh @@ -9,7 +9,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Check if gamedig and jq are installed. -if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; then +if [ "$(command -v gamedig 2> /dev/null)" ] && [ "$(command -v jq 2> /dev/null)" ]; then # will bypass query if server offline. check_status.sh @@ -49,7 +49,7 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; fi if [ "${gdplayers}" == "null" ]; then unset gdplayers - elif [ "${gdplayers}" == "[]" ]||[ "${gdplayers}" == "-1" ]; then + elif [ "${gdplayers}" == "[]" ] || [ "${gdplayers}" == "-1" ]; then gdplayers=0 fi @@ -75,7 +75,7 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; # numbots. gdbots=$(echo "${gamedigraw}" | jq -re '.bots | length') - if [ "${gdbots}" == "null" ]||[ "${gdbots}" == "0" ]; then + if [ "${gdbots}" == "null" ] || [ "${gdbots}" == "0" ]; then unset gdbots fi @@ -86,7 +86,7 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; gdversion=$(echo "${gamedigraw}" | jq -re '.raw.version') fi - if [ "${gdversion}" == "null" ]||[ "${gdversion}" == "0" ]; then + if [ "${gdversion}" == "null" ] || [ "${gdversion}" == "0" ]; then unset gdversion fi fi diff --git a/lgsm/functions/update_factorio.sh b/lgsm/functions/update_factorio.sh index 47ccefe1b..2c8bf0d01 100644 --- a/lgsm/functions/update_factorio.sh +++ b/lgsm/functions/update_factorio.sh @@ -7,7 +7,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_update_factorio_dl(){ +fn_update_factorio_dl() { fn_fetch_file "https://factorio.com/get-download/${downloadbranch}/headless/${factorioarch}" "" "" "" "${tmpdir}" "factorio_headless_${factorioarch}-${remotebuild}.tar.xz" "" "norun" "noforce" "nohash" fn_dl_extract "${tmpdir}" "factorio_headless_${factorioarch}-${remotebuild}.tar.xz" "${tmpdir}" echo -e "copying to ${serverfiles}...\c" @@ -25,7 +25,7 @@ fn_update_factorio_dl(){ fi } -fn_update_factorio_localbuild(){ +fn_update_factorio_localbuild() { # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" # Uses executable to find local build. @@ -41,13 +41,13 @@ fn_update_factorio_localbuild(){ fi } -fn_update_factorio_remotebuild(){ +fn_update_factorio_remotebuild() { # Gets remote build info. remotebuild=$(curl -s "https://factorio.com/get-download/${downloadbranch}/headless/${factorioarch}" | grep -o '[0-9]\.[0-9]\{1,\}\.[0-9]\{1,\}' | head -1) if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" fn_script_log_fatal "Checking remote build" core_exit.sh @@ -57,7 +57,7 @@ fn_update_factorio_remotebuild(){ fi else # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_failure "Unable to get remote build" fn_script_log_fatal "Unable to get remote build" core_exit.sh @@ -65,13 +65,13 @@ fn_update_factorio_remotebuild(){ fi } -fn_update_factorio_compare(){ +fn_update_factorio_compare() { fn_print_dots "Checking for update: ${remotelocation}" # Removes dots so if statement can compare version numbers. fn_print_dots "Checking for update: ${remotelocation}" localbuilddigit=$(echo -e "${localbuild}" | tr -cd '[:digit:]') remotebuilddigit=$(echo -e "${remotebuild}" | tr -cd '[:digit:]') - if [ "${localbuilddigit}" -ne "${remotebuilddigit}" ]||[ "${forceupdate}" == "1" ]; then + if [ "${localbuilddigit}" -ne "${remotebuilddigit}" ] || [ "${forceupdate}" == "1" ]; then fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" echo -e "Update available" diff --git a/lgsm/functions/update_jediknight2.sh b/lgsm/functions/update_jediknight2.sh index 3a3c40f14..421bc543f 100644 --- a/lgsm/functions/update_jediknight2.sh +++ b/lgsm/functions/update_jediknight2.sh @@ -7,7 +7,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_update_jk2_dl(){ +fn_update_jk2_dl() { fn_fetch_file "https://github.com/mvdevs/jk2mv/releases/download/${remotebuild}/jk2mv-v${remotebuild}-dedicated.zip" "" "" "" "${tmpdir}" "jk2mv-${remotebuild}-dedicated.zip" "" "norun" "noforce" "nohash" fn_dl_extract "${tmpdir}" "jk2mv-${remotebuild}-dedicated.zip" "${tmpdir}/jk2mv-v${remotebuild}-dedicated" echo -e "copying to ${serverfiles}...\c" @@ -24,13 +24,13 @@ fn_update_jk2_dl(){ fi } -fn_update_jk2_localbuild(){ +fn_update_jk2_localbuild() { # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" # Uses log file to gather info. # Log is generated and cleared on startup but filled on shutdown. requirerestart=1 - localbuild=$(grep "\"version\"" "${consolelogdir}"/* 2>/dev/null | sed 's/.*://' | awk '{print $1}' | head -n 1) + localbuild=$(grep "\"version\"" "${consolelogdir}"/* 2> /dev/null | sed 's/.*://' | awk '{print $1}' | head -n 1) if [ -z "${localbuild}" ]; then fn_print_error "Checking local build: ${remotelocation}" fn_print_error_nl "Checking local build: ${remotelocation}: no log files containing version info" @@ -57,7 +57,7 @@ fn_update_jk2_localbuild(){ fi if [ -z "${localbuild}" ]; then - localbuild=$(grep Version "$(ls -tr "${consolelogdir}"/* 2>/dev/null)" | tail -1 | sed 's/.*Version //') + localbuild=$(grep Version "$(ls -tr "${consolelogdir}"/* 2> /dev/null)" | tail -1 | sed 's/.*Version //') fi if [ -z "${localbuild}" ]; then @@ -71,13 +71,13 @@ fn_update_jk2_localbuild(){ fi } -fn_update_jk2_remotebuild(){ +fn_update_jk2_remotebuild() { # Gets remote build info. remotebuild=$(curl -s "https://api.github.com/repos/mvdevs/jk2mv/releases/latest" | grep dedicated.zip | tail -1 | awk -F"/" '{ print $8 }') if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" fn_script_log_fatal "Checking remote build" core_exit.sh @@ -87,7 +87,7 @@ fn_update_jk2_remotebuild(){ fi else # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_failure "Unable to get remote build" fn_script_log_fatal "Unable to get remote build" core_exit.sh @@ -95,12 +95,12 @@ fn_update_jk2_remotebuild(){ fi } -fn_update_jk2_compare(){ +fn_update_jk2_compare() { # Removes dots so if statement can compare version numbers. fn_print_dots "Checking for update: ${remotelocation}" localbuilddigit=$(echo -e "${localbuild}" | tr -cd '[:digit:]') remotebuilddigit=$(echo -e "${remotebuild}" | tr -cd '[:digit:]') - if [ "${localbuilddigit}" -ne "${remotebuilddigit}" ]||[ "${forceupdate}" == "1" ]; then + if [ "${localbuilddigit}" -ne "${remotebuilddigit}" ] || [ "${forceupdate}" == "1" ]; then fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" echo -e "Update available" diff --git a/lgsm/functions/update_minecraft.sh b/lgsm/functions/update_minecraft.sh index 63a2fd51c..d20b98ef4 100644 --- a/lgsm/functions/update_minecraft.sh +++ b/lgsm/functions/update_minecraft.sh @@ -7,7 +7,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_update_minecraft_dl(){ +fn_update_minecraft_dl() { # Generate link to version manifest json. remotebuildlink=$(curl -s "https://launchermeta.${remotelocation}/mc/game/version_manifest.json" | jq -r --arg branch ${branch} --arg mcversion ${remotebuild} '.versions | .[] | select(.type==$branch and .id==$mcversion) | .url') # Generate link to server.jar @@ -30,7 +30,7 @@ fn_update_minecraft_dl(){ fi } -fn_update_minecraft_localbuild(){ +fn_update_minecraft_localbuild() { # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" # Uses executable to find local build. @@ -46,7 +46,7 @@ fn_update_minecraft_localbuild(){ fi } -fn_update_minecraft_remotebuild(){ +fn_update_minecraft_remotebuild() { # Gets remote build info. # Latest release. if [ "${branch}" == "release" ] && [ "${mcversion}" == "latest" ]; then @@ -62,7 +62,7 @@ fn_update_minecraft_remotebuild(){ if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" fn_script_log_fatal "Checking remote build" core_exit.sh @@ -72,7 +72,7 @@ fn_update_minecraft_remotebuild(){ fi else # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_failure "Unable to get remote build" fn_script_log_fatal "Unable to get remote build" core_exit.sh @@ -80,10 +80,10 @@ fn_update_minecraft_remotebuild(){ fi } -fn_update_minecraft_compare(){ +fn_update_minecraft_compare() { # Removes dots so if statement can compare version numbers. fn_print_dots "Checking for update: ${remotelocation}" - if [ "${localbuild}" != "${remotebuild}" ]||[ "${forceupdate}" == "1" ]; then + if [ "${localbuild}" != "${remotebuild}" ] || [ "${forceupdate}" == "1" ]; then fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" echo -e "Update available" diff --git a/lgsm/functions/update_minecraft_bedrock.sh b/lgsm/functions/update_minecraft_bedrock.sh index f724679a9..163e076aa 100644 --- a/lgsm/functions/update_minecraft_bedrock.sh +++ b/lgsm/functions/update_minecraft_bedrock.sh @@ -10,7 +10,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" #random number for userAgent randnum=$((1 + RANDOM % 5000)) -fn_update_minecraft_dl(){ +fn_update_minecraft_dl() { fn_fetch_file "https://minecraft.azureedge.net/bin-linux/bedrock-server-${remotebuild}.zip" "" "" "" "${tmpdir}" "bedrock_server.${remotebuild}.zip" echo -e "Extracting to ${serverfiles}...\c" if [ "${firstcommandname}" == "INSTALL" ]; then @@ -32,13 +32,13 @@ fn_update_minecraft_dl(){ fi } -fn_update_minecraft_localbuild(){ +fn_update_minecraft_localbuild() { # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" # Uses log file to gather info. # Log is generated and cleared on startup but filled on shutdown. requirerestart=1 - localbuild=$(grep Version "${consolelogdir}"/* 2>/dev/null | tail -1 | sed 's/.*Version //') + localbuild=$(grep Version "${consolelogdir}"/* 2> /dev/null | tail -1 | sed 's/.*Version //') if [ -z "${localbuild}" ]; then fn_print_error "Checking local build: ${remotelocation}" fn_print_error_nl "Checking local build: ${remotelocation}: no log files containing version info" @@ -65,7 +65,7 @@ fn_update_minecraft_localbuild(){ fi if [ -z "${localbuild}" ]; then - localbuild=$(grep Version "$(ls -tr "${consolelogdir}"/* 2>/dev/null)" | tail -1 | sed 's/.*Version //') + localbuild=$(grep Version "$(ls -tr "${consolelogdir}"/* 2> /dev/null)" | tail -1 | sed 's/.*Version //') fi if [ -z "${localbuild}" ]; then @@ -79,7 +79,7 @@ fn_update_minecraft_localbuild(){ fi } -fn_update_minecraft_remotebuild(){ +fn_update_minecraft_remotebuild() { # Gets remote build info. if [ "${mcversion}" == "latest" ]; then remotebuild=$(curl -H "Accept-Encoding: identity" -H "Accept-Language: en" -Ls -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.${randnum}.212 Safari/537.36" "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*' | sed 's/.*\///' | grep -Eo "[.0-9]+[0-9]") @@ -90,7 +90,7 @@ fn_update_minecraft_remotebuild(){ if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" fn_script_log_fatal "Checking remote build" core_exit.sh @@ -100,7 +100,7 @@ fn_update_minecraft_remotebuild(){ fi else # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_failure "Unable to get remote build" fn_script_log_fatal "Unable to get remote build" core_exit.sh @@ -108,12 +108,12 @@ fn_update_minecraft_remotebuild(){ fi } -fn_update_minecraft_compare(){ +fn_update_minecraft_compare() { # Removes dots so if statement can compare version numbers. fn_print_dots "Checking for update: ${remotelocation}" localbuilddigit=$(echo -e "${localbuild}" | tr -cd '[:digit:]') remotebuilddigit=$(echo -e "${remotebuild}" | tr -cd '[:digit:]') - if [ "${localbuilddigit}" -ne "${remotebuilddigit}" ]||[ "${forceupdate}" == "1" ]; then + if [ "${localbuilddigit}" -ne "${remotebuilddigit}" ] || [ "${forceupdate}" == "1" ]; then fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" echo -e "Update available" diff --git a/lgsm/functions/update_mta.sh b/lgsm/functions/update_mta.sh index c789a3c21..61216b809 100644 --- a/lgsm/functions/update_mta.sh +++ b/lgsm/functions/update_mta.sh @@ -7,7 +7,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_update_mta_dl(){ +fn_update_mta_dl() { fn_fetch_file "http://linux.mtasa.com/dl/multitheftauto_linux_x64.tar.gz" "" "" "" "${tmpdir}" "multitheftauto_linux_x64.tar.gz" "" "norun" "noforce" "nohash" mkdir "${tmpdir}/multitheftauto_linux_x64" fn_dl_extract "${tmpdir}" "multitheftauto_linux_x64.tar.gz" "${tmpdir}/multitheftauto_linux_x64" @@ -26,7 +26,7 @@ fn_update_mta_dl(){ fi } -fn_update_mta_localbuild(){ +fn_update_mta_localbuild() { # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" # Uses log file to gather info. @@ -97,13 +97,13 @@ fn_update_mta_localbuild(){ fi } -fn_update_mta_remotebuild(){ +fn_update_mta_remotebuild() { # Gets remote build info. remotebuild=$(curl -s "https://api.github.com/repos/multitheftauto/mtasa-blue/releases/latest" | jq -r '.tag_name') if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" fn_script_log_fatal "Checking remote build" core_exit.sh @@ -113,7 +113,7 @@ fn_update_mta_remotebuild(){ fi else # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_failure "Unable to get remote build" fn_script_log_fatal "Unable to get remote build" core_exit.sh @@ -121,12 +121,12 @@ fn_update_mta_remotebuild(){ fi } -fn_update_mta_compare(){ +fn_update_mta_compare() { # Removes dots so if statement can compare version numbers. fn_print_dots "Checking for update: ${remotelocation}" localbuilddigit=$(echo -e "${localbuild}" | tr -cd '[:digit:]') remotebuilddigit=$(echo -e "${remotebuild}" | tr -cd '[:digit:]') - if [ "${localbuilddigit}" -ne "${remotebuilddigit}" ]||[ "${forceupdate}" == "1" ]; then + if [ "${localbuilddigit}" -ne "${remotebuilddigit}" ] || [ "${forceupdate}" == "1" ]; then fn_print_ok_nl "Checking for update: ${remotelocation}" if [ "${forceupdate}" == "1" ]; then # forceupdate bypasses checks, useful for small build changes diff --git a/lgsm/functions/update_mumble.sh b/lgsm/functions/update_mumble.sh index 8a54e7df2..77e64d3c0 100644 --- a/lgsm/functions/update_mumble.sh +++ b/lgsm/functions/update_mumble.sh @@ -7,7 +7,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_update_mumble_dl(){ +fn_update_mumble_dl() { fn_fetch_file "https://github.com/mumble-voip/mumble/releases/download/${remotebuild}/murmur-static_${mumblearch}-${remotebuild}.tar.bz2" "" "" "" "${tmpdir}" "murmur-static_${mumblearch}-${remotebuild}.tar.bz2" "" "norun" "noforce" "nohash" fn_dl_extract "${tmpdir}" "murmur-static_${mumblearch}-${remotebuild}.tar.bz2" "${tmpdir}" echo -e "copying to ${serverfiles}...\c" @@ -25,13 +25,13 @@ fn_update_mumble_dl(){ fi } -fn_update_mumble_localbuild(){ +fn_update_mumble_localbuild() { # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" # Uses executable to find local build. cd "${executabledir}" || exit if [ -f "${executable}" ]; then - localbuild=$(${executable} -version 2>&1 >/dev/null | awk '{print $5}') + localbuild=$(${executable} -version 2>&1 > /dev/null | awk '{print $5}') fn_print_ok "Checking local build: ${remotelocation}" fn_script_log_pass "Checking local build" else @@ -41,13 +41,13 @@ fn_update_mumble_localbuild(){ fi } -fn_update_mumble_remotebuild(){ +fn_update_mumble_remotebuild() { # Gets remote build info. remotebuild=$(curl -s "https://api.github.com/repos/mumble-voip/mumble/releases/latest" | grep 'murmur-static_x86.*\.bz2"' | tail -1 | awk -F"/" '{ print $8 }') if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" fn_script_log_fatal "Checking remote build" core_exit.sh @@ -57,7 +57,7 @@ fn_update_mumble_remotebuild(){ fi else # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_failure "Unable to get remote build" fn_script_log_fatal "Unable to get remote build" core_exit.sh @@ -65,12 +65,12 @@ fn_update_mumble_remotebuild(){ fi } -fn_update_mumble_compare(){ +fn_update_mumble_compare() { # Removes dots so if statement can compare version numbers. fn_print_dots "Checking for update: ${remotelocation}" localbuilddigit=$(echo -e "${localbuild}" | tr -cd '[:digit:]') remotebuilddigit=$(echo -e "${remotebuild}" | tr -cd '[:digit:]') - if [ "${localbuilddigit}" -ne "${remotebuilddigit}" ]||[ "${forceupdate}" == "1" ]; then + if [ "${localbuilddigit}" -ne "${remotebuilddigit}" ] || [ "${forceupdate}" == "1" ]; then fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" echo -e "Update available" diff --git a/lgsm/functions/update_papermc.sh b/lgsm/functions/update_papermc.sh index 2e669d93d..881e912d3 100644 --- a/lgsm/functions/update_papermc.sh +++ b/lgsm/functions/update_papermc.sh @@ -9,9 +9,9 @@ local commandname="UPDATE" local commandaction="Update" local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_update_papermc_dl(){ +fn_update_papermc_dl() { # get build info - builddata=$(curl -s "https://${remotelocation}/api/v2/projects/${paperproject}/versions/${paperversion}/builds/${remotebuild}" | jq '.downloads' ) + builddata=$(curl -s "https://${remotelocation}/api/v2/projects/${paperproject}/versions/${paperversion}/builds/${remotebuild}" | jq '.downloads') buildname=$(echo -e "${builddata}" | jq -r '.application.name') buildsha256=$(echo -e "${builddata}" | jq -r '.application.sha256') @@ -33,7 +33,7 @@ fn_update_papermc_dl(){ fi } -fn_update_papermc_localbuild(){ +fn_update_papermc_localbuild() { # Gets local build info. fn_print_dots "Checking for update: ${remotelocation}: checking local build" sleep 0.5 @@ -56,12 +56,12 @@ fn_update_papermc_localbuild(){ sleep 0.5 } -fn_update_papermc_remotebuild(){ +fn_update_papermc_remotebuild() { # Gets remote build info. remotebuild=$(curl -s "https://${remotelocation}/api/v2/projects/${paperproject}/versions/${paperversion}" | jq -r '.builds[-1]') # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_failure "Unable to get remote build" fn_script_log_fatal "Unable to get remote build" core_exit.sh @@ -71,10 +71,10 @@ fn_update_papermc_remotebuild(){ fi } -fn_update_papermc_compare(){ +fn_update_papermc_compare() { fn_print_dots "Checking for update: ${remotelocation}" sleep 0.5 - if [ "${localbuild}" != "${remotebuild}" ]||[ "${forceupdate}" == "1" ]; then + if [ "${localbuild}" != "${remotebuild}" ] || [ "${forceupdate}" == "1" ]; then fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" echo -e "Update available for version ${paperversion}" diff --git a/lgsm/functions/update_ts3.sh b/lgsm/functions/update_ts3.sh index 782a138d1..77ed61838 100644 --- a/lgsm/functions/update_ts3.sh +++ b/lgsm/functions/update_ts3.sh @@ -7,7 +7,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_update_ts3_dl(){ +fn_update_ts3_dl() { if [ "${ts3arch}" == "amd64" ]; then remotebuildurl=$(curl -s 'https://www.teamspeak.com/versions/server.json' | jq -r '.linux.x86_64.mirrors."teamspeak.com"') elif [ "${ts3arch}" == "x86" ]; then @@ -30,13 +30,13 @@ fn_update_ts3_dl(){ fi } -fn_update_ts3_localbuild(){ +fn_update_ts3_localbuild() { # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" # Uses log file to gather info. # Gives time for log file to generate. requirerestart=1 - if [ ! -d "${serverfiles}/logs" ]||[ -z "$(find "${serverfiles}/logs/"* -name 'ts3server*_0.log' 2> /dev/null)" ]; then + if [ ! -d "${serverfiles}/logs" ] || [ -z "$(find "${serverfiles}/logs/"* -name 'ts3server*_0.log' 2> /dev/null)" ]; then fn_print_error "Checking local build: ${remotelocation}" fn_print_error_nl "Checking local build: ${remotelocation}: no log files containing version info" fn_print_info_nl "Checking local build: ${remotelocation}: forcing server restart" @@ -49,7 +49,7 @@ fn_update_ts3_localbuild(){ fn_firstcommand_reset totalseconds=0 # Check again, allow time to generate logs. - while [ ! -d "${serverfiles}/logs" ]||[ -z "$(find "${serverfiles}/logs/"* -name 'ts3server*_0.log' 2> /dev/null)" ]; do + while [ ! -d "${serverfiles}/logs" ] || [ -z "$(find "${serverfiles}/logs/"* -name 'ts3server*_0.log' 2> /dev/null)" ]; do sleep 1 fn_print_info "Checking local build: ${remotelocation}: waiting for log file: ${totalseconds}" if [ -v "${loopignore}" ]; then @@ -82,7 +82,7 @@ fn_update_ts3_localbuild(){ fn_script_log_info "Waiting for local build to generate" fi localbuild=$(cat "$(find ./* -name "ts3server*_0.log" 2> /dev/null | sort | tail -1)" | grep -Eo "TeamSpeak 3 Server ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}" | grep -Eo "((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}" | tail -1) - if [ "${localbuild}" ]||[ "${seconds}" == "120" ]; then + if [ "${localbuild}" ] || [ "${seconds}" == "120" ]; then break fi sleep 1 @@ -101,7 +101,7 @@ fn_update_ts3_localbuild(){ fi } -fn_update_ts3_remotebuild(){ +fn_update_ts3_remotebuild() { # Gets remote build info. if [ "${ts3arch}" == "amd64" ]; then remotebuild=$(curl -s "https://www.teamspeak.com/versions/server.json" | jq -r '.linux.x86_64.version') @@ -111,7 +111,7 @@ fn_update_ts3_remotebuild(){ if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" fn_script_log_fatal "Checking remote build" core_exit.sh @@ -121,7 +121,7 @@ fn_update_ts3_remotebuild(){ fi else # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_failure "Unable to get remote build" fn_script_log_fatal "Unable to get remote build" core_exit.sh @@ -129,12 +129,12 @@ fn_update_ts3_remotebuild(){ fi } -fn_update_ts3_compare(){ +fn_update_ts3_compare() { # Removes dots so if statement can compare version numbers. fn_print_dots "Checking for update: ${remotelocation}" localbuilddigit=$(echo -e "${localbuild}" | tr -cd '[:digit:]') remotebuilddigit=$(echo -e "${remotebuild}" | tr -cd '[:digit:]') - if [ "${localbuilddigit}" -ne "${remotebuilddigit}" ]||[ "${forceupdate}" == "1" ]; then + if [ "${localbuilddigit}" -ne "${remotebuilddigit}" ] || [ "${forceupdate}" == "1" ]; then fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" echo -e "Update available" @@ -192,7 +192,7 @@ fn_update_ts3_compare(){ info_distro.sh if [ "${arch}" == "x86_64" ]; then ts3arch="amd64" -elif [ "${arch}" == "i386" ]||[ "${arch}" == "i686" ]; then +elif [ "${arch}" == "i386" ] || [ "${arch}" == "i686" ]; then ts3arch="x86" else fn_print_failure "Unknown or unsupported architecture: ${arch}" diff --git a/lgsm/functions/update_vintagestory.sh b/lgsm/functions/update_vintagestory.sh index b2231c66e..905384922 100755 --- a/lgsm/functions/update_vintagestory.sh +++ b/lgsm/functions/update_vintagestory.sh @@ -7,7 +7,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_update_vs_dl(){ +fn_update_vs_dl() { # get version info for download remotebuildresponse=$(curl -s "${apiurl}" | jq --arg version "${remotebuild}" '.[$version].server') remotebuildfile=$(echo -e "${remotebuildresponse}" | jq -r '.filename') @@ -20,7 +20,7 @@ fn_update_vs_dl(){ fn_clear_tmp } -fn_update_vs_localbuild(){ +fn_update_vs_localbuild() { # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" # Uses executable to find local build. @@ -36,7 +36,7 @@ fn_update_vs_localbuild(){ fi } -fn_update_vs_remotebuild(){ +fn_update_vs_remotebuild() { if [ "${branch}" == "stable" ]; then remotebuild=$(curl -s "${apiurl}" | jq -r '[ to_entries[] ] | .[].key' | grep -Ev "\-rc|\-pre" | sort -r -V | head -1) else @@ -46,7 +46,7 @@ fn_update_vs_remotebuild(){ if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" fn_script_log_fatal "Checking remote build" core_exit.sh @@ -56,7 +56,7 @@ fn_update_vs_remotebuild(){ fi else # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then fn_print_failure "Unable to get remote build" fn_script_log_fatal "Unable to get remote build" core_exit.sh @@ -64,10 +64,10 @@ fn_update_vs_remotebuild(){ fi } -fn_update_vs_compare(){ +fn_update_vs_compare() { # Removes dots so if statement can compare version numbers. fn_print_dots "Checking for update: ${remotelocation}" - if [ "${localbuild}" != "${remotebuild}" ]||[ "${forceupdate}" == "1" ]; then + if [ "${localbuild}" != "${remotebuild}" ] || [ "${forceupdate}" == "1" ]; then fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" echo -e "Update available" diff --git a/linuxgsm.sh b/linuxgsm.sh index 43c388571..6a4209b32 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -15,7 +15,7 @@ # Debugging if [ -f ".dev-debug" ]; then - exec 5>dev-debug.log + exec 5> dev-debug.log BASH_XTRACEFD="5" set -x fi @@ -52,20 +52,20 @@ userinput2="${2}" [ -n "${LGSM_GITHUBBRANCH}" ] && githubbranch="${LGSM_GITHUBBRANCH}" || githubbranch="master" # Check that curl is installed before doing anything -if [ ! "$(command -v curl 2>/dev/null)" ]; then +if [ ! "$(command -v curl 2> /dev/null)" ]; then echo -e "[ FAIL ] Curl is not installed" exit 1 fi # Core function that is required first. -core_functions.sh(){ +core_functions.sh() { functionfile="${FUNCNAME[0]}" fn_bootstrap_fetch_file_github "lgsm/functions" "core_functions.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" } # Bootstrap # Fetches the core functions required before passed off to core_dl.sh. -fn_bootstrap_fetch_file(){ +fn_bootstrap_fetch_file() { remote_fileurl="${1}" remote_fileurl_backup="${2}" remote_fileurl_name="${3}" @@ -77,16 +77,16 @@ fn_bootstrap_fetch_file(){ forcedl="${9:-0}" md5="${10:-0}" # Download file if missing or download forced. - if [ ! -f "${local_filedir}/${local_filename}" ]||[ "${forcedl}" == "forcedl" ]; then + if [ ! -f "${local_filedir}/${local_filename}" ] || [ "${forcedl}" == "forcedl" ]; then # If backup fileurl exists include it. if [ -n "${remote_fileurl_backup}" ]; then # counter set to 0 to allow second try counter=0 - remote_fileurls_array=( remote_fileurl remote_fileurl_backup ) + remote_fileurls_array=(remote_fileurl remote_fileurl_backup) else # counter set to 1 to not allow second try counter=1 - remote_fileurls_array=( remote_fileurl ) + remote_fileurls_array=(remote_fileurl) fi for remote_fileurl_array in "${remote_fileurls_array[@]}"; do @@ -97,7 +97,7 @@ fn_bootstrap_fetch_file(){ fileurl="${remote_fileurl_backup}" fileurl_name="${remote_fileurl_backup_name}" fi - counter=$((counter+1)) + counter=$((counter + 1)) if [ ! -d "${local_filedir}" ]; then mkdir -p "${local_filedir}" fi @@ -112,7 +112,7 @@ fn_bootstrap_fetch_file(){ # Download will fail if downloads a html file. if [ -f "${local_filedir}/${local_filename}" ]; then - if [ -n "$(head "${local_filedir}/${local_filename}" | grep "DOCTYPE" )" ]; then + if [ -n "$(head "${local_filedir}/${local_filename}" | grep "DOCTYPE")" ]; then rm "${local_filedir:?}/${local_filename:?}" local exitcode=2 fi @@ -164,11 +164,11 @@ fn_bootstrap_fetch_file(){ fi } -fn_bootstrap_fetch_file_github(){ +fn_bootstrap_fetch_file_github() { github_file_url_dir="${1}" github_file_url_name="${2}" # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. - if [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then + if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" else @@ -192,10 +192,10 @@ fn_bootstrap_fetch_file_github(){ fn_print_center() { columns=$(tput cols) line="$*" - printf "%*s\n" $(( (${#line} + columns) / 2)) "${line}" + printf "%*s\n" $(((${#line} + columns) / 2)) "${line}" } -fn_print_horizontal(){ +fn_print_horizontal() { printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' "=" } @@ -212,11 +212,11 @@ fn_install_menu_bash() { menu_options=() while read -r line || [[ -n "${line}" ]]; do var=$(echo -e "${line}" | awk -F "," '{print $2 " - " $3}') - menu_options+=( "${var}" ) + menu_options+=("${var}") done < "${options}" - menu_options+=( "Cancel" ) + menu_options+=("Cancel") select option in "${menu_options[@]}"; do - if [ "${option}" ]&&[ "${option}" != "Cancel" ]; then + if [ "${option}" ] && [ "${option}" != "Cancel" ]; then eval "$resultvar=\"${option/%\ */}\"" fi break @@ -238,7 +238,7 @@ fn_install_menu_whiptail() { while read -r line; do key=$(echo -e "${line}" | awk -F "," '{print $3}') val=$(echo -e "${line}" | awk -F "," '{print $2}') - menu_options+=( "${val//\"}" "${key//\"}" ) + menu_options+=("${val//\"/}" "${key//\"/}") done < "${options}" OPTION=$(${menucmd} --title "${title}" --menu "${caption}" "${height}" "${width}" "${menuheight}" "${menu_options[@]}" 3>&1 1>&2 2>&3) if [ $? == 0 ]; then @@ -263,24 +263,26 @@ fn_install_menu() { fi done case "$(basename "${menucmd}")" in - whiptail|dialog) - fn_install_menu_whiptail "${menucmd}" selection "${title}" "${caption}" "${options}" 40 80 30;; + whiptail | dialog) + fn_install_menu_whiptail "${menucmd}" selection "${title}" "${caption}" "${options}" 40 80 30 + ;; *) - fn_install_menu_bash selection "${title}" "${caption}" "${options}";; + fn_install_menu_bash selection "${title}" "${caption}" "${options}" + ;; esac eval "$resultvar=\"${selection}\"" } # Gets server info from serverlist.csv and puts in to array. -fn_server_info(){ +fn_server_info() { IFS="," server_info_array=($(grep -aw "${userinput}" "${serverlist}")) - shortname="${server_info_array[0]}" # csgo + shortname="${server_info_array[0]}" # csgo gameservername="${server_info_array[1]}" # csgoserver - gamename="${server_info_array[2]}" # Counter Strike: Global Offensive + gamename="${server_info_array[2]}" # Counter Strike: Global Offensive } -fn_install_getopt(){ +fn_install_getopt() { userinput="empty" echo -e "Usage: $0 [option]" echo -e "" @@ -294,13 +296,13 @@ fn_install_getopt(){ exit } -fn_install_file(){ +fn_install_file() { local_filename="${gameservername}" if [ -e "${local_filename}" ]; then i=2 - while [ -e "${local_filename}-${i}" ] ; do - (( i++ )) - done + while [ -e "${local_filename}-${i}" ]; do + ((i++)) + done local_filename="${local_filename}-${i}" fi cp -R "${selfname}" "${local_filename}" @@ -320,12 +322,12 @@ fn_install_file(){ # Prevent LinuxGSM from running as root. Except if doing a dependency install. if [ "$(whoami)" == "root" ]; then - if [ "${userinput}" == "install" ]||[ "${userinput}" == "auto-install" ]||[ "${userinput}" == "i" ]||[ "${userinput}" == "ai" ]; then + if [ "${userinput}" == "install" ] || [ "${userinput}" == "auto-install" ] || [ "${userinput}" == "i" ] || [ "${userinput}" == "ai" ]; then if [ "${shortname}" == "core" ]; then echo -e "[ FAIL ] Do NOT run this script as root!" exit 1 fi - elif [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]; then + elif [ ! -f "${functionsdir}/core_functions.sh" ] || [ ! -f "${functionsdir}/check_root.sh" ] || [ ! -f "${functionsdir}/core_messages.sh" ]; then echo -e "[ FAIL ] Do NOT run this script as root!" exit 1 else @@ -343,12 +345,12 @@ if [ "${shortname}" == "core" ]; then exit 1 fi - if [ "${userinput}" == "list" ]||[ "${userinput}" == "l" ]; then + if [ "${userinput}" == "list" ] || [ "${userinput}" == "l" ]; then { tail -n +1 "${serverlist}" | awk -F "," '{print $2 "\t" $3}' } | column -s $'\t' -t | more exit - elif [ "${userinput}" == "install" ]||[ "${userinput}" == "i" ]; then + elif [ "${userinput}" == "install" ] || [ "${userinput}" == "i" ]; then tail -n +1 "${serverlist}" | awk -F "," '{print $1 "," $2 "," $3}' > "${serverlistmenu}" fn_install_menu result "LinuxGSM" "Select game server to install." "${serverlistmenu}" userinput="${result}" @@ -364,7 +366,7 @@ if [ "${shortname}" == "core" ]; then fi elif [ "${userinput}" ]; then fn_server_info - if [ "${userinput}" == "${gameservername}" ]||[ "${userinput}" == "${gamename}" ]||[ "${userinput}" == "${shortname}" ]; then + if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then fn_install_file else echo -e "[ FAIL ] unknown game server" @@ -453,7 +455,7 @@ else # Reloads start parameter to ensure all vars in startparameters are set. # Will reload the last defined startparameter. - fn_reload_startparameters(){ + fn_reload_startparameters() { # reload Wurm config. if [ "${shortname}" == "wurm" ]; then # shellcheck source=/dev/null @@ -472,7 +474,7 @@ else eval startparameters="$(sed -nr 's/^ *startparameters=(.*)$/\1/p' "${configdirserver}/_default.cfg")" fi -# reload preexecutable. + # reload preexecutable. if grep -qE "^[[:blank:]]*preexecutable=" "${configdirserver}/secrets-${selfname}.cfg"; then eval preexecutable="$(sed -nr 's/^ *preexecutable=(.*)$/\1/p' "${configdirserver}/secrets-${selfname}.cfg")" elif grep -qE "^[[:blank:]]*preexecutable=" "${configdirserver}/${selfname}.cfg"; then diff --git a/tests/tests_defaultcfg/tests_defaultcfg.sh b/tests/tests_defaultcfg/tests_defaultcfg.sh index 4039d90e7..5f97f9a33 100644 --- a/tests/tests_defaultcfg/tests_defaultcfg.sh +++ b/tests/tests_defaultcfg/tests_defaultcfg.sh @@ -6,20 +6,20 @@ echo -e "Description:" echo -e "test checks that vars present in ALL _default.cfg files are correct." echo -e "" echo -e "In master config < | > In game config" -find "lgsm/config-default/config-lgsm/" ! -name '*template.cfg' -name "*.cfg" -type f -print0 | -while IFS= read -r -d $'\0' line; do - grep "=" "${line}" | cut -f1 -d"=" > defaultcfgtemp.txt - diffoutput=$(diff tests/tests_defaultcfg/defaultcfg_0.txt defaultcfgtemp.txt) - if [ "${diffoutput}" ]; then - echo "File with errors:" - echo "${line}" - echo -e "=================================" - echo -e "In master config < | > In game config" - echo "${diffoutput}" - echo "" - fi - rm -f defaultcfgtemp.txt -done +find "lgsm/config-default/config-lgsm/" ! -name '*template.cfg' -name "*.cfg" -type f -print0 \ + | while IFS= read -r -d $'\0' line; do + grep "=" "${line}" | cut -f1 -d"=" > defaultcfgtemp.txt + diffoutput=$(diff tests/tests_defaultcfg/defaultcfg_0.txt defaultcfgtemp.txt) + if [ "${diffoutput}" ]; then + echo "File with errors:" + echo "${line}" + echo -e "=================================" + echo -e "In master config < | > In game config" + echo "${diffoutput}" + echo "" + fi + rm -f defaultcfgtemp.txt + done echo -e "" echo -e "1.0 - Master Comparison" @@ -28,20 +28,20 @@ echo -e "Description:" echo -e "test checks that vars present in ALL _default.cfg files are correct." echo -e "" echo -e "In master config < | > In game config" -find lgsm/config-default/config-lgsm/ ! -name '*template.cfg' -name "*.cfg" -type f -print0 | -while IFS= read -r -d $'\0' line; do - grep "=" "${line}" | cut -f1 -d"=" > defaultcfgtemp.txt - diffoutput=$(diff tests/tests_defaultcfg/defaultcfg_0.txt defaultcfgtemp.txt | grep '^<') - if [ "${diffoutput}" ]; then - echo "File with errors:" - echo "${line}" - echo -e "=================================" - echo -e "In master config < | > In game config" - echo "${diffoutput}" - echo "" - fi - rm -f defaultcfgtemp.txt -done +find lgsm/config-default/config-lgsm/ ! -name '*template.cfg' -name "*.cfg" -type f -print0 \ + | while IFS= read -r -d $'\0' line; do + grep "=" "${line}" | cut -f1 -d"=" > defaultcfgtemp.txt + diffoutput=$(diff tests/tests_defaultcfg/defaultcfg_0.txt defaultcfgtemp.txt | grep '^<') + if [ "${diffoutput}" ]; then + echo "File with errors:" + echo "${line}" + echo -e "=================================" + echo -e "In master config < | > In game config" + echo "${diffoutput}" + echo "" + fi + rm -f defaultcfgtemp.txt + done echo -e "" echo -e "2.0 - Check Comment" @@ -50,16 +50,16 @@ echo -e "Description:" echo -e "test checks that comments in ALL _default.cfg files are correct." echo -e "" echo -e "In master config < | > In game config" -find lgsm/config-default/config-lgsm/ ! -name '*template.cfg' -name "*.cfg" -type f -print0 | -while IFS= read -r -d $'\0' line; do - grep "#" "${line}" > defaultcfgtemp.txt - diffoutput=$(diff tests/tests_defaultcfg/defaultcfg_1.txt defaultcfgtemp.txt | grep '^<') - if [ "${diffoutput}" ]; then - echo "File with errors:" - echo "${line}" - echo -e "=================================" - echo "${diffoutput}" - echo "" - fi - rm -f defaultcfgtemp.txt -done +find lgsm/config-default/config-lgsm/ ! -name '*template.cfg' -name "*.cfg" -type f -print0 \ + | while IFS= read -r -d $'\0' line; do + grep "#" "${line}" > defaultcfgtemp.txt + diffoutput=$(diff tests/tests_defaultcfg/defaultcfg_1.txt defaultcfgtemp.txt | grep '^<') + if [ "${diffoutput}" ]; then + echo "File with errors:" + echo "${line}" + echo -e "=================================" + echo "${diffoutput}" + echo "" + fi + rm -f defaultcfgtemp.txt + done diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index 6a074861c..9a27daf91 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -15,7 +15,7 @@ # Debugging if [ -f ".dev-debug" ]; then - exec 5>dev-debug.log + exec 5> dev-debug.log BASH_XTRACEFD="5" set -x fi @@ -58,14 +58,14 @@ githubrepo="LinuxGSM" githubbranch="${TRAVIS_BRANCH}" # Core function that is required first. -core_functions.sh(){ +core_functions.sh() { functionfile="${FUNCNAME[0]}" fn_bootstrap_fetch_file_github "lgsm/functions" "core_functions.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" } # Bootstrap # Fetches the core functions required before passed off to core_dl.sh. -fn_bootstrap_fetch_file(){ +fn_bootstrap_fetch_file() { remote_fileurl="${1}" remote_fileurl_backup="${2}" remote_fileurl_name="${3}" @@ -77,16 +77,16 @@ fn_bootstrap_fetch_file(){ forcedl="${9:-0}" md5="${10:-0}" # Download file if missing or download forced. - if [ ! -f "${local_filedir}/${local_filename}" ]||[ "${forcedl}" == "forcedl" ]; then + if [ ! -f "${local_filedir}/${local_filename}" ] || [ "${forcedl}" == "forcedl" ]; then # If backup fileurl exists include it. if [ -n "${remote_fileurl_backup}" ]; then # counter set to 0 to allow second try counter=0 - remote_fileurls_array=( remote_fileurl remote_fileurl_backup ) + remote_fileurls_array=(remote_fileurl remote_fileurl_backup) else # counter set to 1 to not allow second try counter=1 - remote_fileurls_array=( remote_fileurl ) + remote_fileurls_array=(remote_fileurl) fi for remote_fileurl_array in "${remote_fileurls_array[@]}"; do @@ -97,7 +97,7 @@ fn_bootstrap_fetch_file(){ fileurl="${remote_fileurl_backup}" fileurl_name="${remote_fileurl_backup_name}" fi - counter=$((counter+1)) + counter=$((counter + 1)) if [ ! -d "${local_filedir}" ]; then mkdir -p "${local_filedir}" fi @@ -111,7 +111,7 @@ fn_bootstrap_fetch_file(){ local exitcode=$? # Download will fail if downloads a html file. if [ -f "${local_filedir}/${local_filename}" ]; then - if [ -n "$(head "${local_filedir}/${local_filename}" | grep "DOCTYPE" )" ]; then + if [ -n "$(head "${local_filedir}/${local_filename}" | grep "DOCTYPE")" ]; then rm "${local_filedir:?}/${local_filename:?}" local exitcode=2 fi @@ -164,11 +164,11 @@ fn_bootstrap_fetch_file(){ fi } -fn_bootstrap_fetch_file_github(){ +fn_bootstrap_fetch_file_github() { github_file_url_dir="${1}" github_file_url_name="${2}" # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. - if [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then + if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" else @@ -192,10 +192,10 @@ fn_bootstrap_fetch_file_github(){ fn_print_center() { columns=$(tput cols) line="$*" - printf "%*s\n" $(( (${#line} + columns) / 2)) "${line}" + printf "%*s\n" $(((${#line} + columns) / 2)) "${line}" } -fn_print_horizontal(){ +fn_print_horizontal() { printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' "=" } @@ -212,11 +212,11 @@ fn_install_menu_bash() { menu_options=() while read -r line || [[ -n "${line}" ]]; do var=$(echo -e "${line}" | awk -F "," '{print $2 " - " $3}') - menu_options+=( "${var}" ) + menu_options+=("${var}") done < "${options}" - menu_options+=( "Cancel" ) + menu_options+=("Cancel") select option in "${menu_options[@]}"; do - if [ "${option}" ]&&[ "${option}" != "Cancel" ]; then + if [ "${option}" ] && [ "${option}" != "Cancel" ]; then eval "$resultvar=\"${option/%\ */}\"" fi break @@ -238,7 +238,7 @@ fn_install_menu_whiptail() { while read -r line; do key=$(echo -e "${line}" | awk -F "," '{print $3}') val=$(echo -e "${line}" | awk -F "," '{print $2}') - menu_options+=( "${val//\"}" "${key//\"}" ) + menu_options+=("${val//\"/}" "${key//\"/}") done < "${options}" OPTION=$(${menucmd} --title "${title}" --menu "${caption}" "${height}" "${width}" "${menuheight}" "${menu_options[@]}" 3>&1 1>&2 2>&3) if [ $? == 0 ]; then @@ -263,24 +263,26 @@ fn_install_menu() { fi done case "$(basename "${menucmd}")" in - whiptail|dialog) - fn_install_menu_whiptail "${menucmd}" selection "${title}" "${caption}" "${options}" 40 80 30;; + whiptail | dialog) + fn_install_menu_whiptail "${menucmd}" selection "${title}" "${caption}" "${options}" 40 80 30 + ;; *) - fn_install_menu_bash selection "${title}" "${caption}" "${options}";; + fn_install_menu_bash selection "${title}" "${caption}" "${options}" + ;; esac eval "$resultvar=\"${selection}\"" } # Gets server info from serverlist.csv and puts in to array. -fn_server_info(){ +fn_server_info() { IFS="," server_info_array=($(grep -aw "${userinput}" "${serverlist}")) - shortname="${server_info_array[0]}" # csgo + shortname="${server_info_array[0]}" # csgo gameservername="${server_info_array[1]}" # csgoserver - gamename="${server_info_array[2]}" # Counter Strike: Global Offensive + gamename="${server_info_array[2]}" # Counter Strike: Global Offensive } -fn_install_getopt(){ +fn_install_getopt() { userinput="empty" echo -e "Usage: $0 [option]" echo -e "" @@ -294,13 +296,13 @@ fn_install_getopt(){ exit } -fn_install_file(){ +fn_install_file() { local_filename="${gameservername}" if [ -e "${local_filename}" ]; then i=2 - while [ -e "${local_filename}-${i}" ] ; do - (( i++ )) - done + while [ -e "${local_filename}-${i}" ]; do + ((i++)) + done local_filename="${local_filename}-${i}" fi cp -R "${selfname}" "${local_filename}" @@ -320,12 +322,12 @@ fn_install_file(){ # Prevent LinuxGSM from running as root. Except if doing a dependency install. if [ "$(whoami)" == "root" ]; then - if [ "${userinput}" == "install" ]||[ "${userinput}" == "auto-install" ]||[ "${userinput}" == "i" ]||[ "${userinput}" == "ai" ]; then + if [ "${userinput}" == "install" ] || [ "${userinput}" == "auto-install" ] || [ "${userinput}" == "i" ] || [ "${userinput}" == "ai" ]; then if [ "${shortname}" == "core" ]; then echo -e "[ FAIL ] Do NOT run this script as root!" exit 1 fi - elif [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]; then + elif [ ! -f "${functionsdir}/core_functions.sh" ] || [ ! -f "${functionsdir}/check_root.sh" ] || [ ! -f "${functionsdir}/core_messages.sh" ]; then echo -e "[ FAIL ] Do NOT run this script as root!" exit 1 else @@ -343,12 +345,12 @@ if [ "${shortname}" == "core" ]; then exit 1 fi - if [ "${userinput}" == "list" ]||[ "${userinput}" == "l" ]; then + if [ "${userinput}" == "list" ] || [ "${userinput}" == "l" ]; then { tail -n +2 "${serverlist}" | awk -F "," '{print $2 "\t" $3}' } | column -s $'\t' -t | more exit - elif [ "${userinput}" == "install" ]||[ "${userinput}" == "i" ]; then + elif [ "${userinput}" == "install" ] || [ "${userinput}" == "i" ]; then tail -n +2 "${serverlist}" | awk -F "," '{print $1 "," $2 "," $3}' > "${serverlistmenu}" fn_install_menu result "LinuxGSM" "Select game server to install." "${serverlistmenu}" userinput="${result}" @@ -364,7 +366,7 @@ if [ "${shortname}" == "core" ]; then fi elif [ "${userinput}" ]; then fn_server_info - if [ "${userinput}" == "${gameservername}" ]||[ "${userinput}" == "${gamename}" ]||[ "${userinput}" == "${shortname}" ]; then + if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then fn_install_file else echo -e "[ FAIL ] unknown game server" @@ -463,7 +465,7 @@ else fi fi -fn_currentstatus_tmux(){ +fn_currentstatus_tmux() { check_status.sh if [ "${status}" != "0" ]; then currentstatus="STARTED" @@ -472,14 +474,14 @@ fn_currentstatus_tmux(){ fi } -fn_setstatus(){ +fn_setstatus() { fn_currentstatus_tmux echo"" echo -e "Required status: ${requiredstatus}" counter=0 echo -e "Current status: ${currentstatus}" - while [ "${requiredstatus}" != "${currentstatus}" ]; do - counter=$((counter+1)) + while [ "${requiredstatus}" != "${currentstatus}" ]; do + counter=$((counter + 1)) fn_currentstatus_tmux echo -en "New status: ${currentstatus}\\r" @@ -505,7 +507,7 @@ fn_setstatus(){ # End of every test will expect the result to either pass or fail # If the script does not do as intended the whole test will fail # if expecting a pass -fn_test_result_pass(){ +fn_test_result_pass() { if [ $? != 0 ]; then echo -e "=================================" echo -e "Expected result: PASS" @@ -523,7 +525,7 @@ fn_test_result_pass(){ } # if expecting a fail -fn_test_result_fail(){ +fn_test_result_fail() { if [ $? == 0 ]; then echo -e "=================================" echo -e "Expected result: FAIL" @@ -541,7 +543,7 @@ fn_test_result_fail(){ } # test result n/a -fn_test_result_na(){ +fn_test_result_na() { echo -e "=================================" echo -e "Expected result: N/A" echo -e "Actual result: N/A" @@ -627,7 +629,7 @@ echo -e "0.1 - Create log dir's" echo -e "=================================" echo -e "" ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x install_logs.sh @@ -643,7 +645,7 @@ echo -e "Description:" echo -e "Enable dev-debug" echo -e "" ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_dev_debug.sh @@ -666,13 +668,13 @@ echo -e "Command: ./${gameservername} start" echo -e "" # Allows for testing not on Travis CI if [ -z "${TRAVIS}" ]; then -( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_start.sh -) -fn_test_result_fail + ( + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" + BASH_XTRACEFD="5" + set -x + command_start.sh + ) + fn_test_result_fail else echo -e "Test bypassed" fi @@ -689,7 +691,7 @@ echo -e "displaying options messages." echo -e "Command: ./${gameservername}" echo -e "" ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x core_getopt.sh @@ -708,7 +710,7 @@ echo -e "Command: ./${gameservername} abc123" echo -e "" getopt="abc123" ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x core_getopt.sh @@ -729,7 +731,7 @@ echo -e "Description:" echo -e "install ${gamename} server." echo -e "Command: ./${gameservername} auto-install" ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x fn_autoinstall @@ -752,7 +754,7 @@ echo -e "Command: ./${gameservername} start" requiredstatus="STOPPED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_start.sh @@ -771,7 +773,7 @@ echo -e "Command: ./${gameservername} start" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_start.sh @@ -790,10 +792,11 @@ echo -e "Command: ./${gameservername} start" requiredstatus="STOPPED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x - updateonstart="on";command_start.sh + updateonstart="on" + command_start.sh ) fn_test_result_pass echo -e "run order" @@ -809,7 +812,7 @@ echo -e "Command: ./${gameservername} stop" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_stop.sh @@ -828,7 +831,7 @@ echo -e "Command: ./${gameservername} stop" requiredstatus="STOPPED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_stop.sh @@ -847,7 +850,7 @@ echo -e "Command: ./${gameservername} restart" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_restart.sh @@ -866,7 +869,7 @@ echo -e "Command: ./${gameservername} restart" requiredstatus="STOPPED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_restart.sh @@ -889,7 +892,7 @@ echo -e "Command: ./${gameservername} update" requiredstatus="STOPPED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_update.sh @@ -909,7 +912,7 @@ echo -e "Command: ./jc2server update-lgam" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_update_linuxgsm.sh @@ -936,7 +939,7 @@ echo -e "Command: ./${gameservername} monitor" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_monitor.sh @@ -959,7 +962,7 @@ date '+%s' > "${lockdir}/${selfname}.lock" echo "${version}" >> "${lockdir}/${selfname}.lock" echo "${port}" >> "${lockdir}/${selfname}.lock" ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_monitor.sh @@ -978,7 +981,7 @@ echo -e "Command: ./${gameservername} monitor" requiredstatus="STOPPED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_monitor.sh @@ -997,7 +1000,7 @@ echo -e "Command: ./${gameservername} test-alert" requiredstatus="STOPPED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_test_alert.sh @@ -1020,7 +1023,7 @@ echo -e "Command: ./${gameservername} details" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_details.sh @@ -1039,7 +1042,7 @@ echo -e "Command: ./${gameservername} postdetails" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_postdetails.sh @@ -1081,7 +1084,7 @@ echo -e "Command: ./${gameservername} detect-glibc" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_dev_detect_glibc.sh @@ -1100,7 +1103,7 @@ echo -e "Command: ./${gameservername} detect-ldd" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_dev_detect_ldd.sh @@ -1119,7 +1122,7 @@ echo -e "Command: ./${gameservername} detect-deps" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_dev_detect_deps.sh @@ -1138,7 +1141,7 @@ echo -e "Command: ./${gameservername} query-raw" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_dev_query_raw.sh @@ -1162,7 +1165,7 @@ echo -e "Command: ./${gameservername} donate" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_donate.sh diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 4bdadb59f..c86e6dbb9 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -15,7 +15,7 @@ # Debugging if [ -f ".dev-debug" ]; then - exec 5>dev-debug.log + exec 5> dev-debug.log BASH_XTRACEFD="5" set -x fi @@ -59,14 +59,14 @@ githubrepo="LinuxGSM" githubbranch="${TRAVIS_BRANCH}" # Core function that is required first. -core_functions.sh(){ +core_functions.sh() { functionfile="${FUNCNAME[0]}" fn_bootstrap_fetch_file_github "lgsm/functions" "core_functions.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" } # Bootstrap # Fetches the core functions required before passed off to core_dl.sh. -fn_bootstrap_fetch_file(){ +fn_bootstrap_fetch_file() { remote_fileurl="${1}" remote_fileurl_backup="${2}" remote_fileurl_name="${3}" @@ -78,16 +78,16 @@ fn_bootstrap_fetch_file(){ forcedl="${9:-0}" md5="${10:-0}" # Download file if missing or download forced. - if [ ! -f "${local_filedir}/${local_filename}" ]||[ "${forcedl}" == "forcedl" ]; then + if [ ! -f "${local_filedir}/${local_filename}" ] || [ "${forcedl}" == "forcedl" ]; then # If backup fileurl exists include it. if [ -n "${remote_fileurl_backup}" ]; then # counter set to 0 to allow second try counter=0 - remote_fileurls_array=( remote_fileurl remote_fileurl_backup ) + remote_fileurls_array=(remote_fileurl remote_fileurl_backup) else # counter set to 1 to not allow second try counter=1 - remote_fileurls_array=( remote_fileurl ) + remote_fileurls_array=(remote_fileurl) fi for remote_fileurl_array in "${remote_fileurls_array[@]}"; do @@ -98,7 +98,7 @@ fn_bootstrap_fetch_file(){ fileurl="${remote_fileurl_backup}" fileurl_name="${remote_fileurl_backup_name}" fi - counter=$((counter+1)) + counter=$((counter + 1)) if [ ! -d "${local_filedir}" ]; then mkdir -p "${local_filedir}" fi @@ -112,7 +112,7 @@ fn_bootstrap_fetch_file(){ local exitcode=$? # Download will fail if downloads a html file. if [ -f "${local_filedir}/${local_filename}" ]; then - if [ -n "$(head "${local_filedir}/${local_filename}" | grep "DOCTYPE" )" ]; then + if [ -n "$(head "${local_filedir}/${local_filename}" | grep "DOCTYPE")" ]; then rm "${local_filedir:?}/${local_filename:?}" local exitcode=2 fi @@ -165,11 +165,11 @@ fn_bootstrap_fetch_file(){ fi } -fn_bootstrap_fetch_file_github(){ +fn_bootstrap_fetch_file_github() { github_file_url_dir="${1}" github_file_url_name="${2}" # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. - if [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then + if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" else @@ -193,10 +193,10 @@ fn_bootstrap_fetch_file_github(){ fn_print_center() { columns=$(tput cols) line="$*" - printf "%*s\n" $(( (${#line} + columns) / 2)) "${line}" + printf "%*s\n" $(((${#line} + columns) / 2)) "${line}" } -fn_print_horizontal(){ +fn_print_horizontal() { printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' "=" } @@ -213,11 +213,11 @@ fn_install_menu_bash() { menu_options=() while read -r line || [[ -n "${line}" ]]; do var=$(echo -e "${line}" | awk -F "," '{print $2 " - " $3}') - menu_options+=( "${var}" ) + menu_options+=("${var}") done < "${options}" - menu_options+=( "Cancel" ) + menu_options+=("Cancel") select option in "${menu_options[@]}"; do - if [ "${option}" ]&&[ "${option}" != "Cancel" ]; then + if [ "${option}" ] && [ "${option}" != "Cancel" ]; then eval "$resultvar=\"${option/%\ */}\"" fi break @@ -239,7 +239,7 @@ fn_install_menu_whiptail() { while read -r line; do key=$(echo -e "${line}" | awk -F "," '{print $3}') val=$(echo -e "${line}" | awk -F "," '{print $2}') - menu_options+=( "${val//\"}" "${key//\"}" ) + menu_options+=("${val//\"/}" "${key//\"/}") done < "${options}" OPTION=$(${menucmd} --title "${title}" --menu "${caption}" "${height}" "${width}" "${menuheight}" "${menu_options[@]}" 3>&1 1>&2 2>&3) if [ $? == 0 ]; then @@ -264,24 +264,26 @@ fn_install_menu() { fi done case "$(basename "${menucmd}")" in - whiptail|dialog) - fn_install_menu_whiptail "${menucmd}" selection "${title}" "${caption}" "${options}" 40 80 30;; + whiptail | dialog) + fn_install_menu_whiptail "${menucmd}" selection "${title}" "${caption}" "${options}" 40 80 30 + ;; *) - fn_install_menu_bash selection "${title}" "${caption}" "${options}";; + fn_install_menu_bash selection "${title}" "${caption}" "${options}" + ;; esac eval "$resultvar=\"${selection}\"" } # Gets server info from serverlist.csv and puts in to array. -fn_server_info(){ +fn_server_info() { IFS="," server_info_array=($(grep -aw "${userinput}" "${serverlist}")) - shortname="${server_info_array[0]}" # csgo + shortname="${server_info_array[0]}" # csgo gameservername="${server_info_array[1]}" # csgoserver - gamename="${server_info_array[2]}" # Counter Strike: Global Offensive + gamename="${server_info_array[2]}" # Counter Strike: Global Offensive } -fn_install_getopt(){ +fn_install_getopt() { userinput="empty" echo -e "Usage: $0 [option]" echo -e "" @@ -295,13 +297,13 @@ fn_install_getopt(){ exit } -fn_install_file(){ +fn_install_file() { local_filename="${gameservername}" if [ -e "${local_filename}" ]; then i=2 - while [ -e "${local_filename}-${i}" ] ; do - (( i++ )) - done + while [ -e "${local_filename}-${i}" ]; do + ((i++)) + done local_filename="${local_filename}-${i}" fi cp -R "${selfname}" "${local_filename}" @@ -321,12 +323,12 @@ fn_install_file(){ # Prevent LinuxGSM from running as root. Except if doing a dependency install. if [ "$(whoami)" == "root" ]; then - if [ "${userinput}" == "install" ]||[ "${userinput}" == "auto-install" ]||[ "${userinput}" == "i" ]||[ "${userinput}" == "ai" ]; then + if [ "${userinput}" == "install" ] || [ "${userinput}" == "auto-install" ] || [ "${userinput}" == "i" ] || [ "${userinput}" == "ai" ]; then if [ "${shortname}" == "core" ]; then echo -e "[ FAIL ] Do NOT run this script as root!" exit 1 fi - elif [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]; then + elif [ ! -f "${functionsdir}/core_functions.sh" ] || [ ! -f "${functionsdir}/check_root.sh" ] || [ ! -f "${functionsdir}/core_messages.sh" ]; then echo -e "[ FAIL ] Do NOT run this script as root!" exit 1 else @@ -344,12 +346,12 @@ if [ "${shortname}" == "core" ]; then exit 1 fi - if [ "${userinput}" == "list" ]||[ "${userinput}" == "l" ]; then + if [ "${userinput}" == "list" ] || [ "${userinput}" == "l" ]; then { tail -n +2 "${serverlist}" | awk -F "," '{print $2 "\t" $3}' } | column -s $'\t' -t | more exit - elif [ "${userinput}" == "install" ]||[ "${userinput}" == "i" ]; then + elif [ "${userinput}" == "install" ] || [ "${userinput}" == "i" ]; then tail -n +2 "${serverlist}" | awk -F "," '{print $1 "," $2 "," $3}' > "${serverlistmenu}" fn_install_menu result "LinuxGSM" "Select game server to install." "${serverlistmenu}" userinput="${result}" @@ -365,7 +367,7 @@ if [ "${shortname}" == "core" ]; then fi elif [ "${userinput}" ]; then fn_server_info - if [ "${userinput}" == "${gameservername}" ]||[ "${userinput}" == "${gamename}" ]||[ "${userinput}" == "${shortname}" ]; then + if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then fn_install_file else echo -e "[ FAIL ] unknown game server" @@ -464,7 +466,7 @@ else fi fi -fn_currentstatus_tmux(){ +fn_currentstatus_tmux() { check_status.sh if [ "${status}" != "0" ]; then currentstatus="STARTED" @@ -473,14 +475,14 @@ fn_currentstatus_tmux(){ fi } -fn_setstatus(){ +fn_setstatus() { fn_currentstatus_tmux echo"" echo -e "Required status: ${requiredstatus}" counter=0 echo -e "Current status: ${currentstatus}" - while [ "${requiredstatus}" != "${currentstatus}" ]; do - counter=$((counter+1)) + while [ "${requiredstatus}" != "${currentstatus}" ]; do + counter=$((counter + 1)) fn_currentstatus_tmux echo -en "New status: ${currentstatus}\\r" @@ -506,7 +508,7 @@ fn_setstatus(){ # End of every test will expect the result to either pass or fail # If the script does not do as intended the whole test will fail # if expecting a pass -fn_test_result_pass(){ +fn_test_result_pass() { if [ $? != 0 ]; then echo -e "=================================" echo -e "Expected result: PASS" @@ -524,7 +526,7 @@ fn_test_result_pass(){ } # if expecting a fail -fn_test_result_fail(){ +fn_test_result_fail() { if [ $? == 0 ]; then echo -e "=================================" echo -e "Expected result: FAIL" @@ -542,7 +544,7 @@ fn_test_result_fail(){ } # test result n/a -fn_test_result_na(){ +fn_test_result_na() { echo -e "=================================" echo -e "Expected result: N/A" echo -e "Actual result: N/A" @@ -632,7 +634,7 @@ echo -e "0.1 - Create log dir's" echo -e "=================================" echo -e "" ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x install_logs.sh @@ -648,7 +650,7 @@ echo -e "Description:" echo -e "Enable dev-debug" echo -e "" ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_dev_debug.sh @@ -671,13 +673,13 @@ echo -e "Command: ./${gameservername} start" echo -e "" # Allows for testing not on Travis CI if [ -z "${TRAVIS}" ]; then -( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_start.sh -) -fn_test_result_fail + ( + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" + BASH_XTRACEFD="5" + set -x + command_start.sh + ) + fn_test_result_fail else echo -e "Test bypassed" fi @@ -694,7 +696,7 @@ echo -e "displaying options messages." echo -e "Command: ./${gameservername}" echo -e "" ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x core_getopt.sh @@ -713,7 +715,7 @@ echo -e "Command: ./${gameservername} abc123" echo -e "" getopt="abc123" ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x core_getopt.sh @@ -734,7 +736,7 @@ echo -e "Description:" echo -e "install ${gamename} server." echo -e "Command: ./${gameservername} auto-install" ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x fn_autoinstall @@ -757,7 +759,7 @@ echo -e "Command: ./${gameservername} start" requiredstatus="STOPPED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_start.sh @@ -776,7 +778,7 @@ echo -e "Command: ./${gameservername} start" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_start.sh @@ -795,10 +797,11 @@ echo -e "Command: ./${gameservername} start" requiredstatus="STOPPED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x - updateonstart="on";command_start.sh + updateonstart="on" + command_start.sh ) fn_test_result_pass echo -e "run order" @@ -814,7 +817,7 @@ echo -e "Command: ./${gameservername} stop" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_stop.sh @@ -833,7 +836,7 @@ echo -e "Command: ./${gameservername} stop" requiredstatus="STOPPED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_stop.sh @@ -852,7 +855,7 @@ echo -e "Command: ./${gameservername} restart" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_restart.sh @@ -871,7 +874,7 @@ echo -e "Command: ./${gameservername} restart" requiredstatus="STOPPED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_restart.sh @@ -894,7 +897,7 @@ echo -e "Command: ./${gameservername} update" requiredstatus="STOPPED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_update.sh @@ -915,7 +918,7 @@ fn_setstatus fn_print_info_nl "changed buildid to 0." sed -i 's/[0-9]\+/0/' "${serverfiles}/steamapps/appmanifest_${appid}.acf" ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_update.sh @@ -936,7 +939,7 @@ fn_setstatus fn_print_info_nl "changed buildid to 0." sed -i 's/[0-9]\+/0/' "${serverfiles}/steamapps/appmanifest_${appid}.acf" ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_update.sh @@ -957,7 +960,7 @@ fn_setstatus fn_print_info_nl "removed appmanifest_${appid}.acf." rm --verbose "${serverfiles:?}/steamapps/appmanifest_${appid}.acf" ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_update.sh @@ -976,10 +979,11 @@ echo -e "Command: ./jc2server force-update" requiredstatus="STOPPED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x - forceupdate=1;command_update.sh + forceupdate=1 + command_update.sh ) fn_test_result_pass echo -e "run order" @@ -995,10 +999,11 @@ echo -e "Command: ./jc2server force-update" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x - forceupdate=1;command_update.sh + forceupdate=1 + command_update.sh ) fn_test_result_pass echo -e "run order" @@ -1014,7 +1019,7 @@ echo -e "Command: ./jc2server validate" requiredstatus="STOPPED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_validate.sh @@ -1034,7 +1039,7 @@ echo -e "Command: ./jc2server validate" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_validate.sh @@ -1054,7 +1059,7 @@ echo -e "Command: ./jc2server update-lgam" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_update_linuxgsm.sh @@ -1070,7 +1075,7 @@ echo -e "=================================" echo -e "Description:" echo -e "Inserting Travis IP in to config." echo -e "Allows monitor to work" -if [ "$(${ipcommand}-o -4 addr|grep eth0)" ]; then +if [ "$(${ipcommand}-o -4 addr | grep eth0)" ]; then travisip=$(${ipcommand}-o -4 addr | grep eth0 | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | grep -v 127.0.0) else travisip=$(${ipcommand}-o -4 addr | grep ens | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | sort -u | grep -v 127.0.0) @@ -1095,7 +1100,7 @@ echo -e "Command: ./${gameservername} monitor" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_monitor.sh @@ -1118,7 +1123,7 @@ date '+%s' > "${lockdir}/${selfname}.lock" echo "${version}" >> "${lockdir}/${selfname}.lock" echo "${port}" >> "${lockdir}/${selfname}.lock" ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_monitor.sh @@ -1137,7 +1142,7 @@ echo -e "Command: ./${gameservername} monitor" requiredstatus="STOPPED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_monitor.sh @@ -1158,7 +1163,7 @@ fn_setstatus cp "${servercfgfullpath}" "config.lua" sed -i 's/[0-9]\+/0/' "${servercfgfullpath}" ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_test_alert.sh @@ -1186,7 +1191,7 @@ echo -e "Command: ./${gameservername} details" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_details.sh @@ -1205,7 +1210,7 @@ echo -e "Command: ./${gameservername} postdetails" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_postdetails.sh @@ -1247,7 +1252,7 @@ echo -e "Command: ./${gameservername} detect-glibc" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_dev_detect_glibc.sh @@ -1266,7 +1271,7 @@ echo -e "Command: ./${gameservername} detect-ldd" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_dev_detect_ldd.sh @@ -1285,7 +1290,7 @@ echo -e "Command: ./${gameservername} detect-deps" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_dev_detect_deps.sh @@ -1304,7 +1309,7 @@ echo -e "Command: ./${gameservername} query-raw" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_dev_query_raw.sh @@ -1327,7 +1332,7 @@ echo -e "Command: ./${gameservername} donate" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_donate.sh diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index f9e64e07c..36f3349cd 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -15,7 +15,7 @@ # Debugging if [ -f ".dev-debug" ]; then - exec 5>dev-debug.log + exec 5> dev-debug.log BASH_XTRACEFD="5" set -x fi @@ -59,14 +59,14 @@ githubrepo="LinuxGSM" githubbranch="${TRAVIS_BRANCH}" # Core function that is required first. -core_functions.sh(){ +core_functions.sh() { functionfile="${FUNCNAME[0]}" fn_bootstrap_fetch_file_github "lgsm/functions" "core_functions.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" } # Bootstrap # Fetches the core functions required before passed off to core_dl.sh. -fn_bootstrap_fetch_file(){ +fn_bootstrap_fetch_file() { remote_fileurl="${1}" remote_fileurl_backup="${2}" remote_fileurl_name="${3}" @@ -78,16 +78,16 @@ fn_bootstrap_fetch_file(){ forcedl="${9:-0}" md5="${10:-0}" # Download file if missing or download forced. - if [ ! -f "${local_filedir}/${local_filename}" ]||[ "${forcedl}" == "forcedl" ]; then + if [ ! -f "${local_filedir}/${local_filename}" ] || [ "${forcedl}" == "forcedl" ]; then # If backup fileurl exists include it. if [ -n "${remote_fileurl_backup}" ]; then # counter set to 0 to allow second try counter=0 - remote_fileurls_array=( remote_fileurl remote_fileurl_backup ) + remote_fileurls_array=(remote_fileurl remote_fileurl_backup) else # counter set to 1 to not allow second try counter=1 - remote_fileurls_array=( remote_fileurl ) + remote_fileurls_array=(remote_fileurl) fi for remote_fileurl_array in "${remote_fileurls_array[@]}"; do @@ -98,7 +98,7 @@ fn_bootstrap_fetch_file(){ fileurl="${remote_fileurl_backup}" fileurl_name="${remote_fileurl_backup_name}" fi - counter=$((counter+1)) + counter=$((counter + 1)) if [ ! -d "${local_filedir}" ]; then mkdir -p "${local_filedir}" fi @@ -112,7 +112,7 @@ fn_bootstrap_fetch_file(){ local exitcode=$? # Download will fail if downloads a html file. if [ -f "${local_filedir}/${local_filename}" ]; then - if [ -n "$(head "${local_filedir}/${local_filename}" | grep "DOCTYPE" )" ]; then + if [ -n "$(head "${local_filedir}/${local_filename}" | grep "DOCTYPE")" ]; then rm "${local_filedir:?}/${local_filename:?}" local exitcode=2 fi @@ -165,11 +165,11 @@ fn_bootstrap_fetch_file(){ fi } -fn_bootstrap_fetch_file_github(){ +fn_bootstrap_fetch_file_github() { github_file_url_dir="${1}" github_file_url_name="${2}" # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. - if [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then + if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" else @@ -193,10 +193,10 @@ fn_bootstrap_fetch_file_github(){ fn_print_center() { columns=$(tput cols) line="$*" - printf "%*s\n" $(( (${#line} + columns) / 2)) "${line}" + printf "%*s\n" $(((${#line} + columns) / 2)) "${line}" } -fn_print_horizontal(){ +fn_print_horizontal() { printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' "=" } @@ -213,11 +213,11 @@ fn_install_menu_bash() { menu_options=() while read -r line || [[ -n "${line}" ]]; do var=$(echo -e "${line}" | awk -F "," '{print $2 " - " $3}') - menu_options+=( "${var}" ) + menu_options+=("${var}") done < "${options}" - menu_options+=( "Cancel" ) + menu_options+=("Cancel") select option in "${menu_options[@]}"; do - if [ "${option}" ]&&[ "${option}" != "Cancel" ]; then + if [ "${option}" ] && [ "${option}" != "Cancel" ]; then eval "$resultvar=\"${option/%\ */}\"" fi break @@ -239,7 +239,7 @@ fn_install_menu_whiptail() { while read -r line; do key=$(echo -e "${line}" | awk -F "," '{print $3}') val=$(echo -e "${line}" | awk -F "," '{print $2}') - menu_options+=( "${val//\"}" "${key//\"}" ) + menu_options+=("${val//\"/}" "${key//\"/}") done < "${options}" OPTION=$(${menucmd} --title "${title}" --menu "${caption}" "${height}" "${width}" "${menuheight}" "${menu_options[@]}" 3>&1 1>&2 2>&3) if [ $? == 0 ]; then @@ -264,24 +264,26 @@ fn_install_menu() { fi done case "$(basename "${menucmd}")" in - whiptail|dialog) - fn_install_menu_whiptail "${menucmd}" selection "${title}" "${caption}" "${options}" 40 80 30;; + whiptail | dialog) + fn_install_menu_whiptail "${menucmd}" selection "${title}" "${caption}" "${options}" 40 80 30 + ;; *) - fn_install_menu_bash selection "${title}" "${caption}" "${options}";; + fn_install_menu_bash selection "${title}" "${caption}" "${options}" + ;; esac eval "$resultvar=\"${selection}\"" } # Gets server info from serverlist.csv and puts in to array. -fn_server_info(){ +fn_server_info() { IFS="," server_info_array=($(grep -aw "${userinput}" "${serverlist}")) - shortname="${server_info_array[0]}" # csgo + shortname="${server_info_array[0]}" # csgo gameservername="${server_info_array[1]}" # csgoserver - gamename="${server_info_array[2]}" # Counter Strike: Global Offensive + gamename="${server_info_array[2]}" # Counter Strike: Global Offensive } -fn_install_getopt(){ +fn_install_getopt() { userinput="empty" echo -e "Usage: $0 [option]" echo -e "" @@ -295,13 +297,13 @@ fn_install_getopt(){ exit } -fn_install_file(){ +fn_install_file() { local_filename="${gameservername}" if [ -e "${local_filename}" ]; then i=2 - while [ -e "${local_filename}-${i}" ] ; do - (( i++ )) - done + while [ -e "${local_filename}-${i}" ]; do + ((i++)) + done local_filename="${local_filename}-${i}" fi cp -R "${selfname}" "${local_filename}" @@ -321,12 +323,12 @@ fn_install_file(){ # Prevent LinuxGSM from running as root. Except if doing a dependency install. if [ "$(whoami)" == "root" ]; then - if [ "${userinput}" == "install" ]||[ "${userinput}" == "auto-install" ]||[ "${userinput}" == "i" ]||[ "${userinput}" == "ai" ]; then + if [ "${userinput}" == "install" ] || [ "${userinput}" == "auto-install" ] || [ "${userinput}" == "i" ] || [ "${userinput}" == "ai" ]; then if [ "${shortname}" == "core" ]; then echo -e "[ FAIL ] Do NOT run this script as root!" exit 1 fi - elif [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]; then + elif [ ! -f "${functionsdir}/core_functions.sh" ] || [ ! -f "${functionsdir}/check_root.sh" ] || [ ! -f "${functionsdir}/core_messages.sh" ]; then echo -e "[ FAIL ] Do NOT run this script as root!" exit 1 else @@ -344,12 +346,12 @@ if [ "${shortname}" == "core" ]; then exit 1 fi - if [ "${userinput}" == "list" ]||[ "${userinput}" == "l" ]; then + if [ "${userinput}" == "list" ] || [ "${userinput}" == "l" ]; then { tail -n +2 "${serverlist}" | awk -F "," '{print $2 "\t" $3}' } | column -s $'\t' -t | more exit - elif [ "${userinput}" == "install" ]||[ "${userinput}" == "i" ]; then + elif [ "${userinput}" == "install" ] || [ "${userinput}" == "i" ]; then tail -n +2 "${serverlist}" | awk -F "," '{print $1 "," $2 "," $3}' > "${serverlistmenu}" fn_install_menu result "LinuxGSM" "Select game server to install." "${serverlistmenu}" userinput="${result}" @@ -365,7 +367,7 @@ if [ "${shortname}" == "core" ]; then fi elif [ "${userinput}" ]; then fn_server_info - if [ "${userinput}" == "${gameservername}" ]||[ "${userinput}" == "${gamename}" ]||[ "${userinput}" == "${shortname}" ]; then + if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then fn_install_file else echo -e "[ FAIL ] unknown game server" @@ -464,7 +466,7 @@ else fi fi -fn_currentstatus_tmux(){ +fn_currentstatus_tmux() { check_status.sh if [ "${status}" != "0" ]; then currentstatus="STARTED" @@ -473,14 +475,14 @@ fn_currentstatus_tmux(){ fi } -fn_setstatus(){ +fn_setstatus() { fn_currentstatus_tmux echo"" echo -e "Required status: ${requiredstatus}" counter=0 echo -e "Current status: ${currentstatus}" - while [ "${requiredstatus}" != "${currentstatus}" ]; do - counter=$((counter+1)) + while [ "${requiredstatus}" != "${currentstatus}" ]; do + counter=$((counter + 1)) fn_currentstatus_tmux echo -en "New status: ${currentstatus}\\r" @@ -506,7 +508,7 @@ fn_setstatus(){ # End of every test will expect the result to either pass or fail # If the script does not do as intended the whole test will fail # if expecting a pass -fn_test_result_pass(){ +fn_test_result_pass() { if [ $? != 0 ]; then echo -e "=================================" echo -e "Expected result: PASS" @@ -524,7 +526,7 @@ fn_test_result_pass(){ } # if expecting a fail -fn_test_result_fail(){ +fn_test_result_fail() { if [ $? == 0 ]; then echo -e "=================================" echo -e "Expected result: FAIL" @@ -542,7 +544,7 @@ fn_test_result_fail(){ } # test result n/a -fn_test_result_na(){ +fn_test_result_na() { echo -e "=================================" echo -e "Expected result: N/A" echo -e "Actual result: N/A" @@ -626,7 +628,7 @@ echo -e "0.1 - Create log dir's" echo -e "=================================" echo -e "" ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x install_logs.sh @@ -642,7 +644,7 @@ echo -e "Description:" echo -e "Enable dev-debug" echo -e "" ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_dev_debug.sh @@ -665,13 +667,13 @@ echo -e "Command: ./${gameservername} start" echo -e "" # Allows for testing not on Travis CI if [ -z "${TRAVIS}" ]; then -( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_start.sh -) -fn_test_result_fail + ( + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" + BASH_XTRACEFD="5" + set -x + command_start.sh + ) + fn_test_result_fail else echo -e "Test bypassed" fi @@ -688,7 +690,7 @@ echo -e "displaying options messages." echo -e "Command: ./${gameservername}" echo -e "" ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x core_getopt.sh @@ -707,7 +709,7 @@ echo -e "Command: ./${gameservername} abc123" echo -e "" getopt="abc123" ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x core_getopt.sh @@ -728,7 +730,7 @@ echo -e "Description:" echo -e "install ${gamename} server." echo -e "Command: ./${gameservername} auto-install" ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x fn_autoinstall @@ -751,7 +753,7 @@ echo -e "Command: ./${gameservername} start" requiredstatus="STOPPED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_start.sh @@ -770,7 +772,7 @@ echo -e "Command: ./${gameservername} start" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_start.sh @@ -789,10 +791,11 @@ echo -e "Command: ./${gameservername} start" requiredstatus="STOPPED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x - updateonstart="on";command_start.sh + updateonstart="on" + command_start.sh ) fn_test_result_pass echo -e "run order" @@ -817,7 +820,7 @@ echo -e "Command: ./${gameservername} stop" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_stop.sh @@ -836,7 +839,7 @@ echo -e "Command: ./${gameservername} stop" requiredstatus="STOPPED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_stop.sh @@ -855,7 +858,7 @@ echo -e "Command: ./${gameservername} restart" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_restart.sh @@ -874,7 +877,7 @@ echo -e "Command: ./${gameservername} restart" requiredstatus="STOPPED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_restart.sh @@ -897,7 +900,7 @@ echo -e "Command: ./${gameservername} update" requiredstatus="STOPPED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_update.sh @@ -917,7 +920,7 @@ echo -e "Command: ./jc2server update-lgam" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_update_linuxgsm.sh @@ -933,7 +936,7 @@ echo -e "=================================" echo -e "Description:" echo -e "Inserting Travis IP in to config." echo -e "Allows monitor to work" -if [ "$(${ipcommand}-o -4 addr|grep eth0)" ]; then +if [ "$(${ipcommand}-o -4 addr | grep eth0)" ]; then travisip=$(${ipcommand}-o -4 addr | grep eth0 | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | grep -v 127.0.0) else travisip=$(${ipcommand}-o -4 addr | grep ens | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | sort -u | grep -v 127.0.0) @@ -968,7 +971,7 @@ echo -e "Command: ./${gameservername} monitor" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_monitor.sh @@ -991,7 +994,7 @@ date '+%s' > "${lockdir}/${selfname}.lock" echo "${version}" >> "${lockdir}/${selfname}.lock" echo "${port}" >> "${lockdir}/${selfname}.lock" ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_monitor.sh @@ -1010,7 +1013,7 @@ echo -e "Command: ./${gameservername} monitor" requiredstatus="STOPPED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_monitor.sh @@ -1029,7 +1032,7 @@ echo -e "Command: ./${gameservername} test-alert" requiredstatus="STOPPED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_test_alert.sh @@ -1052,7 +1055,7 @@ echo -e "Command: ./${gameservername} details" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_details.sh @@ -1071,7 +1074,7 @@ echo -e "Command: ./${gameservername} postdetails" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_postdetails.sh @@ -1113,7 +1116,7 @@ echo -e "Command: ./${gameservername} detect-glibc" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_dev_detect_glibc.sh @@ -1132,7 +1135,7 @@ echo -e "Command: ./${gameservername} detect-ldd" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_dev_detect_ldd.sh @@ -1151,7 +1154,7 @@ echo -e "Command: ./${gameservername} detect-deps" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_dev_detect_deps.sh @@ -1167,7 +1170,7 @@ echo -e "=================================" echo -e "Description:" echo -e "Inserting Travis IP in to config." echo -e "Allows monitor to work" -if [ "$(${ipcommand}-o -4 addr|grep eth0)" ]; then +if [ "$(${ipcommand}-o -4 addr | grep eth0)" ]; then travisip=$(${ipcommand}-o -4 addr | grep eth0 | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | grep -v 127.0.0) else travisip=$(${ipcommand}-o -4 addr | grep ens | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | sort -u | grep -v 127.0.0) @@ -1184,7 +1187,7 @@ echo -e "Command: ./${gameservername} query-raw" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_dev_query_raw.sh @@ -1207,7 +1210,7 @@ echo -e "Command: ./${gameservername} donate" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_donate.sh diff --git a/tests/tests_shellcheck.sh b/tests/tests_shellcheck.sh index f4bbf4868..c277a5177 100644 --- a/tests/tests_shellcheck.sh +++ b/tests/tests_shellcheck.sh @@ -21,10 +21,10 @@ echo -e "Using: Shellcheck" echo -e "Testing Branch: $TRAVIS_BRANCH" echo -e "=================================" echo -e "" -scissues=$(find . -type f \( -name "*.sh" -o -name "*.cfg" \) -not -path "./shunit2-2.1.6/*" -exec shellcheck --shell=bash --exclude=SC2154,SC2034 {} \; | grep -F "^--" | wc -l) +scissues=$(find . -type f \( -name "*.sh" -o -name "*.cfg" \) -not -path "./shunit2-2.1.6/*" -exec shellcheck --shell=bash --exclude=SC2154,SC2034 {} \; | grep -F "^--" | wc -l) echo -e "Found issues: ${scissues}" echo -e "=================================" -find . -type f \( -name "*.sh" -o -name "*.cfg" \) -not -path "./shunit2-2.1.6/*" -exec shellcheck --shell=bash --exclude=SC2154,SC2034 {} \; +find . -type f \( -name "*.sh" -o -name "*.cfg" \) -not -path "./shunit2-2.1.6/*" -exec shellcheck --shell=bash --exclude=SC2154,SC2034 {} \; echo -e "" echo -e "=================================" echo -e "Bash Analysis Tests - Complete!" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index bb149ded7..466753e3d 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -15,7 +15,7 @@ # Debugging if [ -f ".dev-debug" ]; then - exec 5>dev-debug.log + exec 5> dev-debug.log BASH_XTRACEFD="5" set -x fi @@ -59,14 +59,14 @@ githubrepo="LinuxGSM" githubbranch="${TRAVIS_BRANCH}" # Core function that is required first. -core_functions.sh(){ +core_functions.sh() { functionfile="${FUNCNAME[0]}" fn_bootstrap_fetch_file_github "lgsm/functions" "core_functions.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" } # Bootstrap # Fetches the core functions required before passed off to core_dl.sh. -fn_bootstrap_fetch_file(){ +fn_bootstrap_fetch_file() { remote_fileurl="${1}" remote_fileurl_backup="${2}" remote_fileurl_name="${3}" @@ -78,16 +78,16 @@ fn_bootstrap_fetch_file(){ forcedl="${9:-0}" md5="${10:-0}" # Download file if missing or download forced. - if [ ! -f "${local_filedir}/${local_filename}" ]||[ "${forcedl}" == "forcedl" ]; then + if [ ! -f "${local_filedir}/${local_filename}" ] || [ "${forcedl}" == "forcedl" ]; then # If backup fileurl exists include it. if [ -n "${remote_fileurl_backup}" ]; then # counter set to 0 to allow second try counter=0 - remote_fileurls_array=( remote_fileurl remote_fileurl_backup ) + remote_fileurls_array=(remote_fileurl remote_fileurl_backup) else # counter set to 1 to not allow second try counter=1 - remote_fileurls_array=( remote_fileurl ) + remote_fileurls_array=(remote_fileurl) fi for remote_fileurl_array in "${remote_fileurls_array[@]}"; do @@ -98,7 +98,7 @@ fn_bootstrap_fetch_file(){ fileurl="${remote_fileurl_backup}" fileurl_name="${remote_fileurl_backup_name}" fi - counter=$((counter+1)) + counter=$((counter + 1)) if [ ! -d "${local_filedir}" ]; then mkdir -p "${local_filedir}" fi @@ -112,7 +112,7 @@ fn_bootstrap_fetch_file(){ local exitcode=$? # Download will fail if downloads a html file. if [ -f "${local_filedir}/${local_filename}" ]; then - if [ -n "$(head "${local_filedir}/${local_filename}" | grep "DOCTYPE" )" ]; then + if [ -n "$(head "${local_filedir}/${local_filename}" | grep "DOCTYPE")" ]; then rm "${local_filedir:?}/${local_filename:?}" local exitcode=2 fi @@ -165,11 +165,11 @@ fn_bootstrap_fetch_file(){ fi } -fn_bootstrap_fetch_file_github(){ +fn_bootstrap_fetch_file_github() { github_file_url_dir="${1}" github_file_url_name="${2}" # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. - if [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then + if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" else @@ -193,10 +193,10 @@ fn_bootstrap_fetch_file_github(){ fn_print_center() { columns=$(tput cols) line="$*" - printf "%*s\n" $(( (${#line} + columns) / 2)) "${line}" + printf "%*s\n" $(((${#line} + columns) / 2)) "${line}" } -fn_print_horizontal(){ +fn_print_horizontal() { printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' "=" } @@ -213,11 +213,11 @@ fn_install_menu_bash() { menu_options=() while read -r line || [[ -n "${line}" ]]; do var=$(echo -e "${line}" | awk -F "," '{print $2 " - " $3}') - menu_options+=( "${var}" ) + menu_options+=("${var}") done < "${options}" - menu_options+=( "Cancel" ) + menu_options+=("Cancel") select option in "${menu_options[@]}"; do - if [ "${option}" ]&&[ "${option}" != "Cancel" ]; then + if [ "${option}" ] && [ "${option}" != "Cancel" ]; then eval "$resultvar=\"${option/%\ */}\"" fi break @@ -239,7 +239,7 @@ fn_install_menu_whiptail() { while read -r line; do key=$(echo -e "${line}" | awk -F "," '{print $3}') val=$(echo -e "${line}" | awk -F "," '{print $2}') - menu_options+=( "${val//\"}" "${key//\"}" ) + menu_options+=("${val//\"/}" "${key//\"/}") done < "${options}" OPTION=$(${menucmd} --title "${title}" --menu "${caption}" "${height}" "${width}" "${menuheight}" "${menu_options[@]}" 3>&1 1>&2 2>&3) if [ $? == 0 ]; then @@ -264,24 +264,26 @@ fn_install_menu() { fi done case "$(basename "${menucmd}")" in - whiptail|dialog) - fn_install_menu_whiptail "${menucmd}" selection "${title}" "${caption}" "${options}" 40 80 30;; + whiptail | dialog) + fn_install_menu_whiptail "${menucmd}" selection "${title}" "${caption}" "${options}" 40 80 30 + ;; *) - fn_install_menu_bash selection "${title}" "${caption}" "${options}";; + fn_install_menu_bash selection "${title}" "${caption}" "${options}" + ;; esac eval "$resultvar=\"${selection}\"" } # Gets server info from serverlist.csv and puts in to array. -fn_server_info(){ +fn_server_info() { IFS="," server_info_array=($(grep -aw "${userinput}" "${serverlist}")) - shortname="${server_info_array[0]}" # csgo + shortname="${server_info_array[0]}" # csgo gameservername="${server_info_array[1]}" # csgoserver - gamename="${server_info_array[2]}" # Counter Strike: Global Offensive + gamename="${server_info_array[2]}" # Counter Strike: Global Offensive } -fn_install_getopt(){ +fn_install_getopt() { userinput="empty" echo -e "Usage: $0 [option]" echo -e "" @@ -295,13 +297,13 @@ fn_install_getopt(){ exit } -fn_install_file(){ +fn_install_file() { local_filename="${gameservername}" if [ -e "${local_filename}" ]; then i=2 - while [ -e "${local_filename}-${i}" ] ; do - (( i++ )) - done + while [ -e "${local_filename}-${i}" ]; do + ((i++)) + done local_filename="${local_filename}-${i}" fi cp -R "${selfname}" "${local_filename}" @@ -321,12 +323,12 @@ fn_install_file(){ # Prevent LinuxGSM from running as root. Except if doing a dependency install. if [ "$(whoami)" == "root" ]; then - if [ "${userinput}" == "install" ]||[ "${userinput}" == "auto-install" ]||[ "${userinput}" == "i" ]||[ "${userinput}" == "ai" ]; then + if [ "${userinput}" == "install" ] || [ "${userinput}" == "auto-install" ] || [ "${userinput}" == "i" ] || [ "${userinput}" == "ai" ]; then if [ "${shortname}" == "core" ]; then echo -e "[ FAIL ] Do NOT run this script as root!" exit 1 fi - elif [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]; then + elif [ ! -f "${functionsdir}/core_functions.sh" ] || [ ! -f "${functionsdir}/check_root.sh" ] || [ ! -f "${functionsdir}/core_messages.sh" ]; then echo -e "[ FAIL ] Do NOT run this script as root!" exit 1 else @@ -344,12 +346,12 @@ if [ "${shortname}" == "core" ]; then exit 1 fi - if [ "${userinput}" == "list" ]||[ "${userinput}" == "l" ]; then + if [ "${userinput}" == "list" ] || [ "${userinput}" == "l" ]; then { tail -n +2 "${serverlist}" | awk -F "," '{print $2 "\t" $3}' } | column -s $'\t' -t | more exit - elif [ "${userinput}" == "install" ]||[ "${userinput}" == "i" ]; then + elif [ "${userinput}" == "install" ] || [ "${userinput}" == "i" ]; then tail -n +2 "${serverlist}" | awk -F "," '{print $1 "," $2 "," $3}' > "${serverlistmenu}" fn_install_menu result "LinuxGSM" "Select game server to install." "${serverlistmenu}" userinput="${result}" @@ -365,7 +367,7 @@ if [ "${shortname}" == "core" ]; then fi elif [ "${userinput}" ]; then fn_server_info - if [ "${userinput}" == "${gameservername}" ]||[ "${userinput}" == "${gamename}" ]||[ "${userinput}" == "${shortname}" ]; then + if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then fn_install_file else echo -e "[ FAIL ] unknown game server" @@ -464,7 +466,7 @@ else fi fi -fn_currentstatus_tmux(){ +fn_currentstatus_tmux() { check_status.sh if [ "${status}" != "0" ]; then currentstatus="STARTED" @@ -473,14 +475,14 @@ fn_currentstatus_tmux(){ fi } -fn_setstatus(){ +fn_setstatus() { fn_currentstatus_tmux echo"" echo -e "Required status: ${requiredstatus}" counter=0 echo -e "Current status: ${currentstatus}" - while [ "${requiredstatus}" != "${currentstatus}" ]; do - counter=$((counter+1)) + while [ "${requiredstatus}" != "${currentstatus}" ]; do + counter=$((counter + 1)) fn_currentstatus_tmux echo -en "New status: ${currentstatus}\\r" @@ -506,7 +508,7 @@ fn_setstatus(){ # End of every test will expect the result to either pass or fail # If the script does not do as intended the whole test will fail # if expecting a pass -fn_test_result_pass(){ +fn_test_result_pass() { if [ $? != 0 ]; then echo -e "=================================" echo -e "Expected result: PASS" @@ -524,7 +526,7 @@ fn_test_result_pass(){ } # if expecting a fail -fn_test_result_fail(){ +fn_test_result_fail() { if [ $? == 0 ]; then echo -e "=================================" echo -e "Expected result: FAIL" @@ -542,7 +544,7 @@ fn_test_result_fail(){ } # test result n/a -fn_test_result_na(){ +fn_test_result_na() { echo -e "=================================" echo -e "Expected result: N/A" echo -e "Actual result: N/A" @@ -626,7 +628,7 @@ echo -e "0.1 - Create log dir's" echo -e "=================================" echo -e "" ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x install_logs.sh @@ -642,7 +644,7 @@ echo -e "Description:" echo -e "Enable dev-debug" echo -e "" ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_dev_debug.sh @@ -665,13 +667,13 @@ echo -e "Command: ./${gameservername} start" echo -e "" # Allows for testing not on Travis CI if [ -z "${TRAVIS}" ]; then -( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_start.sh -) -fn_test_result_fail + ( + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" + BASH_XTRACEFD="5" + set -x + command_start.sh + ) + fn_test_result_fail else echo -e "Test bypassed" fi @@ -688,7 +690,7 @@ echo -e "displaying options messages." echo -e "Command: ./${gameservername}" echo -e "" ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x core_getopt.sh @@ -707,7 +709,7 @@ echo -e "Command: ./${gameservername} abc123" echo -e "" getopt="abc123" ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x core_getopt.sh @@ -728,7 +730,7 @@ echo -e "Description:" echo -e "install ${gamename} server." echo -e "Command: ./${gameservername} auto-install" ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x fn_autoinstall @@ -751,7 +753,7 @@ echo -e "Command: ./${gameservername} start" requiredstatus="STOPPED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_start.sh @@ -770,7 +772,7 @@ echo -e "Command: ./${gameservername} start" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_start.sh @@ -789,10 +791,11 @@ echo -e "Command: ./${gameservername} start" requiredstatus="STOPPED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x - updateonstart="on";command_start.sh + updateonstart="on" + command_start.sh ) fn_test_result_pass echo -e "run order" @@ -808,7 +811,7 @@ echo -e "Command: ./${gameservername} stop" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_stop.sh @@ -827,7 +830,7 @@ echo -e "Command: ./${gameservername} stop" requiredstatus="STOPPED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_stop.sh @@ -846,7 +849,7 @@ echo -e "Command: ./${gameservername} restart" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_restart.sh @@ -865,7 +868,7 @@ echo -e "Command: ./${gameservername} restart" requiredstatus="STOPPED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_restart.sh @@ -888,7 +891,7 @@ echo -e "Command: ./${gameservername} update" requiredstatus="STOPPED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_update.sh @@ -908,7 +911,7 @@ echo -e "Command: ./jc2server update-lgam" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_update_linuxgsm.sh @@ -935,7 +938,7 @@ echo -e "Command: ./${gameservername} monitor" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_monitor.sh @@ -958,7 +961,7 @@ date '+%s' > "${lockdir}/${selfname}.lock" echo "${version}" >> "${lockdir}/${selfname}.lock" echo "${port}" >> "${lockdir}/${selfname}.lock" ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_monitor.sh @@ -977,7 +980,7 @@ echo -e "Command: ./${gameservername} monitor" requiredstatus="STOPPED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_monitor.sh @@ -996,7 +999,7 @@ echo -e "Command: ./${gameservername} test-alert" requiredstatus="STOPPED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_test_alert.sh @@ -1019,7 +1022,7 @@ echo -e "Command: ./${gameservername} details" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_details.sh @@ -1038,7 +1041,7 @@ echo -e "Command: ./${gameservername} postdetails" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_postdetails.sh @@ -1080,7 +1083,7 @@ echo -e "Command: ./${gameservername} detect-glibc" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_dev_detect_glibc.sh @@ -1099,7 +1102,7 @@ echo -e "Command: ./${gameservername} detect-ldd" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_dev_detect_ldd.sh @@ -1118,7 +1121,7 @@ echo -e "Command: ./${gameservername} detect-deps" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_dev_detect_deps.sh @@ -1137,7 +1140,7 @@ echo -e "Command: ./${gameservername} query-raw" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_dev_query_raw.sh @@ -1160,7 +1163,7 @@ echo -e "Command: ./${gameservername} donate" requiredstatus="STARTED" fn_setstatus ( - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x command_donate.sh From 50c2cef8a65a772a213461646d589cf342b59e31 Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 23 Aug 2022 21:31:11 +0200 Subject: [PATCH 005/374] fix(bd): install loop due old condition and config (#3962) --- lgsm/functions/install_config.sh | 2 +- lgsm/functions/install_server_files.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 597cc93c0..8feb8655e 100755 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -217,7 +217,7 @@ elif [ "${shortname}" == "bo" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations -elif [ "${shortname}" == "bo" ]; then +elif [ "${shortname}" == "bd" ]; then gamedirname="BaseDefense" array_configs+=(server.cfg) fn_fetch_default_config diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index 395d48c68..aafb47242 100755 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -235,7 +235,7 @@ elif [ "${shortname}" == "jk2" ]; then update_jediknight2.sh elif [ "${shortname}" == "vints" ]; then update_vintagestory.sh -elif [ -z "${appid}" ] || [ "${shortname}" == "ahl" ] || [ "${shortname}" == "bd" ] || [ "${shortname}" == "bb" ] || [ "${shortname}" == "ns" ] || [ "${shortname}" == "sfc" ] || [ "${shortname}" == "ts" ] || [ "${shortname}" == "vs" ] || [ "${shortname}" == "zmr" ]; then +elif [ -z "${appid}" ] || [ "${shortname}" == "ahl" ] || [ "${shortname}" == "bb" ] || [ "${shortname}" == "ns" ] || [ "${shortname}" == "sfc" ] || [ "${shortname}" == "ts" ] || [ "${shortname}" == "vs" ] || [ "${shortname}" == "zmr" ]; then if [ "${shortname}" == "ut" ]; then install_eula.sh fi From 09698492ae78ac9d49e194387d84a0d3003e4616 Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 23 Aug 2022 21:31:54 +0200 Subject: [PATCH 006/374] fix(csgo): move away old libgcc_s.so.1 file to fix server with ubuntu 22.04 (#3959) --- lgsm/functions/fix_csgo.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lgsm/functions/fix_csgo.sh b/lgsm/functions/fix_csgo.sh index be59c42ec..a393f2fd9 100755 --- a/lgsm/functions/fix_csgo.sh +++ b/lgsm/functions/fix_csgo.sh @@ -31,3 +31,12 @@ if [ -f "${servercfgdir}/valve.rc" ] && grep -E '^\s*exec\s*(default|joystick)\. sed -i 's/^\s*exec\s*joystick.cfg/\/\/exec joystick.cfg/g' "${servercfgdir}/valve.rc" > /dev/null 2>&1 fn_fix_msg_end fi + +# Fixes: Detected engine 11 but could not load: /home/csgo/serverfiles/bin/libgcc_s.so.1: version `GCC_7.0.0' not found (required by /lib/i386-linux-gnu/libstdc++.so.6) +libgccc_so="${serverfiles}/bin/libgcc_s.so.1" +if [ -f "${libgccc_so}" ]; then + fixname="libgcc_s.so.1 move away" + fn_fix_msg_start + mv -v "${libgccc_so}" "${libgccc_so}.bck" + fn_fix_msg_end +fi From f3ad2f16558e6737e867c42ac26949c5dc4361da Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 23 Aug 2022 21:32:22 +0200 Subject: [PATCH 007/374] fix(deps): remove duplicate dependencys what was added with 490cd3fa5aeadd63180fab5379f49d78748ec8ef (#3957) --- lgsm/data/almalinux-8.csv | 2 +- lgsm/data/centos-7.csv | 2 +- lgsm/data/centos-8.csv | 2 +- lgsm/data/rhel-7.csv | 2 +- lgsm/data/rhel-8.csv | 2 +- lgsm/data/rocky-8.csv | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index 067b58378..7c4eb59f5 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bzip2,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz +all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz steamcmd,glibc.i686,libstdc++.i686 ac ahl diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index e8dc0a885..3d4b0a366 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bzip2,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++.i686,nmap-ncat,python3,tar,tmux,unzip,util-linux,wget,xz +all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++.i686,nmap-ncat,python3,tar,tmux,unzip,util-linux,wget,xz steamcmd,glibc.i686,libstdc++.i686 ac ahl diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index 116d83bea..8ece428a5 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bzip2,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz +all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz steamcmd,glibc.i686,libstdc++.i686 ac ahl diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index d4d3fbd30..e9801a845 100644 --- a/lgsm/data/rhel-7.csv +++ b/lgsm/data/rhel-7.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bzip2,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz +all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz steamcmd,glibc.i686,libstdc++.i686 ac ahl diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index 5e7b622e9..88b1babba 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bzip2,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz +all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz steamcmd,glibc.i686,libstdc++.i686 ac ahl diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index 067b58378..7c4eb59f5 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bzip2,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz +all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz steamcmd,glibc.i686,libstdc++.i686 ac ahl From ff606a596899d4c4dfffbac5ab507b93b562bcd5 Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 23 Aug 2022 21:33:08 +0200 Subject: [PATCH 008/374] feat(fctr): add function to get the server version via the details command (#3956) --- lgsm/functions/info_game.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index 57d01237d..2d704a2ba 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -653,6 +653,12 @@ fn_info_game_fctr() { port=${port:-"0"} rconport=${rconport:-"0"} rconpassword=${rconpassword:-"NOT SET"} + + # get server version if installed + local factoriobin="${executabledir}${executable:1}" + if [ -f "${factoriobin}" ]; then + serverversion=$(${factoriobin} --version | grep "Version:" | awk '{print $2}') + fi } fn_info_game_jc2() { From 920657e7742fe79391a7e6a19d2a9f2320de7815 Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 23 Aug 2022 21:33:28 +0200 Subject: [PATCH 009/374] fix(vints): refactor to fix it when there is no config for the server (#3955) --- lgsm/functions/info_game.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index 2d704a2ba..3a62c67dd 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -2177,20 +2177,17 @@ fn_info_game_vints() { servername="${unavailable}" maxplayers="${unavailable}" serverpassword="${unavailable}" - port="${unavailable}" - queryport="${unavailable}" - configip="${unavailable}" + port="${port:-"0"}" else servername=$(jq -r '.ServerName' "${servercfgfullpath}") maxplayers=$(jq -r '.MaxClients' "${servercfgfullpath}") serverpassword=$(jq -r 'select(.Password != null) | .Password' "${servercfgfullpath}") port=$(jq -r '.Port' "${servercfgfullpath}") - queryport=${port:-"0"} configip=$(jq -r 'select(.Ip != null) | .Ip' "${servercfgfullpath}") - - serverpassword=${serverpassword:-"NOT SET"} - configip=${configip:-"0.0.0.0"} fi + queryport=${port:-"0"} + serverpassword=${serverpassword:-"NOT SET"} + configip=${configip:-"0.0.0.0"} } fn_info_game_wet() { From 7be12c41b503dcd1d6b35dd7b0b728066a170227 Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 23 Aug 2022 21:33:47 +0200 Subject: [PATCH 010/374] fix(squad): fix to use the proper default config (#3954) --- lgsm/config-default/config-lgsm/squadserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/squadserver/_default.cfg b/lgsm/config-default/config-lgsm/squadserver/_default.cfg index 85affef38..0a343cfdf 100644 --- a/lgsm/config-default/config-lgsm/squadserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/squadserver/_default.cfg @@ -163,7 +163,7 @@ systemdir="${serverfiles}/SquadGame" executabledir="${serverfiles}" executable="./SquadGameServer.sh" servercfgdir="${systemdir}/ServerConfig" -servercfg="${selfname}.cfg" +servercfg="Server.cfg" servercfgdefault="Server.cfg" servercfgfullpath="${servercfgdir}/${servercfg}" From 8f68989a16eeb21a4601851b5683b94907201bff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Aug 2022 20:34:03 +0100 Subject: [PATCH 011/374] build(deps): bump release-drafter/release-drafter from 5.20.0 to 5.20.1 (#3950) Bumps [release-drafter/release-drafter](https://github.com/release-drafter/release-drafter) from 5.20.0 to 5.20.1. - [Release notes](https://github.com/release-drafter/release-drafter/releases) - [Commits](https://github.com/release-drafter/release-drafter/compare/v5.20.0...v5.20.1) --- updated-dependencies: - dependency-name: release-drafter/release-drafter dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/create-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 182b32a78..d5bd4bec6 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest steps: # Drafts your next Release notes as Pull Requests are merged into "master" - - uses: release-drafter/release-drafter@v5.20.0 + - uses: release-drafter/release-drafter@v5.20.1 with: config-name: release-drafter.yml env: From 27ab0923ab24dab00aaf9685f04d214bbdbda7bf Mon Sep 17 00:00:00 2001 From: Neouni Date: Tue, 23 Aug 2022 21:36:28 +0200 Subject: [PATCH 012/374] feat(st): switch parameters to loadlatest (#3924) There are some unforseen issues if you both specify load and new together. Loadlatest will also grab the last backup of that same save. --- lgsm/config-default/config-lgsm/stserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/stserver/_default.cfg b/lgsm/config-default/config-lgsm/stserver/_default.cfg index 5c66fcca4..26da17f43 100644 --- a/lgsm/config-default/config-lgsm/stserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/stserver/_default.cfg @@ -20,7 +20,7 @@ worldname="moon_save" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters # Edit with care -startparameters="-NEWGAME ${worldtype} -LOADGAME ${worldname} -settings ServerName ${servername} StartLocalHost true ServerVisible true ServerMaxPlayers ${maxplayers} GamePort ${port} UpdatePort ${queryport} UPNPEnabled true AutoSave true SaveInterval ${autosaveinterval}" +startparameters="-LOADLATEST ${worldname} ${worldtype} -settings ServerName ${servername} StartLocalHost true ServerVisible true ServerMaxPlayers ${maxplayers} GamePort ${port} UpdatePort ${queryport} UPNPEnabled true AutoSave true SaveInterval ${autosaveinterval}" #### LinuxGSM Settings #### From bf46fdcfc6dc4c452347ce5bcd261ea9f2e3ee38 Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 23 Aug 2022 21:36:47 +0200 Subject: [PATCH 013/374] feat(mods): update sourcemod to 1.11 (#3919) --- lgsm/functions/mods_list.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/mods_list.sh b/lgsm/functions/mods_list.sh index 8ea31561f..151a98cbe 100755 --- a/lgsm/functions/mods_list.sh +++ b/lgsm/functions/mods_list.sh @@ -61,7 +61,7 @@ metamodsourcelatestfile=$(wget "${metamodsourcescrapeurl}" -q -O -) metamodsourcedownloadurl="https://www.metamodsource.net/latest.php?os=linux&version=${metamodsourceversion}" metamodsourceurl="${metamodsourcedownloadurl}" # Sourcemod -sourcemodversion="1.10" +sourcemodversion="1.11" 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}" From 9fc6244fc3bbe21c425ba82d85880b05edad3718 Mon Sep 17 00:00:00 2001 From: Marcin Jakubowski Date: Tue, 23 Aug 2022 21:37:17 +0200 Subject: [PATCH 014/374] fix(bt): missing user data directory (#3916) --- lgsm/functions/core_functions.sh | 5 +++++ lgsm/functions/fix.sh | 2 ++ lgsm/functions/fix_bt.sh | 16 ++++++++++++++++ 3 files changed, 23 insertions(+) create mode 100755 lgsm/functions/fix_bt.sh diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 29d2e2ebc..03deac001 100755 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -346,6 +346,11 @@ fix_armar.sh() { fn_fetch_function } +fix_bt.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + fix_bo.sh() { functionfile="${FUNCNAME[0]}" fn_fetch_function diff --git a/lgsm/functions/fix.sh b/lgsm/functions/fix.sh index 2d9af576e..0ed9fdf70 100755 --- a/lgsm/functions/fix.sh +++ b/lgsm/functions/fix.sh @@ -43,6 +43,8 @@ if [ "${commandname}" != "INSTALL" ] && [ -z "${fixbypass}" ]; then fix_armar.sh elif [ "${shortname}" == "ark" ]; then fix_ark.sh + elif [ "${shortname}" == "bt" ]; then + fix_bt.sh elif [ "${shortname}" == "bo" ]; then fix_bo.sh elif [ "${shortname}" == "csgo" ]; then diff --git a/lgsm/functions/fix_bt.sh b/lgsm/functions/fix_bt.sh new file mode 100755 index 000000000..094c2617c --- /dev/null +++ b/lgsm/functions/fix_bt.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# LinuxGSM fix_bt.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves an issue with Barotrauma. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +# Fixes: Missing user data directory error. +if [ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Daedalic Entertainment GmbH/Barotrauma" ]; then + fixname="Missing user data directory error." + fn_fix_msg_start + mkdir -p "${XDG_DATA_HOME:="${HOME}/.local/share"}/Daedalic Entertainment GmbH/Barotrauma" + fn_fix_msg_end +fi From dc420668a2e31cf9f8b809fc22f54280fbfa1ad6 Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 23 Aug 2022 21:37:39 +0200 Subject: [PATCH 015/374] fix(deps): fix java and rng dependency for pz and rw (#3911) --- lgsm/data/ubuntu-20.04.csv | 4 ++-- lgsm/data/ubuntu-21.04.csv | 4 ++-- lgsm/data/ubuntu-21.10.csv | 4 ++-- lgsm/data/ubuntu-22.04.csv | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index ccb1ca703..6f9bec4c0 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -79,7 +79,7 @@ pmc,openjdk-17-jre pstbs,libgconf-2-4 pvkii pvr,libc++1 -pz,openjdk-16-jre,rng-tools +pz,openjdk-17-jre,rng-tools q2 q3 ql @@ -88,7 +88,7 @@ ricochet ro rtcw rust,lib32z1 -rw,openjdk-16-jre +rw,openjdk-17-jre samp sb sbots diff --git a/lgsm/data/ubuntu-21.04.csv b/lgsm/data/ubuntu-21.04.csv index b2a277306..678c06f28 100644 --- a/lgsm/data/ubuntu-21.04.csv +++ b/lgsm/data/ubuntu-21.04.csv @@ -79,7 +79,7 @@ pmc,openjdk-17-jre pstbs,libgconf-2-4 pvkii pvr,libc++1 -pz,openjdk-16-jre,rng-tools +pz,openjdk-17-jre,rng-tools q2 q3 ql @@ -88,7 +88,7 @@ ricochet ro rtcw rust,lib32z1 -rw,openjdk-16-jre +rw,openjdk-17-jre samp sb sbots diff --git a/lgsm/data/ubuntu-21.10.csv b/lgsm/data/ubuntu-21.10.csv index 836dfe53f..f99d2f46d 100644 --- a/lgsm/data/ubuntu-21.10.csv +++ b/lgsm/data/ubuntu-21.10.csv @@ -77,7 +77,7 @@ pmc,openjdk-17-jre pstbs,libgconf-2-4 pvkii pvr,libc++1 -pz,openjdk-16-jre,rng-tools +pz,openjdk-17-jre,rng-tools q2 q3 ql @@ -86,7 +86,7 @@ ricochet ro rtcw rust,lib32z1 -rw,openjdk-16-jre +rw,openjdk-17-jre samp sb sbots diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index 836dfe53f..18af1192f 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -77,7 +77,7 @@ pmc,openjdk-17-jre pstbs,libgconf-2-4 pvkii pvr,libc++1 -pz,openjdk-16-jre,rng-tools +pz,openjdk-17-jre,rng-tools5 q2 q3 ql @@ -86,7 +86,7 @@ ricochet ro rtcw rust,lib32z1 -rw,openjdk-16-jre +rw,openjdk-17-jre samp sb sbots From 81998f73c7fcf4ae0155c6cc577f473f0fceed9d Mon Sep 17 00:00:00 2001 From: eggplants Date: Wed, 24 Aug 2022 04:38:39 +0900 Subject: [PATCH 016/374] fix: replace deprecated optparse with argparse (#3913) --- lgsm/functions/query_gsquery.py | 139 +++++++++++++++++--------------- 1 file changed, 72 insertions(+), 67 deletions(-) diff --git a/lgsm/functions/query_gsquery.py b/lgsm/functions/query_gsquery.py index 4d6b01828..2e28bd58a 100755 --- a/lgsm/functions/query_gsquery.py +++ b/lgsm/functions/query_gsquery.py @@ -6,66 +6,66 @@ # Website: https://linuxgsm.com # Description: Allows querying of various game servers. -import optparse +import argparse import socket import sys +engine_types=('protocol-valve','protocol-quake3', 'protocol-quake3','protocol-gamespy1','protocol-unreal2','ut3 minecraft','minecraftbe','jc2mp','mumbleping','soldat','teeworlds') + class gsquery: - def __init__(self, options, arguments): - self.option = options + server_response_timeout = 5 + default_buffer_length = 1024 + sourcequery=('protocol-valve','avalanche3.0','barotrauma','madness','quakelive','realvirtuality','refractor','source','goldsrc','spark','starbound','unity3d','unreal4','wurm') + idtech2query=('protocol-quake3','idtech2','quake','iw2.0') + idtech3query=('protocol-quake3','iw3.0','ioquake3','qfusion') + minecraftquery=('minecraft','lwjgl2') + minecraftbequery=('minecraftbe',) + jc2mpquery=('jc2mp',) + mumblequery=('mumbleping',) + soldatquery=('soldat',) + twquery=('teeworlds',) + unrealquery=('protocol-gamespy1','unreal') + unreal2query=('protocol-unreal2','unreal2') + unreal3query=('ut3','unreal3') + + def __init__(self, arguments): self.argument = arguments # - self.server_response_timeout = 5 - self.default_buffer_length = 1024 - # - sourcequery=['protocol-valve','avalanche3.0','barotrauma','madness','quakelive','realvirtuality','refractor','source','goldsrc','spark','starbound','unity3d','unreal4','wurm'] - idtech2query=['protocol-quake3','idtech2','quake','iw2.0'] - idtech3query=['protocol-quake3','iw3.0','ioquake3','qfusion'] - minecraftquery=['minecraft','lwjgl2'] - minecraftbequery=['minecraftbe'] - jc2mpquery=['jc2mp'] - mumblequery=['mumbleping'] - soldatquery=['soldat'] - twquery=['teeworlds'] - unrealquery=['protocol-gamespy1','unreal'] - unreal2query=['protocol-unreal2','unreal2'] - unreal3query=['ut3','unreal3'] - if self.option.engine in sourcequery: + if self.argument.engine in self.sourcequery: self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0' - elif self.option.engine in idtech2query: + elif self.argument.engine in self.idtech2query: self.query_prompt_string = b'\xff\xff\xff\xffstatus\x00' - elif self.option.engine in idtech3query: + elif self.argument.engine in self.idtech3query: self.query_prompt_string = b'\xff\xff\xff\xffgetstatus' - elif self.option.engine in jc2mpquery: + elif self.argument.engine in self.jc2mpquery: self.query_prompt_string = b'\xFE\xFD\x09\x10\x20\x30\x40' - elif self.option.engine in minecraftquery: + elif self.argument.engine in self.minecraftquery: self.query_prompt_string = b'\xFE\xFD\x09\x3d\x54\x1f\x93' - elif self.option.engine in minecraftbequery: + elif self.argument.engine in self.minecraftbequery: self.query_prompt_string = b'\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\xfe\xfe\xfe\xfe\xfd\xfd\xfd\xfd\x12\x34\x56\x78\x00\x00\x00\x00\x00\x00\x00\x00' - elif self.option.engine in mumblequery: + elif self.argument.engine in self.mumblequery: self.query_prompt_string = b'\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x07\x08' - elif self.option.engine in soldatquery: + elif self.argument.engine in self.soldatquery: self.query_prompt_string = b'\x69\x00' - elif self.option.engine in twquery: - self.query_prompt_string = b"\x04\x00\x00\xff\xff\xff\xff\x05" + bytearray(511) - elif self.option.engine in unrealquery: + elif self.argument.engine in self.twquery: + self.query_prompt_string = b'\x04\x00\x00\xff\xff\xff\xff\x05' + bytearray(511) + elif self.argument.engine in self.unrealquery: self.query_prompt_string = b'\x5C\x69\x6E\x66\x6F\x5C' - elif self.option.engine in unreal2query: + elif self.argument.engine in self.unreal2query: self.query_prompt_string = b'\x79\x00\x00\x00\x00' - elif self.option.engine in unreal3query: + elif self.argument.engine in self.unreal3query: self.query_prompt_string = b'\xFE\xFD\x09\x00\x00\x00\x00' self.connected = False self.response = None - self.sanity_checks() @staticmethod - def fatal_error(self, error_message, error_code=1): + def fatal_error(error_message, error_code=1): sys.stderr.write('ERROR: ' + str(error_message) + '\n') sys.exit(error_code) @staticmethod - def exit_success(self, success_message=''): + def exit_success(success_message=''): sys.stdout.write('OK: ' + str(success_message) + '\n') sys.exit(0) @@ -74,10 +74,10 @@ class gsquery: connection = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) connection.settimeout(self.server_response_timeout) try: - self.connected = connection.connect((self.option.address, int(self.option.port))) + self.connected = connection.connect((self.argument.address, int(self.argument.port))) except socket.timeout: self.fatal_error('Request timed out', 1) - except: + except Exception: self.fatal_error('Unable to connect', 1) # Send. connection.send(self.query_prompt_string) @@ -95,52 +95,57 @@ class gsquery: else: self.exit_success(str(self.response)) - def sanity_checks(self): - if not self.option.address: - self.fatal_error('No IPv4 address supplied.', 4) - if not self.option.port: - self.fatal_error('No port supplied.', 4) - -if __name__ == '__main__': - parser = optparse.OptionParser( - usage='usage: python3 %prog [options]', - version='%prog 0.0.1' +def parse_args(): + parser = argparse.ArgumentParser( + description='Allows querying of various game servers.', + usage='usage: python3 %(prog)s [options]', + add_help=False ) - parser.add_option( + parser.add_argument( '-a', '--address', - action='store', - dest='address', - default=False, + type=str, + required=True, help='The IPv4 address of the server.' ) - parser.add_option( + parser.add_argument( '-p', '--port', - action='store', - dest='port', - default=False, + type=int, + required=True, help='The IPv4 port of the server.' ) - parser.add_option( + parser.add_argument( '-e', '--engine', - action='store', - dest='engine', - default=False, - help='Engine type: protocol-valve protocol-quake3 protocol-quake3 protocol-gamespy1 protocol-unreal2 ut3 minecraft minecraftbe jc2mp mumbleping soldat teeworlds' + metavar='ENGINE', + choices=engine_types, + help='Engine type: ' + ' '.join(engine_types) ) - parser.add_option( + parser.add_argument( '-v', '--verbose', action='store_true', - dest='verbose', - default=False, help='Display verbose output.' ) - parser.add_option( + parser.add_argument( '-d', '--debug', action='store_true', - dest='debug', - default=False, help='Display debugging output.' ) - options, arguments = parser.parse_args() - server = gsquery(options, arguments) + parser.add_argument( + '-V', '--version', + action='version', + version='%(prog)s 0.0.1', + help='Display version and exit.' + ) + parser.add_argument( + '-h', '--help', + action='help', + help='Display help and exit.' + ) + return parser.parse_args() + +def main(): + arguments = parse_args() + server = gsquery(arguments) server.responding() + +if __name__ == '__main__': + main() From 8571d9f374d0ae61eab007f61a5b1381660af3b7 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 23 Aug 2022 21:01:45 +0100 Subject: [PATCH 017/374] chore: update licence and add prettier --- ...update-copyright-years-in-license-file.yml | 17 + .gitignore | 1 + .prettierrc.json | 3 + LICENSE | 4 +- package-lock.json | 466 ++++++++++++++++++ package.json | 24 + 6 files changed, 513 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/update-copyright-years-in-license-file.yml create mode 100644 .prettierrc.json create mode 100644 package-lock.json create mode 100644 package.json diff --git a/.github/workflows/update-copyright-years-in-license-file.yml b/.github/workflows/update-copyright-years-in-license-file.yml new file mode 100644 index 000000000..01af6dd3c --- /dev/null +++ b/.github/workflows/update-copyright-years-in-license-file.yml @@ -0,0 +1,17 @@ +--- +name: Update copyright year(s) in license file + +on: + schedule: + - cron: "0 3 1 1 *" # 03:00 AM on January 1 + +jobs: + update-license-year: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: FantasticFiasco/action-update-license-year@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 12218bea3..8bb6a5b32 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.db .idea +/node_modules diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 000000000..02d542d50 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,3 @@ +{ + "plugins": ["prettier-plugin-sh"] +} diff --git a/LICENSE b/LICENSE index bda7cb6ee..88c1caac5 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ -MIT License +# The MIT License (MIT) -Copyright (c) 2012-2021 Daniel Gibbs +Copyright (c) 2012-2022 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 diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 000000000..d0deca3ec --- /dev/null +++ b/package-lock.json @@ -0,0 +1,466 @@ +{ + "name": "linuxgsm", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "linuxgsm", + "license": "MIT", + "devDependencies": { + "prettier": "^2.7.1", + "prettier-plugin-sh": "^0.12.8" + } + }, + "node_modules/@pkgr/utils": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.3.0.tgz", + "integrity": "sha512-7dIJ9CRVzBnqyEl7diUHPUFJf/oty2SeoVzcMocc5PeOUDK9KGzvgIBjGRRzzlRDaOjh3ADwH0WeibQvi3ls2Q==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "is-glob": "^4.0.3", + "open": "^8.4.0", + "picocolors": "^1.0.0", + "tiny-glob": "^0.2.9", + "tslib": "^2.4.0" + }, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/define-lazy-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", + "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/globalyzer": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz", + "integrity": "sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==", + "dev": true + }, + "node_modules/globrex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz", + "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==", + "dev": true + }, + "node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true, + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/mvdan-sh": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/mvdan-sh/-/mvdan-sh-0.10.1.tgz", + "integrity": "sha512-kMbrH0EObaKmK3nVRKUIIya1dpASHIEusM13S4V1ViHFuxuNxCo+arxoa6j/dbV22YBGjl7UKJm9QQKJ2Crzhg==", + "dev": true + }, + "node_modules/open": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/open/-/open-8.4.0.tgz", + "integrity": "sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q==", + "dev": true, + "dependencies": { + "define-lazy-prop": "^2.0.0", + "is-docker": "^2.1.1", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/prettier": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", + "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-plugin-sh": { + "version": "0.12.8", + "resolved": "https://registry.npmjs.org/prettier-plugin-sh/-/prettier-plugin-sh-0.12.8.tgz", + "integrity": "sha512-VOq8h2Gn5UzrCIKm4p/nAScXJbN09HdyFDknAcxt6Qu/tv/juu9bahxSrcnM9XWYA+Spz1F1ANJ4LhfwB7+Q1Q==", + "dev": true, + "dependencies": { + "mvdan-sh": "^0.10.1", + "sh-syntax": "^0.3.6", + "synckit": "^0.8.1" + }, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + }, + "peerDependencies": { + "prettier": "^2.0.0" + } + }, + "node_modules/sh-syntax": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/sh-syntax/-/sh-syntax-0.3.7.tgz", + "integrity": "sha512-xIB/uRniZ9urxAuXp1Ouh/BKSI1VK8RSqfwGj7cV57HvGrFo3vHdJfv8Tdp/cVcxJgXQTkmHr5mG5rqJW8r4wQ==", + "dev": true, + "dependencies": { + "tslib": "^2.4.0" + }, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/synckit": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.3.tgz", + "integrity": "sha512-1goXnDYNJlKwCM37f5MTzRwo+8SqutgVtg2d37D6YnHHT4E3IhQMRfKiGdfTZU7LBlI6T8inCQUxnMBFHrbqWw==", + "dev": true, + "dependencies": { + "@pkgr/utils": "^2.3.0", + "tslib": "^2.4.0" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, + "node_modules/tiny-glob": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.9.tgz", + "integrity": "sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==", + "dev": true, + "dependencies": { + "globalyzer": "0.1.0", + "globrex": "^0.1.2" + } + }, + "node_modules/tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", + "dev": true + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + } + }, + "dependencies": { + "@pkgr/utils": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.3.0.tgz", + "integrity": "sha512-7dIJ9CRVzBnqyEl7diUHPUFJf/oty2SeoVzcMocc5PeOUDK9KGzvgIBjGRRzzlRDaOjh3ADwH0WeibQvi3ls2Q==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "is-glob": "^4.0.3", + "open": "^8.4.0", + "picocolors": "^1.0.0", + "tiny-glob": "^0.2.9", + "tslib": "^2.4.0" + } + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "define-lazy-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", + "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", + "dev": true + }, + "globalyzer": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz", + "integrity": "sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==", + "dev": true + }, + "globrex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz", + "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==", + "dev": true + }, + "is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "requires": { + "is-docker": "^2.0.0" + } + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "mvdan-sh": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/mvdan-sh/-/mvdan-sh-0.10.1.tgz", + "integrity": "sha512-kMbrH0EObaKmK3nVRKUIIya1dpASHIEusM13S4V1ViHFuxuNxCo+arxoa6j/dbV22YBGjl7UKJm9QQKJ2Crzhg==", + "dev": true + }, + "open": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/open/-/open-8.4.0.tgz", + "integrity": "sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q==", + "dev": true, + "requires": { + "define-lazy-prop": "^2.0.0", + "is-docker": "^2.1.1", + "is-wsl": "^2.2.0" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "prettier": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", + "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "dev": true + }, + "prettier-plugin-sh": { + "version": "0.12.8", + "resolved": "https://registry.npmjs.org/prettier-plugin-sh/-/prettier-plugin-sh-0.12.8.tgz", + "integrity": "sha512-VOq8h2Gn5UzrCIKm4p/nAScXJbN09HdyFDknAcxt6Qu/tv/juu9bahxSrcnM9XWYA+Spz1F1ANJ4LhfwB7+Q1Q==", + "dev": true, + "requires": { + "mvdan-sh": "^0.10.1", + "sh-syntax": "^0.3.6", + "synckit": "^0.8.1" + } + }, + "sh-syntax": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/sh-syntax/-/sh-syntax-0.3.7.tgz", + "integrity": "sha512-xIB/uRniZ9urxAuXp1Ouh/BKSI1VK8RSqfwGj7cV57HvGrFo3vHdJfv8Tdp/cVcxJgXQTkmHr5mG5rqJW8r4wQ==", + "dev": true, + "requires": { + "tslib": "^2.4.0" + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "synckit": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.3.tgz", + "integrity": "sha512-1goXnDYNJlKwCM37f5MTzRwo+8SqutgVtg2d37D6YnHHT4E3IhQMRfKiGdfTZU7LBlI6T8inCQUxnMBFHrbqWw==", + "dev": true, + "requires": { + "@pkgr/utils": "^2.3.0", + "tslib": "^2.4.0" + } + }, + "tiny-glob": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.9.tgz", + "integrity": "sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==", + "dev": true, + "requires": { + "globalyzer": "0.1.0", + "globrex": "^0.1.2" + } + }, + "tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 000000000..c62ce3175 --- /dev/null +++ b/package.json @@ -0,0 +1,24 @@ +{ + "name": "linuxgsm", + "description": "


\"LinuxGSM\"

", + "directories": { + "test": "tests" + }, + "devDependencies": { + "prettier": "^2.7.1", + "prettier-plugin-sh": "^0.12.8" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/GameServerManagers/LinuxGSM.git" + }, + "author": "", + "license": "MIT", + "bugs": { + "url": "https://github.com/GameServerManagers/LinuxGSM/issues" + }, + "homepage": "https://github.com/GameServerManagers/LinuxGSM#readme" +} From 6838d1d4bd25303b6b4edd5ff58d731da86c15d0 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 23 Aug 2022 21:26:14 +0100 Subject: [PATCH 018/374] chore: add recommended extensions for vscode --- .vscode/extensions.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .vscode/extensions.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 000000000..0ceb99088 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,11 @@ +{ + "recommendations": [ + "ms-python.python", + "editorconfig.editorconfig", + "yzhang.markdown-all-in-one", + "esbenp.prettier-vscode", + "timonwong.shellcheck", + "foxundermoon.shell-format", + "redhat.vscode-yaml" + ] +} From 04262324aef15f30dfda2fac7bc63abfd86c589c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 23 Aug 2022 21:51:53 +0100 Subject: [PATCH 019/374] feat(cod4): update server download to v21.2 (#3963) --- lgsm/functions/check_steamcmd.sh | 2 +- lgsm/functions/install_server_files.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lgsm/functions/check_steamcmd.sh b/lgsm/functions/check_steamcmd.sh index 030cbbf03..d41e8669f 100755 --- a/lgsm/functions/check_steamcmd.sh +++ b/lgsm/functions/check_steamcmd.sh @@ -12,7 +12,7 @@ core_steamcmd.sh fn_check_steamcmd_clear fn_check_steamcmd -if [ ${shortname} == "ark" ]; then +if [ "${shortname}" == "ark" ]; then fn_check_steamcmd_ark fi fn_check_steamcmd_dir diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index aafb47242..fe9353ad8 100755 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -58,12 +58,12 @@ fn_install_server_files() { force="noforce" md5="b8c4c611f01627dd43348e78478a3d41" elif [ "${shortname}" == "cod4" ]; then - remote_fileurl="http://linuxgsm.download/CallOfDuty4/cod4x18_1790_lnxded.tar.xz" + remote_fileurl="http://linuxgsm.download/CallOfDuty4/cod4x18_lnxded.tar.xz" local_filedir="${tmpdir}" - local_filename="cod4x18_1790_lnxded.tar.xz" + local_filename="cod4x18_lnxded.tar.xz" chmodx="nochmodx" run="norun" force="noforce" - md5="30609db2afde09d22498fbab3a427d11" + md5="d255b59b9756d7dbead67718208512ee" elif [ "${shortname}" == "codwaw" ]; then remote_fileurl="http://linuxgsm.download/CallOfDutyWorldAtWar/codwaw-lnxded-1.7-full.tar.xz" local_filedir="${tmpdir}" From 4bc349c362079e1a96e06fa112f9974d0ff477e1 Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 24 Aug 2022 19:36:22 +0200 Subject: [PATCH 020/374] feat(ts3): check checksum for downloaded file (#3969) --- lgsm/functions/update_ts3.sh | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/lgsm/functions/update_ts3.sh b/lgsm/functions/update_ts3.sh index 77ed61838..d7aff9b48 100644 --- a/lgsm/functions/update_ts3.sh +++ b/lgsm/functions/update_ts3.sh @@ -8,13 +8,17 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_ts3_dl() { + ts3latestdata=$(curl -s "https://www.${remotelocation}/versions/server.json" | jq '.linux') if [ "${ts3arch}" == "amd64" ]; then - remotebuildurl=$(curl -s 'https://www.teamspeak.com/versions/server.json' | jq -r '.linux.x86_64.mirrors."teamspeak.com"') + remotebuildurl=$(echo -e "${ts3latestdata}" | jq -r '.x86_64.mirrors."teamspeak.com"') + remotehash=$(echo -e "${ts3latestdata}" | jq -r '.x86_64.checksum') elif [ "${ts3arch}" == "x86" ]; then - remotebuildurl=$(curl -s 'https://www.teamspeak.com/versions/server.json' | jq -r '.linux.x86.mirrors."teamspeak.com"') + remotebuildurl=$(echo -e "${ts3latestdata}" | jq -r '.x86.mirrors."teamspeak.com"') + remotehash=$(echo -e "${ts3latestdata}" | jq -r '.x86.checksum') fi - fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "teamspeak3-server_linux_${ts3arch}-${remotebuild}.tar.bz2" "" "norun" "noforce" "nohash" - fn_dl_extract "${tmpdir}" "teamspeak3-server_linux_${ts3arch}-${remotebuild}.tar.bz2" "${tmpdir}" + remotefile=$(basename "${remotebuildurl}") + fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotefile}" "" "norun" "noforce" "${remotehash}" + fn_dl_extract "${tmpdir}" "${remotefile}" "${tmpdir}" echo -e "copying to ${serverfiles}...\c" cp -R "${tmpdir}/teamspeak3-server_linux_${ts3arch}/"* "${serverfiles}" local exitcode=$? @@ -103,10 +107,11 @@ fn_update_ts3_localbuild() { fn_update_ts3_remotebuild() { # Gets remote build info. + ts3latestdata=$(curl -s "https://www.${remotelocation}/versions/server.json" | jq '.linux') if [ "${ts3arch}" == "amd64" ]; then - remotebuild=$(curl -s "https://www.teamspeak.com/versions/server.json" | jq -r '.linux.x86_64.version') + remotebuild=$(echo -e "${ts3latestdata}" | jq -r '.x86_64.version') elif [ "${ts3arch}" == "x86" ]; then - remotebuild=$(curl -s "https://www.teamspeak.com/versions/server.json" | jq -r '.linux.x86.version') + remotebuild=$(echo -e "${ts3latestdata}" | jq -r '.x86.version') fi if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" From 8871030ca2f3b6cd37a3c5958d5918e85262e8b6 Mon Sep 17 00:00:00 2001 From: ethzero Date: Fri, 9 Sep 2022 09:33:01 +0100 Subject: [PATCH 021/374] fix(em): update default map (#3977) Changed defaultmap value from "emp_district" to "con_district402" as this map was renamed years ago and would otherwise cause the server to fail on startup. --- lgsm/config-default/config-lgsm/emserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/emserver/_default.cfg b/lgsm/config-default/config-lgsm/emserver/_default.cfg index f10a8a437..16db942a4 100644 --- a/lgsm/config-default/config-lgsm/emserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/emserver/_default.cfg @@ -13,7 +13,7 @@ ip="0.0.0.0" port="27015" clientport="27005" sourcetvport="27020" -defaultmap="emp_district" +defaultmap="con_district402" maxplayers="62" ## Game Server Login Token (GSLT): Optional From 819a4b3ec3345fa9095c6abbc4ea420a63f80f22 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Sep 2022 20:55:37 +0100 Subject: [PATCH 022/374] build(deps): bump release-drafter/release-drafter from 5.20.1 to 5.21.0 (#3985) Bumps [release-drafter/release-drafter](https://github.com/release-drafter/release-drafter) from 5.20.1 to 5.21.0. - [Release notes](https://github.com/release-drafter/release-drafter/releases) - [Commits](https://github.com/release-drafter/release-drafter/compare/v5.20.1...v5.21.0) --- updated-dependencies: - dependency-name: release-drafter/release-drafter dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/create-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index d5bd4bec6..44e841ec1 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest steps: # Drafts your next Release notes as Pull Requests are merged into "master" - - uses: release-drafter/release-drafter@v5.20.1 + - uses: release-drafter/release-drafter@v5.21.0 with: config-name: release-drafter.yml env: From 28101a7295d8de2d31a04b7d4f897954ecb4bf58 Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 22 Sep 2022 21:56:05 +0200 Subject: [PATCH 023/374] fix(query_gsquery): fix regression from 81998f73c7fcf4ae0155c6cc577f473f0fceed9d (#3966) --- lgsm/functions/query_gsquery.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/query_gsquery.py b/lgsm/functions/query_gsquery.py index 2e28bd58a..62c92082e 100755 --- a/lgsm/functions/query_gsquery.py +++ b/lgsm/functions/query_gsquery.py @@ -10,7 +10,7 @@ import argparse import socket import sys -engine_types=('protocol-valve','protocol-quake3', 'protocol-quake3','protocol-gamespy1','protocol-unreal2','ut3 minecraft','minecraftbe','jc2mp','mumbleping','soldat','teeworlds') +engine_types=('protocol-valve','protocol-quake3','protocol-quake3','protocol-gamespy1','protocol-unreal2','ut3','minecraft','minecraftbe','jc2mp','mumbleping','soldat','teeworlds') class gsquery: server_response_timeout = 5 From 9984f956b327d916b28f13b36465a505c190914d Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 22 Sep 2022 21:56:49 +0200 Subject: [PATCH 024/374] feat(ts3): add check-update function (#3967) --- lgsm/functions/command_check_update.sh | 14 +++++--- lgsm/functions/core_getopt.sh | 2 +- lgsm/functions/update_ts3.sh | 50 ++++++++++++++------------ 3 files changed, 37 insertions(+), 29 deletions(-) diff --git a/lgsm/functions/command_check_update.sh b/lgsm/functions/command_check_update.sh index 9648dd49e..59b29d6e9 100755 --- a/lgsm/functions/command_check_update.sh +++ b/lgsm/functions/command_check_update.sh @@ -14,12 +14,16 @@ fn_print_dots "" check.sh core_logs.sh -core_steamcmd.sh +if [ "${appid}" ]; then + core_steamcmd.sh -check_steamcmd.sh + check_steamcmd.sh -fn_update_steamcmd_localbuild -fn_update_steamcmd_remotebuild -fn_update_steamcmd_compare + fn_update_steamcmd_localbuild + fn_update_steamcmd_remotebuild + fn_update_steamcmd_compare +elif [ "${shortname}" == "ts3" ]; then + update_ts3.sh +fi core_exit.sh diff --git a/lgsm/functions/core_getopt.sh b/lgsm/functions/core_getopt.sh index 0a5a39c09..3c44931b9 100755 --- a/lgsm/functions/core_getopt.sh +++ b/lgsm/functions/core_getopt.sh @@ -75,7 +75,7 @@ if [ "${shortname}" == "jk2" ] || [ "${engine}" != "idtech3" ]; then fi # Validate and check-update command. -if [ "${appid}" ]; then +if [ "${appid}" ]||[ "${shortname}" == "ts3" ]; then currentopt+=("${cmd_validate[@]}" "${cmd_check_update[@]}") fi diff --git a/lgsm/functions/update_ts3.sh b/lgsm/functions/update_ts3.sh index d7aff9b48..be5c9e06f 100644 --- a/lgsm/functions/update_ts3.sh +++ b/lgsm/functions/update_ts3.sh @@ -150,35 +150,39 @@ fn_update_ts3_compare() { fn_script_log_info "Remote build: ${remotebuild}" fn_script_log_info "${localbuild} > ${remotebuild}" - unset updateonstart - check_status.sh - # If server stopped. - if [ "${status}" == "0" ]; then - exitbypass=1 - fn_update_ts3_dl - if [ "${requirerestart}" == "1" ]; then + if [ "${commandname}" == "UPDATE" ]; then + unset updateonstart + check_status.sh + # If server stopped. + if [ "${status}" == "0" ]; then exitbypass=1 - command_start.sh - fn_firstcommand_reset + fn_update_ts3_dl + if [ "${requirerestart}" == "1" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + fi + # If server started. + else + fn_print_restart_warning exitbypass=1 command_stop.sh fn_firstcommand_reset + exitbypass=1 + fn_update_ts3_dl + exitbypass=1 + command_start.sh + fn_firstcommand_reset fi - # If server started. - else - fn_print_restart_warning - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - exitbypass=1 - fn_update_ts3_dl - exitbypass=1 - command_start.sh - fn_firstcommand_reset + unset exitbypass + date +%s > "${lockdir}/lastupdate.lock" + alert="update" + elif [ "${commandname}" == "CHECK-UPDATE" ]; then + alert="check-update" fi - unset exitbypass - date +%s > "${lockdir}/lastupdate.lock" - alert="update" alert.sh else fn_print_ok_nl "Checking for update: ${remotelocation}" From b291066c2c34af0f784ca0b86c4c6bd50915512f Mon Sep 17 00:00:00 2001 From: Frisasky Date: Fri, 23 Sep 2022 03:58:25 +0800 Subject: [PATCH 025/374] fix(zmr): Update to beta 6 (#3965) * Update install_server_files.sh * Update install_server_files.sh --- lgsm/functions/install_server_files.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index fe9353ad8..a81b75aea 100755 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -191,12 +191,12 @@ fn_install_server_files() { force="noforce" md5="93705e165550c97484678236749198a4" elif [ "${shortname}" == "zmr" ]; then - remote_fileurl="http://linuxgsm.download/ZombieMasterReborn/zombie_master_reborn_b5_2.tar.xz" + remote_fileurl="http://linuxgsm.download/ZombieMasterReborn/zombie_master_reborn_b6_1.tar.xz" local_filedir="${tmpdir}" - local_filename="zombie_master_reborn_b5_2.tar.xz" + local_filename="zombie_master_reborn_b6_1.tar.xz" chmodx="nochmodx" run="norun" force="noforce" - md5="4b9b9832e863d03981a40c26065792a6" + md5="0188ae86dbc9376f11ae3032dba2d665" fi fn_fetch_file "${remote_fileurl}" "" "" "" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" fn_dl_extract "${local_filedir}" "${local_filename}" "${serverfiles}" From d3cdf63d9431d23cdda29824197db60a0ee2f892 Mon Sep 17 00:00:00 2001 From: Xenorio Date: Thu, 22 Sep 2022 22:03:05 +0200 Subject: [PATCH 026/374] fix(wmcserver): fix not being able to read query port (#3982) queryport was being overwritten with rconpassword or "NOT SET" --- lgsm/functions/info_game.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index 3a62c67dd..7efc6008f 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -2264,7 +2264,7 @@ fn_info_game_wmc() { # Not set servername=${servername:-"NOT SET"} - queryport=${rconpassword:-"NOT SET"} + queryport=${queryport:-"25577"} maxplayers=${maxplayers:-"0"} configip=${configip:-"0.0.0.0"} fi From bf1fc1833b752bc574f80d69fbf0ef6d886032c0 Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 22 Sep 2022 22:26:19 +0200 Subject: [PATCH 027/374] feat(newserver): add Velocity Proxy (#3904) --- .../config-lgsm/vpmcserver/_default.cfg | 179 ++++++++++++++++++ lgsm/data/almalinux-8.csv | 1 + lgsm/data/centos-8.csv | 1 + lgsm/data/debian-10.csv | 1 + lgsm/data/debian-11.csv | 1 + lgsm/data/rhel-7.csv | 1 + lgsm/data/rhel-8.csv | 1 + lgsm/data/rocky-8.csv | 1 + lgsm/data/serverlist.csv | 1 + lgsm/data/ubuntu-18.04.csv | 1 + lgsm/data/ubuntu-20.04.csv | 1 + lgsm/data/ubuntu-21.04.csv | 1 + lgsm/data/ubuntu-21.10.csv | 1 + lgsm/data/ubuntu-22.04.csv | 1 + lgsm/functions/command_stop.sh | 2 + lgsm/functions/command_update.sh | 2 +- lgsm/functions/info_game.sh | 18 ++ lgsm/functions/info_messages.sh | 11 +- lgsm/functions/install_server_files.sh | 2 +- lgsm/functions/update_papermc.sh | 2 + 20 files changed, 226 insertions(+), 3 deletions(-) create mode 100644 lgsm/config-default/config-lgsm/vpmcserver/_default.cfg diff --git a/lgsm/config-default/config-lgsm/vpmcserver/_default.cfg b/lgsm/config-default/config-lgsm/vpmcserver/_default.cfg new file mode 100644 index 000000000..6755e0e51 --- /dev/null +++ b/lgsm/config-default/config-lgsm/vpmcserver/_default.cfg @@ -0,0 +1,179 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! +# Copy settings from here and use them in either: +# common.cfg - applies settings to every instance. +# [instance].cfg - applies settings to a specific instance. + +#### Game Server Settings #### + +## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters +javaram="1024" # -Xmx$1024M + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="" + +## Release Settings | https://docs.linuxgsm.com/game-servers/minecraft#release-settings +# Version (latest|3.1.1) +mcversion="latest" + +#### LinuxGSM Settings #### + +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + +## Notification Alerts +# (on|off) + +# Display IP | https://docs.linuxgsm.com/alerts#display-ip +displayip="" + +# More info | https://docs.linuxgsm.com/alerts#more-info +postalert="off" + +# Discord Alerts | https://docs.linuxgsm.com/alerts/discord +discordalert="off" +discordwebhook="webhook" + +# Email Alerts | https://docs.linuxgsm.com/alerts/email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + +# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun +mailgunalert="off" +mailgunapiregion="us" +mailguntoken="accesstoken" +mailgundomain="example.com" +mailgunemailfrom="alert@example.com" +mailgunemail="email@myemail.com" + +# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover +pushoveralert="off" +pushovertoken="accesstoken" +pushoveruserkey="userkey" + +# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat +rocketchatalert="off" +rocketchatwebhook="webhook" +rocketchattoken="" + +# Slack Alerts | https://docs.linuxgsm.com/alerts/slack +slackalert="off" +slackwebhook="webhook" + +# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram +# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +telegramapi="api.telegram.org" +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +curlcustomstring="" + +## Updating | https://docs.linuxgsm.com/commands/update +updateonstart="off" + +## Backup | https://docs.linuxgsm.com/commands/backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://docs.linuxgsm.com/features/logging +consolelogging="on" +logdays="7" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="1" + +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors +ansi="on" + +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time +sleeptime="0.5" + +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode +# 1: tmux kill +# 2: CTRL+c +# 3: quit +# 4: quit 120s +# 5: stop +# 6: q +# 7: exit +# 8: 7 Days to Die +# 9: GoldSrc +# 10: Avorion +# 11: end +# 12: shutdown +stopmode="12" + +## Query mode +# 1: session only +# 2: gamedig (gsquery fallback) +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="minecraft" + +## Console type +consoleverbose="yes" +consoleinteract="yes" + +## Game Server Details +# Do not edit +gamename="Velocity Proxy" +engine="lwjgl2" +glibc="null" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}" +executabledir="${serverfiles}" +preexecutable="java -Xmx${javaram}M -XX:+UseG1GC -XX:G1HeapRegionSize=4M -XX:+UnlockExperimentalVMOptions -XX:+ParallelRefProcEnabled -XX:+AlwaysPreTouch -XX:MaxInlineLevel=15 -jar" +executable="./velocity.jar" +servercfgdir="${systemdir}" +servercfg="velocity.toml" +servercfgdefault="velocity.toml" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index 7c4eb59f5..9910acb8d 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -119,6 +119,7 @@ ut99 vh,glibc-devel vs vints,mono-complete +vpmc,java-11-openjdk wet wf wmc,java-11-openjdk diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index 8ece428a5..7d3095ba4 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -118,6 +118,7 @@ ut99 vh,glibc-devel vs vints,mono-complete +vpmc,java-11-openjdk wet wf wmc,java-11-openjdk diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index 30ca2df10..443c35cf0 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -119,6 +119,7 @@ ut99 vh,libc6-dev vs vints,mono-complete +vpmc,openjdk-11-jre wet wf wmc,openjdk-11-jre diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index f96d48862..58db53762 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -119,6 +119,7 @@ ut99 vh,libc6-dev vs vints,mono-complete +vpmc,openjdk-11-jre wet wf wmc,openjdk-17-jre diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index e9801a845..968c4dc98 100644 --- a/lgsm/data/rhel-7.csv +++ b/lgsm/data/rhel-7.csv @@ -119,6 +119,7 @@ ut99 vh,glibc-devel vs vints,mono-complete +vpmc,java-11-openjdk wet wf wmc,java-11-openjdk diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index 88b1babba..002db75fd 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -119,6 +119,7 @@ ut99 vh,glibc-devel vs vints,mono-complete +vpmc,java-11-openjdk wet wf wmc,java-11-openjdk diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index 7c4eb59f5..9910acb8d 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -119,6 +119,7 @@ ut99 vh,glibc-devel vs vints,mono-complete +vpmc,java-11-openjdk wet wf wmc,java-11-openjdk diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index f5463cd84..4c80f538a 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -117,6 +117,7 @@ ut3,ut3server,Unreal Tournament 3 ut99,ut99server,Unreal Tournament 99 vh,vhserver,Valheim vints,vintsserver,Vintage Story +vpmc,vpmcserver,Velocity Proxy MC vs,vsserver,Vampire Slayer wet,wetserver,Wolfenstein: Enemy Territory wf,wfserver,Warfork diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index 30ca2df10..443c35cf0 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -119,6 +119,7 @@ ut99 vh,libc6-dev vs vints,mono-complete +vpmc,openjdk-11-jre wet wf wmc,openjdk-11-jre diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index 6f9bec4c0..49f64348d 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -119,6 +119,7 @@ ut99 vh,libc6-dev vs vints,mono-complete +vpmc,openjdk-11-jre wet wf wmc,openjdk-17-jre diff --git a/lgsm/data/ubuntu-21.04.csv b/lgsm/data/ubuntu-21.04.csv index 678c06f28..f1b28acd2 100644 --- a/lgsm/data/ubuntu-21.04.csv +++ b/lgsm/data/ubuntu-21.04.csv @@ -119,6 +119,7 @@ ut99 vh,libc6-dev vs vints,mono-complete +vpmc,openjdk-11-jre wet wf wmc,openjdk-17-jre diff --git a/lgsm/data/ubuntu-21.10.csv b/lgsm/data/ubuntu-21.10.csv index f99d2f46d..1ced64fc7 100644 --- a/lgsm/data/ubuntu-21.10.csv +++ b/lgsm/data/ubuntu-21.10.csv @@ -117,6 +117,7 @@ ut99 vh,libc6-dev vs vints,mono-complete +vpmc,openjdk-11-jre wet wf wmc,openjdk-17-jre diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index 18af1192f..dd567bf7b 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -117,6 +117,7 @@ ut99 vh,libc6-dev vs vints,mono-complete +vpmc,openjdk-11-jre wet wf wmc,openjdk-17-jre diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index b87185402..d18ef7c23 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -231,6 +231,8 @@ fn_stop_graceful_select() { fn_stop_graceful_avorion elif [ "${stopmode}" == "11" ]; then fn_stop_graceful_cmd "end" 30 + elif [ "${stopmode}" == "12" ]; then + fn_stop_graceful_cmd "shutdown" 30 fi } diff --git a/lgsm/functions/command_update.sh b/lgsm/functions/command_update.sh index 5b9858e84..07b65e5fa 100755 --- a/lgsm/functions/command_update.sh +++ b/lgsm/functions/command_update.sh @@ -21,7 +21,7 @@ elif [ "${shortname}" == "mc" ]; then update_minecraft.sh elif [ "${shortname}" == "mcb" ]; then update_minecraft_bedrock.sh -elif [ "${shortname}" == "pmc" ] || [ "${shortname}" == "wmc" ]; then +elif [ "${shortname}" == "pmc" ] || [ "${shortname}" == "vpmc" ] || [ "${shortname}" == "wmc" ]; then update_papermc.sh elif [ "${shortname}" == "mumble" ]; then update_mumble.sh diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index 7efc6008f..dcec74b31 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -2190,6 +2190,22 @@ fn_info_game_vints() { configip=${configip:-"0.0.0.0"} } +fn_info_game_vpmc() { + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + configip="0.0.0.0" + port="25577" + else + servername=$(sed -nr 's/^motd\s*=\s*"(.*)"/\1/p' "${servercfgfullpath}") + bindaddress=$(sed -nr 's/^bind\s*=\s*"([0-9.:]+)"/\1/p' "${servercfgfullpath}") + configip=$(echo "${bindaddress}" | cut -d ':' -f 1) + port=$(echo "${bindaddress}" | cut -d ':' -f 2) + + servername=${servername:-"NOT SET"} + fi + queryport=${port:-"25577"} +} + fn_info_game_wet() { # Config if [ ! -f "${servercfgfullpath}" ]; then @@ -2456,6 +2472,8 @@ elif [ "${shortname}" == "vh" ]; then fn_info_game_vh elif [ "${shortname}" == "vints" ]; then fn_info_game_vints +elif [ "${shortname}" == "vpmc" ]; then + fn_info_game_vpmc elif [ "${shortname}" == "wet" ]; then fn_info_game_wet elif [ "${shortname}" == "wf" ]; then diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index cfad349ac..a216327c9 100755 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -687,7 +687,7 @@ fn_info_message_ports() { echo -e "ss -tuplwn | grep AvorionServer" elif [ "${shortname}" == "bf1942" ]; then echo -e "ss -tuplwn | grep bf1942_lnxded" - elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ] || [ "${shortname}" == "rw" ] || [ "${shortname}" == "wmc" ]; then + elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ] || [ "${shortname}" == "rw" ] || [ "${shortname}" == "vpmc" ] || [ "${shortname}" == "wmc" ]; then echo -e "ss -tuplwn | grep java" elif [ "${shortname}" == "terraria" ]; then echo -e "ss -tuplwn | grep Main" @@ -1610,6 +1610,13 @@ fn_info_message_vints() { } | column -s $'\t' -t } +fn_info_message_vpmc() { + { + fn_port "header" + fn_port "Game" port tcp + } | column -s $'\t' -t +} + fn_info_message_wet() { { fn_port "header" @@ -1798,6 +1805,8 @@ fn_info_message_select_engine() { fn_info_message_ut2k4 elif [ "${shortname}" == "ut3" ]; then fn_info_message_ut3 + elif [ "${shortname}" == "vpmc" ]; then + fn_info_message_vpmc elif [ "${shortname}" == "wet" ]; then fn_info_message_wet elif [ "${shortname}" == "wf" ]; then diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index a81b75aea..c9faf643a 100755 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -222,7 +222,7 @@ elif [ "${shortname}" == "mcb" ]; then elif [ "${shortname}" == "pmc" ]; then install_eula.sh update_papermc.sh -elif [ "${shortname}" == "wmc" ]; then +elif [ "${shortname}" == "wmc" ]||[ "${shortname}" == "vpmc" ]; then update_papermc.sh elif [ "${shortname}" == "mumble" ]; then update_mumble.sh diff --git a/lgsm/functions/update_papermc.sh b/lgsm/functions/update_papermc.sh index 881e912d3..1f334549c 100644 --- a/lgsm/functions/update_papermc.sh +++ b/lgsm/functions/update_papermc.sh @@ -122,6 +122,8 @@ remotelocation="papermc.io" if [ "${shortname}" == "pmc" ]; then paperproject="paper" +elif [ "${shortname}" == "vpmc" ]; then + paperproject="velocity" elif [ "${shortname}" == "wmc" ]; then paperproject="waterfall" fi From 4c52885ae32b87cca5359aafef9c99e481f856b0 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 5 Oct 2022 21:04:53 +0100 Subject: [PATCH 028/374] Release v22.2.0 --- lgsm/functions/core_functions.sh | 2 +- linuxgsm.sh | 2 +- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 03deac001..20d26de05 100755 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -8,7 +8,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v22.1.0" +modulesversion="v22.2.0" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index 6a4209b32..01c71d68c 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v22.1.0" +version="v22.2.0" shortname="core" gameservername="core" commandname="CORE" diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index 9a27daf91..0a7c0893f 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v22.1.0" +version="v22.2.0" shortname="fctr" gameservername="fctrserver" commandname="CORE" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index c86e6dbb9..58e8da188 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v22.1.0" +version="v22.2.0" shortname="jc2" gameservername="jc2server" commandname="CORE" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 36f3349cd..3fbbc3bf3 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v22.1.0" +version="v22.2.0" shortname="mc" gameservername="mcserver" commandname="CORE" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 466753e3d..d4857765e 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v22.1.0" +version="v22.2.0" shortname="ts3" gameservername="ts3server" commandname="CORE" From 501798943e8613159229fc05a98f1cc0d59f76d1 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 19 Oct 2022 14:26:14 +0100 Subject: [PATCH 029/374] update actions --- .github/workflows/codacy-analysis.yml | 61 +++++++++++++++++++++++++++ .github/workflows/linter.yml | 55 ------------------------ .github/workflows/super-linter.yml | 29 +++++++++++++ 3 files changed, 90 insertions(+), 55 deletions(-) create mode 100644 .github/workflows/codacy-analysis.yml delete mode 100644 .github/workflows/linter.yml create mode 100644 .github/workflows/super-linter.yml diff --git a/.github/workflows/codacy-analysis.yml b/.github/workflows/codacy-analysis.yml new file mode 100644 index 000000000..473255efd --- /dev/null +++ b/.github/workflows/codacy-analysis.yml @@ -0,0 +1,61 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +# This workflow checks out code, performs a Codacy security scan +# and integrates the results with the +# GitHub Advanced Security code scanning feature. For more information on +# the Codacy security scan action usage and parameters, see +# https://github.com/codacy/codacy-analysis-cli-action. +# For more information on Codacy Analysis CLI in general, see +# https://github.com/codacy/codacy-analysis-cli. + +name: Codacy Security Scan + +on: + push: + branches: ["main","master"] + pull_request: + # The branches below must be a subset of the branches above + branches: ["main","master"] + schedule: + - cron: "28 22 * * 4" + +permissions: + contents: read + +jobs: + codacy-security-scan: + permissions: + contents: read # for actions/checkout to fetch code + security-events: write # for github/codeql-action/upload-sarif to upload SARIF results + actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status + name: Codacy Security Scan + runs-on: ubuntu-latest + steps: + # Checkout the repository to the GitHub Actions runner + - name: Checkout code + uses: actions/checkout@v3 + + # Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis + - name: Run Codacy Analysis CLI + uses: codacy/codacy-analysis-cli-action@v4.2.0 + with: + # Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository + # You can also omit the token and run the tools that support default configurations + project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} + verbose: true + output: results.sarif + format: sarif + # Adjust severity of non-security issues + gh-code-scanning-compat: true + # Force 0 exit code to allow SARIF file generation + # This will handover control about PR rejection to the GitHub side + max-allowed-issues: 2147483647 + + # Upload the SARIF file generated in the previous step + - name: Upload SARIF results file + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: results.sarif diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml deleted file mode 100644 index 7f34c51b6..000000000 --- a/.github/workflows/linter.yml +++ /dev/null @@ -1,55 +0,0 @@ ---- -################################# -################################# -## Super Linter GitHub Actions ## -################################# -################################# -name: Lint Code Base - -# -# Documentation: -# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions -# - -############################# -# Start the job on all push # -############################# -on: - push: - branches-ignore: [master, main] - # Remove the line above to run when pushing to master - pull_request: - -############### -# Set the Job # -############### -jobs: - build: - # Name the Job - name: Lint Code Base - # Set the agent to run on - runs-on: ubuntu-latest - - ################## - # Load all steps # - ################## - steps: - ########################## - # Checkout the code base # - ########################## - - name: Checkout Code - uses: actions/checkout@v2 - with: - # Full git history is needed to get a proper list of changed files within `super-linter` - fetch-depth: 0 - - ################################ - # Run Linter against code base # - ################################ - - name: Lint Code Base - uses: github/super-linter@v4 - env: - VALIDATE_ALL_CODEBASE: false - # Change to 'master' if your main branch differs - DEFAULT_BRANCH: main - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml new file mode 100644 index 000000000..4fb36f74e --- /dev/null +++ b/.github/workflows/super-linter.yml @@ -0,0 +1,29 @@ +# This workflow executes several linters on changed files based on languages used in your code base whenever +# you push a code or open a pull request. +# +# You can adjust the behavior by modifying this file. +# For more information, see: +# https://github.com/github/super-linter +name: Lint Code Base + +on: + push: + branches: ["main","master"] + pull_request: + branches: ["main","master"] +jobs: + run-lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + # Full git history is needed to get a proper list of changed files within `super-linter` + fetch-depth: 0 + + - name: Lint Code Base + uses: github/super-linter@v4 + env: + VALIDATE_ALL_CODEBASE: false + DEFAULT_BRANCH: "main" + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 2257be4a8ec7dfd39d7a11305af8d7fe3e54302c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 22 Oct 2022 22:40:35 +0100 Subject: [PATCH 030/374] fix: add docker compatibility fix: allow find to search in symlinks --- lgsm/functions/check.sh | 4 ++-- lgsm/functions/check_deps.sh | 2 +- lgsm/functions/check_permissions.sh | 2 +- lgsm/functions/check_root.sh | 2 +- lgsm/functions/command_install.sh | 2 +- lgsm/functions/core_exit.sh | 2 +- lgsm/functions/core_steamcmd.sh | 6 +++--- linuxgsm.sh | 24 ++++++++++++------------ 8 files changed, 22 insertions(+), 22 deletions(-) diff --git a/lgsm/functions/check.sh b/lgsm/functions/check.sh index 6f9859822..239a24140 100755 --- a/lgsm/functions/check.sh +++ b/lgsm/functions/check.sh @@ -21,7 +21,7 @@ fi check_tmuxception.sh -if [ "$(whoami)" != "root" ]; then +if [ "$(whoami)" != "root" ] || [ -f /.dockerenv ]; then if [ "${commandname}" != "MONITOR" ]; then check_permissions.sh fi @@ -38,7 +38,7 @@ for allowed_command in "${allowed_commands_array[@]}"; do fi done -if [ "$(whoami)" != "root" ]; then +if [ "$(whoami)" != "root" ] || [ -f /.dockerenv ]; then allowed_commands_array=(DEBUG START INSTALL) for allowed_command in "${allowed_commands_array[@]}"; do if [ "${allowed_command}" == "${commandname}" ]; then diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh index ff4863e2c..194f5541e 100755 --- a/lgsm/functions/check_deps.sh +++ b/lgsm/functions/check_deps.sh @@ -301,7 +301,7 @@ fn_deps_detector() { } if [ "${commandname}" == "INSTALL" ]; then - if [ "$(whoami)" == "root" ]; then + if [ "$(whoami)" == "root" ] && [ ! -f /.dockerenv ]; then echo -e "" echo -e "${lightyellow}Checking Dependencies as root${default}" echo -e "=================================" diff --git a/lgsm/functions/check_permissions.sh b/lgsm/functions/check_permissions.sh index 92a76600b..46642f7fb 100755 --- a/lgsm/functions/check_permissions.sh +++ b/lgsm/functions/check_permissions.sh @@ -226,7 +226,7 @@ fn_sys_perm_error_process() { # Run perm error detect & fix/alert functions on /sys directories. ## Run checks. -if [ "$(whoami)" != "root" ]; then +if [ "$(whoami)" != "root" ] || [ -f /.dockerenv ]; then fn_check_ownership fn_check_permissions if [ "${commandname}" == "START" ]; then diff --git a/lgsm/functions/check_root.sh b/lgsm/functions/check_root.sh index 13942cbd4..dab033148 100755 --- a/lgsm/functions/check_root.sh +++ b/lgsm/functions/check_root.sh @@ -7,7 +7,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -if [ "$(whoami)" = "root" ]; then +if [ "$(whoami)" == "root" ] && [ ! -f /.dockerenv ]; then if [ "${commandname}" != "INSTALL" ]; then fn_print_fail_nl "Do NOT run this script as root!" if [ -d "${lgsmlogdir}" ]; then diff --git a/lgsm/functions/command_install.sh b/lgsm/functions/command_install.sh index e56890b4d..19dc59c7e 100755 --- a/lgsm/functions/command_install.sh +++ b/lgsm/functions/command_install.sh @@ -11,7 +11,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set check.sh -if [ "$(whoami)" = "root" ]; then +if [ "$(whoami)" == "root" ] && [ ! -f /.dockerenv ]; then check_deps.sh else install_header.sh diff --git a/lgsm/functions/core_exit.sh b/lgsm/functions/core_exit.sh index 93c37dfc7..2d2f5b8fa 100755 --- a/lgsm/functions/core_exit.sh +++ b/lgsm/functions/core_exit.sh @@ -18,7 +18,7 @@ fn_exit_dev_debug() { } # If running dependency check as root will remove any files that belong to root user. -if [ "$(whoami)" == "root" ]; then +if [ "$(whoami)" == "root" ] && [ ! -f /.dockerenv ]; then find "${lgsmdir}"/ -group root -prune -exec rm -rf {} + > /dev/null 2>&1 find "${logdir}"/ -group root -prune -exec rm -rf {} + > /dev/null 2>&1 fi diff --git a/lgsm/functions/core_steamcmd.sh b/lgsm/functions/core_steamcmd.sh index 92c14136a..453a8b77e 100755 --- a/lgsm/functions/core_steamcmd.sh +++ b/lgsm/functions/core_steamcmd.sh @@ -174,7 +174,7 @@ fn_update_steamcmd_remotebuild() { fi # Removes appinfo.vdf as a fix for not always getting up to date version info from SteamCMD. - if [ "$(find "${HOME}" -type f -name "appinfo.vdf" | wc -l)" -ne "0" ]; then + if [ "$(find -L "${HOME}" -type f -name "appinfo.vdf" | wc -l)" -ne "0" ]; then find "${HOME}" -type f -name "appinfo.vdf" -exec rm -f {} \; fi @@ -281,8 +281,8 @@ fn_update_steamcmd_compare() { } fn_appmanifest_info() { - appmanifestfile=$(find "${serverfiles}" -type f -name "appmanifest_${appid}.acf") - appmanifestfilewc=$(find "${serverfiles}" -type f -name "appmanifest_${appid}.acf" | wc -l) + appmanifestfile=$(find -L "${serverfiles}" -type f -name "appmanifest_${appid}.acf") + appmanifestfilewc=$(find -L "${serverfiles}" -type f -name "appmanifest_${appid}.acf" | wc -l) } fn_appmanifest_check() { diff --git a/linuxgsm.sh b/linuxgsm.sh index 01c71d68c..0748b2d86 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -15,7 +15,7 @@ # Debugging if [ -f ".dev-debug" ]; then - exec 5> dev-debug.log + exec 5>dev-debug.log BASH_XTRACEFD="5" set -x fi @@ -52,7 +52,7 @@ userinput2="${2}" [ -n "${LGSM_GITHUBBRANCH}" ] && githubbranch="${LGSM_GITHUBBRANCH}" || githubbranch="master" # Check that curl is installed before doing anything -if [ ! "$(command -v curl 2> /dev/null)" ]; then +if [ ! "$(command -v curl 2>/dev/null)" ]; then echo -e "[ FAIL ] Curl is not installed" exit 1 fi @@ -213,7 +213,7 @@ fn_install_menu_bash() { while read -r line || [[ -n "${line}" ]]; do var=$(echo -e "${line}" | awk -F "," '{print $2 " - " $3}') menu_options+=("${var}") - done < "${options}" + done <"${options}" menu_options+=("Cancel") select option in "${menu_options[@]}"; do if [ "${option}" ] && [ "${option}" != "Cancel" ]; then @@ -239,7 +239,7 @@ fn_install_menu_whiptail() { key=$(echo -e "${line}" | awk -F "," '{print $3}') val=$(echo -e "${line}" | awk -F "," '{print $2}') menu_options+=("${val//\"/}" "${key//\"/}") - done < "${options}" + done <"${options}" OPTION=$(${menucmd} --title "${title}" --menu "${caption}" "${height}" "${width}" "${menuheight}" "${menu_options[@]}" 3>&1 1>&2 2>&3) if [ $? == 0 ]; then eval "$resultvar=\"${OPTION}\"" @@ -263,12 +263,12 @@ fn_install_menu() { fi done case "$(basename "${menucmd}")" in - whiptail | dialog) - fn_install_menu_whiptail "${menucmd}" selection "${title}" "${caption}" "${options}" 40 80 30 - ;; - *) - fn_install_menu_bash selection "${title}" "${caption}" "${options}" - ;; + whiptail | dialog) + fn_install_menu_whiptail "${menucmd}" selection "${title}" "${caption}" "${options}" 40 80 30 + ;; + *) + fn_install_menu_bash selection "${title}" "${caption}" "${options}" + ;; esac eval "$resultvar=\"${selection}\"" } @@ -321,7 +321,7 @@ fn_install_file() { } # Prevent LinuxGSM from running as root. Except if doing a dependency install. -if [ "$(whoami)" == "root" ]; then +if [ "$(whoami)" == "root" ] && [ ! -f /.dockerenv ]; then if [ "${userinput}" == "install" ] || [ "${userinput}" == "auto-install" ] || [ "${userinput}" == "i" ] || [ "${userinput}" == "ai" ]; then if [ "${shortname}" == "core" ]; then echo -e "[ FAIL ] Do NOT run this script as root!" @@ -351,7 +351,7 @@ if [ "${shortname}" == "core" ]; then } | column -s $'\t' -t | more exit elif [ "${userinput}" == "install" ] || [ "${userinput}" == "i" ]; then - tail -n +1 "${serverlist}" | awk -F "," '{print $1 "," $2 "," $3}' > "${serverlistmenu}" + tail -n +1 "${serverlist}" | awk -F "," '{print $1 "," $2 "," $3}' >"${serverlistmenu}" fn_install_menu result "LinuxGSM" "Select game server to install." "${serverlistmenu}" userinput="${result}" fn_server_info From a6ae012f124ee678a3bc11bb4237676c6f25ffec Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 22 Oct 2022 22:55:22 +0100 Subject: [PATCH 031/374] Release v22.2.1 --- lgsm/functions/core_functions.sh | 2 +- linuxgsm.sh | 2 +- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 20d26de05..4edd50ca7 100755 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -8,7 +8,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v22.2.0" +modulesversion="v22.2.1" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index 0748b2d86..7d9f21d0b 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v22.2.0" +version="v22.2.1" shortname="core" gameservername="core" commandname="CORE" diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index 0a7c0893f..2246bdeb1 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v22.2.0" +version="v22.2.1" shortname="fctr" gameservername="fctrserver" commandname="CORE" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 58e8da188..e408420b8 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v22.2.0" +version="v22.2.1" shortname="jc2" gameservername="jc2server" commandname="CORE" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 3fbbc3bf3..984f522f0 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v22.2.0" +version="v22.2.1" shortname="mc" gameservername="mcserver" commandname="CORE" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index d4857765e..6bc89c9fe 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v22.2.0" +version="v22.2.1" shortname="ts3" gameservername="ts3server" commandname="CORE" From 76392b54a3263dedfae0d5b5b1768a23c135bee0 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 24 Oct 2022 16:14:02 +0100 Subject: [PATCH 032/374] revert: find -L causing infinate loop #4015 --- lgsm/functions/core_steamcmd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/core_steamcmd.sh b/lgsm/functions/core_steamcmd.sh index 453a8b77e..5b95adc81 100755 --- a/lgsm/functions/core_steamcmd.sh +++ b/lgsm/functions/core_steamcmd.sh @@ -174,7 +174,7 @@ fn_update_steamcmd_remotebuild() { fi # Removes appinfo.vdf as a fix for not always getting up to date version info from SteamCMD. - if [ "$(find -L "${HOME}" -type f -name "appinfo.vdf" | wc -l)" -ne "0" ]; then + if [ "$(find "${HOME}" -type f -name "appinfo.vdf" | wc -l)" -ne "0" ]; then find "${HOME}" -type f -name "appinfo.vdf" -exec rm -f {} \; fi From bbf56a04eeb86ae6d7d3d5739775c0f4305c13a1 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 29 Oct 2022 11:21:30 +0100 Subject: [PATCH 033/374] fix: don't run permissions checks when root or docker --- lgsm/functions/check_permissions.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lgsm/functions/check_permissions.sh b/lgsm/functions/check_permissions.sh index 46642f7fb..1091cbc6e 100755 --- a/lgsm/functions/check_permissions.sh +++ b/lgsm/functions/check_permissions.sh @@ -181,7 +181,7 @@ fn_sys_perm_fix_manually_msg() { # Attempt to fix /sys related permission errors if sudo is available, exits otherwise. fn_sys_perm_errors_fix() { - if sudo -n true > /dev/null 2>&1; then + if sudo -n true >/dev/null 2>&1; then fn_print_dots "Automatically fixing /sys permissions" fn_script_log_info "Automatically fixing /sys permissions." if [ "${sysdirpermerror}" == "1" ]; then @@ -223,10 +223,8 @@ fn_sys_perm_error_process() { fi } -# Run perm error detect & fix/alert functions on /sys directories. - -## Run checks. -if [ "$(whoami)" != "root" ] || [ -f /.dockerenv ]; then +## Run permisions checks when not root or docker. +if [ "$(whoami)" != "root" ] && [ ! -f /.dockerenv ]; then fn_check_ownership fn_check_permissions if [ "${commandname}" == "START" ]; then From e5402d41ef94e014015ab84748a96c2dc675e0ac Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 29 Oct 2022 12:14:50 +0100 Subject: [PATCH 034/374] feat: trigger docker image build --- .github/workflows/codacy-analysis.yml | 61 ---------------------- .github/workflows/super-linter.yml | 29 ---------- .github/workflows/trigger_docker_build.yml | 28 ++++++++++ 3 files changed, 28 insertions(+), 90 deletions(-) delete mode 100644 .github/workflows/codacy-analysis.yml delete mode 100644 .github/workflows/super-linter.yml create mode 100644 .github/workflows/trigger_docker_build.yml diff --git a/.github/workflows/codacy-analysis.yml b/.github/workflows/codacy-analysis.yml deleted file mode 100644 index 473255efd..000000000 --- a/.github/workflows/codacy-analysis.yml +++ /dev/null @@ -1,61 +0,0 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - -# This workflow checks out code, performs a Codacy security scan -# and integrates the results with the -# GitHub Advanced Security code scanning feature. For more information on -# the Codacy security scan action usage and parameters, see -# https://github.com/codacy/codacy-analysis-cli-action. -# For more information on Codacy Analysis CLI in general, see -# https://github.com/codacy/codacy-analysis-cli. - -name: Codacy Security Scan - -on: - push: - branches: ["main","master"] - pull_request: - # The branches below must be a subset of the branches above - branches: ["main","master"] - schedule: - - cron: "28 22 * * 4" - -permissions: - contents: read - -jobs: - codacy-security-scan: - permissions: - contents: read # for actions/checkout to fetch code - security-events: write # for github/codeql-action/upload-sarif to upload SARIF results - actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status - name: Codacy Security Scan - runs-on: ubuntu-latest - steps: - # Checkout the repository to the GitHub Actions runner - - name: Checkout code - uses: actions/checkout@v3 - - # Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis - - name: Run Codacy Analysis CLI - uses: codacy/codacy-analysis-cli-action@v4.2.0 - with: - # Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository - # You can also omit the token and run the tools that support default configurations - project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} - verbose: true - output: results.sarif - format: sarif - # Adjust severity of non-security issues - gh-code-scanning-compat: true - # Force 0 exit code to allow SARIF file generation - # This will handover control about PR rejection to the GitHub side - max-allowed-issues: 2147483647 - - # Upload the SARIF file generated in the previous step - - name: Upload SARIF results file - uses: github/codeql-action/upload-sarif@v2 - with: - sarif_file: results.sarif diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml deleted file mode 100644 index 4fb36f74e..000000000 --- a/.github/workflows/super-linter.yml +++ /dev/null @@ -1,29 +0,0 @@ -# This workflow executes several linters on changed files based on languages used in your code base whenever -# you push a code or open a pull request. -# -# You can adjust the behavior by modifying this file. -# For more information, see: -# https://github.com/github/super-linter -name: Lint Code Base - -on: - push: - branches: ["main","master"] - pull_request: - branches: ["main","master"] -jobs: - run-lint: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - # Full git history is needed to get a proper list of changed files within `super-linter` - fetch-depth: 0 - - - name: Lint Code Base - uses: github/super-linter@v4 - env: - VALIDATE_ALL_CODEBASE: false - DEFAULT_BRANCH: "main" - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/trigger_docker_build.yml b/.github/workflows/trigger_docker_build.yml new file mode 100644 index 000000000..0f1055c7d --- /dev/null +++ b/.github/workflows/trigger_docker_build.yml @@ -0,0 +1,28 @@ +name: Trigger Docker Build +on: + push: + branches: + - master + - develop +jobs: + trigger_build_docker-linuxgsm: + name: Trigger Build docker-linuxgsm + runs-on: ubuntu-latest + steps: + - uses: convictional/trigger-workflow-and-wait@v1.3.0 + with: + owner: GameServerManagers + repo: docker-linuxgsm + github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + workflow_file_name: docker-publish.yml + + trigger_build_docker-gameserver: + name: Trigger Build docker-linuxgsm + runs-on: ubuntu-latest + steps: + - uses: convictional/trigger-workflow-and-wait@v1.3.0 + with: + owner: GameServerManagers + repo: docker-gameserver + github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + workflow_file_name: docker-publish.yml From 8a5c28ae9c1ee6c65becdfc3c23a615de0c081fd Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 29 Oct 2022 12:41:17 +0100 Subject: [PATCH 035/374] fix: add execname to check_executable --- lgsm/functions/check_executable.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/lgsm/functions/check_executable.sh b/lgsm/functions/check_executable.sh index 252c6c8d2..d1b5c3efd 100755 --- a/lgsm/functions/check_executable.sh +++ b/lgsm/functions/check_executable.sh @@ -8,6 +8,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Check if executable exists +execname=$(basename "${executable}") if [ ! -f "${executabledir}/${execname}" ]; then fn_print_fail_nl "executable was not found" echo -e "* ${executabledir}/${execname}" From cfbb64137d613789a97f54d24040ecc5632558c3 Mon Sep 17 00:00:00 2001 From: timm0e <11885527+timm0e@users.noreply.github.com> Date: Sun, 30 Oct 2022 02:47:49 +0200 Subject: [PATCH 036/374] feat(csgoserver): add all game mode related cvars to CS:GO LGSM config (#4005) * feat(csgoserver): add parameters for gamemodeflags and skirmishid to lgsm config * docs(csgoserver): add parameter examples for all gamemodes in lgsm config Co-authored-by: Daniel Gibbs --- .../config-lgsm/csgoserver/_default.cfg | 30 ++++++++++++------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg index ae82d2a94..30ba7b8c5 100644 --- a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg @@ -10,17 +10,27 @@ ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters # https://docs.linuxgsm.com/game-servers/counter-strike-global-offensive -# [Game Modes] gametype gamemode mapgroup (you can mix these across all Game Modes except Danger Zone, but use only one) -# Arms Race 1 0 mg_armsrace -# Classic Casual 0 0 mg_casualsigma, mg_casualdelta -# Classic Competitive 0 1 mg_active, mg_reserves, mg_hostage, mg_de_dust2 -# Custom 3 0 -# Deathmatch 1 2 mg_deathmatch -# Demolition 1 1 mg_demolition -# Wingman 0 2 -# Danger Zone 6 0 mg_dz_blacksite (map: dz_blacksite), mg_dz_sirocco (map: dz_sirocco) +# [Game Modes] gametype gamemode gamemodeflags skirmishid mapgroup (you can mix these across all Game Modes except Danger Zone, but use only one) +# Arms Race 1 0 0 0 mg_armsrace +# Boom! Headshot! 1 2 0 6 mg_skirmish_headshots +# Classic Casual 0 0 0 0 mg_casualsigma, mg_casualdelta +# Classic Competitive (Default) 0 1 0 0 mg_active, mg_reserves, mg_hostage, mg_de_dust2, ... +# Classic Competitive (Short Match) 0 1 32 0 mg_active, mg_reserves, mg_hostage, mg_de_dust2, ... +# Danger Zone 6 0 0 0 mg_dz_blacksite (map: dz_blacksite), mg_dz_sirocco (map: dz_sirocco) +# Deathmatch (Default) 1 2 0 0 mg_deathmatch +# Deathmatch (Free For All) 1 2 32 0 mg_deathmatch +# Deathmatch (Team vs Team) 1 2 4 0 mg_deathmatch +# Demolition 1 1 0 0 mg_demolition +# Flying Scoutsman 0 0 0 3 mg_skirmish_flyingscoutsman +# Hunter-Gatherers 1 2 0 7 mg_skirmish_huntergatherers +# Retakes 0 0 0 12 mg_skirmish_retakes +# Stab Stab Zap 0 0 0 1 mg_skirmish_stabstabzap +# Trigger Discipline 0 0 0 4 mg_skirmish_triggerdiscipline +# Wingman 0 2 0 0 mg_de_prime, mg_de_blagai, mg_de_vertigo, mg_de_inferno, mg_de_overpass, mg_de_cbble, mg_de_train, mg_de_shortnuke, mg_de_shortdust, mg_de_lake gametype="0" gamemode="0" +gamemodeflags="0" +skirmishid="0" mapgroup="mg_active" ip="0.0.0.0" port="27015" @@ -43,7 +53,7 @@ wscollectionid="" wsstartmap="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game csgo -usercon -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} -tickrate ${tickrate} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers_override ${maxplayers} +mapgroup ${mapgroup} +game_type ${gametype} +game_mode ${gamemode} +host_workshop_collection ${wscollectionid} +workshop_start_map ${wsstartmap} -authkey ${wsapikey} -nobreakpad" +startparameters="-game csgo -usercon -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} -tickrate ${tickrate} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers_override ${maxplayers} +mapgroup ${mapgroup} +game_type ${gametype} +game_mode ${gamemode} +sv_game_mode_flags ${gamemodeflags} +sv_skirmish_id ${skirmishid} +host_workshop_collection ${wscollectionid} +workshop_start_map ${wsstartmap} -authkey ${wsapikey} -nobreakpad" #### LinuxGSM Settings #### From 8dc7861c630c52d530f290c4f927c1073f42eac8 Mon Sep 17 00:00:00 2001 From: Christian Date: Sun, 30 Oct 2022 02:52:16 +0200 Subject: [PATCH 037/374] fix(bt): add convertion of the startscript to LF (#4008) Co-authored-by: Daniel Gibbs --- lgsm/data/almalinux-8.csv | 2 +- lgsm/data/centos-7.csv | 2 +- lgsm/data/centos-8.csv | 2 +- lgsm/data/debian-10.csv | 2 +- lgsm/data/debian-11.csv | 2 +- lgsm/data/debian-9.csv | 2 +- lgsm/data/rocky-8.csv | 2 +- lgsm/data/ubuntu-16.04.csv | 2 +- lgsm/data/ubuntu-18.04.csv | 2 +- lgsm/data/ubuntu-20.04.csv | 2 +- lgsm/data/ubuntu-21.04.csv | 2 +- lgsm/data/ubuntu-22.04.csv | 2 +- lgsm/functions/fix_bt.sh | 8 ++++++++ 13 files changed, 20 insertions(+), 12 deletions(-) diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index 9910acb8d..d00fcd887 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -15,7 +15,7 @@ bfv,compat-libstdc++-33.i686,glibc.i686 bmdm,ncurses-libs.i686 bo bs -bt,libicu +bt,libicu,dos2unix bt1944 cc cd diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index 3d4b0a366..560740dd5 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -15,7 +15,7 @@ bfv,compat-libstdc++-33.i686,glibc.i686 bmdm,ncurses-libs.i686 bo bs -bt,libicu +bt,libicu,dos2unix bt1944 cc cd diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index 7d3095ba4..8ef35fa03 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -15,7 +15,7 @@ bfv,compat-libstdc++-33.i686,glibc.i686 bmdm,ncurses-libs.i686 bo bs -bt,libicu +bt,libicu,dos2unix bt1944 cc cd diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index 443c35cf0..036eb625c 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -15,7 +15,7 @@ bfv,libncurses5:i386,libstdc++5:i386 bmdm,libncurses5:i386 bo bs -bt,libicu-dev +bt,libicu-dev,dos2unix bt1944 cc cd diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index 58db53762..468990c5f 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -15,7 +15,7 @@ bfv,libncurses5:i386,libstdc++5:i386 bmdm,libncurses5:i386 bo bs -bt,libicu-dev +bt,libicu-dev,dos2unix bt1944 cc cd diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index fe55eb260..69773506f 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -15,7 +15,7 @@ bfv,libncurses5:i386,libstdc++5:i386 bmdm,libncurses5:i386 bo bs -bt,libicu-dev +bt,libicu-dev,dos2unix bt1944 cc cd diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index 9910acb8d..d00fcd887 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -15,7 +15,7 @@ bfv,compat-libstdc++-33.i686,glibc.i686 bmdm,ncurses-libs.i686 bo bs -bt,libicu +bt,libicu,dos2unix bt1944 cc cd diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index 1b23b1836..8dc3bd77a 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -14,7 +14,7 @@ bfv,libncurses5:i386,libstdc++5:i386 bmdm,libncurses5:i386 bo bs -bt,libicu-dev +bt,libicu-dev,dos2unix bt1944 cc cd diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index 443c35cf0..036eb625c 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -15,7 +15,7 @@ bfv,libncurses5:i386,libstdc++5:i386 bmdm,libncurses5:i386 bo bs -bt,libicu-dev +bt,libicu-dev,dos2unix bt1944 cc cd diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index 49f64348d..9f984bde9 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -15,7 +15,7 @@ bfv,libncurses5:i386,libstdc++5:i386 bmdm,libncurses5:i386 bo bs -bt,libicu-dev +bt,libicu-dev,dos2unix bt1944 cc cd diff --git a/lgsm/data/ubuntu-21.04.csv b/lgsm/data/ubuntu-21.04.csv index f1b28acd2..aabfa98ef 100644 --- a/lgsm/data/ubuntu-21.04.csv +++ b/lgsm/data/ubuntu-21.04.csv @@ -15,7 +15,7 @@ bfv,libncurses5:i386,libstdc++5:i386 bmdm,libncurses5:i386 bo bs -bt,libicu-dev +bt,libicu-dev,dos2unix bt1944 cc cd diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index dd567bf7b..e6b1e33a6 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -15,7 +15,7 @@ bfv,libncurses5:i386,libstdc++5:i386 bmdm,libncurses5:i386 bo bs -bt,libicu-dev +bt,libicu-dev,dos2unix bt1944 cc cmw diff --git a/lgsm/functions/fix_bt.sh b/lgsm/functions/fix_bt.sh index 094c2617c..07fd61ce5 100755 --- a/lgsm/functions/fix_bt.sh +++ b/lgsm/functions/fix_bt.sh @@ -14,3 +14,11 @@ if [ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Daedalic Entertainment GmbH/ mkdir -p "${XDG_DATA_HOME:="${HOME}/.local/share"}/Daedalic Entertainment GmbH/Barotrauma" fn_fix_msg_end fi + +# check if startscript is with windows line endings and reformat it +if file -b "${serverfiles}${executable:1}" | grep -q CRLF; then + fixname="Convert ${executable:2} to unix file format" + fn_fix_msg_start + dos2unix -q "${serverfiles}${executable:1}" + fn_fix_msg_end +fi From 5bf35975b807d6fc5f737d3962c0d0264e5a0534 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 30 Oct 2022 01:52:44 +0100 Subject: [PATCH 038/374] build(deps): bump release-drafter/release-drafter from 5.21.0 to 5.21.1 (#4006) Bumps [release-drafter/release-drafter](https://github.com/release-drafter/release-drafter) from 5.21.0 to 5.21.1. - [Release notes](https://github.com/release-drafter/release-drafter/releases) - [Commits](https://github.com/release-drafter/release-drafter/compare/v5.21.0...v5.21.1) --- updated-dependencies: - dependency-name: release-drafter/release-drafter dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/create-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index ad5a88a7d..e43f58c51 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest steps: # Drafts your next Release notes as Pull Requests are merged into "master" - - uses: release-drafter/release-drafter@v5.21.0 + - uses: release-drafter/release-drafter@v5.21.1 with: config-name: release-drafter.yml env: From 930c7c8cac21de9fbf4e108e2324aa79c35b08c7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 30 Oct 2022 01:52:55 +0100 Subject: [PATCH 039/374] build(deps): bump webfactory/ssh-agent from 0.5.4 to 0.7.0 (#4009) Bumps [webfactory/ssh-agent](https://github.com/webfactory/ssh-agent) from 0.5.4 to 0.7.0. - [Release notes](https://github.com/webfactory/ssh-agent/releases) - [Changelog](https://github.com/webfactory/ssh-agent/blob/master/CHANGELOG.md) - [Commits](https://github.com/webfactory/ssh-agent/compare/v0.5.4...v0.7.0) --- updated-dependencies: - dependency-name: webfactory/ssh-agent dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/git-sync.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/git-sync.yml b/.github/workflows/git-sync.yml index b43996dc6..f07d1f3b4 100644 --- a/.github/workflows/git-sync.yml +++ b/.github/workflows/git-sync.yml @@ -10,8 +10,8 @@ jobs: GitHub-to-Bitbucket: runs-on: ubuntu-latest steps: - - name: webfactory/ssh-agent@v0.5.4 - uses: webfactory/ssh-agent@v0.5.4 + - name: webfactory/ssh-agent@v0.7.0 + uses: webfactory/ssh-agent@v0.7.0 with: ssh-private-key: ${{ secrets.BITBUCKET_SECRET }} From 9caeeb6f2e5d337a1fb0be07ba0f1acd2619e1a5 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 30 Oct 2022 11:26:16 +0000 Subject: [PATCH 040/374] update README.md buttons (#4019) --- README.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 70f3b9365..f0a9713cf 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,11 @@ -

-
- LinuxGSM -

- -[![LinuxGSM](https://img.shields.io/badge/-LinuxGSM-2b2b2b.svg?logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAACsAAABACAYAAACDbo5ZAAAGD0lEQVR4AcWYa2wUVRvHz75c2vJ2disXoUBEVIioRAx%2BMIFA1IRwUS6KCCiIKBrvhEYiiGm5iBgk8QOGEgUUDYTttmVZWFr2UmwURS6iYAoCtmisElSsdHdbkT7%2BTzoNy%2BGc2dm54C%2F5Rdkz85x%2FZ86ZOXOYXYhIg3Phx%2FA4PAcv6f%2Btg5vhHJjP3EcZsgsshufJHH%2FAJbDztQ7aG35J1vgCXn%2BtgvrgEbLHYei9FmE3kDOUuh10OGwjZ7gEh7kZ9gNyllK3gnrg7%2BQs56DHjbCDyB0GuRF2ArnDeDfCziF3mO1G2FfJHRa4EXYpuUOxG2GXkzuUuBH2TXKH5W6ELSV3eM%2BNsOUk5yQcAY8p2uvgSPitor3MjbB1UOQXOFBvHwpbhPYWOExvL4SNUOQ7p4P2JTlzhOPmCu0vCu1PQpE2WOhk2MdJjk9y7HNwP1wEPUJbAcmZ6WTYrYolnifbxZBiibnFySHQCkUaLdY7C0V4%2FT5OhF1JcuIW6%2B0lOcvsBi2Ezao3j8Ov7Quwj52w60jNKIs1R5GatVaDDoEXSU4D7GSxbidYT3IuwjusFK0mNUVMwaZNNbl%2B%2F87hoVCom0HthaQmnG3QB0lNPcxlCvz%2B0GtlZTuorCxYYlA%2FDzbY%2FnrAgV3hCVLzCDMgEAi9wMMi9IIM%2FUwnNXWwi5mwRaSmmmXA798xq%2F3Khp420VeE1LyS6eQeBhttSXgzywCCToIUCOyYZvKLOWWwkdfd6ORVpGYJM0F5efDe9mEQHGty2BWTmhVGO4PNBmOoKzMBxmo%2FhD25dWvljSbD5hjMkb9gT9lJq63Mzi1bKkbjloc7xBWtwiRrDASCVRi%2FRxA8if%2BvrawMTzYI%2FACpeUv2KFFtDcUyTKilCHcis8G1Ga7wHpLzG8wVFs1K7jaeUKHZfIxmkj9%2FM4S9x9RGiMEudo0QbCVu9Xqn5PWEwLUk5%2FP0iaXac53I0kAH9Sau4m54lo%2FdTMfyekLYKQZ7ub34AbMMlmw5irC2VYTN0fuVMYMf8JHxJ7L7YYXAlSRnI2%2F8RtH4siTsDMz%2BZ5yS15OEXUxyDjGD1%2BvEq8MG16CDzY6JepKwT6geYbzxb0XjGMl7vwGSgzZIwo4nOa1M8Yr9Afb%2Fj8L21%2FsXaeaNZ2A6KTiEASph%2F0vF80cn4tokqu79fzfCUk2vfF4%2FFdFGEjGPHvg2yWrsDG%2F4%2BqpZB8jPOiXjWk0y5iXdM3XhKUvxBTA9UvHuvNPh%2Bzb%2BWj10z6nwuHWBbQFMvNCjKnn7qd1jS%2Fnx9VX3b6jC%2BbwOr5eMe3%2B83IcW4%2F3qgT%2BUTbA9srGaiHsn8AKiF6Ld%2FxF%2FOx6eeAJXabvK78MTTornNMd6XJTVR7%2Fj9bBjhFxV%2FMc1kJOAy2AeA%2FgrV4mFVDZFCqm8rEJ6qysCAWqK9iaztRJRbWXa4moFTELOav7jY%2FqAvoXp0Gc9NX7bIZl17%2FZl0rC1wRLeno0NvP%2B0CTcYNnS8wW6CtzNANaxzKqo9hRNOQ8rGo7tmSsMe2zWdt2frqVRcm5s2fofCgawDNHRNxnyfqgsYez4y4ADCjRM9H73hsNWafILTQdaFiSTj%2BQ%2FxA6yH7d%2BCmR8XbYr0a7VTF2N4siSsb5qdos3R6%2FjGxpULFfw7EfORnbrI9TAToX0sD40%2F2ylcGdh2Rdhg%2BSf2gka9jRTqK9%2BGwgHz7RTfVbHxirDhivdthYUvMRX8aYAD9lstvi%2B0aDL2DUZ0eCBUNNVG0IP65FLTWqPdiqdC0koHTVXe7iyNRG23QotBEy1RbTAzQyrmnYUT2rLsoA13JpcB4eVC2daBM1g2JGLekmwf5On7EJfngfZTNnVSce8bFjaTmQdvs%2FXmO%2FJVpoXdx3RSUe9O00Fj3nUdy0RLgRHiHXOPGW1h2uKZ07c9rG%2Bxyefp23pQeyBIEQoavYlakrG8fnrY5yHn2fbxXzAgw7m8bT5zkkSk4C7cpmOK21esB%2FXAQ5DzFfTo43%2BF%2FDzf0eZ4wZ3MDSjMcvD6nIeOahGgia%2FyU3HforTPkWkwnakdn0cI9jqfbPjD%2FuQLJr6644snlgX%2FApOMoyd1R5%2FxAAAAAElFTkSuQmCC)](https://linuxgsm.com) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/d19c5234dc3743d8a8a14093711ca52d)](https://www.codacy.com/gh/GameServerManagers/LinuxGSM/dashboard?utm_source=github.com&utm_medium=referral&utm_content=GameServerManagers/LinuxGSM&utm_campaign=Badge_Grade) [![Backup Repo](https://github.com/GameServerManagers/LinuxGSM/workflows/Backup%20Repo/badge.svg)](https://bitbucket.org/GameServerManagers/linuxgsm) [![Discord](https://discordapp.com/api/guilds/127498813903601664/widget.png?style=shield)](https://linuxgsm.com/discord) [![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg?v=103)](https://github.com/GameServerManagers/LinuxGSM/blob/master/LICENSE) [![made-with-bash](https://img.shields.io/badge/-Made%20with%20Bash-1f425f.svg?logo=image%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw%2FeHBhY2tldCBiZWdpbj0i77u%2FIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8%2BIDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkE3MDg2QTAyQUZCMzExRTVBMkQxRDMzMkJDMUQ4RDk3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkE3MDg2QTAzQUZCMzExRTVBMkQxRDMzMkJDMUQ4RDk3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTcwODZBMDBBRkIzMTFFNUEyRDFEMzMyQkMxRDhEOTciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTcwODZBMDFBRkIzMTFFNUEyRDFEMzMyQkMxRDhEOTciLz4gPC9yZGY6RGVzY3JpcHRpb24%2BIDwvcmRmOlJERj4gPC94OnhtcG1ldGE%2BIDw%2FeHBhY2tldCBlbmQ9InIiPz6lm45hAAADkklEQVR42qyVa0yTVxzGn7d9Wy03MS2ii8s%2BeokYNQSVhCzOjXZOFNF4jx%2BMRmPUMEUEqVG36jo2thizLSQSMd4N8ZoQ8RKjJtooaCpK6ZoCtRXKpRempbTv5ey83bhkAUphz8fznvP8znn%2B%2F3NeEEJgNBoRRSmz0ub%2FfuxEacBg%2FDmYtiCjgo5NG2mBXq%2BH5I1ogMRk9Zbd%2BQU2e1ML6VPLOyf5tvBQ8yT1lG10imxsABm7SLs898GTpyYynEzP60hO3trHDKvMigUwdeaceacqzp7nOI4n0SSIIjl36ao4Z356OV07fSQAk6xJ3XGg%2BLCr1d1OYlVHp4eUHPnerU79ZA%2F1kuv1JQMAg%2BE4O2P23EumF3VkvHprsZKMzKwbRUXFEyTvSIEmTVbrysp%2BWr8wfQHGK6WChVa3bKUmdWou%2BjpArdGkzZ41c1zG%2Fu5uGH4swzd561F%2BuhIT4%2BLnSuPsv9%2BJKIpjNr9dXYOyk7%2FBZrcjIT4eCnoKgedJP4BEqhG77E3NKP31FO7cfQA5K0dSYuLgz2TwCWJSOBzG6crzKK%2BohNfni%2Bx6OMUMMNe%2Fgf7ocbw0v0acKg6J8Ql0q%2BT%2FAXR5PNi5dz9c71upuQqCKFAD%2BYhrZLEAmpodaHO3Qy6TI3NhBpbrshGtOWKOSMYwYGQM8nJzoFJNxP2HjyIQho4PewK6hBktoDcUwtIln4PjOWzflQ%2Be5yl0yCCYgYikTclGlxadio%2BBQCSiW1UXoVGrKYwH4RgMrjU1HAB4vR6LzWYfFUCKxfS8Ftk5qxHoCUQAUkRJaSEokkV6Y%2F%2BJUOC4hn6A39NVXVBYeNP8piH6HeA4fPbpdBQV5KOx0QaL1YppX3Jgk0TwH2Vg6S3u%2BdB91%2B%2FpuNYPYFl5uP5V7ZqvsrX7jxqMXR6ff3gCQSTzFI0a1TX3wIs8ul%2Bq4HuWAAiM39vhOuR1O1fQ2gT%2F26Z8Z5vrl2OHi9OXZn995nLV9aFfS6UC9JeJPfuK0NBohWpCHMSAAsFe74WWP%2BvT25wtP9Bpob6uGqqyDnOtaeumjRu%2ByFu36VntK%2FPA5umTJeUtPWZSU9BCgud661odVp3DZtkc7AnYR33RRC708PrVi1larW7XwZIjLnd7R6SgSqWSNjU1B3F72pz5TZbXmX5vV81Yb7Lg7XT%2FUXriu8XLVqw6c6XqWnBKiiYU%2BMt3wWF7u7i91XlSEITwSAZ%2FCzAAHsJVbwXYFFEAAAAASUVORK5CYII%3D)](https://www.gnu.org/software/bash/) +

+ LinuxGSM + Codacy grade + GitHub Workflow Status + Discord + SteamCMD + MIT License +

[LinuxGSM](https://linuxgsm.com) is the command-line tool for quick, simple deployment and management of Linux dedicated game servers. From fbaed943242a716cacf593e26eb699527a64e7b0 Mon Sep 17 00:00:00 2001 From: crawforc3 Date: Sun, 30 Oct 2022 15:24:07 -0700 Subject: [PATCH 041/374] feat(newserver): Necesse (#3997) * Add Necesse game server * change github info for testing * add defaul config * fix config * Update config * revery github repo * remove artifact * Update _default.cfg * Update install sequence * Update servercfg * Add post install * Update nec post isntall * update fixes * Remove config checks * update install config * fix typo * Add config check * add config checks to post install * fix install config * update fix.sh * Clean up * correct dependencies * add details * add nec * config * update dependencies * prettier Co-authored-by: Daniel Gibbs --- .../config-lgsm/necserver/_default.cfg | 180 ++++++++++++++++++ lgsm/data/almalinux-8.csv | 7 +- lgsm/data/almalinux-9.csv | 129 +++++++++++++ lgsm/data/centos-7.csv | 7 +- lgsm/data/centos-8.csv | 7 +- lgsm/data/centos-9.csv | 128 +++++++++++++ lgsm/data/debian-10.csv | 7 +- lgsm/data/debian-11.csv | 7 +- lgsm/data/debian-9.csv | 7 +- lgsm/data/rhel-7.csv | 7 +- lgsm/data/rhel-8.csv | 7 +- lgsm/data/rhel-9.csv | 129 +++++++++++++ lgsm/data/rocky-8.csv | 7 +- lgsm/data/rocky-9.csv | 129 +++++++++++++ lgsm/data/serverlist.csv | 5 +- lgsm/data/ubuntu-16.04.csv | 7 +- lgsm/data/ubuntu-18.04.csv | 7 +- lgsm/data/ubuntu-20.04.csv | 7 +- lgsm/data/ubuntu-21.04.csv | 7 +- lgsm/data/ubuntu-21.10.csv | 7 +- lgsm/data/ubuntu-22.04.csv | 7 +- lgsm/functions/check_permissions.sh | 2 +- lgsm/functions/core_getopt.sh | 2 +- lgsm/functions/info_game.sh | 137 ++++++++----- lgsm/functions/info_messages.sh | 17 +- lgsm/functions/install_config.sh | 8 + lgsm/functions/install_server_files.sh | 2 +- linuxgsm.sh | 22 +-- 28 files changed, 878 insertions(+), 117 deletions(-) create mode 100644 lgsm/config-default/config-lgsm/necserver/_default.cfg create mode 100644 lgsm/data/almalinux-9.csv create mode 100644 lgsm/data/centos-9.csv create mode 100644 lgsm/data/rhel-9.csv create mode 100644 lgsm/data/rocky-9.csv diff --git a/lgsm/config-default/config-lgsm/necserver/_default.cfg b/lgsm/config-default/config-lgsm/necserver/_default.cfg new file mode 100644 index 000000000..65b7a7f1d --- /dev/null +++ b/lgsm/config-default/config-lgsm/necserver/_default.cfg @@ -0,0 +1,180 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! +# Copy settings from here and use them in either: +# common.cfg - applies settings to every instance. +# [instance].cfg - applies settings to a specific instance. + +#### Game Server Settings #### +## Pre-defined Paramters | https://docs.linuxgsm.com/configuration/start-parameters#predefined-parameters +worldname="MyWorld" + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="-localdir -world ${worldname}" + +#### LinuxGSM Settings #### + +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + +## Notification Alerts +# (on|off) + +# Display IP | https://docs.linuxgsm.com/alerts#display-ip +displayip="" + +# More info | https://docs.linuxgsm.com/alerts#more-info +postalert="off" + +# Discord Alerts | https://docs.linuxgsm.com/alerts/discord +discordalert="off" +discordwebhook="webhook" + +# Email Alerts | https://docs.linuxgsm.com/alerts/email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + +# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun +mailgunalert="off" +mailgunapiregion="us" +mailguntoken="accesstoken" +mailgundomain="example.com" +mailgunemailfrom="alert@example.com" +mailgunemail="email@myemail.com" + +# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover +pushoveralert="off" +pushovertoken="accesstoken" +pushoveruserkey="userkey" + +# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat +rocketchatalert="off" +rocketchatwebhook="webhook" +rocketchattoken="" + +# Slack Alerts | https://docs.linuxgsm.com/alerts/slack +slackalert="off" +slackwebhook="webhook" + +# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram +# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +telegramapi="api.telegram.org" +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +curlcustomstring="" + +## Updating | https://docs.linuxgsm.com/commands/update +updateonstart="off" + +## Backup | https://docs.linuxgsm.com/commands/backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://docs.linuxgsm.com/features/logging +consolelogging="on" +logdays="7" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="1" + +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors +ansi="on" + +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time +sleeptime="0.5" + +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd +# Server appid +appid="1169370" +steamcmdforcewindows="no" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +betapassword="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="false" + +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode +# 1: tmux kill +# 2: CTRL+c +# 3: quit +# 4: quit 120s +# 5: stop +# 6: q +# 7: exit +# 8: 7 Days to Die +# 9: GoldSrc +# 10: Avorion +# 11: end +stopmode="2" + +## Query mode +# 1: session only +# 2: gamedig (gsquery fallback) +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Console type +consoleverbose="yes" +consoleinteract="no" + +## Game Server Details +# Do not edit +gamename="Necesse" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}" +executabledir="${serverfiles}" +executable="./StartServer-nogui.sh" +servercfgdir="${serverfiles}/cfg" +servercfg="server.cfg" +servercfgdefault="server.cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index d00fcd887..0bc76a1a6 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -57,9 +57,9 @@ jc3 jk2 kf kf2 -lo l4d l4d2 +lo mc,java-11-openjdk mcb,libnsl mh @@ -68,6 +68,7 @@ mom mta,ncurses-compat-libs mumble nd +nec nmrih,ncurses-libs.i686 ns ns2,speex,tbb @@ -95,8 +96,8 @@ sbots scpsl scpslsm sdtd,telnet,expect -sfc,ncurses-libs.i686 sf +sfc,ncurses-libs.i686 sof2 sol squad @@ -117,9 +118,9 @@ ut2k4 ut3 ut99 vh,glibc-devel -vs vints,mono-complete vpmc,java-11-openjdk +vs wet wf wmc,java-11-openjdk diff --git a/lgsm/data/almalinux-9.csv b/lgsm/data/almalinux-9.csv new file mode 100644 index 000000000..0bc76a1a6 --- /dev/null +++ b/lgsm/data/almalinux-9.csv @@ -0,0 +1,129 @@ +all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz +steamcmd,glibc.i686,libstdc++.i686 +ac +ahl +ahl2 +ark +arma3 +armar,libcurl,openssl-libs +av +bb +bb2,libcurl.i686 +bd +bf1942,ncurses-libs.i686 +bfv,compat-libstdc++-33.i686,glibc.i686 +bmdm,ncurses-libs.i686 +bo +bs +bt,libicu,dos2unix +bt1944 +cc +cd +cmw +cod,compat-libstdc++-33.i686 +cod2,compat-libstdc++-33.i686 +cod4 +coduo,compat-libstdc++-33.i686 +codwaw +col +cs +cscz +csgo +css,ncurses-libs.i686 +dab +dayz +dmc +dod +dodr +dods +doi +dst,libcurl.i686 +dys +eco,libgdiplus +em +etl +fctr +fof +gmod,ncurses-libs.i686 +hl2dm +hldm +hldms +hw,zlib-devel +ins +inss +ios +jc2 +jc3 +jk2 +kf +kf2 +l4d +l4d2 +lo +mc,java-11-openjdk +mcb,libnsl +mh +mohaa,compat-libstdc++-33.i686 +mom +mta,ncurses-compat-libs +mumble +nd +nec +nmrih,ncurses-libs.i686 +ns +ns2,speex,tbb +ns2c,speex.i686,tbb.i686 +onset,mariadb-connector-c +opfor +pc +pmc,java-11-openjdk +pstbs,GConf2 +pvkii +pvr,libcxx +pz,java-11-openjdk rng-tools +q2 +q3 +ql +qw +ricochet +ro +rtcw +rust,zlib-devel +rw,java-11-openjdk +samp +sb +sbots +scpsl +scpslsm +sdtd,telnet,expect +sf +sfc,ncurses-libs.i686 +sof2 +sol +squad +st +stn +sven +terraria +tf2,libcurl.i686 +tfc +ti +ts +ts3 +tu +tw +unt +ut +ut2k4 +ut3 +ut99 +vh,glibc-devel +vints,mono-complete +vpmc,java-11-openjdk +vs +wet +wf +wmc,java-11-openjdk +wurm,xorg-x11-server-Xvfb +zmr,ncurses-libs.i686 +zps,ncurses-libs.i686 diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index 560740dd5..9ae62611d 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -57,9 +57,9 @@ jc3 jk2 kf kf2 -lo l4d l4d2 +lo mc,java-11-openjdk mcb,libnsl mh @@ -68,6 +68,7 @@ mom mta,ncurses-libs mumble nd +nec nmrih,ncurses-libs.i686 ns ns2,speex,tbb @@ -95,8 +96,8 @@ sbots scpsl scpslsm sdtd,telnet,expect -sfc,ncurses-libs.i686 sf +sfc,ncurses-libs.i686 sof2 sol squad @@ -117,8 +118,8 @@ ut2k4 ut3 ut99 vh,glibc-devel -vs vints,mono-complete +vs wet wf wmc,java-11-openjdk diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index 8ef35fa03..0d680e760 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -57,9 +57,9 @@ jc3 jk2 kf kf2 -lo l4d l4d2 +lo mc,java-11-openjdk mcb,libnsl mh @@ -68,6 +68,7 @@ mom mta,ncurses-compat-libs mumble nd +nec nmrih,ncurses-libs.i686 ns ns2,speex,tbb @@ -95,8 +96,8 @@ sbots scpsl scpslsm sdtd,telnet,expect -sfc,ncurses-libs.i686 sf +sfc,ncurses-libs.i686 sof2 sol squad @@ -116,9 +117,9 @@ ut2k4 ut3 ut99 vh,glibc-devel -vs vints,mono-complete vpmc,java-11-openjdk +vs wet wf wmc,java-11-openjdk diff --git a/lgsm/data/centos-9.csv b/lgsm/data/centos-9.csv new file mode 100644 index 000000000..0d680e760 --- /dev/null +++ b/lgsm/data/centos-9.csv @@ -0,0 +1,128 @@ +all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz +steamcmd,glibc.i686,libstdc++.i686 +ac +ahl +ahl2 +ark +arma3 +armar,libcurl,openssl-libs +av +bb +bb2,libcurl.i686 +bd +bf1942,ncurses-libs.i686 +bfv,compat-libstdc++-33.i686,glibc.i686 +bmdm,ncurses-libs.i686 +bo +bs +bt,libicu,dos2unix +bt1944 +cc +cd +cmw +cod,compat-libstdc++-33.i686 +cod2,compat-libstdc++-33.i686 +cod4 +coduo,compat-libstdc++-33.i686 +codwaw +col +cs +cscz +csgo +css,ncurses-libs.i686 +dab +dayz +dmc +dod +dodr +dods +doi +dst,libcurl.i686 +dys +eco,libgdiplus +em +etl +fctr +fof +gmod,ncurses-libs.i686 +hl2dm +hldm +hldms +hw,zlib-devel +ins +inss +ios +jc2 +jc3 +jk2 +kf +kf2 +l4d +l4d2 +lo +mc,java-11-openjdk +mcb,libnsl +mh +mohaa,compat-libstdc++-33.i686 +mom +mta,ncurses-compat-libs +mumble +nd +nec +nmrih,ncurses-libs.i686 +ns +ns2,speex,tbb +ns2c,speex.i686,tbb.i686 +onset,mariadb-connector-c +opfor +pc +pmc,java-11-openjdk +pstbs,GConf2 +pvkii +pvr,libcxx +pz,java-11-openjdk rng-tools +q2 +q3 +ql +qw +ricochet +ro +rtcw +rust,zlib-devel +rw,java-11-openjdk +samp +sb +sbots +scpsl +scpslsm +sdtd,telnet,expect +sf +sfc,ncurses-libs.i686 +sof2 +sol +squad +st +sven +terraria +tf2,libcurl.i686 +tfc +ti +ts +ts3 +tu +tw +unt +ut +ut2k4 +ut3 +ut99 +vh,glibc-devel +vints,mono-complete +vpmc,java-11-openjdk +vs +wet +wf +wmc,java-11-openjdk +wurm,xorg-x11-server-Xvfb +zmr,ncurses-libs.i686 +zps,ncurses-libs.i686 diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index 036eb625c..82c79d192 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -57,9 +57,9 @@ jc3 jk2 kf kf2 -lo l4d l4d2 +lo mc,openjdk-11-jre mcb mh @@ -68,6 +68,7 @@ mom mta,libncursesw5 mumble nd +nec nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 @@ -95,8 +96,8 @@ sbots scpsl,mono-complete scpslsm,mono-complete sdtd,telnet,expect -sfc,libtinfo5:i386 sf +sfc,libtinfo5:i386 sof2 sol squad @@ -117,9 +118,9 @@ ut2k4 ut3 ut99 vh,libc6-dev -vs vints,mono-complete vpmc,openjdk-11-jre +vs wet wf wmc,openjdk-11-jre diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index 468990c5f..158f6222b 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -57,9 +57,9 @@ jc3 jk2 kf kf2 -lo l4d l4d2 +lo mc,openjdk-17-jre mcb mh @@ -68,6 +68,7 @@ mom mta,libncursesw5 mumble nd +nec nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 @@ -95,8 +96,8 @@ sbots scpsl,mono-complete scpslsm,mono-complete sdtd,telnet,expect -sfc,libtinfo5:i386 sf +sfc,libtinfo5:i386 sof2 sol squad @@ -117,9 +118,9 @@ ut2k4 ut3 ut99 vh,libc6-dev -vs vints,mono-complete vpmc,openjdk-11-jre +vs wet wf wmc,openjdk-17-jre diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index 69773506f..f03c39f6a 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -57,9 +57,9 @@ jc3 jk2 kf kf2 -lo l4d l4d2 +lo mc,openjdk-8-jre mcb mh @@ -68,6 +68,7 @@ mom mta,libncursesw5 mumble nd +nec nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 @@ -95,8 +96,8 @@ sbots scpsl,mono-complete scpslsm,mono-complete sdtd,telnet,expect -sfc,libtinfo5:i386 sf +sfc,libtinfo5:i386 sof2 sol squad @@ -117,8 +118,8 @@ ut2k4 ut3 ut99 vh,libc6-dev -vs vints,mono-complete +vs wet wf wmc,openjdk-8-jre diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index 968c4dc98..58dda5d20 100644 --- a/lgsm/data/rhel-7.csv +++ b/lgsm/data/rhel-7.csv @@ -57,9 +57,9 @@ jc3 jk2 kf kf2 -lo l4d l4d2 +lo mc,java-11-openjdk mcb,libnsl mh @@ -68,6 +68,7 @@ mom mta mumble nd +nec nmrih,ncurses-libs.i686 ns ns2,speex,tbb @@ -95,8 +96,8 @@ sbots scpsl scpslsm sdtd,telnet,expect -sfc,ncurses-libs.i686 sf +sfc,ncurses-libs.i686 sof2 sol squad @@ -117,9 +118,9 @@ ut2k4 ut3 ut99 vh,glibc-devel -vs vints,mono-complete vpmc,java-11-openjdk +vs wet wf wmc,java-11-openjdk diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index 002db75fd..8f0d5a30f 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -57,9 +57,9 @@ jc3 jk2 kf kf2 -lo l4d l4d2 +lo mc,java-11-openjdk mcb,libnsl mh @@ -68,6 +68,7 @@ mom mta mumble nd +nec nmrih,ncurses-libs.i686 ns ns2,speex,tbb @@ -95,8 +96,8 @@ sbots scpsl scpslsm sdtd,telnet,expect -sfc,ncurses-libs.i686 sf +sfc,ncurses-libs.i686 sof2 sol squad @@ -117,9 +118,9 @@ ut2k4 ut3 ut99 vh,glibc-devel -vs vints,mono-complete vpmc,java-11-openjdk +vs wet wf wmc,java-11-openjdk diff --git a/lgsm/data/rhel-9.csv b/lgsm/data/rhel-9.csv new file mode 100644 index 000000000..8f0d5a30f --- /dev/null +++ b/lgsm/data/rhel-9.csv @@ -0,0 +1,129 @@ +all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz +steamcmd,glibc.i686,libstdc++.i686 +ac +ahl +ahl2 +ark +arma3 +armar,libcurl,openssl-libs +av +bb +bb2,libcurl.i686 +bd +bf1942,ncurses-libs.i686 +bfv,compat-libstdc++-33.i686,glibc.i686 +bmdm,ncurses-libs.i686 +bo +bs +bt,libicu +bt1944 +cc +cd +cmw +cod,compat-libstdc++-33.i686 +cod2,compat-libstdc++-33.i686 +cod4 +coduo,compat-libstdc++-33.i686 +codwaw +col +cs +cscz +csgo +css,ncurses-libs.i686 +dab +dayz +dmc +dod +dodr +dods +doi +dst,libcurl.i686 +dys +eco,libgdiplus +em +etl +fctr +fof +gmod,ncurses-libs.i686 +hl2dm +hldm +hldms +hw,zlib-devel +ins +inss +ios +jc2 +jc3 +jk2 +kf +kf2 +l4d +l4d2 +lo +mc,java-11-openjdk +mcb,libnsl +mh +mohaa,compat-libstdc++-33.i686 +mom +mta +mumble +nd +nec +nmrih,ncurses-libs.i686 +ns +ns2,speex,tbb +ns2c,speex.i686,tbb.i686 +onset,mariadb-connector-c +opfor +pc +pmc,java-11-openjdk +pstbs,GConf2 +pvkii +pvr,libcxx +pz,java-11-openjdk rng-tools +q2 +q3 +ql +qw +ricochet +ro +rtcw +rust,zlib-devel +rw,java-11-openjdk +samp +sb +sbots +scpsl +scpslsm +sdtd,telnet,expect +sf +sfc,ncurses-libs.i686 +sof2 +sol +squad +st +stn +sven +terraria +tf2,libcurl.i686 +tfc +ti +ts +ts3 +tu +tw +unt +ut +ut2k4 +ut3 +ut99 +vh,glibc-devel +vints,mono-complete +vpmc,java-11-openjdk +vs +wet +wf +wmc,java-11-openjdk +wurm,xorg-x11-server-Xvfb +zmr,ncurses-libs.i686 +zps,ncurses-libs.i686 diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index d00fcd887..0bc76a1a6 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -57,9 +57,9 @@ jc3 jk2 kf kf2 -lo l4d l4d2 +lo mc,java-11-openjdk mcb,libnsl mh @@ -68,6 +68,7 @@ mom mta,ncurses-compat-libs mumble nd +nec nmrih,ncurses-libs.i686 ns ns2,speex,tbb @@ -95,8 +96,8 @@ sbots scpsl scpslsm sdtd,telnet,expect -sfc,ncurses-libs.i686 sf +sfc,ncurses-libs.i686 sof2 sol squad @@ -117,9 +118,9 @@ ut2k4 ut3 ut99 vh,glibc-devel -vs vints,mono-complete vpmc,java-11-openjdk +vs wet wf wmc,java-11-openjdk diff --git a/lgsm/data/rocky-9.csv b/lgsm/data/rocky-9.csv new file mode 100644 index 000000000..0bc76a1a6 --- /dev/null +++ b/lgsm/data/rocky-9.csv @@ -0,0 +1,129 @@ +all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz +steamcmd,glibc.i686,libstdc++.i686 +ac +ahl +ahl2 +ark +arma3 +armar,libcurl,openssl-libs +av +bb +bb2,libcurl.i686 +bd +bf1942,ncurses-libs.i686 +bfv,compat-libstdc++-33.i686,glibc.i686 +bmdm,ncurses-libs.i686 +bo +bs +bt,libicu,dos2unix +bt1944 +cc +cd +cmw +cod,compat-libstdc++-33.i686 +cod2,compat-libstdc++-33.i686 +cod4 +coduo,compat-libstdc++-33.i686 +codwaw +col +cs +cscz +csgo +css,ncurses-libs.i686 +dab +dayz +dmc +dod +dodr +dods +doi +dst,libcurl.i686 +dys +eco,libgdiplus +em +etl +fctr +fof +gmod,ncurses-libs.i686 +hl2dm +hldm +hldms +hw,zlib-devel +ins +inss +ios +jc2 +jc3 +jk2 +kf +kf2 +l4d +l4d2 +lo +mc,java-11-openjdk +mcb,libnsl +mh +mohaa,compat-libstdc++-33.i686 +mom +mta,ncurses-compat-libs +mumble +nd +nec +nmrih,ncurses-libs.i686 +ns +ns2,speex,tbb +ns2c,speex.i686,tbb.i686 +onset,mariadb-connector-c +opfor +pc +pmc,java-11-openjdk +pstbs,GConf2 +pvkii +pvr,libcxx +pz,java-11-openjdk rng-tools +q2 +q3 +ql +qw +ricochet +ro +rtcw +rust,zlib-devel +rw,java-11-openjdk +samp +sb +sbots +scpsl +scpslsm +sdtd,telnet,expect +sf +sfc,ncurses-libs.i686 +sof2 +sol +squad +st +stn +sven +terraria +tf2,libcurl.i686 +tfc +ti +ts +ts3 +tu +tw +unt +ut +ut2k4 +ut3 +ut99 +vh,glibc-devel +vints,mono-complete +vpmc,java-11-openjdk +vs +wet +wf +wmc,java-11-openjdk +wurm,xorg-x11-server-Xvfb +zmr,ncurses-libs.i686 +zps,ncurses-libs.i686 diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 4c80f538a..a33bbf816 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -55,9 +55,9 @@ jc3,jc3server,Just Cause 3 jk2,jk2server,Jedi Knight II: Jedi Outcast kf,kfserver,Killing Floor kf2,kf2server,Killing Floor 2 -lo,loserver,Last Oasis l4d,l4dserver,Left 4 Dead l4d2,l4d2server,Left 4 Dead 2 +lo,loserver,Last Oasis mc,mcserver,Minecraft mcb,mcbserver,Minecraft Bedrock mh,mhserver,MORDHAU @@ -66,6 +66,7 @@ mom,momserver,Memories of Mars mta,mtaserver,Multi Theft Auto mumble,mumbleserver,Mumble nd,ndserver,Nuclear Dawn +nec,necserver,Necesse nmrih,nmrihserver,No More Room in Hell ns,nsserver,Natural Selection ns2,ns2server,Natural Selection 2 @@ -94,8 +95,8 @@ sbots,sbotsserver,StickyBots scpsl,scpslserver,SCP: Secret Laboratory scpslsm,scpslsmserver,SCP: Secret Laboratory ServerMod sdtd,sdtdserver,7 Days to Die -sfc,sfcserver,SourceForts Classic sf,sfserver,Satisfactory +sfc,sfcserver,SourceForts Classic sof2,sof2server,Soldier Of Fortune 2: Gold Edition sol,solserver,Soldat squad,squadserver,Squad diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index 8dc3bd77a..fdbcd12d0 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -56,9 +56,9 @@ jc3 jk2 kf kf2 -lo l4d l4d2 +lo mc,openjdk-8-jre mcb mh @@ -67,6 +67,7 @@ mom mta mumble nd +nec nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 @@ -94,8 +95,8 @@ sbots scpsl,mono-complete scpslsm,mono-complete sdtd,telnet,expect -sfc,libtinfo5:i386 sf +sfc,libtinfo5:i386 sof2 sol squad @@ -116,8 +117,8 @@ ut2k4 ut3 ut99 vh,libc6-dev -vs vints,mono-complete +vs wet wf wmc,openjdk-8-jre diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index 036eb625c..82c79d192 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -57,9 +57,9 @@ jc3 jk2 kf kf2 -lo l4d l4d2 +lo mc,openjdk-11-jre mcb mh @@ -68,6 +68,7 @@ mom mta,libncursesw5 mumble nd +nec nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 @@ -95,8 +96,8 @@ sbots scpsl,mono-complete scpslsm,mono-complete sdtd,telnet,expect -sfc,libtinfo5:i386 sf +sfc,libtinfo5:i386 sof2 sol squad @@ -117,9 +118,9 @@ ut2k4 ut3 ut99 vh,libc6-dev -vs vints,mono-complete vpmc,openjdk-11-jre +vs wet wf wmc,openjdk-11-jre diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index 9f984bde9..65697649b 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -57,9 +57,9 @@ jc3 jk2 kf kf2 -lo l4d l4d2 +lo mc,openjdk-17-jre mcb mh @@ -68,6 +68,7 @@ mom mta,libncursesw5 mumble nd +nec nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 @@ -95,8 +96,8 @@ sbots scpsl,mono-complete scpslsm,mono-complete sdtd,telnet,expect -sfc,libtinfo5:i386 sf +sfc,libtinfo5:i386 sof2 sol squad @@ -117,9 +118,9 @@ ut2k4 ut3 ut99 vh,libc6-dev -vs vints,mono-complete vpmc,openjdk-11-jre +vs wet wf wmc,openjdk-17-jre diff --git a/lgsm/data/ubuntu-21.04.csv b/lgsm/data/ubuntu-21.04.csv index aabfa98ef..666f9d864 100644 --- a/lgsm/data/ubuntu-21.04.csv +++ b/lgsm/data/ubuntu-21.04.csv @@ -57,9 +57,9 @@ jc3 jk2 kf kf2 -lo l4d l4d2 +lo mc,openjdk-17-jre mcb mh @@ -68,6 +68,7 @@ mom mta,libncursesw5 mumble nd +nec nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 @@ -95,8 +96,8 @@ sbots scpsl,mono-complete scpslsm,mono-complete sdtd,telnet,expect -sfc,libtinfo5:i386 sf +sfc,libtinfo5:i386 sof2 sol squad @@ -117,9 +118,9 @@ ut2k4 ut3 ut99 vh,libc6-dev -vs vints,mono-complete vpmc,openjdk-11-jre +vs wet wf wmc,openjdk-17-jre diff --git a/lgsm/data/ubuntu-21.10.csv b/lgsm/data/ubuntu-21.10.csv index 1ced64fc7..713d21a89 100644 --- a/lgsm/data/ubuntu-21.10.csv +++ b/lgsm/data/ubuntu-21.10.csv @@ -55,9 +55,9 @@ jc3 jk2 kf kf2 -lo l4d l4d2 +lo mc,openjdk-17-jre mcb mh @@ -66,6 +66,7 @@ mom mta,libncursesw5 mumble nd +nec nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 @@ -93,8 +94,8 @@ sbots scpsl,mono-complete scpslsm,mono-complete sdtd,telnet,expect -sfc,libtinfo5:i386 sf +sfc,libtinfo5:i386 sof2 sol squad @@ -115,9 +116,9 @@ ut2k4 ut3 ut99 vh,libc6-dev -vs vints,mono-complete vpmc,openjdk-11-jre +vs wet wf wmc,openjdk-17-jre diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index e6b1e33a6..b65fc60ac 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -55,9 +55,9 @@ jc3 jk2 kf kf2 -lo l4d l4d2 +lo mc,openjdk-17-jre mcb mh @@ -66,6 +66,7 @@ mom mta,libncursesw5 mumble nd +nec nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 @@ -93,8 +94,8 @@ sbots scpsl,mono-complete scpslsm,mono-complete sdtd,telnet,expect -sfc,libtinfo5:i386 sf +sfc,libtinfo5:i386 sof2 sol squad @@ -115,9 +116,9 @@ ut2k4 ut3 ut99 vh,libc6-dev -vs vints,mono-complete vpmc,openjdk-11-jre +vs wet wf wmc,openjdk-17-jre diff --git a/lgsm/functions/check_permissions.sh b/lgsm/functions/check_permissions.sh index 1091cbc6e..0094456ec 100755 --- a/lgsm/functions/check_permissions.sh +++ b/lgsm/functions/check_permissions.sh @@ -181,7 +181,7 @@ fn_sys_perm_fix_manually_msg() { # Attempt to fix /sys related permission errors if sudo is available, exits otherwise. fn_sys_perm_errors_fix() { - if sudo -n true >/dev/null 2>&1; then + if sudo -n true > /dev/null 2>&1; then fn_print_dots "Automatically fixing /sys permissions" fn_script_log_info "Automatically fixing /sys permissions." if [ "${sysdirpermerror}" == "1" ]; then diff --git a/lgsm/functions/core_getopt.sh b/lgsm/functions/core_getopt.sh index 3c44931b9..fdd66ab3f 100755 --- a/lgsm/functions/core_getopt.sh +++ b/lgsm/functions/core_getopt.sh @@ -75,7 +75,7 @@ if [ "${shortname}" == "jk2" ] || [ "${engine}" != "idtech3" ]; then fi # Validate and check-update command. -if [ "${appid}" ]||[ "${shortname}" == "ts3" ]; then +if [ "${appid}" ] || [ "${shortname}" == "ts3" ]; then currentopt+=("${cmd_validate[@]}" "${cmd_check_update[@]}") fi diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index dcec74b31..77169b3f3 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -17,24 +17,24 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_info_game_ac() { # Config if [ ! -f "${servercfgfullpath}" ]; then + adminpassword="${unavailable}" httpport="${zero}" port="${zero}" queryport="${zero}" servername="${unavailable}" - adminpassword="${unavailable}" else + adminpassword=$(grep "ADMIN_PASSWORD" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/ADMIN_PASSWORD//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') httpport=$(grep "HTTP_PORT" "${servercfgfullpath}" | tr -cd '[:digit:]') port=$(grep "TCP_PORT" "${servercfgfullpath}" | tr -cd '[:digit:]') queryport="${httpport}" servername=$(grep "NAME" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/NAME//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | head -n 1) - adminpassword=$(grep "ADMIN_PASSWORD" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/ADMIN_PASSWORD//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') # Not set + adminpassword=${adminpassword:-"NOT SET"} httpport=${httpport:-"0"} port=${port:-"0"} queryport=${queryport:-"0"} servername=${servername:-"NOT SET"} - adminpassword=${adminpassword:-"NOT SET"} fi } @@ -42,67 +42,74 @@ fn_info_game_ac() { fn_info_game_ark() { # Config if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" adminpassword="${unavailable}" + servername="${unavailable}" serverpassword="${unavailable}" else - servername=$(sed -nr 's/^SessionName=(.*)/\1/p' "${servercfgfullpath}") adminpassword=$(sed -nr 's/^ServerAdminPassword=(.*)/\1/p' "${servercfgfullpath}") + servername=$(sed -nr 's/^SessionName=(.*)/\1/p' "${servercfgfullpath}") serverpassword=$(sed -nr 's/^ServerPassword=(.*)/\1/p' "${servercfgfullpath}") # Not set - servername=${servername:-"NOT SET"} adminpassword=${adminpassword:-"NOT SET"} + servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} fi # Parameters + maxplayers=${maxplayers:-"0"} port=${port:-"0"} queryport=${queryport:-"0"} - rconport=${rconport:-"0"} rawport=$((port + 1)) - maxplayers=${maxplayers:-"0"} + rconport=${rconport:-"0"} } fn_info_game_arma3() { # Config if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" adminpassword="${unavailable}" - serverpassword="${unavailable}" maxplayers="${zero}" + servername="${unavailable}" + serverpassword="${unavailable}" else - servername=$(sed -nr 's/^hostname\s*=\s*"(.*)"\s*;/\1/p' "${servercfgfullpath}") adminpassword=$(sed -nr 's/^passwordAdmin\s*=\s*"(.*)"\s*;/\1/p' "${servercfgfullpath}") - serverpassword=$(sed -nr 's/^password\s*=\s*"(.*)"\s*;/\1/p' "${servercfgfullpath}") maxplayers=$(sed -nr 's/^maxPlayers\s*=\s*([0-9]+)\s*;/\1/p' "${servercfgfullpath}") + servername=$(sed -nr 's/^hostname\s*=\s*"(.*)"\s*;/\1/p' "${servercfgfullpath}") + serverpassword=$(sed -nr 's/^password\s*=\s*"(.*)"\s*;/\1/p' "${servercfgfullpath}") # Not set - servername=${servername:-"NOT SET"} adminpassword=${adminpassword:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} maxplayers=${maxplayers:-"0"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} fi # Parameters + battleeyeport=$((port + 4)) port=${port:-"2302"} - voiceport=${port:-"2302"} queryport=$((port + 1)) steammasterport=$((port + 2)) + voiceport=${port:-"2302"} voiceunusedport=$((port + 3)) - battleeyeport=$((port + 4)) } fn_info_game_armar() { - if [ -f "${servercfgfullpath}" ]; then + if [ ! -f "${servercfgfullpath}" ]; then + adminpassword="${unavailable}" + maxplayers="${zero}" + port=${port:-"0"} + queryport= + servername="${unavailable}" + serverpassword="${unavailable}" + else adminpassword=$(jq -r '.adminPassword' "${servercfgfullpath}") + battleeyeport=1376 configip=$(jq -r '.gameHostBindAddress' "${servercfgfullpath}") maxplayers=$(jq -r '.game.playerCountLimit' "${servercfgfullpath}") port=$(jq -r '.gameHostBindPort' "${servercfgfullpath}") queryport=$(jq -r '.steamQueryPort' "${servercfgfullpath}") servername=$(jq -r '.game.name' "${servercfgfullpath}") serverpassword=$(jq -r '.game.password' "${servercfgfullpath}") - battleeyeport=1376 # Not set adminpassword=${adminpassword:-"NOT SET"} @@ -112,10 +119,6 @@ fn_info_game_armar() { queryport=${queryport:-"0"} servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} - else - port=${port:-"0"} - servername="${unavailable}" - serverpassword="${unavailable}" fi } @@ -148,7 +151,7 @@ fn_info_game_av() { fi # Not set - maxplayers=${maxplayers:-"NOT SET"} + maxplayers=${maxplayers:-"0"} servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} port=${port:-"0"} @@ -233,7 +236,7 @@ fn_info_game_bo() { serverpassword=${serverpassword:-"NOT SET"} port=${port:-"0"} queryport=${queryport:-"0"} - maxplayers=${maxplayers:-"NOT SET"} + maxplayers=${maxplayers:-"0"} fi } @@ -477,7 +480,7 @@ fn_info_game_dodr() { maxplayers=$(sed -nr 's/^iServerMaxPlayers=(.*)$/\1/p' "${servercfgfullpath}") # Not set - maxplayers=${maxplayers:-"NOT SET"} + maxplayers=${maxplayers:-"0"} fi # Parameters @@ -907,7 +910,7 @@ fn_info_game_mc() { servername=${servername:-"NOT SET"} rconpassword=${rconpassword:-"NOT SET"} rconport=${rconport:-"NOT SET"} - maxplayers=${maxplayers:-"NOT SET"} + maxplayers=${maxplayers:-"0"} port=${port:-"NOT SET"} queryport=${queryport:-"NOT SET"} queryenabled="${queryenabled:-"NOT SET"}" @@ -938,7 +941,7 @@ fn_info_game_mcb() { # Not set servername=${servername:-"NOT SET"} - maxplayers=${maxplayers:-"NOT SET"} + maxplayers=${maxplayers:-"0"} port=${port:-"NOT SET"} portipv6=${portipv6:-"NOT SET"} queryport=${queryport:-"NOT SET"} @@ -1004,7 +1007,7 @@ fn_info_game_mom() { if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" serverpassword="${unavailable}" - maxplayer="${zero}" + maxplayers="${zero}" defaultmap="${unavailable}" else servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') @@ -1015,7 +1018,7 @@ fn_info_game_mom() { # Not set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} - maxplayer=${maxplayers:-"NOT SET"} + maxplayers=${maxplayers:-"0"} defaultmap=${defaultmap:-"NOT SET"} fi @@ -1079,6 +1082,26 @@ fn_info_game_mumble() { fi } +fn_info_game_nec() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + servername="Necesse" + serverpassword="${unavailable}" + else + maxplayers=$(grep "slots" "${servercfgfullpath}" | cut -f1 -d "/" | tr -cd '[:digit:]') + port=$(grep "port" "${servercfgfullpath}" | cut -f1 -d "/" | tr -cd '[:digit:]') + serverpassword=$(grep "password" "${servercfgfullpath}" | cut -f1 -d "/" | tr -cd '[:digit:]') + + # Not set + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + servername="Necesse Port ${port}" + serverpassword=${serverpassword:-"NOT SET"} + fi +} + fn_info_game_onset() { # Config if [ ! -f "${servercfgfullpath}" ]; then @@ -1096,7 +1119,7 @@ fn_info_game_onset() { # Not set servername=${servername:-"NOT SET"} - maxplayers=${maxplayers:-"NOT SET"} + maxplayers=${maxplayers:-"0"} port=${port:-"NOT SET"} httpport=${httpport:-"NOT SET"} queryport=${queryport:-"NOT SET"} @@ -1123,7 +1146,7 @@ fn_info_game_pc() { # Not set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"NOT SET"} + maxplayers=${maxplayers:-"0"} port=${port:-"NOT SET"} queryport=${queryport:-"NOT SET"} steamport=${steamport:-"NOT SET"} @@ -1150,7 +1173,7 @@ fn_info_game_pc2() { # Not set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"NOT SET"} + maxplayers=${maxplayers:-"0"} port=${port:-"NOT SET"} queryport=${queryport:-"NOT SET"} steamport=${steamport:-"NOT SET"} @@ -1491,7 +1514,7 @@ fn_info_game_rw() { serverpassword=${serverpassword:-"NOT SET"} rconpassword=${rconpassword:-"NOT SET"} rconport=${rconport:-"NOT SET"} - maxplayers=${maxplayers:-"NOT SET"} + maxplayers=${maxplayers:-"0"} port=${port:-"0"} port2=${port2:-"0"} port3=${port3:-"0"} @@ -1588,18 +1611,18 @@ fn_info_game_sbots() { fn_info_game_scpsl() { # Config - if [ -f "${servercfgfullpath}" ]; then - servername=$(sed -nr 's/^server_name: (.*)$/\1/p' "${servercfgfullpath}") - maxplayers=$(sed -nr 's/^max_players: (.*)$/\1/p' "${servercfgfullpath}") - configip=$(sed -nr 's/^ipv4_bind_ip: (.*)$/\1/p' "${servercfgfullpath}") - tickrate=$(sed -nr 's/^server_tickrate: (.*)$/\1/p' "${servercfgfullpath}") - adminpassword=$(sed -nr 's/^administrator_query_password: (.*)$/\1/p' "${servercfgfullpath}") - else + if [ ! -f "${servercfgfullpath}" ]; then servername=${servername:-"NOT SET"} maxplayers=${maxplayers:-"0"} configip=${configip:-"0.0.0.0"} tickrate=${tickrate:-"NOT SET"} adminpassword=${adminpassword:-"NOT SET"} + else + servername=$(sed -nr 's/^server_name: (.*)$/\1/p' "${servercfgfullpath}") + maxplayers=$(sed -nr 's/^max_players: (.*)$/\1/p' "${servercfgfullpath}") + configip=$(sed -nr 's/^ipv4_bind_ip: (.*)$/\1/p' "${servercfgfullpath}") + tickrate=$(sed -nr 's/^server_tickrate: (.*)$/\1/p' "${servercfgfullpath}") + adminpassword=$(sed -nr 's/^administrator_query_password: (.*)$/\1/p' "${servercfgfullpath}") fi # Parameters @@ -1657,7 +1680,7 @@ fn_info_game_sdtd() { telnetenabled=${telnetenabled:-"NOT SET"} telnetport=${telnetport:-"0"} telnetpass=${telnetpass:-"NOT SET"} - maxplayers=${maxplayers:-"NOT SET"} + maxplayers=${maxplayers:-"0"} gamemode=${gamemode:-"NOT SET"} gameworld=${gameworld:-"NOT SET"} fi @@ -1858,7 +1881,13 @@ fn_info_game_terraria() { fn_info_game_stn() { # Config - if [ -f "${servercfgfullpath}" ]; then + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + configip=${configip:-"0.0.0.0"} + port="${zero}" + queryport="${zero}" + serverpassword=${serverpassword:-"NOT SET"} + else servername=$(sed -nr 's/^ServerName="(.*)"/\1/p' "${servercfgfullpath}") configip=$(sed -nr 's/^ServerIP=([0-9]+)/\1/p' "${servercfgfullpath}") port=$(sed -nr 's/^ServerPort=([0-9]+)/\1/p' "${servercfgfullpath}") @@ -1867,23 +1896,25 @@ fn_info_game_stn() { # Not set serverpassword=${serverpassword:-"NOT SET"} - else - servername="${unavailable}" - configip=${configip:-"0.0.0.0"} - port="${zero}" - queryport="${zero}" + port=${port:-"0"} serverpassword=${serverpassword:-"NOT SET"} + queryport=${queryport:-"0"} fi } fn_info_game_ti() { - if [ -f "${servercfgfullpath}" ]; then - servername=$(sed -nr 's/^ServerName="(.*)"/\1/p' "${servercfgfullpath}") - maxplayers=$(sed -nr 's/^MaxPlayerCount=([0-9]+)/\1/' "${servercfgfullpath}") - else + if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" maxplayers="${zero}" + else + servername=$(sed -nr 's/^ServerName="(.*)"/\1/p' "${servercfgfullpath}") + maxplayers=$(sed -nr 's/^MaxPlayerCount=([0-9]+)/\1/' "${servercfgfullpath}") + + # Not set + servername=${servername:-"NOT SET"} + maxplayers=${maxplayers:-"0"} fi + } fn_info_game_ts3() { @@ -2145,7 +2176,7 @@ fn_info_game_ut3() { servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} adminpassword=${adminpassword:-"NOT SET"} - maxplayers=${maxplayers:-"NOT SET"} + maxplayers=${maxplayers:-"0"} webadminenabled=${webadminenabled:-"NOT SET"} webadminport=${webadminport:-"0"} webadminuser=${webadminuser:-"NOT SET"} @@ -2396,6 +2427,8 @@ elif [ "${shortname}" == "mta" ]; then fn_info_game_mta elif [ "${shortname}" == "mumble" ]; then fn_info_game_mumble +elif [ "${shortname}" == "nec" ]; then + fn_info_game_nec elif [ "${shortname}" == "onset" ]; then fn_info_game_onset elif [ "${shortname}" == "pc" ]; then diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index a216327c9..f4f67b120 100755 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -658,7 +658,7 @@ fn_info_message_ports_edit() { startparameterslocation="${red}UNKNOWN${default}" # engines/games that require editing in the config file. - local ports_edit_array=("ac" "arma3" "armar" "bo" "bt" "cd" "dst" "eco" "idtech2" "idtech3" "idtech3_ql" "jc2" "jc3" "lwjgl2" "mcb" "mumble" "pc" "pc2" "pz" "qw" "refractor" "renderware" "rw" "sb" "sdtd" "st" "stn" "ts3" "tw" "terraria" "unreal" "unreal2" "unreal3" "vints" "wurm") + local ports_edit_array=("ac" "arma3" "armar" "bo" "bt" "cd" "dst" "eco" "idtech2" "idtech3" "idtech3_ql" "jc2" "jc3" "lwjgl2" "mcb" "mumble" "nec" "pc" "pc2" "pz" "qw" "refractor" "renderware" "rw" "sb" "sdtd" "st" "stn" "ts3" "tw" "terraria" "unreal" "unreal2" "unreal3" "vints" "wurm") for port_edit in "${ports_edit_array[@]}"; do if [ "${shortname}" == "ut3" ]; then startparameterslocation="${servercfgdir}/UTWeb.ini" @@ -687,7 +687,7 @@ fn_info_message_ports() { echo -e "ss -tuplwn | grep AvorionServer" elif [ "${shortname}" == "bf1942" ]; then echo -e "ss -tuplwn | grep bf1942_lnxded" - elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ] || [ "${shortname}" == "rw" ] || [ "${shortname}" == "vpmc" ] || [ "${shortname}" == "wmc" ]; then + elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "nec" ] || [ "${shortname}" == "pmc" ] || [ "${shortname}" == "rw" ] || [ "${shortname}" == "vpmc" ] || [ "${shortname}" == "wmc" ]; then echo -e "ss -tuplwn | grep java" elif [ "${shortname}" == "terraria" ]; then echo -e "ss -tuplwn | grep Main" @@ -1171,6 +1171,13 @@ fn_info_message_mumble() { } | column -s $'\t' -t } +fn_info_message_nec() { + { + fn_port "header" + fn_port "Game" port udp + } | column -s $'\t' -t +} + fn_info_message_onset() { { fn_port "header" @@ -1727,12 +1734,14 @@ fn_info_message_select_engine() { fn_info_message_mh elif [ "${shortname}" == "mohaa" ]; then fn_info_message_mohaa + elif [ "${shortname}" == "mom" ]; then + fn_info_message_mom elif [ "${shortname}" == "mta" ]; then fn_info_message_mta elif [ "${shortname}" == "mumble" ]; then fn_info_message_mumble - elif [ "${shortname}" == "mom" ]; then - fn_info_message_mom + elif [ "${shortname}" == "nec" ]; then + fn_info_message_nec elif [ "${shortname}" == "onset" ]; then fn_info_message_onset elif [ "${shortname}" == "pc" ]; then diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 8feb8655e..d5525c266 100755 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -634,6 +634,14 @@ elif [ "${shortname}" == "pz" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations +elif [ "${shortname}" == "nec" ]; then + gamedirname="Necesse" + fn_check_cfgdir + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "pc" ]; then gamedirname="ProjectCars" array_configs+=(server.cfg) diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index c9faf643a..61c6b131c 100755 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -222,7 +222,7 @@ elif [ "${shortname}" == "mcb" ]; then elif [ "${shortname}" == "pmc" ]; then install_eula.sh update_papermc.sh -elif [ "${shortname}" == "wmc" ]||[ "${shortname}" == "vpmc" ]; then +elif [ "${shortname}" == "wmc" ] || [ "${shortname}" == "vpmc" ]; then update_papermc.sh elif [ "${shortname}" == "mumble" ]; then update_mumble.sh diff --git a/linuxgsm.sh b/linuxgsm.sh index 7d9f21d0b..3849ae68b 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -15,7 +15,7 @@ # Debugging if [ -f ".dev-debug" ]; then - exec 5>dev-debug.log + exec 5> dev-debug.log BASH_XTRACEFD="5" set -x fi @@ -52,7 +52,7 @@ userinput2="${2}" [ -n "${LGSM_GITHUBBRANCH}" ] && githubbranch="${LGSM_GITHUBBRANCH}" || githubbranch="master" # Check that curl is installed before doing anything -if [ ! "$(command -v curl 2>/dev/null)" ]; then +if [ ! "$(command -v curl 2> /dev/null)" ]; then echo -e "[ FAIL ] Curl is not installed" exit 1 fi @@ -213,7 +213,7 @@ fn_install_menu_bash() { while read -r line || [[ -n "${line}" ]]; do var=$(echo -e "${line}" | awk -F "," '{print $2 " - " $3}') menu_options+=("${var}") - done <"${options}" + done < "${options}" menu_options+=("Cancel") select option in "${menu_options[@]}"; do if [ "${option}" ] && [ "${option}" != "Cancel" ]; then @@ -239,7 +239,7 @@ fn_install_menu_whiptail() { key=$(echo -e "${line}" | awk -F "," '{print $3}') val=$(echo -e "${line}" | awk -F "," '{print $2}') menu_options+=("${val//\"/}" "${key//\"/}") - done <"${options}" + done < "${options}" OPTION=$(${menucmd} --title "${title}" --menu "${caption}" "${height}" "${width}" "${menuheight}" "${menu_options[@]}" 3>&1 1>&2 2>&3) if [ $? == 0 ]; then eval "$resultvar=\"${OPTION}\"" @@ -263,12 +263,12 @@ fn_install_menu() { fi done case "$(basename "${menucmd}")" in - whiptail | dialog) - fn_install_menu_whiptail "${menucmd}" selection "${title}" "${caption}" "${options}" 40 80 30 - ;; - *) - fn_install_menu_bash selection "${title}" "${caption}" "${options}" - ;; + whiptail | dialog) + fn_install_menu_whiptail "${menucmd}" selection "${title}" "${caption}" "${options}" 40 80 30 + ;; + *) + fn_install_menu_bash selection "${title}" "${caption}" "${options}" + ;; esac eval "$resultvar=\"${selection}\"" } @@ -351,7 +351,7 @@ if [ "${shortname}" == "core" ]; then } | column -s $'\t' -t | more exit elif [ "${userinput}" == "install" ] || [ "${userinput}" == "i" ]; then - tail -n +1 "${serverlist}" | awk -F "," '{print $1 "," $2 "," $3}' >"${serverlistmenu}" + tail -n +1 "${serverlist}" | awk -F "," '{print $1 "," $2 "," $3}' > "${serverlistmenu}" fn_install_menu result "LinuxGSM" "Select game server to install." "${serverlistmenu}" userinput="${result}" fn_server_info From 94d1e99772ec5c25b3b2363d5e80d0626dc7fec0 Mon Sep 17 00:00:00 2001 From: Christian Date: Sun, 30 Oct 2022 23:27:15 +0100 Subject: [PATCH 042/374] feat(mods): add BepInEx mod for Valheim (#3960) --- lgsm/functions/fix_vh.sh | 16 +++++++++++++++- lgsm/functions/mods_list.sh | 7 ++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/fix_vh.sh b/lgsm/functions/fix_vh.sh index ab0218873..a90c5d0b0 100755 --- a/lgsm/functions/fix_vh.sh +++ b/lgsm/functions/fix_vh.sh @@ -8,14 +8,28 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" export LD_LIBRARY_PATH=./linux64:$LD_LIBRARY_PATH -# special check if Valheim Plus is installed modsdir="${lgsmdir}/mods" modsinstalledlistfullpath="${modsdir}/installed-mods.txt" if [ -f "${modsinstalledlistfullpath}" ]; then + # special check if Valheim Plus is installed if grep -qE "^valheimplus" "${modsinstalledlistfullpath}"; then if ! grep -qE "^executable=\"./start_server_bepinex.sh\"" "${configdirserver}/${selfname}.cfg"; then echo 'executable="./start_server_bepinex.sh"' >> "${configdirserver}/${selfname}.cfg" executable="./start_server_bepinex.sh" fi fi + # special exports for BepInEx if installed + if grep -qE "^bepinexvh" "${modsinstalledlistfullpath}"; then + fn_print_info_nl "BepInEx install detected, applying start exports" + fn_script_log_info "BepInEx install detected, applying start exports" + # exports for BepInEx framework from script start_server_bepinex.sh + export DOORSTOP_ENABLE=TRUE + export DOORSTOP_INVOKE_DLL_PATH=./BepInEx/core/BepInEx.Preloader.dll + export DOORSTOP_CORLIB_OVERRIDE_PATH=./unstripped_corlib + + export LD_LIBRARY_PATH="./doorstop_libs:${LD_LIBRARY_PATH}" + export LD_PRELOAD="libdoorstop_x64.so:${LD_PRELOAD}" + + export SteamAppId=892970 + fi fi diff --git a/lgsm/functions/mods_list.sh b/lgsm/functions/mods_list.sh index 151a98cbe..06b534b9e 100755 --- a/lgsm/functions/mods_list.sh +++ b/lgsm/functions/mods_list.sh @@ -95,6 +95,8 @@ oxidehurtworldlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/ oxidesdtdlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/OxideMod/Oxide.SevenDaysToDie/releases/latest | jq -r '.assets[]|select(.browser_download_url | contains("linux")) | .browser_download_url') # Valheim Plus valeimpluslatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/valheimPlus/ValheimPlus/releases/latest | jq -r '.assets[]|select(.browser_download_url | contains("UnixServer.tar.gz")) | .browser_download_url') +# Valheim BepInEx +bepinexvhlatestlink=$(curl --connect-timeout 10 -sL "https://valheim.thunderstore.io/api/experimental/package/denikson/BepInExPack_Valheim/" -H "accept: application/json" | jq -r '.latest.download_url' ) # Define mods information (required) @@ -194,5 +196,8 @@ mod_info_sdtdoxide=(MOD "sdtdoxide" "Oxide for 7 Days To Die" "${oxidesdtdlatest # ValheimPlus mod_info_valheimplus=(MOD "valheimplus" "Valheim PLUS" "${valeimpluslatestlink}" "ValheimPlus.tar.gz" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Valheim;" "NOTGAMES" "https://github.com/valheimPlus/ValheimPlus" "Mod to improve Valheim gameplay") +# BepInEx Valheim +mod_info_bepinexvh=(MOD "bepinexvh" "BepInEx Valheim" "${bepinexvhlatestlink}" "denikson-BepInExPack_Valheim.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Valheim;" "NOTGAMES" "https://valheim.thunderstore.io/package/denikson/BepInExPack_Valheim/" "Unity / XNA game patcher and plugin framework") + # REQUIRED: Set all mods info into the global array -mods_global_array=("${mod_info_metamod[@]}" "${mod_info_base_amxx[@]}" "${mod_info_cs_amxx[@]}" "${mod_info_dod_amxx[@]}" "${mod_info_tfc_amxx[@]}" "${mod_info_ns_amxx[@]}" "${mod_info_ts_amxx[@]}" "${mod_info_metamodsource[@]}" "${mod_info_sourcemod[@]}" "${mod_info_steamworks[@]}" "${mod_info_gokz[@]}" "${mod_info_ttt[@]}" "${mod_info_get5[@]}" "${mod_info_prac[@]}" "${mod_info_pug[@]}" "${mod_info_dhook[@]}" "${mod_info_movement[@]}" "${mod_info_cleaner[@]}" "${mod_info_ulib[@]}" "${mod_info_ulx[@]}" "${mod_info_utime[@]}" "${mod_info_uclip[@]}" "${mod_info_acf[@]}" "${mod_info_acf_missiles[@]}" "${mod_info_acf_sweps[@]}" "${mod_info_advdupe2[@]}" "${mod_info_pac3[@]}" "${mod_info_wiremod[@]}" "${mod_info_wiremodextras[@]}" "${mod_info_darkrp[@]}" "${mod_info_darkrpmodification[@]}" "${mod_info_rustoxide[@]}" "${mod_info_hwoxide[@]}" "${mod_info_sdtdoxide[@]}" "${mod_info_advduplicator[@]}" "${mod_info_trackassemblytool[@]}" "${mod_info_physpropertiesadv[@]}" "${mod_info_controlsystemse2[@]}" "${mod_info_e2pistontiming[@]}" "${mod_info_propcannontool[@]}" "${mod_info_gearassemblytool[@]}" "${mod_info_spinnertool[@]}" "${mod_info_surfacefrictiontool[@]}" "${mod_info_magneticdipole[@]}" "${mod_info_environmentorganizer[@]}" "${mod_info_precision_alignment[@]}" "${mod_info_improved_stacker[@]}" "${mod_info_improved_weight[@]}" "${mod_info_improved_antinoclip[@]}" "${mod_info_laserstool[@]}" "${mod_info_valheimplus[@]}") +mods_global_array=("${mod_info_metamod[@]}" "${mod_info_base_amxx[@]}" "${mod_info_cs_amxx[@]}" "${mod_info_dod_amxx[@]}" "${mod_info_tfc_amxx[@]}" "${mod_info_ns_amxx[@]}" "${mod_info_ts_amxx[@]}" "${mod_info_metamodsource[@]}" "${mod_info_sourcemod[@]}" "${mod_info_steamworks[@]}" "${mod_info_gokz[@]}" "${mod_info_ttt[@]}" "${mod_info_get5[@]}" "${mod_info_prac[@]}" "${mod_info_pug[@]}" "${mod_info_dhook[@]}" "${mod_info_movement[@]}" "${mod_info_cleaner[@]}" "${mod_info_ulib[@]}" "${mod_info_ulx[@]}" "${mod_info_utime[@]}" "${mod_info_uclip[@]}" "${mod_info_acf[@]}" "${mod_info_acf_missiles[@]}" "${mod_info_acf_sweps[@]}" "${mod_info_advdupe2[@]}" "${mod_info_pac3[@]}" "${mod_info_wiremod[@]}" "${mod_info_wiremodextras[@]}" "${mod_info_darkrp[@]}" "${mod_info_darkrpmodification[@]}" "${mod_info_rustoxide[@]}" "${mod_info_hwoxide[@]}" "${mod_info_sdtdoxide[@]}" "${mod_info_advduplicator[@]}" "${mod_info_trackassemblytool[@]}" "${mod_info_physpropertiesadv[@]}" "${mod_info_controlsystemse2[@]}" "${mod_info_e2pistontiming[@]}" "${mod_info_propcannontool[@]}" "${mod_info_gearassemblytool[@]}" "${mod_info_spinnertool[@]}" "${mod_info_surfacefrictiontool[@]}" "${mod_info_magneticdipole[@]}" "${mod_info_environmentorganizer[@]}" "${mod_info_precision_alignment[@]}" "${mod_info_improved_stacker[@]}" "${mod_info_improved_weight[@]}" "${mod_info_improved_antinoclip[@]}" "${mod_info_laserstool[@]}" "${mod_info_valheimplus[@]}" "${mod_info_bepinexvh[@]}") From fa5f37b3271cf10a65331f0585752b2047599f6b Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 30 Oct 2022 22:33:15 +0000 Subject: [PATCH 043/374] missing bin/bash --- .github/workflows/version-check.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/version-check.sh b/.github/workflows/version-check.sh index f470fd02b..4e7280509 100644 --- a/.github/workflows/version-check.sh +++ b/.github/workflows/version-check.sh @@ -1,3 +1,4 @@ +#!/bin/bash version=$(grep "version=" linuxgsm.sh | sed -e 's/version//g' | tr -d '="') modulesversion=$(grep "modulesversion=" lgsm/functions/core_functions.sh | sed -e 's/modulesversion//g' | tr -d '="') From 0487d7f3dfb4016e7d9162422f92e364a1394987 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 30 Oct 2022 22:41:24 +0000 Subject: [PATCH 044/374] codacy --- lgsm/functions/command_dev_query_raw.sh | 60 ++++++++++++------------- lgsm/functions/command_fastdl.sh | 18 ++++---- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/lgsm/functions/command_dev_query_raw.sh b/lgsm/functions/command_dev_query_raw.sh index 91db16584..d626dc204 100755 --- a/lgsm/functions/command_dev_query_raw.sh +++ b/lgsm/functions/command_dev_query_raw.sh @@ -28,169 +28,169 @@ echo -e "==================================================================" { echo -e "${lightblue}Port Name \tPort Number \tStatus \tTCP \tUDP${default}" if [ -v port ]; then - echo -e "Game: \t${port} \t$(ss -tupl | grep ${port} | wc -l) \t$(ss -tupl | grep ${port} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${port} | grep udp | awk '{ print $2 }')" + echo -e "Game: \t${port} \t$(ss -tupl | grep -c ${port}) \t$(ss -tupl | grep ${port} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${port} | grep udp | awk '{ print $2 }')" else echo -e "Game:" fi if [ "${shortname}" == "rw" ]; then if [ -v port2 ]; then - echo -e "Game+1: \t${port2} \t$(ss -tupl | grep ${port} | wc -l) \t$(ss -tupl | grep ${port2} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${port2} | grep udp | awk '{ print $2 }')" + echo -e "Game+1: \t${port2} \t$(ss -tupl | grep -c ${port}) \t$(ss -tupl | grep ${port2} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${port2} | grep udp | awk '{ print $2 }')" else echo -e "Game+1:" fi if [ -v port3 ]; then - echo -e "Game+2: \t${port3} \t$(ss -tupl | grep ${port} | wc -l) \t$(ss -tupl | grep ${port3} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${port3} | grep udp | awk '{ print $2 }')" + echo -e "Game+2: \t${port3} \t$(ss -tupl | grep -c ${port}) \t$(ss -tupl | grep ${port3} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${port3} | grep udp | awk '{ print $2 }')" else echo -e "Game+2:" fi if [ -v port4 ]; then - echo -e "Game+3: \t${port4} \t$(ss -tupl | grep ${port} | wc -l) \t$(ss -tupl | grep ${port4} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${port4} | grep udp | awk '{ print $2 }')" + echo -e "Game+3: \t${port4} \t$(ss -tupl | grep -c ${port}) \t$(ss -tupl | grep ${port4} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${port4} | grep udp | awk '{ print $2 }')" else echo -e "Game+3:" fi fi if [ -v port401 ]; then - echo -e "Game+400: \t${port401} \t$(ss -tupl | grep ${port401} | wc -l) \t$(ss -tupl | grep ${port401} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${port401} | grep udp | awk '{ print $2 }')" + echo -e "Game+400: \t${port401} \t$(ss -tupl | grep -c ${port401}) \t$(ss -tupl | grep ${port401} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${port401} | grep udp | awk '{ print $2 }')" else echo -e "Game+400:" fi if [ -v portipv6 ]; then - echo -e "Game ipv6: \t${portipv6} \t$(ss -tupl | grep ${portipv6} | wc -l) \t$(ss -tupl | grep ${portipv6} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${portipv6} | grep udp | awk '{ print $2 }')" + echo -e "Game ipv6: \t${portipv6} \t$(ss -tupl | grep -c ${portipv6}) \t$(ss -tupl | grep ${portipv6} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${portipv6} | grep udp | awk '{ print $2 }')" else echo -e "Game ipv6:" fi if [ -v queryport ]; then - echo -e "Query: \t${queryport} \t$(ss -tupl | grep ${queryport} | wc -l) \t$(ss -tupl | grep ${queryport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${queryport} | grep udp | awk '{ print $2 }')" + echo -e "Query: \t${queryport} \t$(ss -tupl | grep -c ${queryport}) \t$(ss -tupl | grep ${queryport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${queryport} | grep udp | awk '{ print $2 }')" else echo -e "Query:" fi if [ -v httpport ]; then - echo -e "HTTP: \t${httpport} \t$(ss -tupl | grep ${httpport} | wc -l) \t$(ss -tupl | grep ${httpport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${httpport} | grep udp | awk '{ print $2 }')" + echo -e "HTTP: \t${httpport} \t$(ss -tupl | grep -c ${httpport}) \t$(ss -tupl | grep ${httpport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${httpport} | grep udp | awk '{ print $2 }')" else echo -e "HTTP:" fi if [ -v httpqueryport ]; then - echo -e "HTTP Query: \t${httpqueryport} \t$(ss -tupl | grep ${httpqueryport} | wc -l) \t$(ss -tupl | grep ${httpqueryport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${httpqueryport} | grep udp | awk '{ print $2 }')" + echo -e "HTTP Query: \t${httpqueryport} \t$(ss -tupl | grep -c ${httpqueryport}) \t$(ss -tupl | grep ${httpqueryport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${httpqueryport} | grep udp | awk '{ print $2 }')" else echo -e "HTTP Query:" fi if [ -v webadminport ]; then - echo -e "Web Admin: \t${webadminport} \t$(ss -tupl | grep ${webadminport} | wc -l) \t$(ss -tupl | grep ${webadminport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${webadminport} | grep udp | awk '{ print $2 }')" + echo -e "Web Admin: \t${webadminport} \t$(ss -tupl | grep -c ${webadminport}) \t$(ss -tupl | grep ${webadminport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${webadminport} | grep udp | awk '{ print $2 }')" else echo -e "Web Admin:" fi if [ -v clientport ]; then - echo -e "Client: \t${clientport} \t$(ss -tupl | grep ${clientport} | wc -l) \t$(ss -tupl | grep ${clientport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${clientport} | grep udp | awk '{ print $2 }')" + 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 echo -e "Client:" fi if [ -v rconport ]; then - echo -e "RCON: \t${rconport} \t$(ss -tupl | grep ${rconport} | wc -l) \t$(ss -tupl | grep ${rconport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${rconport} | grep udp | awk '{ print $2 }')" + echo -e "RCON: \t${rconport} \t$(ss -tupl | grep -c ${rconport}) \t$(ss -tupl | grep ${rconport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${rconport} | grep udp | awk '{ print $2 }')" else echo -e "RCON:" fi if [ -v rawport ]; then - echo -e "RAW UDP Socket: \t${rawport} \t$(ss -tupl | grep ${rawport} | wc -l) \t$(ss -tupl | grep ${rawport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${rawport} | grep udp | awk '{ print $2 }')" + echo -e "RAW UDP Socket: \t${rawport} \t$(ss -tupl | grep -c ${rawport}) \t$(ss -tupl | grep ${rawport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${rawport} | grep udp | awk '{ print $2 }')" else echo -e "RAW UDP Socket:" fi if [ -v masterport ]; then - echo -e "Game: Master: \t${masterport} \t$(ss -tupl | grep ${masterport} | wc -l) \t$(ss -tupl | grep ${masterport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${masterport} | grep udp | awk '{ print $2 }')" + echo -e "Game: Master: \t${masterport} \t$(ss -tupl | grep -c ${masterport}) \t$(ss -tupl | grep ${masterport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${masterport} | grep udp | awk '{ print $2 }')" else echo -e "Game: Master:" fi if [ -v steamport ]; then - echo -e "Steam: \t${steamport} \t$(ss -tupl | grep ${steamport} | wc -l) \t$(ss -tupl | grep ${steamport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${steamport} | grep udp | awk '{ print $2 }')" + echo -e "Steam: \t${steamport} \t$(ss -tupl | grep -c ${steamport}) \t$(ss -tupl | grep ${steamport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${steamport} | grep udp | awk '{ print $2 }')" else echo -e "Steam:" fi if [ -v steamauthport ]; then - echo -e "Steam: Auth: \t${steamauthport} \t$(ss -tupl | grep ${steamauthport} | wc -l) \t$(ss -tupl | grep ${steamauthport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${steamauthport} | grep udp | awk '{ print $2 }')" + echo -e "Steam: Auth: \t${steamauthport} \t$(ss -tupl | grep -c ${steamauthport}) \t$(ss -tupl | grep ${steamauthport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${steamauthport} | grep udp | awk '{ print $2 }')" else echo -e "Steam: Auth:" fi if [ -v steammasterport ]; then - echo -e "Steam: Master: \t${steammasterport} \t$(ss -tupl | grep ${steammasterport} | wc -l) \t$(ss -tupl | grep ${steammasterport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${steammasterport} | grep udp | awk '{ print $2 }')" + echo -e "Steam: Master: \t${steammasterport} \t$(ss -tupl | grep -c ${steammasterport}) \t$(ss -tupl | grep ${steammasterport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${steammasterport} | grep udp | awk '{ print $2 }')" else echo -e "Steam: Master:" fi if [ -v steamqueryport ]; then - echo -e "Steam: Query: \t${steamqueryport} \t$(ss -tupl | grep ${steamqueryport} | wc -l) \t$(ss -tupl | grep ${steamqueryport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${steamqueryport} | grep udp | awk '{ print $2 }')" + echo -e "Steam: Query: \t${steamqueryport} \t$(ss -tupl | grep -c ${steamqueryport}) \t$(ss -tupl | grep ${steamqueryport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${steamqueryport} | grep udp | awk '{ print $2 }')" else echo -e "Steam: Query:" fi if [ -v beaconport ]; then - echo -e "Beacon: \t${beaconport} \t$(ss -tupl | grep ${beaconport} | wc -l) \t$(ss -tupl | grep ${beaconport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${beaconport} | grep udp | awk '{ print $2 }')" + echo -e "Beacon: \t${beaconport} \t$(ss -tupl | grep -c ${beaconport}) \t$(ss -tupl | grep ${beaconport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${beaconport} | grep udp | awk '{ print $2 }')" else echo -e "Beacon:" fi if [ -v appport ]; then - echo -e "App: \t${appport} \t$(ss -tupl | grep ${appport} | wc -l) \t$(ss -tupl | grep ${appport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${appport} | grep udp | awk '{ print $2 }')" + echo -e "App: \t${appport} \t$(ss -tupl | grep -c ${appport}) \t$(ss -tupl | grep ${appport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${appport} | grep udp | awk '{ print $2 }')" else echo -e "App:" fi if [ -v telnetport ]; then - echo -e "Telnet: \t${telnetport} \t$(ss -tupl | grep ${telnetport} | wc -l) \t$(ss -tupl | grep ${telnetport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${telnetport} | grep udp | awk '{ print $2 }')" + echo -e "Telnet: \t${telnetport} \t$(ss -tupl | grep -c ${telnetport}) \t$(ss -tupl | grep ${telnetport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${telnetport} | grep udp | awk '{ print $2 }')" else echo -e "Telnet:" fi if [ -v sourcetvport ]; then - echo -e "SourceTV: \t${sourcetvport} \t$(ss -tupl | grep ${sourcetvport} | wc -l) \t$(ss -tupl | grep ${sourcetvport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${sourcetvport} | grep udp | awk '{ print $2 }')" + echo -e "SourceTV: \t${sourcetvport} \t$(ss -tupl | grep -c ${sourcetvport}) \t$(ss -tupl | grep ${sourcetvport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${sourcetvport} | grep udp | awk '{ print $2 }')" else echo -e "SourceTV:" fi if [ -v fileport ]; then - echo -e "File: \t${fileport} \t$(ss -tupl | grep ${fileport} | wc -l) \t$(ss -tupl | grep ${fileport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${fileport} | grep udp | awk '{ print $2 }')" + echo -e "File: \t${fileport} \t$(ss -tupl | grep -c ${fileport}) \t$(ss -tupl | grep ${fileport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${fileport} | grep udp | awk '{ print $2 }')" else echo -e "File:" fi if [ -v udplinkport ]; then - echo -e "UDP Link: \t${udplinkport} \t$(ss -tupl | grep ${udplinkport} | wc -l) \t$(ss -tupl | grep ${udplinkport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${udplinkport} | grep udp | awk '{ print $2 }')" + echo -e "UDP Link: \t${udplinkport} \t$(ss -tupl | grep -c ${udplinkport}) \t$(ss -tupl | grep ${udplinkport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${udplinkport} | grep udp | awk '{ print $2 }')" else echo -e "UDP Link:" fi if [ -v voiceport ]; then - echo -e "Voice: \t${voiceport} \t$(ss -tupl | grep ${voiceport} | wc -l) \t$(ss -tupl | grep ${voiceport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${voiceport} | grep udp | awk '{ print $2 }')" + echo -e "Voice: \t${voiceport} \t$(ss -tupl | grep -c ${voiceport}) \t$(ss -tupl | grep ${voiceport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${voiceport} | grep udp | awk '{ print $2 }')" else echo -e "Voice:" fi if [ -v voiceunusedport ]; then - echo -e "Voice (Unused): \t${voiceunusedport} \t$(ss -tupl | grep ${voiceunusedport} | wc -l) \t$(ss -tupl | grep ${voiceunusedport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${voiceunusedport} | grep udp | awk '{ print $2 }')" + echo -e "Voice (Unused): \t${voiceunusedport} \t$(ss -tupl | grep -c ${voiceunusedport}) \t$(ss -tupl | grep ${voiceunusedport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${voiceunusedport} | grep udp | awk '{ print $2 }')" else echo -e "Voice (Unused):" fi if [ -v battleeyeport ]; then - echo -e "BattleEye: \t${battleeyeport} \t$(ss -tupl | grep ${battleeyeport} | wc -l) \t$(ss -tupl | grep ${battleeyeport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${battleeyeport} | grep udp | awk '{ print $2 }')" + echo -e "BattleEye: \t${battleeyeport} \t$(ss -tupl | grep -c ${battleeyeport}) \t$(ss -tupl | grep ${battleeyeport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${battleeyeport} | grep udp | awk '{ print $2 }')" else echo -e "BattleEye:" fi if [ -v statsport ]; then - echo -e "Stats: \t${battleeyeport} \t$(ss -tupl | grep ${statsport} | wc -l) \t$(ss -tupl | grep ${statsport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${statsport} | grep udp | awk '{ print $2 }')" + echo -e "Stats: \t${battleeyeport} \t$(ss -tupl | grep -c ${statsport}) \t$(ss -tupl | grep ${statsport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${statsport} | grep udp | awk '{ print $2 }')" else echo -e "Stats:" fi @@ -210,10 +210,10 @@ echo -e "" echo -e "${lightgreen}Gamedig Raw Output${default}" echo -e "=================================" echo -e "" -if [ ! "$(command -v gamedig 2> /dev/null)" ]; then +if [ ! "$(command -v gamedig 2>/dev/null)" ]; then fn_print_failure_nl "gamedig not installed" fi -if [ ! "$(command -v jq 2> /dev/null)" ]; then +if [ ! "$(command -v jq 2>/dev/null)" ]; then fn_print_failure_nl "jq not installed" fi for queryip in "${queryips[@]}"; do diff --git a/lgsm/functions/command_fastdl.sh b/lgsm/functions/command_fastdl.sh index e90ccc5e0..5a6b3221d 100755 --- a/lgsm/functions/command_fastdl.sh +++ b/lgsm/functions/command_fastdl.sh @@ -24,7 +24,7 @@ luafastdlfile="lgsm_cl_force_fastdl.lua" luafastdlfullpath="${luasvautorundir}/${luafastdlfile}" # Check if bzip2 is installed. -if [ ! "$(command -v bzip2 2> /dev/null)" ]; then +if [ ! "$(command -v bzip2 2>/dev/null)" ]; then fn_print_fail "bzip2 is not installed" fn_script_log_fatal "bzip2 is not installed" core_exit.sh @@ -133,7 +133,7 @@ fn_human_readable_file_size() { local factor="${item%:*}" local abbrev="${item#*:}" if [[ "${bytes}" -ge "${factor}" ]]; then - size=$(bc -l <<< "${bytes} / ${factor}") + size=$(bc -l <<<"${bytes} / ${factor}") printf "%.*f %s\n" "${precision}" "${size}" "${abbrev}" break fi @@ -161,7 +161,7 @@ fn_fastdl_preview() { tput rc tput el echo -e "gathering ${allowed_extention} : ${fileswc}..." - echo -e "${ext}" >> "${tmpdir}/fastdl_files_to_compress.txt" + echo -e "${ext}" >>"${tmpdir}/fastdl_files_to_compress.txt" done < <(find . -type f -iname "${allowed_extention}") if [ ${fileswc} != 0 ]; then fn_print_ok_eol_nl @@ -193,7 +193,7 @@ fn_fastdl_preview() { tput rc tput el echo -e "gathering ${directory} ${allowed_extention} : ${fileswc}..." - echo -e "${ext}" >> "${tmpdir}/fastdl_files_to_compress.txt" + echo -e "${ext}" >>"${tmpdir}/fastdl_files_to_compress.txt" done < <(find "${systemdir}/${directory}" -type f -iname "${allowed_extention}") tput rc tput el @@ -210,7 +210,7 @@ fn_fastdl_preview() { if [ -f "${tmpdir}/fastdl_files_to_compress.txt" ]; then echo -e "calculating total file size..." fn_sleep_time - totalfiles=$(wc -l < "${tmpdir}/fastdl_files_to_compress.txt") + totalfiles=$(wc -l <"${tmpdir}/fastdl_files_to_compress.txt") # Calculates total file size. while read -r dufile; do filesize=$(stat -c %s "${dufile}") @@ -221,7 +221,7 @@ fn_fastdl_preview() { fn_script_log_fatal "Calculating total file size." core_exit.sh fi - done < "${tmpdir}/fastdl_files_to_compress.txt" + done <"${tmpdir}/fastdl_files_to_compress.txt" else fn_print_fail_eol_nl "generating file list" fn_script_log_fatal "Generating file list." @@ -304,12 +304,12 @@ fn_fastdl_gmod() { fi fi if [ -f "${tmpdir}/fastdl_files_to_compress.txt" ]; then - totalfiles=$(wc -l < "${tmpdir}/fastdl_files_to_compress.txt") + totalfiles=$(wc -l <"${tmpdir}/fastdl_files_to_compress.txt") # Calculates total file size. while read -r dufile; do filesize=$(du -b "${dufile}" | awk '{ print $1 }') filesizetotal=$((filesizetotal + filesize)) - done < "${tmpdir}/fastdl_files_to_compress.txt" + done <"${tmpdir}/fastdl_files_to_compress.txt" fi } @@ -396,7 +396,7 @@ fn_fastdl_gmod_dl_enforcer() { touch "${luafastdlfullpath}" # Read all filenames and put them into a lua file at the right path. while read -r line; do - echo -e "resource.AddFile( \"${line}\" )" >> "${luafastdlfullpath}" + echo -e "resource.AddFile( \"${line}\" )" >>"${luafastdlfullpath}" done < <(find "${fastdldir:?}" \( -type f ! -name "*.bz2" \) -printf '%P\n') exitcode=$? if [ "${exitcode}" != 0 ]; then From 29d04fdff01564549b542c8ffd98e7f14c3fa7bf Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 30 Oct 2022 22:42:00 +0000 Subject: [PATCH 045/374] deploy only master --- .github/workflows/trigger_docker_build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/trigger_docker_build.yml b/.github/workflows/trigger_docker_build.yml index 0f1055c7d..697511816 100644 --- a/.github/workflows/trigger_docker_build.yml +++ b/.github/workflows/trigger_docker_build.yml @@ -3,7 +3,6 @@ on: push: branches: - master - - develop jobs: trigger_build_docker-linuxgsm: name: Trigger Build docker-linuxgsm From 16dcc760630683a517618a5d483dcfadfe15f921 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 30 Oct 2022 22:54:20 +0000 Subject: [PATCH 046/374] codacy --- lgsm/functions/fix_lo.sh | 10 +++++----- lgsm/functions/update_papermc.sh | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lgsm/functions/fix_lo.sh b/lgsm/functions/fix_lo.sh index b868a55b4..eec2ebd36 100644 --- a/lgsm/functions/fix_lo.sh +++ b/lgsm/functions/fix_lo.sh @@ -6,12 +6,12 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -local APPID_FILE=${executabledir}/steam_appid.txt -if [ ! -f "${APPID_FILE}" ]; then - fn_print_information "adding ${APPID_FILE} to ${gamename} server." +appidfile=${executabledir}/steam_appid.txt +if [ ! -f "${appidfile}" ]; then + fn_print_information "adding ${appidfile} to ${gamename} server." fn_sleep_time - echo "903950" > "${APPID_FILE}" + echo "903950" > "${appidfile}" else - fn_print_information "${APPID_FILE} already exists. No action to be taken." + fn_print_information "${appidfile} already exists. No action to be taken." fn_sleep_time fi diff --git a/lgsm/functions/update_papermc.sh b/lgsm/functions/update_papermc.sh index 1f334549c..302e0baac 100644 --- a/lgsm/functions/update_papermc.sh +++ b/lgsm/functions/update_papermc.sh @@ -5,9 +5,9 @@ # Website: https://linuxgsm.com # Description: Handles updating of PaperMC and Waterfall servers. -local commandname="UPDATE" -local commandaction="Update" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +commandname="UPDATE" +commandaction="Update" +function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_papermc_dl() { # get build info From 81b4cf049ced408159a34a7b79de9069de1a98bf Mon Sep 17 00:00:00 2001 From: AlasdairHaig Date: Mon, 7 Nov 2022 11:14:11 +0100 Subject: [PATCH 047/374] Updating new starting parameters Adding new server start parameters, like crossplay, to the default config --- lgsm/config-default/config-lgsm/vhserver/_default.cfg | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/vhserver/_default.cfg b/lgsm/config-default/config-lgsm/vhserver/_default.cfg index 89babe324..72fbc1a29 100644 --- a/lgsm/config-default/config-lgsm/vhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vhserver/_default.cfg @@ -16,9 +16,16 @@ port="2456" gameworld="${selfname}" public="1" savedir="$HOME/.config/unity3d/IronGate/Valheim" +logFile="" +saveinterval="1800" +backups="4" +backupshort="7200" +backuplong="43200" +# Clear crossplay to set to false +crossplay="set" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-name '${servername}' -password ${serverpassword} -port ${port} -world ${gameworld} -public ${public} -savedir '${savedir}'" +startparameters="-name '${servername}' -password ${serverpassword} -port ${port} -world ${gameworld} -public ${public} -savedir '${savedir}' -logFile '${logFile}' -saveinterval ${saveinterval} -backups ${backups} -backupshort ${backupshort} -backuplong ${backuplong} ${crossplay:+'-crossplay'}" #### LinuxGSM Settings #### From 10010d7d22e8b2fe8c24c3f016820c991feb915a Mon Sep 17 00:00:00 2001 From: AlasdairHaig Date: Mon, 7 Nov 2022 13:14:56 +0100 Subject: [PATCH 048/374] Update linuxgsm.sh --- linuxgsm.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/linuxgsm.sh b/linuxgsm.sh index 7d9f21d0b..ac3be5663 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -43,6 +43,7 @@ configdirserver="${configdir}/${gameservername}" configdirdefault="${lgsmdir}/config-default" userinput="${1}" userinput2="${2}" +LGSM_GITHUBUSER="AlasdairHaig" ## GitHub Branch Select # Allows for the use of different function files From b1be4c912ee5c0f20fa1ad7a5d35db09953acd43 Mon Sep 17 00:00:00 2001 From: Alasdair Haig Date: Mon, 7 Nov 2022 12:37:32 +0000 Subject: [PATCH 049/374] Revert "Update linuxgsm.sh" This reverts commit 10010d7d22e8b2fe8c24c3f016820c991feb915a. --- linuxgsm.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index ac3be5663..7d9f21d0b 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -43,7 +43,6 @@ configdirserver="${configdir}/${gameservername}" configdirdefault="${lgsmdir}/config-default" userinput="${1}" userinput2="${2}" -LGSM_GITHUBUSER="AlasdairHaig" ## GitHub Branch Select # Allows for the use of different function files From 592f5ce0e2debdb7f1c0971a8494542ddc216119 Mon Sep 17 00:00:00 2001 From: AlasdairHaig Date: Mon, 7 Nov 2022 14:01:16 +0100 Subject: [PATCH 050/374] Remove single quoations --- lgsm/config-default/config-lgsm/vhserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/vhserver/_default.cfg b/lgsm/config-default/config-lgsm/vhserver/_default.cfg index 72fbc1a29..4203e6a49 100644 --- a/lgsm/config-default/config-lgsm/vhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vhserver/_default.cfg @@ -25,7 +25,7 @@ backuplong="43200" crossplay="set" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-name '${servername}' -password ${serverpassword} -port ${port} -world ${gameworld} -public ${public} -savedir '${savedir}' -logFile '${logFile}' -saveinterval ${saveinterval} -backups ${backups} -backupshort ${backupshort} -backuplong ${backuplong} ${crossplay:+'-crossplay'}" +startparameters="-name '${servername}' -password ${serverpassword} -port ${port} -world ${gameworld} -public ${public} -savedir '${savedir}' -logFile '${logFile}' -saveinterval ${saveinterval} -backups ${backups} -backupshort ${backupshort} -backuplong ${backuplong} ${crossplay:+-crossplay}" #### LinuxGSM Settings #### From 756cac442f17e824e3301f216a824a54df93a5b7 Mon Sep 17 00:00:00 2001 From: alasdair Date: Fri, 11 Nov 2022 19:47:56 +0100 Subject: [PATCH 051/374] Have fork reference self --- linuxgsm.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index 7d9f21d0b..461b30662 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -47,9 +47,9 @@ userinput2="${2}" ## GitHub Branch Select # Allows for the use of different function files # from a different repo and/or branch. -[ -n "${LGSM_GITHUBUSER}" ] && githubuser="${LGSM_GITHUBUSER}" || githubuser="GameServerManagers" -[ -n "${LGSM_GITHUBREPO}" ] && githubrepo="${LGSM_GITHUBREPO}" || githubrepo="LinuxGSM" -[ -n "${LGSM_GITHUBBRANCH}" ] && githubbranch="${LGSM_GITHUBBRANCH}" || githubbranch="master" +githubuser="AlasdairHaig" +githubrepo="LinuxGSM" +githubbranch="master" # Check that curl is installed before doing anything if [ ! "$(command -v curl 2>/dev/null)" ]; then From 34a2a0f0d5f88c4d9041f54ee89e58a697eb9f87 Mon Sep 17 00:00:00 2001 From: alasdair Date: Fri, 11 Nov 2022 19:53:04 +0100 Subject: [PATCH 052/374] Set crossplay to off until it works --- lgsm/config-default/config-lgsm/vhserver/_default.cfg | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lgsm/config-default/config-lgsm/vhserver/_default.cfg b/lgsm/config-default/config-lgsm/vhserver/_default.cfg index 4203e6a49..85f13614d 100644 --- a/lgsm/config-default/config-lgsm/vhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vhserver/_default.cfg @@ -21,8 +21,9 @@ saveinterval="1800" backups="4" backupshort="7200" backuplong="43200" -# Clear crossplay to set to false -crossplay="set" +# If crossplay is empty, it's off. Fill with any text to make true +# Crossplay is currently not working on Linux dedicated servers, so for now the default is false (emtpy) +crossplay="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters startparameters="-name '${servername}' -password ${serverpassword} -port ${port} -world ${gameworld} -public ${public} -savedir '${savedir}' -logFile '${logFile}' -saveinterval ${saveinterval} -backups ${backups} -backupshort ${backupshort} -backuplong ${backuplong} ${crossplay:+-crossplay}" From 6cf4c1e00ea78be10dee9cbadf3f0faa3510c03f Mon Sep 17 00:00:00 2001 From: alasdair Date: Fri, 11 Nov 2022 21:32:53 +0100 Subject: [PATCH 054/374] Revert "Have fork reference self" This reverts commit 756cac442f17e824e3301f216a824a54df93a5b7. --- linuxgsm.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index 461b30662..7d9f21d0b 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -47,9 +47,9 @@ userinput2="${2}" ## GitHub Branch Select # Allows for the use of different function files # from a different repo and/or branch. -githubuser="AlasdairHaig" -githubrepo="LinuxGSM" -githubbranch="master" +[ -n "${LGSM_GITHUBUSER}" ] && githubuser="${LGSM_GITHUBUSER}" || githubuser="GameServerManagers" +[ -n "${LGSM_GITHUBREPO}" ] && githubrepo="${LGSM_GITHUBREPO}" || githubrepo="LinuxGSM" +[ -n "${LGSM_GITHUBBRANCH}" ] && githubbranch="${LGSM_GITHUBBRANCH}" || githubbranch="master" # Check that curl is installed before doing anything if [ ! "$(command -v curl 2>/dev/null)" ]; then From 11078b3bf7679a9b0586a5b50cc4947601977a76 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 13 Jan 2023 18:57:26 +0000 Subject: [PATCH 055/374] fix(terraria): remove broken dependency requirement --- lgsm/data/ubuntu-21.04.csv | 2 +- lgsm/data/ubuntu-21.10.csv | 2 +- lgsm/data/ubuntu-22.04.csv | 2 +- lgsm/functions/check_deps.sh | 2 +- lgsm/functions/command_dev_query_raw.sh | 4 ++-- lgsm/functions/command_fastdl.sh | 18 +++++++++--------- lgsm/functions/mods_list.sh | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/lgsm/data/ubuntu-21.04.csv b/lgsm/data/ubuntu-21.04.csv index 666f9d864..158f6222b 100644 --- a/lgsm/data/ubuntu-21.04.csv +++ b/lgsm/data/ubuntu-21.04.csv @@ -104,7 +104,7 @@ squad st stn sven,libssl1.1:i386,zlib1g:i386 -terraria,libsdl +terraria tf2,libcurl4-gnutls-dev:i386 tfc ti diff --git a/lgsm/data/ubuntu-21.10.csv b/lgsm/data/ubuntu-21.10.csv index 713d21a89..58f55fc00 100644 --- a/lgsm/data/ubuntu-21.10.csv +++ b/lgsm/data/ubuntu-21.10.csv @@ -102,7 +102,7 @@ squad st stn sven,libssl1.1:i386,zlib1g:i386 -terraria,libsdl +terraria tf2,libcurl4-gnutls-dev:i386 tfc ti diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index b65fc60ac..d5d20b641 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -102,7 +102,7 @@ squad st stn sven,libssl1.1:i386,zlib1g:i386 -terraria,libsdl +terraria tf2,libcurl4-gnutls-dev:i386 tfc ti diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh index 194f5541e..bb8507769 100755 --- a/lgsm/functions/check_deps.sh +++ b/lgsm/functions/check_deps.sh @@ -337,7 +337,7 @@ fi if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then depall=$(awk -F, '$1=="all" {$1=""; print $0}' "${datadir}/${distroid}-${distroversioncsv}.csv") depsteamcmd=$(awk -F, '$1=="steamcmd" {$1=""; print $0}' "${datadir}/${distroid}-${distroversioncsv}.csv") - depshortname=$(awk -v shortname="$shortname" -F, '$1==shortname {$1=""; print $0}' "${datadir}/${distroid}-${distroversioncsv}.csv") + depshortname=$(awk -v shortname="${shortname}" -F, '$1==shortname {$1=""; print $0}' "${datadir}/${distroid}-${distroversioncsv}.csv") # Generate array of missing deps. array_deps_missing=() diff --git a/lgsm/functions/command_dev_query_raw.sh b/lgsm/functions/command_dev_query_raw.sh index d626dc204..26884b259 100755 --- a/lgsm/functions/command_dev_query_raw.sh +++ b/lgsm/functions/command_dev_query_raw.sh @@ -210,10 +210,10 @@ echo -e "" echo -e "${lightgreen}Gamedig Raw Output${default}" echo -e "=================================" echo -e "" -if [ ! "$(command -v gamedig 2>/dev/null)" ]; then +if [ ! "$(command -v gamedig 2> /dev/null)" ]; then fn_print_failure_nl "gamedig not installed" fi -if [ ! "$(command -v jq 2>/dev/null)" ]; then +if [ ! "$(command -v jq 2> /dev/null)" ]; then fn_print_failure_nl "jq not installed" fi for queryip in "${queryips[@]}"; do diff --git a/lgsm/functions/command_fastdl.sh b/lgsm/functions/command_fastdl.sh index 5a6b3221d..e90ccc5e0 100755 --- a/lgsm/functions/command_fastdl.sh +++ b/lgsm/functions/command_fastdl.sh @@ -24,7 +24,7 @@ luafastdlfile="lgsm_cl_force_fastdl.lua" luafastdlfullpath="${luasvautorundir}/${luafastdlfile}" # Check if bzip2 is installed. -if [ ! "$(command -v bzip2 2>/dev/null)" ]; then +if [ ! "$(command -v bzip2 2> /dev/null)" ]; then fn_print_fail "bzip2 is not installed" fn_script_log_fatal "bzip2 is not installed" core_exit.sh @@ -133,7 +133,7 @@ fn_human_readable_file_size() { local factor="${item%:*}" local abbrev="${item#*:}" if [[ "${bytes}" -ge "${factor}" ]]; then - size=$(bc -l <<<"${bytes} / ${factor}") + size=$(bc -l <<< "${bytes} / ${factor}") printf "%.*f %s\n" "${precision}" "${size}" "${abbrev}" break fi @@ -161,7 +161,7 @@ fn_fastdl_preview() { tput rc tput el echo -e "gathering ${allowed_extention} : ${fileswc}..." - echo -e "${ext}" >>"${tmpdir}/fastdl_files_to_compress.txt" + echo -e "${ext}" >> "${tmpdir}/fastdl_files_to_compress.txt" done < <(find . -type f -iname "${allowed_extention}") if [ ${fileswc} != 0 ]; then fn_print_ok_eol_nl @@ -193,7 +193,7 @@ fn_fastdl_preview() { tput rc tput el echo -e "gathering ${directory} ${allowed_extention} : ${fileswc}..." - echo -e "${ext}" >>"${tmpdir}/fastdl_files_to_compress.txt" + echo -e "${ext}" >> "${tmpdir}/fastdl_files_to_compress.txt" done < <(find "${systemdir}/${directory}" -type f -iname "${allowed_extention}") tput rc tput el @@ -210,7 +210,7 @@ fn_fastdl_preview() { if [ -f "${tmpdir}/fastdl_files_to_compress.txt" ]; then echo -e "calculating total file size..." fn_sleep_time - totalfiles=$(wc -l <"${tmpdir}/fastdl_files_to_compress.txt") + totalfiles=$(wc -l < "${tmpdir}/fastdl_files_to_compress.txt") # Calculates total file size. while read -r dufile; do filesize=$(stat -c %s "${dufile}") @@ -221,7 +221,7 @@ fn_fastdl_preview() { fn_script_log_fatal "Calculating total file size." core_exit.sh fi - done <"${tmpdir}/fastdl_files_to_compress.txt" + done < "${tmpdir}/fastdl_files_to_compress.txt" else fn_print_fail_eol_nl "generating file list" fn_script_log_fatal "Generating file list." @@ -304,12 +304,12 @@ fn_fastdl_gmod() { fi fi if [ -f "${tmpdir}/fastdl_files_to_compress.txt" ]; then - totalfiles=$(wc -l <"${tmpdir}/fastdl_files_to_compress.txt") + totalfiles=$(wc -l < "${tmpdir}/fastdl_files_to_compress.txt") # Calculates total file size. while read -r dufile; do filesize=$(du -b "${dufile}" | awk '{ print $1 }') filesizetotal=$((filesizetotal + filesize)) - done <"${tmpdir}/fastdl_files_to_compress.txt" + done < "${tmpdir}/fastdl_files_to_compress.txt" fi } @@ -396,7 +396,7 @@ fn_fastdl_gmod_dl_enforcer() { touch "${luafastdlfullpath}" # Read all filenames and put them into a lua file at the right path. while read -r line; do - echo -e "resource.AddFile( \"${line}\" )" >>"${luafastdlfullpath}" + echo -e "resource.AddFile( \"${line}\" )" >> "${luafastdlfullpath}" done < <(find "${fastdldir:?}" \( -type f ! -name "*.bz2" \) -printf '%P\n') exitcode=$? if [ "${exitcode}" != 0 ]; then diff --git a/lgsm/functions/mods_list.sh b/lgsm/functions/mods_list.sh index 06b534b9e..e8d583251 100755 --- a/lgsm/functions/mods_list.sh +++ b/lgsm/functions/mods_list.sh @@ -96,7 +96,7 @@ oxidesdtdlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos # Valheim Plus valeimpluslatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/valheimPlus/ValheimPlus/releases/latest | jq -r '.assets[]|select(.browser_download_url | contains("UnixServer.tar.gz")) | .browser_download_url') # Valheim BepInEx -bepinexvhlatestlink=$(curl --connect-timeout 10 -sL "https://valheim.thunderstore.io/api/experimental/package/denikson/BepInExPack_Valheim/" -H "accept: application/json" | jq -r '.latest.download_url' ) +bepinexvhlatestlink=$(curl --connect-timeout 10 -sL "https://valheim.thunderstore.io/api/experimental/package/denikson/BepInExPack_Valheim/" -H "accept: application/json" | jq -r '.latest.download_url') # Define mods information (required) From 72dd471ccd5ccf51608ad52412017e8d8ff56dfb Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 13 Jan 2023 20:35:02 +0000 Subject: [PATCH 056/374] fix(armar): update armar dependencies --- lgsm/data/debian-10.csv | 2 +- lgsm/data/debian-11.csv | 2 +- lgsm/data/debian-9.csv | 2 +- lgsm/data/ubuntu-18.04.csv | 2 +- lgsm/data/ubuntu-20.04.csv | 2 +- lgsm/data/ubuntu-21.04.csv | 2 +- lgsm/data/ubuntu-21.10.csv | 2 +- lgsm/data/ubuntu-22.04.csv | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index 82c79d192..dd2abb341 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -5,7 +5,7 @@ ahl ahl2 ark arma3 -armar,libcurl4,libssl1.1 +armar,libcurl4 av bb bb2,libcurl4-gnutls-dev:i386 diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index 158f6222b..2c6a267c1 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -5,7 +5,7 @@ ahl ahl2 ark arma3 -armar,libcurl4,libssl1.1 +armar,libcurl4 av bb bb2,libcurl4-gnutls-dev:i386 diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index f03c39f6a..d69f72ad9 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -5,7 +5,7 @@ ahl ahl2 ark arma3 -armar,libcurl4,libssl1.1 +armar,libcurl4 av bb bb2,libcurl4-gnutls-dev:i386 diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index 82c79d192..dd2abb341 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -5,7 +5,7 @@ ahl ahl2 ark arma3 -armar,libcurl4,libssl1.1 +armar,libcurl4 av bb bb2,libcurl4-gnutls-dev:i386 diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index 65697649b..32b036733 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -5,7 +5,7 @@ ahl ahl2 ark arma3 -armar,libcurl4,libssl1.1 +armar,libcurl4 av bb bb2,libcurl4-gnutls-dev:i386 diff --git a/lgsm/data/ubuntu-21.04.csv b/lgsm/data/ubuntu-21.04.csv index 158f6222b..2c6a267c1 100644 --- a/lgsm/data/ubuntu-21.04.csv +++ b/lgsm/data/ubuntu-21.04.csv @@ -5,7 +5,7 @@ ahl ahl2 ark arma3 -armar,libcurl4,libssl1.1 +armar,libcurl4 av bb bb2,libcurl4-gnutls-dev:i386 diff --git a/lgsm/data/ubuntu-21.10.csv b/lgsm/data/ubuntu-21.10.csv index 58f55fc00..3fed35611 100644 --- a/lgsm/data/ubuntu-21.10.csv +++ b/lgsm/data/ubuntu-21.10.csv @@ -5,7 +5,7 @@ ahl ahl2 ark arma3 -armar,libcurl4,libssl1.1 +armar,libcurl4 av bb bb2,libcurl4-gnutls-dev:i386 diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index d5d20b641..599c11f7a 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -5,7 +5,7 @@ ahl ahl2 ark arma3 -armar,libcurl4,libssl1.1 +armar,libcurl4 av bb bb2,libcurl4-gnutls-dev:i386 From 7e6d2ad0edb23c4c41fb055fd4add023c888588e Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 13 Jan 2023 20:51:26 +0000 Subject: [PATCH 057/374] fix(onset): update onset dependencies --- lgsm/data/debian-10.csv | 2 +- lgsm/data/debian-11.csv | 2 +- lgsm/data/debian-9.csv | 2 +- lgsm/data/ubuntu-16.04.csv | 2 +- lgsm/data/ubuntu-18.04.csv | 2 +- lgsm/data/ubuntu-20.04.csv | 2 +- lgsm/data/ubuntu-21.04.csv | 2 +- lgsm/data/ubuntu-21.10.csv | 2 +- lgsm/data/ubuntu-22.04.csv | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index dd2abb341..9932a3b39 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -73,7 +73,7 @@ nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 ns2c,speex:i386,libtbb2 -onset,libmariadbclient-dev +onset,libmariadb-dev opfor pc pmc,openjdk-11-jre diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index 2c6a267c1..514f98ab8 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -73,7 +73,7 @@ nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 ns2c,speex:i386,libtbb2 -onset,libmariadbclient-dev +onset,libmariadb-dev opfor pc pmc,openjdk-17-jre diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index d69f72ad9..786c8f6c0 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -73,7 +73,7 @@ nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 ns2c,speex:i386,libtbb2 -onset,libmariadbclient-dev +onset,libmariadb-dev opfor pc pmc,openjdk-8-jre diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index fdbcd12d0..b5d8f6faf 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -72,7 +72,7 @@ nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 ns2c,speex:i386,libtbb2 -onset,libmariadbclient-dev +onset,libmariadb-dev opfor pc pmc,openjdk-8-jre diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index dd2abb341..9932a3b39 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -73,7 +73,7 @@ nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 ns2c,speex:i386,libtbb2 -onset,libmariadbclient-dev +onset,libmariadb-dev opfor pc pmc,openjdk-11-jre diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index 32b036733..68dc928d9 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -73,7 +73,7 @@ nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 ns2c,speex:i386,libtbb2 -onset,libmariadbclient-dev +onset,libmariadb-dev opfor pc pmc,openjdk-17-jre diff --git a/lgsm/data/ubuntu-21.04.csv b/lgsm/data/ubuntu-21.04.csv index 2c6a267c1..514f98ab8 100644 --- a/lgsm/data/ubuntu-21.04.csv +++ b/lgsm/data/ubuntu-21.04.csv @@ -73,7 +73,7 @@ nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 ns2c,speex:i386,libtbb2 -onset,libmariadbclient-dev +onset,libmariadb-dev opfor pc pmc,openjdk-17-jre diff --git a/lgsm/data/ubuntu-21.10.csv b/lgsm/data/ubuntu-21.10.csv index 3fed35611..45ce1f640 100644 --- a/lgsm/data/ubuntu-21.10.csv +++ b/lgsm/data/ubuntu-21.10.csv @@ -71,7 +71,7 @@ nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 ns2c,speex:i386,libtbb2 -onset,libmariadbclient-dev +onset,libmariadb-dev opfor pc pmc,openjdk-17-jre diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index 599c11f7a..8b9f02234 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -71,7 +71,7 @@ nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 ns2c,speex:i386,libtbb2 -onset,libmariadbclient-dev +onset,libmariadb-dev opfor pc pmc,openjdk-17-jre From 33185e608c13873edd1bdcd9c14bdf3ae61d98a8 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 13 Jan 2023 20:53:05 +0000 Subject: [PATCH 058/374] feat(docker): add docker distro info to csv --- lgsm/data/serverlist.csv | 256 +++++++++++++++++++-------------------- 1 file changed, 128 insertions(+), 128 deletions(-) diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index a33bbf816..be19a23f5 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -1,128 +1,128 @@ -ac,acserver,Assetto Corsa -ahl,ahlserver,Action Half-Life -ahl2,ahl2server,Action: Source -ark,arkserver,ARK: Survival Evolved -arma3,arma3server,ARMA 3 -armar,armarserver,Arma Reforger -av,avserver,Avorion -bb,bbserver,BrainBread -bb2,bb2server,BrainBread 2 -bd,bdserver,Base Defense -bf1942,bf1942server,Battlefield 1942 -bfv,bfvserver,Battlefield: Vietnam -bmdm,bmdmserver,Black Mesa: Deathmatch -bo,boserver,Ballistic Overkill -bs,bsserver,Blade Symphony -bt,btserver,Barotrauma -bt1944,bt1944server,Battalion 1944 -cc,ccserver,Codename CURE -cd,cdserver,Crafting Dead -cmw,cmwserver,Chivalry: Medieval Warfare -cod,codserver,Call of Duty -cod2,cod2server,Call of Duty 2 -cod4,cod4server,Call of Duty 4 -coduo,coduoserver,Call of Duty: United Offensive -codwaw,codwawserver,Call of Duty: World at War -col,colserver,Colony Survival -cs,csserver,Counter-Strike 1.6 -cscz,csczserver,Counter-Strike: Condition Zero -csgo,csgoserver,Counter-Strike: Global Offensive -css,cssserver,Counter-Strike: Source -dab,dabserver,Double Action: Boogaloo -dayz,dayzserver,DayZ -dmc,dmcserver,Deathmatch Classic -dod,dodserver,Day of Defeat -dodr,dodrserver,Day of Dragons -dods,dodsserver,Day of Defeat: Source -doi,doiserver,Day of Infamy -dst,dstserver,Don't Starve Together -dys,dysserver,Dystopia -eco,ecoserver,Eco -em,emserver,Empires Mod -etl,etlserver,ET: Legacy -fctr,fctrserver,Factorio -fof,fofserver,Fistful of Frags -gmod,gmodserver,Garrys Mod -hl2dm,hl2dmserver,Half-Life 2: Deathmatch -hldm,hldmserver,Half-Life: Deathmatch -hldms,hldmsserver,Half-Life Deathmatch: Source -hw,hwserver,Hurtworld -ins,insserver,Insurgency -inss,inssserver,Insurgency: Sandstorm -ios,iosserver,IOSoccer -jc2,jc2server,Just Cause 2 -jc3,jc3server,Just Cause 3 -jk2,jk2server,Jedi Knight II: Jedi Outcast -kf,kfserver,Killing Floor -kf2,kf2server,Killing Floor 2 -l4d,l4dserver,Left 4 Dead -l4d2,l4d2server,Left 4 Dead 2 -lo,loserver,Last Oasis -mc,mcserver,Minecraft -mcb,mcbserver,Minecraft Bedrock -mh,mhserver,MORDHAU -mohaa,mohaaserver,Medal of Honor: Allied Assault -mom,momserver,Memories of Mars -mta,mtaserver,Multi Theft Auto -mumble,mumbleserver,Mumble -nd,ndserver,Nuclear Dawn -nec,necserver,Necesse -nmrih,nmrihserver,No More Room in Hell -ns,nsserver,Natural Selection -ns2,ns2server,Natural Selection 2 -ns2c,ns2cserver,NS2: Combat -onset,onsetserver,Onset -opfor,opforserver,Opposing Force -pc,pcserver,Project Cars -pc2,pc2server,Project Cars 2 -pmc,pmcserver,PaperMC -pstbs,pstbsserver,Post Scriptum: The Bloody Seventh -pvkii,pvkiiserver,Pirates Vikings & Knights II -pvr,pvrserver,Pavlov VR -pz,pzserver,Project Zomboid -q2,q2server,Quake 2 -q3,q3server,Quake 3: Arena -ql,qlserver,Quake Live -qw,qwserver,Quake World -ricochet,ricochetserver,Ricochet -ro,roserver,Red Orchestra: Ostfront 41-45 -rtcw,rtcwserver,Return to Castle Wolfenstein -rust,rustserver,Rust -rw,rwserver,Rising World -samp,sampserver,San Andreas Multiplayer -sb,sbserver,Starbound -sbots,sbotsserver,StickyBots -scpsl,scpslserver,SCP: Secret Laboratory -scpslsm,scpslsmserver,SCP: Secret Laboratory ServerMod -sdtd,sdtdserver,7 Days to Die -sf,sfserver,Satisfactory -sfc,sfcserver,SourceForts Classic -sof2,sof2server,Soldier Of Fortune 2: Gold Edition -sol,solserver,Soldat -squad,squadserver,Squad -st,stserver,Stationeers -stn,stnserver,Survive the Nights -sven,svenserver,Sven Co-op -terraria,terrariaserver,Terraria -tf2,tf2server,Team Fortress 2 -tfc,tfcserver,Team Fortress Classic -ti,tiserver,The Isle -ts,tsserver,The Specialists -ts3,ts3server,Teamspeak 3 -tu,tuserver,Tower Unite -tw,twserver,Teeworlds -unt,untserver,Unturned -ut,utserver,Unreal Tournament -ut2k4,ut2k4server,Unreal Tournament 2004 -ut3,ut3server,Unreal Tournament 3 -ut99,ut99server,Unreal Tournament 99 -vh,vhserver,Valheim -vints,vintsserver,Vintage Story -vpmc,vpmcserver,Velocity Proxy MC -vs,vsserver,Vampire Slayer -wet,wetserver,Wolfenstein: Enemy Territory -wf,wfserver,Warfork -wmc,wmcserver,WaterfallMC -wurm,wurmserver,Wurm Unlimited -zmr,zmrserver,Zombie Master: Reborn -zps,zpsserver,Zombie Panic! Source +ac,acserver,Assetto Corsa,ubuntu-22.04 +ahl,ahlserver,Action Half-Life,ubuntu-22.04 +ahl2,ahl2server,Action: Source,ubuntu-22.04 +ark,arkserver,ARK: Survival Evolved,ubuntu-22.04 +arma3,arma3server,ARMA 3,ubuntu-22.04 +armar,armarserver,Arma Reforger,ubuntu-20.04 +av,avserver,Avorion,ubuntu-22.04 +bb,bbserver,BrainBread,ubuntu-22.04 +bb2,bb2server,BrainBread 2,ubuntu-22.04 +bd,bdserver,Base Defense,ubuntu-22.04 +bf1942,bf1942server,Battlefield 1942,ubuntu-22.04 +bfv,bfvserver,Battlefield: Vietnam,ubuntu-22.04 +bmdm,bmdmserver,Black Mesa: Deathmatch,ubuntu-22.04 +bo,boserver,Ballistic Overkill,ubuntu-22.04 +bs,bsserver,Blade Symphony,ubuntu-22.04 +bt,btserver,Barotrauma,ubuntu-22.04 +bt1944,bt1944server,Battalion 1944,ubuntu-22.04 +cc,ccserver,Codename CURE,ubuntu-22.04 +cd,cdserver,Crafting Dead,ubuntu-22.04 +cmw,cmwserver,Chivalry: Medieval Warfare,ubuntu-22.04 +cod,codserver,Call of Duty,ubuntu-22.04 +cod2,cod2server,Call of Duty 2,ubuntu-22.04 +cod4,cod4server,Call of Duty 4,ubuntu-22.04 +coduo,coduoserver,Call of Duty: United Offensive,ubuntu-22.04 +codwaw,codwawserver,Call of Duty: World at War,ubuntu-22.04 +col,colserver,Colony Survival,ubuntu-22.04 +cs,csserver,Counter-Strike 1.6,ubuntu-22.04 +cscz,csczserver,Counter-Strike: Condition Zero,ubuntu-22.04 +csgo,csgoserver,Counter-Strike: Global Offensive,ubuntu-22.04 +css,cssserver,Counter-Strike: Source,ubuntu-22.04 +dab,dabserver,Double Action: Boogaloo,ubuntu-22.04 +dayz,dayzserver,DayZ,ubuntu-22.04 +dmc,dmcserver,Deathmatch Classic,ubuntu-22.04 +dod,dodserver,Day of Defeat,ubuntu-22.04 +dodr,dodrserver,Day of Dragons,ubuntu-22.04 +dods,dodsserver,Day of Defeat: Source,ubuntu-22.04 +doi,doiserver,Day of Infamy,ubuntu-22.04 +dst,dstserver,Don't Starve Together,ubuntu-22.04 +dys,dysserver,Dystopia,ubuntu-22.04 +eco,ecoserver,Eco,ubuntu-22.04 +em,emserver,Empires Mod,ubuntu-22.04 +etl,etlserver,ET: Legacy,ubuntu-22.04 +fctr,fctrserver,Factorio,ubuntu-22.04 +fof,fofserver,Fistful of Frags,ubuntu-22.04 +gmod,gmodserver,Garrys Mod,ubuntu-22.04 +hl2dm,hl2dmserver,Half-Life 2: Deathmatch,ubuntu-22.04 +hldm,hldmserver,Half-Life: Deathmatch,ubuntu-22.04 +hldms,hldmsserver,Half-Life Deathmatch: Source,ubuntu-22.04 +hw,hwserver,Hurtworld,ubuntu-22.04 +ins,insserver,Insurgency,ubuntu-22.04 +inss,inssserver,Insurgency: Sandstorm,ubuntu-22.04 +ios,iosserver,IOSoccer,ubuntu-22.04 +jc2,jc2server,Just Cause 2,ubuntu-22.04 +jc3,jc3server,Just Cause 3,ubuntu-22.04 +jk2,jk2server,Jedi Knight II: Jedi Outcast,ubuntu-22.04 +kf,kfserver,Killing Floor,ubuntu-22.04 +kf2,kf2server,Killing Floor 2,ubuntu-22.04 +l4d,l4dserver,Left 4 Dead,ubuntu-22.04 +l4d2,l4d2server,Left 4 Dead 2,ubuntu-22.04 +lo,loserver,Last Oasis,ubuntu-22.04 +mc,mcserver,Minecraft,ubuntu-22.04 +mcb,mcbserver,Minecraft Bedrock,ubuntu-22.04 +mh,mhserver,MORDHAU,ubuntu-22.04 +mohaa,mohaaserver,Medal of Honor: Allied Assault,ubuntu-22.04 +mom,momserver,Memories of Mars,ubuntu-22.04 +mta,mtaserver,Multi Theft Auto,ubuntu-22.04 +mumble,mumbleserver,Mumble,ubuntu-22.04 +nd,ndserver,Nuclear Dawn,ubuntu-22.04 +nec,necserver,Necesse,ubuntu-22.04 +nmrih,nmrihserver,No More Room in Hell,ubuntu-22.04 +ns,nsserver,Natural Selection,ubuntu-22.04 +ns2,ns2server,Natural Selection 2,ubuntu-22.04 +ns2c,ns2cserver,NS2: Combat,ubuntu-22.04 +onset,onsetserver,Onset,ubuntu-20.04 +opfor,opforserver,Opposing Force,ubuntu-22.04 +pc,pcserver,Project Cars,ubuntu-22.04 +pc2,pc2server,Project Cars 2,ubuntu-22.04 +pmc,pmcserver,PaperMC,ubuntu-22.04 +pstbs,pstbsserver,Post Scriptum: The Bloody Seventh,ubuntu-22.04 +pvkii,pvkiiserver,Pirates Vikings & Knights II,ubuntu-22.04 +pvr,pvrserver,Pavlov VR,ubuntu-22.04 +pz,pzserver,Project Zomboid,ubuntu-22.04 +q2,q2server,Quake 2,ubuntu-22.04 +q3,q3server,Quake 3: Arena,ubuntu-22.04 +ql,qlserver,Quake Live,ubuntu-22.04 +qw,qwserver,Quake World,ubuntu-22.04 +ricochet,ricochetserver,Ricochet,ubuntu-22.04 +ro,roserver,Red Orchestra: Ostfront 41-45,ubuntu-22.04 +rtcw,rtcwserver,Return to Castle Wolfenstein,ubuntu-22.04 +rust,rustserver,Rust,ubuntu-22.04 +rw,rwserver,Rising World,ubuntu-22.04 +samp,sampserver,San Andreas Multiplayer,ubuntu-22.04 +sb,sbserver,Starbound,ubuntu-22.04 +sbots,sbotsserver,StickyBots,ubuntu-22.04 +scpsl,scpslserver,SCP: Secret Laboratory,ubuntu-22.04 +scpslsm,scpslsmserver,SCP: Secret Laboratory ServerMod,ubuntu-22.04 +sdtd,sdtdserver,7 Days to Die,ubuntu-22.04 +sf,sfserver,Satisfactory,ubuntu-22.04 +sfc,sfcserver,SourceForts Classic,ubuntu-22.04 +sof2,sof2server,Soldier Of Fortune 2: Gold Edition,ubuntu-22.04 +sol,solserver,Soldat,ubuntu-22.04 +squad,squadserver,Squad,ubuntu-22.04 +st,stserver,Stationeers,ubuntu-22.04 +stn,stnserver,Survive the Nights,ubuntu-22.04 +sven,svenserver,Sven Co-op,ubuntu-20.04 +terraria,terrariaserver,Terraria,ubuntu-22.04 +tf2,tf2server,Team Fortress 2,ubuntu-22.04 +tfc,tfcserver,Team Fortress Classic,ubuntu-22.04 +ti,tiserver,The Isle,ubuntu-22.04 +ts,tsserver,The Specialists,ubuntu-22.04 +ts3,ts3server,Teamspeak 3,ubuntu-22.04 +tu,tuserver,Tower Unite,ubuntu-22.04 +tw,twserver,Teeworlds,ubuntu-22.04 +unt,untserver,Unturned,ubuntu-22.04 +ut,utserver,Unreal Tournament,ubuntu-22.04 +ut2k4,ut2k4server,Unreal Tournament 2004,ubuntu-22.04 +ut3,ut3server,Unreal Tournament 3,ubuntu-22.04 +ut99,ut99server,Unreal Tournament 99,ubuntu-22.04 +vh,vhserver,Valheim,ubuntu-22.04 +vints,vintsserver,Vintage Story,ubuntu-22.04 +vpmc,vpmcserver,Velocity Proxy MC,ubuntu-22.04 +vs,vsserver,Vampire Slayer,ubuntu-22.04 +wet,wetserver,Wolfenstein: Enemy Territory,ubuntu-22.04 +wf,wfserver,Warfork,ubuntu-22.04 +wmc,wmcserver,WaterfallMC,ubuntu-22.04 +wurm,wurmserver,Wurm Unlimited,ubuntu-22.04 +zmr,zmrserver,Zombie Master: Reborn,ubuntu-22.04 +zps,zpsserver,Zombie Panic! Source,ubuntu-22.04 From ba0e1144a1a73567cdb3f253f491cadaae6dd696 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 13 Jan 2023 21:15:30 +0000 Subject: [PATCH 059/374] feat(docker): add docker image list to csv --- lgsm/data/serverlist.csv | 254 ++++++++++++++++++------------------- lgsm/data/ubuntu-20.04.csv | 12 +- lgsm/data/ubuntu-22.04.csv | 14 +- 3 files changed, 140 insertions(+), 140 deletions(-) diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 4c80f538a..c075684b7 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -1,127 +1,127 @@ -ac,acserver,Assetto Corsa -ahl,ahlserver,Action Half-Life -ahl2,ahl2server,Action: Source -ark,arkserver,ARK: Survival Evolved -arma3,arma3server,ARMA 3 -armar,armarserver,Arma Reforger -av,avserver,Avorion -bb,bbserver,BrainBread -bb2,bb2server,BrainBread 2 -bd,bdserver,Base Defense -bf1942,bf1942server,Battlefield 1942 -bfv,bfvserver,Battlefield: Vietnam -bmdm,bmdmserver,Black Mesa: Deathmatch -bo,boserver,Ballistic Overkill -bs,bsserver,Blade Symphony -bt,btserver,Barotrauma -bt1944,bt1944server,Battalion 1944 -cc,ccserver,Codename CURE -cd,cdserver,Crafting Dead -cmw,cmwserver,Chivalry: Medieval Warfare -cod,codserver,Call of Duty -cod2,cod2server,Call of Duty 2 -cod4,cod4server,Call of Duty 4 -coduo,coduoserver,Call of Duty: United Offensive -codwaw,codwawserver,Call of Duty: World at War -col,colserver,Colony Survival -cs,csserver,Counter-Strike 1.6 -cscz,csczserver,Counter-Strike: Condition Zero -csgo,csgoserver,Counter-Strike: Global Offensive -css,cssserver,Counter-Strike: Source -dab,dabserver,Double Action: Boogaloo -dayz,dayzserver,DayZ -dmc,dmcserver,Deathmatch Classic -dod,dodserver,Day of Defeat -dodr,dodrserver,Day of Dragons -dods,dodsserver,Day of Defeat: Source -doi,doiserver,Day of Infamy -dst,dstserver,Don't Starve Together -dys,dysserver,Dystopia -eco,ecoserver,Eco -em,emserver,Empires Mod -etl,etlserver,ET: Legacy -fctr,fctrserver,Factorio -fof,fofserver,Fistful of Frags -gmod,gmodserver,Garrys Mod -hl2dm,hl2dmserver,Half-Life 2: Deathmatch -hldm,hldmserver,Half-Life: Deathmatch -hldms,hldmsserver,Half-Life Deathmatch: Source -hw,hwserver,Hurtworld -ins,insserver,Insurgency -inss,inssserver,Insurgency: Sandstorm -ios,iosserver,IOSoccer -jc2,jc2server,Just Cause 2 -jc3,jc3server,Just Cause 3 -jk2,jk2server,Jedi Knight II: Jedi Outcast -kf,kfserver,Killing Floor -kf2,kf2server,Killing Floor 2 -lo,loserver,Last Oasis -l4d,l4dserver,Left 4 Dead -l4d2,l4d2server,Left 4 Dead 2 -mc,mcserver,Minecraft -mcb,mcbserver,Minecraft Bedrock -mh,mhserver,MORDHAU -mohaa,mohaaserver,Medal of Honor: Allied Assault -mom,momserver,Memories of Mars -mta,mtaserver,Multi Theft Auto -mumble,mumbleserver,Mumble -nd,ndserver,Nuclear Dawn -nmrih,nmrihserver,No More Room in Hell -ns,nsserver,Natural Selection -ns2,ns2server,Natural Selection 2 -ns2c,ns2cserver,NS2: Combat -onset,onsetserver,Onset -opfor,opforserver,Opposing Force -pc,pcserver,Project Cars -pc2,pc2server,Project Cars 2 -pmc,pmcserver,PaperMC -pstbs,pstbsserver,Post Scriptum: The Bloody Seventh -pvkii,pvkiiserver,Pirates Vikings & Knights II -pvr,pvrserver,Pavlov VR -pz,pzserver,Project Zomboid -q2,q2server,Quake 2 -q3,q3server,Quake 3: Arena -ql,qlserver,Quake Live -qw,qwserver,Quake World -ricochet,ricochetserver,Ricochet -ro,roserver,Red Orchestra: Ostfront 41-45 -rtcw,rtcwserver,Return to Castle Wolfenstein -rust,rustserver,Rust -rw,rwserver,Rising World -samp,sampserver,San Andreas Multiplayer -sb,sbserver,Starbound -sbots,sbotsserver,StickyBots -scpsl,scpslserver,SCP: Secret Laboratory -scpslsm,scpslsmserver,SCP: Secret Laboratory ServerMod -sdtd,sdtdserver,7 Days to Die -sfc,sfcserver,SourceForts Classic -sf,sfserver,Satisfactory -sof2,sof2server,Soldier Of Fortune 2: Gold Edition -sol,solserver,Soldat -squad,squadserver,Squad -st,stserver,Stationeers -stn,stnserver,Survive the Nights -sven,svenserver,Sven Co-op -terraria,terrariaserver,Terraria -tf2,tf2server,Team Fortress 2 -tfc,tfcserver,Team Fortress Classic -ti,tiserver,The Isle -ts,tsserver,The Specialists -ts3,ts3server,Teamspeak 3 -tu,tuserver,Tower Unite -tw,twserver,Teeworlds -unt,untserver,Unturned -ut,utserver,Unreal Tournament -ut2k4,ut2k4server,Unreal Tournament 2004 -ut3,ut3server,Unreal Tournament 3 -ut99,ut99server,Unreal Tournament 99 -vh,vhserver,Valheim -vints,vintsserver,Vintage Story -vpmc,vpmcserver,Velocity Proxy MC -vs,vsserver,Vampire Slayer -wet,wetserver,Wolfenstein: Enemy Territory -wf,wfserver,Warfork -wmc,wmcserver,WaterfallMC -wurm,wurmserver,Wurm Unlimited -zmr,zmrserver,Zombie Master: Reborn -zps,zpsserver,Zombie Panic! Source +ac,acserver,Assetto Corsa,ubuntu-22.04 +ahl,ahlserver,Action Half-Life,ubuntu-22.04 +ahl2,ahl2server,Action: Source,ubuntu-22.04 +ark,arkserver,ARK: Survival Evolved,ubuntu-22.04 +arma3,arma3server,ARMA 3,ubuntu-22.04 +armar,armarserver,Arma Reforger,ubuntu-20.04 +av,avserver,Avorion,ubuntu-22.04 +bb,bbserver,BrainBread,ubuntu-22.04 +bb2,bb2server,BrainBread 2,ubuntu-22.04 +bd,bdserver,Base Defense,ubuntu-22.04 +bf1942,bf1942server,Battlefield 1942,ubuntu-22.04 +bfv,bfvserver,Battlefield: Vietnam,ubuntu-22.04 +bmdm,bmdmserver,Black Mesa: Deathmatch,ubuntu-22.04 +bo,boserver,Ballistic Overkill,ubuntu-22.04 +bs,bsserver,Blade Symphony,ubuntu-22.04 +bt,btserver,Barotrauma,ubuntu-22.04 +bt1944,bt1944server,Battalion 1944,ubuntu-22.04 +cc,ccserver,Codename CURE,ubuntu-22.04 +cd,cdserver,Crafting Dead,ubuntu-22.04 +cmw,cmwserver,Chivalry: Medieval Warfare,ubuntu-22.04 +cod,codserver,Call of Duty,ubuntu-22.04 +cod2,cod2server,Call of Duty 2,ubuntu-22.04 +cod4,cod4server,Call of Duty 4,ubuntu-22.04 +coduo,coduoserver,Call of Duty: United Offensive,ubuntu-22.04 +codwaw,codwawserver,Call of Duty: World at War,ubuntu-22.04 +col,colserver,Colony Survival,ubuntu-22.04 +cs,csserver,Counter-Strike 1.6,ubuntu-22.04 +cscz,csczserver,Counter-Strike: Condition Zero,ubuntu-22.04 +csgo,csgoserver,Counter-Strike: Global Offensive,ubuntu-22.04 +css,cssserver,Counter-Strike: Source,ubuntu-22.04 +dab,dabserver,Double Action: Boogaloo,ubuntu-22.04 +dayz,dayzserver,DayZ,ubuntu-22.04 +dmc,dmcserver,Deathmatch Classic,ubuntu-22.04 +dod,dodserver,Day of Defeat,ubuntu-22.04 +dodr,dodrserver,Day of Dragons,ubuntu-22.04 +dods,dodsserver,Day of Defeat: Source,ubuntu-22.04 +doi,doiserver,Day of Infamy,ubuntu-22.04 +dst,dstserver,Don't Starve Together,ubuntu-22.04 +dys,dysserver,Dystopia,ubuntu-22.04 +eco,ecoserver,Eco,ubuntu-22.04 +em,emserver,Empires Mod,ubuntu-22.04 +etl,etlserver,ET: Legacy,ubuntu-22.04 +fctr,fctrserver,Factorio,ubuntu-22.04 +fof,fofserver,Fistful of Frags,ubuntu-22.04 +gmod,gmodserver,Garrys Mod,ubuntu-22.04 +hl2dm,hl2dmserver,Half-Life 2: Deathmatch,ubuntu-22.04 +hldm,hldmserver,Half-Life: Deathmatch,ubuntu-22.04 +hldms,hldmsserver,Half-Life Deathmatch: Source,ubuntu-22.04 +hw,hwserver,Hurtworld,ubuntu-22.04 +ins,insserver,Insurgency,ubuntu-22.04 +inss,inssserver,Insurgency: Sandstorm,ubuntu-22.04 +ios,iosserver,IOSoccer,ubuntu-22.04 +jc2,jc2server,Just Cause 2,ubuntu-22.04 +jc3,jc3server,Just Cause 3,ubuntu-22.04 +jk2,jk2server,Jedi Knight II: Jedi Outcast,ubuntu-22.04 +kf,kfserver,Killing Floor,ubuntu-22.04 +kf2,kf2server,Killing Floor 2,ubuntu-22.04 +l4d,l4dserver,Left 4 Dead,ubuntu-22.04 +l4d2,l4d2server,Left 4 Dead 2,ubuntu-22.04 +lo,loserver,Last Oasis,ubuntu-22.04 +mc,mcserver,Minecraft,ubuntu-22.04 +mcb,mcbserver,Minecraft Bedrock,ubuntu-22.04 +mh,mhserver,MORDHAU,ubuntu-22.04 +mohaa,mohaaserver,Medal of Honor: Allied Assault,ubuntu-22.04 +mom,momserver,Memories of Mars,ubuntu-22.04 +mta,mtaserver,Multi Theft Auto,ubuntu-22.04 +mumble,mumbleserver,Mumble,ubuntu-22.04 +nd,ndserver,Nuclear Dawn,ubuntu-22.04 +nmrih,nmrihserver,No More Room in Hell,ubuntu-22.04 +ns,nsserver,Natural Selection,ubuntu-22.04 +ns2,ns2server,Natural Selection 2,ubuntu-22.04 +ns2c,ns2cserver,NS2: Combat,ubuntu-22.04 +onset,onsetserver,Onset,ubuntu-20.04 +opfor,opforserver,Opposing Force,ubuntu-22.04 +pc,pcserver,Project Cars,ubuntu-22.04 +pc2,pc2server,Project Cars 2,ubuntu-22.04 +pmc,pmcserver,PaperMC,ubuntu-22.04 +pstbs,pstbsserver,Post Scriptum: The Bloody Seventh,ubuntu-22.04 +pvkii,pvkiiserver,Pirates Vikings & Knights II,ubuntu-22.04 +pvr,pvrserver,Pavlov VR,ubuntu-22.04 +pz,pzserver,Project Zomboid,ubuntu-22.04 +q2,q2server,Quake 2,ubuntu-22.04 +q3,q3server,Quake 3: Arena,ubuntu-22.04 +ql,qlserver,Quake Live,ubuntu-22.04 +qw,qwserver,Quake World,ubuntu-22.04 +ricochet,ricochetserver,Ricochet,ubuntu-22.04 +ro,roserver,Red Orchestra: Ostfront 41-45,ubuntu-22.04 +rtcw,rtcwserver,Return to Castle Wolfenstein,ubuntu-22.04 +rust,rustserver,Rust,ubuntu-22.04 +rw,rwserver,Rising World,ubuntu-22.04 +samp,sampserver,San Andreas Multiplayer,ubuntu-22.04 +sb,sbserver,Starbound,ubuntu-22.04 +sbots,sbotsserver,StickyBots,ubuntu-22.04 +scpsl,scpslserver,SCP: Secret Laboratory,ubuntu-22.04 +scpslsm,scpslsmserver,SCP: Secret Laboratory ServerMod,ubuntu-22.04 +sdtd,sdtdserver,7 Days to Die,ubuntu-22.04 +sf,sfserver,Satisfactory,ubuntu-22.04 +sfc,sfcserver,SourceForts Classic,ubuntu-22.04 +sof2,sof2server,Soldier Of Fortune 2: Gold Edition,ubuntu-22.04 +sol,solserver,Soldat,ubuntu-22.04 +squad,squadserver,Squad,ubuntu-22.04 +st,stserver,Stationeers,ubuntu-22.04 +stn,stnserver,Survive the Nights,ubuntu-22.04 +sven,svenserver,Sven Co-op,ubuntu-20.04 +terraria,terrariaserver,Terraria,ubuntu-22.04 +tf2,tf2server,Team Fortress 2,ubuntu-22.04 +tfc,tfcserver,Team Fortress Classic,ubuntu-22.04 +ti,tiserver,The Isle,ubuntu-22.04 +ts,tsserver,The Specialists,ubuntu-22.04 +ts3,ts3server,Teamspeak 3,ubuntu-22.04 +tu,tuserver,Tower Unite,ubuntu-22.04 +tw,twserver,Teeworlds,ubuntu-22.04 +unt,untserver,Unturned,ubuntu-22.04 +ut,utserver,Unreal Tournament,ubuntu-22.04 +ut2k4,ut2k4server,Unreal Tournament 2004,ubuntu-22.04 +ut3,ut3server,Unreal Tournament 3,ubuntu-22.04 +ut99,ut99server,Unreal Tournament 99,ubuntu-22.04 +vh,vhserver,Valheim,ubuntu-22.04 +vints,vintsserver,Vintage Story,ubuntu-22.04 +vpmc,vpmcserver,Velocity Proxy MC,ubuntu-22.04 +vs,vsserver,Vampire Slayer,ubuntu-22.04 +wet,wetserver,Wolfenstein: Enemy Territory,ubuntu-22.04 +wf,wfserver,Warfork,ubuntu-22.04 +wmc,wmcserver,WaterfallMC,ubuntu-22.04 +wurm,wurmserver,Wurm Unlimited,ubuntu-22.04 +zmr,zmrserver,Zombie Master: Reborn,ubuntu-22.04 +zps,zpsserver,Zombie Panic! Source,ubuntu-22.04 diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index 49f64348d..db5cfd03b 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -5,7 +5,7 @@ ahl ahl2 ark arma3 -armar,libcurl4,libssl1.1 +armar,libcurl4 av bb bb2,libcurl4-gnutls-dev:i386 @@ -15,7 +15,7 @@ bfv,libncurses5:i386,libstdc++5:i386 bmdm,libncurses5:i386 bo bs -bt,libicu-dev +bt,libicu-dev,dos2unix bt1944 cc cd @@ -57,9 +57,9 @@ jc3 jk2 kf kf2 -lo l4d l4d2 +lo mc,openjdk-17-jre mcb mh @@ -72,7 +72,7 @@ nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 ns2c,speex:i386,libtbb2 -onset,libmariadbclient-dev +onset,libmariadb-dev opfor pc pmc,openjdk-17-jre @@ -95,8 +95,8 @@ sbots scpsl,mono-complete scpslsm,mono-complete sdtd,telnet,expect -sfc,libtinfo5:i386 sf +sfc,libtinfo5:i386 sof2 sol squad @@ -117,9 +117,9 @@ ut2k4 ut3 ut99 vh,libc6-dev -vs vints,mono-complete vpmc,openjdk-11-jre +vs wet wf wmc,openjdk-17-jre diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index dd567bf7b..7a28e4b04 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -5,7 +5,7 @@ ahl ahl2 ark arma3 -armar,libcurl4,libssl1.1 +armar,libcurl4 av bb bb2,libcurl4-gnutls-dev:i386 @@ -15,7 +15,7 @@ bfv,libncurses5:i386,libstdc++5:i386 bmdm,libncurses5:i386 bo bs -bt,libicu-dev +bt,libicu-dev,dos2unix bt1944 cc cmw @@ -55,9 +55,9 @@ jc3 jk2 kf kf2 -lo l4d l4d2 +lo mc,openjdk-17-jre mcb mh @@ -70,7 +70,7 @@ nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 ns2c,speex:i386,libtbb2 -onset,libmariadbclient-dev +onset,libmariadb-dev opfor pc pmc,openjdk-17-jre @@ -93,15 +93,15 @@ sbots scpsl,mono-complete scpslsm,mono-complete sdtd,telnet,expect -sfc,libtinfo5:i386 sf +sfc,libtinfo5:i386 sof2 sol squad st stn sven,libssl1.1:i386,zlib1g:i386 -terraria,libsdl +terraria tf2,libcurl4-gnutls-dev:i386 tfc ti @@ -115,9 +115,9 @@ ut2k4 ut3 ut99 vh,libc6-dev -vs vints,mono-complete vpmc,openjdk-11-jre +vs wet wf wmc,openjdk-17-jre From b09bd2d9aff61b1cacc2145bc7ca47250865fc46 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 14 Jan 2023 00:11:53 +0000 Subject: [PATCH 060/374] Update license copyright year(s) (#4073) * build(deps): bump release-drafter/release-drafter from 5.21.0 to 5.21.1 (#4006) Bumps [release-drafter/release-drafter](https://github.com/release-drafter/release-drafter) from 5.21.0 to 5.21.1. - [Release notes](https://github.com/release-drafter/release-drafter/releases) - [Commits](https://github.com/release-drafter/release-drafter/compare/v5.21.0...v5.21.1) --- updated-dependencies: - dependency-name: release-drafter/release-drafter dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump webfactory/ssh-agent from 0.5.4 to 0.7.0 (#4009) Bumps [webfactory/ssh-agent](https://github.com/webfactory/ssh-agent) from 0.5.4 to 0.7.0. - [Release notes](https://github.com/webfactory/ssh-agent/releases) - [Changelog](https://github.com/webfactory/ssh-agent/blob/master/CHANGELOG.md) - [Commits](https://github.com/webfactory/ssh-agent/compare/v0.5.4...v0.7.0) --- updated-dependencies: - dependency-name: webfactory/ssh-agent dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * docs(license): update copyright year(s) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions --- .github/workflows/create-release.yml | 2 +- .github/workflows/git-sync.yml | 4 ++-- LICENSE | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index ad5a88a7d..e43f58c51 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest steps: # Drafts your next Release notes as Pull Requests are merged into "master" - - uses: release-drafter/release-drafter@v5.21.0 + - uses: release-drafter/release-drafter@v5.21.1 with: config-name: release-drafter.yml env: diff --git a/.github/workflows/git-sync.yml b/.github/workflows/git-sync.yml index b43996dc6..f07d1f3b4 100644 --- a/.github/workflows/git-sync.yml +++ b/.github/workflows/git-sync.yml @@ -10,8 +10,8 @@ jobs: GitHub-to-Bitbucket: runs-on: ubuntu-latest steps: - - name: webfactory/ssh-agent@v0.5.4 - uses: webfactory/ssh-agent@v0.5.4 + - name: webfactory/ssh-agent@v0.7.0 + uses: webfactory/ssh-agent@v0.7.0 with: ssh-private-key: ${{ secrets.BITBUCKET_SECRET }} diff --git a/LICENSE b/LICENSE index 88c1caac5..12352eafa 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ # The MIT License (MIT) -Copyright (c) 2012-2022 Daniel Gibbs +Copyright (c) 2012-2023 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 From cf7b0c51e9c288c2811c91e07f1c67e0c7c604cd Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 14 Jan 2023 00:28:30 +0000 Subject: [PATCH 061/374] Update update-copyright-years-in-license-file.yml --- .../workflows/update-copyright-years-in-license-file.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/update-copyright-years-in-license-file.yml b/.github/workflows/update-copyright-years-in-license-file.yml index 01af6dd3c..347446d75 100644 --- a/.github/workflows/update-copyright-years-in-license-file.yml +++ b/.github/workflows/update-copyright-years-in-license-file.yml @@ -2,6 +2,7 @@ name: Update copyright year(s) in license file on: + workflow_dispatch: schedule: - cron: "0 3 1 1 *" # 03:00 AM on January 1 @@ -15,3 +16,9 @@ jobs: - uses: FantasticFiasco/action-update-license-year@v2 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 From c22940daeb966f4d1f735ef8e972a443077e4a8c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 14 Jan 2023 00:37:13 +0000 Subject: [PATCH 062/374] Rename LICENSE to LICENSE.md --- LICENSE => LICENSE.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename LICENSE => LICENSE.md (100%) diff --git a/LICENSE b/LICENSE.md similarity index 100% rename from LICENSE rename to LICENSE.md From 885914b144787a7fbfef00e0a96af74a3f633bf9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Jan 2023 12:49:30 +0000 Subject: [PATCH 063/374] build(deps): bump release-drafter/release-drafter from 5.21.1 to 5.22.0 (#4075) * build(deps): bump release-drafter/release-drafter from 5.21.0 to 5.21.1 (#4006) Bumps [release-drafter/release-drafter](https://github.com/release-drafter/release-drafter) from 5.21.0 to 5.21.1. - [Release notes](https://github.com/release-drafter/release-drafter/releases) - [Commits](https://github.com/release-drafter/release-drafter/compare/v5.21.0...v5.21.1) --- updated-dependencies: - dependency-name: release-drafter/release-drafter dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump webfactory/ssh-agent from 0.5.4 to 0.7.0 (#4009) Bumps [webfactory/ssh-agent](https://github.com/webfactory/ssh-agent) from 0.5.4 to 0.7.0. - [Release notes](https://github.com/webfactory/ssh-agent/releases) - [Changelog](https://github.com/webfactory/ssh-agent/blob/master/CHANGELOG.md) - [Commits](https://github.com/webfactory/ssh-agent/compare/v0.5.4...v0.7.0) --- updated-dependencies: - dependency-name: webfactory/ssh-agent dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump release-drafter/release-drafter from 5.21.1 to 5.22.0 Bumps [release-drafter/release-drafter](https://github.com/release-drafter/release-drafter) from 5.21.1 to 5.22.0. - [Release notes](https://github.com/release-drafter/release-drafter/releases) - [Commits](https://github.com/release-drafter/release-drafter/compare/v5.21.1...v5.22.0) --- updated-dependencies: - dependency-name: release-drafter/release-drafter dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Daniel Gibbs --- .github/workflows/create-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index e43f58c51..f543b2802 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest steps: # Drafts your next Release notes as Pull Requests are merged into "master" - - uses: release-drafter/release-drafter@v5.21.1 + - uses: release-drafter/release-drafter@v5.22.0 with: config-name: release-drafter.yml env: From 357be101e2e6cc1c9bc8db169ad5688fa8ec476e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Jan 2023 12:50:42 +0000 Subject: [PATCH 064/374] build(deps): bump dessant/lock-threads from 3 to 4 (#4049) * build(deps): bump release-drafter/release-drafter from 5.21.0 to 5.21.1 (#4006) Bumps [release-drafter/release-drafter](https://github.com/release-drafter/release-drafter) from 5.21.0 to 5.21.1. - [Release notes](https://github.com/release-drafter/release-drafter/releases) - [Commits](https://github.com/release-drafter/release-drafter/compare/v5.21.0...v5.21.1) --- updated-dependencies: - dependency-name: release-drafter/release-drafter dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump webfactory/ssh-agent from 0.5.4 to 0.7.0 (#4009) Bumps [webfactory/ssh-agent](https://github.com/webfactory/ssh-agent) from 0.5.4 to 0.7.0. - [Release notes](https://github.com/webfactory/ssh-agent/releases) - [Changelog](https://github.com/webfactory/ssh-agent/blob/master/CHANGELOG.md) - [Commits](https://github.com/webfactory/ssh-agent/compare/v0.5.4...v0.7.0) --- updated-dependencies: - dependency-name: webfactory/ssh-agent dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump dessant/lock-threads from 3 to 4 Bumps [dessant/lock-threads](https://github.com/dessant/lock-threads) from 3 to 4. - [Release notes](https://github.com/dessant/lock-threads/releases) - [Changelog](https://github.com/dessant/lock-threads/blob/master/CHANGELOG.md) - [Commits](https://github.com/dessant/lock-threads/compare/v3...v4) --- updated-dependencies: - dependency-name: dessant/lock-threads dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Daniel Gibbs --- .github/workflows/lock.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index 320b851a1..774f84364 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -14,7 +14,7 @@ jobs: pull-requests: write # for dessant/lock-threads to lock PRs runs-on: ubuntu-latest steps: - - uses: dessant/lock-threads@v3 + - uses: dessant/lock-threads@v4 with: github-token: ${{ secrets.GITHUB_TOKEN }} issue-comment: > From aa24fb9d50160014c40754cfdc20964f1d7d1107 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 16 Jan 2023 13:12:49 +0000 Subject: [PATCH 065/374] Rename trigger_docker_build.yml to trigger-docker-build.yml --- .../{trigger_docker_build.yml => trigger-docker-build.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{trigger_docker_build.yml => trigger-docker-build.yml} (100%) diff --git a/.github/workflows/trigger_docker_build.yml b/.github/workflows/trigger-docker-build.yml similarity index 100% rename from .github/workflows/trigger_docker_build.yml rename to .github/workflows/trigger-docker-build.yml From 9a3e1d558d2226195a542133104510b33bcd5baa Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 18 Jan 2023 11:34:53 +0000 Subject: [PATCH 066/374] fix: correct : in monitor print messages --- lgsm/functions/command_monitor.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index 48d3d496a..0d6402942 100755 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -131,7 +131,7 @@ fn_monitor_query() { # Server query OK. fn_print_ok "Querying port: ${querymethod}: ${queryip}:${queryport} : ${totalseconds}/${queryattempt}: " fn_print_ok_eol_nl - fn_script_log_pass "Querying port: ${querymethod}: ${queryip}:${queryport} : ${queryattempt}: OK" + fn_script_log_pass "Querying port: ${querymethod}: ${queryip}:${queryport} : ${queryattempt} : OK" monitorpass=1 if [ "${querystatus}" == "0" ]; then # Add query data to log. @@ -161,14 +161,14 @@ fn_monitor_query() { # Server query FAIL. fn_print_fail "Querying port: ${querymethod}: ${queryip}:${queryport} : ${totalseconds}/${queryattempt}: " fn_print_fail_eol - fn_script_log_warn "Querying port: ${querymethod}: ${queryip}:${queryport} : ${queryattempt}: FAIL" + fn_script_log_warn "Querying port: ${querymethod}: ${queryip}:${queryport} : ${queryattempt} : FAIL" # Monitor will try gamedig (if supported) for first 30s then gsquery before restarting. # gsquery will fail if longer than 60s if [ "${totalseconds}" -ge "59" ]; then # Monitor will FAIL if over 60s and trigger gane server reboot. fn_print_fail "Querying port: ${querymethod}: ${queryip}:${queryport} : ${totalseconds}/${queryattempt}: " fn_print_fail_eol_nl - fn_script_log_warn "Querying port: ${querymethod}: ${queryip}:${queryport} : ${queryattempt}: FAIL" + fn_script_log_warn "Querying port: ${querymethod}: ${queryip}:${queryport} : ${queryattempt} : FAIL" # Send alert if enabled. alert="restartquery" alert.sh @@ -180,7 +180,7 @@ fn_monitor_query() { done # Second counter will wait for 15s before breaking loop. for seconds in {1..15}; do - fn_print_fail "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: ${cyan}WAIT${default}" + fn_print_fail "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt} : ${cyan}WAIT${default}" sleep 0.5 totalseconds=$((totalseconds + 1)) if [ "${seconds}" == "15" ]; then From b901412f9d9cdae02bc8432dd07174c7a6f292bc Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 18 Jan 2023 11:35:11 +0000 Subject: [PATCH 067/374] chore: linting --- .github/workflows/labeler.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 7526d2ce6..b63b8f462 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -13,9 +13,9 @@ jobs: issues: write # for github/issue-labeler to create or remove labels runs-on: ubuntu-latest steps: - - uses: github/issue-labeler@v2.5 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" - configuration-path: .github/labeler.yml - not-before: - enable-versioned-regex: 0 + - uses: github/issue-labeler@v2.5 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + configuration-path: .github/labeler.yml + not-before: + enable-versioned-regex: 0 From 1fbb66d426fae792c1954b152355b1f543696f6e Mon Sep 17 00:00:00 2001 From: un-boxing-man Date: Thu, 2 Feb 2023 14:11:52 -0800 Subject: [PATCH 068/374] fix(rust): Support Rust query port needed after Feb 2nd! (#4048) * add query port to rust * fix variable in config * feat(docker): add docker image list to csv * Update _default.cfg fix server.queryport --------- Co-authored-by: Daniel Gibbs --- lgsm/config-default/config-lgsm/rustserver/_default.cfg | 3 ++- lgsm/functions/info_game.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lgsm/config-default/config-lgsm/rustserver/_default.cfg b/lgsm/config-default/config-lgsm/rustserver/_default.cfg index 7be5cd21d..d43a15152 100644 --- a/lgsm/config-default/config-lgsm/rustserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rustserver/_default.cfg @@ -13,6 +13,7 @@ ip="0.0.0.0" port="28015" rconport="28016" appport=28082 +queryport=28017 rconpassword="CHANGE_ME" rconweb="1" # Value is: 1 for the Facepunch web panel, Rustadmin desktop and Rustadmin Online; 0 for RCON tools like Rusty. servername="Rust" @@ -27,7 +28,7 @@ saveinterval="300" # Auto-save in seconds. tickrate="30" # default: 30, range: 15-100. ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-batchmode +app.listenip ${ip} +app.port ${appport} +server.ip ${ip} +server.port ${port} +server.tickrate ${tickrate} +server.hostname \"${servername}\" +server.identity \"${selfname}\" +server.gamemode ${gamemode} +server.level \"${serverlevel}\" +server.seed ${seed} +server.salt ${salt} +server.maxplayers ${maxplayers} +server.worldsize ${worldsize} +server.saveinterval ${saveinterval} +rcon.web ${rconweb} +rcon.ip ${ip} +rcon.port ${rconport} +rcon.password \"${rconpassword}\" -logfile" +startparameters="-batchmode +app.listenip ${ip} +app.port ${appport} +server.ip ${ip} +server.port ${port} +server.queryport ${queryport} +server.tickrate ${tickrate} +server.hostname \"${servername}\" +server.identity \"${selfname}\" +server.gamemode ${gamemode} +server.level \"${serverlevel}\" +server.seed ${seed} +server.salt ${salt} +server.maxplayers ${maxplayers} +server.worldsize ${worldsize} +server.saveinterval ${saveinterval} +rcon.web ${rconweb} +rcon.ip ${ip} +rcon.port ${rconport} +rcon.password \"${rconpassword}\" -logfile" #### LinuxGSM Settings #### diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index 77169b3f3..66b9be5db 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -1462,7 +1462,7 @@ fn_info_game_rust() { # Parameters servername=${servername:-"NOT SET"} port=${port:-"0"} - queryport=${port:-"0"} + queryport=${queryport:-"0"} appport=${appport:-"0"} rconport=${rconport:-"0"} gamemode=${gamemode:-"NOT SET"} From a9ffd08d38415ea23271acdacc2c946716a61ec8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Feb 2023 22:16:13 +0000 Subject: [PATCH 069/374] build(deps): bump github/issue-labeler from 2.5 to 2.6 (#4090) * feat(docker): add docker image list to csv * build(deps): bump github/issue-labeler from 2.5 to 2.6 Bumps [github/issue-labeler](https://github.com/github/issue-labeler) from 2.5 to 2.6. - [Release notes](https://github.com/github/issue-labeler/releases) - [Commits](https://github.com/github/issue-labeler/compare/v2.5...v2.6) --- updated-dependencies: - dependency-name: github/issue-labeler dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --------- Signed-off-by: dependabot[bot] Co-authored-by: Daniel Gibbs Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/labeler.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index b63b8f462..a1a90e6eb 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -13,9 +13,9 @@ jobs: issues: write # for github/issue-labeler to create or remove labels runs-on: ubuntu-latest steps: - - uses: github/issue-labeler@v2.5 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" - configuration-path: .github/labeler.yml - not-before: - enable-versioned-regex: 0 + - uses: github/issue-labeler@v2.6 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + configuration-path: .github/labeler.yml + not-before: + enable-versioned-regex: 0 From d7545f67c390b66ea1116ff28f7d46ef00ce96c0 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 2 Feb 2023 22:19:39 +0000 Subject: [PATCH 072/374] Release v23.1.0 --- lgsm/functions/core_functions.sh | 2 +- linuxgsm.sh | 2 +- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 4edd50ca7..05b52e243 100755 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -8,7 +8,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v22.2.1" +modulesversion="v23.1.0" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index 3849ae68b..4344b68de 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v22.2.1" +version="v23.1.0" shortname="core" gameservername="core" commandname="CORE" diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index 2246bdeb1..0c1e02d67 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v22.2.1" +version="v23.1.0" shortname="fctr" gameservername="fctrserver" commandname="CORE" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index e408420b8..62736d50b 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v22.2.1" +version="v23.1.0" shortname="jc2" gameservername="jc2server" commandname="CORE" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 984f522f0..6fe28715b 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v22.2.1" +version="v23.1.0" shortname="mc" gameservername="mcserver" commandname="CORE" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 6bc89c9fe..fa6d62283 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v22.2.1" +version="v23.1.0" shortname="ts3" gameservername="ts3server" commandname="CORE" From 6b73179e5d40112df16f9a8ace48e1123db19fbc Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 2 Feb 2023 23:48:38 +0000 Subject: [PATCH 073/374] fix: issue labeler Delete create-release.yml a --- .github/labeler.yml | 115 ++++++++++++++------------- .github/workflows/create-release.yml | 23 ------ .github/workflows/labeler.yml | 15 ++-- 3 files changed, 67 insertions(+), 86 deletions(-) delete mode 100644 .github/workflows/create-release.yml diff --git a/.github/labeler.yml b/.github/labeler.yml index 0ceeeae72..f9e0bd0aa 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,98 +1,99 @@ # Add/remove 'critical' label if issue contains the words 'urgent' or 'critical' -# Type -"type: game server request": - - "/(Server Request)/i" -"type: bug": - - "/(bug)/i" -"type: feature request": - - "/(feature)/i" + # Commands "command: backup": - - "/(backup)/i" + - "(backup)" "command: console": - - "/(console|tmux)/i" + - "(console|tmux)" "command: debug": - - "/(debug)/i" + - "(debug)" "command: details": - - "/(details)/i" + - "(details)" "command: fast-dl": - - "/(fast-dl|fastdl)/i" + - "(fast-dl|fastdl)" "command: install": - - "/(install)/i" + - "(install)" "command: mods": - - "/(mods)/i" + - "(mods)" "command: monitor": - - "/(monitor)/i" + - "(monitor)" "command: post-details": - - "/(post-details)/i" + - "(post-details)" "command: restart": - - "/(restart)/i" + - "(restart)" "command: send": - - "/(send)/i" + - "(send)" "command: skeleton": - - "/(skeleton)/i" + - "(skeleton)" "command: start": - - "/(start)/i" + - "(start)" "command: stop": - - "/(stop)/i" + - "(stop)" "command: update-lgsm": - - "/(update-lgsm)/i" + - "(update-lgsm)" "command: update": - - "/(update)/i" + - "(update)" "command: validate": - - "/(validate)/i" + - "(validate)" "command: wipe": - - "/(wipe)/i" + - "(wipe)" # Distros "distro: AlmaLinux": - - "/(Alma)/i" + - "(Alma)" "distro: Arch Linux": - - "/(Arch)/i" + - "(Arch)" "distro: CentOS": - - "/(CentOS)/i" + - "(CentOS)" "distro: Debian": - - "/(Debian)/i" + - "(Debian)" "distro: Fedora": - - "/(Fedora)/i" + - "(Fedora)" "distro: openSUSE": - - "/(openSUSE|suse)/i" + - "(openSUSE|suse)" "distro: Rocky Linux": - - "/(Rocky)/i" + - "(Rocky)" "distro: Slackware": - - "/(Slackware)/i" + - "(Slackware)" "distro: Ubuntu": - - "/(Ubuntu)/i" + - "(Ubuntu)" +# Games +"game: Ark: Survival Evolved": + - "(Ark: Survival Evolved|Ark)" +"game: ARMA 3": + - "(ARMA 3)" +"game: Assetto Corsa": + - "(Assetto Corsa)" +"game: Avorion": + - "(Avorion)" +"game: Ballistic Overkill": + - "(Ballistic Overkill)" +"game: Barotrauma": + - "(Barotrauma)" # Info "info: alerts": - - "/(alert)/i" + - "(alert)" "info: dependency": - - "/(dependency|deps)/i" + - "(dependency|deps)" "info: docker": - - "/(docker)/i" + - "(docker)" "info: docs": - - "/(documentation|docs)/i" + - "(documentation|docs)" "info: email": - - "/(postfix|sendmail|exim|smtp)/i" + - "(postfix|sendmail|exim|smtp)" "info: query": - - "/(gamedig|gsquery)/i" + - "(gamedig|gsquery)" "info: steamcmd": - - "/(steamcmd)/i" + - "(steamcmd)" "info: systemd": - - "/(systemd)/i" + - "(systemd)" "info: tmux": - - "/(tmux)/i" + - "(tmux)" "info: website": - - "/(website)/i" -# Games -"game: Ark: Survival Evolved": - - "/(Ark: Survival Evolved|Ark)/i" -"game: ARMA 3": - - "/(ARMA 3)/i" -"game: Assetto Corsa": - - "/(Assetto Corsa)/i" -"game: Avorion": - - "/(Avorion)/i" -"game: Ballistic Overkill": - - "/(Ballistic Overkill)/i" -"game: Barotrauma": - - "/(Barotrauma)/i" + - "(website)" +# Type +"type: game server request": + - "(Server Request)" +"type: bug": + - "(bug)" +"type: feature request": + - "(feature)" diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml deleted file mode 100644 index f543b2802..000000000 --- a/.github/workflows/create-release.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Release Drafter - -on: - push: - # branches to consider in the event; optional, defaults to all - branches: - - master -permissions: - contents: read - -jobs: - update_release_draft: - permissions: - contents: write # for release-drafter/release-drafter to create a github release - pull-requests: write # for release-drafter/release-drafter to add label to PR - runs-on: ubuntu-latest - steps: - # Drafts your next Release notes as Pull Requests are merged into "master" - - uses: release-drafter/release-drafter@v5.22.0 - with: - config-name: release-drafter.yml - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index a1a90e6eb..07ec55677 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -2,6 +2,8 @@ name: "Issue Labeler" on: issues: types: [opened, edited] + pull_request: + types: [opened, edited] permissions: contents: read @@ -13,9 +15,10 @@ jobs: issues: write # for github/issue-labeler to create or remove labels runs-on: ubuntu-latest steps: - - uses: github/issue-labeler@v2.6 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" - configuration-path: .github/labeler.yml - not-before: - enable-versioned-regex: 0 + - uses: github/issue-labeler@v2.6 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + configuration-path: .github/labeler.yml + not-before: + enable-versioned-regex: 0 + include-title: 1 From 9796d29ec59b34c50a2679060a8140d3643add58 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 3 Feb 2023 16:43:17 +0000 Subject: [PATCH 074/374] chore: make labels less sensitive --- .github/labeler.yml | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index f9e0bd0aa..ec30290ce 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -2,41 +2,41 @@ # Commands "command: backup": - - "(backup)" + - "(command: backup)" "command: console": - - "(console|tmux)" + - "(command: console|tmux)" "command: debug": - - "(debug)" + - "(command: debug)" "command: details": - - "(details)" + - "(command: details)" "command: fast-dl": - - "(fast-dl|fastdl)" + - "(command: fast-dl|fastdl|fast-dl)" "command: install": - - "(install)" + - "(command: install)" "command: mods": - - "(mods)" + - "(command: mods)" "command: monitor": - - "(monitor)" + - "(command: monitor|monitor)" "command: post-details": - - "(post-details)" + - "(command: post-details|post-details)" "command: restart": - - "(restart)" + - "(command: restart)" "command: send": - - "(send)" + - "(command: send)" "command: skeleton": - - "(skeleton)" + - "(command: skeleton)" "command: start": - - "(start)" + - "(command: start)" "command: stop": - - "(stop)" + - "(command: stop)" "command: update-lgsm": - - "(update-lgsm)" + - "(command: update-lgsm|update-lgsm)" "command: update": - - "(update)" + - "(command: update)" "command: validate": - - "(validate)" + - "(command: validate)" "command: wipe": - - "(wipe)" + - "(command: wipe)" # Distros "distro: AlmaLinux": - "(Alma)" @@ -69,6 +69,8 @@ - "(Ballistic Overkill)" "game: Barotrauma": - "(Barotrauma)" +"game: Black Mesa": + - "(Black Mesa)" # Info "info: alerts": - "(alert)" From 9db0c2d11d0cd56a1970a13fcdc29138a93dcf3c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 9 Feb 2023 15:48:45 +0000 Subject: [PATCH 075/374] chore: increase duplicate threshold --- .github/workflows/potential-duplicates.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/potential-duplicates.yml b/.github/workflows/potential-duplicates.yml index 47356dba8..f1e783674 100644 --- a/.github/workflows/potential-duplicates.yml +++ b/.github/workflows/potential-duplicates.yml @@ -20,7 +20,7 @@ jobs: # Get issues with state to compare. Supported state: 'all', 'closed', 'open'. state: all # If similarity is higher than this threshold([0,1]), issue will be marked as duplicate. - threshold: 0.6 + threshold: 0.8 # Reactions to be add to comment when potential duplicates are detected. # Available reactions: "-1", "+1", "confused", "laugh", "heart", "hooray", "rocket", "eyes" #reactions: 'eyes, confused' From ec3605624ad02a5050ce35d89432402efc2e859e Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 9 Feb 2023 17:39:20 +0000 Subject: [PATCH 076/374] chore: fix labeler a a --- .github/labeler.yml | 21 ++++++++------------- .github/workflows/labeler.yml | 2 +- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index ec30290ce..a105a8c57 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,24 +1,21 @@ -# Add/remove 'critical' label if issue contains the words 'urgent' or 'critical' - -# Commands "command: backup": - - "(command: backup)" + - "(backup)" "command: console": - - "(command: console|tmux)" + - "(console|tmux)" "command: debug": - "(command: debug)" "command: details": - "(command: details)" "command: fast-dl": - - "(command: fast-dl|fastdl|fast-dl)" + - "(fast-dl|fastdl)" "command: install": - "(command: install)" "command: mods": - "(command: mods)" "command: monitor": - - "(command: monitor|monitor)" + - "(command: monitor)" "command: post-details": - - "(command: post-details|post-details)" + - "(command: post-details)" "command: restart": - "(command: restart)" "command: send": @@ -30,13 +27,13 @@ "command: stop": - "(command: stop)" "command: update-lgsm": - - "(command: update-lgsm|update-lgsm)" + - "(update-lgsm)" "command: update": - "(command: update)" "command: validate": - - "(command: validate)" + - "(validate)" "command: wipe": - - "(command: wipe)" + - "(wipe)" # Distros "distro: AlmaLinux": - "(Alma)" @@ -69,8 +66,6 @@ - "(Ballistic Overkill)" "game: Barotrauma": - "(Barotrauma)" -"game: Black Mesa": - - "(Black Mesa)" # Info "info: alerts": - "(alert)" diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 07ec55677..b5bb38498 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -15,7 +15,7 @@ jobs: issues: write # for github/issue-labeler to create or remove labels runs-on: ubuntu-latest steps: - - uses: github/issue-labeler@v2.6 + - uses: github/issue-labeler@v2.5 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" configuration-path: .github/labeler.yml From a181b2d56a5c04c44d2c2a9807911d21532a985f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 9 Feb 2023 23:07:20 +0000 Subject: [PATCH 077/374] chore: update issue templates --- .github/ISSUE_TEMPLATE/bug-report.md | 50 ----------- .github/ISSUE_TEMPLATE/bug_report.yml | 95 ++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 8 ++ .github/ISSUE_TEMPLATE/feature-request.md | 43 --------- .github/ISSUE_TEMPLATE/feature_request.yml | 78 ++++++++++++++++ .github/ISSUE_TEMPLATE/new-server-request.md | 31 ------- .github/ISSUE_TEMPLATE/server_request.yml | 57 ++++++++++++ .github/labeler.yml | 2 +- .github/workflows/trigger-docker-build.yml | 6 +- 9 files changed, 242 insertions(+), 128 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug-report.md create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml delete mode 100644 .github/ISSUE_TEMPLATE/feature-request.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml delete mode 100644 .github/ISSUE_TEMPLATE/new-server-request.md create mode 100644 .github/ISSUE_TEMPLATE/server_request.yml diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md deleted file mode 100644 index f0b071753..000000000 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -name: Bug Report -about: Found a bug? Raise a report. -title: "[BUG]" -labels: "type: bug" -assignees: "" ---- - -Issues raised here are **ONLY** for: - -- LinuxGSM bugs. -- Feature suggestions. -- Code contributions. - -Issues raised here are **NOT** for: - -- General support. -- Specific game server issues (e.g CS:GO, TF2). -- Dedicated server issues (e.g Ubuntu, CentOS). -- Anything not directly related to LinuxGSM development. - -For general support visit the **[LinuxGSM-Support](https://linuxgsm.com/support)**. - -**_Please use the template below, deleting the above text_** - -## User Story - -As a [user description], I want [desired action] so that [desired outcome]. - -## Basic info - -- **Distro:** [Ubuntu 18.04] -- **Game:** [Garry's Mod] -- **Command:** [Monitor] -- **LinuxGSM version:** [v20.1.3] - -## Further Information - -A clear description of what the bug is and any ideas on how to resolve it. Plus any further context that might be relevant to the issue. - -## To Reproduce - -Steps to reproduce the behaviour: - -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -## Expected behaviour diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 000000000..f0837b108 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,95 @@ +--- +name: Bug Report +description: File a bug report +title: "[Bug]: " +labels: ["type: bug"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + - type: input + id: user-story + attributes: + label: User story + description: As a [user description], I want [desired action] so that [desired outcome]. + placeholder: As a [user description], I want [desired action] so that [desired outcome]. + validations: + required: true + - type: input + id: game + attributes: + label: Game + description: What game server are you hosting? + placeholder: Valheim + validations: + required: true + - type: dropdown + id: distro + attributes: + label: Linux distro + multiple: true + options: + - Ubuntu 22.04 + - Ubuntu 20.04 + - Ubuntu 18.04 + - Ubuntu 16.04 + - Debian 11 + - Debian 10 + - Debian 9 + - RedHat 9 + - RedHat 8 + - RedHat 7 + - Other + validations: + required: true + - type: dropdown + id: command + attributes: + label: Command + multiple: true + options: + - "command: start" + - "command: stop" + - "command: restart" + - "command: monitor" + - "command: details" + - "command: update" + - "command: validate" + - "command: backup" + - "command: mods-install" + - "command: mods-update" + - "command: mods-remove" + - "command: debug" + - "command: console" + - "command: install" + - "command: auto-update" + - "command: update-lgsm" + - "command: wipe" + - "command: send" + validations: + required: true + - type: textarea + id: further-info + attributes: + label: Further information + description: A clear description of what the bug is, any ideas on how to resolve it and any further context that might be relevant to the issue. + placeholder: Tell us what you see! + validations: + required: true + - type: textarea + id: logs + attributes: + label: Relevant log output + description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. + render: shell + - type: textarea + id: steps + attributes: + label: Steps to reproduce + description: Steps to reproduce the behaviour. + placeholder: | + 1. Go to '...' + 2. Click on '....' + 3. Scroll down to '....' + 4. See error diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 000000000..d2113c6ca --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: Ask a question + about: Ask questions and discuss with other users of LinuxGSM. + url: https://github.com/GameServerManagers/LinuxGSM/discussions + - name: Discord Server + about: Join the LinuxGSM Discord community server. Discuss your LinuxGSM setup, get help and advice + url: https://linuxgsm.com/discord diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md deleted file mode 100644 index 992178f07..000000000 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -name: Feature Request -about: Suggest an idea for LinuxGSM. -title: "[FEATURE]" -labels: "type: feature request" -assignees: "" ---- - -Issues raised here are **ONLY** for: - -- LinuxGSM bugs. -- Feature suggestions. -- Code contributions. - -Issues raised here are **NOT** for: - -- General support. -- Specific game server issues (e.g CS:GO, TF2). -- Dedicated server issues (e.g Ubuntu, CentOS). -- Anything not directly related to LinuxGSM development. - -For general support visit the **[LinuxGSM Support](https://linuxgsm.com/support)** page. - -**_Please use the template below, deleting the above text_** - -## User Story - -As a [user description], I want [desired action] so that [desired outcome]. - -## Basic info - -- **Distro:** [Ubuntu 20.04] -- **Game:** [Garry's Mod] -- **Command:** [Monitor] -- **LinuxGSM version:** [v20.1.3] - -## Further Information - -A clear description of what the feature is and any ideas on how to achieve this. - -## Further Reading - -Provide any useful documentation or resources that might help. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 000000000..fb06052ac --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,78 @@ +--- +name: Feature Request +description: Suggest a feature +title: "[Feature]: " +labels: ["type: feature"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this feature request! + - type: input + id: user-story + attributes: + label: User story + description: As a [user description], I want [desired action] so that [desired outcome]. + placeholder: As a [user description], I want [desired action] so that [desired outcome]. + validations: + required: true + - type: input + id: game + attributes: + label: Game + description: What game server are you hosting? + placeholder: Valheim + validations: + required: false + - type: dropdown + id: distro + attributes: + label: Linux distro + multiple: true + options: + - Ubuntu 22.04 + - Ubuntu 20.04 + - Ubuntu 18.04 + - Ubuntu 16.04 + - Debian 11 + - Debian 10 + - Debian 9 + - RedHat 9 + - RedHat 8 + - RedHat 7 + - Other + validations: + required: false + - type: dropdown + id: command + attributes: + label: Command + multiple: true + options: + - "command: start" + - "command: stop" + - "command: restart" + - "command: monitor" + - "command: details" + - "command: update" + - "command: validate" + - "command: backup" + - "command: mods-install" + - "command: mods-update" + - "command: mods-remove" + - "command: debug" + - "command: console" + - "command: install" + - "command: auto-update" + - "command: update-lgsm" + - "command: wipe" + - "command: send" + validations: + required: true + - type: textarea + id: further-info + attributes: + label: Further information + description: A clear description of what the feature is and any ideas on how to achieve this. + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/new-server-request.md b/.github/ISSUE_TEMPLATE/new-server-request.md deleted file mode 100644 index bedc4f506..000000000 --- a/.github/ISSUE_TEMPLATE/new-server-request.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -name: New Server Request -about: Suggest a new game server to be added. -title: "[Server Request]" -labels: "type: game server request" -assignees: "" ---- - -## What game server would you like to add? - -[game server] - -## Can you link to any tutorials or guides? - -Provide any useful documentation or resources that might help. - -## Is the server on Steam? - -- [ ] Yes -- [ ] No - -If yes Use SteamDB to get the appid. (https://steamdb.info). - -[appid] - -## Is the server supported on Linux? - -We only support Linux servers and do **not** support Wine. - -- [ ] Yes -- [ ] No diff --git a/.github/ISSUE_TEMPLATE/server_request.yml b/.github/ISSUE_TEMPLATE/server_request.yml new file mode 100644 index 000000000..31dbc6b81 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/server_request.yml @@ -0,0 +1,57 @@ +--- +name: Server Request +description: Suggest a new game server to be added +title: "[Server Request]: " +labels: ["type: game server request"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this game server! + - type: input + id: game-server + attributes: + label: Game server + description: What game server would you like to add? + validations: + required: true + - type: checkboxes + id: on-linux + attributes: + label: Linux support + description: Does this game server have Linux support? (not wine) + options: + - label: "Yes" + validations: + required: true + - type: dropdown + id: on-steam + attributes: + label: Steam + description: Is this game server available on Steam? + options: + - "Yes" + - "No" + validations: + required: true + - type: input + id: steam-id + attributes: + label: Steam appid + description: What is the Steam appid of the game server? Use SteamDB to get the appid. (https://steamdb.info). + placeholder: "892970" + validations: + required: false + - type: textarea + id: guides + attributes: + label: Guides + description: Links to guides on how to install the game server + - type: checkboxes + id: terms + attributes: + label: Code of Conduct + description: By submitting this issue, you agree to follow our [Code of Conduct](https://example.com) + options: + - label: I agree to follow this project's Code of Conduct + required: true diff --git a/.github/labeler.yml b/.github/labeler.yml index a105a8c57..a55e62006 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -9,7 +9,7 @@ "command: fast-dl": - "(fast-dl|fastdl)" "command: install": - - "(command: install)" + - "(install)" "command: mods": - "(command: mods)" "command: monitor": diff --git a/.github/workflows/trigger-docker-build.yml b/.github/workflows/trigger-docker-build.yml index 697511816..adb43343f 100644 --- a/.github/workflows/trigger-docker-build.yml +++ b/.github/workflows/trigger-docker-build.yml @@ -1,8 +1,8 @@ name: Trigger Docker Build on: - push: - branches: - - master + release: + types: + - published jobs: trigger_build_docker-linuxgsm: name: Trigger Build docker-linuxgsm From 40fc154fafa5ee4e4d16d45ee94cd6d11d5c5b58 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 10 Feb 2023 09:58:24 +0000 Subject: [PATCH 078/374] chore: minor grammar updates --- .github/pull_request_template.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index a0c40a150..4e6d08327 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -7,7 +7,7 @@ Fixes #[issue] ## Type of change - [ ] Bug fix (a change which fixes an issue). -- [ ] New feature (change which adds functionality). +- [ ] New feature (a change which adds functionality). - [ ] New Server (new server added). - [ ] Refactor (restructures existing code). - [ ] Comment update (typo, spelling, explanation, examples, etc). @@ -18,12 +18,12 @@ 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 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 with enough description of this PR. -- [ ] I have checked If documentation needs updating. +- [ ] I have provided a detailed enough description of this PR. +- [ ] I have checked if documentation needs updating. ## Documentation From 7f6147f27945cba19b3b6fd43188b1113f348c23 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 10 Feb 2023 13:10:09 +0000 Subject: [PATCH 079/374] chore: make labeler case insensitive --- .github/labeler.yml | 156 +++++++++++++++++++++++++++++++------------- 1 file changed, 110 insertions(+), 46 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index a55e62006..1ec662f2b 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,96 +1,160 @@ "command: backup": - - "(backup)" + - "/(backup)/i" "command: console": - - "(console|tmux)" + - "/(console|tmux)/i" "command: debug": - - "(command: debug)" + - "/(command: debug)/i" "command: details": - - "(command: details)" + - "/(command: details)/i" "command: fast-dl": - - "(fast-dl|fastdl)" + - "/(fast-dl|fastdl)/i" "command: install": - - "(install)" + - "/(install)/i" "command: mods": - - "(command: mods)" + - "/(command: mods)/i" "command: monitor": - - "(command: monitor)" + - "/(command: monitor)/i" "command: post-details": - - "(command: post-details)" + - "/(command: post-details)/i" "command: restart": - - "(command: restart)" + - "/(command: restart)/i" "command: send": - - "(command: send)" + - "/(command: send)/i" "command: skeleton": - - "(command: skeleton)" + - "/(command: skeleton)/i" "command: start": - - "(command: start)" + - "/(command: start)/i" "command: stop": - - "(command: stop)" + - "/(command: stop)/i" "command: update-lgsm": - - "(update-lgsm)" + - "/(update-lgsm)/i" "command: update": - - "(command: update)" + - "/(command: update)/i" "command: validate": - - "(validate)" + - "/(validate)/i" "command: wipe": - - "(wipe)" + - "/(wipe)/i" + # Distros "distro: AlmaLinux": - - "(Alma)" + - "/(Alma)/i" "distro: Arch Linux": - - "(Arch)" + - "/(Arch Linux)/i" "distro: CentOS": - - "(CentOS)" + - "/(CentOS)/i" "distro: Debian": - - "(Debian)" + - "/(Debian)/i" "distro: Fedora": - - "(Fedora)" + - "/(Fedora)/i" "distro: openSUSE": - - "(openSUSE|suse)" + - "/(openSUSE|suse)/i" "distro: Rocky Linux": - - "(Rocky)" + - "/(Rocky)/i" "distro: Slackware": - - "(Slackware)" + - "/(Slackware)/i" "distro: Ubuntu": - - "(Ubuntu)" + - "/(Ubuntu)/i" + # Games +"game: 7 Days to Die": + - "/(7 Days to Die|sdtd)/i" "game: Ark: Survival Evolved": - - "(Ark: Survival Evolved|Ark)" + - "/(Ark: Survival Evolved|Ark)/i" "game: ARMA 3": - - "(ARMA 3)" + - "/(ARMA 3|ARMA3)/i" "game: Assetto Corsa": - - "(Assetto Corsa)" + - "/(Assetto Corsa)/i" "game: Avorion": - - "(Avorion)" + - "/(Avorion)/i" "game: Ballistic Overkill": - - "(Ballistic Overkill)" + - "/(Ballistic Overkill)/i" +"game: Battalion 1944": + - "/(Battalion 1944)/i" "game: Barotrauma": - - "(Barotrauma)" + - "/(Barotrauma)/i" +"game: Counter-Strike: Global Offensive": + - "/(Counter-Strike: Global Offensive|CS:GO|csgo)/i" +"game: Counter-Strike: Source": + - "/(Counter-Strike: Source|CS:S)/i" +"game: Counter-Strike 1.6": + - "/(Counter-Strike 1.6|Counter Strike 1.6|CS 1.6|cs1.6)/i" +"game: Dayz": + - "/(Dayz)/i" +"game: Don't Starve Together": + - "/(Don't Starve Together|Dont Starve Together|DST)/i" +"game: Eco": + - "/(^Eco$)/i" +"game: Factorio": + - "/(Factorio)/i" +"game: Garry's Mod": + - "/(Garry's Mod|Garrys Mod|GMod)/i" +"game: Insurgency: Sandstorm": + - "/(Insurgency: Sandstorm|Insurgency)/i" +"game: Killing Floor 2": + - "/(Killing Floor 2|KF2)/i" +"game: Left 4 Dead 2": + - "/(Left 4 Dead 2|L4D2)/i" +"game: Minecraft": + - "/(minecraft)((?!bedrock).)*$/i" +"game: Minecraft Bedrock": + - "/(Bedrock)/i" +"game: Mumble": + - "/(Mumble)/i" +"game: Project Zomboid": + - "/(Project Zomboid)/i" +"game: Quake 3": + - "/(Quake 3|Q3A|q3)/i" +"game: Rising World": + - "/(Rising World)/i" +"game: Satisfactory": + - "/(Satisfactory)/i" +"game: Squad": + - "/(Squad)/i" +"game: Starbound": + - "/(Starbound)/i" +"game: Stationeers": + - "/(Stationeers)/i" +"game: Teamspeak 3": + - "/(Teamspeak 3|ts3)/i" +"game: Rust": + - "/(Rust)/i" +"game: Unturned": + - "/(Unturned)/i" +"game: Unreal Tournament 99": + - "/(Unreal Tournament 99|ut99)/i" +"game: Unreal Tournament 2004": + - "/(Unreal Tournament 2004|ut2k4)/i" +"game: Unreal Tournament 3": + - "/(Unreal Tournament 3|ut3)/i" +"game: Valheim": + - "/(Valheim)/i" + # Info "info: alerts": - - "(alert)" + - "/(alert)/i" "info: dependency": - - "(dependency|deps)" + - "/(dependency|deps)/i" "info: docker": - - "(docker)" + - "/(docker)/i" "info: docs": - - "(documentation|docs)" + - "/(documentation|^docs$)/i" "info: email": - - "(postfix|sendmail|exim|smtp)" + - "/(postfix|sendmail|exim|smtp)/i" "info: query": - - "(gamedig|gsquery)" + - "/(gamedig|gsquery)/i" "info: steamcmd": - - "(steamcmd)" + - "/(steamcmd)/i" "info: systemd": - - "(systemd)" + - "/(systemd)/i" "info: tmux": - - "(tmux)" + - "/(tmux)/i" "info: website": - - "(website)" + - "/(website)/i" + # Type "type: game server request": - - "(Server Request)" + - "/(Server Request)/i" "type: bug": - - "(bug)" + - "/(bug)/i" "type: feature request": - - "(feature)" + - "/(feature)/i" From 227343c9908ec56a4f524497b5b2ec9ebad03f0e Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 16 Feb 2023 22:00:52 +0000 Subject: [PATCH 080/374] feat(debug): add press return to exit debug Since terminal is reset on debug exit this will allow user to see output before this happens. --- lgsm/functions/command_debug.sh | 21 +++++++++++++++++---- lgsm/functions/fix_steamcmd.sh | 4 ++-- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/lgsm/functions/command_debug.sh b/lgsm/functions/command_debug.sh index 190a8c527..c6422be65 100755 --- a/lgsm/functions/command_debug.sh +++ b/lgsm/functions/command_debug.sh @@ -28,7 +28,6 @@ check.sh fix.sh info_distro.sh info_game.sh -# NOTE: Check if works with server without parms. Could be intergrated in to info_parms.sh. fn_print_header { echo -e "${lightblue}Distro:\t\t${default}${distroname}" @@ -40,8 +39,9 @@ fn_print_header echo -e "${lightblue}Free Memory:\t\t${default}${physmemfree}" echo -e "${lightblue}Free Disk:\t\t${default}${availspace}" } | column -s $'\t' -t + # glibc required. -if [ "${glibc}" ]; then +if [ -n "${glibc}" ]; then if [ "${glibc}" == "null" ]; then # Glibc is not required. : @@ -54,7 +54,7 @@ if [ "${glibc}" ]; then fi fi -# Server IP +# Server IP. echo -e "${lightblue}Game Server IP:\t${default}${ip}:${port}" # External server IP. @@ -63,6 +63,7 @@ if [ "${extip}" ]; then echo -e "${lightblue}Internet IP:\t${default}${extip}:${port}" fi fi + # Server password. if [ "${serverpassword}" ]; then echo -e "${lightblue}Server password:\t${default}${serverpassword}" @@ -78,7 +79,7 @@ else echo -e "${preexecutable} ${executable} ${startparameters}" fi echo -e "" -echo -e "Use for identifying server issues only!" +echo -e "Use debug for identifying server issues only!" echo -e "Press CTRL+c to drop out of debug mode." fn_print_warning_nl "If ${selfname} is already running it will be stopped." echo -e "" @@ -120,6 +121,18 @@ else eval "${preexecutable} ${executable} ${startparameters}" fi +if [ $? -ne 0 ]; then + fn_print_error_nl "Server has stopped: exit code: $?" + fn_script_log_error "Server has stopped: exit code: $?" + fn_print_error_nl "Press ENTER to exit debug mode" + read -r +else + fn_print_ok_nl "Server has stopped" + fn_script_log_pass "Server has stopped" + fn_print_ok_nl "Press ENTER to exit debug mode" + read -r +fi + fn_lockfile_trap fn_print_dots "Stopping debug" diff --git a/lgsm/functions/fix_steamcmd.sh b/lgsm/functions/fix_steamcmd.sh index 0162a6495..9644208dc 100755 --- a/lgsm/functions/fix_steamcmd.sh +++ b/lgsm/functions/fix_steamcmd.sh @@ -56,7 +56,7 @@ steamclientsdk64="${steamsdk64}/steamclient.so" # remove any old unlinked versions of steamclient.so if [ -f "${steamclientsdk64}" ]; then if [ "$(stat -c '%h' "${steamclientsdk64}")" -eq 1 ]; then - fixname="steamclient.so sdk64 -- remove old file" + fixname="steamclient.so sdk64 - remove old file" fn_fix_msg_start rm -f "${steamclientsdk64}" fn_fix_msg_end @@ -87,7 +87,7 @@ steamsdk32="${HOME}/.steam/sdk32" steamclientsdk32="${HOME}/.steam/sdk32/steamclient.so" if [ -f "${steamclientsdk32}" ]; then if [ " $(stat -c '%h' "${steamclientsdk32}")" -eq 1 ]; then - fixname="steamclient.so sdk32 -- remove old file" + fixname="steamclient.so sdk32 - remove old file" fn_fix_msg_start rm -f "${steamclientsdk32}" fn_fix_msg_end From ccb216ecda3d2bd639ca81b0f68bb7c112607967 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 16 Feb 2023 22:17:15 +0000 Subject: [PATCH 081/374] fix: selecting branch instead of version when getting modules --- linuxgsm.sh | 11 +- package-lock.json | 222 ++++---------------------------------- tests/tests_kcov.sh | 14 --- tests/tests_shellcheck.sh | 32 ------ 4 files changed, 21 insertions(+), 258 deletions(-) delete mode 100644 tests/tests_kcov.sh delete mode 100644 tests/tests_shellcheck.sh diff --git a/linuxgsm.sh b/linuxgsm.sh index 4344b68de..a0eb306f6 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -1,7 +1,7 @@ #!/bin/bash # Project: Linux Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2020 Daniel Gibbs +# License: MIT License, see LICENSE.md # Purpose: Linux Game Server Management Script # Contributors: https://linuxgsm.com/contrib # Documentation: https://docs.linuxgsm.com @@ -167,8 +167,8 @@ fn_bootstrap_fetch_file() { fn_bootstrap_fetch_file_github() { github_file_url_dir="${1}" github_file_url_name="${2}" - # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. - if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then + # By default modules will be downloaded from the version release to prevent potential version mixing. Only update-lgsm will allow an update. + if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" else @@ -512,9 +512,4 @@ else # Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off. fn_ansi_loader - # Prevents running of core_exit.sh for Travis-CI. - if [ "${travistest}" != "1" ]; then - getopt=$1 - core_getopt.sh - fi fi diff --git a/package-lock.json b/package-lock.json index d0deca3ec..b592f5bea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "linuxgsm", - "lockfileVersion": 2, + "lockfileVersion": 3, "requires": true, "packages": { "": { @@ -12,9 +12,9 @@ } }, "node_modules/@pkgr/utils": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.3.0.tgz", - "integrity": "sha512-7dIJ9CRVzBnqyEl7diUHPUFJf/oty2SeoVzcMocc5PeOUDK9KGzvgIBjGRRzzlRDaOjh3ADwH0WeibQvi3ls2Q==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.3.1.tgz", + "integrity": "sha512-wfzX8kc1PMyUILA+1Z/EqoE4UCXGy0iRGMhPwdfae1+f0OXlLqCk+By+aMzgJBzR9AzS4CDizioG6Ss1gvAFJw==", "dev": true, "dependencies": { "cross-spawn": "^7.0.3", @@ -127,9 +127,9 @@ "dev": true }, "node_modules/open": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/open/-/open-8.4.0.tgz", - "integrity": "sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q==", + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/open/-/open-8.4.1.tgz", + "integrity": "sha512-/4b7qZNhv6Uhd7jjnREh1NjnPxlTq+XNWPG88Ydkj5AILcA5m3ajvcg57pB24EQjKv0dK62XnDqk9c/hkIG5Kg==", "dev": true, "dependencies": { "define-lazy-prop": "^2.0.0", @@ -159,9 +159,9 @@ "dev": true }, "node_modules/prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "version": "2.8.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz", + "integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==", "dev": true, "bin": { "prettier": "bin-prettier.js" @@ -230,13 +230,13 @@ } }, "node_modules/synckit": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.3.tgz", - "integrity": "sha512-1goXnDYNJlKwCM37f5MTzRwo+8SqutgVtg2d37D6YnHHT4E3IhQMRfKiGdfTZU7LBlI6T8inCQUxnMBFHrbqWw==", + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.5.tgz", + "integrity": "sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==", "dev": true, "dependencies": { - "@pkgr/utils": "^2.3.0", - "tslib": "^2.4.0" + "@pkgr/utils": "^2.3.1", + "tslib": "^2.5.0" }, "engines": { "node": "^14.18.0 || >=16.0.0" @@ -256,9 +256,9 @@ } }, "node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", "dev": true }, "node_modules/which": { @@ -276,191 +276,5 @@ "node": ">= 8" } } - }, - "dependencies": { - "@pkgr/utils": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.3.0.tgz", - "integrity": "sha512-7dIJ9CRVzBnqyEl7diUHPUFJf/oty2SeoVzcMocc5PeOUDK9KGzvgIBjGRRzzlRDaOjh3ADwH0WeibQvi3ls2Q==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.3", - "is-glob": "^4.0.3", - "open": "^8.4.0", - "picocolors": "^1.0.0", - "tiny-glob": "^0.2.9", - "tslib": "^2.4.0" - } - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "define-lazy-prop": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", - "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", - "dev": true - }, - "globalyzer": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz", - "integrity": "sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==", - "dev": true - }, - "globrex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz", - "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==", - "dev": true - }, - "is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "dev": true - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true - }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dev": true, - "requires": { - "is-docker": "^2.0.0" - } - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "mvdan-sh": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/mvdan-sh/-/mvdan-sh-0.10.1.tgz", - "integrity": "sha512-kMbrH0EObaKmK3nVRKUIIya1dpASHIEusM13S4V1ViHFuxuNxCo+arxoa6j/dbV22YBGjl7UKJm9QQKJ2Crzhg==", - "dev": true - }, - "open": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/open/-/open-8.4.0.tgz", - "integrity": "sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q==", - "dev": true, - "requires": { - "define-lazy-prop": "^2.0.0", - "is-docker": "^2.1.1", - "is-wsl": "^2.2.0" - } - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - }, - "prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", - "dev": true - }, - "prettier-plugin-sh": { - "version": "0.12.8", - "resolved": "https://registry.npmjs.org/prettier-plugin-sh/-/prettier-plugin-sh-0.12.8.tgz", - "integrity": "sha512-VOq8h2Gn5UzrCIKm4p/nAScXJbN09HdyFDknAcxt6Qu/tv/juu9bahxSrcnM9XWYA+Spz1F1ANJ4LhfwB7+Q1Q==", - "dev": true, - "requires": { - "mvdan-sh": "^0.10.1", - "sh-syntax": "^0.3.6", - "synckit": "^0.8.1" - } - }, - "sh-syntax": { - "version": "0.3.7", - "resolved": "https://registry.npmjs.org/sh-syntax/-/sh-syntax-0.3.7.tgz", - "integrity": "sha512-xIB/uRniZ9urxAuXp1Ouh/BKSI1VK8RSqfwGj7cV57HvGrFo3vHdJfv8Tdp/cVcxJgXQTkmHr5mG5rqJW8r4wQ==", - "dev": true, - "requires": { - "tslib": "^2.4.0" - } - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "synckit": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.3.tgz", - "integrity": "sha512-1goXnDYNJlKwCM37f5MTzRwo+8SqutgVtg2d37D6YnHHT4E3IhQMRfKiGdfTZU7LBlI6T8inCQUxnMBFHrbqWw==", - "dev": true, - "requires": { - "@pkgr/utils": "^2.3.0", - "tslib": "^2.4.0" - } - }, - "tiny-glob": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.9.tgz", - "integrity": "sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==", - "dev": true, - "requires": { - "globalyzer": "0.1.0", - "globrex": "^0.1.2" - } - }, - "tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", - "dev": true - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } } } diff --git a/tests/tests_kcov.sh b/tests/tests_kcov.sh deleted file mode 100644 index 743e2fda2..000000000 --- a/tests/tests_kcov.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -echo -e "Installing kcov" -curl -L "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/shunit2/shunit2-2.1.6.tgz" | tar zx -wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz -tar xzf master.tar.gz -cd kcov-master || exit -mkdir build -cd build || exit -cmake .. -make -sudo make install -cd ../.. -rm -rf kcov-master -mkdir -p coverage diff --git a/tests/tests_shellcheck.sh b/tests/tests_shellcheck.sh deleted file mode 100644 index c277a5177..000000000 --- a/tests/tests_shellcheck.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2020 Daniel Gibbs -# Purpose: Travis CI Tests: Shellcheck | Linux Game Server Management Script -# Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors -# Documentation: https://docs.linuxgsm.com/ -# Website: https://linuxgsm.com - -echo -e "=================================" -echo -e "Travis CI Tests" -echo -e "Linux Game Server Manager" -echo -e "by Daniel Gibbs" -echo -e "Contributors: http://goo.gl/qLmitD" -echo -e "https://linuxgsm.com" -echo -e "=================================" -echo -e "" -echo -e "=================================" -echo -e "Bash Analysis Tests" -echo -e "Using: Shellcheck" -echo -e "Testing Branch: $TRAVIS_BRANCH" -echo -e "=================================" -echo -e "" -scissues=$(find . -type f \( -name "*.sh" -o -name "*.cfg" \) -not -path "./shunit2-2.1.6/*" -exec shellcheck --shell=bash --exclude=SC2154,SC2034 {} \; | grep -F "^--" | wc -l) -echo -e "Found issues: ${scissues}" -echo -e "=================================" -find . -type f \( -name "*.sh" -o -name "*.cfg" \) -not -path "./shunit2-2.1.6/*" -exec shellcheck --shell=bash --exclude=SC2154,SC2034 {} \; -echo -e "" -echo -e "=================================" -echo -e "Bash Analysis Tests - Complete!" -echo -e "Using: Shellcheck" -echo -e "=================================" From 51031eb71ab3cf5c7fc31b7825271ed63a1ba882 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 16 Feb 2023 23:43:09 +0000 Subject: [PATCH 082/374] chore: auto add game server requests to gh project --- .github/workflows/add-to-project.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/add-to-project.yml diff --git a/.github/workflows/add-to-project.yml b/.github/workflows/add-to-project.yml new file mode 100644 index 000000000..56a42c729 --- /dev/null +++ b/.github/workflows/add-to-project.yml @@ -0,0 +1,17 @@ +name: Add to project +on: + issues: + types: + - opened + - labeled + +jobs: + add-to-project: + name: Add game server requests to project + runs-on: ubuntu-latest + steps: + - uses: actions/add-to-project@v0.4.0 + with: + project-url: https://github.com/orgs/GameServerManagers/projects/11 + github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} + labeled: "type: game server request" From 3d936381fae929c6b2987a4c5f5ae1689970c571 Mon Sep 17 00:00:00 2001 From: Marcin Jakubowski Date: Fri, 17 Feb 2023 23:50:41 +0100 Subject: [PATCH 083/374] feat(newserver): American Truck Simulator (#4105) --- .../config-lgsm/atsserver/_default.cfg | 179 ++++++++++++++++++ .../config-lgsm/ets2server/_default.cfg | 179 ++++++++++++++++++ lgsm/data/almalinux-8.csv | 2 + lgsm/data/almalinux-9.csv | 2 + lgsm/data/centos-7.csv | 2 + lgsm/data/centos-8.csv | 2 + lgsm/data/centos-9.csv | 2 + lgsm/data/debian-10.csv | 2 + lgsm/data/debian-11.csv | 2 + lgsm/data/debian-9.csv | 2 + lgsm/data/rhel-7.csv | 2 + lgsm/data/rhel-8.csv | 2 + lgsm/data/rhel-9.csv | 2 + lgsm/data/rocky-8.csv | 2 + lgsm/data/rocky-9.csv | 2 + lgsm/data/serverlist.csv | 2 + lgsm/data/ubuntu-16.04.csv | 2 + lgsm/data/ubuntu-18.04.csv | 2 + lgsm/data/ubuntu-20.04.csv | 2 + lgsm/data/ubuntu-21.04.csv | 2 + lgsm/data/ubuntu-21.10.csv | 2 + lgsm/data/ubuntu-22.04.csv | 2 + lgsm/functions/info_game.sh | 26 +++ lgsm/functions/info_messages.sh | 13 +- lgsm/functions/install_config.sh | 16 ++ 25 files changed, 452 insertions(+), 1 deletion(-) create mode 100644 lgsm/config-default/config-lgsm/atsserver/_default.cfg create mode 100644 lgsm/config-default/config-lgsm/ets2server/_default.cfg diff --git a/lgsm/config-default/config-lgsm/atsserver/_default.cfg b/lgsm/config-default/config-lgsm/atsserver/_default.cfg new file mode 100644 index 000000000..c6e338d34 --- /dev/null +++ b/lgsm/config-default/config-lgsm/atsserver/_default.cfg @@ -0,0 +1,179 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! +# Copy settings from here and use them in either: +# common.cfg - applies settings to every instance. +# [instance].cfg - applies settings to a specific instance. + +#### Game Server Settings #### + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="-nosingle" + +#### LinuxGSM Settings #### + +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + +## Notification Alerts +# (on|off) + +# Display IP | https://docs.linuxgsm.com/alerts#display-ip +displayip="" + +# More info | https://docs.linuxgsm.com/alerts#more-info +postalert="off" + +# Discord Alerts | https://docs.linuxgsm.com/alerts/discord +discordalert="off" +discordwebhook="webhook" + +# Email Alerts | https://docs.linuxgsm.com/alerts/email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + +# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun +mailgunalert="off" +mailgunapiregion="us" +mailguntoken="accesstoken" +mailgundomain="example.com" +mailgunemailfrom="alert@example.com" +mailgunemail="email@myemail.com" + +# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover +pushoveralert="off" +pushovertoken="accesstoken" +pushoveruserkey="userkey" + +# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat +rocketchatalert="off" +rocketchatwebhook="webhook" +rocketchattoken="" + +# Slack Alerts | https://docs.linuxgsm.com/alerts/slack +slackalert="off" +slackwebhook="webhook" + +# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram +# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +telegramapi="api.telegram.org" +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +curlcustomstring="" + +## Updating | https://docs.linuxgsm.com/commands/update +updateonstart="off" + +## Backup | https://docs.linuxgsm.com/commands/backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://docs.linuxgsm.com/features/logging +consolelogging="on" +logdays="7" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="1" + +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors +ansi="on" + +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time +sleeptime="0.5" + +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd +# Server appid +appid="2239530" +steamcmdforcewindows="no" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +betapassword="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="true" + +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode +# 1: tmux kill +# 2: CTRL+c +# 3: quit +# 4: quit 120s +# 5: stop +# 6: q +# 7: exit +# 8: 7 Days to Die +# 9: GoldSrc +# 10: Avorion +# 11: end +stopmode="2" + +## Query mode +# 1: session only +# 2: gamedig (gsquery fallback) +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="4" +querytype="protocol-valve" + +## Console type +consoleverbose="yes" +consoleinteract="no" + +## Game Server Details +# Do not edit +gamename="American Truck Simulator" +engine="prism3d" +glibc="2.15" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}" +executabledir="${systemdir}/bin/linux_x64" +executable="./amtrucks_server" +servercfgdir="${HOME}/.local/share/American Truck Simulator" +servercfg="server_config.sii" +servercfgdefault="server_config.sii" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +logdir="${rootdir}/log" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/config-default/config-lgsm/ets2server/_default.cfg b/lgsm/config-default/config-lgsm/ets2server/_default.cfg new file mode 100644 index 000000000..2d0176133 --- /dev/null +++ b/lgsm/config-default/config-lgsm/ets2server/_default.cfg @@ -0,0 +1,179 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! +# Copy settings from here and use them in either: +# common.cfg - applies settings to every instance. +# [instance].cfg - applies settings to a specific instance. + +#### Game Server Settings #### + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="-nosingle" + +#### LinuxGSM Settings #### + +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + +## Notification Alerts +# (on|off) + +# Display IP | https://docs.linuxgsm.com/alerts#display-ip +displayip="" + +# More info | https://docs.linuxgsm.com/alerts#more-info +postalert="off" + +# Discord Alerts | https://docs.linuxgsm.com/alerts/discord +discordalert="off" +discordwebhook="webhook" + +# Email Alerts | https://docs.linuxgsm.com/alerts/email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + +# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun +mailgunalert="off" +mailgunapiregion="us" +mailguntoken="accesstoken" +mailgundomain="example.com" +mailgunemailfrom="alert@example.com" +mailgunemail="email@myemail.com" + +# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover +pushoveralert="off" +pushovertoken="accesstoken" +pushoveruserkey="userkey" + +# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat +rocketchatalert="off" +rocketchatwebhook="webhook" +rocketchattoken="" + +# Slack Alerts | https://docs.linuxgsm.com/alerts/slack +slackalert="off" +slackwebhook="webhook" + +# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram +# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +telegramapi="api.telegram.org" +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +curlcustomstring="" + +## Updating | https://docs.linuxgsm.com/commands/update +updateonstart="off" + +## Backup | https://docs.linuxgsm.com/commands/backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://docs.linuxgsm.com/features/logging +consolelogging="on" +logdays="7" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="1" + +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors +ansi="on" + +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time +sleeptime="0.5" + +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd +# Server appid +appid="1948160" +steamcmdforcewindows="no" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +betapassword="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="true" + +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode +# 1: tmux kill +# 2: CTRL+c +# 3: quit +# 4: quit 120s +# 5: stop +# 6: q +# 7: exit +# 8: 7 Days to Die +# 9: GoldSrc +# 10: Avorion +# 11: end +stopmode="2" + +## Query mode +# 1: session only +# 2: gamedig (gsquery fallback) +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="4" +querytype="protocol-valve" + +## Console type +consoleverbose="yes" +consoleinteract="no" + +## Game Server Details +# Do not edit +gamename="Euro Truck Simulator 2" +engine="prism3d" +glibc="2.15" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}" +executabledir="${systemdir}/bin/linux_x64" +executable="./eurotrucks2_server" +servercfgdir="${HOME}/.local/share/Euro Truck Simulator 2" +servercfg="server_config.sii" +servercfgdefault="server_config.sii" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +logdir="${rootdir}/log" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index 0bc76a1a6..d14f52f44 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -6,6 +6,7 @@ ahl2 ark arma3 armar,libcurl,openssl-libs +ats av bb bb2,libcurl.i686 @@ -42,6 +43,7 @@ dys eco,libgdiplus em etl +ets2 fctr fof gmod,ncurses-libs.i686 diff --git a/lgsm/data/almalinux-9.csv b/lgsm/data/almalinux-9.csv index 0bc76a1a6..d14f52f44 100644 --- a/lgsm/data/almalinux-9.csv +++ b/lgsm/data/almalinux-9.csv @@ -6,6 +6,7 @@ ahl2 ark arma3 armar,libcurl,openssl-libs +ats av bb bb2,libcurl.i686 @@ -42,6 +43,7 @@ dys eco,libgdiplus em etl +ets2 fctr fof gmod,ncurses-libs.i686 diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index 9ae62611d..c5d633929 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -6,6 +6,7 @@ ahl2 ark arma3 armar,libcurl,openssl11-libs +ats av bb bb2,libcurl.i686 @@ -42,6 +43,7 @@ dys eco,libgdiplus em etl +ets2 fctr fof gmod,ncurses-libs.i686 diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index 0d680e760..f60a925ce 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -6,6 +6,7 @@ ahl2 ark arma3 armar,libcurl,openssl-libs +ats av bb bb2,libcurl.i686 @@ -42,6 +43,7 @@ dys eco,libgdiplus em etl +ets2 fctr fof gmod,ncurses-libs.i686 diff --git a/lgsm/data/centos-9.csv b/lgsm/data/centos-9.csv index 0d680e760..f60a925ce 100644 --- a/lgsm/data/centos-9.csv +++ b/lgsm/data/centos-9.csv @@ -6,6 +6,7 @@ ahl2 ark arma3 armar,libcurl,openssl-libs +ats av bb bb2,libcurl.i686 @@ -42,6 +43,7 @@ dys eco,libgdiplus em etl +ets2 fctr fof gmod,ncurses-libs.i686 diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index 9932a3b39..1196db200 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -6,6 +6,7 @@ ahl2 ark arma3 armar,libcurl4 +ats av bb bb2,libcurl4-gnutls-dev:i386 @@ -42,6 +43,7 @@ dys eco,libgdiplus em etl +ets2 fctr fof gmod,libtinfo5:i386 diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index 514f98ab8..28b7bd853 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -6,6 +6,7 @@ ahl2 ark arma3 armar,libcurl4 +ats av bb bb2,libcurl4-gnutls-dev:i386 @@ -42,6 +43,7 @@ dys eco,libgdiplus em etl +ets2 fctr fof gmod,libtinfo5:i386 diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index 786c8f6c0..1cfbe6ef8 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -6,6 +6,7 @@ ahl2 ark arma3 armar,libcurl4 +ats av bb bb2,libcurl4-gnutls-dev:i386 @@ -42,6 +43,7 @@ dys eco,libgdiplus em etl +ets2 fctr fof gmod,libtinfo5:i386 diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index 58dda5d20..c33ec945f 100644 --- a/lgsm/data/rhel-7.csv +++ b/lgsm/data/rhel-7.csv @@ -6,6 +6,7 @@ ahl2 ark arma3 armar,libcurl,openssl11-libs +ats av bb bb2,libcurl.i686 @@ -42,6 +43,7 @@ dys eco,libgdiplus em etl +ets2 fctr fof gmod,ncurses-libs.i686 diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index 8f0d5a30f..f074b5863 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -6,6 +6,7 @@ ahl2 ark arma3 armar,libcurl,openssl-libs +ats av bb bb2,libcurl.i686 @@ -42,6 +43,7 @@ dys eco,libgdiplus em etl +ets2 fctr fof gmod,ncurses-libs.i686 diff --git a/lgsm/data/rhel-9.csv b/lgsm/data/rhel-9.csv index 8f0d5a30f..f074b5863 100644 --- a/lgsm/data/rhel-9.csv +++ b/lgsm/data/rhel-9.csv @@ -6,6 +6,7 @@ ahl2 ark arma3 armar,libcurl,openssl-libs +ats av bb bb2,libcurl.i686 @@ -42,6 +43,7 @@ dys eco,libgdiplus em etl +ets2 fctr fof gmod,ncurses-libs.i686 diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index 0bc76a1a6..d14f52f44 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -6,6 +6,7 @@ ahl2 ark arma3 armar,libcurl,openssl-libs +ats av bb bb2,libcurl.i686 @@ -42,6 +43,7 @@ dys eco,libgdiplus em etl +ets2 fctr fof gmod,ncurses-libs.i686 diff --git a/lgsm/data/rocky-9.csv b/lgsm/data/rocky-9.csv index 0bc76a1a6..d14f52f44 100644 --- a/lgsm/data/rocky-9.csv +++ b/lgsm/data/rocky-9.csv @@ -6,6 +6,7 @@ ahl2 ark arma3 armar,libcurl,openssl-libs +ats av bb bb2,libcurl.i686 @@ -42,6 +43,7 @@ dys eco,libgdiplus em etl +ets2 fctr fof gmod,ncurses-libs.i686 diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index be19a23f5..3c416fa1d 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -4,6 +4,7 @@ ahl2,ahl2server,Action: Source,ubuntu-22.04 ark,arkserver,ARK: Survival Evolved,ubuntu-22.04 arma3,arma3server,ARMA 3,ubuntu-22.04 armar,armarserver,Arma Reforger,ubuntu-20.04 +ats,atsserver,American Truck Simulator av,avserver,Avorion,ubuntu-22.04 bb,bbserver,BrainBread,ubuntu-22.04 bb2,bb2server,BrainBread 2,ubuntu-22.04 @@ -40,6 +41,7 @@ dys,dysserver,Dystopia,ubuntu-22.04 eco,ecoserver,Eco,ubuntu-22.04 em,emserver,Empires Mod,ubuntu-22.04 etl,etlserver,ET: Legacy,ubuntu-22.04 +ets2,ets2server,Euro Truck Simulator 2,ubuntu-22.04 fctr,fctrserver,Factorio,ubuntu-22.04 fof,fofserver,Fistful of Frags,ubuntu-22.04 gmod,gmodserver,Garrys Mod,ubuntu-22.04 diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index b5d8f6faf..6b6fcd834 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -5,6 +5,7 @@ ahl ahl2 ark arma3 +ats av bb bb2,libcurl4-gnutls-dev:i386 @@ -41,6 +42,7 @@ dys eco,libgdiplus em etl +ets2 fctr fof gmod,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index 9932a3b39..1196db200 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -6,6 +6,7 @@ ahl2 ark arma3 armar,libcurl4 +ats av bb bb2,libcurl4-gnutls-dev:i386 @@ -42,6 +43,7 @@ dys eco,libgdiplus em etl +ets2 fctr fof gmod,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index 68dc928d9..240bb6c1e 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -6,6 +6,7 @@ ahl2 ark arma3 armar,libcurl4 +ats av bb bb2,libcurl4-gnutls-dev:i386 @@ -42,6 +43,7 @@ dys eco,libgdiplus em etl +ets2 fctr fof gmod,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-21.04.csv b/lgsm/data/ubuntu-21.04.csv index 514f98ab8..28b7bd853 100644 --- a/lgsm/data/ubuntu-21.04.csv +++ b/lgsm/data/ubuntu-21.04.csv @@ -6,6 +6,7 @@ ahl2 ark arma3 armar,libcurl4 +ats av bb bb2,libcurl4-gnutls-dev:i386 @@ -42,6 +43,7 @@ dys eco,libgdiplus em etl +ets2 fctr fof gmod,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-21.10.csv b/lgsm/data/ubuntu-21.10.csv index 45ce1f640..8860a2a4d 100644 --- a/lgsm/data/ubuntu-21.10.csv +++ b/lgsm/data/ubuntu-21.10.csv @@ -6,6 +6,7 @@ ahl2 ark arma3 armar,libcurl4 +ats av bb bb2,libcurl4-gnutls-dev:i386 @@ -40,6 +41,7 @@ dys eco,libgdiplus em etl +ets2 fctr fof gmod,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index 8b9f02234..8492e08c4 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -6,6 +6,7 @@ ahl2 ark arma3 armar,libcurl4 +ats av bb bb2,libcurl4-gnutls-dev:i386 @@ -40,6 +41,7 @@ dys eco,libgdiplus em etl +ets2 fctr fof gmod,libtinfo5:i386 diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index 66b9be5db..80d02dd4d 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -1242,6 +1242,30 @@ fn_info_game_pvr() { queryport=${port:-"0"} } +fn_info_game_prism3d() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + maxplayers="${unavailable}" + port="${zero}" + queryport="${zero}" + servername="${unavailable}" + serverpassword="${unavailable}" + else + maxplayers=$(sed -nr 's/^\s*max_players\s*:\s*([0-9]+)/\1/p' "${servercfgfullpath}") + port=$(sed -nr 's/^\s*connection_dedicated_port\s*:\s*([0-9]+)/\1/p' "${servercfgfullpath}") + queryport=$(sed -nr 's/^\s*query_dedicated_port\s*:\s*([0-9]+)/\1/p' "${servercfgfullpath}") + servername=$(sed -nr 's/^\s*lobby_name\s*:\s*"?([^"\r\n]+)"?/\1/p' "${servercfgfullpath}") + serverpassword=$(sed -nr 's/^\s*password\s*:\s*"(.*)"/\1/p' "${servercfgfullpath}") + + # Not set + maxplayers=${maxplayers:-"0"} + port=${port:-"27015"} + queryport=${queryport:-"27016"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + fi +} + fn_info_game_pz() { # Config if [ ! -f "${servercfgfullpath}" ]; then @@ -2515,6 +2539,8 @@ elif [ "${shortname}" == "wmc" ]; then fn_info_game_wmc elif [ "${shortname}" == "wurm" ]; then fn_info_game_wurm +elif [ "${engine}" == "prism3d" ]; then + fn_info_game_prism3d elif [ "${engine}" == "source" ] || [ "${engine}" == "goldsrc" ]; then fn_info_game_source elif [ "${engine}" == "unreal2" ]; then diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index f4f67b120..a78a2f2c2 100755 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -658,7 +658,7 @@ fn_info_message_ports_edit() { startparameterslocation="${red}UNKNOWN${default}" # engines/games that require editing in the config file. - local ports_edit_array=("ac" "arma3" "armar" "bo" "bt" "cd" "dst" "eco" "idtech2" "idtech3" "idtech3_ql" "jc2" "jc3" "lwjgl2" "mcb" "mumble" "nec" "pc" "pc2" "pz" "qw" "refractor" "renderware" "rw" "sb" "sdtd" "st" "stn" "ts3" "tw" "terraria" "unreal" "unreal2" "unreal3" "vints" "wurm") + local ports_edit_array=("ac" "arma3" "armar" "bo" "bt" "cd" "dst" "eco" "idtech2" "idtech3" "idtech3_ql" "jc2" "jc3" "lwjgl2" "mcb" "mumble" "nec" "pc" "pc2" "prism3d" "pz" "qw" "refractor" "renderware" "rw" "sb" "sdtd" "st" "stn" "ts3" "tw" "terraria" "unreal" "unreal2" "unreal3" "vints" "wurm") for port_edit in "${ports_edit_array[@]}"; do if [ "${shortname}" == "ut3" ]; then startparameterslocation="${servercfgdir}/UTWeb.ini" @@ -1403,6 +1403,15 @@ fn_info_message_sol() { fn_port "Files" filesport tcp } | column -s $'\t' -t } + +fn_info_message_prism3d() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + fn_info_message_source() { { fn_port "header" @@ -1824,6 +1833,8 @@ fn_info_message_select_engine() { fn_info_message_wurm elif [ "${engine}" == "goldsrc" ]; then fn_info_message_goldsrc + elif [ "${engine}" == "prism3d" ]; then + fn_info_message_prism3d elif [ "${engine}" == "source" ]; then fn_info_message_source elif [ "${engine}" == "spark" ]; then diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index d5525c266..b92eb919b 100755 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -210,6 +210,14 @@ elif [ "${shortname}" == "armar" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations +elif [ "${shortname}" == "ats" ]; then + gamedirname="AmericanTruckSimulator" + fn_check_cfgdir + array_configs+=(server_config.sii) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "bo" ]; then gamedirname="BallisticOverkill" array_configs+=(config.txt) @@ -444,6 +452,14 @@ elif [ "${shortname}" == "etl" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations +elif [ "${shortname}" == "ets2" ]; then + gamedirname="EuroTruckSimulator2" + fn_check_cfgdir + array_configs+=(server_config.sii) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "fctr" ]; then gamedirname="Factorio" array_configs+=(server-settings.json) From 928bfdc6efeee628ea12ecf9780166f257ef4361 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 17 Feb 2023 23:11:38 +0000 Subject: [PATCH 085/374] fix(nec): add missing vars --- lgsm/config-default/config-lgsm/necserver/_default.cfg | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lgsm/config-default/config-lgsm/necserver/_default.cfg b/lgsm/config-default/config-lgsm/necserver/_default.cfg index 65b7a7f1d..af49cb3e2 100644 --- a/lgsm/config-default/config-lgsm/necserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/necserver/_default.cfg @@ -149,6 +149,8 @@ consoleinteract="no" ## Game Server Details # Do not edit gamename="Necesse" +engine="null" +glibc="2.9" #### Directories #### # Edit with care From 146b29972d91ebf6ecfa01fb7b9ff5a9c7da9e85 Mon Sep 17 00:00:00 2001 From: Christian Date: Sat, 18 Feb 2023 00:56:47 +0100 Subject: [PATCH 086/374] feat(newserver): Core Keeper (#3884) Co-authored-by: Daniel Gibbs --- .../config-lgsm/ckserver/_default.cfg | 186 ++++++++++++++++++ lgsm/data/almalinux-8.csv | 1 + lgsm/data/almalinux-9.csv | 1 + lgsm/data/centos-7.csv | 1 + lgsm/data/centos-8.csv | 1 + lgsm/data/centos-9.csv | 1 + lgsm/data/debian-10.csv | 1 + lgsm/data/debian-11.csv | 1 + lgsm/data/debian-9.csv | 1 + lgsm/data/rhel-7.csv | 1 + lgsm/data/rhel-8.csv | 1 + lgsm/data/rhel-9.csv | 1 + lgsm/data/rocky-8.csv | 1 + lgsm/data/rocky-9.csv | 1 + lgsm/data/serverlist.csv | 2 + lgsm/data/ubuntu-16.04.csv | 1 + lgsm/data/ubuntu-18.04.csv | 1 + lgsm/data/ubuntu-20.04.csv | 1 + lgsm/data/ubuntu-21.04.csv | 1 + lgsm/data/ubuntu-21.10.csv | 1 + lgsm/data/ubuntu-22.04.csv | 1 + lgsm/functions/info_game.sh | 15 +- lgsm/functions/info_messages.sh | 12 +- lgsm/functions/install_config.sh | 7 + 24 files changed, 239 insertions(+), 2 deletions(-) create mode 100644 lgsm/config-default/config-lgsm/ckserver/_default.cfg diff --git a/lgsm/config-default/config-lgsm/ckserver/_default.cfg b/lgsm/config-default/config-lgsm/ckserver/_default.cfg new file mode 100644 index 000000000..ef1c0618c --- /dev/null +++ b/lgsm/config-default/config-lgsm/ckserver/_default.cfg @@ -0,0 +1,186 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! +# Copy settings from here and use them in either: +# common.cfg - applies settings to every instance. +# [instance].cfg - applies settings to a specific instance. + +#### Game Server Settings #### + +ip="0.0.0.0" +port="1234" + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="-batchmode -ip ${ip} -port ${port} -datapath ${servercfgdir} -logfile ${gamelog}" + +#### LinuxGSM Settings #### + +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + +## Notification Alerts +# (on|off) + +# Display IP | https://docs.linuxgsm.com/alerts#display-ip +displayip="" + +# More info | https://docs.linuxgsm.com/alerts#more-info +postalert="off" + +# Discord Alerts | https://docs.linuxgsm.com/alerts/discord +discordalert="off" +discordwebhook="webhook" + +# Email Alerts | https://docs.linuxgsm.com/alerts/email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + +# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun +mailgunalert="off" +mailgunapiregion="us" +mailguntoken="accesstoken" +mailgundomain="example.com" +mailgunemailfrom="alert@example.com" +mailgunemail="email@myemail.com" + +# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover +pushoveralert="off" +pushovertoken="accesstoken" +pushoveruserkey="userkey" + +# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat +rocketchatalert="off" +rocketchatwebhook="webhook" +rocketchattoken="" + +# Slack Alerts | https://docs.linuxgsm.com/alerts/slack +slackalert="off" +slackwebhook="webhook" + +# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram +# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +telegramapi="api.telegram.org" +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +curlcustomstring="" + +## Updating | https://docs.linuxgsm.com/commands/update +updateonstart="off" + +## Backup | https://docs.linuxgsm.com/commands/backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://docs.linuxgsm.com/features/logging +consolelogging="on" +logdays="7" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="1" + +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors +ansi="on" + +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time +sleeptime="0.5" + +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd +# Server appid +appid="1963720" +steamcmdforcewindows="no" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +betapassword="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="true" + +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode +# 1: tmux kill +# 2: CTRL+c +# 3: quit +# 4: quit 120s +# 5: stop +# 6: q +# 7: exit +# 8: 7 Days to Die +# 9: GoldSrc +# 10: Avorion +# 11: end +stopmode="2" + +## Query mode +# 1: session only +# 2: gamedig (gsquery fallback) +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Console type +consoleverbose="no" +consoleinteract="no" + +## Game Server Details +# Do not edit +gamename="Core Keeper" +engine="unity3d" +glibc="2.15" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}" +executabledir="${serverfiles}" +preexecutable="xvfb-run" +executable="./CoreKeeperServer" +servercfgdir="${systemdir}/gamedata/${selfname}" +servercfg="ServerConfig.json" +servercfgdefault="ServerConfig.json" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${serverfiles}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +gamelog="${gamelogdir}/${selfname}-game.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" + +## Logs Naming +gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" +lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index d14f52f44..13a558282 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -20,6 +20,7 @@ bt,libicu,dos2unix bt1944 cc cd +ck,xorg-x11-server-Xvfb cmw cod,compat-libstdc++-33.i686 cod2,compat-libstdc++-33.i686 diff --git a/lgsm/data/almalinux-9.csv b/lgsm/data/almalinux-9.csv index d14f52f44..13a558282 100644 --- a/lgsm/data/almalinux-9.csv +++ b/lgsm/data/almalinux-9.csv @@ -20,6 +20,7 @@ bt,libicu,dos2unix bt1944 cc cd +ck,xorg-x11-server-Xvfb cmw cod,compat-libstdc++-33.i686 cod2,compat-libstdc++-33.i686 diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index c5d633929..847877d88 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -20,6 +20,7 @@ bt,libicu,dos2unix bt1944 cc cd +ck,xorg-x11-server-Xvfb cmw cod,compat-libstdc++-33.i686 cod2,compat-libstdc++-33.i686 diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index f60a925ce..d9e13a271 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -20,6 +20,7 @@ bt,libicu,dos2unix bt1944 cc cd +ck,xorg-x11-server-Xvfb cmw cod,compat-libstdc++-33.i686 cod2,compat-libstdc++-33.i686 diff --git a/lgsm/data/centos-9.csv b/lgsm/data/centos-9.csv index f60a925ce..d9e13a271 100644 --- a/lgsm/data/centos-9.csv +++ b/lgsm/data/centos-9.csv @@ -20,6 +20,7 @@ bt,libicu,dos2unix bt1944 cc cd +ck,xorg-x11-server-Xvfb cmw cod,compat-libstdc++-33.i686 cod2,compat-libstdc++-33.i686 diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index 1196db200..499846c75 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -20,6 +20,7 @@ bt,libicu-dev,dos2unix bt1944 cc cd +ck,xvfb cmw cod,libstdc++5:i386 cod2,libstdc++5:i386 diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index 28b7bd853..1e488fc15 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -20,6 +20,7 @@ bt,libicu-dev,dos2unix bt1944 cc cd +ck,xvfb cmw cod,libstdc++5:i386 cod2,libstdc++5:i386 diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index 1cfbe6ef8..e71e99c96 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -20,6 +20,7 @@ bt,libicu-dev,dos2unix bt1944 cc cd +ck,xvfb cmw cod,libstdc++5:i386 cod2,libstdc++5:i386 diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index c33ec945f..c9a885f2b 100644 --- a/lgsm/data/rhel-7.csv +++ b/lgsm/data/rhel-7.csv @@ -20,6 +20,7 @@ bt,libicu bt1944 cc cd +ck,xorg-x11-server-Xvfb cmw cod,compat-libstdc++-33.i686 cod2,compat-libstdc++-33.i686 diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index f074b5863..8280391e1 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -20,6 +20,7 @@ bt,libicu bt1944 cc cd +ck,xorg-x11-server-Xvfb cmw cod,compat-libstdc++-33.i686 cod2,compat-libstdc++-33.i686 diff --git a/lgsm/data/rhel-9.csv b/lgsm/data/rhel-9.csv index f074b5863..8280391e1 100644 --- a/lgsm/data/rhel-9.csv +++ b/lgsm/data/rhel-9.csv @@ -20,6 +20,7 @@ bt,libicu bt1944 cc cd +ck,xorg-x11-server-Xvfb cmw cod,compat-libstdc++-33.i686 cod2,compat-libstdc++-33.i686 diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index d14f52f44..13a558282 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -20,6 +20,7 @@ bt,libicu,dos2unix bt1944 cc cd +ck,xorg-x11-server-Xvfb cmw cod,compat-libstdc++-33.i686 cod2,compat-libstdc++-33.i686 diff --git a/lgsm/data/rocky-9.csv b/lgsm/data/rocky-9.csv index d14f52f44..13a558282 100644 --- a/lgsm/data/rocky-9.csv +++ b/lgsm/data/rocky-9.csv @@ -20,6 +20,7 @@ bt,libicu,dos2unix bt1944 cc cd +ck,xorg-x11-server-Xvfb cmw cod,compat-libstdc++-33.i686 cod2,compat-libstdc++-33.i686 diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 3c416fa1d..5c9a6d97a 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -18,6 +18,7 @@ bt,btserver,Barotrauma,ubuntu-22.04 bt1944,bt1944server,Battalion 1944,ubuntu-22.04 cc,ccserver,Codename CURE,ubuntu-22.04 cd,cdserver,Crafting Dead,ubuntu-22.04 +ck,ckserver,Core Keeper,ubuntu-22.04 cmw,cmwserver,Chivalry: Medieval Warfare,ubuntu-22.04 cod,codserver,Call of Duty,ubuntu-22.04 cod2,cod2server,Call of Duty 2,ubuntu-22.04 @@ -128,3 +129,4 @@ wmc,wmcserver,WaterfallMC,ubuntu-22.04 wurm,wurmserver,Wurm Unlimited,ubuntu-22.04 zmr,zmrserver,Zombie Master: Reborn,ubuntu-22.04 zps,zpsserver,Zombie Panic! Source,ubuntu-22.04 + diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index 6b6fcd834..a571f8aac 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -19,6 +19,7 @@ bt,libicu-dev,dos2unix bt1944 cc cd +ck,xvfb cmw cod,libstdc++5:i386 cod2,libstdc++5:i386 diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index 1196db200..499846c75 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -20,6 +20,7 @@ bt,libicu-dev,dos2unix bt1944 cc cd +ck,xvfb cmw cod,libstdc++5:i386 cod2,libstdc++5:i386 diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index 240bb6c1e..6ff12422a 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -20,6 +20,7 @@ bt,libicu-dev,dos2unix bt1944 cc cd +ck,xvfb cmw cod,libstdc++5:i386 cod2,libstdc++5:i386 diff --git a/lgsm/data/ubuntu-21.04.csv b/lgsm/data/ubuntu-21.04.csv index 28b7bd853..1e488fc15 100644 --- a/lgsm/data/ubuntu-21.04.csv +++ b/lgsm/data/ubuntu-21.04.csv @@ -20,6 +20,7 @@ bt,libicu-dev,dos2unix bt1944 cc cd +ck,xvfb cmw cod,libstdc++5:i386 cod2,libstdc++5:i386 diff --git a/lgsm/data/ubuntu-21.10.csv b/lgsm/data/ubuntu-21.10.csv index 8860a2a4d..4760fd5f2 100644 --- a/lgsm/data/ubuntu-21.10.csv +++ b/lgsm/data/ubuntu-21.10.csv @@ -19,6 +19,7 @@ bs bt,libicu-dev bt1944 cc +ck,xvfb cmw cod,libstdc++5:i386 cod2,libstdc++5:i386 diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index 8492e08c4..7a64eb422 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -19,6 +19,7 @@ bs bt,libicu-dev,dos2unix bt1944 cc +ck,xvfb cmw cod,libstdc++5:i386 cod2,libstdc++5:i386 diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index 80d02dd4d..e4872a8f8 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -307,7 +307,18 @@ fn_info_game_cd() { fi } -fn_info_game_cmw() { +fn_info_game_ck(){ + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + maxplayers="${zero}" + else + servername=$(jq -r '.worldName' "${servercfgfullpath}") + maxplayers=$(jq -r '.maxNumberPlayers' "${servercfgfullpath}") + fi + queryport=$((port + 1)) +} + +fn_info_game_cmw(){ # Config if [ ! -f "${servercfgfullpath}" ]; then adminpassword="${unavailable}" @@ -2395,6 +2406,8 @@ elif [ "${shortname}" == "bt1944" ]; then fn_info_game_bt1944 elif [ "${shortname}" == "cd" ]; then fn_info_game_cd +elif [ "${shortname}" == "ck" ]; then + fn_info_game_ck elif [ "${shortname}" == "cmw" ]; then fn_info_game_cmw elif [ "${shortname}" == "cod" ]; then diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index a78a2f2c2..533dee675 100755 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -669,7 +669,7 @@ fn_info_message_ports_edit() { fi done # engines/games that require editing the start parameters. - local ports_edit_array=("av" "col" "fctr" "goldsrc" "hw" "iw3.0" "ioquake3" "qfusion" "rust" "scpsl" "scpslsm" "sol" "spark" "source" "unreal4" "arma3" "dayz" "unt" "vh") + local ports_edit_array=("av" "ck" "col" "fctr" "goldsrc" "hw" "iw3.0" "ioquake3" "qfusion" "rust" "scpsl" "scpslsm" "sol" "spark" "source" "unreal4" "arma3" "dayz" "unt" "vh") for port_edit in "${ports_edit_array[@]}"; do if [ "${engine}" == "${port_edit}" ] || [ "${gamename}" == "${port_edit}" ] || [ "${shortname}" == "${port_edit}" ]; then startparameterslocation="${configdirserver}" @@ -879,6 +879,14 @@ fn_info_messages_cd() { } | column -s $'\t' -t } +fn_info_messages_ck() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + fn_info_message_cmw() { fn_info_message_password_strip { @@ -1689,6 +1697,8 @@ fn_info_message_select_engine() { fn_info_message_bt1944 elif [ "${shortname}" == "cd" ]; then fn_info_messages_cd + elif [ "${shortname}" == "ck" ]; then + fn_info_messages_ck elif [ "${shortname}" == "csgo" ]; then fn_info_message_csgo elif [ "${shortname}" == "cmw" ]; then diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index b92eb919b..c04db364c 100755 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -297,6 +297,13 @@ elif [ "${shortname}" == "cd" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations +elif [ "${shortname}" == "ck" ]; then + gamedirname="CoreKeeper" + array_configs+=( ServerConfig.json ) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "cod" ]; then gamedirname="CallOfDuty" array_configs+=(server.cfg) From e4e73d25f123f67246e3135780869320808cdc26 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 18 Feb 2023 00:09:46 +0000 Subject: [PATCH 087/374] fix: tidy up dependency csv files --- lgsm/data/almalinux-8.csv | 2 +- lgsm/data/almalinux-9.csv | 2 +- lgsm/data/centos-7.csv | 3 ++- lgsm/data/centos-8.csv | 1 + lgsm/data/centos-9.csv | 1 + lgsm/data/debian-9.csv | 1 + lgsm/data/rhel-7.csv | 6 +++--- lgsm/data/rhel-8.csv | 6 +++--- lgsm/data/rhel-9.csv | 6 +++--- lgsm/data/rocky-8.csv | 2 +- lgsm/data/rocky-9.csv | 2 +- lgsm/data/ubuntu-16.04.csv | 2 ++ lgsm/data/ubuntu-22.04.csv | 4 +++- 13 files changed, 23 insertions(+), 15 deletions(-) diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index 13a558282..c7bba1d9c 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz +all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz steamcmd,glibc.i686,libstdc++.i686 ac ahl diff --git a/lgsm/data/almalinux-9.csv b/lgsm/data/almalinux-9.csv index 13a558282..c7bba1d9c 100644 --- a/lgsm/data/almalinux-9.csv +++ b/lgsm/data/almalinux-9.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz +all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz steamcmd,glibc.i686,libstdc++.i686 ac ahl diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index 847877d88..e997a2e5e 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++.i686,nmap-ncat,python3,tar,tmux,unzip,util-linux,wget,xz +all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python3,tar,tmux,unzip,util-linux,wget,xz steamcmd,glibc.i686,libstdc++.i686 ac ahl @@ -122,6 +122,7 @@ ut3 ut99 vh,glibc-devel vints,mono-complete +vpmc,java-11-openjdk vs wet wf diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index d9e13a271..c7bba1d9c 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -105,6 +105,7 @@ sof2 sol squad st +stn sven terraria tf2,libcurl.i686 diff --git a/lgsm/data/centos-9.csv b/lgsm/data/centos-9.csv index d9e13a271..c7bba1d9c 100644 --- a/lgsm/data/centos-9.csv +++ b/lgsm/data/centos-9.csv @@ -105,6 +105,7 @@ sof2 sol squad st +stn sven terraria tf2,libcurl.i686 diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index e71e99c96..5fe112702 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -122,6 +122,7 @@ ut3 ut99 vh,libc6-dev vints,mono-complete +vpmc,openjdk-8-jre vs wet wf diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index c9a885f2b..0016a5665 100644 --- a/lgsm/data/rhel-7.csv +++ b/lgsm/data/rhel-7.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz +all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz steamcmd,glibc.i686,libstdc++.i686 ac ahl @@ -16,7 +16,7 @@ bfv,compat-libstdc++-33.i686,glibc.i686 bmdm,ncurses-libs.i686 bo bs -bt,libicu +bt,libicu,dos2unix bt1944 cc cd @@ -68,7 +68,7 @@ mcb,libnsl mh mohaa,compat-libstdc++-33.i686 mom -mta +mta,ncurses-libs mumble nd nec diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index 8280391e1..c7bba1d9c 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz +all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz steamcmd,glibc.i686,libstdc++.i686 ac ahl @@ -16,7 +16,7 @@ bfv,compat-libstdc++-33.i686,glibc.i686 bmdm,ncurses-libs.i686 bo bs -bt,libicu +bt,libicu,dos2unix bt1944 cc cd @@ -68,7 +68,7 @@ mcb,libnsl mh mohaa,compat-libstdc++-33.i686 mom -mta +mta,ncurses-compat-libs mumble nd nec diff --git a/lgsm/data/rhel-9.csv b/lgsm/data/rhel-9.csv index 8280391e1..c7bba1d9c 100644 --- a/lgsm/data/rhel-9.csv +++ b/lgsm/data/rhel-9.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz +all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz steamcmd,glibc.i686,libstdc++.i686 ac ahl @@ -16,7 +16,7 @@ bfv,compat-libstdc++-33.i686,glibc.i686 bmdm,ncurses-libs.i686 bo bs -bt,libicu +bt,libicu,dos2unix bt1944 cc cd @@ -68,7 +68,7 @@ mcb,libnsl mh mohaa,compat-libstdc++-33.i686 mom -mta +mta,ncurses-compat-libs mumble nd nec diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index 13a558282..c7bba1d9c 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz +all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz steamcmd,glibc.i686,libstdc++.i686 ac ahl diff --git a/lgsm/data/rocky-9.csv b/lgsm/data/rocky-9.csv index 13a558282..c7bba1d9c 100644 --- a/lgsm/data/rocky-9.csv +++ b/lgsm/data/rocky-9.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz +all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz steamcmd,glibc.i686,libstdc++.i686 ac ahl diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index a571f8aac..e1cfa166b 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -5,6 +5,7 @@ ahl ahl2 ark arma3 +armar,libcurl4 ats av bb @@ -121,6 +122,7 @@ ut3 ut99 vh,libc6-dev vints,mono-complete +vpmc,openjdk-8-jre vs wet wf diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index 7a64eb422..123529324 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -20,6 +20,7 @@ bt,libicu-dev,dos2unix bt1944 cc ck,xvfb +cd cmw cod,libstdc++5:i386 cod2,libstdc++5:i386 @@ -32,6 +33,7 @@ cscz csgo css,libtinfo5:i386 dab +dayz dmc dod dodr @@ -120,7 +122,7 @@ ut3 ut99 vh,libc6-dev vints,mono-complete -vpmc,openjdk-11-jre +vpmc,openjdk-17-jre vs wet wf From 508737007423827da120c36d7759272e21ba1507 Mon Sep 17 00:00:00 2001 From: Christian Date: Sun, 19 Feb 2023 22:46:17 +0100 Subject: [PATCH 088/374] fix(mc): dependencies bump java version to 17 for rhel 8+ (#4118) --- lgsm/data/almalinux-8.csv | 8 ++++---- lgsm/data/almalinux-9.csv | 8 ++++---- lgsm/data/centos-8.csv | 8 ++++---- lgsm/data/centos-9.csv | 8 ++++---- lgsm/data/rhel-8.csv | 8 ++++---- lgsm/data/rhel-9.csv | 8 ++++---- lgsm/data/rocky-8.csv | 8 ++++---- lgsm/data/rocky-9.csv | 8 ++++---- 8 files changed, 32 insertions(+), 32 deletions(-) diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index c7bba1d9c..9f341fb99 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -63,7 +63,7 @@ kf2 l4d l4d2 lo -mc,java-11-openjdk +mc,java-17-openjdk mcb,libnsl mh mohaa,compat-libstdc++-33.i686 @@ -79,7 +79,7 @@ ns2c,speex.i686,tbb.i686 onset,mariadb-connector-c opfor pc -pmc,java-11-openjdk +pmc,java-17-openjdk pstbs,GConf2 pvkii pvr,libcxx @@ -122,11 +122,11 @@ ut3 ut99 vh,glibc-devel vints,mono-complete -vpmc,java-11-openjdk +vpmc,java-17-openjdk vs wet wf -wmc,java-11-openjdk +wmc,java-17-openjdk wurm,xorg-x11-server-Xvfb zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/almalinux-9.csv b/lgsm/data/almalinux-9.csv index c7bba1d9c..9f341fb99 100644 --- a/lgsm/data/almalinux-9.csv +++ b/lgsm/data/almalinux-9.csv @@ -63,7 +63,7 @@ kf2 l4d l4d2 lo -mc,java-11-openjdk +mc,java-17-openjdk mcb,libnsl mh mohaa,compat-libstdc++-33.i686 @@ -79,7 +79,7 @@ ns2c,speex.i686,tbb.i686 onset,mariadb-connector-c opfor pc -pmc,java-11-openjdk +pmc,java-17-openjdk pstbs,GConf2 pvkii pvr,libcxx @@ -122,11 +122,11 @@ ut3 ut99 vh,glibc-devel vints,mono-complete -vpmc,java-11-openjdk +vpmc,java-17-openjdk vs wet wf -wmc,java-11-openjdk +wmc,java-17-openjdk wurm,xorg-x11-server-Xvfb zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index c7bba1d9c..9f341fb99 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -63,7 +63,7 @@ kf2 l4d l4d2 lo -mc,java-11-openjdk +mc,java-17-openjdk mcb,libnsl mh mohaa,compat-libstdc++-33.i686 @@ -79,7 +79,7 @@ ns2c,speex.i686,tbb.i686 onset,mariadb-connector-c opfor pc -pmc,java-11-openjdk +pmc,java-17-openjdk pstbs,GConf2 pvkii pvr,libcxx @@ -122,11 +122,11 @@ ut3 ut99 vh,glibc-devel vints,mono-complete -vpmc,java-11-openjdk +vpmc,java-17-openjdk vs wet wf -wmc,java-11-openjdk +wmc,java-17-openjdk wurm,xorg-x11-server-Xvfb zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/centos-9.csv b/lgsm/data/centos-9.csv index c7bba1d9c..9f341fb99 100644 --- a/lgsm/data/centos-9.csv +++ b/lgsm/data/centos-9.csv @@ -63,7 +63,7 @@ kf2 l4d l4d2 lo -mc,java-11-openjdk +mc,java-17-openjdk mcb,libnsl mh mohaa,compat-libstdc++-33.i686 @@ -79,7 +79,7 @@ ns2c,speex.i686,tbb.i686 onset,mariadb-connector-c opfor pc -pmc,java-11-openjdk +pmc,java-17-openjdk pstbs,GConf2 pvkii pvr,libcxx @@ -122,11 +122,11 @@ ut3 ut99 vh,glibc-devel vints,mono-complete -vpmc,java-11-openjdk +vpmc,java-17-openjdk vs wet wf -wmc,java-11-openjdk +wmc,java-17-openjdk wurm,xorg-x11-server-Xvfb zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index c7bba1d9c..9f341fb99 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -63,7 +63,7 @@ kf2 l4d l4d2 lo -mc,java-11-openjdk +mc,java-17-openjdk mcb,libnsl mh mohaa,compat-libstdc++-33.i686 @@ -79,7 +79,7 @@ ns2c,speex.i686,tbb.i686 onset,mariadb-connector-c opfor pc -pmc,java-11-openjdk +pmc,java-17-openjdk pstbs,GConf2 pvkii pvr,libcxx @@ -122,11 +122,11 @@ ut3 ut99 vh,glibc-devel vints,mono-complete -vpmc,java-11-openjdk +vpmc,java-17-openjdk vs wet wf -wmc,java-11-openjdk +wmc,java-17-openjdk wurm,xorg-x11-server-Xvfb zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/rhel-9.csv b/lgsm/data/rhel-9.csv index c7bba1d9c..9f341fb99 100644 --- a/lgsm/data/rhel-9.csv +++ b/lgsm/data/rhel-9.csv @@ -63,7 +63,7 @@ kf2 l4d l4d2 lo -mc,java-11-openjdk +mc,java-17-openjdk mcb,libnsl mh mohaa,compat-libstdc++-33.i686 @@ -79,7 +79,7 @@ ns2c,speex.i686,tbb.i686 onset,mariadb-connector-c opfor pc -pmc,java-11-openjdk +pmc,java-17-openjdk pstbs,GConf2 pvkii pvr,libcxx @@ -122,11 +122,11 @@ ut3 ut99 vh,glibc-devel vints,mono-complete -vpmc,java-11-openjdk +vpmc,java-17-openjdk vs wet wf -wmc,java-11-openjdk +wmc,java-17-openjdk wurm,xorg-x11-server-Xvfb zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index c7bba1d9c..9f341fb99 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -63,7 +63,7 @@ kf2 l4d l4d2 lo -mc,java-11-openjdk +mc,java-17-openjdk mcb,libnsl mh mohaa,compat-libstdc++-33.i686 @@ -79,7 +79,7 @@ ns2c,speex.i686,tbb.i686 onset,mariadb-connector-c opfor pc -pmc,java-11-openjdk +pmc,java-17-openjdk pstbs,GConf2 pvkii pvr,libcxx @@ -122,11 +122,11 @@ ut3 ut99 vh,glibc-devel vints,mono-complete -vpmc,java-11-openjdk +vpmc,java-17-openjdk vs wet wf -wmc,java-11-openjdk +wmc,java-17-openjdk wurm,xorg-x11-server-Xvfb zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/rocky-9.csv b/lgsm/data/rocky-9.csv index c7bba1d9c..9f341fb99 100644 --- a/lgsm/data/rocky-9.csv +++ b/lgsm/data/rocky-9.csv @@ -63,7 +63,7 @@ kf2 l4d l4d2 lo -mc,java-11-openjdk +mc,java-17-openjdk mcb,libnsl mh mohaa,compat-libstdc++-33.i686 @@ -79,7 +79,7 @@ ns2c,speex.i686,tbb.i686 onset,mariadb-connector-c opfor pc -pmc,java-11-openjdk +pmc,java-17-openjdk pstbs,GConf2 pvkii pvr,libcxx @@ -122,11 +122,11 @@ ut3 ut99 vh,glibc-devel vints,mono-complete -vpmc,java-11-openjdk +vpmc,java-17-openjdk vs wet wf -wmc,java-11-openjdk +wmc,java-17-openjdk wurm,xorg-x11-server-Xvfb zmr,ncurses-libs.i686 zps,ncurses-libs.i686 From 9a026ecdd4dd6916207930aef036bd66d7c16ce8 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 20 Feb 2023 00:27:18 +0000 Subject: [PATCH 089/374] fix: re-add core_getop.sh --- linuxgsm.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linuxgsm.sh b/linuxgsm.sh index a0eb306f6..0f36ebcaa 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -512,4 +512,7 @@ else # Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off. fn_ansi_loader + + getopt=$1 + core_getopt.sh fi From ba339d9d3b07a6a1f54fe47a546fe74bfae07dfe Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 24 Feb 2023 00:37:31 +0000 Subject: [PATCH 090/374] fix: remove unnecessary sleep --- lgsm/functions/core_dl.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index cc5af1809..c4faa6517 100755 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -301,7 +301,6 @@ fn_check_file() { fi else fn_print_ok_eol - sleep 0.3 echo -en "\033[2K\\r" if [ -f "${lgsmlog}" ]; then fn_script_log_pass "Checking ${remote_filename}" @@ -398,7 +397,6 @@ fn_fetch_file() { fi else fn_print_ok_eol - sleep 0.3 echo -en "\033[2K\\r" if [ -f "${lgsmlog}" ]; then fn_script_log_pass "Downloading ${local_filename}" From 4898caa345d429144713754459d896805e6082b3 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 24 Feb 2023 00:59:37 +0000 Subject: [PATCH 091/374] feat: add 24h caching to external ip gathering this will prevent querying of external ip tool repeatedly Also tidied up a few rm commands --- lgsm/functions/command_dev_debug.sh | 2 +- lgsm/functions/command_fastdl.sh | 4 ++-- lgsm/functions/command_start.sh | 2 +- lgsm/functions/core_dl.sh | 2 +- lgsm/functions/core_steamcmd.sh | 2 +- lgsm/functions/info_game.sh | 31 +++++++++++++---------------- lgsm/functions/info_stats.sh | 2 +- lgsm/functions/mods_core.sh | 4 ++-- linuxgsm.sh | 2 +- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 13 files changed, 28 insertions(+), 31 deletions(-) diff --git a/lgsm/functions/command_dev_debug.sh b/lgsm/functions/command_dev_debug.sh index 957709898..19f16d58e 100755 --- a/lgsm/functions/command_dev_debug.sh +++ b/lgsm/functions/command_dev_debug.sh @@ -11,7 +11,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_reset if [ -f "${rootdir}/.dev-debug" ]; then - rm "${rootdir:?}/.dev-debug" + rm -f "${rootdir:?}/.dev-debug" fn_print_ok_nl "Disabled dev-debug" fn_script_log_info "Disabled dev-debug" else diff --git a/lgsm/functions/command_fastdl.sh b/lgsm/functions/command_fastdl.sh index e90ccc5e0..78abd650a 100755 --- a/lgsm/functions/command_fastdl.sh +++ b/lgsm/functions/command_fastdl.sh @@ -68,7 +68,7 @@ fn_clear_old_fastdl() { # Clearing old FastDL. if [ -d "${fastdldir}" ]; then echo -en "clearing existing FastDL directory ${fastdldir}..." - rm -fR "${fastdldir:?}" + rm -rf "${fastdldir:?}" exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl @@ -277,7 +277,7 @@ fn_fastdl_gmod() { # Clear addons directory in fastdl. echo -en "clearing addons dir from fastdl dir..." fn_sleep_time - rm -fR "${fastdldir:?}/addons" + rm -rf "${fastdldir:?}/addons" exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl diff --git a/lgsm/functions/command_start.sh b/lgsm/functions/command_start.sh index d10240fa7..4b01984f4 100755 --- a/lgsm/functions/command_start.sh +++ b/lgsm/functions/command_start.sh @@ -171,7 +171,7 @@ fn_start_tmux() { fn_print_ok "${servername}" fn_script_log_pass "Started ${servername}" fi - rm "${lgsmlogdir:?}/.${selfname}-tmux-error.tmp" 2> /dev/null + rm -f "${lgsmlogdir:?}/.${selfname}-tmux-error.tmp" 2> /dev/null echo -en "\n" } diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index c4faa6517..2e6db690e 100755 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -374,7 +374,7 @@ fn_fetch_file() { # Download will fail if downloads a html file. if [ -f "${local_filedir}/${local_filename}" ]; then if [ -n "$(head "${local_filedir}/${local_filename}" | grep "DOCTYPE")" ]; then - rm "${local_filedir:?}/${local_filename:?}" + rm -f "${local_filedir:?}/${local_filename:?}" local exitcode=2 fi fi diff --git a/lgsm/functions/core_steamcmd.sh b/lgsm/functions/core_steamcmd.sh index 5b95adc81..9d54cfde1 100755 --- a/lgsm/functions/core_steamcmd.sh +++ b/lgsm/functions/core_steamcmd.sh @@ -73,7 +73,7 @@ fn_check_steamcmd_dir() { # Symbolic links to Steam installation directory. if [ ! -L "${HOME}/.steam/root" ]; then if [ -d "${HOME}/.steam/root" ]; then - rm "${HOME}/.steam/root" + rm -f "${HOME:?}/.steam/root" fi ln -s "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" "${HOME}/.steam/root" fi diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index e4872a8f8..5814cd832 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -2561,27 +2561,24 @@ elif [ "${engine}" == "unreal2" ]; then fi # External IP address -if [ -z "${extip}" ]; then +# Cache external IP address for 24 hours +if [ -f "${tmpdir}/extip.txt" ]; then + if [ "$(find "${tmpdir}/extip.txt" -mmin +1440)" ]; then + rm -f "${tmpdir:?}/extip.txt" + fi +fi + +if [ ! -f "${tmpdir}/extip.txt" ]; then extip="$(curl --connect-timeout 10 -s https://api.ipify.org 2> /dev/null)" exitcode=$? - # Should ifconfig.co return an error will use last known IP. - if [ ${exitcode} -eq 0 ]; then - if [[ "${extip}" != *"DOCTYPE"* ]]; then - echo -e "${extip}" > "${tmpdir}/extip.txt" - else - if [ -f "${tmpdir}/extip.txt" ]; then - extip="$(cat "${tmpdir}/extip.txt")" - else - fn_print_error_nl "Unable to get external IP" - fi - fi + # if curl passes add extip to externalip.txt + if [ "${exitcode}" == "0" ]; then + echo "${extip}" > "${tmpdir}/extip.txt" else - if [ -f "${tmpdir}/extip.txt" ]; then - extip="$(cat "${tmpdir}/extip.txt")" - else - fn_print_error_nl "Unable to get external IP" - fi + echo "Unable to get external IP address" fi +else + extip="$(cat "${tmpdir}/extip.txt")" fi # Alert IP address diff --git a/lgsm/functions/info_stats.sh b/lgsm/functions/info_stats.sh index 93c01cf32..0589770f6 100755 --- a/lgsm/functions/info_stats.sh +++ b/lgsm/functions/info_stats.sh @@ -12,7 +12,7 @@ info_distro.sh # remove uuid that was used in v20.2.0 and below if [ -f "${datadir}/uuid.txt" ]; then - rm "${datadir:?}/uuid.txt" + rm -f "${datadir:?}/uuid.txt" fi # generate uuid's diff --git a/lgsm/functions/mods_core.sh b/lgsm/functions/mods_core.sh index 7e2d097a7..e79ceb9ad 100755 --- a/lgsm/functions/mods_core.sh +++ b/lgsm/functions/mods_core.sh @@ -440,7 +440,7 @@ fn_mods_create_tmp_dir() { fn_mods_clear_tmp_dir() { if [ -d "${modstmpdir}" ]; then echo -en "clearing mod download directory ${modstmpdir}..." - rm -fr "${modstmpdir:?}" + rm -rf "${modstmpdir:?}" exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl @@ -742,7 +742,7 @@ fn_mod_remove_amxmodx_file() { # if file is empty, remove it. if [ -f "${modinstalldir}/addons/metamod/plugins.ini" ]; then - rm "${modinstalldir}/addons/metamod/plugins.ini" + rm -f "${modinstalldir}/addons/metamod/plugins.ini" fn_script_log_pass "file removed ${modinstalldir}/addons/metamod/plugins.ini because it was empty" fi fi diff --git a/linuxgsm.sh b/linuxgsm.sh index 0f36ebcaa..3e4812439 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -113,7 +113,7 @@ fn_bootstrap_fetch_file() { # Download will fail if downloads a html file. if [ -f "${local_filedir}/${local_filename}" ]; then if [ -n "$(head "${local_filedir}/${local_filename}" | grep "DOCTYPE")" ]; then - rm "${local_filedir:?}/${local_filename:?}" + rm -f "${local_filedir:?}/${local_filename:?}" local exitcode=2 fi fi diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index 0c1e02d67..11ed61f93 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -112,7 +112,7 @@ fn_bootstrap_fetch_file() { # Download will fail if downloads a html file. if [ -f "${local_filedir}/${local_filename}" ]; then if [ -n "$(head "${local_filedir}/${local_filename}" | grep "DOCTYPE")" ]; then - rm "${local_filedir:?}/${local_filename:?}" + rm -f "${local_filedir:?}/${local_filename:?}" local exitcode=2 fi fi diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 62736d50b..5e0158b7a 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -113,7 +113,7 @@ fn_bootstrap_fetch_file() { # Download will fail if downloads a html file. if [ -f "${local_filedir}/${local_filename}" ]; then if [ -n "$(head "${local_filedir}/${local_filename}" | grep "DOCTYPE")" ]; then - rm "${local_filedir:?}/${local_filename:?}" + rm -f "${local_filedir:?}/${local_filename:?}" local exitcode=2 fi fi diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 6fe28715b..560484910 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -113,7 +113,7 @@ fn_bootstrap_fetch_file() { # Download will fail if downloads a html file. if [ -f "${local_filedir}/${local_filename}" ]; then if [ -n "$(head "${local_filedir}/${local_filename}" | grep "DOCTYPE")" ]; then - rm "${local_filedir:?}/${local_filename:?}" + rm -f "${local_filedir:?}/${local_filename:?}" local exitcode=2 fi fi diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index fa6d62283..731a38518 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -113,7 +113,7 @@ fn_bootstrap_fetch_file() { # Download will fail if downloads a html file. if [ -f "${local_filedir}/${local_filename}" ]; then if [ -n "$(head "${local_filedir}/${local_filename}" | grep "DOCTYPE")" ]; then - rm "${local_filedir:?}/${local_filename:?}" + rm -f "${local_filedir:?}/${local_filename:?}" local exitcode=2 fi fi From e8cb43a058bbc8aceb25f184e2fc97858788429e Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 27 Feb 2023 00:23:53 +0000 Subject: [PATCH 092/374] feat(btl): rename bt1944 to btl (#4124) * fix(bt1944): update binary file * feat(btl): rename bt1944 to btl --- .github/labeler.yml | 4 ++-- .../{bt1944server => btlserver}/_default.cfg | 6 +++--- lgsm/data/almalinux-8.csv | 2 +- lgsm/data/almalinux-9.csv | 2 +- lgsm/data/centos-7.csv | 2 +- lgsm/data/centos-8.csv | 2 +- lgsm/data/centos-9.csv | 2 +- lgsm/data/debian-10.csv | 2 +- lgsm/data/debian-11.csv | 2 +- lgsm/data/debian-9.csv | 2 +- lgsm/data/rhel-7.csv | 2 +- lgsm/data/rhel-8.csv | 2 +- lgsm/data/rhel-9.csv | 2 +- lgsm/data/rocky-8.csv | 2 +- lgsm/data/rocky-9.csv | 2 +- lgsm/data/serverlist.csv | 2 +- lgsm/data/ubuntu-16.04.csv | 2 +- lgsm/data/ubuntu-18.04.csv | 2 +- lgsm/data/ubuntu-20.04.csv | 2 +- lgsm/data/ubuntu-21.04.csv | 2 +- lgsm/data/ubuntu-21.10.csv | 2 +- lgsm/data/ubuntu-22.04.csv | 2 +- lgsm/functions/info_game.sh | 10 +++++----- lgsm/functions/info_messages.sh | 6 +++--- lgsm/functions/install_config.sh | 6 +++--- 25 files changed, 36 insertions(+), 36 deletions(-) rename lgsm/config-default/config-lgsm/{bt1944server => btlserver}/_default.cfg (97%) diff --git a/.github/labeler.yml b/.github/labeler.yml index 1ec662f2b..3da0d47ee 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -68,8 +68,8 @@ - "/(Avorion)/i" "game: Ballistic Overkill": - "/(Ballistic Overkill)/i" -"game: Battalion 1944": - - "/(Battalion 1944)/i" +"game: BATTALION: Legacy": + - "/(BATTALION: Legacy)/i" "game: Barotrauma": - "/(Barotrauma)/i" "game: Counter-Strike: Global Offensive": diff --git a/lgsm/config-default/config-lgsm/bt1944server/_default.cfg b/lgsm/config-default/config-lgsm/btlserver/_default.cfg similarity index 97% rename from lgsm/config-default/config-lgsm/bt1944server/_default.cfg rename to lgsm/config-default/config-lgsm/btlserver/_default.cfg index 78032cfe0..81173ccb9 100644 --- a/lgsm/config-default/config-lgsm/bt1944server/_default.cfg +++ b/lgsm/config-default/config-lgsm/btlserver/_default.cfg @@ -151,7 +151,7 @@ consoleinteract="no" ## Game Server Details # Do not edit -gamename="Battalion 1944" +gamename="BATTALION: Legacy" engine="unreal4" glibc="2.17" @@ -159,9 +159,9 @@ glibc="2.17" # Edit with care ## Game Server Directories -systemdir="${serverfiles}/Linux/Battalion" +systemdir="${serverfiles}/Battalion" executabledir="${systemdir}/Binaries/Linux" -executable="./BattalionServer" +executable="./BattalionServer-Linux-Shipping" servercfgdir="${systemdir}/Saved/Config/LinuxServer" servercfg="${selfname}.ini" servercfgdefault="DefaultGame.ini" diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index 9f341fb99..3d0dd88c9 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -17,7 +17,7 @@ bmdm,ncurses-libs.i686 bo bs bt,libicu,dos2unix -bt1944 +btl cc cd ck,xorg-x11-server-Xvfb diff --git a/lgsm/data/almalinux-9.csv b/lgsm/data/almalinux-9.csv index 9f341fb99..3d0dd88c9 100644 --- a/lgsm/data/almalinux-9.csv +++ b/lgsm/data/almalinux-9.csv @@ -17,7 +17,7 @@ bmdm,ncurses-libs.i686 bo bs bt,libicu,dos2unix -bt1944 +btl cc cd ck,xorg-x11-server-Xvfb diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index e997a2e5e..6836a9de0 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -17,7 +17,7 @@ bmdm,ncurses-libs.i686 bo bs bt,libicu,dos2unix -bt1944 +btl cc cd ck,xorg-x11-server-Xvfb diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index 9f341fb99..3d0dd88c9 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -17,7 +17,7 @@ bmdm,ncurses-libs.i686 bo bs bt,libicu,dos2unix -bt1944 +btl cc cd ck,xorg-x11-server-Xvfb diff --git a/lgsm/data/centos-9.csv b/lgsm/data/centos-9.csv index 9f341fb99..3d0dd88c9 100644 --- a/lgsm/data/centos-9.csv +++ b/lgsm/data/centos-9.csv @@ -17,7 +17,7 @@ bmdm,ncurses-libs.i686 bo bs bt,libicu,dos2unix -bt1944 +btl cc cd ck,xorg-x11-server-Xvfb diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index 499846c75..41c16331d 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -17,7 +17,7 @@ bmdm,libncurses5:i386 bo bs bt,libicu-dev,dos2unix -bt1944 +btl cc cd ck,xvfb diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index 1e488fc15..2c67d0d10 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -17,7 +17,7 @@ bmdm,libncurses5:i386 bo bs bt,libicu-dev,dos2unix -bt1944 +btl cc cd ck,xvfb diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index 5fe112702..20816ad24 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -17,7 +17,7 @@ bmdm,libncurses5:i386 bo bs bt,libicu-dev,dos2unix -bt1944 +btl cc cd ck,xvfb diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index 0016a5665..90c7fd28a 100644 --- a/lgsm/data/rhel-7.csv +++ b/lgsm/data/rhel-7.csv @@ -17,7 +17,7 @@ bmdm,ncurses-libs.i686 bo bs bt,libicu,dos2unix -bt1944 +btl cc cd ck,xorg-x11-server-Xvfb diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index 9f341fb99..3d0dd88c9 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -17,7 +17,7 @@ bmdm,ncurses-libs.i686 bo bs bt,libicu,dos2unix -bt1944 +btl cc cd ck,xorg-x11-server-Xvfb diff --git a/lgsm/data/rhel-9.csv b/lgsm/data/rhel-9.csv index 9f341fb99..3d0dd88c9 100644 --- a/lgsm/data/rhel-9.csv +++ b/lgsm/data/rhel-9.csv @@ -17,7 +17,7 @@ bmdm,ncurses-libs.i686 bo bs bt,libicu,dos2unix -bt1944 +btl cc cd ck,xorg-x11-server-Xvfb diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index 9f341fb99..3d0dd88c9 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -17,7 +17,7 @@ bmdm,ncurses-libs.i686 bo bs bt,libicu,dos2unix -bt1944 +btl cc cd ck,xorg-x11-server-Xvfb diff --git a/lgsm/data/rocky-9.csv b/lgsm/data/rocky-9.csv index 9f341fb99..3d0dd88c9 100644 --- a/lgsm/data/rocky-9.csv +++ b/lgsm/data/rocky-9.csv @@ -17,7 +17,7 @@ bmdm,ncurses-libs.i686 bo bs bt,libicu,dos2unix -bt1944 +btl cc cd ck,xorg-x11-server-Xvfb diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 5c9a6d97a..aff8708e7 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -15,7 +15,7 @@ bmdm,bmdmserver,Black Mesa: Deathmatch,ubuntu-22.04 bo,boserver,Ballistic Overkill,ubuntu-22.04 bs,bsserver,Blade Symphony,ubuntu-22.04 bt,btserver,Barotrauma,ubuntu-22.04 -bt1944,bt1944server,Battalion 1944,ubuntu-22.04 +btl,btlserver,BATTALION: Legacy,ubuntu-22.04 cc,ccserver,Codename CURE,ubuntu-22.04 cd,cdserver,Crafting Dead,ubuntu-22.04 ck,ckserver,Core Keeper,ubuntu-22.04 diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index e1cfa166b..f26b7996a 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -17,7 +17,7 @@ bmdm,libncurses5:i386 bo bs bt,libicu-dev,dos2unix -bt1944 +btl cc cd ck,xvfb diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index 499846c75..41c16331d 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -17,7 +17,7 @@ bmdm,libncurses5:i386 bo bs bt,libicu-dev,dos2unix -bt1944 +btl cc cd ck,xvfb diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index 6ff12422a..d32d7e024 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -17,7 +17,7 @@ bmdm,libncurses5:i386 bo bs bt,libicu-dev,dos2unix -bt1944 +btl cc cd ck,xvfb diff --git a/lgsm/data/ubuntu-21.04.csv b/lgsm/data/ubuntu-21.04.csv index 1e488fc15..2c67d0d10 100644 --- a/lgsm/data/ubuntu-21.04.csv +++ b/lgsm/data/ubuntu-21.04.csv @@ -17,7 +17,7 @@ bmdm,libncurses5:i386 bo bs bt,libicu-dev,dos2unix -bt1944 +btl cc cd ck,xvfb diff --git a/lgsm/data/ubuntu-21.10.csv b/lgsm/data/ubuntu-21.10.csv index 4760fd5f2..88bcd2b09 100644 --- a/lgsm/data/ubuntu-21.10.csv +++ b/lgsm/data/ubuntu-21.10.csv @@ -17,7 +17,7 @@ bmdm,libncurses5:i386 bo bs bt,libicu-dev -bt1944 +btl cc ck,xvfb cmw diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index 123529324..d18b8e6fb 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -17,7 +17,7 @@ bmdm,libncurses5:i386 bo bs bt,libicu-dev,dos2unix -bt1944 +btl cc ck,xvfb cd diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index 5814cd832..f859653c8 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -264,7 +264,7 @@ fn_info_game_bt() { fi } -fn_info_game_bt1944() { +fn_info_game_btl() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -307,7 +307,7 @@ fn_info_game_cd() { fi } -fn_info_game_ck(){ +fn_info_game_ck() { if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" maxplayers="${zero}" @@ -318,7 +318,7 @@ fn_info_game_ck(){ queryport=$((port + 1)) } -fn_info_game_cmw(){ +fn_info_game_cmw() { # Config if [ ! -f "${servercfgfullpath}" ]; then adminpassword="${unavailable}" @@ -2402,8 +2402,8 @@ elif [ "${shortname}" == "bo" ]; then fn_info_game_bo elif [ "${shortname}" == "bt" ]; then fn_info_game_bt -elif [ "${shortname}" == "bt1944" ]; then - fn_info_game_bt1944 +elif [ "${shortname}" == "btl" ]; then + fn_info_game_btl elif [ "${shortname}" == "cd" ]; then fn_info_game_cd elif [ "${shortname}" == "ck" ]; then diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index 533dee675..74f529bd7 100755 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -861,7 +861,7 @@ fn_info_message_bt() { } | column -s $'\t' -t } -fn_info_message_bt1944() { +fn_info_message_btl() { { fn_port "header" fn_port "Game" port udp @@ -1693,8 +1693,8 @@ fn_info_message_select_engine() { fn_info_message_bo elif [ "${shortname}" == "bt" ]; then fn_info_message_bt - elif [ "${shortname}" == "bt1944" ]; then - fn_info_message_bt1944 + elif [ "${shortname}" == "btl" ]; then + fn_info_message_btl elif [ "${shortname}" == "cd" ]; then fn_info_messages_cd elif [ "${shortname}" == "ck" ]; then diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index c04db364c..dd3bb80c3 100755 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -240,8 +240,8 @@ elif [ "${shortname}" == "bt" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations -elif [ "${shortname}" == "bt1944" ]; then - gamedirname="Battalion1944" +elif [ "${shortname}" == "btl" ]; then + gamedirname="BattalionLegacy" fn_check_cfgdir array_configs+=(DefaultGame.ini) fn_fetch_default_config @@ -299,7 +299,7 @@ elif [ "${shortname}" == "cd" ]; then fn_list_config_locations elif [ "${shortname}" == "ck" ]; then gamedirname="CoreKeeper" - array_configs+=( ServerConfig.json ) + array_configs+=(ServerConfig.json) fn_fetch_default_config fn_default_config_remote fn_set_config_vars From 37fb14c78eab21b377e162df1f2f70bc10c67a3f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 27 Feb 2023 01:16:43 +0000 Subject: [PATCH 093/374] fix(cmw): correct configsubdir setting --- lgsm/config-default/config-lgsm/cmwserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/cmwserver/_default.cfg b/lgsm/config-default/config-lgsm/cmwserver/_default.cfg index 435bde1ea..0f05118e9 100644 --- a/lgsm/config-default/config-lgsm/cmwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/cmwserver/_default.cfg @@ -15,7 +15,7 @@ queryport="7779" defaultmap="AOCTD-Frigid_p" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="${defaultmap}?steamsockets -multihome=${ip} -Port=${port} -QueryPort=${queryport} -seekfreeloadingserver -configsubdir=${gamelogdir} -log=${gamelog}" +startparameters="${defaultmap}?steamsockets -multihome=${ip} -Port=${port} -QueryPort=${queryport} -seekfreeloadingserver -configsubdir=${selfname} -log=${gamelog}" #### LinuxGSM Settings #### From 7eef6330d7599376dced08ca1d2462b1df3bbd72 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 1 Mar 2023 19:53:47 +0000 Subject: [PATCH 094/374] feat(mumble): remove support for mumble (#4128) deprecate mumble support as Linux is no longer being supported by the Mumble dev team --- .../config-lgsm/mumbleserver/_default.cfg | 169 ------------------ lgsm/data/almalinux-8.csv | 1 - lgsm/data/almalinux-9.csv | 1 - lgsm/data/centos-7.csv | 1 - lgsm/data/centos-8.csv | 1 - lgsm/data/centos-9.csv | 1 - lgsm/data/debian-10.csv | 1 - lgsm/data/debian-11.csv | 1 - lgsm/data/debian-9.csv | 1 - lgsm/data/rhel-7.csv | 1 - lgsm/data/rhel-8.csv | 1 - lgsm/data/rhel-9.csv | 1 - lgsm/data/rocky-8.csv | 1 - lgsm/data/rocky-9.csv | 1 - lgsm/data/serverlist.csv | 1 - lgsm/data/ubuntu-16.04.csv | 1 - lgsm/data/ubuntu-18.04.csv | 1 - lgsm/data/ubuntu-20.04.csv | 1 - lgsm/data/ubuntu-21.04.csv | 1 - lgsm/data/ubuntu-21.10.csv | 1 - lgsm/data/ubuntu-22.04.csv | 1 - lgsm/functions/command_update.sh | 2 - lgsm/functions/core_functions.sh | 5 - lgsm/functions/info_game.sh | 21 --- lgsm/functions/info_messages.sh | 12 +- lgsm/functions/install_config.sh | 6 - lgsm/functions/install_server_files.sh | 2 - lgsm/functions/update_mumble.sh | 143 --------------- 28 files changed, 1 insertion(+), 379 deletions(-) delete mode 100644 lgsm/config-default/config-lgsm/mumbleserver/_default.cfg delete mode 100644 lgsm/functions/update_mumble.sh diff --git a/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg b/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg deleted file mode 100644 index fdb06bfe8..000000000 --- a/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg +++ /dev/null @@ -1,169 +0,0 @@ -################################## -######## Default Settings ######## -################################## -# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! -# Copy settings from here and use them in either: -# common.cfg - applies settings to every instance. -# [instance].cfg - applies settings to a specific instance. - -#### Game Server Settings #### - -## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-fg -ini ${servercfgfullpath}" - -#### LinuxGSM Settings #### - -## LinuxGSM Stats -# Send useful stats to LinuxGSM developers. -# https://docs.linuxgsm.com/configuration/linuxgsm-stats -# (on|off) -stats="off" - -## Notification Alerts -# (on|off) - -# Display IP | https://docs.linuxgsm.com/alerts#display-ip -displayip="" - -# More info | https://docs.linuxgsm.com/alerts#more-info -postalert="off" - -# Discord Alerts | https://docs.linuxgsm.com/alerts/discord -discordalert="off" -discordwebhook="webhook" - -# Email Alerts | https://docs.linuxgsm.com/alerts/email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify -gotifyalert="off" -gotifytoken="token" -gotifywebhook="webhook" - -# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt -iftttalert="off" -ifttttoken="accesstoken" -iftttevent="linuxgsm_alert" - -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - -# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover -pushoveralert="off" -pushovertoken="accesstoken" -pushoveruserkey="userkey" - -# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat -rocketchatalert="off" -rocketchatwebhook="webhook" -rocketchattoken="" - -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - -# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram -# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". -telegramapi="api.telegram.org" -telegramalert="off" -telegramtoken="accesstoken" -telegramchatid="" -curlcustomstring="" - -## Updating | https://docs.linuxgsm.com/commands/update -updateonstart="off" - -## Backup | https://docs.linuxgsm.com/commands/backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://docs.linuxgsm.com/features/logging -consolelogging="on" -logdays="7" - -## Monitor | https://docs.linuxgsm.com/commands/monitor -# Query delay time -querydelay="1" - -## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors -ansi="on" - -#### Advanced Settings #### - -## Message Display Time | https://docs.linuxgsm.com/features/message-display-time -sleeptime="0.5" - -## Stop Mode | https://docs.linuxgsm.com/features/stop-mode -# 1: tmux kill -# 2: CTRL+c -# 3: quit -# 4: quit 120s -# 5: stop -# 6: q -# 7: exit -# 8: 7 Days to Die -# 9: GoldSrc -# 10: Avorion -# 11: end -stopmode="2" - -## Query mode -# 1: session only -# 2: gamedig (gsquery fallback) -# 3: gamedig -# 4: gsquery -# 5: tcp -querymode="2" -querytype="mumbleping" - -## Console type -consoleverbose="yes" -consoleinteract="no" - -## Game Server Details -# Do not edit -gamename="Mumble" -engine="null" -glibc="null" - -#### Directories #### -# Edit with care - -## Game Server Directories -systemdir="${serverfiles}" -executabledir="${serverfiles}" -executable="./murmur.x86" -servercfgdir="${systemdir}" -servercfg="${selfname}.ini" -servercfgdefault="murmur.ini" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${lgsmdir}/backup" - -## Logging Directories -logdir="${rootdir}/log" -lgsmlogdir="${logdir}/script" -consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${selfname}-script.log" -consolelog="${consolelogdir}/${selfname}-console.log" -alertlog="${lgsmlogdir}/${selfname}-alert.log" -postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" - -## Logs Naming -lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index 3d0dd88c9..86ff4dc14 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -69,7 +69,6 @@ mh mohaa,compat-libstdc++-33.i686 mom mta,ncurses-compat-libs -mumble nd nec nmrih,ncurses-libs.i686 diff --git a/lgsm/data/almalinux-9.csv b/lgsm/data/almalinux-9.csv index 3d0dd88c9..86ff4dc14 100644 --- a/lgsm/data/almalinux-9.csv +++ b/lgsm/data/almalinux-9.csv @@ -69,7 +69,6 @@ mh mohaa,compat-libstdc++-33.i686 mom mta,ncurses-compat-libs -mumble nd nec nmrih,ncurses-libs.i686 diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index 6836a9de0..c1d2b97b8 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -69,7 +69,6 @@ mh mohaa,compat-libstdc++-33.i686 mom mta,ncurses-libs -mumble nd nec nmrih,ncurses-libs.i686 diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index 3d0dd88c9..86ff4dc14 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -69,7 +69,6 @@ mh mohaa,compat-libstdc++-33.i686 mom mta,ncurses-compat-libs -mumble nd nec nmrih,ncurses-libs.i686 diff --git a/lgsm/data/centos-9.csv b/lgsm/data/centos-9.csv index 3d0dd88c9..86ff4dc14 100644 --- a/lgsm/data/centos-9.csv +++ b/lgsm/data/centos-9.csv @@ -69,7 +69,6 @@ mh mohaa,compat-libstdc++-33.i686 mom mta,ncurses-compat-libs -mumble nd nec nmrih,ncurses-libs.i686 diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index 41c16331d..768be603f 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -69,7 +69,6 @@ mh mohaa,libstdc++5:i386 mom mta,libncursesw5 -mumble nd nec nmrih,libtinfo5:i386 diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index 2c67d0d10..021e66e20 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -69,7 +69,6 @@ mh mohaa,libstdc++5:i386 mom mta,libncursesw5 -mumble nd nec nmrih,libtinfo5:i386 diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index 20816ad24..fa0d6a881 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -69,7 +69,6 @@ mh mohaa,libstdc++5:i386 mom mta,libncursesw5 -mumble nd nec nmrih,libtinfo5:i386 diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index 90c7fd28a..4cfe96848 100644 --- a/lgsm/data/rhel-7.csv +++ b/lgsm/data/rhel-7.csv @@ -69,7 +69,6 @@ mh mohaa,compat-libstdc++-33.i686 mom mta,ncurses-libs -mumble nd nec nmrih,ncurses-libs.i686 diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index 3d0dd88c9..86ff4dc14 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -69,7 +69,6 @@ mh mohaa,compat-libstdc++-33.i686 mom mta,ncurses-compat-libs -mumble nd nec nmrih,ncurses-libs.i686 diff --git a/lgsm/data/rhel-9.csv b/lgsm/data/rhel-9.csv index 3d0dd88c9..86ff4dc14 100644 --- a/lgsm/data/rhel-9.csv +++ b/lgsm/data/rhel-9.csv @@ -69,7 +69,6 @@ mh mohaa,compat-libstdc++-33.i686 mom mta,ncurses-compat-libs -mumble nd nec nmrih,ncurses-libs.i686 diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index 3d0dd88c9..86ff4dc14 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -69,7 +69,6 @@ mh mohaa,compat-libstdc++-33.i686 mom mta,ncurses-compat-libs -mumble nd nec nmrih,ncurses-libs.i686 diff --git a/lgsm/data/rocky-9.csv b/lgsm/data/rocky-9.csv index 3d0dd88c9..86ff4dc14 100644 --- a/lgsm/data/rocky-9.csv +++ b/lgsm/data/rocky-9.csv @@ -69,7 +69,6 @@ mh mohaa,compat-libstdc++-33.i686 mom mta,ncurses-compat-libs -mumble nd nec nmrih,ncurses-libs.i686 diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index aff8708e7..ae9ae564c 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -67,7 +67,6 @@ mh,mhserver,MORDHAU,ubuntu-22.04 mohaa,mohaaserver,Medal of Honor: Allied Assault,ubuntu-22.04 mom,momserver,Memories of Mars,ubuntu-22.04 mta,mtaserver,Multi Theft Auto,ubuntu-22.04 -mumble,mumbleserver,Mumble,ubuntu-22.04 nd,ndserver,Nuclear Dawn,ubuntu-22.04 nec,necserver,Necesse,ubuntu-22.04 nmrih,nmrihserver,No More Room in Hell,ubuntu-22.04 diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index f26b7996a..d0f8fcebc 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -69,7 +69,6 @@ mh mohaa,libstdc++5:i386 mom mta -mumble nd nec nmrih,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index 41c16331d..768be603f 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -69,7 +69,6 @@ mh mohaa,libstdc++5:i386 mom mta,libncursesw5 -mumble nd nec nmrih,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index d32d7e024..d4e8d6533 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -69,7 +69,6 @@ mh mohaa,libstdc++5:i386 mom mta,libncursesw5 -mumble nd nec nmrih,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-21.04.csv b/lgsm/data/ubuntu-21.04.csv index 2c67d0d10..021e66e20 100644 --- a/lgsm/data/ubuntu-21.04.csv +++ b/lgsm/data/ubuntu-21.04.csv @@ -69,7 +69,6 @@ mh mohaa,libstdc++5:i386 mom mta,libncursesw5 -mumble nd nec nmrih,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-21.10.csv b/lgsm/data/ubuntu-21.10.csv index 88bcd2b09..4284cdd9c 100644 --- a/lgsm/data/ubuntu-21.10.csv +++ b/lgsm/data/ubuntu-21.10.csv @@ -67,7 +67,6 @@ mh mohaa,libstdc++5:i386 mom mta,libncursesw5 -mumble nd nec nmrih,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index d18b8e6fb..5aaacff81 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -69,7 +69,6 @@ mh mohaa,libstdc++5:i386 mom mta,libncursesw5 -mumble nd nec nmrih,libtinfo5:i386 diff --git a/lgsm/functions/command_update.sh b/lgsm/functions/command_update.sh index 07b65e5fa..ccf26322e 100755 --- a/lgsm/functions/command_update.sh +++ b/lgsm/functions/command_update.sh @@ -23,8 +23,6 @@ elif [ "${shortname}" == "mcb" ]; then update_minecraft_bedrock.sh elif [ "${shortname}" == "pmc" ] || [ "${shortname}" == "vpmc" ] || [ "${shortname}" == "wmc" ]; then update_papermc.sh -elif [ "${shortname}" == "mumble" ]; then - update_mumble.sh elif [ "${shortname}" == "fctr" ]; then update_factorio.sh elif [ "${shortname}" == "mta" ]; then diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 05b52e243..bca5debf9 100755 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -655,11 +655,6 @@ update_papermc.sh() { fn_fetch_function } -update_mumble.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - update_mta.sh() { functionfile="${FUNCNAME[0]}" fn_fetch_function diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index f859653c8..4a1256431 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -1074,25 +1074,6 @@ fn_info_game_mta() { } -fn_info_game_mumble() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - port="64738" - queryport="${port}" - servername="Mumble" - else - port=$(grep "port" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^;/d' -e 's/port//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - queryport="${port}" - configip=$(grep "host=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^;/d' -e 's/host=//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - port=${port:-"64738"} - queryport=${queryport:-"64738"} - servername="Mumble Port ${port}" - configip=${configip:-"0.0.0.0"} - fi -} - fn_info_game_nec() { # Config if [ ! -f "${servercfgfullpath}" ]; then @@ -2462,8 +2443,6 @@ elif [ "${shortname}" == "mom" ]; then fn_info_game_mom elif [ "${shortname}" == "mta" ]; then fn_info_game_mta -elif [ "${shortname}" == "mumble" ]; then - fn_info_game_mumble elif [ "${shortname}" == "nec" ]; then fn_info_game_nec elif [ "${shortname}" == "onset" ]; then diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index 74f529bd7..69123543a 100755 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -658,7 +658,7 @@ fn_info_message_ports_edit() { startparameterslocation="${red}UNKNOWN${default}" # engines/games that require editing in the config file. - local ports_edit_array=("ac" "arma3" "armar" "bo" "bt" "cd" "dst" "eco" "idtech2" "idtech3" "idtech3_ql" "jc2" "jc3" "lwjgl2" "mcb" "mumble" "nec" "pc" "pc2" "prism3d" "pz" "qw" "refractor" "renderware" "rw" "sb" "sdtd" "st" "stn" "ts3" "tw" "terraria" "unreal" "unreal2" "unreal3" "vints" "wurm") + local ports_edit_array=("ac" "arma3" "armar" "bo" "bt" "cd" "dst" "eco" "idtech2" "idtech3" "idtech3_ql" "jc2" "jc3" "lwjgl2" "mcb" "nec" "pc" "pc2" "prism3d" "pz" "qw" "refractor" "renderware" "rw" "sb" "sdtd" "st" "stn" "ts3" "tw" "terraria" "unreal" "unreal2" "unreal3" "vints" "wurm") for port_edit in "${ports_edit_array[@]}"; do if [ "${shortname}" == "ut3" ]; then startparameterslocation="${servercfgdir}/UTWeb.ini" @@ -1171,14 +1171,6 @@ fn_info_message_mta() { } | column -s $'\t' -t } -fn_info_message_mumble() { - { - fn_port "header" - fn_port "Voice" port udp - fn_port "Query" queryport tcp - } | column -s $'\t' -t -} - fn_info_message_nec() { { fn_port "header" @@ -1757,8 +1749,6 @@ fn_info_message_select_engine() { fn_info_message_mom elif [ "${shortname}" == "mta" ]; then fn_info_message_mta - elif [ "${shortname}" == "mumble" ]; then - fn_info_message_mumble elif [ "${shortname}" == "nec" ]; then fn_info_message_nec elif [ "${shortname}" == "onset" ]; then diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index dd3bb80c3..35d7df7c6 100755 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -629,12 +629,6 @@ elif [ "${shotname}" == "mom" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations -elif [ "${shortname}" == "mumble" ]; then - gamedirname="Mumble" - array_configs+=(murmur.ini) - fn_fetch_default_config - fn_default_config_remote - fn_list_config_locations elif [ "${shortname}" == "pvr" ]; then gamedirname="PavlovVR" fn_check_cfgdir diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index 61c6b131c..c98986685 100755 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -224,8 +224,6 @@ elif [ "${shortname}" == "pmc" ]; then update_papermc.sh elif [ "${shortname}" == "wmc" ] || [ "${shortname}" == "vpmc" ]; then update_papermc.sh -elif [ "${shortname}" == "mumble" ]; then - update_mumble.sh elif [ "${shortname}" == "mta" ]; then update_mta.sh elif [ "${shortname}" == "fctr" ]; then diff --git a/lgsm/functions/update_mumble.sh b/lgsm/functions/update_mumble.sh deleted file mode 100644 index 77e64d3c0..000000000 --- a/lgsm/functions/update_mumble.sh +++ /dev/null @@ -1,143 +0,0 @@ -#!/bin/bash -# LinuxGSM update_mumble.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Handles updating of Mumble servers. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -fn_update_mumble_dl() { - fn_fetch_file "https://github.com/mumble-voip/mumble/releases/download/${remotebuild}/murmur-static_${mumblearch}-${remotebuild}.tar.bz2" "" "" "" "${tmpdir}" "murmur-static_${mumblearch}-${remotebuild}.tar.bz2" "" "norun" "noforce" "nohash" - fn_dl_extract "${tmpdir}" "murmur-static_${mumblearch}-${remotebuild}.tar.bz2" "${tmpdir}" - echo -e "copying to ${serverfiles}...\c" - cp -R "${tmpdir}/murmur-static_${mumblearch}-${remotebuild}/"* "${serverfiles}" - local exitcode=$? - if [ "${exitcode}" == "0" ]; then - fn_print_ok_eol_nl - fn_script_log_pass "Copying to ${serverfiles}" - fn_clear_tmp - else - fn_print_fail_eol_nl - fn_script_log_fatal "Copying to ${serverfiles}" - fn_clear_tmp - core_exit.sh - fi -} - -fn_update_mumble_localbuild() { - # Gets local build info. - fn_print_dots "Checking local build: ${remotelocation}" - # Uses executable to find local build. - cd "${executabledir}" || exit - if [ -f "${executable}" ]; then - localbuild=$(${executable} -version 2>&1 > /dev/null | awk '{print $5}') - fn_print_ok "Checking local build: ${remotelocation}" - fn_script_log_pass "Checking local build" - else - localbuild="0" - fn_print_error "Checking local build: ${remotelocation}" - fn_script_log_error "Checking local build" - fi -} - -fn_update_mumble_remotebuild() { - # Gets remote build info. - remotebuild=$(curl -s "https://api.github.com/repos/mumble-voip/mumble/releases/latest" | grep 'murmur-static_x86.*\.bz2"' | tail -1 | awk -F"/" '{ print $8 }') - if [ "${firstcommandname}" != "INSTALL" ]; then - fn_print_dots "Checking remote build: ${remotelocation}" - # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then - fn_print_fail "Checking remote build: ${remotelocation}" - fn_script_log_fatal "Checking remote build" - core_exit.sh - else - fn_print_ok "Checking remote build: ${remotelocation}" - fn_script_log_pass "Checking remote build" - fi - else - # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then - fn_print_failure "Unable to get remote build" - fn_script_log_fatal "Unable to get remote build" - core_exit.sh - fi - fi -} - -fn_update_mumble_compare() { - # Removes dots so if statement can compare version numbers. - fn_print_dots "Checking for update: ${remotelocation}" - localbuilddigit=$(echo -e "${localbuild}" | tr -cd '[:digit:]') - remotebuilddigit=$(echo -e "${remotebuild}" | tr -cd '[:digit:]') - if [ "${localbuilddigit}" -ne "${remotebuilddigit}" ] || [ "${forceupdate}" == "1" ]; then - fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "Update available" - echo -e "* Local build: ${red}${localbuild} ${mumblearch}${default}" - echo -e "* Remote build: ${green}${remotebuild} ${mumblearch}${default}" - echo -en "\n" - fn_script_log_info "Update available" - fn_script_log_info "Local build: ${localbuild} ${mumblearch}" - fn_script_log_info "Remote build: ${remotebuild} ${mumblearch}" - fn_script_log_info "${localbuild} > ${remotebuild}" - - unset updateonstart - check_status.sh - # If server stopped. - if [ "${status}" == "0" ]; then - exitbypass=1 - fn_update_mumble_dl - if [ "${requirerestart}" == "1" ]; then - exitbypass=1 - command_start.sh - fn_firstcommand_reset - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - fi - # If server started. - else - fn_print_restart_warning - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - exitbypass=1 - fn_update_mumble_dl - exitbypass=1 - command_start.sh - fn_firstcommand_reset - fi - unset exitbypass - date +%s > "${lockdir}/lastupdate.lock" - alert="update" - alert.sh - else - fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "No update available" - echo -e "* Local build: ${green}${localbuild} ${mumblearch}${default}" - echo -e "* Remote build: ${green}${remotebuild} ${mumblearch}${default}" - echo -en "\n" - fn_script_log_info "No update available" - fn_script_log_info "Local build: ${localbuild} ${mumblearch}" - fn_script_log_info "Remote build: ${remotebuild} ${mumblearch}" - fi -} - -# The location where the builds are checked and downloaded. -remotelocation="mumble.info" - -# Game server architecture. -mumblearch="x86" - -if [ "${firstcommandname}" == "INSTALL" ]; then - fn_update_mumble_remotebuild - fn_update_mumble_dl -else - fn_print_dots "Checking for update: ${remotelocation}" - fn_script_log_info "Checking for update: ${remotelocation}" - fn_update_mumble_localbuild - fn_update_mumble_remotebuild - fn_update_mumble_compare -fi From 651edde223fddb7d817f0b68ba83f8f72b44a25f Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 1 Mar 2023 20:54:54 +0100 Subject: [PATCH 095/374] fix(mods): get5 download change to github (#4020) --- lgsm/functions/mods_list.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lgsm/functions/mods_list.sh b/lgsm/functions/mods_list.sh index e8d583251..f78686759 100755 --- a/lgsm/functions/mods_list.sh +++ b/lgsm/functions/mods_list.sh @@ -72,10 +72,9 @@ steamworkslatestfile=$(curl --connect-timeout 10 -sL ${steamworksscrapeurl} | gr steamworksdownloadurl="${steamworksscrapeurl}/${steamworkslatestfile}" steamworksurl="${steamworksdownloadurl}" # CS:GO Mods -get5lastbuild=$(curl --connect-timeout 10 -sL https://ci.splewis.net/job/get5/lastSuccessfulBuild/api/json | jq -r '.artifacts[]') -get5latestfile=$(echo -e "${get5lastbuild}" | jq -r '.fileName') -get5latestfilepath=$(echo -e "${get5lastbuild}" | jq -r '.relativePath') -get5url="https://ci.splewis.net/job/get5/lastSuccessfulBuild/artifact/${get5latestfilepath}" +get5lastbuild=$(curl --connect-timeout 10 -sL https://api.github.com/repos/splewis/get5/releases/latest | jq '.assets[] |select(.browser_download_url | endswith(".tar.gz"))') +get5latestfile=$(echo -e "${get5lastbuild}" | jq -r '.name') +get5latestfilelink=$(echo -e "${get5lastbuild}" | jq -r '.browser_download_url') csgopracticelatest=$(curl --connect-timeout 10 -sL https://api.github.com/repos/splewis/csgo-practice-mode/releases/latest | jq '.assets[]') csgopracticelatestfile=$(echo -e "${csgopracticelatest}" | jq -r '.name') csgopracticelatestlink=$(echo -e "${csgopracticelatest}" | jq -r '.browser_download_url') @@ -151,7 +150,7 @@ mod_info_stripper=(MOD "stripper" "Stripper Source" "http://www.bailopan.net/str # CS:GO Mods mod_info_gokz=(MOD "gokz" "GOKZ" "${gokzlatestlink}" "${gokzlatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/KZGlobalTeam/gokz" "GOKZ ${gokzlatestversion} - Implements the KZ game mode (requires SourceMod and MetaMod)") mod_info_ttt=(MOD "ttt" "Trouble in Terrorist Town" "https://csgottt.com/downloads/ttt-latest-dev-${sourcemodversion}.zip" "ttt-latest.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/Bara/TroubleinTerroristTown" "Implements the TTT game mode (requires SourceMod and MetaMod)") -mod_info_get5=(MOD "get5" "Get 5" "${get5url}" "${get5latestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/get5" "Plugin for competitive matches/scrims (requires SourceMod and MetaMod)") +mod_info_get5=(MOD "get5" "Get 5" "${get5latestfilelink}" "${get5latestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/get5" "Plugin for competitive matches/scrims (requires SourceMod and MetaMod)") mod_info_prac=(MOD "prac" "csgo practice mode" "${csgopracticelatestlink}" "${csgopracticelatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/csgo-practice-mode" "Practice Mode is a sourcemod plugin for helping players/teams run practices.") mod_info_pug=(MOD "pug" "PUG" "${csgopuglatestlink}" "${csgopuglatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/csgo-pug-setup" "plugin for setting up private pug/10man games") mod_info_dhook=(MOD "dhook" "dhook" "https://forums.alliedmods.net/attachment.php?attachmentid=190123&d=1625050030" "dhooks-2.2.0d17.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://forums.alliedmods.net/showpost.php?p=2588686&postcount=589" "DHooks 2.2.0 - Required for GOKZ") From c957b2aa5ad36f83df13c3bed5d9a1e2df86ac10 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 1 Mar 2023 19:56:32 +0000 Subject: [PATCH 096/374] fix(av): fix will trigger on start as well (#4123) this should resolve the steamclient bug --- lgsm/functions/fix.sh | 2 ++ lgsm/functions/fix_av.sh | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lgsm/functions/fix.sh b/lgsm/functions/fix.sh index 0ed9fdf70..b0e9396cc 100755 --- a/lgsm/functions/fix.sh +++ b/lgsm/functions/fix.sh @@ -43,6 +43,8 @@ if [ "${commandname}" != "INSTALL" ] && [ -z "${fixbypass}" ]; then fix_armar.sh elif [ "${shortname}" == "ark" ]; then fix_ark.sh + elif [ "${shortname}" == "av" ]; then + fix_av.sh elif [ "${shortname}" == "bt" ]; then fix_bt.sh elif [ "${shortname}" == "bo" ]; then diff --git a/lgsm/functions/fix_av.sh b/lgsm/functions/fix_av.sh index f34a01c37..a61a8be65 100755 --- a/lgsm/functions/fix_av.sh +++ b/lgsm/functions/fix_av.sh @@ -9,11 +9,11 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/linux64" -if [ "${postinstall}" == "1" ]; then +# Generates the server config if it doesn't exist. +if [ ! -f "${servercfgfullpath}" ]; then startparameters="--datapath ${avdatapath} --galaxy-name ${selfname} --init-folders-only" fn_print_information "starting ${gamename} server to generate configs." fn_sleep_time - # go to the executeable dir and start the init of the server - cd "${systemdir}" || return 2 - "${executabledir}/${executable}" ${startparameters} + cd "${systemdir}" || exit + eval "${executable} ${startparameters}" fi From e86848c41cc2e397b63749cf6c1d1d4862adf9f5 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 22 Mar 2023 23:46:09 +0000 Subject: [PATCH 097/374] feat: update refactor (#4146) * feat(ut99): add oldunreal update functionality * non-steam update refactor * chore: flipping exit code if statements Must have consistancy XD * rename variables * feat(ut99): now supports native x64 * extracts will now fail if files doesnt exist * localbuild fix * a * fix: exit code bug * improve progress bar * add extractsrc and extractdest to deal with specific dir extracts * update ts3 extract * update * paper REFACTOR * mta a * fix(mta): prevent default resources exit from installer * streamline mcserver * mcb * jk2 * fixes * correct directory extract for factorio * mcb remove non printable characters * codacy --- .../config-lgsm/ut99server/_default.cfg | 2 +- lgsm/functions/alert.sh | 4 +- lgsm/functions/command_backup.sh | 11 +- lgsm/functions/command_check_update.sh | 28 +- .../command_install_resources_mta.sh | 4 +- lgsm/functions/command_mods_update.sh | 4 +- lgsm/functions/command_update.sh | 2 + lgsm/functions/core_dl.sh | 82 ++++-- lgsm/functions/core_exit.sh | 2 +- lgsm/functions/core_functions.sh | 5 + lgsm/functions/core_getopt.sh | 12 +- lgsm/functions/core_steamcmd.sh | 32 +-- lgsm/functions/fix.sh | 2 +- lgsm/functions/info_game.sh | 6 +- lgsm/functions/install_eula.sh | 2 - lgsm/functions/install_server_files.sh | 3 + lgsm/functions/install_ts3db.sh | 10 +- lgsm/functions/mods_core.sh | 18 +- lgsm/functions/update_factorio.sh | 169 ++++++------ lgsm/functions/update_jediknight2.sh | 195 +++++++------- lgsm/functions/update_minecraft.sh | 159 +++++------ lgsm/functions/update_minecraft_bedrock.sh | 189 +++++++------- lgsm/functions/update_mta.sh | 209 ++++++--------- lgsm/functions/update_papermc.sh | 247 ++++++++++-------- lgsm/functions/update_ts3.sh | 180 +++++-------- lgsm/functions/update_ut99.sh | 163 ++++++++++++ lgsm/functions/update_vintagestory.sh | 142 +++++----- 27 files changed, 1030 insertions(+), 852 deletions(-) create mode 100644 lgsm/functions/update_ut99.sh diff --git a/lgsm/config-default/config-lgsm/ut99server/_default.cfg b/lgsm/config-default/config-lgsm/ut99server/_default.cfg index 205e8a1d7..5af870f50 100644 --- a/lgsm/config-default/config-lgsm/ut99server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut99server/_default.cfg @@ -145,7 +145,7 @@ glibc="2.1" # Edit with care ## Game Server Directories -systemdir="${serverfiles}/System" +systemdir="${serverfiles}/System64" executabledir="${systemdir}" executable="./ucc-bin" servercfgdir="${systemdir}" diff --git a/lgsm/functions/alert.sh b/lgsm/functions/alert.sh index 8460209c4..59deae2b6 100755 --- a/lgsm/functions/alert.sh +++ b/lgsm/functions/alert.sh @@ -60,7 +60,7 @@ fn_alert_update() { alertemoji="🎮" alertsound="1" alerturl="not enabled" - alertbody="${gamename} received update" + alertbody="${gamename} received update: ${remotebuildversion}" } fn_alert_check_update() { @@ -69,7 +69,7 @@ fn_alert_check_update() { alertemoji="🎮" alertsound="1" alerturl="not enabled" - alertbody="${gamename} update available" + alertbody="${gamename} update available: ${remotebuildversion}" } fn_alert_permissions() { diff --git a/lgsm/functions/command_backup.sh b/lgsm/functions/command_backup.sh index 0dfabcd03..d69c57a0f 100644 --- a/lgsm/functions/command_backup.sh +++ b/lgsm/functions/command_backup.sh @@ -99,16 +99,17 @@ fn_backup_migrate_olddir() { fn_script_log_info "${rootdir}/backups > ${backupdir}" mv "${rootdir}/backups/"* "${backupdir}" 2> /dev/null exitcode=$? - if [ "${exitcode}" -eq 0 ]; then + if [ "${exitcode}" == 0 ]; then rmdir "${rootdir}/backups" 2> /dev/null exitcode=$? fi - if [ "${exitcode}" -eq 0 ]; then - fn_print_ok_nl "Backup directory is being migrated" - fn_script_log_pass "Backup directory is being migrated" - else + if [ "${exitcode}" != 0 ]; then fn_print_error_nl "Backup directory is being migrated" fn_script_log_error "Backup directory is being migrated" + else + + fn_print_ok_nl "Backup directory is being migrated" + fn_script_log_pass "Backup directory is being migrated" fi fi fi diff --git a/lgsm/functions/command_check_update.sh b/lgsm/functions/command_check_update.sh index 59b29d6e9..3753c72c6 100755 --- a/lgsm/functions/command_check_update.sh +++ b/lgsm/functions/command_check_update.sh @@ -14,16 +14,26 @@ fn_print_dots "" check.sh core_logs.sh -if [ "${appid}" ]; then - core_steamcmd.sh - - check_steamcmd.sh - - fn_update_steamcmd_localbuild - fn_update_steamcmd_remotebuild - fn_update_steamcmd_compare -elif [ "${shortname}" == "ts3" ]; then +if [ "${shortname}" == "ts3" ]; then update_ts3.sh +elif [ "${shortname}" == "mc" ]; then + update_minecraft.sh +elif [ "${shortname}" == "mcb" ]; then + update_minecraft_bedrock.sh +elif [ "${shortname}" == "pmc" ] || [ "${shortname}" == "vpmc" ] || [ "${shortname}" == "wmc" ]; then + update_papermc.sh +elif [ "${shortname}" == "fctr" ]; then + update_factorio.sh +elif [ "${shortname}" == "mta" ]; then + update_mta.sh +elif [ "${shortname}" == "jk2" ]; then + update_jediknight2.sh +elif [ "${shortname}" == "vints" ]; then + update_vintagestory.sh +elif [ "${shortname}" == "ut99" ]; then + update_ut99.sh +else + update_steamcmd.sh fi core_exit.sh diff --git a/lgsm/functions/command_install_resources_mta.sh b/lgsm/functions/command_install_resources_mta.sh index 15f5be22f..daf039551 100755 --- a/lgsm/functions/command_install_resources_mta.sh +++ b/lgsm/functions/command_install_resources_mta.sh @@ -12,7 +12,7 @@ fn_firstcommand_set fn_install_resources() { echo -e "" - echo -e "Installing Default Resources" + echo -e "${lightyellow}Installing Default Resources${default}" echo -e "=================================" fn_fetch_file "http://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip" "" "" "" "${tmpdir}" "mtasa-resources-latest.zip" "nochmodx" "norun" "noforce" "nohash" fn_dl_extract "${tmpdir}" "mtasa-resources-latest.zip" "${resourcesdir}" @@ -30,5 +30,3 @@ else fn_print_warning_nl "Default resources are not installed when using ./${selfname} auto-install." fn_print_information_nl "To install default resources use ./${selfname} install" fi - -core_exit.sh diff --git a/lgsm/functions/command_mods_update.sh b/lgsm/functions/command_mods_update.sh index c2f7b42b5..80b23fea9 100755 --- a/lgsm/functions/command_mods_update.sh +++ b/lgsm/functions/command_mods_update.sh @@ -27,8 +27,8 @@ fn_remove_cfg_files() { filetopreserve=$(echo -e "${modkeepfiles}" | awk -F ';' -v x=${preservefilesindex} '{ print $x }') echo -e " * serverfiles/${filetopreserve}" # If it matches an existing file that have been extracted delete the file. - if [ -f "${extractdir}/${filetopreserve}" ] || [ -d "${extractdir}/${filetopreserve}" ]; then - rm -r "${extractdir:?}/${filetopreserve}" + if [ -f "${extractdest}/${filetopreserve}" ] || [ -d "${extractdest}/${filetopreserve}" ]; then + rm -r "${extractdest:?}/${filetopreserve}" # Write the file path in a tmp file, to rebuild a full file list as it is rebuilt upon update. if [ ! -f "${modsdir}/.removedfiles.tmp" ]; then touch "${modsdir}/.removedfiles.tmp" diff --git a/lgsm/functions/command_update.sh b/lgsm/functions/command_update.sh index ccf26322e..ae5c2065c 100755 --- a/lgsm/functions/command_update.sh +++ b/lgsm/functions/command_update.sh @@ -31,6 +31,8 @@ elif [ "${shortname}" == "jk2" ]; then update_jediknight2.sh elif [ "${shortname}" == "vints" ]; then update_vintagestory.sh +elif [ "${shortname}" == "ut99" ]; then + update_ut99.sh else update_steamcmd.sh fi diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index 2e6db690e..d19425ac5 100755 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -14,8 +14,8 @@ # hash: Optional, set an hash sum and will compare it against the file. # # Downloads can be defined in code like so: -# fn_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}" -# fn_fetch_file "http://example.com/file.tar.bz2" "/some/dir" "file.tar.bz2" "chmodx" "run" "forcedl" "10cd7353aa9d758a075c600a6dd193fd" +# fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}" +# fn_fetch_file "http://example.com/file.tar.bz2" "http://example.com/file2.tar.bz2" "file.tar.bz2" "file2.tar.bz2" "/some/dir" "file.tar.bz2" "chmodx" "run" "forcedl" "10cd7353aa9d758a075c600a6dd193fd" functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" @@ -124,7 +124,7 @@ fn_dl_steamcmd() { echo -en "Please provide content log to LinuxGSM developers https://linuxgsm.com/steamcmd-error" fn_script_log_error "${commandaction} ${selfname}: ${remotelocation}: Unknown error occured" fi - elif [ "${exitcode}" != "0" ]; then + elif [ "${exitcode}" != 0 ]; then fn_print_error2_nl "${commandaction} ${selfname}: ${remotelocation}: Exit code: ${exitcode}" fn_script_log_error "${commandaction} ${selfname}: ${remotelocation}: Exit code: ${exitcode}" else @@ -146,12 +146,12 @@ fn_clear_tmp() { if [ -d "${tmpdir}" ]; then rm -rf "${tmpdir:?}/"* local exitcode=$? - if [ "${exitcode}" == 0 ]; then - fn_print_ok_eol_nl - fn_script_log_pass "clearing LinuxGSM tmp directory" - else + if [ "${exitcode}" != 0 ]; then fn_print_error_eol_nl fn_script_log_error "clearing LinuxGSM tmp directory" + else + fn_print_ok_eol_nl + fn_script_log_pass "clearing LinuxGSM tmp directory" fi fi } @@ -202,31 +202,56 @@ fn_dl_hash() { # Extracts bzip2, gzip or zip files. # Extracts can be defined in code like so: -# fn_dl_extract "${local_filedir}" "${local_filename}" "${extractdir}" +# fn_dl_extract "${local_filedir}" "${local_filename}" "${extractdest}" "${extractsrc}" # fn_dl_extract "/home/gameserver/lgsm/tmp" "file.tar.bz2" "/home/gamserver/serverfiles" fn_dl_extract() { local_filedir="${1}" local_filename="${2}" - extractdir="${3}" + extractdest="${3}" + extractsrc="${4}" # Extracts archives. echo -en "extracting ${local_filename}..." - mime=$(file -b --mime-type "${local_filedir}/${local_filename}") - if [ ! -d "${extractdir}" ]; then - mkdir "${extractdir}" + + if [ ! -d "${extractdest}" ]; then + mkdir "${extractdest}" + fi + if [ ! -f "${local_filedir}/${local_filename}" ]; then + fn_print_fail_eol_nl + echo -en "file ${local_filedir}/${local_filename} not found" + fn_script_log_fatal "Extracting ${local_filename}" + fn_script_log_fatal "File ${local_filedir}/${local_filename} not found" + core_exit.sh fi + mime=$(file -b --mime-type "${local_filedir}/${local_filename}") if [ "${mime}" == "application/gzip" ] || [ "${mime}" == "application/x-gzip" ]; then - extractcmd=$(tar -zxf "${local_filedir}/${local_filename}" -C "${extractdir}") + if [ -n "${extractsrc}" ]; then + extractcmd=$(tar -zxf "${local_filedir}/${local_filename}" -C "${extractdest}" --strip-components=1 "${extractsrc}") + else + extractcmd=$(tar -zxf "${local_filedir}/${local_filename}" -C "${extractdest}") + fi elif [ "${mime}" == "application/x-bzip2" ]; then - extractcmd=$(tar -jxf "${local_filedir}/${local_filename}" -C "${extractdir}") + if [ -n "${extractsrc}" ]; then + extractcmd=$(tar -jxf "${local_filedir}/${local_filename}" -C "${extractdest}" --strip-components=1 "${extractsrc}") + else + extractcmd=$(tar -jxf "${local_filedir}/${local_filename}" -C "${extractdest}") + fi elif [ "${mime}" == "application/x-xz" ]; then - extractcmd=$(tar -xf "${local_filedir}/${local_filename}" -C "${extractdir}") + if [ -n "${extractsrc}" ]; then + extractcmd=$(tar -Jxf "${local_filedir}/${local_filename}" -C "${extractdest}" --strip-components=1 "${extractsrc}") + else + extractcmd=$(tar -Jxf "${local_filedir}/${local_filename}" -C "${extractdest}") + fi elif [ "${mime}" == "application/zip" ]; then - extractcmd=$(unzip -qo -d "${extractdir}" "${local_filedir}/${local_filename}") + if [ -n "${extractsrc}" ]; then + extractcmd=$(unzip -qoj -d "${extractdest}" "${local_filedir}/${local_filename}" "${extractsrc}"/*) + else + extractcmd=$(unzip -qo -d "${extractdest}" "${local_filedir}/${local_filename}") + fi fi local exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Extracting download" + fn_script_log_fatal "Extracting ${local_filename}" if [ -f "${lgsmlog}" ]; then echo -e "${extractcmd}" >> "${lgsmlog}" fi @@ -234,7 +259,7 @@ fn_dl_extract() { core_exit.sh else fn_print_ok_eol_nl - fn_script_log_pass "Extracting download" + fn_script_log_pass "Extracting ${local_filename}" fi } @@ -360,21 +385,21 @@ fn_fetch_file() { trap fn_fetch_trap INT # Larger files show a progress bar. if [ "${local_filename##*.}" == "bz2" ] || [ "${local_filename##*.}" == "gz" ] || [ "${local_filename##*.}" == "zip" ] || [ "${local_filename##*.}" == "jar" ] || [ "${local_filename##*.}" == "xz" ]; then - echo -en "downloading ${local_filename}..." + echo -e "downloading ${local_filename}..." fn_sleep_time - echo -en "\033[1K" curlcmd=$(curl --connect-timeout 10 --progress-bar --fail -L -o "${local_filedir}/${local_filename}" "${fileurl}") + local exitcode=$? echo -en "downloading ${local_filename}..." else + curlcmd=$(curl --connect-timeout 10 -s --fail -L -o "${local_filedir}/${local_filename}" "${fileurl}") + local exitcode=$? echo -en "fetching ${fileurl_name} ${local_filename}...\c" - curlcmd=$(curl --connect-timeout 10 -s --fail -L -o "${local_filedir}/${local_filename}" "${fileurl}" 2>&1) fi - local exitcode=$? # Download will fail if downloads a html file. if [ -f "${local_filedir}/${local_filename}" ]; then - if [ -n "$(head "${local_filedir}/${local_filename}" | grep "DOCTYPE")" ]; then - rm -f "${local_filedir:?}/${local_filename:?}" + if head -n 1 "${local_filedir}/${local_filename}" | grep -q "DOCTYPE"; then + rm "${local_filedir:?}/${local_filename:?}" local exitcode=2 fi fi @@ -384,22 +409,21 @@ fn_fetch_file() { if [ ${counter} -ge 2 ]; then fn_print_fail_eol_nl if [ -f "${lgsmlog}" ]; then - fn_script_log_fatal "Downloading ${local_filename}" + fn_script_log_fatal "Downloading ${local_filename}..." fn_script_log_fatal "${fileurl}" fi core_exit.sh else fn_print_error_eol_nl if [ -f "${lgsmlog}" ]; then - fn_script_log_error "Downloading ${local_filename}" + fn_script_log_error "Downloading ${local_filename}..." fn_script_log_error "${fileurl}" fi fi else - fn_print_ok_eol - echo -en "\033[2K\\r" + fn_print_ok_eol_nl if [ -f "${lgsmlog}" ]; then - fn_script_log_pass "Downloading ${local_filename}" + fn_script_log_pass "Downloading ${local_filename}..." fi # Make file executable if chmodx is set. diff --git a/lgsm/functions/core_exit.sh b/lgsm/functions/core_exit.sh index 2d2f5b8fa..95d9d8cae 100755 --- a/lgsm/functions/core_exit.sh +++ b/lgsm/functions/core_exit.sh @@ -25,7 +25,7 @@ fi if [ "${exitbypass}" ]; then unset exitbypass -elif [ "${exitcode}" ] && [ "${exitcode}" != "0" ]; then +elif [ "${exitcode}" != "0" ]; then # List LinuxGSM version in logs fn_script_log_info "LinuxGSM version: ${version}" if [ "${exitcode}" == "1" ]; then diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index bca5debf9..6ab24b78b 100755 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -680,6 +680,11 @@ update_vintagestory.sh() { fn_fetch_function } +update_ut99.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + fn_update_functions.sh() { functionfile="${FUNCNAME[0]}" fn_fetch_function diff --git a/lgsm/functions/core_getopt.sh b/lgsm/functions/core_getopt.sh index fdd66ab3f..808fe2e2a 100755 --- a/lgsm/functions/core_getopt.sh +++ b/lgsm/functions/core_getopt.sh @@ -65,8 +65,8 @@ currentopt+=("${cmd_update_linuxgsm[@]}") # Exclude noupdate games here. if [ "${shortname}" == "jk2" ] || [ "${engine}" != "idtech3" ]; then - if [ "${shortname}" != "bf1942" ] && [ "${shortname}" != "bfv" ] && [ "${engine}" != "idtech2" ] && [ "${engine}" != "iw2.0" ] && [ "${engine}" != "iw3.0" ] && [ "${engine}" != "quake" ] && [ "${shortname}" != "samp" ] && [ "${shortname}" != "ut2k4" ] && [ "${shortname}" != "ut99" ]; then - currentopt+=("${cmd_update[@]}") + if [ "${shortname}" != "bf1942" ] && [ "${shortname}" != "bfv" ] && [ "${engine}" != "idtech2" ] && [ "${engine}" != "iw2.0" ] && [ "${engine}" != "iw3.0" ] && [ "${engine}" != "quake" ] && [ "${shortname}" != "samp" ] && [ "${shortname}" != "ut2k4" ]; then + currentopt+=("${cmd_update[@]}" "${cmd_check_update[@]}") # force update for SteamCMD or Multi Theft Auto only. if [ "${appid}" ] || [ "${shortname}" == "mta" ]; then currentopt+=("${cmd_force_update[@]}") @@ -75,8 +75,8 @@ if [ "${shortname}" == "jk2" ] || [ "${engine}" != "idtech3" ]; then fi # Validate and check-update command. -if [ "${appid}" ] || [ "${shortname}" == "ts3" ]; then - currentopt+=("${cmd_validate[@]}" "${cmd_check_update[@]}") +if [ "${appid}" ]; then + currentopt+=("${cmd_validate[@]}") fi # Backup. @@ -102,10 +102,12 @@ if [ "${shortname}" == "ts3" ]; then currentopt+=("${cmd_change_password[@]}") fi -# Unreal exclusive. +# Rust exclusive. if [ "${shortname}" == "rust" ]; then currentopt+=("${cmd_fullwipe[@]}" "${cmd_mapwipe[@]}") fi + +# Unreal exclusive. if [ "${engine}" == "unreal2" ]; then if [ "${shortname}" == "ut2k4" ]; then currentopt+=("${cmd_install_cdkey[@]}" "${cmd_map_compressor_u2[@]}") diff --git a/lgsm/functions/core_steamcmd.sh b/lgsm/functions/core_steamcmd.sh index 9d54cfde1..119748fb7 100755 --- a/lgsm/functions/core_steamcmd.sh +++ b/lgsm/functions/core_steamcmd.sh @@ -14,7 +14,7 @@ fn_install_steamcmd() { if [ ! -d "${steamcmddir}" ]; then mkdir -p "${steamcmddir}" fi - fn_fetch_file "http://media.steampowered.com/client/steamcmd_linux.tar.gz" "" "" "" "${tmpdir}" "steamcmd_linux.tar.gz" "" "norun" "noforce" "nohash" + fn_fetch_file "http://media.steampowered.com/client/steamcmd_linux.tar.gz" "" "" "" "${tmpdir}" "steamcmd_linux.tar.gz" "nochmodx" "norun" "noforce" "nohash" fn_dl_extract "${tmpdir}" "steamcmd_linux.tar.gz" "${steamcmddir}" chmod +x "${steamcmddir}/steamcmd.sh" } @@ -157,9 +157,9 @@ fn_update_steamcmd_localbuild() { fi # Checks if localbuild variable has been set. - if [ -z "${localbuild}" ] || [ "${localbuild}" == "null" ]; then - fn_print_fail "Checking local build: ${remotelocation}" - fn_script_log_fatal "Checking local build" + if [ -z "${localbuild}" ]; then + fn_print_fail "Checking local build: ${remotelocation}: missing local build info" + fn_script_log_fatal "Missing local build info" core_exit.sh else fn_print_ok "Checking local build: ${remotelocation}" @@ -168,7 +168,7 @@ fn_update_steamcmd_localbuild() { } fn_update_steamcmd_remotebuild() { - # Gets remote build info. + # Get remote build info. if [ -d "${steamcmddir}" ]; then cd "${steamcmddir}" || exit fi @@ -179,12 +179,12 @@ fn_update_steamcmd_remotebuild() { fi # password for branch not needed to check the buildid - remotebuild=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed -e '/"branches"/,/^}/!d' | sed -n "/\"${branch}\"/,/}/p" | grep -m 1 buildid | tr -cd '[:digit:]') + remotebuildversion=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed -e '/"branches"/,/^}/!d' | sed -n "/\"${branch}\"/,/}/p" | grep -m 1 buildid | tr -cd '[:digit:]') if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" - # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then + # Checks if remotebuildversion variable has been set. + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" fn_script_log_fatal "Checking remote build" core_exit.sh @@ -194,7 +194,7 @@ fn_update_steamcmd_remotebuild() { fi else # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_failure "Unable to get remote build" fn_script_log_fatal "Unable to get remote build" core_exit.sh @@ -204,12 +204,12 @@ fn_update_steamcmd_remotebuild() { fn_update_steamcmd_compare() { fn_print_dots "Checking for update: ${remotelocation}" - if [ "${localbuild}" != "${remotebuild}" ]; then + if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" echo -e "Update available" echo -e "* Local build: ${red}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" if [ -n "${branch}" ]; then echo -e "* Branch: ${branch}" fi @@ -220,14 +220,14 @@ fn_update_steamcmd_compare() { echo -en "\n" fn_script_log_info "Update available" fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" if [ -n "${branch}" ]; then fn_script_log_info "Branch: ${branch}" fi if [ -n "${betapassword}" ]; then fn_script_log_info "Branch password: ${betapassword}" fi - fn_script_log_info "${localbuild} > ${remotebuild}" + fn_script_log_info "${localbuild} > ${remotebuildversion}" if [ "${commandname}" == "UPDATE" ]; then unset updateonstart @@ -246,8 +246,8 @@ fn_update_steamcmd_compare() { exitbypass=1 command_start.sh fn_firstcommand_reset - unset exitbypass fi + unset exitbypass date +%s > "${lockdir}/lastupdate.lock" alert="update" elif [ "${commandname}" == "CHECK-UPDATE" ]; then @@ -259,7 +259,7 @@ fn_update_steamcmd_compare() { echo -en "\n" echo -e "No update available" echo -e "* Local build: ${green}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" if [ -n "${branch}" ]; then echo -e "* Branch: ${branch}" fi @@ -270,7 +270,7 @@ fn_update_steamcmd_compare() { echo -en "\n" fn_script_log_info "No update available" fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" if [ -n "${branch}" ]; then fn_script_log_info "Branch: ${branch}" fi diff --git a/lgsm/functions/fix.sh b/lgsm/functions/fix.sh index b0e9396cc..60a96059d 100755 --- a/lgsm/functions/fix.sh +++ b/lgsm/functions/fix.sh @@ -17,7 +17,7 @@ fn_fix_msg_start() { fn_fix_msg_start_nl() { fn_print_dots "Applying ${fixname} fix: ${gamename}" - fn_print_info "Applying ${fixname} fix: ${gamename}" + fn_print_info_nl "Applying ${fixname} fix: ${gamename}" fn_script_log_info "Applying ${fixname} fix: ${gamename}" } diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index 4a1256431..f5dc108da 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -2551,10 +2551,10 @@ if [ ! -f "${tmpdir}/extip.txt" ]; then extip="$(curl --connect-timeout 10 -s https://api.ipify.org 2> /dev/null)" exitcode=$? # if curl passes add extip to externalip.txt - if [ "${exitcode}" == "0" ]; then - echo "${extip}" > "${tmpdir}/extip.txt" - else + if [ "${exitcode}" != "0" ]; then echo "Unable to get external IP address" + else + echo "${extip}" > "${tmpdir}/extip.txt" fi else extip="$(cat "${tmpdir}/extip.txt")" diff --git a/lgsm/functions/install_eula.sh b/lgsm/functions/install_eula.sh index 5b8b4db5d..3e51fac71 100755 --- a/lgsm/functions/install_eula.sh +++ b/lgsm/functions/install_eula.sh @@ -31,11 +31,9 @@ if [ -z "${autoinstall}" ]; then fi elif [ "${commandname}" == "START" ]; then fn_print_info "By continuing you are indicating your agreement to the EULA." - echo -e "" sleep 5 else echo -e "By using auto-install you are indicating your agreement to the EULA." - echo -e "" sleep 5 fi diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index c98986685..9316d6efd 100755 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -233,6 +233,9 @@ elif [ "${shortname}" == "jk2" ]; then update_jediknight2.sh elif [ "${shortname}" == "vints" ]; then update_vintagestory.sh +elif [ "${shortname}" == "ut99" ]; then + fn_install_server_files + update_ut99.sh elif [ -z "${appid}" ] || [ "${shortname}" == "ahl" ] || [ "${shortname}" == "bb" ] || [ "${shortname}" == "ns" ] || [ "${shortname}" == "sfc" ] || [ "${shortname}" == "ts" ] || [ "${shortname}" == "vs" ] || [ "${shortname}" == "zmr" ]; then if [ "${shortname}" == "ut" ]; then install_eula.sh diff --git a/lgsm/functions/install_ts3db.sh b/lgsm/functions/install_ts3db.sh index e394296de..ed879cd28 100755 --- a/lgsm/functions/install_ts3db.sh +++ b/lgsm/functions/install_ts3db.sh @@ -12,13 +12,13 @@ fn_install_ts3db_mariadb() { echo -e "copying libmariadb.so.2...\c" cp "${serverfiles}/redist/libmariadb.so.2" "${serverfiles}" local exitcode=$? - if [ "${exitcode}" == "0" ]; then - fn_print_ok_eol_nl - fn_script_log_pass "copying libmariadb.so.2" - else + if [ "${exitcode}" != "0" ]; then fn_print_fail_eol_nl fn_script_log_fatal "copying libmariadb.so.2" core_exit.sh + else + fn_print_ok_eol_nl + fn_script_log_pass "copying libmariadb.so.2" fi fi @@ -64,7 +64,7 @@ fi install_eula.sh echo -e "" -echo -e "${lightyellow}Getting privilege key${default}" +echo -e "${lightyellow}Getting Privilege Key${default}" echo -e "=================================" fn_sleep_time fn_print_information_nl "Save these details for later." diff --git a/lgsm/functions/mods_core.sh b/lgsm/functions/mods_core.sh index e79ceb9ad..8e4ade771 100755 --- a/lgsm/functions/mods_core.sh +++ b/lgsm/functions/mods_core.sh @@ -10,7 +10,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Files and Directories. modsdir="${lgsmdir}/mods" modstmpdir="${modsdir}/tmp" -extractdir="${modstmpdir}/extract" +extractdest="${modstmpdir}/extract" modsinstalledlist="installed-mods.txt" modsinstalledlistfullpath="${modsdir}/${modsinstalledlist}" @@ -25,10 +25,10 @@ fn_mod_install_files() { fn_script_log_fatal "An issue occurred downloading ${modprettyname}" core_exit.sh fi - if [ ! -d "${extractdir}" ]; then - mkdir -p "${extractdir}" + if [ ! -d "${extractdest}" ]; then + mkdir -p "${extractdest}" fi - fn_dl_extract "${modstmpdir}" "${modfilename}" "${extractdir}" + fn_dl_extract "${modstmpdir}" "${modfilename}" "${extractdest}" } # Convert mod files to lowercase if needed. @@ -39,9 +39,9 @@ fn_mod_lowercase() { fn_sleep_time fn_script_log_info "Converting ${modprettyname} files to lowercase" # Total files and directories for the mod, to output to the user - fileswc=$(find "${extractdir}" | wc -l) + fileswc=$(find "${extractdest}" | wc -l) # Total uppercase files and directories for the mod, to output to the user - filesupperwc=$(find "${extractdir}" -name '*[[:upper:]]*' | wc -l) + filesupperwc=$(find "${extractdest}" -name '*[[:upper:]]*' | wc -l) fn_script_log_info "Found ${filesupperwc} uppercase files out of ${fileswc}, converting" echo -en "Found ${filesupperwc} uppercase files out of ${fileswc}, converting..." # Convert files and directories starting from the deepest to prevent issues (-depth argument) @@ -63,7 +63,7 @@ fn_mod_lowercase() { core_exit.sh fi fi - done < <(find "${extractdir}" -depth -name '*[[:upper:]]*') + done < <(find "${extractdest}" -depth -name '*[[:upper:]]*') fn_print_ok_eol_nl fi } @@ -73,7 +73,7 @@ fn_mod_create_filelist() { echo -en "building ${modcommand}-files.txt..." fn_sleep_time # ${modsdir}/${modcommand}-files.txt. - find "${extractdir}" -mindepth 1 -printf '%P\n' > "${modsdir}/${modcommand}-files.txt" + find "${extractdest}" -mindepth 1 -printf '%P\n' > "${modsdir}/${modcommand}-files.txt" local exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl @@ -93,7 +93,7 @@ fn_mod_create_filelist() { fn_mod_copy_destination() { echo -en "copying ${modprettyname} to ${modinstalldir}..." fn_sleep_time - cp -Rf "${extractdir}/." "${modinstalldir}/" + cp -Rf "${extractdest}/." "${modinstalldir}/" local exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl diff --git a/lgsm/functions/update_factorio.sh b/lgsm/functions/update_factorio.sh index 2c8bf0d01..548d53b15 100644 --- a/lgsm/functions/update_factorio.sh +++ b/lgsm/functions/update_factorio.sh @@ -7,47 +7,44 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_update_factorio_dl() { - fn_fetch_file "https://factorio.com/get-download/${downloadbranch}/headless/${factorioarch}" "" "" "" "${tmpdir}" "factorio_headless_${factorioarch}-${remotebuild}.tar.xz" "" "norun" "noforce" "nohash" - fn_dl_extract "${tmpdir}" "factorio_headless_${factorioarch}-${remotebuild}.tar.xz" "${tmpdir}" - echo -e "copying to ${serverfiles}...\c" - cp -R "${tmpdir}/factorio/"* "${serverfiles}" - local exitcode=$? - if [ "${exitcode}" == "0" ]; then - fn_print_ok_eol_nl - fn_script_log_pass "Copying to ${serverfiles}" - fn_clear_tmp - else - fn_print_fail_eol_nl - fn_script_log_fatal "Copying to ${serverfiles}" - core_exit.sh - fn_clear_tmp - fi +fn_update_dl() { + # Download and extract files to serverfiles + fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "nohash" + fn_dl_extract "${tmpdir}" "factorio_headless_${factorioarch}-${remotebuildversion}.tar.xz" "${serverfiles}" "factorio" + fn_clear_tmp } -fn_update_factorio_localbuild() { +fn_update_localbuild() { # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" - # Uses executable to find local build. - cd "${executabledir}" || exit - if [ -f "${executable}" ]; then + # Uses executable to get local build. + if [ -d "${exutabledir}" ]; then + cd "${executabledir}" || exit localbuild=$(${executable} --version | grep "Version:" | awk '{print $2}') - fn_print_ok "Checking for update: ${remotelocation}: checking local build" - fn_script_log_pass "Checking local build" - else + fi + if [ -z "${localbuild}" ]; then + fn_print_error "Checking local build: ${remotelocation}: missing local build info" + fn_script_log_error "Missing local build info" + fn_script_log_error "Set localbuild to 0" localbuild="0" - fn_print_error "Checking for update: ${remotelocation}: checking local build" - fn_script_log_error "Checking local build" + else + fn_print_ok "Checking local build: ${remotelocation}" + fn_script_log_pass "Checking local build" fi } -fn_update_factorio_remotebuild() { - # Gets remote build info. - remotebuild=$(curl -s "https://factorio.com/get-download/${downloadbranch}/headless/${factorioarch}" | grep -o '[0-9]\.[0-9]\{1,\}\.[0-9]\{1,\}' | head -1) +fn_update_remotebuild() { + # Get 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) + remotebuildurl="https://factorio.com/get-download/${branch}/headless/${factorioarch}" + remotebuildfilename="factorio_headless_${factorioarch}-${remotebuildversion}.tar.xz" + if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" - # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then + # Checks if remotebuildversion variable has been set. + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" fn_script_log_fatal "Checking remote build" core_exit.sh @@ -57,7 +54,7 @@ fn_update_factorio_remotebuild() { fi else # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_failure "Unable to get remote build" fn_script_log_fatal "Unable to get remote build" core_exit.sh @@ -65,101 +62,107 @@ fn_update_factorio_remotebuild() { fi } -fn_update_factorio_compare() { +fn_update_compare() { fn_print_dots "Checking for update: ${remotelocation}" - # Removes dots so if statement can compare version numbers. - fn_print_dots "Checking for update: ${remotelocation}" - localbuilddigit=$(echo -e "${localbuild}" | tr -cd '[:digit:]') - remotebuilddigit=$(echo -e "${remotebuild}" | tr -cd '[:digit:]') - if [ "${localbuilddigit}" -ne "${remotebuilddigit}" ] || [ "${forceupdate}" == "1" ]; then + if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" echo -e "Update available" echo -e "* Local build: ${red}${localbuild} ${factorioarch}${default}" - echo -e "* Remote build: ${green}${remotebuild} ${factorioarch}${default}" + echo -e "* Remote build: ${green}${remotebuildversion} ${factorioarch}${default}" if [ -n "${branch}" ]; then echo -e "* Branch: ${branch}" fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi echo -en "\n" fn_script_log_info "Update available" fn_script_log_info "Local build: ${localbuild} ${factorioarch}" - fn_script_log_info "Remote build: ${remotebuild} ${factorioarch}" - if [ -v "${branch}" ]; then + fn_script_log_info "Remote build: ${remotebuildversion} ${factorioarch}" + if [ -n "${branch}" ]; then fn_script_log_info "Branch: ${branch}" fi - fn_script_log_info "${localbuild} > ${remotebuild}" + fn_script_log_info "${localbuild} > ${remotebuildversion}" - unset updateonstart - check_status.sh - # If server stopped. - if [ "${status}" == "0" ]; then - exitbypass=1 - fn_update_factorio_dl - if [ "${requirerestart}" == "1" ]; then + if [ "${commandname}" == "UPDATE" ]; then + unset updateonstart + check_status.sh + # If server stopped. + if [ "${status}" == "0" ]; then + fn_update_dl + if [ "${localbuild}" == "0" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + sleep 5 + command_stop.sh + fn_firstcommand_reset + fi + # If server started. + else + fn_print_restart_warning exitbypass=1 - command_start.sh + command_stop.sh fn_firstcommand_reset exitbypass=1 - command_stop.sh + fn_update_dl + exitbypass=1 + command_start.sh fn_firstcommand_reset fi - # If server started. - else - fn_print_restart_warning - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - exitbypass=1 - fn_update_factorio_dl - exitbypass=1 - command_start.sh - fn_firstcommand_reset + unset exitbypass + date +%s > "${lockdir}/lastupdate.lock" + alert="update" + elif [ "${commandname}" == "CHECK-UPDATE" ]; then + alert="check-update" fi - unset exitbypass - date +%s > "${lockdir}/lastupdate.lock" - alert="update" alert.sh else fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" echo -e "No update available" echo -e "* Local build: ${green}${localbuild} ${factorioarch}${default}" - echo -e "* Remote build: ${green}${remotebuild} ${factorioarch}${default}" - if [ -v "${branch}" ]; then + echo -e "* Remote build: ${green}${remotebuildversion} ${factorioarch}${default}" + if [ -n "${branch}" ]; then echo -e "* Branch: ${branch}" fi echo -en "\n" fn_script_log_info "No update available" fn_script_log_info "Local build: ${localbuild} ${factorioarch}" - fn_script_log_info "Remote build: ${remotebuild} ${factorioarch}" - if [ -v "${branch}" ]; then + fn_script_log_info "Remote build: ${remotebuildversion} ${factorioarch}" + if [ -n "${branch}" ]; then fn_script_log_info "Branch: ${branch}" fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi fi } -# The location where the builds are checked and downloaded. -remotelocation="factorio.com" - # Game server architecture. factorioarch="linux64" -if [ "${branch}" == "stable" ]; then - downloadbranch="stable" -elif [ "${branch}" == "experimental" ]; then - downloadbranch="latest" -else - downloadbranch="${branch}" -fi +# The location where the builds are checked and downloaded. +remotelocation="factorio.com" if [ "${firstcommandname}" == "INSTALL" ]; then - fn_update_factorio_remotebuild - fn_update_factorio_dl + fn_update_remotebuild + fn_update_dl else fn_print_dots "Checking for update" fn_print_dots "Checking for update: ${remotelocation}" fn_script_log_info "Checking for update: ${remotelocation}" - fn_update_factorio_localbuild - fn_update_factorio_remotebuild - fn_update_factorio_compare + fn_update_localbuild + fn_update_remotebuild + fn_update_compare fi diff --git a/lgsm/functions/update_jediknight2.sh b/lgsm/functions/update_jediknight2.sh index 421bc543f..7560f0158 100644 --- a/lgsm/functions/update_jediknight2.sh +++ b/lgsm/functions/update_jediknight2.sh @@ -3,81 +3,45 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Handles updating of jk2 servers. +# Description: Handles updating of Jedi Knight 2 servers. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_update_jk2_dl() { - fn_fetch_file "https://github.com/mvdevs/jk2mv/releases/download/${remotebuild}/jk2mv-v${remotebuild}-dedicated.zip" "" "" "" "${tmpdir}" "jk2mv-${remotebuild}-dedicated.zip" "" "norun" "noforce" "nohash" - fn_dl_extract "${tmpdir}" "jk2mv-${remotebuild}-dedicated.zip" "${tmpdir}/jk2mv-v${remotebuild}-dedicated" - echo -e "copying to ${serverfiles}...\c" - cp -R "${tmpdir}/jk2mv-v${remotebuild}-dedicated/linux-amd64/jk2mvded"* "${serverfiles}/GameData" - local exitcode=$? - if [ "${exitcode}" == "0" ]; then - fn_print_ok_eol_nl - fn_script_log_pass "Copying to ${serverfiles}" - fn_clear_tmp - else - fn_print_fail_eol_nl - fn_script_log_fatal "Copying to ${serverfiles}" - core_exit.sh - fi +fn_update_dl() { + # Download and extract files to serverfiles + fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "nohash" + fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}/GameData" "linux-amd64" + fn_clear_tmp } -fn_update_jk2_localbuild() { +fn_update_localbuild() { # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" - # Uses log file to gather info. - # Log is generated and cleared on startup but filled on shutdown. - requirerestart=1 - localbuild=$(grep "\"version\"" "${consolelogdir}"/* 2> /dev/null | sed 's/.*://' | awk '{print $1}' | head -n 1) - if [ -z "${localbuild}" ]; then - fn_print_error "Checking local build: ${remotelocation}" - fn_print_error_nl "Checking local build: ${remotelocation}: no log files containing version info" - fn_print_info_nl "Checking local build: ${remotelocation}: forcing server restart" - fn_script_log_error "No log files containing version info" - fn_script_log_info "Forcing server restart" - - check_status.sh - # If server stopped. - if [ "${status}" == "0" ]; then - exitbypass=1 - command_start.sh - fn_firstcommand_reset - sleep 3 - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - # If server started. - else - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - fi - fi - - if [ -z "${localbuild}" ]; then - localbuild=$(grep Version "$(ls -tr "${consolelogdir}"/* 2> /dev/null)" | tail -1 | sed 's/.*Version //') - fi - + # Uses log file to get local build. + localbuild=$(grep "\"version\"" "${consolelogdir}"/* 2> /dev/null | sed 's/.*://' | awk '{print $1}' | head -n 1 | sed 's/v//') if [ -z "${localbuild}" ]; then - localbuild="0" - fn_print_error "Checking local build: ${remotelocation}: waiting for local build: missing local build info" + fn_print_error "Checking local build: ${remotelocation}: missing local build info" fn_script_log_error "Missing local build info" fn_script_log_error "Set localbuild to 0" + localbuild="0" else fn_print_ok "Checking local build: ${remotelocation}" fn_script_log_pass "Checking local build" fi } -fn_update_jk2_remotebuild() { - # Gets remote build info. - remotebuild=$(curl -s "https://api.github.com/repos/mvdevs/jk2mv/releases/latest" | grep dedicated.zip | tail -1 | awk -F"/" '{ print $8 }') +fn_update_remotebuild() { + # Get 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') + remotebuildurl=$(echo "${remotebuildresponse}" | jq -r '.assets[]|select(.browser_download_url | contains("dedicated.zip")) | .browser_download_url') + remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '.tag_name') + if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" - # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then + # Checks if remotebuildversion variable has been set. + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" fn_script_log_fatal "Checking remote build" core_exit.sh @@ -87,7 +51,7 @@ fn_update_jk2_remotebuild() { fi else # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_failure "Unable to get remote build" fn_script_log_fatal "Unable to get remote build" core_exit.sh @@ -95,80 +59,105 @@ fn_update_jk2_remotebuild() { fi } -fn_update_jk2_compare() { - # Removes dots so if statement can compare version numbers. +fn_update_compare() { fn_print_dots "Checking for update: ${remotelocation}" - localbuilddigit=$(echo -e "${localbuild}" | tr -cd '[:digit:]') - remotebuilddigit=$(echo -e "${remotebuild}" | tr -cd '[:digit:]') - if [ "${localbuilddigit}" -ne "${remotebuilddigit}" ] || [ "${forceupdate}" == "1" ]; then + if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" echo -e "Update available" - echo -e "* Local build: ${red}${localbuild} ${jk2arch}${default}" - echo -e "* Remote build: ${green}${remotebuild} ${jk2arch}${default}" + echo -e "* Local build: ${red}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi echo -en "\n" fn_script_log_info "Update available" - fn_script_log_info "Local build: ${localbuild} ${jk2arch}" - fn_script_log_info "Remote build: ${remotebuild} ${jk2arch}" - fn_script_log_info "${localbuild} > ${remotebuild}" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + fn_script_log_info "${localbuild} > ${remotebuildversion}" - unset updateonstart - check_status.sh - # If server stopped. - if [ "${status}" == "0" ]; then - exitbypass=1 - fn_update_jk2_dl - if [ "${requirerestart}" == "1" ]; then + if [ "${commandname}" == "UPDATE" ]; then + unset updateonstart + check_status.sh + # If server stopped. + if [ "${status}" == "0" ]; then + fn_update_dl + if [ "${localbuild}" == "0" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + sleep 5 + command_stop.sh + fn_firstcommand_reset + fi + # If server started. + else + fn_print_restart_warning exitbypass=1 - command_start.sh + command_stop.sh fn_firstcommand_reset exitbypass=1 - command_stop.sh + fn_update_dl + exitbypass=1 + command_start.sh fn_firstcommand_reset fi - # If server started. - else - fn_print_restart_warning - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - exitbypass=1 - fn_update_jk2_dl - exitbypass=1 - command_start.sh - fn_firstcommand_reset + unset exitbypass + date +%s > "${lockdir}/lastupdate.lock" + alert="update" + elif [ "${commandname}" == "CHECK-UPDATE" ]; then + alert="check-update" fi - date +%s > "${lockdir}/lastupdate.lock" - alert="update" alert.sh else fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" echo -e "No update available" - echo -e "* Local build: ${green}${localbuild} ${jk2arch}${default}" - echo -e "* Remote build: ${green}${remotebuild} ${jk2arch}${default}" + echo -e "* Local build: ${green}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi echo -en "\n" fn_script_log_info "No update available" - fn_script_log_info "Local build: ${localbuild} ${jk2arch}" - fn_script_log_info "Remote build: ${remotebuild} ${jk2arch}" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi fi } # The location where the builds are checked and downloaded. -remotelocation="jk2mv.org" - -# Game server architecture. -jk2arch="x64" +remotelocation="github.com" if [ "${firstcommandname}" == "INSTALL" ]; then - fn_update_jk2_remotebuild - fn_update_jk2_dl + fn_update_remotebuild + fn_update_dl else update_steamcmd.sh fn_print_dots "Checking for update" fn_print_dots "Checking for update: ${remotelocation}" fn_script_log_info "Checking for update: ${remotelocation}" - fn_update_jk2_localbuild - fn_update_jk2_remotebuild - fn_update_jk2_compare + fn_update_localbuild + fn_update_remotebuild + fn_update_compare fi diff --git a/lgsm/functions/update_minecraft.sh b/lgsm/functions/update_minecraft.sh index d20b98ef4..ace4713bc 100644 --- a/lgsm/functions/update_minecraft.sh +++ b/lgsm/functions/update_minecraft.sh @@ -3,66 +3,57 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Handles updating of Minecraft servers. +# Description: Handles updating of Minecraft: Java Edition servers. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_update_minecraft_dl() { - # Generate link to version manifest json. - remotebuildlink=$(curl -s "https://launchermeta.${remotelocation}/mc/game/version_manifest.json" | jq -r --arg branch ${branch} --arg mcversion ${remotebuild} '.versions | .[] | select(.type==$branch and .id==$mcversion) | .url') - # Generate link to server.jar - remotebuildurl=$(curl -s "${remotebuildlink}" | jq -r '.downloads.server.url') - - fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "minecraft_server.${remotebuild}.jar" "" "norun" "noforce" "nohash" - echo -e "copying to ${serverfiles}...\c" - cp "${tmpdir}/minecraft_server.${remotebuild}.jar" "${serverfiles}/minecraft_server.jar" - local exitcode=$? - if [ "${exitcode}" == "0" ]; then - fn_print_ok_eol_nl - fn_script_log_pass "Copying to ${serverfiles}" - chmod u+x "${serverfiles}/minecraft_server.jar" - fn_clear_tmp - else - fn_print_fail_eol_nl - fn_script_log_fatal "Copying to ${serverfiles}" - fn_clear_tmp - core_exit.sh - fi +fn_update_dl() { + # Download and extract files to serverfiles + fn_fetch_file "${remotebuildurl}" "" "" "" "${serverfiles}" "minecraft_server.jar" "chmodx" "norun" "noforce" "nohash" } -fn_update_minecraft_localbuild() { +fn_update_localbuild() { # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" - # Uses executable to find local build. - cd "${executabledir}" || exit - if [ -f "minecraft_server.jar" ]; then + # Uses executable to get local build. + if [ -d "${exutabledir}" ]; then + cd "${executabledir}" || exit localbuild=$(unzip -p "minecraft_server.jar" version.json | jq -r '.id') + fi + if [ -z "${localbuild}" ]; then + fn_print_error "Checking local build: ${remotelocation}: missing local build info" + fn_script_log_error "Missing local build info" + fn_script_log_error "Set localbuild to 0" + localbuild="0" + else fn_print_ok "Checking local build: ${remotelocation}" fn_script_log_pass "Checking local build" - else - localbuild="0" - fn_print_error "Checking local build: ${remotelocation}" - fn_script_log_error "Checking local build" fi } -fn_update_minecraft_remotebuild() { - # Gets remote build info. +fn_update_remotebuild() { + # Get remote build info. + apiurl="https://launchermeta.mojang.com/mc/game/version_manifest.json" + remotebuildresponse=$(curl -s "${apiurl}") # Latest release. if [ "${branch}" == "release" ] && [ "${mcversion}" == "latest" ]; then - remotebuild=$(curl -s "https://launchermeta.${remotelocation}/mc/game/version_manifest.json" | jq -r '.latest.release') + remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '.latest.release') # Latest snapshot. elif [ "${branch}" == "snapshot" ] && [ "${mcversion}" == "latest" ]; then - remotebuild=$(curl -s "https://launchermeta.${remotelocation}/mc/game/version_manifest.json" | jq -r '.latest.snapshot') + remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '.latest.snapshot') # Specific release/snapshot. else - remotebuild=$(curl -s "https://launchermeta.${remotelocation}/mc/game/version_manifest.json" | jq -r --arg branch ${branch} --arg mcversion ${mcversion} '.versions | .[] | select(.type==$branch and .id==$mcversion) | .id') + remotebuildversion=$(echo "${remotebuildresponse}" | jq -r --arg branch "${branch}" --arg mcversion "${mcversion}" '.versions | .[] | select(.type==$branch and .id==$mcversion) | .id') fi + # Generate link to version manifest json. + remotebuildmanifest=$(echo "${remotebuildresponse}" | jq -r --arg branch "${branch}" --arg mcversion "${remotebuildversion}" '.versions | .[] | select(.type==$branch and .id==$mcversion) | .url') + # Generate link to server.jar + remotebuildurl=$(curl -s "${remotebuildmanifest}" | jq -r '.downloads.server.url') if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" - # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then + # Checks if remotebuildversion variable has been set. + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" fn_script_log_fatal "Checking remote build" core_exit.sh @@ -72,7 +63,7 @@ fn_update_minecraft_remotebuild() { fi else # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_failure "Unable to get remote build" fn_script_log_fatal "Unable to get remote build" core_exit.sh @@ -80,70 +71,90 @@ fn_update_minecraft_remotebuild() { fi } -fn_update_minecraft_compare() { - # Removes dots so if statement can compare version numbers. +fn_update_compare() { fn_print_dots "Checking for update: ${remotelocation}" - if [ "${localbuild}" != "${remotebuild}" ] || [ "${forceupdate}" == "1" ]; then + if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" echo -e "Update available" echo -e "* Local build: ${red}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" if [ -n "${branch}" ]; then echo -e "* Branch: ${branch}" fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi echo -en "\n" fn_script_log_info "Update available" fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuild}" - fn_script_log_info "${localbuild} > ${remotebuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + fn_script_log_info "${localbuild} > ${remotebuildversion}" - unset updateonstart - check_status.sh - # If server stopped. - if [ "${status}" == "0" ]; then - exitbypass=1 - fn_update_minecraft_dl - if [ "${requirerestart}" == "1" ]; then + if [ "${commandname}" == "UPDATE" ]; then + unset updateonstart + check_status.sh + # If server stopped. + if [ "${status}" == "0" ]; then + fn_update_dl + if [ "${localbuild}" == "0" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + sleep 5 + command_stop.sh + fn_firstcommand_reset + fi + # If server started. + else + fn_print_restart_warning exitbypass=1 - command_start.sh + command_stop.sh fn_firstcommand_reset exitbypass=1 - command_stop.sh + fn_update_dl + exitbypass=1 + command_start.sh fn_firstcommand_reset fi - # If server started. - else - fn_print_restart_warning - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - exitbypass=1 - fn_update_minecraft_dl - exitbypass=1 - command_start.sh - fn_firstcommand_reset + unset exitbypass + date +%s > "${lockdir}/lastupdate.lock" + alert="update" + elif [ "${commandname}" == "CHECK-UPDATE" ]; then + alert="check-update" fi - unset exitbypass - date +%s > "${lockdir}/lastupdate.lock" - alert="update" alert.sh else fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" echo -e "No update available" echo -e "* Local build: ${green}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" if [ -n "${branch}" ]; then echo -e "* Branch: ${branch}" fi echo -en "\n" fn_script_log_info "No update available" fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" if [ -n "${branch}" ]; then fn_script_log_info "Branch: ${branch}" fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi fi } @@ -151,13 +162,13 @@ fn_update_minecraft_compare() { remotelocation="mojang.com" if [ "${firstcommandname}" == "INSTALL" ]; then - fn_update_minecraft_remotebuild - fn_update_minecraft_dl + fn_update_remotebuild + fn_update_dl else fn_print_dots "Checking for update" fn_print_dots "Checking for update: ${remotelocation}" fn_script_log_info "Checking for update: ${remotelocation}" - fn_update_minecraft_localbuild - fn_update_minecraft_remotebuild - fn_update_minecraft_compare + fn_update_localbuild + fn_update_remotebuild + fn_update_compare fi diff --git a/lgsm/functions/update_minecraft_bedrock.sh b/lgsm/functions/update_minecraft_bedrock.sh index 163e076aa..cf61e3a2b 100644 --- a/lgsm/functions/update_minecraft_bedrock.sh +++ b/lgsm/functions/update_minecraft_bedrock.sh @@ -7,90 +7,60 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -#random number for userAgent -randnum=$((1 + RANDOM % 5000)) - -fn_update_minecraft_dl() { - fn_fetch_file "https://minecraft.azureedge.net/bin-linux/bedrock-server-${remotebuild}.zip" "" "" "" "${tmpdir}" "bedrock_server.${remotebuild}.zip" +fn_update_dl() { + fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "bedrock_server.${remotebuildversion}.zip" echo -e "Extracting to ${serverfiles}...\c" if [ "${firstcommandname}" == "INSTALL" ]; then - unzip -oq "${tmpdir}/bedrock_server.${remotebuild}.zip" -x "server.properties" -d "${serverfiles}" + unzip -oq "${tmpdir}/bedrock_server.${remotebuildversion}.zip" -x "server.properties" -d "${serverfiles}" else - unzip -oq "${tmpdir}/bedrock_server.${remotebuild}.zip" -x "permissions.json" "server.properties" "allowlist.json" -d "${serverfiles}" + unzip -oq "${tmpdir}/bedrock_server.${remotebuildversion}.zip" -x "permissions.json" "server.properties" "allowlist.json" -d "${serverfiles}" fi local exitcode=$? - if [ "${exitcode}" == "0" ]; then - fn_print_ok_eol_nl - fn_script_log_pass "Extracting to ${serverfiles}" - chmod u+x "${serverfiles}/bedrock_server" - fn_clear_tmp - else + if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Extracting to ${serverfiles}" - fn_clear_tmp + fn_script_log_fatal "Extracting ${local_filename}" + if [ -f "${lgsmlog}" ]; then + echo -e "${extractcmd}" >> "${lgsmlog}" + fi + echo -e "${extractcmd}" core_exit.sh + else + fn_print_ok_eol_nl + fn_script_log_pass "Extracting ${local_filename}" fi } -fn_update_minecraft_localbuild() { +fn_update_localbuild() { # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" - # Uses log file to gather info. - # Log is generated and cleared on startup but filled on shutdown. - requirerestart=1 - localbuild=$(grep Version "${consolelogdir}"/* 2> /dev/null | tail -1 | sed 's/.*Version //') - if [ -z "${localbuild}" ]; then - fn_print_error "Checking local build: ${remotelocation}" - fn_print_error_nl "Checking local build: ${remotelocation}: no log files containing version info" - fn_print_info_nl "Checking local build: ${remotelocation}: forcing server restart" - fn_script_log_error "No log files containing version info" - fn_script_log_info "Forcing server restart" - - check_status.sh - # If server stopped. - if [ "${status}" == "0" ]; then - exitbypass=1 - command_start.sh - fn_firstcommand_reset - sleep 3 - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - # If server started. - else - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - fi - fi - - if [ -z "${localbuild}" ]; then - localbuild=$(grep Version "$(ls -tr "${consolelogdir}"/* 2> /dev/null)" | tail -1 | sed 's/.*Version //') - fi - + # 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') if [ -z "${localbuild}" ]; then - localbuild="0" - fn_print_error "Checking local build: ${remotelocation}: waiting for local build: missing local build info" + fn_print_error "Checking local build: ${remotelocation}: missing local build info" fn_script_log_error "Missing local build info" fn_script_log_error "Set localbuild to 0" + localbuild="0" else fn_print_ok "Checking local build: ${remotelocation}" fn_script_log_pass "Checking local build" fi } -fn_update_minecraft_remotebuild() { - # Gets remote build info. +fn_update_remotebuild() { + # Random number for userAgent + randnum=$((1 + RANDOM % 5000)) + # Get remote build info. if [ "${mcversion}" == "latest" ]; then - remotebuild=$(curl -H "Accept-Encoding: identity" -H "Accept-Language: en" -Ls -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.${randnum}.212 Safari/537.36" "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*' | sed 's/.*\///' | grep -Eo "[.0-9]+[0-9]") + 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.${randnum}.212 Safari/537.36" "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*' | sed 's/.*\///' | grep -Eo "[.0-9]+[0-9]") else - remotebuild="${mcversion}" + remotebuildversion="${mcversion}" fi + remotebuildurl="https://minecraft.azureedge.net/bin-linux/bedrock-server-${remotebuildversion}.zip" if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" - # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then + # Checks if remotebuildversion variable has been set. + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" fn_script_log_fatal "Checking remote build" core_exit.sh @@ -100,7 +70,7 @@ fn_update_minecraft_remotebuild() { fi else # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_failure "Unable to get remote build" fn_script_log_fatal "Unable to get remote build" core_exit.sh @@ -108,63 +78,90 @@ fn_update_minecraft_remotebuild() { fi } -fn_update_minecraft_compare() { - # Removes dots so if statement can compare version numbers. +fn_update_compare() { fn_print_dots "Checking for update: ${remotelocation}" - localbuilddigit=$(echo -e "${localbuild}" | tr -cd '[:digit:]') - remotebuilddigit=$(echo -e "${remotebuild}" | tr -cd '[:digit:]') - if [ "${localbuilddigit}" -ne "${remotebuilddigit}" ] || [ "${forceupdate}" == "1" ]; then + if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" echo -e "Update available" echo -e "* Local build: ${red}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi echo -en "\n" fn_script_log_info "Update available" fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuild}" - fn_script_log_info "${localbuild} > ${remotebuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + fn_script_log_info "${localbuild} > ${remotebuildversion}" - unset updateonstart - check_status.sh - # If server stopped. - if [ "${status}" == "0" ]; then - exitbypass=1 - fn_update_minecraft_dl - if [ "${requirerestart}" == "1" ]; then + if [ "${commandname}" == "UPDATE" ]; then + unset updateonstart + check_status.sh + # If server stopped. + if [ "${status}" == "0" ]; then + fn_update_dl + if [ "${localbuild}" == "0" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + sleep 5 + command_stop.sh + fn_firstcommand_reset + fi + # If server started. + else + fn_print_restart_warning exitbypass=1 - command_start.sh + command_stop.sh fn_firstcommand_reset exitbypass=1 - command_stop.sh + fn_update_dl + exitbypass=1 + command_start.sh fn_firstcommand_reset fi - # If server started. - else - fn_print_restart_warning - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - exitbypass=1 - fn_update_minecraft_dl - exitbypass=1 - command_start.sh - fn_firstcommand_reset + unset exitbypass + date +%s > "${lockdir}/lastupdate.lock" + alert="update" + elif [ "${commandname}" == "CHECK-UPDATE" ]; then + alert="check-update" fi - unset exitbypass - date +%s > "${lockdir}/lastupdate.lock" - alert="update" alert.sh else fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" echo -e "No update available" echo -e "* Local build: ${green}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi echo -en "\n" fn_script_log_info "No update available" fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi fi } @@ -172,13 +169,13 @@ fn_update_minecraft_compare() { remotelocation="minecraft.net" if [ "${firstcommandname}" == "INSTALL" ]; then - fn_update_minecraft_remotebuild - fn_update_minecraft_dl + fn_update_remotebuild + fn_update_dl else fn_print_dots "Checking for update" fn_print_dots "Checking for update: ${remotelocation}" fn_script_log_info "Checking for update: ${remotelocation}" - fn_update_minecraft_localbuild - fn_update_minecraft_remotebuild - fn_update_minecraft_compare + fn_update_localbuild + fn_update_remotebuild + fn_update_compare fi diff --git a/lgsm/functions/update_mta.sh b/lgsm/functions/update_mta.sh index 61216b809..5252c1328 100644 --- a/lgsm/functions/update_mta.sh +++ b/lgsm/functions/update_mta.sh @@ -7,103 +7,39 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_update_mta_dl() { - fn_fetch_file "http://linux.mtasa.com/dl/multitheftauto_linux_x64.tar.gz" "" "" "" "${tmpdir}" "multitheftauto_linux_x64.tar.gz" "" "norun" "noforce" "nohash" - mkdir "${tmpdir}/multitheftauto_linux_x64" - fn_dl_extract "${tmpdir}" "multitheftauto_linux_x64.tar.gz" "${tmpdir}/multitheftauto_linux_x64" - echo -e "copying to ${serverfiles}...\c" - cp -R "${tmpdir}/multitheftauto_linux_x64/multitheftauto_linux_x64/"* "${serverfiles}" - local exitcode=$? - fn_clear_tmp - if [ "${exitcode}" == "0" ]; then - fn_print_ok_eol_nl - fn_script_log_pass "Copying to ${serverfiles}" - chmod u+x "${serverfiles}/mta-server64" - else - fn_print_fail_eol_nl - fn_script_log_fatal "Copying to ${serverfiles}" - core_exit.sh - fi +fn_update_dl() { + # Download and extract files to tmpdir. + fn_fetch_file "http://linux.mtasa.com/dl/multitheftauto_linux_x64.tar.gz" "" "" "" "${tmpdir}" "multitheftauto_linux_x64.tar.gz" "nochmodx" "norun" "force" "nohash" + fn_dl_extract "${tmpdir}" "multitheftauto_linux_x64.tar.gz" "${serverfiles}" "multitheftauto_linux_x64" } -fn_update_mta_localbuild() { +fn_update_localbuild() { # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" - # Uses log file to gather info. - # Gives time for log file to generate. - requirerestart=1 - if [ ! -f "${serverfiles}/mods/deathmatch/logs/server.log" ]; then - fn_print_error "Checking local build: ${remotelocation}" - fn_print_error_nl "Checking local build: ${remotelocation}: no log files containing version info" - fn_print_info_nl "Checking local build: ${remotelocation}: forcing server restart" - fn_script_log_error "No log files containing version info" - fn_script_log_info "Forcing server restart" - exitbypass=1 - command_stop.sh - exitbypass=1 - command_start.sh - fn_firstcommand_reset - totalseconds=0 - # Check again, allow time to generate logs. - while [ ! -f "${serverfiles}/mods/deathmatch/logs/server.log" ]; do - sleep 1 - fn_print_info "Checking local build: ${remotelocation}: waiting for log file: ${totalseconds}" - if [ -v "${loopignore}" ]; then - loopignore=1 - fn_script_log_info "Waiting for log file to generate" - fi - - if [ "${totalseconds}" -gt "120" ]; then - localbuild="0" - fn_print_error "Checking local build: ${remotelocation}: waiting for log file: missing log file" - fn_script_log_error "Missing log file" - fn_script_log_error "Set localbuild to 0" - fi - - totalseconds=$((totalseconds + 1)) - done - fi - + # Uses log file to get local build. + localbuild=$(grep "= Multi Theft Auto: San Andreas v" "${serverfiles}/mods/deathmatch/logs/server.log" | awk '{ print $7 }' | sed -r 's/^.{1}//' | tail -1) if [ -z "${localbuild}" ]; then - localbuild=$(grep "= Multi Theft Auto: San Andreas v" "${serverfiles}/mods/deathmatch/logs/server.log" | awk '{ print $7 }' | sed -r 's/^.{1}//' | tail -1) - fi - - if [ -z "${localbuild}" ]; then - # Gives time for var to generate. - totalseconds=0 - for seconds in {1..120}; do - fn_print_info "Checking local build: ${remotelocation}: waiting for local build: ${totalseconds}" - if [ -z "${loopignore}" ]; then - loopignore=1 - fn_script_log_info "Waiting for local build to generate" - fi - localbuild=$(grep "= Multi Theft Auto: San Andreas v" "${serverfiles}/mods/deathmatch/logs/server.log" | awk '{ print $7 }' | sed -r 's/^.{1}//' | tail -1) - if [ "${localbuild}" ]; then - break - fi - sleep 1 - totalseconds=$((totalseconds + 1)) - done - fi - - if [ -z "${localbuild}" ]; then - localbuild="0" - fn_print_error "Checking local build: ${remotelocation}: waiting for local build: missing local build info" + fn_print_error "Checking local build: ${remotelocation}: missing local build info" fn_script_log_error "Missing local build info" fn_script_log_error "Set localbuild to 0" + localbuild="0" else fn_print_ok "Checking local build: ${remotelocation}" fn_script_log_pass "Checking local build" fi } -fn_update_mta_remotebuild() { - # Gets remote build info. - remotebuild=$(curl -s "https://api.github.com/repos/multitheftauto/mtasa-blue/releases/latest" | jq -r '.tag_name') +fn_update_remotebuild() { + # Get remote build info. + apiurl="https://api.github.com/repos/multitheftauto/mtasa-blue/releases/latest" + remotebuildresponse=$(curl -s "${apiurl}") + remotebuildfilename=$(echo "${remotebuildresponse}" | jq -r '.assets[]|select(.browser_download_url | contains("Linux-amd64")) | .name') + remotebuildurl=$(echo "${remotebuildresponse}" | jq -r '.assets[]|select(.browser_download_url | contains("Linux-amd64")) | .browser_download_url') + remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '.tag_name') if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" - # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then + # Checks if remotebuildversion variable has been set. + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" fn_script_log_fatal "Checking remote build" core_exit.sh @@ -113,7 +49,7 @@ fn_update_mta_remotebuild() { fi else # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_failure "Unable to get remote build" fn_script_log_fatal "Unable to get remote build" core_exit.sh @@ -121,69 +57,96 @@ fn_update_mta_remotebuild() { fi } -fn_update_mta_compare() { - # Removes dots so if statement can compare version numbers. +fn_update_compare() { fn_print_dots "Checking for update: ${remotelocation}" - localbuilddigit=$(echo -e "${localbuild}" | tr -cd '[:digit:]') - remotebuilddigit=$(echo -e "${remotebuild}" | tr -cd '[:digit:]') - if [ "${localbuilddigit}" -ne "${remotebuilddigit}" ] || [ "${forceupdate}" == "1" ]; then - fn_print_ok_nl "Checking for update: ${remotelocation}" + if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then if [ "${forceupdate}" == "1" ]; then # forceupdate bypasses checks, useful for small build changes mtaupdatestatus="forced" else mtaupdatestatus="available" fi + fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" - echo -e "Update ${mtaupdatestatus}:" + echo -e "Update available" echo -e "* Local build: ${red}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi echo -en "\n" fn_script_log_info "Update available" fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuild}" - fn_script_log_info "${localbuild} > ${remotebuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + fn_script_log_info "${localbuild} > ${remotebuildversion}" - unset updateonstart - check_status.sh - # If server stopped. - if [ "${status}" == "0" ]; then - exitbypass=1 - fn_update_mta_dl - if [ "${requirerestart}" == "1" ]; then + if [ "${commandname}" == "UPDATE" ]; then + unset updateonstart + check_status.sh + # If server stopped. + if [ "${status}" == "0" ]; then + fn_update_dl + if [ "${localbuild}" == "0" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + sleep 5 + command_stop.sh + fn_firstcommand_reset + fi + # If server started. + else + fn_print_restart_warning exitbypass=1 - command_start.sh + command_stop.sh fn_firstcommand_reset exitbypass=1 - command_stop.sh + fn_update_dl + exitbypass=1 + command_start.sh fn_firstcommand_reset fi - # If server started. - else - fn_print_restart_warning - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - exitbypass=1 - fn_update_mta_dl - exitbypass=1 - command_start.sh - fn_firstcommand_reset + unset exitbypass + date +%s > "${lockdir}/lastupdate.lock" + alert="update" + elif [ "${commandname}" == "CHECK-UPDATE" ]; then + alert="check-update" fi - unset exitbypass - date +%s > "${lockdir}/lastupdate.lock" - alert="update" alert.sh else fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" echo -e "No update available" echo -e "* Local build: ${green}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi echo -en "\n" fn_script_log_info "No update available" fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi fi } @@ -191,13 +154,13 @@ fn_update_mta_compare() { remotelocation="linux.mtasa.com" if [ "${firstcommandname}" == "INSTALL" ]; then - fn_update_mta_remotebuild - fn_update_mta_dl + fn_update_remotebuild + fn_update_dl else fn_print_dots "Checking for update" fn_print_dots "Checking for update: ${remotelocation}" fn_script_log_info "Checking for update: ${remotelocation}" - fn_update_mta_localbuild - fn_update_mta_remotebuild - fn_update_mta_compare + fn_update_localbuild + fn_update_remotebuild + fn_update_compare fi diff --git a/lgsm/functions/update_papermc.sh b/lgsm/functions/update_papermc.sh index 302e0baac..f48a66e39 100644 --- a/lgsm/functions/update_papermc.sh +++ b/lgsm/functions/update_papermc.sh @@ -5,115 +5,167 @@ # Website: https://linuxgsm.com # Description: Handles updating of PaperMC and Waterfall servers. -commandname="UPDATE" -commandaction="Update" -function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_update_papermc_dl() { - # get build info - builddata=$(curl -s "https://${remotelocation}/api/v2/projects/${paperproject}/versions/${paperversion}/builds/${remotebuild}" | jq '.downloads') - buildname=$(echo -e "${builddata}" | jq -r '.application.name') - buildsha256=$(echo -e "${builddata}" | jq -r '.application.sha256') - - fn_fetch_file "https://${remotelocation}/api/v2/projects/${paperproject}/versions/${paperversion}/builds/${remotebuild}/downloads/${buildname}" "" "" "" "${tmpdir}" "${buildname}" "nochmodx" "norun" "force" "${buildsha256}" - - echo -e "copying to ${serverfiles}...\c" - cp -f "${tmpdir}/${buildname}" "${serverfiles}/${executable#./}" - local exitcode=$? - if [ "${exitcode}" == "0" ]; then - fn_print_ok_eol_nl - fn_script_log_pass "Copying to ${serverfiles}" - chmod u+x "${serverfiles}/${executable#./}" - echo "${remotebuild}" > "${localversionfile}" - fn_clear_tmp - else - fn_print_fail_eol_nl - fn_script_log_fatal "Copying to ${serverfiles}" - core_exit.sh - fi +fn_update_dl() { + # Download and extract files to serverfiles + fn_fetch_file "${remotebuildurl}" "" "" "" "${serverfiles}" "${executable#./}" "chmodx" "norun" "force" "${remotebuildhash}" + echo "${remotebuildversion}" > "${serverfiles}/build.txt" } -fn_update_papermc_localbuild() { +fn_update_localbuild() { # Gets local build info. - fn_print_dots "Checking for update: ${remotelocation}: checking local build" - sleep 0.5 - - if [ ! -f "${localversionfile}" ]; then - fn_print_error_nl "Checking for update: ${remotelocation}: checking local build: no local build files" - fn_script_log_error "No local build file found" - else - localbuild=$(head -n 1 "${localversionfile}") - fi - + fn_print_dots "Checking local build: ${remotelocation}" + # Uses version file to get local build. + localbuild=$(head -n 1 "${serverfiles}/build.txt") if [ -z "${localbuild}" ]; then + fn_print_error "Checking local build: ${remotelocation}: missing local build info" + fn_script_log_error "Missing local build info" + fn_script_log_error "Set localbuild to 0" localbuild="0" - fn_print_error "Checking for update: ${remotelocation}: waiting for local build: missing local build info" - fn_script_log_error "Missing local build info, Set localbuild to 0" else - fn_print_ok "Checking for update: ${remotelocation}: checking local build" + fn_print_ok "Checking local build: ${remotelocation}" fn_script_log_pass "Checking local build" fi - sleep 0.5 } -fn_update_papermc_remotebuild() { - # Gets remote build info. - remotebuild=$(curl -s "https://${remotelocation}/api/v2/projects/${paperproject}/versions/${paperversion}" | jq -r '.builds[-1]') - - # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then - fn_print_failure "Unable to get remote build" - fn_script_log_fatal "Unable to get remote build" - core_exit.sh +fn_update_remotebuild() { + # Get remote build info. + apiurl="https://papermc.io/api/v2/projects/" + # Get list of projects. + remotebuildresponse=$(curl -s "${apiurl}") + # Get list of Minecraft versions for project. + remotebuildresponseproject=$(curl -s "${apiurl}/${paperproject}") + # Get latest Minecraft: Java Edition version or user specified version. + if [ "${mcversion}" == "latest" ]; then + remotebuildmcversion=$(echo "${remotebuildresponseproject}" | jq -r '.versions[-1]') else - fn_print_ok "Got build for version ${paperversion}" - fn_script_log "Got build for version ${paperversion}" + # Checks if user specified version exists. + remotebuildmcversion=$(echo "${remotebuildresponseproject}" | jq -r -e --arg mcversion "${mcversion}" '.versions[]|select(. == $mcversion)') + if [ -z "${remotebuildmcversion}" ]; then + # user passed version does not exist + fn_print_error_nl "Version ${mcversion} not available from ${remotelocation}" + fn_script_log_error "Version ${mcversion} not available from ${remotelocation}" + core_exit.sh + fi + fi + # Get list of paper builds for specific Minecraft: Java Edition version. + remotebuildresponsemcversion=$(curl -s "${apiurl}/paper/versions/${remotebuildmcversion}") + # Get latest paper build for specific Minecraft: Java Edition version. + remotebuildpaperversion=$(echo "${remotebuildresponsemcversion}" | jq -r '.builds[-1]') + # Get various info about the paper build. + remotebuildresponseversion=$(curl -s "${apiurl}/${paperproject}/versions/${remotebuildmcversion}/builds/${remotebuildpaperversion}") + remotebuildfilename=$(echo "${remotebuildresponseversion}" | jq -r '.downloads.application.name') + remotebuildhash=$(echo "${remotebuildresponseversion}" | jq -r '.downloads.application.sha256') + remotebuildurl="${apiurl}/${paperproject}/versions/${remotebuildmcversion}/builds/${remotebuildpaperversion}/downloads/${remotebuildfilename}" + # Combines Minecraft: Java Edition version and paper build. e.g 1.16.5-456 + remotebuildversion="${remotebuildmcversion}-${remotebuildpaperversion}" + + if [ "${firstcommandname}" != "INSTALL" ]; then + fn_print_dots "Checking remote build: ${remotelocation}" + # Checks if remotebuildversion variable has been set. + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + fn_print_fail "Checking remote build: ${remotelocation}" + fn_script_log_fatal "Checking remote build" + core_exit.sh + else + fn_print_ok "Checking remote build: ${remotelocation}" + fn_script_log_pass "Checking remote build" + fi + else + # Checks if remotebuild variable has been set. + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + fn_print_failure "Unable to get remote build" + fn_script_log_fatal "Unable to get remote build" + core_exit.sh + fi fi } -fn_update_papermc_compare() { +fn_update_compare() { fn_print_dots "Checking for update: ${remotelocation}" - sleep 0.5 - if [ "${localbuild}" != "${remotebuild}" ] || [ "${forceupdate}" == "1" ]; then + if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" - echo -e "Update available for version ${paperversion}" + echo -e "Update available" echo -e "* Local build: ${red}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuild}${default}" - fn_script_log_info "Update available for version ${paperversion}" - fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuild}" - fn_script_log_info "${localbuild} > ${remotebuild}" - echo -en "\n" - echo -en "applying update.\r" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi echo -en "\n" - - unset updateonstart - - check_status.sh - # If server stopped. - if [ "${status}" == "0" ]; then - fn_update_papermc_dl - # If server started. - else - exitbypass=1 - command_stop.sh - exitbypass=1 - fn_update_papermc_dl - exitbypass=1 - command_start.sh + fn_script_log_info "Update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + fn_script_log_info "${localbuild} > ${remotebuildversion}" + + if [ "${commandname}" == "UPDATE" ]; then + unset updateonstart + check_status.sh + # If server stopped. + if [ "${status}" == "0" ]; then + fn_update_dl + if [ "${localbuild}" == "0" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + sleep 5 + command_stop.sh + fn_firstcommand_reset + fi + # If server started. + else + fn_print_restart_warning + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + exitbypass=1 + fn_update_dl + exitbypass=1 + command_start.sh + fn_firstcommand_reset + fi + unset exitbypass + date +%s > "${lockdir}/lastupdate.lock" + alert="update" + elif [ "${commandname}" == "CHECK-UPDATE" ]; then + alert="check-update" fi - alert="update" alert.sh else fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" - echo -e "No update available for version ${paperversion}" + echo -e "No update available" echo -e "* Local build: ${green}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + echo -en "\n" fn_script_log_info "No update available" fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi fi } @@ -128,35 +180,14 @@ elif [ "${shortname}" == "wmc" ]; then paperproject="waterfall" fi -localversionfile="${datadir}/${paperproject}-version" - -# check if datadir was created, if not create it -if [ ! -d "${datadir}" ]; then - mkdir -p "${datadir}" -fi - -# check version if the user did set one and check it -if [ "${mcversion}" == "latest" ]; then - paperversion=$(curl -s "https://${remotelocation}/api/v2/projects/${paperproject}" | jq -r '.versions[-1]') -else - # check if version there for the download from the api - paperversion=$(curl -s "https://${remotelocation}/api/v2/projects/${paperproject}" | jq -r -e --arg mcversion "${mcversion}" '.versions[]|select(. == $mcversion)') - if [ -z "${paperversion}" ]; then - # user passed version does not exist - fn_print_error_nl "Version ${mcversion} not available from ${remotelocation}" - fn_script_log_error "Version ${mcversion} not available from ${remotelocation}" - core_exit.sh - fi -fi - if [ "${firstcommandname}" == "INSTALL" ]; then - fn_update_papermc_remotebuild - fn_update_papermc_dl + fn_update_remotebuild + fn_update_dl else + fn_print_dots "Checking for update" fn_print_dots "Checking for update: ${remotelocation}" fn_script_log_info "Checking for update: ${remotelocation}" - sleep 0.5 - fn_update_papermc_localbuild - fn_update_papermc_remotebuild - fn_update_papermc_compare + fn_update_localbuild + fn_update_remotebuild + fn_update_compare fi diff --git a/lgsm/functions/update_ts3.sh b/lgsm/functions/update_ts3.sh index be5c9e06f..e76609b2d 100644 --- a/lgsm/functions/update_ts3.sh +++ b/lgsm/functions/update_ts3.sh @@ -7,116 +7,48 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_update_ts3_dl() { - ts3latestdata=$(curl -s "https://www.${remotelocation}/versions/server.json" | jq '.linux') - if [ "${ts3arch}" == "amd64" ]; then - remotebuildurl=$(echo -e "${ts3latestdata}" | jq -r '.x86_64.mirrors."teamspeak.com"') - remotehash=$(echo -e "${ts3latestdata}" | jq -r '.x86_64.checksum') - elif [ "${ts3arch}" == "x86" ]; then - remotebuildurl=$(echo -e "${ts3latestdata}" | jq -r '.x86.mirrors."teamspeak.com"') - remotehash=$(echo -e "${ts3latestdata}" | jq -r '.x86.checksum') - fi - remotefile=$(basename "${remotebuildurl}") - fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotefile}" "" "norun" "noforce" "${remotehash}" - fn_dl_extract "${tmpdir}" "${remotefile}" "${tmpdir}" - echo -e "copying to ${serverfiles}...\c" - cp -R "${tmpdir}/teamspeak3-server_linux_${ts3arch}/"* "${serverfiles}" - local exitcode=$? - if [ "${exitcode}" == "0" ]; then - fn_print_ok_eol_nl - fn_script_log_pass "Copying to ${serverfiles}" - fn_clear_tmp - else - fn_print_fail_eol_nl - fn_script_log_fatal "Copying to ${serverfiles}" - fn_clear_tmp - core_exit.sh - fi +fn_update_dl() { + # Download and extract files to serverfiles + fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "${remotebuildhash}" + fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}" "teamspeak3-server_linux_${ts3arch}" + fn_clear_tmp } -fn_update_ts3_localbuild() { +fn_update_localbuild() { # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" - # Uses log file to gather info. - # Gives time for log file to generate. - requirerestart=1 - if [ ! -d "${serverfiles}/logs" ] || [ -z "$(find "${serverfiles}/logs/"* -name 'ts3server*_0.log' 2> /dev/null)" ]; then - fn_print_error "Checking local build: ${remotelocation}" - fn_print_error_nl "Checking local build: ${remotelocation}: no log files containing version info" - fn_print_info_nl "Checking local build: ${remotelocation}: forcing server restart" - fn_script_log_error "No log files containing version info" - fn_script_log_info "Forcing server restart" - exitbypass=1 - command_stop.sh - exitbypass=1 - command_start.sh - fn_firstcommand_reset - totalseconds=0 - # Check again, allow time to generate logs. - while [ ! -d "${serverfiles}/logs" ] || [ -z "$(find "${serverfiles}/logs/"* -name 'ts3server*_0.log' 2> /dev/null)" ]; do - sleep 1 - fn_print_info "Checking local build: ${remotelocation}: waiting for log file: ${totalseconds}" - if [ -v "${loopignore}" ]; then - loopignore=1 - fn_script_log_info "Waiting for log file to generate" - fi - - if [ "${totalseconds}" -gt "120" ]; then - localbuild="0" - fn_print_error "Checking local build: ${remotelocation}: waiting for log file: missing log file" - fn_script_log_error "Missing log file" - fn_script_log_error "Set localbuild to 0" - fi - - totalseconds=$((totalseconds + 1)) - done - fi - - if [ -z "${localbuild}" ]; then - localbuild=$(cat "$(find ./* -name "ts3server*_0.log" 2> /dev/null | sort | tail -1)" | grep -Eo "TeamSpeak 3 Server ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}" | grep -Eo "((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}" | tail -1) - fi - - if [ -z "${localbuild}" ]; then - # Gives time for var to generate. - totalseconds=0 - for seconds in {1..120}; do - fn_print_info "Checking local build: ${remotelocation}: waiting for local build: ${totalseconds}" - if [ -z "${loopignore}" ]; then - loopignore=1 - fn_script_log_info "Waiting for local build to generate" - fi - localbuild=$(cat "$(find ./* -name "ts3server*_0.log" 2> /dev/null | sort | tail -1)" | grep -Eo "TeamSpeak 3 Server ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}" | grep -Eo "((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}" | tail -1) - if [ "${localbuild}" ] || [ "${seconds}" == "120" ]; then - break - fi - sleep 1 - totalseconds=$((totalseconds + 1)) - done - fi - + # Uses log file to get local build. + localbuild=$(grep -Eo "TeamSpeak 3 Server ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}" "$(find ./* -name "ts3server*_0.log" 2> /dev/null | sort | tail -1)" | grep -Eo "((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}" | tail -1) if [ -z "${localbuild}" ]; then - localbuild="0" - fn_print_error "Checking local build: ${remotelocation}: waiting for local build: missing local build info" + fn_print_error "Checking local build: ${remotelocation}: missing local build info" fn_script_log_error "Missing local build info" fn_script_log_error "Set localbuild to 0" + localbuild="0" else fn_print_ok "Checking local build: ${remotelocation}" fn_script_log_pass "Checking local build" fi } -fn_update_ts3_remotebuild() { - # Gets remote build info. - ts3latestdata=$(curl -s "https://www.${remotelocation}/versions/server.json" | jq '.linux') +fn_update_remotebuild() { + # Get remote build info. + apiurl="https://www.teamspeak.com/versions/server.json" + remotebuildresponse=$(curl -s "${apiurl}") + if [ "${ts3arch}" == "amd64" ]; then - remotebuild=$(echo -e "${ts3latestdata}" | jq -r '.x86_64.version') + remotebuildurl=$(echo -e "${remotebuildresponse}" | jq -r '.linux.x86_64.mirrors."teamspeak.com"') + remotebuildhash=$(echo -e "${remotebuildresponse}" | jq -r '.linux.x86_64.checksum') elif [ "${ts3arch}" == "x86" ]; then - remotebuild=$(echo -e "${ts3latestdata}" | jq -r '.x86.version') + remotebuildurl=$(echo -e "${remotebuildresponse}" | jq -r '.linux.x86.mirrors."teamspeak.com"') + remotebuildhash=$(echo -e "${remotebuildresponse}" | jq -r '.linux.x86.checksum') fi + remotebuildfilename=$(basename "${remotebuildurl}") + remotebuildversion=$(echo -e "${remotebuildresponse}" | jq -r '.linux.x86_64.version') + if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" - # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then + # Checks if remotebuildversion variable has been set. + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" fn_script_log_fatal "Checking remote build" core_exit.sh @@ -126,7 +58,7 @@ fn_update_ts3_remotebuild() { fi else # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_failure "Unable to get remote build" fn_script_log_fatal "Unable to get remote build" core_exit.sh @@ -134,34 +66,45 @@ fn_update_ts3_remotebuild() { fi } -fn_update_ts3_compare() { - # Removes dots so if statement can compare version numbers. +fn_update_compare() { fn_print_dots "Checking for update: ${remotelocation}" - localbuilddigit=$(echo -e "${localbuild}" | tr -cd '[:digit:]') - remotebuilddigit=$(echo -e "${remotebuild}" | tr -cd '[:digit:]') - if [ "${localbuilddigit}" -ne "${remotebuilddigit}" ] || [ "${forceupdate}" == "1" ]; then + if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" echo -e "Update available" echo -e "* Local build: ${red}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi + echo -en "\n" fn_script_log_info "Update available" fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuild}" - fn_script_log_info "${localbuild} > ${remotebuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + fn_script_log_info "${localbuild} > ${remotebuildversion}" if [ "${commandname}" == "UPDATE" ]; then unset updateonstart check_status.sh # If server stopped. if [ "${status}" == "0" ]; then - exitbypass=1 - fn_update_ts3_dl - if [ "${requirerestart}" == "1" ]; then + fn_update_dl + if [ "${localbuild}" == "0" ]; then exitbypass=1 command_start.sh fn_firstcommand_reset exitbypass=1 + sleep 5 command_stop.sh fn_firstcommand_reset fi @@ -172,7 +115,7 @@ fn_update_ts3_compare() { command_stop.sh fn_firstcommand_reset exitbypass=1 - fn_update_ts3_dl + fn_update_dl exitbypass=1 command_start.sh fn_firstcommand_reset @@ -189,11 +132,24 @@ fn_update_ts3_compare() { echo -en "\n" echo -e "No update available" echo -e "* Local build: ${green}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi echo -en "\n" fn_script_log_info "No update available" fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi fi } @@ -213,13 +169,13 @@ fi remotelocation="teamspeak.com" if [ "${firstcommandname}" == "INSTALL" ]; then - fn_update_ts3_remotebuild - fn_update_ts3_dl + fn_update_remotebuild + fn_update_dl else fn_print_dots "Checking for update" fn_print_dots "Checking for update: ${remotelocation}" fn_script_log_info "Checking for update: ${remotelocation}" - fn_update_ts3_localbuild - fn_update_ts3_remotebuild - fn_update_ts3_compare + fn_update_localbuild + fn_update_remotebuild + fn_update_compare fi diff --git a/lgsm/functions/update_ut99.sh b/lgsm/functions/update_ut99.sh new file mode 100644 index 000000000..b6db783e2 --- /dev/null +++ b/lgsm/functions/update_ut99.sh @@ -0,0 +1,163 @@ +#!/bin/bash +# LinuxGSM command_ut99.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Handles updating of Unreal Tournament 99 servers. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +fn_update_dl() { + # Download and extract files to serverfiles + fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "nohash" + fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}" + echo "${remotebuildversion}" > "${serverfiles}/build.txt" + fn_clear_tmp +} + +fn_update_localbuild() { + # Gets local build info. + fn_print_dots "Checking local build: ${remotelocation}" + # Uses build file to get local build. + localbuild=$(head -n 1 "${serverfiles}/build.txt") + if [ -z "${localbuild}" ]; then + fn_print_error "Checking local build: ${remotelocation}: missing local build info" + fn_script_log_error "Missing local build info" + fn_script_log_error "Set localbuild to 0" + localbuild="0" + else + fn_print_ok "Checking local build: ${remotelocation}" + fn_script_log_pass "Checking local build" + fi +} + +fn_update_remotebuild() { + # Get 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') + remotebuildurl=$(echo "${remotebuildresponse}" | jq -r '.assets[]|select(.browser_download_url | contains("Linux-amd64")) | .browser_download_url') + remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '.tag_name') + + if [ "${firstcommandname}" != "INSTALL" ]; then + fn_print_dots "Checking remote build: ${remotelocation}" + # Checks if remotebuildversion variable has been set. + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + fn_print_fail "Checking remote build: ${remotelocation}" + fn_script_log_fatal "Checking remote build" + core_exit.sh + else + fn_print_ok "Checking remote build: ${remotelocation}" + fn_script_log_pass "Checking remote build" + fi + else + # Checks if remotebuild variable has been set. + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + fn_print_failure "Unable to get remote build" + fn_script_log_fatal "Unable to get remote build" + core_exit.sh + fi + fi +} + +fn_update_compare() { + fn_print_dots "Checking for update: ${remotelocation}" + if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "Update available" + echo -e "* Local build: ${red}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi + echo -en "\n" + fn_script_log_info "Update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + fn_script_log_info "${localbuild} > ${remotebuildversion}" + + if [ "${commandname}" == "UPDATE" ]; then + unset updateonstart + check_status.sh + # If server stopped. + if [ "${status}" == "0" ]; then + fn_update_dl + if [ "${localbuild}" == "0" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + sleep 5 + command_stop.sh + fn_firstcommand_reset + fi + # If server started. + else + fn_print_restart_warning + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + exitbypass=1 + fn_update_dl + exitbypass=1 + command_start.sh + fn_firstcommand_reset + fi + unset exitbypass + date +%s > "${lockdir}/lastupdate.lock" + alert="update" + elif [ "${commandname}" == "CHECK-UPDATE" ]; then + alert="check-update" + fi + alert.sh + else + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "No update available" + echo -e "* Local build: ${green}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + echo -en "\n" + fn_script_log_info "No update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi + fi +} + +# The location where the builds are checked and downloaded. +remotelocation="github.com" + +if [ "${firstcommandname}" == "INSTALL" ]; then + fn_update_remotebuild + fn_update_dl +else + fn_print_dots "Checking for update" + fn_print_dots "Checking for update: ${remotelocation}" + fn_script_log_info "Checking for update: ${remotelocation}" + fn_update_localbuild + fn_update_remotebuild + fn_update_compare +fi diff --git a/lgsm/functions/update_vintagestory.sh b/lgsm/functions/update_vintagestory.sh index 905384922..84e3192c9 100755 --- a/lgsm/functions/update_vintagestory.sh +++ b/lgsm/functions/update_vintagestory.sh @@ -7,46 +7,49 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_update_vs_dl() { - # get version info for download - remotebuildresponse=$(curl -s "${apiurl}" | jq --arg version "${remotebuild}" '.[$version].server') - remotebuildfile=$(echo -e "${remotebuildresponse}" | jq -r '.filename') - remotebuildlink=$(echo -e "${remotebuildresponse}" | jq -r '.urls.cdn') - remotebuildmd5=$(echo -e "${remotebuildresponse}" | jq -r '.md5') - +fn_update_dl() { # Download and extract files to serverfiles - fn_fetch_file "${remotebuildlink}" "" "" "" "${tmpdir}" "${remotebuildfile}" "nochmodx" "norun" "force" "${remotebuildmd5}" - fn_dl_extract "${tmpdir}" "${remotebuildfile}" "${serverfiles}" + fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "${remotebuildhash}" + fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}" fn_clear_tmp } -fn_update_vs_localbuild() { +fn_update_localbuild() { # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" - # Uses executable to find local build. - cd "${executabledir}" || exit - if [ -f "${executable}" ]; then + # Uses executable to get local build. + if [ -d "${exutabledir}" ]; then + cd "${executabledir}" || exit localbuild="$(${preexecutable} ${executable} --version | sed '/^[[:space:]]*$/d')" + fi + if [ -z "${localbuild}" ]; then + fn_print_error "Checking local build: ${remotelocation}: missing local build info" + fn_script_log_error "Missing local build info" + fn_script_log_error "Set localbuild to 0" + localbuild="0" + else fn_print_ok "Checking local build: ${remotelocation}" fn_script_log_pass "Checking local build" - else - localbuild="0" - fn_print_error "Checking local build: ${remotelocation}" - fn_script_log_error "Checking local build" fi } -fn_update_vs_remotebuild() { +fn_update_remotebuild() { + # Get remote build info. + apiurl="http://api.vintagestory.at/stable-unstable.json" + remotebuildresponse=$(curl -s "${apiurl}") if [ "${branch}" == "stable" ]; then - remotebuild=$(curl -s "${apiurl}" | jq -r '[ to_entries[] ] | .[].key' | grep -Ev "\-rc|\-pre" | sort -r -V | head -1) + remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '[ to_entries[] ] | .[].key' | grep -Ev "\-rc|\-pre" | sort -r -V | head -1) else - remotebuild=$(curl -s "${apiurl}" | jq -r '[ to_entries[] ] | .[].key' | grep -E "\-rc|\-pre" | sort -r -V | head -1) + remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '[ to_entries[] ] | .[].key' | grep -E "\-rc|\-pre" | sort -r -V | head -1) fi + remotebuildfilename=$(echo "${remotebuildresponse}" | jq --arg remotebuildversion "${remotebuildversion}" -r '.[$remotebuildversion].server.filename') + remotebuildurl=$(echo "${remotebuildresponse}" | jq --arg remotebuildversion "${remotebuildversion}" -r '.[$remotebuildversion].server.urls.cdn') + remotebuildhash=$(echo "${remotebuildresponse}" | jq --arg remotebuildversion "${remotebuildversion}" -r '.[$remotebuildversion].server.md5') if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" - # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then + # Checks if remotebuildversion variable has been set. + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" fn_script_log_fatal "Checking remote build" core_exit.sh @@ -56,7 +59,7 @@ fn_update_vs_remotebuild() { fi else # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_failure "Unable to get remote build" fn_script_log_fatal "Unable to get remote build" core_exit.sh @@ -64,85 +67,104 @@ fn_update_vs_remotebuild() { fi } -fn_update_vs_compare() { - # Removes dots so if statement can compare version numbers. +fn_update_compare() { fn_print_dots "Checking for update: ${remotelocation}" - if [ "${localbuild}" != "${remotebuild}" ] || [ "${forceupdate}" == "1" ]; then + if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" echo -e "Update available" echo -e "* Local build: ${red}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" if [ -n "${branch}" ]; then echo -e "* Branch: ${branch}" fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi echo -en "\n" fn_script_log_info "Update available" fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuild}" - fn_script_log_info "${localbuild} > ${remotebuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + fn_script_log_info "${localbuild} > ${remotebuildversion}" - unset updateonstart - check_status.sh - # If server stopped. - if [ "${status}" == "0" ]; then - exitbypass=1 - fn_update_vs_dl - if [ "${requirerestart}" == "1" ]; then + if [ "${commandname}" == "UPDATE" ]; then + unset updateonstart + check_status.sh + # If server stopped. + if [ "${status}" == "0" ]; then + fn_update_dl + if [ "${localbuild}" == "0" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + sleep 5 + command_stop.sh + fn_firstcommand_reset + fi + # If server started. + else + fn_print_restart_warning exitbypass=1 - command_start.sh + command_stop.sh fn_firstcommand_reset exitbypass=1 - command_stop.sh + fn_update_dl + exitbypass=1 + command_start.sh fn_firstcommand_reset fi - # If server started. - else - fn_print_restart_warning - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - exitbypass=1 - fn_update_vs_dl - exitbypass=1 - command_start.sh - fn_firstcommand_reset + unset exitbypass + date +%s > "${lockdir}/lastupdate.lock" + alert="update" + elif [ "${commandname}" == "CHECK-UPDATE" ]; then + alert="check-update" fi - unset exitbypass - date +%s > "${lockdir}/lastupdate.lock" - alert="update" alert.sh else fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" echo -e "No update available" echo -e "* Local build: ${green}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" if [ -n "${branch}" ]; then echo -e "* Branch: ${branch}" fi echo -en "\n" fn_script_log_info "No update available" fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" if [ -n "${branch}" ]; then fn_script_log_info "Branch: ${branch}" fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi fi } # The location where the builds are checked and downloaded. remotelocation="vintagestory.at" -apiurl="http://api.${remotelocation}/stable-unstable.json" if [ "${firstcommandname}" == "INSTALL" ]; then - fn_update_vs_remotebuild - fn_update_vs_dl + fn_update_remotebuild + fn_update_dl else fn_print_dots "Checking for update" fn_print_dots "Checking for update: ${remotelocation}" fn_script_log_info "Checking for update: ${remotelocation}" - fn_update_vs_localbuild - fn_update_vs_remotebuild - fn_update_vs_compare + fn_update_localbuild + fn_update_remotebuild + fn_update_compare fi From 89363f6b253f114d2159561262718db51774b49e Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 26 Mar 2023 22:58:48 +0100 Subject: [PATCH 098/374] fix(rust): random seed not generating --- lgsm/functions/fix_rust.sh | 2 +- lgsm/functions/info_game.sh | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/fix_rust.sh b/lgsm/functions/fix_rust.sh index 4488377a3..f1d592658 100755 --- a/lgsm/functions/fix_rust.sh +++ b/lgsm/functions/fix_rust.sh @@ -12,7 +12,7 @@ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/RustDedic # Part of random seed feature. # If seed is not defined by user generate a seed file. -if [ -z "${seed}" ]; then +if [ -z "${seed}" ] || [ "${seed}" == "0" ]; then if [ ! -f "${datadir}/${selfname}-seed.txt" ]; then shuf -i 1-2147483647 -n 1 > "${datadir}/${selfname}-seed.txt" fi diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index f5dc108da..0bd219485 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -1490,7 +1490,11 @@ fn_info_game_rust() { serverlevel=${serverlevel:-"NOT SET"} customlevelurl=${customlevelurl:-"NOT SET"} worldsize=${worldsize:-"0"} - seed=${seed:-"0"} + if [ -n "${seed}" ]; then + seed=${seed:-"0"} + elif [ -f "${datadir}/${selfname}-seed.txt" ]; then + seed=$(cat "${datadir}/${selfname}-seed.txt") + fi salt=${salt:-"0"} } From 7c818be4fe3032f32e101d2a38b0b5e117a6c04c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 26 Mar 2023 23:16:39 +0100 Subject: [PATCH 099/374] feat(mods): add rust carbon mod (#4122) * feat(mods): add rust carbon * updated tag and file name * add source --- lgsm/functions/fix_rust.sh | 8 ++++++++ lgsm/functions/mods_list.sh | 9 ++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/fix_rust.sh b/lgsm/functions/fix_rust.sh index f1d592658..662bbe052 100755 --- a/lgsm/functions/fix_rust.sh +++ b/lgsm/functions/fix_rust.sh @@ -19,3 +19,11 @@ if [ -z "${seed}" ] || [ "${seed}" == "0" ]; then seed="$(cat "${datadir}/${selfname}-seed.txt")" randomseed=1 fi + +# If Carbon mod is installed, run enviroment.sh +if [ -f "${serverfiles}/carbon/tools/environment.sh" ]; then + fn_print_info_nl "Running Carbon environment.sh" + fn_script_log_info "Running Carbon environment.sh" + # shellcheck source=/dev/null + source "${serverfiles}/carbon/tools/environment.sh" +fi diff --git a/lgsm/functions/mods_list.sh b/lgsm/functions/mods_list.sh index f78686759..a83b7e303 100755 --- a/lgsm/functions/mods_list.sh +++ b/lgsm/functions/mods_list.sh @@ -88,6 +88,10 @@ movementapilatestversion=$(curl --connect-timeout 10 -s https://api.github.com/r movementapilatestfile="MovementAPI-v${movementapilatestversion}.zip" movementapilatestlink="https://github.com/danzayau/MovementAPI/releases/download/${movementapilatestversion}/${movementapilatestfile}" +# Rust +carbonrustapilatestfile="Carbon.Linux.Release.tar.gz" +carbonrustlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/CarbonCommunity/Carbon.Core/releases/tags/production_build | jq -r '.assets[]|select(.name == "Carbon.Linux.Release.tar.gz") | .browser_download_url') + # Oxide oxiderustlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/OxideMod/Oxide.Rust/releases/latest | jq -r '.assets[]|select(.browser_download_url | contains("linux")) | .browser_download_url') oxidehurtworldlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/OxideMod/Oxide.Hurtworld/releases/latest | jq -r '.assets[].browser_download_url') @@ -187,6 +191,9 @@ mod_info_darkrp=(MOD "darkrp" "DarkRP" "https://github.com/FPtje/DarkRP/archive/ mod_info_darkrpmodification=(MOD "darkrpmodification" "DarkRP Modification" "https://github.com/FPtje/darkrpmodification/archive/master.zip" "darkrpmodification-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "NOUPDATE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://darkrp.com" "Customize DarkRP settings") mod_info_laserstool=(MOD "laserstool" "Laser STool" "https://github.com/dvdvideo1234/laserstool/archive/main.zip" "laserstool-main.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/LaserSTool" "Scripted tool that spawns laser entities, simulates light rays and even kill players") +# Rust +mod_info_rustcarbon=(MOD "rustcarbon" "Carbon for Rust" "${carbonrustlatestlink}" "Carbon.Linux.Release.tar.gz" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Rust;" "NOTGAMES" "carbonmod.gg" "Allows for the use of both plugins and harmony mods") + # Oxidemod mod_info_rustoxide=(MOD "rustoxide" "Oxide for Rust" "${oxiderustlatestlink}" "Oxide.Rust-linux.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Rust;" "NOTGAMES" "https://umod.org/games/rust" "Allows for the use of plugins") mod_info_hwoxide=(MOD "hwoxide" "Oxide for Hurtworld" "${oxidehurtworldlatestlink}" "Oxide.Hurtworld.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Hurtworld;" "NOTGAMES" "https://umod.org/games/hurtworld" "Allows for the use of plugins") @@ -199,4 +206,4 @@ mod_info_valheimplus=(MOD "valheimplus" "Valheim PLUS" "${valeimpluslatestlink}" mod_info_bepinexvh=(MOD "bepinexvh" "BepInEx Valheim" "${bepinexvhlatestlink}" "denikson-BepInExPack_Valheim.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Valheim;" "NOTGAMES" "https://valheim.thunderstore.io/package/denikson/BepInExPack_Valheim/" "Unity / XNA game patcher and plugin framework") # REQUIRED: Set all mods info into the global array -mods_global_array=("${mod_info_metamod[@]}" "${mod_info_base_amxx[@]}" "${mod_info_cs_amxx[@]}" "${mod_info_dod_amxx[@]}" "${mod_info_tfc_amxx[@]}" "${mod_info_ns_amxx[@]}" "${mod_info_ts_amxx[@]}" "${mod_info_metamodsource[@]}" "${mod_info_sourcemod[@]}" "${mod_info_steamworks[@]}" "${mod_info_gokz[@]}" "${mod_info_ttt[@]}" "${mod_info_get5[@]}" "${mod_info_prac[@]}" "${mod_info_pug[@]}" "${mod_info_dhook[@]}" "${mod_info_movement[@]}" "${mod_info_cleaner[@]}" "${mod_info_ulib[@]}" "${mod_info_ulx[@]}" "${mod_info_utime[@]}" "${mod_info_uclip[@]}" "${mod_info_acf[@]}" "${mod_info_acf_missiles[@]}" "${mod_info_acf_sweps[@]}" "${mod_info_advdupe2[@]}" "${mod_info_pac3[@]}" "${mod_info_wiremod[@]}" "${mod_info_wiremodextras[@]}" "${mod_info_darkrp[@]}" "${mod_info_darkrpmodification[@]}" "${mod_info_rustoxide[@]}" "${mod_info_hwoxide[@]}" "${mod_info_sdtdoxide[@]}" "${mod_info_advduplicator[@]}" "${mod_info_trackassemblytool[@]}" "${mod_info_physpropertiesadv[@]}" "${mod_info_controlsystemse2[@]}" "${mod_info_e2pistontiming[@]}" "${mod_info_propcannontool[@]}" "${mod_info_gearassemblytool[@]}" "${mod_info_spinnertool[@]}" "${mod_info_surfacefrictiontool[@]}" "${mod_info_magneticdipole[@]}" "${mod_info_environmentorganizer[@]}" "${mod_info_precision_alignment[@]}" "${mod_info_improved_stacker[@]}" "${mod_info_improved_weight[@]}" "${mod_info_improved_antinoclip[@]}" "${mod_info_laserstool[@]}" "${mod_info_valheimplus[@]}" "${mod_info_bepinexvh[@]}") +mods_global_array=("${mod_info_metamod[@]}" "${mod_info_base_amxx[@]}" "${mod_info_cs_amxx[@]}" "${mod_info_dod_amxx[@]}" "${mod_info_tfc_amxx[@]}" "${mod_info_ns_amxx[@]}" "${mod_info_ts_amxx[@]}" "${mod_info_metamodsource[@]}" "${mod_info_sourcemod[@]}" "${mod_info_steamworks[@]}" "${mod_info_gokz[@]}" "${mod_info_ttt[@]}" "${mod_info_get5[@]}" "${mod_info_prac[@]}" "${mod_info_pug[@]}" "${mod_info_dhook[@]}" "${mod_info_movement[@]}" "${mod_info_cleaner[@]}" "${mod_info_ulib[@]}" "${mod_info_ulx[@]}" "${mod_info_utime[@]}" "${mod_info_uclip[@]}" "${mod_info_acf[@]}" "${mod_info_acf_missiles[@]}" "${mod_info_acf_sweps[@]}" "${mod_info_advdupe2[@]}" "${mod_info_pac3[@]}" "${mod_info_wiremod[@]}" "${mod_info_wiremodextras[@]}" "${mod_info_darkrp[@]}" "${mod_info_darkrpmodification[@]}" "${mod_info_rustcarbon[@]}" "${mod_info_rustoxide[@]}" "${mod_info_hwoxide[@]}" "${mod_info_sdtdoxide[@]}" "${mod_info_advduplicator[@]}" "${mod_info_trackassemblytool[@]}" "${mod_info_physpropertiesadv[@]}" "${mod_info_controlsystemse2[@]}" "${mod_info_e2pistontiming[@]}" "${mod_info_propcannontool[@]}" "${mod_info_gearassemblytool[@]}" "${mod_info_spinnertool[@]}" "${mod_info_surfacefrictiontool[@]}" "${mod_info_magneticdipole[@]}" "${mod_info_environmentorganizer[@]}" "${mod_info_precision_alignment[@]}" "${mod_info_improved_stacker[@]}" "${mod_info_improved_weight[@]}" "${mod_info_improved_antinoclip[@]}" "${mod_info_laserstool[@]}" "${mod_info_valheimplus[@]}" "${mod_info_bepinexvh[@]}") From c6549da271c4747c473627631700d28c10d8ac1d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 26 Mar 2023 23:42:02 +0100 Subject: [PATCH 100/374] fix(rust): improve seed messaging --- lgsm/functions/command_wipe.sh | 2 +- lgsm/functions/fix_rust.sh | 3 +++ lgsm/functions/info_game.sh | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/command_wipe.sh b/lgsm/functions/command_wipe.sh index 29577984e..e1677e827 100755 --- a/lgsm/functions/command_wipe.sh +++ b/lgsm/functions/command_wipe.sh @@ -111,7 +111,7 @@ fn_wipe_random_seed() { seed=$(cat "${datadir}/${selfname}-seed.txt") randomseed=1 echo -en "generating new random seed (${cyan}${seed}${default})..." - fn_script_log_pass "generating new random seed (${cyan}${seed}${default})" + fn_script_log_pass "Generating new random seed (${cyan}${seed}${default})" fn_sleep_time fn_print_ok_eol_nl fi diff --git a/lgsm/functions/fix_rust.sh b/lgsm/functions/fix_rust.sh index 662bbe052..5f407e89f 100755 --- a/lgsm/functions/fix_rust.sh +++ b/lgsm/functions/fix_rust.sh @@ -15,6 +15,9 @@ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/RustDedic if [ -z "${seed}" ] || [ "${seed}" == "0" ]; then if [ ! -f "${datadir}/${selfname}-seed.txt" ]; then shuf -i 1-2147483647 -n 1 > "${datadir}/${selfname}-seed.txt" + seed="$(cat "${datadir}/${selfname}-seed.txt")" + fn_print_info_nl "Generating new random seed (${cyan}${seed}${default})" + fn_script_log_pass "Generating new random seed (${cyan}${seed}${default})" fi seed="$(cat "${datadir}/${selfname}-seed.txt")" randomseed=1 diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index 0bd219485..8c9ca310a 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -1494,6 +1494,8 @@ fn_info_game_rust() { seed=${seed:-"0"} elif [ -f "${datadir}/${selfname}-seed.txt" ]; then seed=$(cat "${datadir}/${selfname}-seed.txt") + else + seed="0" fi salt=${salt:-"0"} } From bc7e200dcd2bcfa75548eb758c72791faff405ad Mon Sep 17 00:00:00 2001 From: jusito <17811819+jusito@users.noreply.github.com> Date: Mon, 27 Mar 2023 22:14:12 +0200 Subject: [PATCH 101/374] fix(update-lgsm): cd functionsdir but never back (#4140) --- lgsm/functions/command_update_linuxgsm.sh | 78 ++++++++++++----------- 1 file changed, 40 insertions(+), 38 deletions(-) diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh index 39a441f59..569bc7cdb 100755 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -182,49 +182,51 @@ fi # Check and update modules. if [ -n "${functionsdir}" ]; then if [ -d "${functionsdir}" ]; then - cd "${functionsdir}" || exit - for functionfile in *; do - # check if module exists in the repo and remove if missing. - # commonly used if module names change. - echo -en "checking ${remotereponame} module ${functionfile}...\c" - github_file_url_dir="lgsm/functions" - if [ "${remotereponame}" == "GitHub" ]; then - curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}" 1> /dev/null - else - curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${functionfile}" 1> /dev/null - fi - if [ $? != 0 ]; then - fn_print_error_eol_nl - fn_script_log_error "Checking ${remotereponame} module ${functionfile}" - echo -en "removing module ${functionfile}...\c" - if ! rm -f "${functionfile:?}"; then - fn_print_fail_eol_nl - fn_script_log_fatal "Removing module ${functionfile}" - core_exit.sh - else - fn_print_ok_eol_nl - fn_script_log_pass "Removing module ${functionfile}" - fi - else - # compare file + ( + cd "${functionsdir}" || exit + for functionfile in *; do + # check if module exists in the repo and remove if missing. + # commonly used if module names change. + echo -en "checking ${remotereponame} module ${functionfile}...\c" + github_file_url_dir="lgsm/functions" if [ "${remotereponame}" == "GitHub" ]; then - function_file_diff=$(diff "${functionsdir}/${functionfile}" <(curl --connect-timeout 10 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}")) + curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}" 1> /dev/null else - function_file_diff=$(diff "${functionsdir}/${functionfile}" <(curl --connect-timeout 10 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${functionfile}")) + curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${functionfile}" 1> /dev/null fi - - # results - if [ "${function_file_diff}" != "" ]; then - fn_print_update_eol_nl - fn_script_log_update "Checking ${remotereponame} module ${functionfile}" - rm -rf "${functionsdir:?}/${functionfile}" - fn_update_function + if [ $? != 0 ]; then + fn_print_error_eol_nl + fn_script_log_error "Checking ${remotereponame} module ${functionfile}" + echo -en "removing module ${functionfile}...\c" + if ! rm -f "${functionfile:?}"; then + fn_print_fail_eol_nl + fn_script_log_fatal "Removing module ${functionfile}" + core_exit.sh + else + fn_print_ok_eol_nl + fn_script_log_pass "Removing module ${functionfile}" + fi else - fn_print_ok_eol_nl - fn_script_log_pass "Checking ${remotereponame} module ${functionfile}" + # compare file + if [ "${remotereponame}" == "GitHub" ]; then + function_file_diff=$(diff "${functionsdir}/${functionfile}" <(curl --connect-timeout 10 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}")) + else + function_file_diff=$(diff "${functionsdir}/${functionfile}" <(curl --connect-timeout 10 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${functionfile}")) + fi + + # results + if [ "${function_file_diff}" != "" ]; then + fn_print_update_eol_nl + fn_script_log_update "Checking ${remotereponame} module ${functionfile}" + rm -rf "${functionsdir:?}/${functionfile}" + fn_update_function + else + fn_print_ok_eol_nl + fn_script_log_pass "Checking ${remotereponame} module ${functionfile}" + fi fi - fi - done + done + ) fi fi From 69468d333a39e1ac7581368094560b12d49e0179 Mon Sep 17 00:00:00 2001 From: Reda DRISSI Date: Tue, 28 Mar 2023 23:09:16 +0200 Subject: [PATCH 102/374] feat(core): prefix logs with a timestamp (#3795) * feat: Added Option to prefix logs with timestamps * feat: Added Option to prefix logs with timestamps * Add parameters to every game * feat: Switched timestamp enabling from True/False to on/off * feat: Added quotes on variables * add to new configs * renamed to logtimestamp * remove gawk as a requirement gawk is a standard tool on linux distros and no check is required * tidy * rename to addtimestamp --------- Co-authored-by: Reda.drissi.e Co-authored-by: Daniel Gibbs --- .../config-lgsm/acserver/_default.cfg | 4 ++++ .../config-lgsm/ahl2server/_default.cfg | 5 ++++- .../config-lgsm/ahlserver/_default.cfg | 4 ++++ .../config-lgsm/arkserver/_default.cfg | 4 ++++ .../config-lgsm/arma3server/_default.cfg | 4 ++++ .../config-lgsm/armarserver/_default.cfg | 4 ++++ .../config-lgsm/atsserver/_default.cfg | 4 ++++ .../config-lgsm/avserver/_default.cfg | 4 ++++ .../config-lgsm/bb2server/_default.cfg | 4 ++++ .../config-lgsm/bbserver/_default.cfg | 4 ++++ .../config-lgsm/bdserver/_default.cfg | 4 ++++ .../config-lgsm/bf1942server/_default.cfg | 4 ++++ .../config-lgsm/bfvserver/_default.cfg | 4 ++++ .../config-lgsm/bmdmserver/_default.cfg | 4 ++++ .../config-lgsm/boserver/_default.cfg | 4 ++++ .../config-lgsm/bsserver/_default.cfg | 4 ++++ .../config-lgsm/btlserver/_default.cfg | 4 ++++ .../config-lgsm/btserver/_default.cfg | 4 ++++ .../config-lgsm/ccserver/_default.cfg | 4 ++++ .../config-lgsm/cdserver/_default.cfg | 4 ++++ .../config-lgsm/ckserver/_default.cfg | 4 ++++ .../config-lgsm/cmwserver/_default.cfg | 4 ++++ .../config-lgsm/cod2server/_default.cfg | 4 ++++ .../config-lgsm/cod4server/_default.cfg | 4 ++++ .../config-lgsm/codserver/_default.cfg | 4 ++++ .../config-lgsm/coduoserver/_default.cfg | 4 ++++ .../config-lgsm/codwawserver/_default.cfg | 4 ++++ .../config-lgsm/colserver/_default.cfg | 4 ++++ .../config-lgsm/csczserver/_default.cfg | 4 ++++ .../config-lgsm/csgoserver/_default.cfg | 4 ++++ .../config-lgsm/csserver/_default.cfg | 4 ++++ .../config-lgsm/cssserver/_default.cfg | 4 ++++ .../config-lgsm/dabserver/_default.cfg | 4 ++++ .../config-lgsm/dayzserver/_default.cfg | 4 ++++ .../config-lgsm/dmcserver/_default.cfg | 4 ++++ .../config-lgsm/dodrserver/_default.cfg | 4 ++++ .../config-lgsm/dodserver/_default.cfg | 4 ++++ .../config-lgsm/dodsserver/_default.cfg | 4 ++++ .../config-lgsm/doiserver/_default.cfg | 4 ++++ .../config-lgsm/dstserver/_default.cfg | 4 ++++ .../config-lgsm/dysserver/_default.cfg | 4 ++++ .../config-lgsm/ecoserver/_default.cfg | 4 ++++ .../config-lgsm/emserver/_default.cfg | 4 ++++ .../config-lgsm/etlserver/_default.cfg | 4 ++++ .../config-lgsm/ets2server/_default.cfg | 4 ++++ .../config-lgsm/fctrserver/_default.cfg | 4 ++++ .../config-lgsm/fofserver/_default.cfg | 4 ++++ .../config-lgsm/gmodserver/_default.cfg | 4 ++++ .../config-lgsm/hl2dmserver/_default.cfg | 4 ++++ .../config-lgsm/hldmserver/_default.cfg | 4 ++++ .../config-lgsm/hldmsserver/_default.cfg | 4 ++++ .../config-lgsm/hwserver/_default.cfg | 6 +++++- .../config-lgsm/insserver/_default.cfg | 4 ++++ .../config-lgsm/inssserver/_default.cfg | 4 ++++ .../config-lgsm/iosserver/_default.cfg | 4 ++++ .../config-lgsm/jc2server/_default.cfg | 4 ++++ .../config-lgsm/jc3server/_default.cfg | 4 ++++ .../config-lgsm/jk2server/_default.cfg | 4 ++++ .../config-lgsm/kf2server/_default.cfg | 4 ++++ .../config-lgsm/kfserver/_default.cfg | 4 ++++ .../config-lgsm/l4d2server/_default.cfg | 4 ++++ .../config-lgsm/l4dserver/_default.cfg | 4 ++++ .../config-lgsm/loserver/_default.cfg | 4 ++++ .../config-lgsm/mcbserver/_default.cfg | 4 ++++ .../config-lgsm/mcserver/_default.cfg | 4 ++++ .../config-lgsm/mhserver/_default.cfg | 4 ++++ .../config-lgsm/mohaaserver/_default.cfg | 4 ++++ .../config-lgsm/momserver/_default.cfg | 4 ++++ .../config-lgsm/mtaserver/_default.cfg | 4 ++++ .../config-lgsm/ndserver/_default.cfg | 4 ++++ .../config-lgsm/necserver/_default.cfg | 4 ++++ .../config-lgsm/nmrihserver/_default.cfg | 4 ++++ .../config-lgsm/ns2cserver/_default.cfg | 4 ++++ .../config-lgsm/ns2server/_default.cfg | 4 ++++ .../config-lgsm/nsserver/_default.cfg | 4 ++++ .../config-lgsm/onsetserver/_default.cfg | 4 ++++ .../config-lgsm/opforserver/_default.cfg | 4 ++++ .../config-lgsm/pc2server/_default.cfg | 4 ++++ .../config-lgsm/pcserver/_default.cfg | 4 ++++ .../config-lgsm/pmcserver/_default.cfg | 4 ++++ .../config-lgsm/pstbsserver/_default.cfg | 4 ++++ .../config-lgsm/pvkiiserver/_default.cfg | 4 ++++ .../config-lgsm/pvrserver/_default.cfg | 4 ++++ .../config-lgsm/pzserver/_default.cfg | 4 ++++ .../config-lgsm/q2server/_default.cfg | 4 ++++ .../config-lgsm/q3server/_default.cfg | 4 ++++ .../config-lgsm/qlserver/_default.cfg | 4 ++++ .../config-lgsm/qwserver/_default.cfg | 4 ++++ .../config-lgsm/ricochetserver/_default.cfg | 4 ++++ .../config-lgsm/roserver/_default.cfg | 4 ++++ .../config-lgsm/rtcwserver/_default.cfg | 4 ++++ .../config-lgsm/rustserver/_default.cfg | 16 ++++++++++------ .../config-lgsm/rwserver/_default.cfg | 4 ++++ .../config-lgsm/sampserver/_default.cfg | 4 ++++ .../config-lgsm/sbotsserver/_default.cfg | 6 +++++- .../config-lgsm/sbserver/_default.cfg | 4 ++++ .../config-lgsm/scpslserver/_default.cfg | 4 ++++ .../config-lgsm/scpslsmserver/_default.cfg | 4 ++++ .../config-lgsm/sdtdserver/_default.cfg | 4 ++++ .../config-lgsm/sfcserver/_default.cfg | 4 ++++ .../config-lgsm/sfserver/_default.cfg | 4 ++++ .../config-lgsm/sof2server/_default.cfg | 4 ++++ .../config-lgsm/solserver/_default.cfg | 4 ++++ .../config-lgsm/squadserver/_default.cfg | 4 ++++ .../config-lgsm/stnserver/_default.cfg | 4 ++++ .../config-lgsm/stserver/_default.cfg | 4 ++++ .../config-lgsm/svenserver/_default.cfg | 4 ++++ .../config-lgsm/terrariaserver/_default.cfg | 4 ++++ .../config-lgsm/tf2server/_default.cfg | 4 ++++ .../config-lgsm/tfcserver/_default.cfg | 4 ++++ .../config-lgsm/tiserver/_default.cfg | 4 ++++ .../config-lgsm/ts3server/_default.cfg | 4 ++++ .../config-lgsm/tsserver/_default.cfg | 4 ++++ .../config-lgsm/tuserver/_default.cfg | 4 ++++ .../config-lgsm/twserver/_default.cfg | 4 ++++ .../config-lgsm/untserver/_default.cfg | 4 ++++ .../config-lgsm/ut2k4server/_default.cfg | 4 ++++ .../config-lgsm/ut3server/_default.cfg | 4 ++++ .../config-lgsm/ut99server/_default.cfg | 4 ++++ .../config-lgsm/utserver/_default.cfg | 4 ++++ .../config-lgsm/vhserver/_default.cfg | 4 ++++ .../config-lgsm/vintsserver/_default.cfg | 4 ++++ .../config-lgsm/vpmcserver/_default.cfg | 4 ++++ .../config-lgsm/vsserver/_default.cfg | 4 ++++ .../config-lgsm/wetserver/_default.cfg | 4 ++++ .../config-lgsm/wfserver/_default.cfg | 4 ++++ .../config-lgsm/wmcserver/_default.cfg | 4 ++++ .../config-lgsm/wurmserver/_default.cfg | 4 ++++ .../config-lgsm/zmrserver/_default.cfg | 4 ++++ .../config-lgsm/zpsserver/_default.cfg | 4 ++++ lgsm/functions/command_start.sh | 16 +++++++++++++--- 131 files changed, 541 insertions(+), 12 deletions(-) diff --git a/lgsm/config-default/config-lgsm/acserver/_default.cfg b/lgsm/config-default/config-lgsm/acserver/_default.cfg index 3b6776ef7..8d572b695 100644 --- a/lgsm/config-default/config-lgsm/acserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/acserver/_default.cfg @@ -184,3 +184,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/ahl2server/_default.cfg b/lgsm/config-default/config-lgsm/ahl2server/_default.cfg index a2552a95d..3283f54e8 100644 --- a/lgsm/config-default/config-lgsm/ahl2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ahl2server/_default.cfg @@ -152,7 +152,6 @@ stopmode="3" querymode="2" querytype="protocol-valve" - ## Console type consoleverbose="yes" consoleinteract="yes" @@ -191,3 +190,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/ahlserver/_default.cfg b/lgsm/config-default/config-lgsm/ahlserver/_default.cfg index 046aa0c11..9d4c0ed4b 100644 --- a/lgsm/config-default/config-lgsm/ahlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ahlserver/_default.cfg @@ -186,3 +186,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/arkserver/_default.cfg b/lgsm/config-default/config-lgsm/arkserver/_default.cfg index 8e24debfc..cc3de9082 100644 --- a/lgsm/config-default/config-lgsm/arkserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/arkserver/_default.cfg @@ -188,3 +188,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/arma3server/_default.cfg b/lgsm/config-default/config-lgsm/arma3server/_default.cfg index 7c4619c17..c92e843fd 100644 --- a/lgsm/config-default/config-lgsm/arma3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/arma3server/_default.cfg @@ -204,3 +204,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/armarserver/_default.cfg b/lgsm/config-default/config-lgsm/armarserver/_default.cfg index 9e2f88d7c..3cee2f43f 100644 --- a/lgsm/config-default/config-lgsm/armarserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/armarserver/_default.cfg @@ -185,3 +185,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/atsserver/_default.cfg b/lgsm/config-default/config-lgsm/atsserver/_default.cfg index c6e338d34..a77e230ce 100644 --- a/lgsm/config-default/config-lgsm/atsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/atsserver/_default.cfg @@ -177,3 +177,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/avserver/_default.cfg b/lgsm/config-default/config-lgsm/avserver/_default.cfg index bbaf07daa..a77e347a8 100644 --- a/lgsm/config-default/config-lgsm/avserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/avserver/_default.cfg @@ -182,3 +182,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/bb2server/_default.cfg b/lgsm/config-default/config-lgsm/bb2server/_default.cfg index 1e566b88b..6557890a1 100644 --- a/lgsm/config-default/config-lgsm/bb2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bb2server/_default.cfg @@ -191,3 +191,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/bbserver/_default.cfg b/lgsm/config-default/config-lgsm/bbserver/_default.cfg index 118f65547..ad283e5aa 100644 --- a/lgsm/config-default/config-lgsm/bbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bbserver/_default.cfg @@ -186,3 +186,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/bdserver/_default.cfg b/lgsm/config-default/config-lgsm/bdserver/_default.cfg index eef61562c..07d5465d0 100644 --- a/lgsm/config-default/config-lgsm/bdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bdserver/_default.cfg @@ -185,3 +185,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg index c6da048f9..4d2651a9a 100644 --- a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg @@ -168,3 +168,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/bfvserver/_default.cfg b/lgsm/config-default/config-lgsm/bfvserver/_default.cfg index 9acc98e5b..27d7cd504 100644 --- a/lgsm/config-default/config-lgsm/bfvserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bfvserver/_default.cfg @@ -168,3 +168,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg index bd8145df3..5d13c758c 100644 --- a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg @@ -191,3 +191,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/boserver/_default.cfg b/lgsm/config-default/config-lgsm/boserver/_default.cfg index f2c2a3b03..4f44086c2 100644 --- a/lgsm/config-default/config-lgsm/boserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/boserver/_default.cfg @@ -184,3 +184,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/bsserver/_default.cfg b/lgsm/config-default/config-lgsm/bsserver/_default.cfg index 41ab3fba7..45f931aa4 100644 --- a/lgsm/config-default/config-lgsm/bsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bsserver/_default.cfg @@ -195,3 +195,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/btlserver/_default.cfg b/lgsm/config-default/config-lgsm/btlserver/_default.cfg index 81173ccb9..b1b738fe2 100644 --- a/lgsm/config-default/config-lgsm/btlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/btlserver/_default.cfg @@ -183,3 +183,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/btserver/_default.cfg b/lgsm/config-default/config-lgsm/btserver/_default.cfg index 11e175c18..1fda28f37 100644 --- a/lgsm/config-default/config-lgsm/btserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/btserver/_default.cfg @@ -178,3 +178,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/ccserver/_default.cfg b/lgsm/config-default/config-lgsm/ccserver/_default.cfg index 10ba0f8af..5a80c2ca5 100644 --- a/lgsm/config-default/config-lgsm/ccserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ccserver/_default.cfg @@ -186,3 +186,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/cdserver/_default.cfg b/lgsm/config-default/config-lgsm/cdserver/_default.cfg index 50eb14bf1..bf490c78a 100644 --- a/lgsm/config-default/config-lgsm/cdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/cdserver/_default.cfg @@ -178,3 +178,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/ckserver/_default.cfg b/lgsm/config-default/config-lgsm/ckserver/_default.cfg index ef1c0618c..3659bae6c 100644 --- a/lgsm/config-default/config-lgsm/ckserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ckserver/_default.cfg @@ -184,3 +184,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/cmwserver/_default.cfg b/lgsm/config-default/config-lgsm/cmwserver/_default.cfg index 0f05118e9..964185444 100644 --- a/lgsm/config-default/config-lgsm/cmwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/cmwserver/_default.cfg @@ -186,3 +186,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/cod2server/_default.cfg b/lgsm/config-default/config-lgsm/cod2server/_default.cfg index fca571d93..64990c12e 100644 --- a/lgsm/config-default/config-lgsm/cod2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod2server/_default.cfg @@ -171,3 +171,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/cod4server/_default.cfg b/lgsm/config-default/config-lgsm/cod4server/_default.cfg index 8389feb3c..f73a2a1e3 100644 --- a/lgsm/config-default/config-lgsm/cod4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod4server/_default.cfg @@ -171,3 +171,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/codserver/_default.cfg b/lgsm/config-default/config-lgsm/codserver/_default.cfg index 34883c0a1..4650e35ad 100644 --- a/lgsm/config-default/config-lgsm/codserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codserver/_default.cfg @@ -171,3 +171,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg index 3b922967d..47304668f 100644 --- a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg @@ -171,3 +171,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg index 58dec3f7a..bd0ed995a 100644 --- a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg @@ -171,3 +171,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/colserver/_default.cfg b/lgsm/config-default/config-lgsm/colserver/_default.cfg index 450b76765..a1cffc5c9 100644 --- a/lgsm/config-default/config-lgsm/colserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/colserver/_default.cfg @@ -181,3 +181,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/csczserver/_default.cfg b/lgsm/config-default/config-lgsm/csczserver/_default.cfg index 61767765b..7104cf096 100644 --- a/lgsm/config-default/config-lgsm/csczserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csczserver/_default.cfg @@ -186,3 +186,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg index 30ba7b8c5..dd83b4996 100644 --- a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg @@ -222,3 +222,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/csserver/_default.cfg b/lgsm/config-default/config-lgsm/csserver/_default.cfg index 83a6101da..a1f47e974 100644 --- a/lgsm/config-default/config-lgsm/csserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csserver/_default.cfg @@ -186,3 +186,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/cssserver/_default.cfg b/lgsm/config-default/config-lgsm/cssserver/_default.cfg index e06da982c..b84ed1d3c 100644 --- a/lgsm/config-default/config-lgsm/cssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/cssserver/_default.cfg @@ -191,3 +191,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/dabserver/_default.cfg b/lgsm/config-default/config-lgsm/dabserver/_default.cfg index 377ab85ff..450c2e7e0 100644 --- a/lgsm/config-default/config-lgsm/dabserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dabserver/_default.cfg @@ -186,3 +186,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/dayzserver/_default.cfg b/lgsm/config-default/config-lgsm/dayzserver/_default.cfg index 45042cf07..d6d63d2b1 100644 --- a/lgsm/config-default/config-lgsm/dayzserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dayzserver/_default.cfg @@ -200,3 +200,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/dmcserver/_default.cfg b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg index b8d7d382c..8e734fe96 100644 --- a/lgsm/config-default/config-lgsm/dmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg @@ -186,3 +186,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/dodrserver/_default.cfg b/lgsm/config-default/config-lgsm/dodrserver/_default.cfg index 41d55374b..b176fc637 100644 --- a/lgsm/config-default/config-lgsm/dodrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodrserver/_default.cfg @@ -184,3 +184,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/dodserver/_default.cfg b/lgsm/config-default/config-lgsm/dodserver/_default.cfg index 12076ed80..45e6b8449 100644 --- a/lgsm/config-default/config-lgsm/dodserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodserver/_default.cfg @@ -186,3 +186,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/dodsserver/_default.cfg b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg index b938891db..83be0acb8 100644 --- a/lgsm/config-default/config-lgsm/dodsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg @@ -186,3 +186,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/doiserver/_default.cfg b/lgsm/config-default/config-lgsm/doiserver/_default.cfg index f1eac4968..2a1ce62bc 100644 --- a/lgsm/config-default/config-lgsm/doiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/doiserver/_default.cfg @@ -187,3 +187,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/dstserver/_default.cfg b/lgsm/config-default/config-lgsm/dstserver/_default.cfg index fa6c79315..b5b2f50c9 100644 --- a/lgsm/config-default/config-lgsm/dstserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dstserver/_default.cfg @@ -193,3 +193,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/dysserver/_default.cfg b/lgsm/config-default/config-lgsm/dysserver/_default.cfg index 8ac508ca9..f567dab6e 100644 --- a/lgsm/config-default/config-lgsm/dysserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dysserver/_default.cfg @@ -191,3 +191,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg index db4669132..174ef357c 100644 --- a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg @@ -179,3 +179,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/emserver/_default.cfg b/lgsm/config-default/config-lgsm/emserver/_default.cfg index 16db942a4..8181f7f1e 100644 --- a/lgsm/config-default/config-lgsm/emserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/emserver/_default.cfg @@ -191,3 +191,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/etlserver/_default.cfg b/lgsm/config-default/config-lgsm/etlserver/_default.cfg index 488fe649a..e36ab3581 100644 --- a/lgsm/config-default/config-lgsm/etlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/etlserver/_default.cfg @@ -165,3 +165,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/ets2server/_default.cfg b/lgsm/config-default/config-lgsm/ets2server/_default.cfg index 2d0176133..4edca5194 100644 --- a/lgsm/config-default/config-lgsm/ets2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ets2server/_default.cfg @@ -177,3 +177,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/fctrserver/_default.cfg b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg index 9f010510e..c58ee2789 100644 --- a/lgsm/config-default/config-lgsm/fctrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg @@ -176,3 +176,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/fofserver/_default.cfg b/lgsm/config-default/config-lgsm/fofserver/_default.cfg index 3c2adf8af..623900384 100644 --- a/lgsm/config-default/config-lgsm/fofserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/fofserver/_default.cfg @@ -186,3 +186,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg index 1f569df9c..aad52e802 100644 --- a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg @@ -199,3 +199,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg index 3b2b69a58..4763fc423 100644 --- a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg @@ -186,3 +186,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/hldmserver/_default.cfg b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg index f595afc2a..f8d3887ae 100644 --- a/lgsm/config-default/config-lgsm/hldmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg @@ -185,3 +185,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg index 59aada076..2e4f061e4 100644 --- a/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg @@ -186,3 +186,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/hwserver/_default.cfg b/lgsm/config-default/config-lgsm/hwserver/_default.cfg index 1d54b8eb2..6f156f9d9 100644 --- a/lgsm/config-default/config-lgsm/hwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hwserver/_default.cfg @@ -14,7 +14,7 @@ ip="0.0.0.0" port="12871" queryport="12881" maxplayers="20" -defaultmap="" # Optional +defaultmap="" # Optional creativemode="0" # Free Build: creativemode="1" gamelog="gamelog.txt" @@ -195,3 +195,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/insserver/_default.cfg b/lgsm/config-default/config-lgsm/insserver/_default.cfg index c7adf3e65..d6d65d863 100644 --- a/lgsm/config-default/config-lgsm/insserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/insserver/_default.cfg @@ -192,3 +192,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/inssserver/_default.cfg b/lgsm/config-default/config-lgsm/inssserver/_default.cfg index 66678d284..5317f6be9 100644 --- a/lgsm/config-default/config-lgsm/inssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/inssserver/_default.cfg @@ -190,3 +190,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/iosserver/_default.cfg b/lgsm/config-default/config-lgsm/iosserver/_default.cfg index c81bc4002..d587e3719 100644 --- a/lgsm/config-default/config-lgsm/iosserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/iosserver/_default.cfg @@ -186,3 +186,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/jc2server/_default.cfg b/lgsm/config-default/config-lgsm/jc2server/_default.cfg index 01043a35e..6c36a7f69 100644 --- a/lgsm/config-default/config-lgsm/jc2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc2server/_default.cfg @@ -178,3 +178,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/jc3server/_default.cfg b/lgsm/config-default/config-lgsm/jc3server/_default.cfg index a1aacafb5..fd049f80d 100644 --- a/lgsm/config-default/config-lgsm/jc3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc3server/_default.cfg @@ -177,3 +177,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/jk2server/_default.cfg b/lgsm/config-default/config-lgsm/jk2server/_default.cfg index 700ba8fbb..0675729e4 100644 --- a/lgsm/config-default/config-lgsm/jk2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jk2server/_default.cfg @@ -187,3 +187,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/kf2server/_default.cfg b/lgsm/config-default/config-lgsm/kf2server/_default.cfg index a60bbd1a2..a8c3c72bf 100644 --- a/lgsm/config-default/config-lgsm/kf2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/kf2server/_default.cfg @@ -184,3 +184,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/kfserver/_default.cfg b/lgsm/config-default/config-lgsm/kfserver/_default.cfg index 74ffea9af..71b1a178b 100644 --- a/lgsm/config-default/config-lgsm/kfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/kfserver/_default.cfg @@ -194,3 +194,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/l4d2server/_default.cfg b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg index 4fb938983..3ef547c22 100644 --- a/lgsm/config-default/config-lgsm/l4d2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg @@ -185,3 +185,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/l4dserver/_default.cfg b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg index 838a65efb..c0cbd2452 100644 --- a/lgsm/config-default/config-lgsm/l4dserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg @@ -185,3 +185,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/loserver/_default.cfg b/lgsm/config-default/config-lgsm/loserver/_default.cfg index 15ebddde5..d4056faf9 100644 --- a/lgsm/config-default/config-lgsm/loserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/loserver/_default.cfg @@ -189,3 +189,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/mcbserver/_default.cfg b/lgsm/config-default/config-lgsm/mcbserver/_default.cfg index bc64ee883..f8fddf0c0 100644 --- a/lgsm/config-default/config-lgsm/mcbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mcbserver/_default.cfg @@ -171,3 +171,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/mcserver/_default.cfg b/lgsm/config-default/config-lgsm/mcserver/_default.cfg index fd7b8a71e..c12265f9f 100644 --- a/lgsm/config-default/config-lgsm/mcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mcserver/_default.cfg @@ -178,3 +178,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/mhserver/_default.cfg b/lgsm/config-default/config-lgsm/mhserver/_default.cfg index 81ab22a95..1011e8768 100644 --- a/lgsm/config-default/config-lgsm/mhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mhserver/_default.cfg @@ -186,3 +186,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg index a9f5fc840..0077221f4 100644 --- a/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg @@ -170,3 +170,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/momserver/_default.cfg b/lgsm/config-default/config-lgsm/momserver/_default.cfg index a19d077fe..6ebc106b9 100644 --- a/lgsm/config-default/config-lgsm/momserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/momserver/_default.cfg @@ -184,3 +184,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg index ac7d4e939..c001c7bf1 100644 --- a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg @@ -170,3 +170,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/ndserver/_default.cfg b/lgsm/config-default/config-lgsm/ndserver/_default.cfg index 9653eb52b..935659c83 100644 --- a/lgsm/config-default/config-lgsm/ndserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ndserver/_default.cfg @@ -186,3 +186,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/necserver/_default.cfg b/lgsm/config-default/config-lgsm/necserver/_default.cfg index af49cb3e2..5d3b4d887 100644 --- a/lgsm/config-default/config-lgsm/necserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/necserver/_default.cfg @@ -180,3 +180,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg index 5f412cd4d..241e535f4 100644 --- a/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg @@ -191,3 +191,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg index 73cf810f1..bc3e20cd1 100644 --- a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg @@ -191,3 +191,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/ns2server/_default.cfg b/lgsm/config-default/config-lgsm/ns2server/_default.cfg index 83dfd991b..d3fa2ad13 100644 --- a/lgsm/config-default/config-lgsm/ns2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2server/_default.cfg @@ -191,3 +191,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/nsserver/_default.cfg b/lgsm/config-default/config-lgsm/nsserver/_default.cfg index 4292b1f2a..5a63b2edf 100644 --- a/lgsm/config-default/config-lgsm/nsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/nsserver/_default.cfg @@ -186,3 +186,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/onsetserver/_default.cfg b/lgsm/config-default/config-lgsm/onsetserver/_default.cfg index 172953609..2c270bfc5 100644 --- a/lgsm/config-default/config-lgsm/onsetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/onsetserver/_default.cfg @@ -178,3 +178,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/opforserver/_default.cfg b/lgsm/config-default/config-lgsm/opforserver/_default.cfg index d10367f63..691c69b3a 100644 --- a/lgsm/config-default/config-lgsm/opforserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/opforserver/_default.cfg @@ -186,3 +186,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/pc2server/_default.cfg b/lgsm/config-default/config-lgsm/pc2server/_default.cfg index e43f150fd..72f87b4f0 100644 --- a/lgsm/config-default/config-lgsm/pc2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/pc2server/_default.cfg @@ -182,3 +182,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/pcserver/_default.cfg b/lgsm/config-default/config-lgsm/pcserver/_default.cfg index cb82ffca5..af31b615b 100644 --- a/lgsm/config-default/config-lgsm/pcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pcserver/_default.cfg @@ -178,3 +178,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/pmcserver/_default.cfg b/lgsm/config-default/config-lgsm/pmcserver/_default.cfg index 704d63ff3..e8f69161e 100644 --- a/lgsm/config-default/config-lgsm/pmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pmcserver/_default.cfg @@ -176,3 +176,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg index 69501dbf3..f1ccede86 100644 --- a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg @@ -188,3 +188,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg index 1689af811..6cb271de0 100644 --- a/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg @@ -186,3 +186,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/pvrserver/_default.cfg b/lgsm/config-default/config-lgsm/pvrserver/_default.cfg index 45a2b8fbd..8d27cf08c 100644 --- a/lgsm/config-default/config-lgsm/pvrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pvrserver/_default.cfg @@ -185,3 +185,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/pzserver/_default.cfg b/lgsm/config-default/config-lgsm/pzserver/_default.cfg index 2d284187f..399c43f0f 100644 --- a/lgsm/config-default/config-lgsm/pzserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pzserver/_default.cfg @@ -182,3 +182,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/q2server/_default.cfg b/lgsm/config-default/config-lgsm/q2server/_default.cfg index ea1061a70..526e27854 100644 --- a/lgsm/config-default/config-lgsm/q2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/q2server/_default.cfg @@ -170,3 +170,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/q3server/_default.cfg b/lgsm/config-default/config-lgsm/q3server/_default.cfg index 5621dec15..d8fda33d7 100644 --- a/lgsm/config-default/config-lgsm/q3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/q3server/_default.cfg @@ -170,3 +170,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/qlserver/_default.cfg b/lgsm/config-default/config-lgsm/qlserver/_default.cfg index c2c0d0f24..5b1444ed9 100644 --- a/lgsm/config-default/config-lgsm/qlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/qlserver/_default.cfg @@ -179,3 +179,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/qwserver/_default.cfg b/lgsm/config-default/config-lgsm/qwserver/_default.cfg index 9435b2199..1e9482c8c 100644 --- a/lgsm/config-default/config-lgsm/qwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/qwserver/_default.cfg @@ -169,3 +169,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg index d36a4c1f2..231ab423a 100644 --- a/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg @@ -186,3 +186,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/roserver/_default.cfg b/lgsm/config-default/config-lgsm/roserver/_default.cfg index 58e3f4fe9..9ff217a8b 100644 --- a/lgsm/config-default/config-lgsm/roserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/roserver/_default.cfg @@ -190,3 +190,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg b/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg index 847c8a1dd..3c134592a 100644 --- a/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg @@ -170,3 +170,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/rustserver/_default.cfg b/lgsm/config-default/config-lgsm/rustserver/_default.cfg index d43a15152..acda7f6e4 100644 --- a/lgsm/config-default/config-lgsm/rustserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rustserver/_default.cfg @@ -17,15 +17,15 @@ queryport=28017 rconpassword="CHANGE_ME" rconweb="1" # Value is: 1 for the Facepunch web panel, Rustadmin desktop and Rustadmin Online; 0 for RCON tools like Rusty. servername="Rust" -gamemode="vanilla" # Values: vanilla, softcore ( Doc: https://wiki.facepunch.com/rust/server-gamemodes ) +gamemode="vanilla" # Values: vanilla, softcore ( Doc: https://wiki.facepunch.com/rust/server-gamemodes ) serverlevel="Procedural Map" # Values: Procedural Map, Barren, HapisIsland, SavasIsland -customlevelurl="" # Custom level url. +server.levelurl \"${customlevelurl}\" -seed="" # range: 1-2147483647, used to reproduce a procedural map. -salt="" # range: unknown, used to recover a known setting from an existing map. +customlevelurl="" # Custom level url. +server.levelurl \"${customlevelurl}\" +seed="" # range: 1-2147483647, used to reproduce a procedural map. +salt="" # range: unknown, used to recover a known setting from an existing map. maxplayers="50" -worldsize="3000" # default: 3000, range: 1000-6000, map size in meters. +worldsize="3000" # default: 3000, range: 1000-6000, map size in meters. saveinterval="300" # Auto-save in seconds. -tickrate="30" # default: 30, range: 15-100. +tickrate="30" # default: 30, range: 15-100. ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters startparameters="-batchmode +app.listenip ${ip} +app.port ${appport} +server.ip ${ip} +server.port ${port} +server.queryport ${queryport} +server.tickrate ${tickrate} +server.hostname \"${servername}\" +server.identity \"${selfname}\" +server.gamemode ${gamemode} +server.level \"${serverlevel}\" +server.seed ${seed} +server.salt ${salt} +server.maxplayers ${maxplayers} +server.worldsize ${worldsize} +server.saveinterval ${saveinterval} +rcon.web ${rconweb} +rcon.ip ${ip} +rcon.port ${rconport} +rcon.password \"${rconpassword}\" -logfile" @@ -199,3 +199,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/rwserver/_default.cfg b/lgsm/config-default/config-lgsm/rwserver/_default.cfg index f1c09e189..a31449a05 100644 --- a/lgsm/config-default/config-lgsm/rwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rwserver/_default.cfg @@ -182,3 +182,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/sampserver/_default.cfg b/lgsm/config-default/config-lgsm/sampserver/_default.cfg index 6883fe589..eecc9cce2 100644 --- a/lgsm/config-default/config-lgsm/sampserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sampserver/_default.cfg @@ -169,3 +169,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg index 6805d6395..899842b08 100644 --- a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg @@ -14,7 +14,7 @@ queryport="27015" defaultmap="StationKappa" servername="LinuxGSM Server" serverpassword="NOT SET" # Can't be adjusted currently -maxplayers="8" # Can't be adjusted currently +maxplayers="8" # Can't be adjusted currently ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters startparameters="Port=${port}?QueryPort=${queryport} -startup_map ${defaultmap} -server_name \"${servername}\"" @@ -186,3 +186,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/sbserver/_default.cfg b/lgsm/config-default/config-lgsm/sbserver/_default.cfg index 13815fbcb..521500591 100644 --- a/lgsm/config-default/config-lgsm/sbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbserver/_default.cfg @@ -185,3 +185,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/scpslserver/_default.cfg b/lgsm/config-default/config-lgsm/scpslserver/_default.cfg index ac948d864..3409fe994 100644 --- a/lgsm/config-default/config-lgsm/scpslserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/scpslserver/_default.cfg @@ -183,3 +183,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg b/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg index 285bd0a49..73d0605c6 100644 --- a/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg @@ -183,3 +183,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg index 090309696..270e8f84e 100644 --- a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg @@ -183,3 +183,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/sfcserver/_default.cfg b/lgsm/config-default/config-lgsm/sfcserver/_default.cfg index 5b1071a3b..579790be7 100644 --- a/lgsm/config-default/config-lgsm/sfcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sfcserver/_default.cfg @@ -186,3 +186,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/sfserver/_default.cfg b/lgsm/config-default/config-lgsm/sfserver/_default.cfg index 45ca1151a..dfe3857c0 100644 --- a/lgsm/config-default/config-lgsm/sfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sfserver/_default.cfg @@ -184,3 +184,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/sof2server/_default.cfg b/lgsm/config-default/config-lgsm/sof2server/_default.cfg index 094754914..a0f878e45 100644 --- a/lgsm/config-default/config-lgsm/sof2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/sof2server/_default.cfg @@ -170,3 +170,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/solserver/_default.cfg b/lgsm/config-default/config-lgsm/solserver/_default.cfg index 820492509..6db45dc53 100644 --- a/lgsm/config-default/config-lgsm/solserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/solserver/_default.cfg @@ -182,3 +182,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/squadserver/_default.cfg b/lgsm/config-default/config-lgsm/squadserver/_default.cfg index 0a343cfdf..79240e2bf 100644 --- a/lgsm/config-default/config-lgsm/squadserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/squadserver/_default.cfg @@ -184,3 +184,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/stnserver/_default.cfg b/lgsm/config-default/config-lgsm/stnserver/_default.cfg index 0b9510d4c..d26cef127 100644 --- a/lgsm/config-default/config-lgsm/stnserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/stnserver/_default.cfg @@ -184,3 +184,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/stserver/_default.cfg b/lgsm/config-default/config-lgsm/stserver/_default.cfg index 26da17f43..834c2d054 100644 --- a/lgsm/config-default/config-lgsm/stserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/stserver/_default.cfg @@ -189,3 +189,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/svenserver/_default.cfg b/lgsm/config-default/config-lgsm/svenserver/_default.cfg index f8feb47f4..ec164b90b 100644 --- a/lgsm/config-default/config-lgsm/svenserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/svenserver/_default.cfg @@ -185,3 +185,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg index c0aaea6c6..a286b0571 100644 --- a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg @@ -185,3 +185,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/tf2server/_default.cfg b/lgsm/config-default/config-lgsm/tf2server/_default.cfg index 16ab36696..824b6e7e3 100644 --- a/lgsm/config-default/config-lgsm/tf2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/tf2server/_default.cfg @@ -191,3 +191,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg index 827b32736..968350fd8 100644 --- a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg @@ -186,3 +186,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/tiserver/_default.cfg b/lgsm/config-default/config-lgsm/tiserver/_default.cfg index 1de6910b5..f31864df3 100644 --- a/lgsm/config-default/config-lgsm/tiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tiserver/_default.cfg @@ -185,3 +185,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/ts3server/_default.cfg b/lgsm/config-default/config-lgsm/ts3server/_default.cfg index f676309d0..963920a6c 100644 --- a/lgsm/config-default/config-lgsm/ts3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ts3server/_default.cfg @@ -169,3 +169,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/tsserver/_default.cfg b/lgsm/config-default/config-lgsm/tsserver/_default.cfg index c1c99b24a..1b4ac5bfc 100644 --- a/lgsm/config-default/config-lgsm/tsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tsserver/_default.cfg @@ -186,3 +186,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/tuserver/_default.cfg b/lgsm/config-default/config-lgsm/tuserver/_default.cfg index 5fdfd6447..816310062 100644 --- a/lgsm/config-default/config-lgsm/tuserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tuserver/_default.cfg @@ -188,3 +188,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/twserver/_default.cfg b/lgsm/config-default/config-lgsm/twserver/_default.cfg index 791c93da5..8c4b32683 100644 --- a/lgsm/config-default/config-lgsm/twserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/twserver/_default.cfg @@ -186,3 +186,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/untserver/_default.cfg b/lgsm/config-default/config-lgsm/untserver/_default.cfg index 41d1981e7..c3c5b7e14 100644 --- a/lgsm/config-default/config-lgsm/untserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/untserver/_default.cfg @@ -189,3 +189,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg index b3ca481cd..0df674dc6 100644 --- a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg @@ -172,3 +172,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/ut3server/_default.cfg b/lgsm/config-default/config-lgsm/ut3server/_default.cfg index 49cd6b7d5..87b99bdb8 100644 --- a/lgsm/config-default/config-lgsm/ut3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut3server/_default.cfg @@ -187,3 +187,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/ut99server/_default.cfg b/lgsm/config-default/config-lgsm/ut99server/_default.cfg index 5af870f50..dede89687 100644 --- a/lgsm/config-default/config-lgsm/ut99server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut99server/_default.cfg @@ -170,3 +170,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/utserver/_default.cfg b/lgsm/config-default/config-lgsm/utserver/_default.cfg index 6b6603221..392598840 100644 --- a/lgsm/config-default/config-lgsm/utserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/utserver/_default.cfg @@ -173,3 +173,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/vhserver/_default.cfg b/lgsm/config-default/config-lgsm/vhserver/_default.cfg index 85f13614d..8bb87887b 100644 --- a/lgsm/config-default/config-lgsm/vhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vhserver/_default.cfg @@ -192,3 +192,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/vintsserver/_default.cfg b/lgsm/config-default/config-lgsm/vintsserver/_default.cfg index 7009f02cb..a207ecdb7 100644 --- a/lgsm/config-default/config-lgsm/vintsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vintsserver/_default.cfg @@ -173,3 +173,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/vpmcserver/_default.cfg b/lgsm/config-default/config-lgsm/vpmcserver/_default.cfg index 6755e0e51..20b587f32 100644 --- a/lgsm/config-default/config-lgsm/vpmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vpmcserver/_default.cfg @@ -177,3 +177,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/vsserver/_default.cfg b/lgsm/config-default/config-lgsm/vsserver/_default.cfg index a441abd01..94510c334 100644 --- a/lgsm/config-default/config-lgsm/vsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vsserver/_default.cfg @@ -186,3 +186,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/wetserver/_default.cfg b/lgsm/config-default/config-lgsm/wetserver/_default.cfg index 012b2df1c..994abb5c0 100644 --- a/lgsm/config-default/config-lgsm/wetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wetserver/_default.cfg @@ -165,3 +165,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/wfserver/_default.cfg b/lgsm/config-default/config-lgsm/wfserver/_default.cfg index eeedf5f18..fc53e641c 100644 --- a/lgsm/config-default/config-lgsm/wfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wfserver/_default.cfg @@ -184,3 +184,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/wmcserver/_default.cfg b/lgsm/config-default/config-lgsm/wmcserver/_default.cfg index 229d7bef5..cdf56e71e 100644 --- a/lgsm/config-default/config-lgsm/wmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wmcserver/_default.cfg @@ -176,3 +176,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg index a70fa371f..3743e899f 100644 --- a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg @@ -181,3 +181,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/zmrserver/_default.cfg b/lgsm/config-default/config-lgsm/zmrserver/_default.cfg index 4b87f9172..c2621b48a 100644 --- a/lgsm/config-default/config-lgsm/zmrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/zmrserver/_default.cfg @@ -186,3 +186,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/zpsserver/_default.cfg b/lgsm/config-default/config-lgsm/zpsserver/_default.cfg index a5fc616cf..777403dfd 100644 --- a/lgsm/config-default/config-lgsm/zpsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/zpsserver/_default.cfg @@ -191,3 +191,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/functions/command_start.sh b/lgsm/functions/command_start.sh index 4b01984f4..04c6b4e64 100755 --- a/lgsm/functions/command_start.sh +++ b/lgsm/functions/command_start.sh @@ -8,6 +8,7 @@ commandname="START" commandaction="Starting" functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +addtimestamp="gawk '{ print strftime(\\\"[$logtimestampformat]\\\"), \\\$0 }'" fn_firstcommand_set fn_start_teamspeak3() { @@ -92,8 +93,13 @@ fn_start_tmux() { fn_script_log "tmux version: master (user compiled)" echo -e "tmux version: master (user compiled)" >> "${consolelog}" if [ "${consolelogging}" == "on" ] || [ -z "${consolelogging}" ]; then - tmux pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'" + if [ "$logtimestamp" == "on" ]; then + tmux pipe-pane -o -t "${sessionname}" "exec bash -c \"cat | $addtimestamp\" >> '${consolelog}'" + else + tmux pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'" + fi fi + elif [ -n "${tmuxv}" ]; then # tmux pipe-pane not supported in tmux versions < 1.6. if [ "${tmuxvdigit}" -lt "16" ]; then @@ -108,7 +114,11 @@ fn_start_tmux() { Currently installed: $(tmux -V)" > "${consolelog}" # Console logging enable or not set. elif [ "${consolelogging}" == "on" ] || [ -z "${consolelogging}" ]; then - tmux pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'" + if [ "$logtimestamp" == "on" ]; then + tmux pipe-pane -o -t "${sessionname}" "exec bash -c \"cat | $addtimestamp\" >> '${consolelog}'" + else + tmux pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'" + fi fi else echo -e "Unable to detect tmux version" >> "${consolelog}" @@ -137,7 +147,7 @@ fn_start_tmux() { echo -e "" echo -e "Error" echo -e "=================================" - cat "${lgsmlogdir}/.${selfname}-tmux-error.tmp" | tee -a "${lgsmlog}" + tee -a "${lgsmlog}" < "${lgsmlogdir}/.${selfname}-tmux-error.tmp" # Detected error https://linuxgsm.com/support if grep -c "Operation not permitted" "${lgsmlogdir}/.${selfname}-tmux-error.tmp"; then From e61a38bc5c6e21faba16949dcac7c1f3c406cf97 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Apr 2023 10:43:54 +0100 Subject: [PATCH 103/374] build(deps): bump webfactory/ssh-agent from 0.7.0 to 0.8.0 (#4151) * chore: auto add game server requests to gh project * build(deps): bump webfactory/ssh-agent from 0.7.0 to 0.8.0 Bumps [webfactory/ssh-agent](https://github.com/webfactory/ssh-agent) from 0.7.0 to 0.8.0. - [Release notes](https://github.com/webfactory/ssh-agent/releases) - [Changelog](https://github.com/webfactory/ssh-agent/blob/master/CHANGELOG.md) - [Commits](https://github.com/webfactory/ssh-agent/compare/v0.7.0...v0.8.0) --- updated-dependencies: - dependency-name: webfactory/ssh-agent dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --------- Signed-off-by: dependabot[bot] Co-authored-by: Daniel Gibbs Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/add-to-project.yml | 17 +++++++++++++++++ .github/workflows/git-sync.yml | 4 ++-- 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/add-to-project.yml diff --git a/.github/workflows/add-to-project.yml b/.github/workflows/add-to-project.yml new file mode 100644 index 000000000..56a42c729 --- /dev/null +++ b/.github/workflows/add-to-project.yml @@ -0,0 +1,17 @@ +name: Add to project +on: + issues: + types: + - opened + - labeled + +jobs: + add-to-project: + name: Add game server requests to project + runs-on: ubuntu-latest + steps: + - uses: actions/add-to-project@v0.4.0 + with: + project-url: https://github.com/orgs/GameServerManagers/projects/11 + github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} + labeled: "type: game server request" diff --git a/.github/workflows/git-sync.yml b/.github/workflows/git-sync.yml index f07d1f3b4..e013ae32d 100644 --- a/.github/workflows/git-sync.yml +++ b/.github/workflows/git-sync.yml @@ -10,8 +10,8 @@ jobs: GitHub-to-Bitbucket: runs-on: ubuntu-latest steps: - - name: webfactory/ssh-agent@v0.7.0 - uses: webfactory/ssh-agent@v0.7.0 + - name: webfactory/ssh-agent@v0.8.0 + uses: webfactory/ssh-agent@v0.8.0 with: ssh-private-key: ${{ secrets.BITBUCKET_SECRET }} From 5377762ef0cc4ab7556ac11dd44821296f668f7f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Apr 2023 10:45:28 +0100 Subject: [PATCH 104/374] build(deps): bump convictional/trigger-workflow-and-wait from 1.3.0 to 1.6.5 (#4100) * chore: auto add game server requests to gh project * build(deps): bump convictional/trigger-workflow-and-wait Bumps [convictional/trigger-workflow-and-wait](https://github.com/convictional/trigger-workflow-and-wait) from 1.3.0 to 1.6.5. - [Release notes](https://github.com/convictional/trigger-workflow-and-wait/releases) - [Commits](https://github.com/convictional/trigger-workflow-and-wait/compare/v1.3.0...v1.6.5) --- updated-dependencies: - dependency-name: convictional/trigger-workflow-and-wait dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --------- Signed-off-by: dependabot[bot] Co-authored-by: Daniel Gibbs Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/trigger-docker-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/trigger-docker-build.yml b/.github/workflows/trigger-docker-build.yml index adb43343f..dec3dd462 100644 --- a/.github/workflows/trigger-docker-build.yml +++ b/.github/workflows/trigger-docker-build.yml @@ -8,7 +8,7 @@ jobs: name: Trigger Build docker-linuxgsm runs-on: ubuntu-latest steps: - - uses: convictional/trigger-workflow-and-wait@v1.3.0 + - uses: convictional/trigger-workflow-and-wait@v1.6.5 with: owner: GameServerManagers repo: docker-linuxgsm @@ -19,7 +19,7 @@ jobs: name: Trigger Build docker-linuxgsm runs-on: ubuntu-latest steps: - - uses: convictional/trigger-workflow-and-wait@v1.3.0 + - uses: convictional/trigger-workflow-and-wait@v1.6.5 with: owner: GameServerManagers repo: docker-gameserver From 483498d5190e54fa669affa3a25d3ac639f44326 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Apr 2023 10:45:52 +0100 Subject: [PATCH 105/374] build(deps): bump actions/add-to-project from 0.4.0 to 0.4.1 (#4126) * chore: auto add game server requests to gh project * build(deps): bump actions/add-to-project from 0.4.0 to 0.4.1 Bumps [actions/add-to-project](https://github.com/actions/add-to-project) from 0.4.0 to 0.4.1. - [Release notes](https://github.com/actions/add-to-project/releases) - [Commits](https://github.com/actions/add-to-project/compare/v0.4.0...v0.4.1) --- updated-dependencies: - dependency-name: actions/add-to-project dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --------- Signed-off-by: dependabot[bot] Co-authored-by: Daniel Gibbs Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/add-to-project.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/add-to-project.yml b/.github/workflows/add-to-project.yml index 56a42c729..8e71d1cb5 100644 --- a/.github/workflows/add-to-project.yml +++ b/.github/workflows/add-to-project.yml @@ -10,7 +10,7 @@ jobs: name: Add game server requests to project runs-on: ubuntu-latest steps: - - uses: actions/add-to-project@v0.4.0 + - uses: actions/add-to-project@v0.4.1 with: project-url: https://github.com/orgs/GameServerManagers/projects/11 github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} From 52ed09c1bbd226d48711f6a77780ed5fa6020063 Mon Sep 17 00:00:00 2001 From: jusito <17811819+jusito@users.noreply.github.com> Date: Sat, 1 Apr 2023 16:44:27 +0200 Subject: [PATCH 106/374] fix(gamedig): default exitcode & var name (#4161) --- lgsm/functions/query_gamedig.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/query_gamedig.sh b/lgsm/functions/query_gamedig.sh index 43f748bcc..265607acd 100755 --- a/lgsm/functions/query_gamedig.sh +++ b/lgsm/functions/query_gamedig.sh @@ -7,7 +7,7 @@ # https://github.com/sonicsnes/node-gamedig functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - +querystatus="2" # Check if gamedig and jq are installed. if [ "$(command -v gamedig 2> /dev/null)" ] && [ "$(command -v jq 2> /dev/null)" ]; then @@ -81,7 +81,7 @@ if [ "$(command -v gamedig 2> /dev/null)" ] && [ "$(command -v jq 2> /dev/null)" # server version. if [ "${querytype}" == "teamspeak3" ]; then - dversion=$(echo "${gamedigraw}" | jq -re '.raw.virtualserver_version') + gdversion=$(echo "${gamedigraw}" | jq -re '.raw.virtualserver_version') else gdversion=$(echo "${gamedigraw}" | jq -re '.raw.version') fi From 4c717c5b94e5c9e10abd7b03d7230fdadc3eb3bf Mon Sep 17 00:00:00 2001 From: jusito <17811819+jusito@users.noreply.github.com> Date: Sat, 1 Apr 2023 23:32:56 +0200 Subject: [PATCH 107/374] fix(details): port output with whitespaces (#4160) --- lgsm/functions/info_messages.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index 69123543a..5478987f1 100755 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -773,7 +773,7 @@ fn_port() { portname="${1}" porttype="${2}" portprotocol="${3}" - echo -e "${portname}\t${!porttype}\t${portprotocol}\t$(echo "${ssinfo}" | grep ${portprotocol} | grep ${!porttype} | wc -l)" + echo -e "${portname}\t${!porttype}\t${portprotocol}\t$(echo "${ssinfo}" | grep "${portprotocol}" | grep -c "${!porttype}")" fi } From 75852abb42c842b60e61b5cf39d32f8d057b4312 Mon Sep 17 00:00:00 2001 From: jusito <17811819+jusito@users.noreply.github.com> Date: Sat, 1 Apr 2023 23:37:10 +0200 Subject: [PATCH 108/374] fix(core): unhandled curl fail (#4159) --- lgsm/functions/core_dl.sh | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index d19425ac5..53a60cc1a 100755 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -383,17 +383,21 @@ fn_fetch_file() { fi # Trap will remove part downloaded files if canceled. trap fn_fetch_trap INT - # Larger files show a progress bar. - if [ "${local_filename##*.}" == "bz2" ] || [ "${local_filename##*.}" == "gz" ] || [ "${local_filename##*.}" == "zip" ] || [ "${local_filename##*.}" == "jar" ] || [ "${local_filename##*.}" == "xz" ]; then - echo -e "downloading ${local_filename}..." - fn_sleep_time - curlcmd=$(curl --connect-timeout 10 --progress-bar --fail -L -o "${local_filedir}/${local_filename}" "${fileurl}") - local exitcode=$? + curlcmd=(curl --connect-timeout 10 --fail -L -o "${local_filedir}/${local_filename}" --retry 2) + + # if is large file show progress, else be silent + local exitcode="" + large_files=("bz2" "gz" "zip" "jar" "xz") + if grep -qE "(^|\s)${local_filename##*.}(\s|$)" <<< "${large_files[@]}"; then echo -en "downloading ${local_filename}..." + fn_sleep_time + echo -en "\033[1K" + "${curlcmd[@]}" --progress-bar "${fileurl}" 2>&1 + exitcode="$?" else - curlcmd=$(curl --connect-timeout 10 -s --fail -L -o "${local_filedir}/${local_filename}" "${fileurl}") - local exitcode=$? echo -en "fetching ${fileurl_name} ${local_filename}...\c" + "${curlcmd[@]}" --silent --show-error "${fileurl}" 2>&1 + exitcode="$?" fi # Download will fail if downloads a html file. From 2fcc919d82434491697b2bd70731d479dc2734f8 Mon Sep 17 00:00:00 2001 From: jusito <17811819+jusito@users.noreply.github.com> Date: Sat, 1 Apr 2023 23:38:09 +0200 Subject: [PATCH 109/374] fix: check localhost ip first on fallback (#4158) --- lgsm/functions/check_ip.sh | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/lgsm/functions/check_ip.sh b/lgsm/functions/check_ip.sh index fc5d70f2c..bf301008f 100755 --- a/lgsm/functions/check_ip.sh +++ b/lgsm/functions/check_ip.sh @@ -26,32 +26,37 @@ for ethtool_command in "${ethtool_commands_array[@]}"; do fi done -getip=$(${ipcommand} -o -4 addr | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | sort -u | grep -v 127.0.0) -getipwc=$(${ipcommand} -o -4 addr | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | sort -u | grep -vc 127.0.0) +mapfile -t current_ips < <(${ipcommand} -o -4 addr | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | sort -u | grep -v 127.0.0) + +function fn_is_valid_ip() { + local ip="${1}" + # excluding 0.* ips also + grep -qEe '^[1-9]+[0-9]*\.[0-9]+\.[0-9]+\.[0-9]+$' <<< "${ip}" +} # Check if server has multiple IP addresses # If the IP variable has been set by user. -if [ -n "${ip}" ] && [ "${ip}" != "0.0.0.0" ]; then - queryips=("${ip}") - webadminip=("${ip}") - telnetip=("${ip}") +if fn_is_valid_ip "${ip}"; then + queryips=( "${ip}" ) + webadminip=( "${ip}" ) + telnetip=( "${ip}" ) # If game config does have an IP set. -elif [ -n "${configip}" ] && [ "${configip}" != "0.0.0.0" ]; then - queryips=("${configip}") +elif fn_is_valid_ip "${configip}";then + queryips=( "${configip}" ) ip="${configip}" webadminip=("${configip}") telnetip=("${configip}") # If there is only 1 server IP address. # Some IP details can automaticly use the one IP -elif [ "${getipwc}" == "1" ]; then - queryips=($(echo "${getip}")) +elif [ "${#current_ips[@]}" == "1" ]; then + queryips=( "127.0.0.1" "${current_ips[@]}" ) ip="0.0.0.0" - webadminip=("${getip}") - telnetip=("${getip}") + webadminip=("${current_ips[@]}") + telnetip=("${current_ips[@]}") # If no ip is set by the user and server has more than one IP. else - queryips=($(echo "${getip}")) + queryips=( "127.0.0.1" "${current_ips[@]}" ) ip="0.0.0.0" webadminip=("${ip}") telnetip=("${ip}") From 4fc6280ccad2ae0a57a051f71684e0386863b9b0 Mon Sep 17 00:00:00 2001 From: jusito <17811819+jusito@users.noreply.github.com> Date: Sat, 1 Apr 2023 23:44:34 +0200 Subject: [PATCH 110/374] refactor(fix.sh): removed error prone code (#4157) * refactor: removed error prone code * prettier --------- Co-authored-by: Daniel Gibbs --- lgsm/functions/fix.sh | 117 +++++++++++++----------------------------- 1 file changed, 37 insertions(+), 80 deletions(-) diff --git a/lgsm/functions/fix.sh b/lgsm/functions/fix.sh index 60a96059d..57f6a91fa 100755 --- a/lgsm/functions/fix.sh +++ b/lgsm/functions/fix.sh @@ -31,101 +31,58 @@ fn_fix_msg_end() { fi } +fn_exists_fix() { + local short="${1:?}" + + if [ "$(type -t "fix_${short}.sh")" == 'function' ]; then + return 0 + else + return 1 + fi +} + +fn_apply_fix() { + local phase_message="${1:?}" + local short="${2:?}" + + if fn_exists_fix "${short}"; then + "fix_${short}.sh" + else + fn_print_error_nl "${shortname} is marked to apply pre start fix but there is no fix registered" + fi +} + +apply_pre_start_fix=(arma3 armar ark av bt bo csgo cmw dst hw ins nmrih onset rust rw sdtd sfc sof2 squad st tf2 terraria ts3 mcb mta unt vh wurm zmr) +apply_post_install_fix=(av kf kf2 lo ro samp ut2k4 ut ut3) + +# validate registered fixes for safe development +for fix in "${apply_pre_start_fix[@]}" "${apply_post_install_fix[@]}"; do + if ! fn_exists_fix "${fix}"; then + fn_print_fail_nl "fix_${fix}.sh is registered but doesn't exist. Typo or did you miss to modify core_functions.sh?" + exitcode 1 + core_exit.sh + fi +done + # Fixes that are run on start. if [ "${commandname}" != "INSTALL" ] && [ -z "${fixbypass}" ]; then if [ "${appid}" ]; then fix_steamcmd.sh fi - if [ "${shortname}" == "arma3" ]; then - fix_arma3.sh - elif [ "${shortname}" == "armar" ]; then - fix_armar.sh - elif [ "${shortname}" == "ark" ]; then - fix_ark.sh - elif [ "${shortname}" == "av" ]; then - fix_av.sh - elif [ "${shortname}" == "bt" ]; then - fix_bt.sh - elif [ "${shortname}" == "bo" ]; then - fix_bo.sh - elif [ "${shortname}" == "csgo" ]; then - fix_csgo.sh - elif [ "${shortname}" == "cmw" ]; then - fix_cmw.sh - elif [ "${shortname}" == "dst" ]; then - fix_dst.sh - elif [ "${shortname}" == "hw" ]; then - fix_hw.sh - elif [ "${shortname}" == "ins" ]; then - fix_ins.sh - elif [ "${shortname}" == "nmrih" ]; then - fix_nmrih.sh - elif [ "${shortname}" == "onset" ]; then - fix_onset.sh - elif [ "${shortname}" == "rust" ]; then - fix_rust.sh - elif [ "${shortname}" == "rw" ]; then - fix_rw.sh - elif [ "${shortname}" == "sdtd" ]; then - fix_sdtd.sh - elif [ "${shortname}" == "sfc" ]; then - fix_sfc.sh - elif [ "${shortname}" == "sof2" ]; then - fix_sof2.sh - elif [ "${shortname}" == "squad" ]; then - fix_squad.sh - elif [ "${shortname}" == "st" ]; then - fix_st.sh - elif [ "${shortname}" == "tf2" ]; then - fix_tf2.sh - elif [ "${shortname}" == "terraria" ]; then - fix_terraria.sh - elif [ "${shortname}" == "ts3" ]; then - fix_ts3.sh - elif [ "${shortname}" == "mcb" ]; then - fix_mcb.sh - elif [ "${shortname}" == "mta" ]; then - fix_mta.sh - elif [ "${shortname}" == "unt" ]; then - fix_unt.sh - elif [ "${shortname}" == "vh" ]; then - fix_vh.sh - elif [ "${shortname}" == "wurm" ]; then - fix_wurm.sh - elif [ "${shortname}" == "zmr" ]; then - fix_zmr.sh + if grep -qEe "(^|\s)${shortname}(\s|$)" <<< "${apply_pre_start_fix[@]}"; then + fn_apply_fix "pre start" "${shortname}" fi fi # Fixes that are run on install only. if [ "${commandname}" == "INSTALL" ]; then - if [ "${shortname}" == "av" ] || [ "${shortname}" == "cmw" ] || [ "${shortname}" == "kf" ] || [ "${shortname}" == "kf2" ] || [ "${shortname}" == "lo" ] || [ "${shortname}" == "onset" ] || [ "${shortname}" == "ro" ] || [ "${shortname}" == "samp" ] || [ "${shortname}" == "ut2k4" ] || [ "${shortname}" == "ut" ] || [ "${shortname}" == "ut3" ]; then + if grep -qEe "(^|\s)${shortname}(\s|$)" <<< "${apply_post_install_fix[@]}"; then echo -e "" echo -e "${lightyellow}Applying Post-Install Fixes${default}" echo -e "=================================" fn_sleep_time postinstall=1 - if [ "${shortname}" == "av" ]; then - fix_av.sh - elif [ "${shortname}" == "kf" ]; then - fix_kf.sh - elif [ "${shortname}" == "kf2" ]; then - fix_kf2.sh - elif [ "${shortname}" == "lo" ]; then - fix_lo.sh - elif [ "${shortname}" == "ro" ]; then - fix_ro.sh - elif [ "${shortname}" == "samp" ]; then - fix_samp.sh - elif [ "${shortname}" == "ut2k4" ]; then - fix_ut2k4.sh - elif [ "${shortname}" == "ut" ]; then - fix_ut.sh - elif [ "${shortname}" == "ut3" ]; then - fix_ut3.sh - else - fn_print_information_nl "No fixes required." - fi + fn_apply_fix "post install" "${shortname}" fi fi From 6b7267bbf028e0a013c3f51a29330a8f60331e21 Mon Sep 17 00:00:00 2001 From: jusito <17811819+jusito@users.noreply.github.com> Date: Sat, 1 Apr 2023 23:56:43 +0200 Subject: [PATCH 111/374] fix: install successful without installation files (#4156) * fix: install successful without files * use fn_script_log_fatal --------- Co-authored-by: Daniel Gibbs --- lgsm/functions/install_server_files.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index 9316d6efd..e550e1455 100755 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -197,6 +197,9 @@ fn_install_server_files() { chmodx="nochmodx" run="norun" force="noforce" md5="0188ae86dbc9376f11ae3032dba2d665" + else + fn_print_fail_nl "Installing ${gamename} Server failed, missing default configuration" + fn_script_log_fatal "Installing ${gamename} Server failed, missing default configuration" fi fn_fetch_file "${remote_fileurl}" "" "" "" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" fn_dl_extract "${local_filedir}" "${local_filename}" "${serverfiles}" From 40e5009194a79e2cde6096b6b62dccd6030b198b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 2 Apr 2023 16:16:06 +0100 Subject: [PATCH 112/374] build(deps): bump FantasticFiasco/action-update-license-year from 2 to 3 (#4153) * chore: auto add game server requests to gh project * build(deps): bump FantasticFiasco/action-update-license-year from 2 to 3 Bumps [FantasticFiasco/action-update-license-year](https://github.com/FantasticFiasco/action-update-license-year) from 2 to 3. - [Release notes](https://github.com/FantasticFiasco/action-update-license-year/releases) - [Changelog](https://github.com/FantasticFiasco/action-update-license-year/blob/master/CHANGELOG.md) - [Commits](https://github.com/FantasticFiasco/action-update-license-year/compare/v2...v3) --- updated-dependencies: - dependency-name: FantasticFiasco/action-update-license-year dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --------- Signed-off-by: dependabot[bot] Co-authored-by: Daniel Gibbs Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/update-copyright-years-in-license-file.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-copyright-years-in-license-file.yml b/.github/workflows/update-copyright-years-in-license-file.yml index 347446d75..162a27944 100644 --- a/.github/workflows/update-copyright-years-in-license-file.yml +++ b/.github/workflows/update-copyright-years-in-license-file.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - - uses: FantasticFiasco/action-update-license-year@v2 + - uses: FantasticFiasco/action-update-license-year@v3 with: token: ${{ secrets.GITHUB_TOKEN }} path: LICENSE.md From a69825aa7c509d2678a451007327c2b055dddbd2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 2 Apr 2023 16:17:48 +0100 Subject: [PATCH 113/374] build(deps): bump github/issue-labeler from 2.5 to 3.1 (#4152) * chore: auto add game server requests to gh project * build(deps): bump github/issue-labeler from 2.5 to 3.1 Bumps [github/issue-labeler](https://github.com/github/issue-labeler) from 2.5 to 3.1. - [Release notes](https://github.com/github/issue-labeler/releases) - [Commits](https://github.com/github/issue-labeler/compare/v2.5...v3.1) --- updated-dependencies: - dependency-name: github/issue-labeler dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --------- Signed-off-by: dependabot[bot] Co-authored-by: Daniel Gibbs Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/labeler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index b5bb38498..ebf260f6f 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -15,7 +15,7 @@ jobs: issues: write # for github/issue-labeler to create or remove labels runs-on: ubuntu-latest steps: - - uses: github/issue-labeler@v2.5 + - uses: github/issue-labeler@v3.1 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" configuration-path: .github/labeler.yml From b07dac780762b19ee1f3cfd5e39621a3639f1d91 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 2 Apr 2023 16:26:22 +0100 Subject: [PATCH 114/374] fix: broken bitbucket button --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f0a9713cf..f710ff66d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@

LinuxGSM Codacy grade - GitHub Workflow Status + GitHub Workflow Status Discord SteamCMD MIT License From b9b641c300d45aa1524e4793102e786e0cf82a13 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 2 Apr 2023 16:38:12 +0100 Subject: [PATCH 115/374] prettier --- lgsm/functions/check_ip.sh | 18 +++++++++--------- lgsm/functions/command_monitor.sh | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lgsm/functions/check_ip.sh b/lgsm/functions/check_ip.sh index bf301008f..4b8eca5ec 100755 --- a/lgsm/functions/check_ip.sh +++ b/lgsm/functions/check_ip.sh @@ -12,7 +12,7 @@ info_game.sh ip_commands_array=("/bin/ip" "/usr/sbin/ip" "ip") for ip_command in "${ip_commands_array[@]}"; do - if [ "$(command -v ${ip_command} 2> /dev/null)" ]; then + if [ "$(command -v "${ip_command}" 2> /dev/null)" ]; then ipcommand="${ip_command}" break fi @@ -20,7 +20,7 @@ done ethtool_commands_array=("/bin/ethtool" "/usr/sbin/ethtool" "ethtool") for ethtool_command in "${ethtool_commands_array[@]}"; do - if [ "$(command -v ${ethtool_command} 2> /dev/null)" ]; then + if [ "$(command -v "${ethtool_command}" 2> /dev/null)" ]; then ethtoolcommand="${ethtool_command}" break fi @@ -38,25 +38,25 @@ function fn_is_valid_ip() { # If the IP variable has been set by user. if fn_is_valid_ip "${ip}"; then - queryips=( "${ip}" ) - webadminip=( "${ip}" ) - telnetip=( "${ip}" ) + queryips=("${ip}") + webadminip=("${ip}") + telnetip=("${ip}") # If game config does have an IP set. -elif fn_is_valid_ip "${configip}";then - queryips=( "${configip}" ) +elif fn_is_valid_ip "${configip}"; then + queryips=("${configip}") ip="${configip}" webadminip=("${configip}") telnetip=("${configip}") # If there is only 1 server IP address. # Some IP details can automaticly use the one IP elif [ "${#current_ips[@]}" == "1" ]; then - queryips=( "127.0.0.1" "${current_ips[@]}" ) + queryips=("127.0.0.1" "${current_ips[@]}") ip="0.0.0.0" webadminip=("${current_ips[@]}") telnetip=("${current_ips[@]}") # If no ip is set by the user and server has more than one IP. else - queryips=( "127.0.0.1" "${current_ips[@]}" ) + queryips=("127.0.0.1" "${current_ips[@]}") ip="0.0.0.0" webadminip=("${ip}") telnetip=("${ip}") diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index 0d6402942..20c830e0b 100755 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -72,7 +72,7 @@ fn_monitor_check_queryport() { fn_print_dots "Checking port: " fn_print_checking_eol fn_script_log_info "Checking port: CHECKING" - if [ -n "${rconenabled}" ] && [ "${rconenabled}" != "true" ] && [ ${shortname} == "av" ]; then + if [ -n "${rconenabled}" ] && [ "${rconenabled}" != "true" ] && [ "${shortname}" == "av" ]; then fn_print_warn "Checking port: Unable to query, rcon is not enabled" fn_script_log_warn "Checking port: Unable to query, rcon is not enabled" else From 2e78a4658e5f7167130adfc846b1aa177e496a6c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 2 Apr 2023 16:39:21 +0100 Subject: [PATCH 116/374] Release v23.2.0 --- .vscode/extensions.json | 18 +++++++++--------- lgsm/functions/core_functions.sh | 2 +- linuxgsm.sh | 2 +- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 0ceb99088..0c9982e65 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,11 +1,11 @@ { - "recommendations": [ - "ms-python.python", - "editorconfig.editorconfig", - "yzhang.markdown-all-in-one", - "esbenp.prettier-vscode", - "timonwong.shellcheck", - "foxundermoon.shell-format", - "redhat.vscode-yaml" - ] + "recommendations": [ + "ms-python.python", + "editorconfig.editorconfig", + "yzhang.markdown-all-in-one", + "esbenp.prettier-vscode", + "timonwong.shellcheck", + "foxundermoon.shell-format", + "redhat.vscode-yaml" + ] } diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 6ab24b78b..aa8a43659 100755 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -8,7 +8,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.1.0" +modulesversion="v23.2.0" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index 3e4812439..3d8b7f376 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.1.0" +version="v23.2.0" shortname="core" gameservername="core" commandname="CORE" diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index 11ed61f93..36060b0fe 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.1.0" +version="v23.2.0" shortname="fctr" gameservername="fctrserver" commandname="CORE" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 5e0158b7a..fde725412 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.1.0" +version="v23.2.0" shortname="jc2" gameservername="jc2server" commandname="CORE" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 560484910..006cc38a2 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.1.0" +version="v23.2.0" shortname="mc" gameservername="mcserver" commandname="CORE" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 731a38518..40c7d3787 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.1.0" +version="v23.2.0" shortname="ts3" gameservername="ts3server" commandname="CORE" From 8b99b83ac56772eeaa7e4995451420ce204ec33e Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 3 Apr 2023 21:57:46 +0100 Subject: [PATCH 117/374] fix: GameServerManagers #4099 --- lgsm/functions/core_dl.sh | 10 +++++----- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index 53a60cc1a..27d001285 100755 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -477,7 +477,7 @@ fn_fetch_file_github() { remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. - elif [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then + elif [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}" else @@ -499,7 +499,7 @@ fn_fetch_file_github() { fn_check_file_github() { github_fileurl_dir="${1}" github_fileurl_name="${2}" - if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then + if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}" else @@ -516,7 +516,7 @@ fn_fetch_config() { github_fileurl_dir="${1}" github_fileurl_name="${2}" # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. - if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then + if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}" else @@ -540,7 +540,7 @@ fn_fetch_function() { github_fileurl_dir="lgsm/functions" github_fileurl_name="${functionfile}" # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. - if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then + if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}" else @@ -564,7 +564,7 @@ fn_update_function() { github_fileurl_dir="lgsm/functions" github_fileurl_name="${functionfile}" # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. - if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then + if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}" else diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index 36060b0fe..791aaeddc 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -168,7 +168,7 @@ fn_bootstrap_fetch_file_github() { github_file_url_dir="${1}" github_file_url_name="${2}" # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. - if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then + if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" else diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index fde725412..2fcb1c845 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -169,7 +169,7 @@ fn_bootstrap_fetch_file_github() { github_file_url_dir="${1}" github_file_url_name="${2}" # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. - if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then + if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" else diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 006cc38a2..5cbb4ace8 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -169,7 +169,7 @@ fn_bootstrap_fetch_file_github() { github_file_url_dir="${1}" github_file_url_name="${2}" # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. - if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then + if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" else diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 40c7d3787..82e232398 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -169,7 +169,7 @@ fn_bootstrap_fetch_file_github() { github_file_url_dir="${1}" github_file_url_name="${2}" # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. - if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then + if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" else From 0dfc51098fef02fe15b9dc5dbe632b4667ae53c4 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 3 Apr 2023 22:43:32 +0100 Subject: [PATCH 118/374] feat: change donate to sponsor (#4164) Convert the word donate to sponsor to bring in line with GitHub Sponsors --- .../{command_donate.sh => command_sponsor.sh} | 12 ++++++------ lgsm/functions/core_functions.sh | 2 +- lgsm/functions/core_getopt.sh | 6 +++--- tests/tests_fctrserver.sh | 14 +++++++------- tests/tests_jc2server.sh | 14 +++++++------- tests/tests_mcserver.sh | 14 +++++++------- tests/tests_ts3server.sh | 14 +++++++------- 7 files changed, 38 insertions(+), 38 deletions(-) rename lgsm/functions/{command_donate.sh => command_sponsor.sh} (78%) diff --git a/lgsm/functions/command_donate.sh b/lgsm/functions/command_sponsor.sh similarity index 78% rename from lgsm/functions/command_donate.sh rename to lgsm/functions/command_sponsor.sh index f00a4d702..22ec0c49e 100755 --- a/lgsm/functions/command_donate.sh +++ b/lgsm/functions/command_sponsor.sh @@ -1,12 +1,12 @@ #!/bin/bash -# LinuxGSM command_donate.sh module +# LinuxGSM command_sponsor.sh module # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Shows ways to donate. +# Description: Shows ways to sponsor. -commandname="DONATE" -commandaction="Donate" +commandname="SPONSOR" +commandaction="Sponsor" functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set @@ -15,10 +15,10 @@ echo -e "${lightyellow}Support LinuxGSM${default}" echo -e "=================================" echo -e "" echo -e "Been using LinuxGSM?" -echo -e "Consider donating to support development." +echo -e "Consider sponsoring to support development." echo -e "" -echo -e "* ${lightblue}Patreon:${default} https://linuxgsm.com/patreon" echo -e "* ${lightblue}GitHub:${default} https://github.com/sponsors/dgibbs64" +echo -e "* ${lightblue}Patreon:${default} https://linuxgsm.com/patreon" echo -e "* ${lightblue}PayPal:${default} https://linuxgsm.com/paypal" echo -e "" echo -e "LinuxGSM est. 2012" diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index aa8a43659..a1708008c 100755 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -86,7 +86,7 @@ command_details.sh() { fn_fetch_function } -command_donate.sh() { +command_sponsor.sh() { functionfile="${FUNCNAME[0]}" fn_fetch_function } diff --git a/lgsm/functions/core_getopt.sh b/lgsm/functions/core_getopt.sh index 808fe2e2a..d7762b0ac 100755 --- a/lgsm/functions/core_getopt.sh +++ b/lgsm/functions/core_getopt.sh @@ -22,7 +22,7 @@ cmd_update_linuxgsm=("ul;update-lgsm;uf;update-functions" "command_update_linuxg cmd_test_alert=("ta;test-alert" "command_test_alert.sh" "Send a test alert.") cmd_monitor=("m;monitor" "command_monitor.sh" "Check server status and restart if crashed.") cmd_skeleton=("sk;skeleton" "command_skeleton.sh" "Create a skeleton directory.") -cmd_donate=("do;donate" "command_donate.sh" "Donation options.") +cmd_sponsor=("s;sponsor" "command_sponsor.sh" "Donation options.") cmd_send=("sd;send" "command_send.sh" "Send command to game server console.") # Console servers only. cmd_console=("c;console" "command_console.sh" "Access server console.") @@ -148,8 +148,8 @@ if [ -f ".dev-debug" ]; then currentopt+=("${cmd_dev_detect_deps[@]}" "${cmd_dev_detect_glibc[@]}" "${cmd_dev_detect_ldd[@]}" "${cmd_dev_query_raw[@]}" "${cmd_dev_clear_functions[@]}") fi -## Donate. -currentopt+=("${cmd_donate[@]}") +## Sponsor. +currentopt+=("${cmd_sponsor[@]}") ### Build list of available commands. optcommands=() diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index 791aaeddc..b9ca2789a 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -614,8 +614,8 @@ echo -e "8.3 - dev - detect deps" echo -e "8.4 - dev - query-raw" echo -e "" -echo -e "9.0 - Donate" -echo -e "9.1 - donate" +echo -e "9.0 - Sponsor" +echo -e "9.1 - sponsor" echo -e "" echo -e "0.0 - Pre-test Tasks" @@ -1153,22 +1153,22 @@ grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g echo -e "" -echo -e "9.0 - Donate" +echo -e "9.0 - Sponsor" echo -e "==================================================================" echo -e "" -echo -e "9.1 - donate" +echo -e "9.1 - sponsor" echo -e "=================================" echo -e "Description:" -echo -e "donate." -echo -e "Command: ./${gameservername} donate" +echo -e "sponsor." +echo -e "Command: ./${gameservername} sponsor" requiredstatus="STARTED" fn_setstatus ( exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x - command_donate.sh + command_sponsor.sh ) fn_test_result_pass echo -e "run order" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 2fcb1c845..5c2787086 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -620,8 +620,8 @@ echo -e "8.2 - dev - detect ldd" echo -e "8.3 - dev - detect deps" echo -e "8.4 - dev - query-raw" echo -e "" -echo -e "9.0 - Donate" -echo -e "9.1 - donate" +echo -e "9.0 - Sponsor" +echo -e "9.1 - sponsor" echo -e "" echo -e "0.0 - Pre-test Tasks" echo -e "==================================================================" @@ -1320,22 +1320,22 @@ echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' echo -e "" -echo -e "9.0 - Donate" +echo -e "9.0 - Sponsor" echo -e "==================================================================" echo -e "" -echo -e "9.1 - donate" +echo -e "9.1 - sponsor" echo -e "=================================" echo -e "Description:" -echo -e "donate." -echo -e "Command: ./${gameservername} donate" +echo -e "sponsor." +echo -e "Command: ./${gameservername} sponsor" requiredstatus="STARTED" fn_setstatus ( exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x - command_donate.sh + command_sponsor.sh ) fn_test_result_pass echo -e "run order" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 5cbb4ace8..05676ad2f 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -613,8 +613,8 @@ echo -e "8.2 - dev - detect ldd" echo -e "8.3 - dev - detect deps" echo -e "8.4 - dev - query-raw" echo -e "" -echo -e "9.0 - Donate" -echo -e "9.1 - donate" +echo -e "9.0 - Sponsor" +echo -e "9.1 - sponsor" echo -e "" echo -e "0.0 - Pre-test Tasks" @@ -1198,22 +1198,22 @@ echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' echo -e "" -echo -e "9.0 - Donate" +echo -e "9.0 - Sponsor" echo -e "==================================================================" echo -e "" -echo -e "9.1 - donate" +echo -e "9.1 - sponsor" echo -e "=================================" echo -e "Description:" -echo -e "donate." -echo -e "Command: ./${gameservername} donate" +echo -e "sponsor." +echo -e "Command: ./${gameservername} sponsor" requiredstatus="STARTED" fn_setstatus ( exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x - command_donate.sh + command_sponsor.sh ) fn_test_result_pass echo -e "run order" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 82e232398..1f553fd51 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -614,8 +614,8 @@ echo -e "8.2 - dev - detect ldd" echo -e "8.3 - dev - detect deps" echo -e "8.4 - dev - query-raw" echo -e "" -echo -e "9.0 - Donate" -echo -e "9.1 - donate" +echo -e "9.0 - Sponsor" +echo -e "9.1 - sponsor" echo -e "" echo -e "0.0 - Pre-test Tasks" echo -e "==================================================================" @@ -1151,22 +1151,22 @@ echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' echo -e "" -echo -e "9.0 - Donate" +echo -e "9.0 - Sponsor" echo -e "==================================================================" echo -e "" -echo -e "9.1 - donate" +echo -e "9.1 - sponsor" echo -e "=================================" echo -e "Description:" -echo -e "donate." -echo -e "Command: ./${gameservername} donate" +echo -e "sponsor." +echo -e "Command: ./${gameservername} sponsor" requiredstatus="STARTED" fn_setstatus ( exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x - command_donate.sh + command_sponsor.sh ) fn_test_result_pass echo -e "run order" From d099e7ef72524947a7aa63a4f3f6c30ceb0251fd Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 3 Apr 2023 22:47:48 +0100 Subject: [PATCH 119/374] feat: steamcmd install now goes via update_steamcmd.sh (#4165) now goes via update_steamcmd.sh --- lgsm/functions/install_server_files.sh | 3 ++- lgsm/functions/update_steamcmd.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index e550e1455..80075a76a 100755 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -212,7 +212,8 @@ fn_sleep_time if [ "${appid}" ]; then remotelocation="SteamCMD" - fn_dl_steamcmd + forceupdate=1 + update_steamcmd.sh fi if [ "${shortname}" == "ts3" ]; then diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh index 85bacb899..eb773f016 100644 --- a/lgsm/functions/update_steamcmd.sh +++ b/lgsm/functions/update_steamcmd.sh @@ -18,7 +18,7 @@ fn_print_dots "${remotelocation}" if [ "${forceupdate}" == "1" ]; then # forceupdate bypasses update checks. - if [ "${status}" != "0" ]; then + if [ "${status}" != "0" ]&&[ -v "${status}" ]; then fn_print_restart_warning exitbypass=1 command_stop.sh From 0bec0ca21889a4f801a62b302b3e19b3ec6c7dc4 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 5 Apr 2023 00:16:37 +0100 Subject: [PATCH 120/374] feat: convert functions dir to modules dir (#4169) * functions dir will be deleted after 14 days --- .github/workflows/version-check.sh | 2 +- lgsm/functions/core_dl.sh | 100 +-- lgsm/functions/core_exit.sh | 18 +- lgsm/functions/core_functions.sh | 2 +- lgsm/functions/core_getopt.sh | 10 +- lgsm/functions/core_github.sh | 6 +- lgsm/functions/core_legacy.sh | 11 +- lgsm/functions/core_logs.sh | 2 +- lgsm/functions/core_messages.sh | 2 +- lgsm/functions/core_modules.sh | 816 ++++++++++++++++++ lgsm/functions/core_steamcmd.sh | 4 +- lgsm/functions/core_trap.sh | 2 +- lgsm/{functions => modules}/README.md | 0 lgsm/{functions => modules}/alert.sh | 4 +- lgsm/{functions => modules}/alert_discord.sh | 2 +- lgsm/{functions => modules}/alert_email.sh | 2 +- lgsm/{functions => modules}/alert_gotify.sh | 2 +- lgsm/{functions => modules}/alert_ifttt.sh | 2 +- lgsm/{functions => modules}/alert_mailgun.sh | 2 +- .../alert_pushbullet.sh | 2 +- lgsm/{functions => modules}/alert_pushover.sh | 2 +- .../alert_rocketchat.sh | 2 +- lgsm/{functions => modules}/alert_slack.sh | 2 +- lgsm/{functions => modules}/alert_telegram.sh | 2 +- lgsm/{functions => modules}/check.sh | 4 +- lgsm/{functions => modules}/check_config.sh | 2 +- lgsm/{functions => modules}/check_deps.sh | 2 +- .../check_executable.sh | 2 +- lgsm/{functions => modules}/check_glibc.sh | 2 +- lgsm/{functions => modules}/check_ip.sh | 2 +- .../check_last_update.sh | 2 +- lgsm/{functions => modules}/check_logs.sh | 2 +- .../check_permissions.sh | 16 +- lgsm/{functions => modules}/check_root.sh | 2 +- lgsm/{functions => modules}/check_status.sh | 2 +- lgsm/{functions => modules}/check_steamcmd.sh | 4 +- .../check_system_dir.sh | 2 +- .../check_system_requirements.sh | 2 +- .../check_tmuxception.sh | 2 +- lgsm/{functions => modules}/check_version.sh | 2 +- lgsm/{functions => modules}/command_backup.sh | 2 +- .../command_check_update.sh | 2 +- .../{functions => modules}/command_console.sh | 2 +- lgsm/{functions => modules}/command_debug.sh | 2 +- .../{functions => modules}/command_details.sh | 2 +- .../command_dev_clear_modules.sh} | 12 +- .../command_dev_debug.sh | 2 +- .../command_dev_detect_deps.sh | 2 +- .../command_dev_detect_glibc.sh | 2 +- .../command_dev_detect_ldd.sh | 2 +- .../command_dev_query_raw.sh | 8 +- lgsm/{functions => modules}/command_fastdl.sh | 2 +- .../{functions => modules}/command_install.sh | 4 +- .../command_install_resources_mta.sh | 2 +- .../command_mods_install.sh | 2 +- .../command_mods_remove.sh | 2 +- .../command_mods_update.sh | 2 +- .../{functions => modules}/command_monitor.sh | 8 +- .../command_postdetails.sh | 4 +- .../{functions => modules}/command_restart.sh | 2 +- lgsm/{functions => modules}/command_send.sh | 2 +- .../command_skeleton.sh | 2 +- .../{functions => modules}/command_sponsor.sh | 2 +- lgsm/{functions => modules}/command_start.sh | 2 +- lgsm/{functions => modules}/command_stop.sh | 2 +- .../command_test_alert.sh | 2 +- .../command_ts3_server_pass.sh | 2 +- lgsm/{functions => modules}/command_update.sh | 2 +- .../command_update_linuxgsm.sh | 48 +- .../command_validate.sh | 2 +- lgsm/{functions => modules}/command_wipe.sh | 2 +- .../compress_unreal2_maps.sh | 2 +- .../compress_ut99_maps.sh | 2 +- lgsm/modules/core_dl.sh | 627 ++++++++++++++ lgsm/modules/core_exit.sh | 61 ++ lgsm/modules/core_functions.sh | 816 ++++++++++++++++++ lgsm/modules/core_getopt.sh | 215 +++++ lgsm/modules/core_github.sh | 114 +++ lgsm/modules/core_legacy.sh | 93 ++ lgsm/modules/core_logs.sh | 110 +++ lgsm/modules/core_messages.sh | 598 +++++++++++++ lgsm/modules/core_modules.sh | 816 ++++++++++++++++++ lgsm/modules/core_steamcmd.sh | 330 +++++++ lgsm/modules/core_trap.sh | 22 + lgsm/{functions => modules}/fix.sh | 8 +- lgsm/{functions => modules}/fix_ark.sh | 2 +- lgsm/{functions => modules}/fix_arma3.sh | 2 +- lgsm/{functions => modules}/fix_armar.sh | 2 +- lgsm/{functions => modules}/fix_av.sh | 2 +- lgsm/{functions => modules}/fix_bo.sh | 2 +- lgsm/{functions => modules}/fix_bt.sh | 2 +- lgsm/{functions => modules}/fix_cmw.sh | 2 +- lgsm/{functions => modules}/fix_csgo.sh | 2 +- lgsm/{functions => modules}/fix_dst.sh | 2 +- lgsm/{functions => modules}/fix_hw.sh | 2 +- lgsm/{functions => modules}/fix_ins.sh | 2 +- lgsm/{functions => modules}/fix_kf.sh | 2 +- lgsm/{functions => modules}/fix_kf2.sh | 2 +- lgsm/{functions => modules}/fix_lo.sh | 4 +- lgsm/{functions => modules}/fix_mcb.sh | 2 +- lgsm/{functions => modules}/fix_mta.sh | 2 +- lgsm/{functions => modules}/fix_nmrih.sh | 2 +- lgsm/{functions => modules}/fix_onset.sh | 2 +- lgsm/{functions => modules}/fix_ro.sh | 2 +- lgsm/{functions => modules}/fix_rust.sh | 2 +- lgsm/{functions => modules}/fix_rw.sh | 2 +- lgsm/{functions => modules}/fix_samp.sh | 2 +- lgsm/{functions => modules}/fix_sdtd.sh | 2 +- lgsm/{functions => modules}/fix_sfc.sh | 2 +- lgsm/{functions => modules}/fix_sof2.sh | 2 +- lgsm/{functions => modules}/fix_squad.sh | 2 +- lgsm/{functions => modules}/fix_st.sh | 2 +- lgsm/{functions => modules}/fix_steamcmd.sh | 2 +- lgsm/{functions => modules}/fix_terraria.sh | 2 +- lgsm/{functions => modules}/fix_tf2.sh | 2 +- lgsm/{functions => modules}/fix_ts3.sh | 2 +- lgsm/{functions => modules}/fix_unt.sh | 2 +- lgsm/{functions => modules}/fix_ut.sh | 2 +- lgsm/{functions => modules}/fix_ut2k4.sh | 2 +- lgsm/{functions => modules}/fix_ut3.sh | 2 +- lgsm/{functions => modules}/fix_vh.sh | 4 +- lgsm/{functions => modules}/fix_wurm.sh | 2 +- lgsm/{functions => modules}/fix_zmr.sh | 2 +- lgsm/{functions => modules}/info_distro.sh | 2 +- lgsm/{functions => modules}/info_game.sh | 2 +- lgsm/{functions => modules}/info_messages.sh | 2 +- lgsm/{functions => modules}/info_stats.sh | 2 +- .../install_complete.sh | 2 +- lgsm/{functions => modules}/install_config.sh | 2 +- .../install_dst_token.sh | 2 +- lgsm/{functions => modules}/install_eula.sh | 2 +- .../install_factorio_save.sh | 2 +- lgsm/{functions => modules}/install_gslt.sh | 2 +- lgsm/{functions => modules}/install_header.sh | 2 +- lgsm/{functions => modules}/install_logs.sh | 2 +- .../install_mta_resources.sh | 2 +- lgsm/{functions => modules}/install_retry.sh | 2 +- .../install_server_dir.sh | 2 +- .../install_server_files.sh | 2 +- .../install_squad_license.sh | 2 +- lgsm/{functions => modules}/install_stats.sh | 2 +- .../install_steamcmd.sh | 2 +- lgsm/{functions => modules}/install_ts3db.sh | 2 +- .../install_ut2k4_key.sh | 2 +- lgsm/{functions => modules}/mods_core.sh | 4 +- lgsm/{functions => modules}/mods_list.sh | 2 +- lgsm/{functions => modules}/query_gamedig.sh | 2 +- lgsm/{functions => modules}/query_gsquery.py | 2 +- .../{functions => modules}/update_factorio.sh | 2 +- .../update_jediknight2.sh | 2 +- .../update_minecraft.sh | 2 +- .../update_minecraft_bedrock.sh | 2 +- lgsm/{functions => modules}/update_mta.sh | 2 +- lgsm/{functions => modules}/update_papermc.sh | 4 +- .../{functions => modules}/update_steamcmd.sh | 4 +- lgsm/{functions => modules}/update_ts3.sh | 2 +- lgsm/{functions => modules}/update_ut99.sh | 2 +- .../update_vintagestory.sh | 2 +- linuxgsm.sh | 24 +- tests/tests_fctrserver.sh | 80 +- tests/tests_jc2server.sh | 94 +- tests/tests_mcserver.sh | 80 +- tests/tests_ts3server.sh | 80 +- 163 files changed, 5070 insertions(+), 441 deletions(-) mode change 100755 => 100644 lgsm/functions/core_dl.sh mode change 100755 => 100644 lgsm/functions/core_exit.sh mode change 100755 => 100644 lgsm/functions/core_getopt.sh mode change 100755 => 100644 lgsm/functions/core_legacy.sh mode change 100755 => 100644 lgsm/functions/core_logs.sh mode change 100755 => 100644 lgsm/functions/core_messages.sh create mode 100644 lgsm/functions/core_modules.sh mode change 100755 => 100644 lgsm/functions/core_steamcmd.sh mode change 100755 => 100644 lgsm/functions/core_trap.sh rename lgsm/{functions => modules}/README.md (100%) mode change 100755 => 100644 rename lgsm/{functions => modules}/alert.sh (98%) mode change 100755 => 100644 rename lgsm/{functions => modules}/alert_discord.sh (95%) mode change 100755 => 100644 rename lgsm/{functions => modules}/alert_email.sh (90%) mode change 100755 => 100644 rename lgsm/{functions => modules}/alert_gotify.sh (93%) rename lgsm/{functions => modules}/alert_ifttt.sh (93%) mode change 100755 => 100644 rename lgsm/{functions => modules}/alert_mailgun.sh (93%) mode change 100755 => 100644 rename lgsm/{functions => modules}/alert_pushbullet.sh (93%) mode change 100755 => 100644 rename lgsm/{functions => modules}/alert_pushover.sh (95%) mode change 100755 => 100644 rename lgsm/{functions => modules}/alert_rocketchat.sh (94%) mode change 100755 => 100644 rename lgsm/{functions => modules}/alert_slack.sh (96%) mode change 100755 => 100644 rename lgsm/{functions => modules}/alert_telegram.sh (94%) mode change 100755 => 100644 rename lgsm/{functions => modules}/check.sh (95%) mode change 100755 => 100644 rename lgsm/{functions => modules}/check_config.sh (94%) mode change 100755 => 100644 rename lgsm/{functions => modules}/check_deps.sh (99%) mode change 100755 => 100644 rename lgsm/{functions => modules}/check_executable.sh (89%) mode change 100755 => 100644 rename lgsm/{functions => modules}/check_glibc.sh (92%) mode change 100755 => 100644 rename lgsm/{functions => modules}/check_ip.sh (96%) mode change 100755 => 100644 rename lgsm/{functions => modules}/check_last_update.sh (92%) mode change 100755 => 100644 rename lgsm/{functions => modules}/check_logs.sh (90%) mode change 100755 => 100644 rename lgsm/{functions => modules}/check_permissions.sh (94%) mode change 100755 => 100644 rename lgsm/{functions => modules}/check_root.sh (89%) mode change 100755 => 100644 rename lgsm/{functions => modules}/check_status.sh (82%) mode change 100755 => 100644 rename lgsm/{functions => modules}/check_steamcmd.sh (82%) mode change 100755 => 100644 rename lgsm/{functions => modules}/check_system_dir.sh (88%) mode change 100755 => 100644 rename lgsm/{functions => modules}/check_system_requirements.sh (96%) mode change 100755 => 100644 rename lgsm/{functions => modules}/check_tmuxception.sh (94%) mode change 100755 => 100644 rename lgsm/{functions => modules}/check_version.sh (91%) mode change 100755 => 100644 rename lgsm/{functions => modules}/command_backup.sh (99%) rename lgsm/{functions => modules}/command_check_update.sh (93%) mode change 100755 => 100644 rename lgsm/{functions => modules}/command_console.sh (95%) mode change 100755 => 100644 rename lgsm/{functions => modules}/command_debug.sh (98%) mode change 100755 => 100644 rename lgsm/{functions => modules}/command_details.sh (93%) mode change 100755 => 100644 rename lgsm/{functions/command_dev_clear_functions.sh => modules/command_dev_clear_modules.sh} (60%) mode change 100755 => 100644 rename lgsm/{functions => modules}/command_dev_debug.sh (89%) mode change 100755 => 100644 rename lgsm/{functions => modules}/command_dev_detect_deps.sh (99%) mode change 100755 => 100644 rename lgsm/{functions => modules}/command_dev_detect_glibc.sh (97%) mode change 100755 => 100644 rename lgsm/{functions => modules}/command_dev_detect_ldd.sh (96%) mode change 100755 => 100644 rename lgsm/{functions => modules}/command_dev_query_raw.sh (97%) mode change 100755 => 100644 rename lgsm/{functions => modules}/command_fastdl.sh (99%) mode change 100755 => 100644 rename lgsm/{functions => modules}/command_install.sh (90%) mode change 100755 => 100644 rename lgsm/{functions => modules}/command_install_resources_mta.sh (94%) mode change 100755 => 100644 rename lgsm/{functions => modules}/command_mods_install.sh (98%) mode change 100755 => 100644 rename lgsm/{functions => modules}/command_mods_remove.sh (98%) mode change 100755 => 100644 rename lgsm/{functions => modules}/command_mods_update.sh (98%) mode change 100755 => 100644 rename lgsm/{functions => modules}/command_monitor.sh (95%) mode change 100755 => 100644 rename lgsm/{functions => modules}/command_postdetails.sh (94%) mode change 100755 => 100644 rename lgsm/{functions => modules}/command_restart.sh (83%) mode change 100755 => 100644 rename lgsm/{functions => modules}/command_send.sh (93%) rename lgsm/{functions => modules}/command_skeleton.sh (91%) rename lgsm/{functions => modules}/command_sponsor.sh (91%) mode change 100755 => 100644 rename lgsm/{functions => modules}/command_start.sh (99%) mode change 100755 => 100644 rename lgsm/{functions => modules}/command_stop.sh (99%) rename lgsm/{functions => modules}/command_test_alert.sh (83%) mode change 100755 => 100644 rename lgsm/{functions => modules}/command_ts3_server_pass.sh (95%) mode change 100755 => 100644 rename lgsm/{functions => modules}/command_update.sh (93%) mode change 100755 => 100644 rename lgsm/{functions => modules}/command_update_linuxgsm.sh (86%) mode change 100755 => 100644 rename lgsm/{functions => modules}/command_validate.sh (94%) mode change 100755 => 100644 rename lgsm/{functions => modules}/command_wipe.sh (98%) mode change 100755 => 100644 rename lgsm/{functions => modules}/compress_unreal2_maps.sh (92%) mode change 100755 => 100644 rename lgsm/{functions => modules}/compress_ut99_maps.sh (92%) mode change 100755 => 100644 create mode 100644 lgsm/modules/core_dl.sh create mode 100644 lgsm/modules/core_exit.sh create mode 100755 lgsm/modules/core_functions.sh create mode 100644 lgsm/modules/core_getopt.sh create mode 100644 lgsm/modules/core_github.sh create mode 100644 lgsm/modules/core_legacy.sh create mode 100644 lgsm/modules/core_logs.sh create mode 100644 lgsm/modules/core_messages.sh create mode 100644 lgsm/modules/core_modules.sh create mode 100644 lgsm/modules/core_steamcmd.sh create mode 100644 lgsm/modules/core_trap.sh rename lgsm/{functions => modules}/fix.sh (93%) mode change 100755 => 100644 rename lgsm/{functions => modules}/fix_ark.sh (97%) mode change 100755 => 100644 rename lgsm/{functions => modules}/fix_arma3.sh (89%) mode change 100755 => 100644 rename lgsm/{functions => modules}/fix_armar.sh (86%) rename lgsm/{functions => modules}/fix_av.sh (90%) mode change 100755 => 100644 rename lgsm/{functions => modules}/fix_bo.sh (81%) rename lgsm/{functions => modules}/fix_bt.sh (91%) rename lgsm/{functions => modules}/fix_cmw.sh (89%) mode change 100755 => 100644 rename lgsm/{functions => modules}/fix_csgo.sh (95%) mode change 100755 => 100644 rename lgsm/{functions => modules}/fix_dst.sh (91%) mode change 100755 => 100644 rename lgsm/{functions => modules}/fix_hw.sh (81%) mode change 100755 => 100644 rename lgsm/{functions => modules}/fix_ins.sh (89%) mode change 100755 => 100644 rename lgsm/{functions => modules}/fix_kf.sh (93%) mode change 100755 => 100644 rename lgsm/{functions => modules}/fix_kf2.sh (87%) mode change 100755 => 100644 rename lgsm/{functions => modules}/fix_lo.sh (80%) rename lgsm/{functions => modules}/fix_mcb.sh (84%) mode change 100755 => 100644 rename lgsm/{functions => modules}/fix_mta.sh (89%) mode change 100755 => 100644 rename lgsm/{functions => modules}/fix_nmrih.sh (93%) mode change 100755 => 100644 rename lgsm/{functions => modules}/fix_onset.sh (91%) mode change 100755 => 100644 rename lgsm/{functions => modules}/fix_ro.sh (94%) mode change 100755 => 100644 rename lgsm/{functions => modules}/fix_rust.sh (94%) mode change 100755 => 100644 rename lgsm/{functions => modules}/fix_rw.sh (80%) mode change 100755 => 100644 rename lgsm/{functions => modules}/fix_samp.sh (94%) rename lgsm/{functions => modules}/fix_sdtd.sh (81%) mode change 100755 => 100644 rename lgsm/{functions => modules}/fix_sfc.sh (95%) mode change 100755 => 100644 rename lgsm/{functions => modules}/fix_sof2.sh (82%) mode change 100755 => 100644 rename lgsm/{functions => modules}/fix_squad.sh (92%) rename lgsm/{functions => modules}/fix_st.sh (84%) rename lgsm/{functions => modules}/fix_steamcmd.sh (98%) mode change 100755 => 100644 rename lgsm/{functions => modules}/fix_terraria.sh (75%) mode change 100755 => 100644 rename lgsm/{functions => modules}/fix_tf2.sh (88%) mode change 100755 => 100644 rename lgsm/{functions => modules}/fix_ts3.sh (94%) mode change 100755 => 100644 rename lgsm/{functions => modules}/fix_unt.sh (81%) mode change 100755 => 100644 rename lgsm/{functions => modules}/fix_ut.sh (83%) mode change 100755 => 100644 rename lgsm/{functions => modules}/fix_ut2k4.sh (93%) mode change 100755 => 100644 rename lgsm/{functions => modules}/fix_ut3.sh (91%) mode change 100755 => 100644 rename lgsm/{functions => modules}/fix_vh.sh (92%) mode change 100755 => 100644 rename lgsm/{functions => modules}/fix_wurm.sh (87%) mode change 100755 => 100644 rename lgsm/{functions => modules}/fix_zmr.sh (95%) mode change 100755 => 100644 rename lgsm/{functions => modules}/info_distro.sh (99%) mode change 100755 => 100644 rename lgsm/{functions => modules}/info_game.sh (99%) rename lgsm/{functions => modules}/info_messages.sh (99%) mode change 100755 => 100644 rename lgsm/{functions => modules}/info_stats.sh (99%) mode change 100755 => 100644 rename lgsm/{functions => modules}/install_complete.sh (86%) mode change 100755 => 100644 rename lgsm/{functions => modules}/install_config.sh (99%) mode change 100755 => 100644 rename lgsm/{functions => modules}/install_dst_token.sh (95%) mode change 100755 => 100644 rename lgsm/{functions => modules}/install_eula.sh (95%) mode change 100755 => 100644 rename lgsm/{functions => modules}/install_factorio_save.sh (86%) mode change 100755 => 100644 rename lgsm/{functions => modules}/install_gslt.sh (96%) mode change 100755 => 100644 rename lgsm/{functions => modules}/install_header.sh (91%) mode change 100755 => 100644 rename lgsm/{functions => modules}/install_logs.sh (97%) mode change 100755 => 100644 rename lgsm/{functions => modules}/install_mta_resources.sh (88%) mode change 100755 => 100644 rename lgsm/{functions => modules}/install_retry.sh (82%) mode change 100755 => 100644 rename lgsm/{functions => modules}/install_server_dir.sh (89%) mode change 100755 => 100644 rename lgsm/{functions => modules}/install_server_files.sh (99%) mode change 100755 => 100644 rename lgsm/{functions => modules}/install_squad_license.sh (93%) mode change 100755 => 100644 rename lgsm/{functions => modules}/install_stats.sh (93%) mode change 100755 => 100644 rename lgsm/{functions => modules}/install_steamcmd.sh (83%) mode change 100755 => 100644 rename lgsm/{functions => modules}/install_ts3db.sh (97%) mode change 100755 => 100644 rename lgsm/{functions => modules}/install_ut2k4_key.sh (93%) mode change 100755 => 100644 rename lgsm/{functions => modules}/mods_core.sh (99%) mode change 100755 => 100644 rename lgsm/{functions => modules}/mods_list.sh (99%) mode change 100755 => 100644 rename lgsm/{functions => modules}/query_gamedig.sh (97%) mode change 100755 => 100644 rename lgsm/{functions => modules}/query_gsquery.py (99%) mode change 100755 => 100644 rename lgsm/{functions => modules}/update_factorio.sh (98%) rename lgsm/{functions => modules}/update_jediknight2.sh (98%) rename lgsm/{functions => modules}/update_minecraft.sh (98%) rename lgsm/{functions => modules}/update_minecraft_bedrock.sh (98%) rename lgsm/{functions => modules}/update_mta.sh (98%) rename lgsm/{functions => modules}/update_papermc.sh (98%) rename lgsm/{functions => modules}/update_steamcmd.sh (87%) rename lgsm/{functions => modules}/update_ts3.sh (98%) rename lgsm/{functions => modules}/update_ut99.sh (98%) rename lgsm/{functions => modules}/update_vintagestory.sh (98%) mode change 100755 => 100644 diff --git a/.github/workflows/version-check.sh b/.github/workflows/version-check.sh index 4e7280509..a5f21c5cb 100644 --- a/.github/workflows/version-check.sh +++ b/.github/workflows/version-check.sh @@ -1,6 +1,6 @@ #!/bin/bash version=$(grep "version=" linuxgsm.sh | sed -e 's/version//g' | tr -d '="') -modulesversion=$(grep "modulesversion=" lgsm/functions/core_functions.sh | sed -e 's/modulesversion//g' | tr -d '="') +modulesversion=$(grep "modulesversion=" lgsm/modules/core_modules.sh | sed -e 's/modulesversion//g' | tr -d '="') if [ "${version}" != "${modulesversion}" ]; then echo "Error! LinuxGSM version mismatch" diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh old mode 100755 new mode 100644 index 27d001285..405e9dc6b --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -17,7 +17,7 @@ # fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}" # fn_fetch_file "http://example.com/file.tar.bz2" "http://example.com/file2.tar.bz2" "file.tar.bz2" "file2.tar.bz2" "/some/dir" "file.tar.bz2" "chmodx" "run" "forcedl" "10cd7353aa9d758a075c600a6dd193fd" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_dl_steamcmd() { fn_print_start_nl "${remotelocation}" @@ -453,11 +453,13 @@ fn_fetch_file() { fi } -# GitHub file download functions. +# GitHub file download modules. # Used to simplify downloading specific files from GitHub. -# github_fileurl_dir: the directory of the file in the GitHub: lgsm/functions -# github_fileurl_name: the filename of the file to download from GitHub: core_messages.sh +# github_file_url_dir: the directory of the file in the GitHub: lgsm/modules +# github_file_url_name: the filename of the file to download from GitHub: core_messages.sh +# github_file_url_dir: the directory of the file in the GitHub: lgsm/modules +# github_file_url_name: the filename of the file to download from GitHub: core_messages.sh # githuburl: the full GitHub url # remote_fileurl: The URL of the file: http://example.com/dl/File.tar.bz2 @@ -470,58 +472,58 @@ fn_fetch_file() { # Fetches files from the Git repo. fn_fetch_file_github() { - github_fileurl_dir="${1}" - github_fileurl_name="${2}" + github_file_url_dir="${1}" + github_file_url_name="${2}" # For legacy versions - code can be removed at a future date if [ "${legacymode}" == "1" ]; then - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. elif [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}" + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" else - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" fi remote_fileurl_name="GitHub" remote_fileurl_backup_name="Bitbucket" local_filedir="${3}" - local_filename="${github_fileurl_name}" + local_filename="${github_file_url_name}" chmodx="${4:-0}" run="${5:-0}" forcedl="${6:-0}" hash="${7:-0}" - # Passes vars to the file download function. + # Passes vars to the file download module. fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}" } fn_check_file_github() { - github_fileurl_dir="${1}" - github_fileurl_name="${2}" + github_file_url_dir="${1}" + github_file_url_name="${2}" if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}" + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" else - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" fi remote_fileurl_name="GitHub" remote_fileurl_backup_name="Bitbucket" - fn_check_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${github_fileurl_name}" + fn_check_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${github_file_url_name}" } # Fetches config files from the Git repo. fn_fetch_config() { - github_fileurl_dir="${1}" - github_fileurl_name="${2}" + github_file_url_dir="${1}" + github_file_url_name="${2}" # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}" + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" else - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" fi remote_fileurl_name="GitHub" remote_fileurl_backup_name="Bitbucket" @@ -531,55 +533,55 @@ fn_fetch_config() { run="norun" forcedl="noforce" hash="nohash" - # Passes vars to the file download function. + # Passes vars to the file download module. fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}" } # Fetches modules from the Git repo during first download. -fn_fetch_function() { - github_fileurl_dir="lgsm/functions" - github_fileurl_name="${functionfile}" +fn_fetch_module() { + github_file_url_dir="lgsm/modules" + github_file_url_name="${modulefile}" # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}" + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" else - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" fi remote_fileurl_name="GitHub" remote_fileurl_backup_name="Bitbucket" - local_filedir="${functionsdir}" - local_filename="${github_fileurl_name}" + local_filedir="${modulesdir}" + local_filename="${github_file_url_name}" chmodx="chmodx" run="run" forcedl="noforce" hash="nohash" - # Passes vars to the file download function. + # Passes vars to the file download module. fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}" } # Fetches modules from the Git repo during update-lgsm. -fn_update_function() { - github_fileurl_dir="lgsm/functions" - github_fileurl_name="${functionfile}" +fn_update_module() { + github_file_url_dir="lgsm/modules" + github_file_url_name="${modulefile}" # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}" + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" else - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" fi remote_fileurl_name="GitHub" remote_fileurl_backup_name="Bitbucket" - local_filedir="${functionsdir}" - local_filename="${github_fileurl_name}" + local_filedir="${modulesdir}" + local_filename="${github_file_url_name}" chmodx="chmodx" run="norun" forcedl="noforce" hash="nohash" - # Passes vars to the file download function. + # Passes vars to the file download module. fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}" } @@ -618,7 +620,7 @@ fn_dl_latest_release_github() { fn_print_fail_nl "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" fn_script_log_fatal "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" else - # Fetch file from the remote location from the existing function to the ${tmpdir} for now. + # Fetch file from the remote location from the existing module to the ${tmpdir} for now. fn_fetch_file "${githubreleasedownloadlink}" "" "${githubreleasefilename}" "" "${githubreleasedownloadpath}" "${githubreleasefilename}" fi fi diff --git a/lgsm/functions/core_exit.sh b/lgsm/functions/core_exit.sh old mode 100755 new mode 100644 index 95d9d8cae..a8686c2a8 --- a/lgsm/functions/core_exit.sh +++ b/lgsm/functions/core_exit.sh @@ -5,14 +5,14 @@ # Website: https://linuxgsm.com # Description: Handles exiting of LinuxGSM by running and reporting an exit code. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_exit_dev_debug() { if [ -f "${rootdir}/.dev-debug" ]; then echo -e "" - echo -e "${functionselfname} exiting with code: ${exitcode}" + echo -e "${moduleselfname} exiting with code: ${exitcode}" if [ -f "${rootdir}/dev-debug.log" ]; then - grep "functionfile=" "${rootdir}/dev-debug.log" | sed 's/functionfile=//g' > "${rootdir}/dev-debug-function-order.log" + grep "modulefile=" "${rootdir}/dev-debug.log" | sed 's/modulefile=//g' > "${rootdir}/dev-debug-module-order.log" fi fi } @@ -29,13 +29,13 @@ elif [ "${exitcode}" != "0" ]; then # List LinuxGSM version in logs fn_script_log_info "LinuxGSM version: ${version}" if [ "${exitcode}" == "1" ]; then - fn_script_log_fatal "${functionselfname} exiting with code: ${exitcode}" + fn_script_log_fatal "${moduleselfname} exiting with code: ${exitcode}" elif [ "${exitcode}" == "2" ]; then - fn_script_log_error "${functionselfname} exiting with code: ${exitcode}" + fn_script_log_error "${moduleselfname} exiting with code: ${exitcode}" elif [ "${exitcode}" == "3" ]; then - fn_script_log_warn "${functionselfname} exiting with code: ${exitcode}" + fn_script_log_warn "${moduleselfname} exiting with code: ${exitcode}" else - fn_script_log_warn "${functionselfname} exiting with code: ${exitcode}" + fn_script_log_warn "${moduleselfname} exiting with code: ${exitcode}" fi fn_exit_dev_debug # remove trap. @@ -44,7 +44,7 @@ elif [ "${exitcode}" != "0" ]; then elif [ "${exitcode}" ] && [ "${exitcode}" == "0" ]; then # List LinuxGSM version in logs fn_script_log_info "LinuxGSM version: ${version}" - fn_script_log_pass "${functionselfname} exiting with code: ${exitcode}" + fn_script_log_pass "${moduleselfname} exiting with code: ${exitcode}" fn_exit_dev_debug # remove trap. trap - INT @@ -53,7 +53,7 @@ else # List LinuxGSM version in logs fn_script_log_info "LinuxGSM version: ${version}" fn_print_error "No exit code set" - fn_script_log_pass "${functionselfname} exiting with code: NOT SET" + fn_script_log_pass "${moduleselfname} exiting with code: NOT SET" fn_exit_dev_debug # remove trap. trap - INT diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index a1708008c..07a2ebd09 100755 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -6,7 +6,7 @@ # Description: Defines all functions to allow download and execution of functions using fn_fetch_function. # This function is called first before any other function. Without this file other functions will not load. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" modulesversion="v23.2.0" diff --git a/lgsm/functions/core_getopt.sh b/lgsm/functions/core_getopt.sh old mode 100755 new mode 100644 index d7762b0ac..222ad0cf8 --- a/lgsm/functions/core_getopt.sh +++ b/lgsm/functions/core_getopt.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: getopt arguments. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" ### Define all commands here. ## User commands | Trigger commands | Description @@ -18,11 +18,11 @@ cmd_restart=("r;restart" "command_restart.sh" "Restart the server.") cmd_details=("dt;details" "command_details.sh" "Display server information.") cmd_postdetails=("pd;postdetails" "command_postdetails.sh" "Post details to termbin.com (removing passwords).") cmd_backup=("b;backup" "command_backup.sh" "Create backup archives of the server.") -cmd_update_linuxgsm=("ul;update-lgsm;uf;update-functions" "command_update_linuxgsm.sh" "Check and apply any LinuxGSM updates.") +cmd_update_linuxgsm=("ul;update-lgsm;uf;update-modules" "command_update_linuxgsm.sh" "Check and apply any LinuxGSM updates.") cmd_test_alert=("ta;test-alert" "command_test_alert.sh" "Send a test alert.") cmd_monitor=("m;monitor" "command_monitor.sh" "Check server status and restart if crashed.") cmd_skeleton=("sk;skeleton" "command_skeleton.sh" "Create a skeleton directory.") -cmd_sponsor=("s;sponsor" "command_sponsor.sh" "Donation options.") +cmd_sponso=("s;sponsor" "command_sponsor.sh" "Donation options.") cmd_send=("sd;send" "command_send.sh" "Send command to game server console.") # Console servers only. cmd_console=("c;console" "command_console.sh" "Access server console.") @@ -54,7 +54,7 @@ cmd_dev_detect_deps=("dd;detect-deps" "command_dev_detect_deps.sh" "Detect requi cmd_dev_detect_glibc=("dg;detect-glibc" "command_dev_detect_glibc.sh" "Detect required glibc.") cmd_dev_detect_ldd=("dl;detect-ldd" "command_dev_detect_ldd.sh" "Detect required dynamic dependencies.") cmd_dev_query_raw=("qr;query-raw" "command_dev_query_raw.sh" "The raw output of gamedig and gsquery.") -cmd_dev_clear_functions=("cf;clear-functions" "command_dev_clear_functions.sh" "Delete the contents of the functions dir.") +cmd_dev_clear_modules=("cf;clear-modules" "command_dev_clear_modules.sh" "Delete the contents of the modules dir.") ### Set specific opt here. @@ -145,7 +145,7 @@ currentopt+=("${cmd_install[@]}" "${cmd_auto_install[@]}") ## Developer commands. currentopt+=("${cmd_dev_debug[@]}") if [ -f ".dev-debug" ]; then - currentopt+=("${cmd_dev_detect_deps[@]}" "${cmd_dev_detect_glibc[@]}" "${cmd_dev_detect_ldd[@]}" "${cmd_dev_query_raw[@]}" "${cmd_dev_clear_functions[@]}") + currentopt+=("${cmd_dev_detect_deps[@]}" "${cmd_dev_detect_glibc[@]}" "${cmd_dev_detect_ldd[@]}" "${cmd_dev_query_raw[@]}" "${cmd_dev_clear_modules[@]}") fi ## Sponsor. diff --git a/lgsm/functions/core_github.sh b/lgsm/functions/core_github.sh index 0462e65bf..228fe1078 100644 --- a/lgsm/functions/core_github.sh +++ b/lgsm/functions/core_github.sh @@ -1,11 +1,11 @@ #!/bin/bash -# LinuxGSM core_github.sh function +# LinuxGSM core_github.sh module # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: core function file for updates via github +# Description: core module file for updates via github -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" github_api="https://api.github.com" diff --git a/lgsm/functions/core_legacy.sh b/lgsm/functions/core_legacy.sh old mode 100755 new mode 100644 index f9aa51455..2ed942abd --- a/lgsm/functions/core_legacy.sh +++ b/lgsm/functions/core_legacy.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Code for backwards compatability with older versions of LinuxGSM. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # This is to help the transition to v20.3.0 and above legacy_versions_array=(v20.2.1 v20.2.0 v20.1.5 v20.1.4 v20.1.3 v20.1.2 v20.1.1 v20.1.0 v19.12.5 v19.12.4 v19.12.3 v19.12.2 v19.12.1 v19.12.0) @@ -78,6 +78,15 @@ if [ -z "${wsstartmap}" ]; then fi fi +# Added as part of migrating functions dir to modules dir. +# Will remove functions dir if files in modules dir older than 14 days +functionsdir="${lgsmdir}/modules" +if [ -d "${lgsmdir}/functions" ]; then + if [ "$(find "${lgsmdir}/modules"/ -type f -mtime +"14" | wc -l)" -ne "0" ]; then + rm -rf "${lgsmdir:?}/functions" + fi +fi + fn_parms() { fn_reload_startparameters parms="${startparameters}" diff --git a/lgsm/functions/core_logs.sh b/lgsm/functions/core_logs.sh old mode 100755 new mode 100644 index 1f0e27540..8057f30f7 --- a/lgsm/functions/core_logs.sh +++ b/lgsm/functions/core_logs.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Acts as a log rotator, removing old logs. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Check if logfile variable and file exist, create logfile if it doesn't exist. if [ "${consolelog}" ]; then diff --git a/lgsm/functions/core_messages.sh b/lgsm/functions/core_messages.sh old mode 100755 new mode 100644 index 5362dd3d3..6d3ca9a25 --- a/lgsm/functions/core_messages.sh +++ b/lgsm/functions/core_messages.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Defines on-screen messages such as [ OK ] and how script logs look. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # nl: new line: message is following by a new line. # eol: end of line: message is placed at the end of the current line. diff --git a/lgsm/functions/core_modules.sh b/lgsm/functions/core_modules.sh new file mode 100644 index 000000000..8eb843b5a --- /dev/null +++ b/lgsm/functions/core_modules.sh @@ -0,0 +1,816 @@ +#!/bin/bash +# LinuxGSM core_modules.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Defines all modules to allow download and execution of modules using fn_fetch_module. +# This module is called first before any other module. Without this file other modules will not load. + +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +modulesversion="v23.2.0" + +# Core + +core_dl.sh() { + modulefile="${FUNCNAME[0]}" + if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then + fn_fetch_core_dl "lgsm/modules" "core_dl.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" + else + fn_bootstrap_fetch_file_github "lgsm/modules" "core_dl.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" + fi +} + +core_messages.sh() { + modulefile="${FUNCNAME[0]}" + if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then + fn_fetch_core_dl "lgsm/modules" "core_messages.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" + else + fn_bootstrap_fetch_file_github "lgsm/modules" "core_messages.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" + fi +} + +core_legacy.sh() { + modulefile="${FUNCNAME[0]}" + if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then + fn_fetch_core_dl "lgsm/modules" "core_legacy.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" + else + fn_bootstrap_fetch_file_github "lgsm/modules" "core_legacy.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" + fi +} + +core_exit.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +core_getopt.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +core_trap.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +core_steamcmd.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +core_github.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# Commands + +command_backup.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_console.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_debug.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_details.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_sponsor.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_postdetails.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_test_alert.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_monitor.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_start.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_stop.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_validate.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_install.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_install_resources_mta.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_squad_license.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_mods_install.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_mods_update.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_mods_remove.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_fastdl.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_ts3_server_pass.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_restart.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_skeleton.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_wipe.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_send.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# Checks + +check.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_config.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_deps.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_executable.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_glibc.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_ip.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_last_update.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_logs.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_permissions.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_root.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_status.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_steamcmd.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_system_dir.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_system_requirements.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_tmuxception.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_version.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# Compress + +compress_unreal2_maps.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +compress_ut99_maps.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# Mods + +mods_list.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +mods_core.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# Dev + +command_dev_clear_modules.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_dev_debug.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_dev_detect_deps.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_dev_detect_glibc.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_dev_detect_ldd.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_dev_query_raw.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# Fix + +fix.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_ark.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_av.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_arma3.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_armar.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_bt.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_bo.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_cmw.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_csgo.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_dst.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_hw.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_ins.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_kf.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_kf2.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_lo.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_mcb.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_mta.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_nmrih.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_onset.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_ro.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_rust.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_rw.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_sfc.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_st.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_steamcmd.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_terraria.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_tf2.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_ut3.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_rust.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_samp.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_sdtd.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_sof2.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_squad.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_ts3.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_ut2k4.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_ut.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_unt.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_vh.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_wurm.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_zmr.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# Info + +info_distro.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +info_game.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +info_messages.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +info_stats.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# Alert + +alert.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +alert_discord.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +alert_email.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +alert_ifttt.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +alert_mailgun.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +alert_pushbullet.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +alert_pushover.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +alert_gotify.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +alert_telegram.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +alert_rocketchat.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +alert_slack.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} +# Logs + +core_logs.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# Query + +query_gamedig.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# Update + +command_update_modules.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_update_linuxgsm.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_update.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_check_update.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +update_ts3.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +update_minecraft.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +update_minecraft_bedrock.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +update_papermc.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +update_mta.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +update_factorio.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +update_jediknight2.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +update_steamcmd.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +update_vintagestory.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +update_ut99.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fn_update_modules.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# +## Installer modules +# + +fn_autoinstall() { + autoinstall=1 + command_install.sh +} + +install_complete.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_config.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_factorio_save.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_dst_token.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_eula.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_gsquery.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_gslt.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_header.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_logs.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_retry.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_server_dir.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} +install_server_files.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_stats.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_steamcmd.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_ts3.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_ts3db.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_ut2k4.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_dl_ut2k4.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_ut2k4_key.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# Calls code required for legacy servers +core_legacy.sh + +# Creates tmp dir if missing +if [ ! -d "${tmpdir}" ]; then + mkdir -p "${tmpdir}" +fi + +# Creates lock dir if missing +if [ ! -d "${lockdir}" ]; then + mkdir -p "${lockdir}" +fi + +# Calls on-screen messages (bootstrap) +core_messages.sh + +#Calls file downloader (bootstrap) +core_dl.sh + +# Calls the global Ctrl-C trap +core_trap.sh diff --git a/lgsm/functions/core_steamcmd.sh b/lgsm/functions/core_steamcmd.sh old mode 100755 new mode 100644 index 119748fb7..78c30f60a --- a/lgsm/functions/core_steamcmd.sh +++ b/lgsm/functions/core_steamcmd.sh @@ -3,9 +3,9 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Core functions for SteamCMD +# Description: Core modules for SteamCMD -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_install_steamcmd() { if [ "${shortname}" == "ark" ] && [ "${installsteamcmd}" == "1" ]; then diff --git a/lgsm/functions/core_trap.sh b/lgsm/functions/core_trap.sh old mode 100755 new mode 100644 index ae2b79470..ea6fce869 --- a/lgsm/functions/core_trap.sh +++ b/lgsm/functions/core_trap.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Handles CTRL-C trap to give an exit code. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_exit_trap() { if [ -z "${exitcode}" ]; then diff --git a/lgsm/functions/README.md b/lgsm/modules/README.md old mode 100755 new mode 100644 similarity index 100% rename from lgsm/functions/README.md rename to lgsm/modules/README.md diff --git a/lgsm/functions/alert.sh b/lgsm/modules/alert.sh old mode 100755 new mode 100644 similarity index 98% rename from lgsm/functions/alert.sh rename to lgsm/modules/alert.sh index 59deae2b6..c7ed897f9 --- a/lgsm/functions/alert.sh +++ b/lgsm/modules/alert.sh @@ -3,9 +3,9 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Overall function for managing alerts. +# Description: Overall module for managing alerts. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Generates alert log of the details at the time of the alert. # Used with email alerts. diff --git a/lgsm/functions/alert_discord.sh b/lgsm/modules/alert_discord.sh old mode 100755 new mode 100644 similarity index 95% rename from lgsm/functions/alert_discord.sh rename to lgsm/modules/alert_discord.sh index 770817516..a384de3db --- a/lgsm/functions/alert_discord.sh +++ b/lgsm/modules/alert_discord.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Sends Discord alert. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" json=$( cat << EOF diff --git a/lgsm/functions/alert_email.sh b/lgsm/modules/alert_email.sh old mode 100755 new mode 100644 similarity index 90% rename from lgsm/functions/alert_email.sh rename to lgsm/modules/alert_email.sh index ad90e880f..e2cf5f123 --- a/lgsm/functions/alert_email.sh +++ b/lgsm/modules/alert_email.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Sends email alert. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_print_dots "Sending Email alert: ${email}" fn_sleep_time diff --git a/lgsm/functions/alert_gotify.sh b/lgsm/modules/alert_gotify.sh similarity index 93% rename from lgsm/functions/alert_gotify.sh rename to lgsm/modules/alert_gotify.sh index faeba4593..ef833ba75 100644 --- a/lgsm/functions/alert_gotify.sh +++ b/lgsm/modules/alert_gotify.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Sends Gotify alert. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" json=$( cat << EOF diff --git a/lgsm/functions/alert_ifttt.sh b/lgsm/modules/alert_ifttt.sh old mode 100755 new mode 100644 similarity index 93% rename from lgsm/functions/alert_ifttt.sh rename to lgsm/modules/alert_ifttt.sh index f8bbc24ad..ae0de8ed6 --- a/lgsm/functions/alert_ifttt.sh +++ b/lgsm/modules/alert_ifttt.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Sends IFTTT alert. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" json=$( cat << EOF diff --git a/lgsm/functions/alert_mailgun.sh b/lgsm/modules/alert_mailgun.sh old mode 100755 new mode 100644 similarity index 93% rename from lgsm/functions/alert_mailgun.sh rename to lgsm/modules/alert_mailgun.sh index 25576209c..a25c82648 --- a/lgsm/functions/alert_mailgun.sh +++ b/lgsm/modules/alert_mailgun.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Sends Mailgun Email alert. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ "${mailgunapiregion}" == "eu" ]; then mailgunapiurl="https://api.eu.mailgun.net" diff --git a/lgsm/functions/alert_pushbullet.sh b/lgsm/modules/alert_pushbullet.sh old mode 100755 new mode 100644 similarity index 93% rename from lgsm/functions/alert_pushbullet.sh rename to lgsm/modules/alert_pushbullet.sh index 3e82d0db0..eec141611 --- a/lgsm/functions/alert_pushbullet.sh +++ b/lgsm/modules/alert_pushbullet.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Sends Pushbullet Messenger alert. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" json=$( cat << EOF diff --git a/lgsm/functions/alert_pushover.sh b/lgsm/modules/alert_pushover.sh old mode 100755 new mode 100644 similarity index 95% rename from lgsm/functions/alert_pushover.sh rename to lgsm/modules/alert_pushover.sh index d7c086478..608e73c30 --- a/lgsm/functions/alert_pushover.sh +++ b/lgsm/modules/alert_pushover.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Sends Pushover alert. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_print_dots "Sending Pushover alert" diff --git a/lgsm/functions/alert_rocketchat.sh b/lgsm/modules/alert_rocketchat.sh old mode 100755 new mode 100644 similarity index 94% rename from lgsm/functions/alert_rocketchat.sh rename to lgsm/modules/alert_rocketchat.sh index 34d018e38..875a6ff5d --- a/lgsm/functions/alert_rocketchat.sh +++ b/lgsm/modules/alert_rocketchat.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Sends Rocketchat alert. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" json=$( cat << EOF diff --git a/lgsm/functions/alert_slack.sh b/lgsm/modules/alert_slack.sh old mode 100755 new mode 100644 similarity index 96% rename from lgsm/functions/alert_slack.sh rename to lgsm/modules/alert_slack.sh index 2e87c1571..3bb148828 --- a/lgsm/functions/alert_slack.sh +++ b/lgsm/modules/alert_slack.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Sends Slack alert. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" json=$( cat << EOF diff --git a/lgsm/functions/alert_telegram.sh b/lgsm/modules/alert_telegram.sh old mode 100755 new mode 100644 similarity index 94% rename from lgsm/functions/alert_telegram.sh rename to lgsm/modules/alert_telegram.sh index 27e34beb4..77b89560c --- a/lgsm/functions/alert_telegram.sh +++ b/lgsm/modules/alert_telegram.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Sends Telegram Messenger alert. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" json=$( cat << EOF diff --git a/lgsm/functions/check.sh b/lgsm/modules/check.sh old mode 100755 new mode 100644 similarity index 95% rename from lgsm/functions/check.sh rename to lgsm/modules/check.sh index 239a24140..f0f49fc51 --- a/lgsm/functions/check.sh +++ b/lgsm/modules/check.sh @@ -3,10 +3,10 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Overall function for managing checks. +# Description: Overall module for managing checks. # Runs checks that will either halt on or fix an issue. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Every command that requires checks just references check.sh. # check.sh selects which checks to run by using arrays. diff --git a/lgsm/functions/check_config.sh b/lgsm/modules/check_config.sh old mode 100755 new mode 100644 similarity index 94% rename from lgsm/functions/check_config.sh rename to lgsm/modules/check_config.sh index 2c65243eb..4f96a8db4 --- a/lgsm/functions/check_config.sh +++ b/lgsm/modules/check_config.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Checks if the server config is missing and warns the user if needed. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ -n "${servercfgfullpath}" ] && [ ! -f "${servercfgfullpath}" ]; then fn_print_dots "" diff --git a/lgsm/functions/check_deps.sh b/lgsm/modules/check_deps.sh old mode 100755 new mode 100644 similarity index 99% rename from lgsm/functions/check_deps.sh rename to lgsm/modules/check_deps.sh index bb8507769..1db5c96c3 --- a/lgsm/functions/check_deps.sh +++ b/lgsm/modules/check_deps.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Checks and installs missing dependencies. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_install_mono_repo() { if [ "${autodepinstall}" == "0" ]; then diff --git a/lgsm/functions/check_executable.sh b/lgsm/modules/check_executable.sh old mode 100755 new mode 100644 similarity index 89% rename from lgsm/functions/check_executable.sh rename to lgsm/modules/check_executable.sh index d1b5c3efd..40721fbf4 --- a/lgsm/functions/check_executable.sh +++ b/lgsm/modules/check_executable.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Checks if server executable exists. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Check if executable exists execname=$(basename "${executable}") diff --git a/lgsm/functions/check_glibc.sh b/lgsm/modules/check_glibc.sh old mode 100755 new mode 100644 similarity index 92% rename from lgsm/functions/check_glibc.sh rename to lgsm/modules/check_glibc.sh index b1a959f5b..25357a461 --- a/lgsm/functions/check_glibc.sh +++ b/lgsm/modules/check_glibc.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Checks if the server has the correct Glibc version. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" info_distro.sh diff --git a/lgsm/functions/check_ip.sh b/lgsm/modules/check_ip.sh old mode 100755 new mode 100644 similarity index 96% rename from lgsm/functions/check_ip.sh rename to lgsm/modules/check_ip.sh index 4b8eca5ec..8dc0567b9 --- a/lgsm/functions/check_ip.sh +++ b/lgsm/modules/check_ip.sh @@ -6,7 +6,7 @@ # Description: Automatically identifies the server interface IP. # If multiple interfaces are detected the user will need to manually set using ip="0.0.0.0". -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" info_game.sh diff --git a/lgsm/functions/check_last_update.sh b/lgsm/modules/check_last_update.sh old mode 100755 new mode 100644 similarity index 92% rename from lgsm/functions/check_last_update.sh rename to lgsm/modules/check_last_update.sh index ee86c0ba1..d4f2d8f89 --- a/lgsm/functions/check_last_update.sh +++ b/lgsm/modules/check_last_update.sh @@ -6,7 +6,7 @@ # Description: Checks lock file to see when last update happened. # Will reboot server if instance not rebooted since update. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ -f "${lockdir}/${selfname}-laststart.lock" ]; then laststart=$(cat "${lockdir}/${selfname}-laststart.lock") diff --git a/lgsm/functions/check_logs.sh b/lgsm/modules/check_logs.sh old mode 100755 new mode 100644 similarity index 90% rename from lgsm/functions/check_logs.sh rename to lgsm/modules/check_logs.sh index fa3df92d1..2087ac915 --- a/lgsm/functions/check_logs.sh +++ b/lgsm/modules/check_logs.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Checks if log files exist. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_check_logs() { fn_print_dots "Checking for log files" diff --git a/lgsm/functions/check_permissions.sh b/lgsm/modules/check_permissions.sh old mode 100755 new mode 100644 similarity index 94% rename from lgsm/functions/check_permissions.sh rename to lgsm/modules/check_permissions.sh index 0094456ec..bb3e6764f --- a/lgsm/functions/check_permissions.sh +++ b/lgsm/modules/check_permissions.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Checks ownership & permissions of scripts, files and directories. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_check_ownership() { if [ -f "${rootdir}/${selfname}" ]; then @@ -13,8 +13,8 @@ fn_check_ownership() { selfownissue=1 fi fi - if [ -d "${functionsdir}" ]; then - if [ "$(find "${functionsdir}" -not -user "$(whoami)" | wc -l)" -ne "0" ]; then + if [ -d "${modulesdir}" ]; then + if [ "$(find "${modulesdir}" -not -user "$(whoami)" | wc -l)" -ne "0" ]; then funcownissue=1 fi fi @@ -34,7 +34,7 @@ fn_check_ownership() { find "${rootdir}/${selfname}" -not -user "$(whoami)" -printf "%u\t%g\t%p\n" fi if [ "${funcownissue}" == "1" ]; then - find "${functionsdir}" -not -user "$(whoami)" -printf "%u\t%g\t%p\n" + find "${modulesdir}" -not -user "$(whoami)" -printf "%u\t%g\t%p\n" fi if [ "${filesownissue}" == "1" ]; then find "${serverfiles}" -not -user "$(whoami)" -printf "%u\t%g\t%p\n" @@ -53,15 +53,15 @@ fn_check_ownership() { } fn_check_permissions() { - if [ -d "${functionsdir}" ]; then - if [ "$(find "${functionsdir}" -type f -not -executable | wc -l)" -ne "0" ]; then + if [ -d "${modulesdir}" ]; then + if [ "$(find "${modulesdir}" -type f -not -executable | wc -l)" -ne "0" ]; then fn_print_fail_nl "Permissions issues found" fn_script_log_fatal "Permissions issues found" fn_print_information_nl "The following files are not executable:" fn_script_log_info "The following files are not executable:" { echo -e "File\n" - find "${functionsdir}" -type f -not -executable -printf "%p\n" + find "${modulesdir}" -type f -not -executable -printf "%p\n" } | column -s $'\t' -t | tee -a "${lgsmlog}" if [ "${monitorflag}" == 1 ]; then alert="permissions" @@ -141,7 +141,7 @@ fn_check_permissions() { fi } -## The following fn_sys_perm_* functions checks for permission errors in /sys directory. +## The following fn_sys_perm_* modules checks for permission errors in /sys directory. # Checks for permission errors in /sys directory. fn_sys_perm_errors_detect() { diff --git a/lgsm/functions/check_root.sh b/lgsm/modules/check_root.sh old mode 100755 new mode 100644 similarity index 89% rename from lgsm/functions/check_root.sh rename to lgsm/modules/check_root.sh index dab033148..26475601a --- a/lgsm/functions/check_root.sh +++ b/lgsm/modules/check_root.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Checks if the user tried to run the script as root. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ "$(whoami)" == "root" ] && [ ! -f /.dockerenv ]; then if [ "${commandname}" != "INSTALL" ]; then diff --git a/lgsm/functions/check_status.sh b/lgsm/modules/check_status.sh old mode 100755 new mode 100644 similarity index 82% rename from lgsm/functions/check_status.sh rename to lgsm/modules/check_status.sh index 28ec38eb2..2ebfb3055 --- a/lgsm/functions/check_status.sh +++ b/lgsm/modules/check_status.sh @@ -5,6 +5,6 @@ # Website: https://linuxgsm.com # Description: Checks the process status of the server. Either online or offline. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" status=$(tmux list-sessions -F "#{session_name}" 2> /dev/null | grep -Ecx "^${sessionname}") diff --git a/lgsm/functions/check_steamcmd.sh b/lgsm/modules/check_steamcmd.sh old mode 100755 new mode 100644 similarity index 82% rename from lgsm/functions/check_steamcmd.sh rename to lgsm/modules/check_steamcmd.sh index d41e8669f..5d14bb21f --- a/lgsm/functions/check_steamcmd.sh +++ b/lgsm/modules/check_steamcmd.sh @@ -5,9 +5,9 @@ # Website: https://linuxgsm.com # Description: Checks if SteamCMD is installed correctly. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -# init steamcmd functions +# init steamcmd functions. core_steamcmd.sh fn_check_steamcmd_clear diff --git a/lgsm/functions/check_system_dir.sh b/lgsm/modules/check_system_dir.sh old mode 100755 new mode 100644 similarity index 88% rename from lgsm/functions/check_system_dir.sh rename to lgsm/modules/check_system_dir.sh index 0a732d6d1..9f0f5f092 --- a/lgsm/functions/check_system_dir.sh +++ b/lgsm/modules/check_system_dir.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Checks if systemdir/serverfiles is accessible. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ "${commandname}" != "VALIDATE" ]; then checkdir="${serverfiles}" diff --git a/lgsm/functions/check_system_requirements.sh b/lgsm/modules/check_system_requirements.sh old mode 100755 new mode 100644 similarity index 96% rename from lgsm/functions/check_system_requirements.sh rename to lgsm/modules/check_system_requirements.sh index bfe597135..114292f46 --- a/lgsm/functions/check_system_requirements.sh +++ b/lgsm/modules/check_system_requirements.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Checks RAM requirements. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" info_distro.sh diff --git a/lgsm/functions/check_tmuxception.sh b/lgsm/modules/check_tmuxception.sh old mode 100755 new mode 100644 similarity index 94% rename from lgsm/functions/check_tmuxception.sh rename to lgsm/modules/check_tmuxception.sh index 64705a3a8..aded5cb2d --- a/lgsm/functions/check_tmuxception.sh +++ b/lgsm/modules/check_tmuxception.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Checks if run from tmux or screen. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_check_is_in_tmux() { if [ "${TMUX}" ]; then diff --git a/lgsm/functions/check_version.sh b/lgsm/modules/check_version.sh old mode 100755 new mode 100644 similarity index 91% rename from lgsm/functions/check_version.sh rename to lgsm/modules/check_version.sh index 657e32b54..3ca015843 --- a/lgsm/functions/check_version.sh +++ b/lgsm/modules/check_version.sh @@ -6,7 +6,7 @@ # Description: Will run update-lgsm if gameserver.sh and modules version does not match # this will allow gameserver.sh to update - useful for multi instance servers. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ -n "${modulesversion}" ] && [ -n "${version}" ] && [ "${version}" != "${modulesversion}" ]; then exitbypass=1 diff --git a/lgsm/functions/command_backup.sh b/lgsm/modules/command_backup.sh similarity index 99% rename from lgsm/functions/command_backup.sh rename to lgsm/modules/command_backup.sh index d69c57a0f..1973eb95f 100644 --- a/lgsm/functions/command_backup.sh +++ b/lgsm/modules/command_backup.sh @@ -7,7 +7,7 @@ commandname="BACKUP" commandaction="Backing up" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set check.sh diff --git a/lgsm/functions/command_check_update.sh b/lgsm/modules/command_check_update.sh old mode 100755 new mode 100644 similarity index 93% rename from lgsm/functions/command_check_update.sh rename to lgsm/modules/command_check_update.sh index 3753c72c6..f079f3616 --- a/lgsm/functions/command_check_update.sh +++ b/lgsm/modules/command_check_update.sh @@ -7,7 +7,7 @@ commandname="CHECK-UPDATE" commandaction="check for Update" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set fn_print_dots "" diff --git a/lgsm/functions/command_console.sh b/lgsm/modules/command_console.sh old mode 100755 new mode 100644 similarity index 95% rename from lgsm/functions/command_console.sh rename to lgsm/modules/command_console.sh index 5b84789e6..e95f2d0e5 --- a/lgsm/functions/command_console.sh +++ b/lgsm/modules/command_console.sh @@ -7,7 +7,7 @@ commandname="CONSOLE" commandaction="Access console" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set check.sh diff --git a/lgsm/functions/command_debug.sh b/lgsm/modules/command_debug.sh old mode 100755 new mode 100644 similarity index 98% rename from lgsm/functions/command_debug.sh rename to lgsm/modules/command_debug.sh index c6422be65..52efd04db --- a/lgsm/functions/command_debug.sh +++ b/lgsm/modules/command_debug.sh @@ -7,7 +7,7 @@ commandname="DEBUG" commandaction="Debuging" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set # Trap to remove lockfile on quit. diff --git a/lgsm/functions/command_details.sh b/lgsm/modules/command_details.sh old mode 100755 new mode 100644 similarity index 93% rename from lgsm/functions/command_details.sh rename to lgsm/modules/command_details.sh index 08d9f031b..2c8e3a658 --- a/lgsm/functions/command_details.sh +++ b/lgsm/modules/command_details.sh @@ -7,7 +7,7 @@ commandname="DETAILS" commandaction="Viewing details" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set # Run checks and gathers details to display. diff --git a/lgsm/functions/command_dev_clear_functions.sh b/lgsm/modules/command_dev_clear_modules.sh old mode 100755 new mode 100644 similarity index 60% rename from lgsm/functions/command_dev_clear_functions.sh rename to lgsm/modules/command_dev_clear_modules.sh index 87c77515d..52d07ee1a --- a/lgsm/functions/command_dev_clear_functions.sh +++ b/lgsm/modules/command_dev_clear_modules.sh @@ -1,21 +1,21 @@ #!/bin/bash -# LinuxGSM command_dev_clear_functions.sh module +# LinuxGSM command_dev_clear_modules.sh module # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Deletes the contents of the functions dir. +# Description: Deletes the contents of the modules dir. commandname="DEV-CLEAR-MODULES" commandaction="Clearing modules" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set echo -e "=================================" -echo -e "Clear Functions" +echo -e "Clear Modules" echo -e "=================================" echo -e "" -if fn_prompt_yn "Do you want to delete all functions?" Y; then - rm -rfv "${functionsdir:?}/"* +if fn_prompt_yn "Do you want to delete all modules?" Y; then + rm -rfv "${modulesdir:?}/"* rm -rfv "${configdirdefault:?}/"* fn_script_log_info "Cleared modules directory" fn_script_log_info "Cleared default config directory" diff --git a/lgsm/functions/command_dev_debug.sh b/lgsm/modules/command_dev_debug.sh old mode 100755 new mode 100644 similarity index 89% rename from lgsm/functions/command_dev_debug.sh rename to lgsm/modules/command_dev_debug.sh index 19f16d58e..081bda611 --- a/lgsm/functions/command_dev_debug.sh +++ b/lgsm/modules/command_dev_debug.sh @@ -7,7 +7,7 @@ commandname="DEV-DEBUG" commandaction="Developer debug" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_reset if [ -f "${rootdir}/.dev-debug" ]; then diff --git a/lgsm/functions/command_dev_detect_deps.sh b/lgsm/modules/command_dev_detect_deps.sh old mode 100755 new mode 100644 similarity index 99% rename from lgsm/functions/command_dev_detect_deps.sh rename to lgsm/modules/command_dev_detect_deps.sh index d16b74418..763ab5554 --- a/lgsm/functions/command_dev_detect_deps.sh +++ b/lgsm/modules/command_dev_detect_deps.sh @@ -7,7 +7,7 @@ commandname="DEV-DETECT-DEPS" commandaction="Developer detect deps" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set echo -e "=================================" diff --git a/lgsm/functions/command_dev_detect_glibc.sh b/lgsm/modules/command_dev_detect_glibc.sh old mode 100755 new mode 100644 similarity index 97% rename from lgsm/functions/command_dev_detect_glibc.sh rename to lgsm/modules/command_dev_detect_glibc.sh index 73280e55d..8ff87d711 --- a/lgsm/functions/command_dev_detect_glibc.sh +++ b/lgsm/modules/command_dev_detect_glibc.sh @@ -8,7 +8,7 @@ commandname="DEV-DETECT-GLIBC" commandaction="Developer detect glibc" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set echo -e "=================================" diff --git a/lgsm/functions/command_dev_detect_ldd.sh b/lgsm/modules/command_dev_detect_ldd.sh old mode 100755 new mode 100644 similarity index 96% rename from lgsm/functions/command_dev_detect_ldd.sh rename to lgsm/modules/command_dev_detect_ldd.sh index 43630d4e9..877c8d95b --- a/lgsm/functions/command_dev_detect_ldd.sh +++ b/lgsm/modules/command_dev_detect_ldd.sh @@ -8,7 +8,7 @@ commandname="DEV-DETECT-LDD" commandaction="Developer detect ldd" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set echo -e "=================================" diff --git a/lgsm/functions/command_dev_query_raw.sh b/lgsm/modules/command_dev_query_raw.sh old mode 100755 new mode 100644 similarity index 97% rename from lgsm/functions/command_dev_query_raw.sh rename to lgsm/modules/command_dev_query_raw.sh index 26884b259..0d30e75bf --- a/lgsm/functions/command_dev_query_raw.sh +++ b/lgsm/modules/command_dev_query_raw.sh @@ -7,7 +7,7 @@ commandname="DEV-QUERY-RAW" commandaction="Developer query raw" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set check.sh @@ -229,10 +229,10 @@ echo -e "" for queryip in "${queryips[@]}"; do echo -e "./query_gsquery.py -a \"${queryip}\" -p \"${queryport}\" -e \"${querytype}\"" echo -e "" - if [ ! -f "${functionsdir}/query_gsquery.py" ]; then - fn_fetch_file_github "lgsm/functions" "query_gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nohash" + if [ ! -f "${modulesdir}/query_gsquery.py" ]; then + fn_fetch_file_github "lgsm/modules" "query_gsquery.py" "${modulesdir}" "chmodx" "norun" "noforce" "nohash" fi - "${functionsdir}"/query_gsquery.py -a "${queryip}" -p "${queryport}" -e "${querytype}" + "${modulesdir}"/query_gsquery.py -a "${queryip}" -p "${queryport}" -e "${querytype}" done echo -e "" echo -e "${lightgreen}TCP Raw Output${default}" diff --git a/lgsm/functions/command_fastdl.sh b/lgsm/modules/command_fastdl.sh old mode 100755 new mode 100644 similarity index 99% rename from lgsm/functions/command_fastdl.sh rename to lgsm/modules/command_fastdl.sh index 78abd650a..4aff9994d --- a/lgsm/functions/command_fastdl.sh +++ b/lgsm/modules/command_fastdl.sh @@ -7,7 +7,7 @@ commandname="FASTDL" commandaction="Fastdl" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set check.sh diff --git a/lgsm/functions/command_install.sh b/lgsm/modules/command_install.sh old mode 100755 new mode 100644 similarity index 90% rename from lgsm/functions/command_install.sh rename to lgsm/modules/command_install.sh index 19dc59c7e..32f846fac --- a/lgsm/functions/command_install.sh +++ b/lgsm/modules/command_install.sh @@ -3,11 +3,11 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Overall function for the installer. +# Description: Overall module for the installer. commandname="INSTALL" commandaction="Installing" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set check.sh diff --git a/lgsm/functions/command_install_resources_mta.sh b/lgsm/modules/command_install_resources_mta.sh old mode 100755 new mode 100644 similarity index 94% rename from lgsm/functions/command_install_resources_mta.sh rename to lgsm/modules/command_install_resources_mta.sh index daf039551..c3d745a30 --- a/lgsm/functions/command_install_resources_mta.sh +++ b/lgsm/modules/command_install_resources_mta.sh @@ -7,7 +7,7 @@ commandname="DEFAULT-RESOURCES" commandaction="Default Resources" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set fn_install_resources() { diff --git a/lgsm/functions/command_mods_install.sh b/lgsm/modules/command_mods_install.sh old mode 100755 new mode 100644 similarity index 98% rename from lgsm/functions/command_mods_install.sh rename to lgsm/modules/command_mods_install.sh index 0edbe5bc0..d602be2cd --- a/lgsm/functions/command_mods_install.sh +++ b/lgsm/modules/command_mods_install.sh @@ -7,7 +7,7 @@ commandname="MODS-INSTALL" commandaction="Installing mods" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set check.sh diff --git a/lgsm/functions/command_mods_remove.sh b/lgsm/modules/command_mods_remove.sh old mode 100755 new mode 100644 similarity index 98% rename from lgsm/functions/command_mods_remove.sh rename to lgsm/modules/command_mods_remove.sh index 7127dcb3c..08095c8e8 --- a/lgsm/functions/command_mods_remove.sh +++ b/lgsm/modules/command_mods_remove.sh @@ -7,7 +7,7 @@ commandname="MODS-REMOVE" commandaction="Removing mods" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set check.sh diff --git a/lgsm/functions/command_mods_update.sh b/lgsm/modules/command_mods_update.sh old mode 100755 new mode 100644 similarity index 98% rename from lgsm/functions/command_mods_update.sh rename to lgsm/modules/command_mods_update.sh index 80b23fea9..b917f191f --- a/lgsm/functions/command_mods_update.sh +++ b/lgsm/modules/command_mods_update.sh @@ -7,7 +7,7 @@ commandname="MODS-UPDATE" commandaction="Updating mods" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set check.sh diff --git a/lgsm/functions/command_monitor.sh b/lgsm/modules/command_monitor.sh old mode 100755 new mode 100644 similarity index 95% rename from lgsm/functions/command_monitor.sh rename to lgsm/modules/command_monitor.sh index 20c830e0b..f2db9ca2d --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/modules/command_monitor.sh @@ -8,7 +8,7 @@ commandname="MONITOR" commandaction="Monitoring" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set fn_monitor_check_lockfile() { @@ -84,10 +84,10 @@ fn_monitor_check_queryport() { } fn_query_gsquery() { - if [ ! -f "${functionsdir}/query_gsquery.py" ]; then - fn_fetch_file_github "lgsm/functions" "query_gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nohash" + if [ ! -f "${modulesdir}/query_gsquery.py" ]; then + fn_fetch_file_github "lgsm/modules" "query_gsquery.py" "${modulesdir}" "chmodx" "norun" "noforce" "nohash" fi - "${functionsdir}"/query_gsquery.py -a "${queryip}" -p "${queryport}" -e "${querytype}" > /dev/null 2>&1 + "${modulesdir}"/query_gsquery.py -a "${queryip}" -p "${queryport}" -e "${querytype}" > /dev/null 2>&1 querystatus="$?" } diff --git a/lgsm/functions/command_postdetails.sh b/lgsm/modules/command_postdetails.sh old mode 100755 new mode 100644 similarity index 94% rename from lgsm/functions/command_postdetails.sh rename to lgsm/modules/command_postdetails.sh index dad44d9af..736c9ec27 --- a/lgsm/functions/command_postdetails.sh +++ b/lgsm/modules/command_postdetails.sh @@ -7,12 +7,12 @@ commandname="POST-DETAILS" commandaction="Posting details" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set posttarget="https://termbin.com" -# source all of the functions defined in the details command. +# source all of the modules defined in the details command. info_messages.sh fn_bad_postdetailslog() { diff --git a/lgsm/functions/command_restart.sh b/lgsm/modules/command_restart.sh old mode 100755 new mode 100644 similarity index 83% rename from lgsm/functions/command_restart.sh rename to lgsm/modules/command_restart.sh index 3bf60c32c..b7bb1f3e3 --- a/lgsm/functions/command_restart.sh +++ b/lgsm/modules/command_restart.sh @@ -7,7 +7,7 @@ commandname="MODS-INSTALL" commandaction="Restarting" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set info_game.sh diff --git a/lgsm/functions/command_send.sh b/lgsm/modules/command_send.sh similarity index 93% rename from lgsm/functions/command_send.sh rename to lgsm/modules/command_send.sh index c143276f6..8ba8f8412 100644 --- a/lgsm/functions/command_send.sh +++ b/lgsm/modules/command_send.sh @@ -7,7 +7,7 @@ commandname="SEND" commandaction="Send" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set check.sh diff --git a/lgsm/functions/command_skeleton.sh b/lgsm/modules/command_skeleton.sh similarity index 91% rename from lgsm/functions/command_skeleton.sh rename to lgsm/modules/command_skeleton.sh index 53c4ddec5..01a7f4e7e 100644 --- a/lgsm/functions/command_skeleton.sh +++ b/lgsm/modules/command_skeleton.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Creates an copy of a game servers directorys. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_print_dots "Creating skeleton directory" check.sh diff --git a/lgsm/functions/command_sponsor.sh b/lgsm/modules/command_sponsor.sh old mode 100755 new mode 100644 similarity index 91% rename from lgsm/functions/command_sponsor.sh rename to lgsm/modules/command_sponsor.sh index 22ec0c49e..336f20f0a --- a/lgsm/functions/command_sponsor.sh +++ b/lgsm/modules/command_sponsor.sh @@ -7,7 +7,7 @@ commandname="SPONSOR" commandaction="Sponsor" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set fn_print_ascii_logo diff --git a/lgsm/functions/command_start.sh b/lgsm/modules/command_start.sh old mode 100755 new mode 100644 similarity index 99% rename from lgsm/functions/command_start.sh rename to lgsm/modules/command_start.sh index 04c6b4e64..e5021cde2 --- a/lgsm/functions/command_start.sh +++ b/lgsm/modules/command_start.sh @@ -7,7 +7,7 @@ commandname="START" commandaction="Starting" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" addtimestamp="gawk '{ print strftime(\\\"[$logtimestampformat]\\\"), \\\$0 }'" fn_firstcommand_set diff --git a/lgsm/functions/command_stop.sh b/lgsm/modules/command_stop.sh similarity index 99% rename from lgsm/functions/command_stop.sh rename to lgsm/modules/command_stop.sh index d18ef7c23..564f5ed4c 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/modules/command_stop.sh @@ -7,7 +7,7 @@ commandname="STOP" commandaction="Stopping" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set # Attempts graceful shutdown by sending 'CTRL+c'. diff --git a/lgsm/functions/command_test_alert.sh b/lgsm/modules/command_test_alert.sh old mode 100755 new mode 100644 similarity index 83% rename from lgsm/functions/command_test_alert.sh rename to lgsm/modules/command_test_alert.sh index 7fe61e48a..15f481391 --- a/lgsm/functions/command_test_alert.sh +++ b/lgsm/modules/command_test_alert.sh @@ -7,7 +7,7 @@ commandname="TEST-ALERT" commandaction="Sending Alert" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set fn_print_dots "${servername}" diff --git a/lgsm/functions/command_ts3_server_pass.sh b/lgsm/modules/command_ts3_server_pass.sh old mode 100755 new mode 100644 similarity index 95% rename from lgsm/functions/command_ts3_server_pass.sh rename to lgsm/modules/command_ts3_server_pass.sh index be0816d15..4814ab142 --- a/lgsm/functions/command_ts3_server_pass.sh +++ b/lgsm/modules/command_ts3_server_pass.sh @@ -7,7 +7,7 @@ commandname="CHANGE-PASSWORD" commandaction="Changing password" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set fn_serveradmin_password_prompt() { diff --git a/lgsm/functions/command_update.sh b/lgsm/modules/command_update.sh old mode 100755 new mode 100644 similarity index 93% rename from lgsm/functions/command_update.sh rename to lgsm/modules/command_update.sh index ae5c2065c..5993609c0 --- a/lgsm/functions/command_update.sh +++ b/lgsm/modules/command_update.sh @@ -7,7 +7,7 @@ commandname="UPDATE" commandaction="Updating" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set fn_print_dots "" diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/modules/command_update_linuxgsm.sh old mode 100755 new mode 100644 similarity index 86% rename from lgsm/functions/command_update_linuxgsm.sh rename to lgsm/modules/command_update_linuxgsm.sh index 569bc7cdb..3c4e6d080 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/modules/command_update_linuxgsm.sh @@ -3,11 +3,11 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Deletes the functions dir to allow re-downloading of functions from GitHub. +# Description: Deletes the modules dir to allow re-downloading of modules from GitHub. commandname="UPDATE-LGSM" commandaction="Updating LinuxGSM" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set check.sh @@ -180,49 +180,49 @@ if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then fi fi # Check and update modules. -if [ -n "${functionsdir}" ]; then - if [ -d "${functionsdir}" ]; then +if [ -n "${modulesdir}" ]; then + if [ -d "${modulesdir}" ]; then ( - cd "${functionsdir}" || exit - for functionfile in *; do + cd "${modulesdir}" || exit + for modulefile in *; do # check if module exists in the repo and remove if missing. # commonly used if module names change. - echo -en "checking ${remotereponame} module ${functionfile}...\c" - github_file_url_dir="lgsm/functions" + echo -en "checking ${remotereponame} module ${modulefile}...\c" + github_file_url_dir="lgsm/modules" if [ "${remotereponame}" == "GitHub" ]; then - curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}" 1> /dev/null + curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${modulefile}" 1> /dev/null else - curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${functionfile}" 1> /dev/null + curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${modulefile}" 1> /dev/null fi if [ $? != 0 ]; then fn_print_error_eol_nl - fn_script_log_error "Checking ${remotereponame} module ${functionfile}" - echo -en "removing module ${functionfile}...\c" - if ! rm -f "${functionfile:?}"; then + fn_script_log_error "Checking ${remotereponame} module ${modulefile}" + echo -en "removing module ${modulefile}...\c" + if ! rm -f "${modulefile:?}"; then fn_print_fail_eol_nl - fn_script_log_fatal "Removing module ${functionfile}" + fn_script_log_fatal "Removing module ${modulefile}" core_exit.sh else fn_print_ok_eol_nl - fn_script_log_pass "Removing module ${functionfile}" + fn_script_log_pass "Removing module ${modulefile}" fi else # compare file if [ "${remotereponame}" == "GitHub" ]; then - function_file_diff=$(diff "${functionsdir}/${functionfile}" <(curl --connect-timeout 10 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}")) + module_file_diff=$(diff "${modulesdir}/${modulefile}" <(curl --connect-timeout 10 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${modulefile}")) else - function_file_diff=$(diff "${functionsdir}/${functionfile}" <(curl --connect-timeout 10 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${functionfile}")) + module_file_diff=$(diff "${modulesdir}/${modulefile}" <(curl --connect-timeout 10 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${modulefile}")) fi # results - if [ "${function_file_diff}" != "" ]; then + if [ "${module_file_diff}" != "" ]; then fn_print_update_eol_nl - fn_script_log_update "Checking ${remotereponame} module ${functionfile}" - rm -rf "${functionsdir:?}/${functionfile}" - fn_update_function + fn_script_log_update "Checking ${remotereponame} module ${modulefile}" + rm -rf "${modulesdir:?}/${modulefile}" + fn_update_module else fn_print_ok_eol_nl - fn_script_log_pass "Checking ${remotereponame} module ${functionfile}" + fn_script_log_pass "Checking ${remotereponame} module ${modulefile}" fi fi done @@ -230,7 +230,7 @@ if [ -n "${functionsdir}" ]; then fi fi -fn_print_ok_nl "Updating functions" -fn_script_log_pass "Updating functions" +fn_print_ok_nl "Updating modules" +fn_script_log_pass "Updating modules" core_exit.sh diff --git a/lgsm/functions/command_validate.sh b/lgsm/modules/command_validate.sh old mode 100755 new mode 100644 similarity index 94% rename from lgsm/functions/command_validate.sh rename to lgsm/modules/command_validate.sh index 15257a3e2..23ee92a26 --- a/lgsm/functions/command_validate.sh +++ b/lgsm/modules/command_validate.sh @@ -7,7 +7,7 @@ commandname="VALIDATE" commandaction="Validating" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set fn_validate() { diff --git a/lgsm/functions/command_wipe.sh b/lgsm/modules/command_wipe.sh old mode 100755 new mode 100644 similarity index 98% rename from lgsm/functions/command_wipe.sh rename to lgsm/modules/command_wipe.sh index e1677e827..193d2cd2d --- a/lgsm/functions/command_wipe.sh +++ b/lgsm/modules/command_wipe.sh @@ -7,7 +7,7 @@ commandname="WIPE" commandaction="Wiping" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set # Provides an exit code upon error. diff --git a/lgsm/functions/compress_unreal2_maps.sh b/lgsm/modules/compress_unreal2_maps.sh old mode 100755 new mode 100644 similarity index 92% rename from lgsm/functions/compress_unreal2_maps.sh rename to lgsm/modules/compress_unreal2_maps.sh index 0c32d3c77..f67ac7010 --- a/lgsm/functions/compress_unreal2_maps.sh +++ b/lgsm/modules/compress_unreal2_maps.sh @@ -7,7 +7,7 @@ commandname="MAP-COMPRESSOR" commandaction="Compressing maps" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set check.sh diff --git a/lgsm/functions/compress_ut99_maps.sh b/lgsm/modules/compress_ut99_maps.sh old mode 100755 new mode 100644 similarity index 92% rename from lgsm/functions/compress_ut99_maps.sh rename to lgsm/modules/compress_ut99_maps.sh index 9aa074ba9..51bbd386a --- a/lgsm/functions/compress_ut99_maps.sh +++ b/lgsm/modules/compress_ut99_maps.sh @@ -7,7 +7,7 @@ commandname="MAP-COMPRESSOR" commandaction="Compressing maps" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set check.sh diff --git a/lgsm/modules/core_dl.sh b/lgsm/modules/core_dl.sh new file mode 100644 index 000000000..405e9dc6b --- /dev/null +++ b/lgsm/modules/core_dl.sh @@ -0,0 +1,627 @@ +#!/bin/bash +# LinuxGSM core_dl.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Deals with all downloads for LinuxGSM. + +# remote_fileurl: The URL of the file: http://example.com/dl/File.tar.bz2 +# local_filedir: location the file is to be saved: /home/server/lgsm/tmp +# local_filename: name of file (this can be different from the url name): file.tar.bz2 +# chmodx: Optional, set to "chmodx" to make file executable using chmod +x +# run: Optional, set run to execute the file after download +# forcedl: Optional, force re-download of file even if exists +# hash: Optional, set an hash sum and will compare it against the file. +# +# Downloads can be defined in code like so: +# fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}" +# fn_fetch_file "http://example.com/file.tar.bz2" "http://example.com/file2.tar.bz2" "file.tar.bz2" "file2.tar.bz2" "/some/dir" "file.tar.bz2" "chmodx" "run" "forcedl" "10cd7353aa9d758a075c600a6dd193fd" + +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +fn_dl_steamcmd() { + fn_print_start_nl "${remotelocation}" + fn_script_log_info "${commandaction} ${selfname}: ${remotelocation}" + if [ -n "${branch}" ]; then + echo -e "Branch: ${branch}" + fn_script_log_info "Branch: ${branch}" + fi + if [ -n "${betapassword}" ]; then + echo -e "Branch password: ${betapassword}" + fn_script_log_info "Branch password: ${betapassword}" + fi + if [ -d "${steamcmddir}" ]; then + cd "${steamcmddir}" || exit + fi + + # Unbuffer will allow the output of steamcmd not buffer allowing a smooth output. + # unbuffer us part of the expect package. + if [ "$(command -v unbuffer)" ]; then + unbuffer="unbuffer" + fi + + # Validate will be added as a parameter if required. + if [ "${commandname}" == "VALIDATE" ] || [ "${commandname}" == "INSTALL" ]; then + validate="validate" + fi + + # To do error checking for SteamCMD the output of steamcmd will be saved to a log. + steamcmdlog="${lgsmlogdir}/${selfname}-steamcmd.log" + + # clear previous steamcmd log + if [ -f "${steamcmdlog}" ]; then + rm -f "${steamcmdlog:?}" + fi + counter=0 + while [ "${counter}" == "0" ] || [ "${exitcode}" != "0" ]; do + counter=$((counter + 1)) + # Select SteamCMD parameters + # If GoldSrc (appid 90) servers. GoldSrc (appid 90) require extra commands. + if [ "${appid}" == "90" ]; then + # If using a specific branch. + if [ -n "${branch}" ] && [ -n "${betapassword}" ]; then + ${unbuffer} ${steamcmdcommand} +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" + elif [ -n "${branch}" ]; then + ${unbuffer} ${steamcmdcommand} +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" -beta "${branch}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" + else + ${unbuffer} ${steamcmdcommand} +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" + fi + # Force Windows Platform type. + elif [ "${steamcmdforcewindows}" == "yes" ]; then + if [ -n "${branch}" ] && [ -n "${betapassword}" ]; then + ${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" + elif [ -n "${branch}" ]; then + ${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" + else + ${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" + fi + # All other servers. + else + if [ -n "${branch}" ] && [ -n "${betapassword}" ]; then + ${unbuffer} ${steamcmdcommand} +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" + elif [ -n "${branch}" ]; then + ${unbuffer} ${steamcmdcommand} +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" + else + ${unbuffer} ${steamcmdcommand} +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" + fi + fi + + # Error checking for SteamCMD. Some errors will loop to try again and some will just exit. + # Check also if we have more errors than retries to be sure that we do not loop to many times and error out. + exitcode=$? + if [ -n "$(grep -i "Error!" "${steamcmdlog}" | tail -1)" ] && [ "$(grep -ic "Error!" "${steamcmdlog}")" -ge "${counter}" ]; then + # Not enough space. + if [ -n "$(grep "0x202" "${steamcmdlog}" | tail -1)" ]; then + fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files" + fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files" + core_exit.sh + # Not enough space. + elif [ -n "$(grep "0x212" "${steamcmdlog}" | tail -1)" ]; then + fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files" + fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files" + core_exit.sh + # Need tp purchase game. + elif [ -n "$(grep "No subscription" "${steamcmdlog}" | tail -1)" ]; then + fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Steam account does not have a license for the required game" + fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Steam account does not have a license for the required game" + core_exit.sh + # Two-factor authentication failure + elif [ -n "$(grep "Two-factor code mismatch" "${steamcmdlog}" | tail -1)" ]; then + fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Two-factor authentication failure" + fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Two-factor authentication failure" + core_exit.sh + # Incorrect Branch password + elif [ -n "$(grep "Password check for AppId" "${steamcmdlog}" | tail -1)" ]; then + fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: betapassword is incorrect" + fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: betapassword is incorrect" + core_exit.sh + # Update did not finish. + elif [ -n "$(grep "0x402" "${steamcmdlog}" | tail -1)" ] || [ -n "$(grep "0x602" "${steamcmdlog}" | tail -1)" ]; then + fn_print_error2_nl "${commandaction} ${selfname}: ${remotelocation}: Update required but not completed - check network" + fn_script_log_error "${commandaction} ${selfname}: ${remotelocation}: Update required but not completed - check network" + else + fn_print_error2_nl "${commandaction} ${selfname}: ${remotelocation}: Unknown error occured" + echo -en "Please provide content log to LinuxGSM developers https://linuxgsm.com/steamcmd-error" + fn_script_log_error "${commandaction} ${selfname}: ${remotelocation}: Unknown error occured" + fi + elif [ "${exitcode}" != 0 ]; then + fn_print_error2_nl "${commandaction} ${selfname}: ${remotelocation}: Exit code: ${exitcode}" + fn_script_log_error "${commandaction} ${selfname}: ${remotelocation}: Exit code: ${exitcode}" + else + fn_print_complete_nl "${commandaction} ${selfname}: ${remotelocation}" + fn_script_log_pass "${commandaction} ${selfname}: ${remotelocation}" + fi + + if [ "${counter}" -gt "10" ]; then + fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Did not complete the download, too many retrys" + fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Did not complete the download, too many retrys" + core_exit.sh + fi + done +} + +# Emptys contents of the LinuxGSM tmpdir. +fn_clear_tmp() { + echo -en "clearing LinuxGSM tmp directory..." + if [ -d "${tmpdir}" ]; then + rm -rf "${tmpdir:?}/"* + local exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_print_error_eol_nl + fn_script_log_error "clearing LinuxGSM tmp directory" + else + fn_print_ok_eol_nl + fn_script_log_pass "clearing LinuxGSM tmp directory" + fi + fi +} + +fn_dl_hash() { + # Runs Hash Check if available. + if [ "${hash}" != "0" ] && [ "${hash}" != "nohash" ] && [ "${hash}" != "nomd5" ]; then + # MD5 + if [ "${#hash}" == "32" ]; then + hashbin="md5sum" + hashtype="MD5" + # SHA1 + elif [ "${#hash}" == "40" ]; then + hashbin="sha1sum" + hashtype="SHA1" + # SHA256 + elif [ "${#hash}" == "64" ]; then + hashbin="sha256sum" + hashtype="SHA256" + # SHA512 + elif [ "${#hash}" == "128" ]; then + hashbin="sha512sum" + hashtype="SHA512" + else + fn_script_log_error "hash lengh not known for hash type" + fn_print_error_nl "hash lengh not known for hash type" + core_exit.sh + fi + echo -en "verifying ${local_filename} with ${hashtype}..." + fn_sleep_time + hashsumcmd=$(${hashbin} "${local_filedir}/${local_filename}" | awk '{print $1}') + if [ "${hashsumcmd}" != "${hash}" ]; then + fn_print_fail_eol_nl + echo -e "${local_filename} returned ${hashtype} checksum: ${hashsumcmd}" + echo -e "expected ${hashtype} checksum: ${hash}" + fn_script_log_fatal "Verifying ${local_filename} with ${hashtype}" + fn_script_log_info "${local_filename} returned ${hashtype} checksum: ${hashsumcmd}" + fn_script_log_info "Expected ${hashtype} checksum: ${hash}" + core_exit.sh + else + fn_print_ok_eol_nl + fn_script_log_pass "Verifying ${local_filename} with ${hashtype}" + fn_script_log_info "${local_filename} returned ${hashtype} checksum: ${hashsumcmd}" + fn_script_log_info "Expected ${hashtype} checksum: ${hash}" + fi + fi +} + +# Extracts bzip2, gzip or zip files. +# Extracts can be defined in code like so: +# fn_dl_extract "${local_filedir}" "${local_filename}" "${extractdest}" "${extractsrc}" +# fn_dl_extract "/home/gameserver/lgsm/tmp" "file.tar.bz2" "/home/gamserver/serverfiles" +fn_dl_extract() { + local_filedir="${1}" + local_filename="${2}" + extractdest="${3}" + extractsrc="${4}" + # Extracts archives. + echo -en "extracting ${local_filename}..." + + if [ ! -d "${extractdest}" ]; then + mkdir "${extractdest}" + fi + if [ ! -f "${local_filedir}/${local_filename}" ]; then + fn_print_fail_eol_nl + echo -en "file ${local_filedir}/${local_filename} not found" + fn_script_log_fatal "Extracting ${local_filename}" + fn_script_log_fatal "File ${local_filedir}/${local_filename} not found" + core_exit.sh + fi + mime=$(file -b --mime-type "${local_filedir}/${local_filename}") + if [ "${mime}" == "application/gzip" ] || [ "${mime}" == "application/x-gzip" ]; then + if [ -n "${extractsrc}" ]; then + extractcmd=$(tar -zxf "${local_filedir}/${local_filename}" -C "${extractdest}" --strip-components=1 "${extractsrc}") + else + extractcmd=$(tar -zxf "${local_filedir}/${local_filename}" -C "${extractdest}") + fi + elif [ "${mime}" == "application/x-bzip2" ]; then + if [ -n "${extractsrc}" ]; then + extractcmd=$(tar -jxf "${local_filedir}/${local_filename}" -C "${extractdest}" --strip-components=1 "${extractsrc}") + else + extractcmd=$(tar -jxf "${local_filedir}/${local_filename}" -C "${extractdest}") + fi + elif [ "${mime}" == "application/x-xz" ]; then + if [ -n "${extractsrc}" ]; then + extractcmd=$(tar -Jxf "${local_filedir}/${local_filename}" -C "${extractdest}" --strip-components=1 "${extractsrc}") + else + extractcmd=$(tar -Jxf "${local_filedir}/${local_filename}" -C "${extractdest}") + fi + elif [ "${mime}" == "application/zip" ]; then + if [ -n "${extractsrc}" ]; then + extractcmd=$(unzip -qoj -d "${extractdest}" "${local_filedir}/${local_filename}" "${extractsrc}"/*) + else + extractcmd=$(unzip -qo -d "${extractdest}" "${local_filedir}/${local_filename}") + fi + fi + local exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "Extracting ${local_filename}" + if [ -f "${lgsmlog}" ]; then + echo -e "${extractcmd}" >> "${lgsmlog}" + fi + echo -e "${extractcmd}" + core_exit.sh + else + fn_print_ok_eol_nl + fn_script_log_pass "Extracting ${local_filename}" + fi +} + +# Trap to remove file download if canceled before completed. +fn_fetch_trap() { + echo -e "" + echo -en "downloading ${local_filename}..." + fn_print_canceled_eol_nl + fn_script_log_info "Downloading ${local_filename}...CANCELED" + fn_sleep_time + rm -f "${local_filedir:?}/${local_filename}" + echo -en "downloading ${local_filename}..." + fn_print_removed_eol_nl + fn_script_log_info "Downloading ${local_filename}...REMOVED" + core_exit.sh +} + +# Will check a file exists and download it. Will not exit if fails to download. +fn_check_file() { + remote_fileurl="${1}" + remote_fileurl_backup="${2}" + remote_fileurl_name="${3}" + remote_fileurl_backup_name="${4}" + remote_filename="${5}" + # If backup fileurl exists include it. + if [ -n "${remote_fileurl_backup}" ]; then + # counter set to 0 to allow second try + counter=0 + remote_fileurls_array=(remote_fileurl remote_fileurl_backup) + else + # counter set to 1 to not allow second try + counter=1 + remote_fileurls_array=(remote_fileurl) + fi + for remote_fileurl_array in "${remote_fileurls_array[@]}"; do + if [ "${remote_fileurl_array}" == "remote_fileurl" ]; then + fileurl="${remote_fileurl}" + fileurl_name="${remote_fileurl_name}" + elif [ "${remote_fileurl_array}" == "remote_fileurl_backup" ]; then + fileurl="${remote_fileurl_backup}" + fileurl_name="${remote_fileurl_backup_name}" + fi + counter=$((counter + 1)) + echo -en "checking ${fileurl_name} ${remote_filename}...\c" + curlcmd=$(curl --output /dev/null --silent --head --fail "${fileurl}" 2>&1) + local exitcode=$? + + # On first try will error. On second try will fail. + if [ "${exitcode}" != 0 ]; then + if [ ${counter} -ge 2 ]; then + fn_print_fail_eol_nl + if [ -f "${lgsmlog}" ]; then + fn_script_log_fatal "Checking ${remote_filename}" + fn_script_log_fatal "${fileurl}" + checkflag=1 + fi + else + fn_print_error_eol_nl + if [ -f "${lgsmlog}" ]; then + fn_script_log_error "Checking ${remote_filename}" + fn_script_log_error "${fileurl}" + checkflag=2 + fi + fi + else + fn_print_ok_eol + echo -en "\033[2K\\r" + if [ -f "${lgsmlog}" ]; then + fn_script_log_pass "Checking ${remote_filename}" + checkflag=0 + fi + break + fi + done + + if [ -f "${local_filedir}/${local_filename}" ]; then + fn_dl_hash + # Execute file if run is set. + if [ "${run}" == "run" ]; then + # shellcheck source=/dev/null + source "${local_filedir}/${local_filename}" + fi + fi +} + +fn_fetch_file() { + remote_fileurl="${1}" + remote_fileurl_backup="${2}" + remote_fileurl_name="${3}" + remote_fileurl_backup_name="${4}" + local_filedir="${5}" + local_filename="${6}" + chmodx="${7:-0}" + run="${8:-0}" + forcedl="${9:-0}" + hash="${10:-0}" + + # Download file if missing or download forced. + if [ ! -f "${local_filedir}/${local_filename}" ] || [ "${forcedl}" == "forcedl" ]; then + # If backup fileurl exists include it. + if [ -n "${remote_fileurl_backup}" ]; then + # counter set to 0 to allow second try + counter=0 + remote_fileurls_array=(remote_fileurl remote_fileurl_backup) + else + # counter set to 1 to not allow second try + counter=1 + remote_fileurls_array=(remote_fileurl) + fi + for remote_fileurl_array in "${remote_fileurls_array[@]}"; do + if [ "${remote_fileurl_array}" == "remote_fileurl" ]; then + fileurl="${remote_fileurl}" + fileurl_name="${remote_fileurl_name}" + elif [ "${remote_fileurl_array}" == "remote_fileurl_backup" ]; then + fileurl="${remote_fileurl_backup}" + fileurl_name="${remote_fileurl_backup_name}" + fi + counter=$((counter + 1)) + if [ ! -d "${local_filedir}" ]; then + mkdir -p "${local_filedir}" + fi + # Trap will remove part downloaded files if canceled. + trap fn_fetch_trap INT + curlcmd=(curl --connect-timeout 10 --fail -L -o "${local_filedir}/${local_filename}" --retry 2) + + # if is large file show progress, else be silent + local exitcode="" + large_files=("bz2" "gz" "zip" "jar" "xz") + if grep -qE "(^|\s)${local_filename##*.}(\s|$)" <<< "${large_files[@]}"; then + echo -en "downloading ${local_filename}..." + fn_sleep_time + echo -en "\033[1K" + "${curlcmd[@]}" --progress-bar "${fileurl}" 2>&1 + exitcode="$?" + else + echo -en "fetching ${fileurl_name} ${local_filename}...\c" + "${curlcmd[@]}" --silent --show-error "${fileurl}" 2>&1 + exitcode="$?" + fi + + # Download will fail if downloads a html file. + if [ -f "${local_filedir}/${local_filename}" ]; then + if head -n 1 "${local_filedir}/${local_filename}" | grep -q "DOCTYPE"; then + rm "${local_filedir:?}/${local_filename:?}" + local exitcode=2 + fi + fi + + # On first try will error. On second try will fail. + if [ "${exitcode}" != 0 ]; then + if [ ${counter} -ge 2 ]; then + fn_print_fail_eol_nl + if [ -f "${lgsmlog}" ]; then + fn_script_log_fatal "Downloading ${local_filename}..." + fn_script_log_fatal "${fileurl}" + fi + core_exit.sh + else + fn_print_error_eol_nl + if [ -f "${lgsmlog}" ]; then + fn_script_log_error "Downloading ${local_filename}..." + fn_script_log_error "${fileurl}" + fi + fi + else + fn_print_ok_eol_nl + if [ -f "${lgsmlog}" ]; then + fn_script_log_pass "Downloading ${local_filename}..." + fi + + # Make file executable if chmodx is set. + if [ "${chmodx}" == "chmodx" ]; then + chmod +x "${local_filedir}/${local_filename}" + fi + + # Remove trap. + trap - INT + + break + fi + done + fi + + if [ -f "${local_filedir}/${local_filename}" ]; then + fn_dl_hash + # Execute file if run is set. + if [ "${run}" == "run" ]; then + # shellcheck source=/dev/null + source "${local_filedir}/${local_filename}" + fi + fi +} + +# GitHub file download modules. +# Used to simplify downloading specific files from GitHub. + +# github_file_url_dir: the directory of the file in the GitHub: lgsm/modules +# github_file_url_name: the filename of the file to download from GitHub: core_messages.sh +# github_file_url_dir: the directory of the file in the GitHub: lgsm/modules +# github_file_url_name: the filename of the file to download from GitHub: core_messages.sh +# githuburl: the full GitHub url + +# remote_fileurl: The URL of the file: http://example.com/dl/File.tar.bz2 +# local_filedir: location the file is to be saved: /home/server/lgsm/tmp +# local_filename: name of file (this can be different from the url name): file.tar.bz2 +# chmodx: Optional, set to "chmodx" to make file executable using chmod +x +# run: Optional, set run to execute the file after download +# forcedl: Optional, force re-download of file even if exists +# hash: Optional, set an hash sum and will compare it against the file. + +# Fetches files from the Git repo. +fn_fetch_file_github() { + github_file_url_dir="${1}" + github_file_url_name="${2}" + # For legacy versions - code can be removed at a future date + if [ "${legacymode}" == "1" ]; then + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. + elif [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" + else + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + fi + remote_fileurl_name="GitHub" + remote_fileurl_backup_name="Bitbucket" + local_filedir="${3}" + local_filename="${github_file_url_name}" + chmodx="${4:-0}" + run="${5:-0}" + forcedl="${6:-0}" + hash="${7:-0}" + # Passes vars to the file download module. + fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}" +} + +fn_check_file_github() { + github_file_url_dir="${1}" + github_file_url_name="${2}" + if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" + else + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + fi + remote_fileurl_name="GitHub" + remote_fileurl_backup_name="Bitbucket" + fn_check_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${github_file_url_name}" +} + +# Fetches config files from the Git repo. +fn_fetch_config() { + github_file_url_dir="${1}" + github_file_url_name="${2}" + # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. + if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" + else + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + fi + remote_fileurl_name="GitHub" + remote_fileurl_backup_name="Bitbucket" + local_filedir="${3}" + local_filename="${4}" + chmodx="nochmodx" + run="norun" + forcedl="noforce" + hash="nohash" + # Passes vars to the file download module. + fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}" +} + +# Fetches modules from the Git repo during first download. +fn_fetch_module() { + github_file_url_dir="lgsm/modules" + github_file_url_name="${modulefile}" + # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. + if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" + else + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + fi + remote_fileurl_name="GitHub" + remote_fileurl_backup_name="Bitbucket" + local_filedir="${modulesdir}" + local_filename="${github_file_url_name}" + chmodx="chmodx" + run="run" + forcedl="noforce" + hash="nohash" + # Passes vars to the file download module. + fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}" +} + +# Fetches modules from the Git repo during update-lgsm. +fn_update_module() { + github_file_url_dir="lgsm/modules" + github_file_url_name="${modulefile}" + # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. + if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" + else + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + fi + remote_fileurl_name="GitHub" + remote_fileurl_backup_name="Bitbucket" + local_filedir="${modulesdir}" + local_filename="${github_file_url_name}" + chmodx="chmodx" + run="norun" + forcedl="noforce" + hash="nohash" + # Passes vars to the file download module. + fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}" + +} + +# Function to download latest github release. +# $1 GitHub user / organisation. +# $2 Repo name. +# $3 Destination for download. +# $4 Search string in releases (needed if there are more files that can be downloaded from the release pages). +fn_dl_latest_release_github() { + local githubreleaseuser="${1}" + local githubreleaserepo="${2}" + local githubreleasedownloadpath="${3}" + local githubreleasesearch="${4}" + local githublatestreleaseurl="https://api.github.com/repos/${githubreleaseuser}/${githubreleaserepo}/releases/latest" + + # Get last github release. + # If no search for the release filename is set, just get the first file from the latest release. + if [ -z "${githubreleasesearch}" ]; then + githubreleaseassets=$(curl -s "${githublatestreleaseurl}" | jq '[ .assets[] ]') + else + githubreleaseassets=$(curl -s "${githublatestreleaseurl}" | jq "[ .assets[]|select(.browser_download_url | contains(\"${githubreleasesearch}\")) ]") + fi + + # Check how many releases we got from the api and exit if we have more then one. + if [ "$(echo -e "${githubreleaseassets}" | jq '. | length')" -gt 1 ]; then + fn_print_fatal_nl "Found more than one release to download - Please report this to the LinuxGSM issue tracker" + fn_script_log_fatal "Found more than one release to download - Please report this to the LinuxGSM issue tracker" + else + # Set variables for download via fn_fetch_file. + githubreleasefilename=$(echo -e "${githubreleaseassets}" | jq -r '.[]name') + githubreleasedownloadlink=$(echo -e "${githubreleaseassets}" | jq -r '.[]browser_download_url') + + # Error if no version is there. + if [ -z "${githubreleasefilename}" ]; then + fn_print_fail_nl "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" + fn_script_log_fatal "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" + else + # Fetch file from the remote location from the existing module to the ${tmpdir} for now. + fn_fetch_file "${githubreleasedownloadlink}" "" "${githubreleasefilename}" "" "${githubreleasedownloadpath}" "${githubreleasefilename}" + fi + fi +} diff --git a/lgsm/modules/core_exit.sh b/lgsm/modules/core_exit.sh new file mode 100644 index 000000000..a8686c2a8 --- /dev/null +++ b/lgsm/modules/core_exit.sh @@ -0,0 +1,61 @@ +#!/bin/bash +# LinuxGSM core_exit.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Handles exiting of LinuxGSM by running and reporting an exit code. + +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +fn_exit_dev_debug() { + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "" + echo -e "${moduleselfname} exiting with code: ${exitcode}" + if [ -f "${rootdir}/dev-debug.log" ]; then + grep "modulefile=" "${rootdir}/dev-debug.log" | sed 's/modulefile=//g' > "${rootdir}/dev-debug-module-order.log" + fi + fi +} + +# If running dependency check as root will remove any files that belong to root user. +if [ "$(whoami)" == "root" ] && [ ! -f /.dockerenv ]; then + find "${lgsmdir}"/ -group root -prune -exec rm -rf {} + > /dev/null 2>&1 + find "${logdir}"/ -group root -prune -exec rm -rf {} + > /dev/null 2>&1 +fi + +if [ "${exitbypass}" ]; then + unset exitbypass +elif [ "${exitcode}" != "0" ]; then + # List LinuxGSM version in logs + fn_script_log_info "LinuxGSM version: ${version}" + if [ "${exitcode}" == "1" ]; then + fn_script_log_fatal "${moduleselfname} exiting with code: ${exitcode}" + elif [ "${exitcode}" == "2" ]; then + fn_script_log_error "${moduleselfname} exiting with code: ${exitcode}" + elif [ "${exitcode}" == "3" ]; then + fn_script_log_warn "${moduleselfname} exiting with code: ${exitcode}" + else + fn_script_log_warn "${moduleselfname} exiting with code: ${exitcode}" + fi + fn_exit_dev_debug + # remove trap. + trap - INT + exit "${exitcode}" +elif [ "${exitcode}" ] && [ "${exitcode}" == "0" ]; then + # List LinuxGSM version in logs + fn_script_log_info "LinuxGSM version: ${version}" + fn_script_log_pass "${moduleselfname} exiting with code: ${exitcode}" + fn_exit_dev_debug + # remove trap. + trap - INT + exit "${exitcode}" +else + # List LinuxGSM version in logs + fn_script_log_info "LinuxGSM version: ${version}" + fn_print_error "No exit code set" + fn_script_log_pass "${moduleselfname} exiting with code: NOT SET" + fn_exit_dev_debug + # remove trap. + trap - INT + exit "${exitcode}" +fi diff --git a/lgsm/modules/core_functions.sh b/lgsm/modules/core_functions.sh new file mode 100755 index 000000000..07a2ebd09 --- /dev/null +++ b/lgsm/modules/core_functions.sh @@ -0,0 +1,816 @@ +#!/bin/bash +# LinuxGSM core_functions.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Defines all functions to allow download and execution of functions using fn_fetch_function. +# This function is called first before any other function. Without this file other functions will not load. + +module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +modulesversion="v23.2.0" + +# Core + +core_dl.sh() { + functionfile="${FUNCNAME[0]}" + if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then + fn_fetch_core_dl "lgsm/functions" "core_dl.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" + else + fn_bootstrap_fetch_file_github "lgsm/functions" "core_dl.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" + fi +} + +core_messages.sh() { + functionfile="${FUNCNAME[0]}" + if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then + fn_fetch_core_dl "lgsm/functions" "core_messages.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" + else + fn_bootstrap_fetch_file_github "lgsm/functions" "core_messages.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" + fi +} + +core_legacy.sh() { + functionfile="${FUNCNAME[0]}" + if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then + fn_fetch_core_dl "lgsm/functions" "core_legacy.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" + else + fn_bootstrap_fetch_file_github "lgsm/functions" "core_legacy.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" + fi +} + +core_exit.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +core_getopt.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +core_trap.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +core_steamcmd.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +core_github.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +# Commands + +command_backup.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +command_console.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +command_debug.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +command_details.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +command_sponsor.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +command_postdetails.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +command_test_alert.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +command_monitor.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +command_start.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +command_stop.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +command_validate.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +command_install.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +command_install_resources_mta.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +install_squad_license.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +command_mods_install.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +command_mods_update.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +command_mods_remove.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +command_fastdl.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +command_ts3_server_pass.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +command_restart.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +command_skeleton.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +command_wipe.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +command_send.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +# Checks + +check.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +check_config.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +check_deps.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +check_executable.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +check_glibc.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +check_ip.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +check_last_update.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +check_logs.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +check_permissions.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +check_root.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +check_status.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +check_steamcmd.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +check_system_dir.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +check_system_requirements.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +check_tmuxception.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +check_version.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +# Compress + +compress_unreal2_maps.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +compress_ut99_maps.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +# Mods + +mods_list.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +mods_core.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +# Dev + +command_dev_clear_functions.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +command_dev_debug.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +command_dev_detect_deps.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +command_dev_detect_glibc.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +command_dev_detect_ldd.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +command_dev_query_raw.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +# Fix + +fix.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_ark.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_av.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_arma3.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_armar.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_bt.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_bo.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_cmw.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_csgo.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_dst.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_hw.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_ins.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_kf.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_kf2.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_lo.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_mcb.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_mta.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_nmrih.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_onset.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_ro.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_rust.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_rw.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_sfc.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_st.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_steamcmd.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_terraria.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_tf2.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_ut3.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_rust.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_samp.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_sdtd.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_sof2.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_squad.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_ts3.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_ut2k4.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_ut.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_unt.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_vh.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_wurm.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fix_zmr.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +# Info + +info_distro.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +info_game.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +info_messages.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +info_stats.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +# Alert + +alert.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +alert_discord.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +alert_email.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +alert_ifttt.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +alert_mailgun.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +alert_pushbullet.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +alert_pushover.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +alert_gotify.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +alert_telegram.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +alert_rocketchat.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +alert_slack.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} +# Logs + +core_logs.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +# Query + +query_gamedig.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +# Update + +command_update_functions.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +command_update_linuxgsm.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +command_update.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +command_check_update.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +update_ts3.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +update_minecraft.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +update_minecraft_bedrock.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +update_papermc.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +update_mta.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +update_factorio.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +update_jediknight2.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +update_steamcmd.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +update_vintagestory.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +update_ut99.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +fn_update_functions.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +# +## Installer functions +# + +fn_autoinstall() { + autoinstall=1 + command_install.sh +} + +install_complete.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +install_config.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +install_factorio_save.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +install_dst_token.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +install_eula.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +install_gsquery.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +install_gslt.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +install_header.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +install_logs.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +install_retry.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +install_server_dir.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} +install_server_files.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +install_stats.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +install_steamcmd.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +install_ts3.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +install_ts3db.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +install_ut2k4.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +install_dl_ut2k4.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +install_ut2k4_key.sh() { + functionfile="${FUNCNAME[0]}" + fn_fetch_function +} + +# Calls code required for legacy servers +core_legacy.sh + +# Creates tmp dir if missing +if [ ! -d "${tmpdir}" ]; then + mkdir -p "${tmpdir}" +fi + +# Creates lock dir if missing +if [ ! -d "${lockdir}" ]; then + mkdir -p "${lockdir}" +fi + +# Calls on-screen messages (bootstrap) +core_messages.sh + +#Calls file downloader (bootstrap) +core_dl.sh + +# Calls the global Ctrl-C trap +core_trap.sh diff --git a/lgsm/modules/core_getopt.sh b/lgsm/modules/core_getopt.sh new file mode 100644 index 000000000..222ad0cf8 --- /dev/null +++ b/lgsm/modules/core_getopt.sh @@ -0,0 +1,215 @@ +#!/bin/bash +# LinuxGSM core_getopt.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: getopt arguments. + +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +### Define all commands here. +## User commands | Trigger commands | Description +# Standard commands. +cmd_install=("i;install" "command_install.sh" "Install the server.") +cmd_auto_install=("ai;auto-install" "fn_autoinstall" "Install the server without prompts.") +cmd_start=("st;start" "command_start.sh" "Start the server.") +cmd_stop=("sp;stop" "command_stop.sh" "Stop the server.") +cmd_restart=("r;restart" "command_restart.sh" "Restart the server.") +cmd_details=("dt;details" "command_details.sh" "Display server information.") +cmd_postdetails=("pd;postdetails" "command_postdetails.sh" "Post details to termbin.com (removing passwords).") +cmd_backup=("b;backup" "command_backup.sh" "Create backup archives of the server.") +cmd_update_linuxgsm=("ul;update-lgsm;uf;update-modules" "command_update_linuxgsm.sh" "Check and apply any LinuxGSM updates.") +cmd_test_alert=("ta;test-alert" "command_test_alert.sh" "Send a test alert.") +cmd_monitor=("m;monitor" "command_monitor.sh" "Check server status and restart if crashed.") +cmd_skeleton=("sk;skeleton" "command_skeleton.sh" "Create a skeleton directory.") +cmd_sponso=("s;sponsor" "command_sponsor.sh" "Donation options.") +cmd_send=("sd;send" "command_send.sh" "Send command to game server console.") +# Console servers only. +cmd_console=("c;console" "command_console.sh" "Access server console.") +cmd_debug=("d;debug" "command_debug.sh" "Start server directly in your terminal.") +# Update servers only. +cmd_update=("u;update" "command_update.sh" "Check and apply any server updates.") +cmd_check_update=("cu;check-update" "command_check_update.sh" "Check if a gameserver update is available") +cmd_force_update=("fu;force-update;update-restart;ur" "forceupdate=1; command_update.sh" "Apply server updates bypassing check.") +# SteamCMD servers only. +cmd_validate=("v;validate" "command_validate.sh" "Validate server files with SteamCMD.") +# Server with mods-install. +cmd_mods_install=("mi;mods-install" "command_mods_install.sh" "View and install available mods/addons.") +cmd_mods_remove=("mr;mods-remove" "command_mods_remove.sh" "View and remove an installed mod/addon.") +cmd_mods_update=("mu;mods-update" "command_mods_update.sh" "Update installed mods/addons.") +# Server specific. +cmd_change_password=("pw;change-password" "command_ts3_server_pass.sh" "Change TS3 serveradmin password.") +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_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.") +cmd_fastdl=("fd;fastdl" "command_fastdl.sh" "Build a FastDL directory.") +# Dev commands. +cmd_dev_debug=("dev;developer" "command_dev_debug.sh" "Enable developer Mode.") +cmd_dev_detect_deps=("dd;detect-deps" "command_dev_detect_deps.sh" "Detect required dependencies.") +cmd_dev_detect_glibc=("dg;detect-glibc" "command_dev_detect_glibc.sh" "Detect required glibc.") +cmd_dev_detect_ldd=("dl;detect-ldd" "command_dev_detect_ldd.sh" "Detect required dynamic dependencies.") +cmd_dev_query_raw=("qr;query-raw" "command_dev_query_raw.sh" "The raw output of gamedig and gsquery.") +cmd_dev_clear_modules=("cf;clear-modules" "command_dev_clear_modules.sh" "Delete the contents of the modules dir.") + +### Set specific opt here. + +currentopt=("${cmd_start[@]}" "${cmd_stop[@]}" "${cmd_restart[@]}" "${cmd_monitor[@]}" "${cmd_test_alert[@]}" "${cmd_details[@]}" "${cmd_postdetails[@]}" "${cmd_skeleton[@]}") + +# Update LinuxGSM. +currentopt+=("${cmd_update_linuxgsm[@]}") + +# Exclude noupdate games here. +if [ "${shortname}" == "jk2" ] || [ "${engine}" != "idtech3" ]; then + if [ "${shortname}" != "bf1942" ] && [ "${shortname}" != "bfv" ] && [ "${engine}" != "idtech2" ] && [ "${engine}" != "iw2.0" ] && [ "${engine}" != "iw3.0" ] && [ "${engine}" != "quake" ] && [ "${shortname}" != "samp" ] && [ "${shortname}" != "ut2k4" ]; then + currentopt+=("${cmd_update[@]}" "${cmd_check_update[@]}") + # force update for SteamCMD or Multi Theft Auto only. + if [ "${appid}" ] || [ "${shortname}" == "mta" ]; then + currentopt+=("${cmd_force_update[@]}") + fi + fi +fi + +# Validate and check-update command. +if [ "${appid}" ]; then + currentopt+=("${cmd_validate[@]}") +fi + +# Backup. +currentopt+=("${cmd_backup[@]}") + +# Console & Debug. +currentopt+=("${cmd_console[@]}" "${cmd_debug[@]}") + +# Console send. +if [ "${consoleinteract}" == "yes" ]; then + currentopt+=("${cmd_send[@]}") +fi + +## Game server exclusive commands. + +# FastDL command. +if [ "${engine}" == "source" ]; then + currentopt+=("${cmd_fastdl[@]}") +fi + +# TeamSpeak exclusive. +if [ "${shortname}" == "ts3" ]; then + currentopt+=("${cmd_change_password[@]}") +fi + +# Rust exclusive. +if [ "${shortname}" == "rust" ]; then + currentopt+=("${cmd_fullwipe[@]}" "${cmd_mapwipe[@]}") +fi + +# Unreal exclusive. +if [ "${engine}" == "unreal2" ]; then + if [ "${shortname}" == "ut2k4" ]; then + currentopt+=("${cmd_install_cdkey[@]}" "${cmd_map_compressor_u2[@]}") + else + currentopt+=("${cmd_map_compressor_u2[@]}") + fi +fi +if [ "${engine}" == "unreal" ]; then + currentopt+=("${cmd_map_compressor_u99[@]}") +fi + +# DST exclusive. +if [ "${shortname}" == "dst" ]; then + currentopt+=("${cmd_install_dst_token[@]}") +fi + +# MTA exclusive. +if [ "${shortname}" == "mta" ]; then + currentopt+=("${cmd_install_default_resources[@]}") +fi + +# Squad license exclusive. +if [ "${shortname}" == "squad" ]; then + currentopt+=("${cmd_install_squad_license[@]}") +fi + +## Mods commands. +if [ "${engine}" == "source" ] || [ "${shortname}" == "rust" ] || [ "${shortname}" == "hq" ] || [ "${shortname}" == "sdtd" ] || [ "${shortname}" == "cs" ] || [ "${shortname}" == "dod" ] || [ "${shortname}" == "tfc" ] || [ "${shortname}" == "ns" ] || [ "${shortname}" == "ts" ] || [ "${shortname}" == "hldm" ] || [ "${shortname}" == "vh" ]; then + currentopt+=("${cmd_mods_install[@]}" "${cmd_mods_remove[@]}" "${cmd_mods_update[@]}") +fi + +## Installer. +currentopt+=("${cmd_install[@]}" "${cmd_auto_install[@]}") + +## Developer commands. +currentopt+=("${cmd_dev_debug[@]}") +if [ -f ".dev-debug" ]; then + currentopt+=("${cmd_dev_detect_deps[@]}" "${cmd_dev_detect_glibc[@]}" "${cmd_dev_detect_ldd[@]}" "${cmd_dev_query_raw[@]}" "${cmd_dev_clear_modules[@]}") +fi + +## Sponsor. +currentopt+=("${cmd_sponsor[@]}") + +### Build list of available commands. +optcommands=() +index="0" +for ((index = "0"; index < ${#currentopt[@]}; index += 3)); do + cmdamount=$(echo -e "${currentopt[index]}" | awk -F ';' '{ print NF }') + for ((cmdindex = 1; cmdindex <= cmdamount; cmdindex++)); do + optcommands+=("$(echo -e "${currentopt[index]}" | awk -F ';' -v x=${cmdindex} '{ print $x }')") + done +done + +# Shows LinuxGSM usage. +fn_opt_usage() { + echo -e "Usage: $0 [option]" + echo -e "" + echo -e "LinuxGSM - ${gamename} - Version ${version}" + echo -e "https://linuxgsm.com/${gameservername}" + echo -e "" + echo -e "${lightyellow}Commands${default}" + # Display available commands. + index="0" + { + for ((index = "0"; index < ${#currentopt[@]}; index += 3)); do + # Hide developer commands. + if [ "${currentopt[index + 2]}" != "DEVCOMMAND" ]; then + echo -e "${cyan}$(echo -e "${currentopt[index]}" | awk -F ';' '{ print $2 }')\t${default}$(echo -e "${currentopt[index]}" | awk -F ';' '{ print $1 }')\t| ${currentopt[index + 2]}" + fi + done + } | column -s $'\t' -t + fn_script_log_pass "Display commands" + core_exit.sh +} + +# Check if command existw and run corresponding scripts, or display script usage. +if [ -z "${getopt}" ]; then + fn_opt_usage +fi +# If command exists. +for i in "${optcommands[@]}"; do + if [ "${i}" == "${getopt}" ]; then + # Seek and run command. + index="0" + for ((index = "0"; index < ${#currentopt[@]}; index += 3)); do + currcmdamount=$(echo -e "${currentopt[index]}" | awk -F ';' '{ print NF }') + for ((currcmdindex = 1; currcmdindex <= currcmdamount; currcmdindex++)); do + if [ "$(echo -e "${currentopt[index]}" | awk -F ';' -v x=${currcmdindex} '{ print $x }')" == "${getopt}" ]; then + # Run command. + eval "${currentopt[index + 1]}" + # Exit should occur in modules. Should this not happen print an error + fn_print_error2_nl "Command did not exit correctly: ${getopt}" + fn_script_log_error "Command did not exit correctly: ${getopt}" + core_exit.sh + fi + done + done + fi +done + +# If we're executing this, it means command was not found. +fn_print_error2_nl "Unknown command: $0 ${getopt}" +fn_script_log_error "Unknown command: $0 ${getopt}" +fn_opt_usage +core_exit.sh diff --git a/lgsm/modules/core_github.sh b/lgsm/modules/core_github.sh new file mode 100644 index 000000000..228fe1078 --- /dev/null +++ b/lgsm/modules/core_github.sh @@ -0,0 +1,114 @@ +#!/bin/bash +# LinuxGSM core_github.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: core module file for updates via github + +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +github_api="https://api.github.com" + +fn_githublocalversionfile() { + local githubreleaseuser="${1}" + local githubreleaserepo="${2}" + + githublocalversionfile="${datadir}/github-${githubreleaseuser}-${githubreleaserepo}-version" +} + +# $1 githubuser/group +# $2 github repo name +fn_github_get_latest_release_version() { + local githubreleaseuser="${1}" + local githubreleaserepo="${2}" + local githublatestreleaseurl="${github_api}/repos/${githubreleaseuser}/${githubreleaserepo}/releases/latest" + + githubreleaseversion=$(curl -s --connect-timeout 10 "${githublatestreleaseurl}" | jq '.tag_name') + + # error if no version is there + if [ -z "${githubreleaseversion}" ]; then + fn_print_fail_nl "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" + fn_script_log_fatal "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" + fi +} + +# $1 githubuser/group +# $2 github repo name +fn_github_set_latest_release_version() { + local githubreleaseuser="${1}" + local githubreleaserepo="${2}" + + fn_githublocalversionfile "${githubreleaseuser}" "${githubreleaserepo}" + + local githublatestreleaseurl="${github_api}/repos/${githubreleaseuser}/${githubreleaserepo}/releases/latest" + githubreleaseversion=$(curl -s "${githublatestreleaseurl}" | jq -r '.tag_name') + + # error if no version is there + if [ -z "${githubreleaseversion}" ]; then + fn_print_fail_nl "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" + fn_script_log_fatal "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" + else + echo "${githubreleaseversion}" > "${githublocalversionfile}" + fi +} + +# $1 githubuser/group +# $2 github repo name +fn_github_get_installed_version() { + local githubreleaseuser="${1}" + local githubreleaserepo="${2}" + + fn_githublocalversionfile "${githubreleaseuser}" "${githubreleaserepo}" + + githublocalversion=$(cat "${githublocalversionfile}") +} + +# $1 githubuser/group +# $2 github repo name +# if a update needs to be downloaded - updateneeded is set to 1 +fn_github_compare_version() { + local githubreleaseuser="${1}" + local githubreleaserepo="${2}" + exitcode=0 + updateneeded=0 + + fn_githublocalversionfile "${githubreleaseuser}" "${githubreleaserepo}" + local githublatestreleaseurl="${github_api}/repos/${githubreleaseuser}/${githubreleaserepo}/releases/latest" + + githublocalversion=$(cat "${githublocalversionfile}") + githubreleaseversion=$(curl -s "${githublatestreleaseurl}" | jq '.tag_name') + + # error if no version is there + if [ -z "${githubreleaseversion}" ]; then + fn_print_fail_nl "Can not get version from Github Api for ${githubreleaseuser}/${githubreleaserepo}" + fn_script_log_fatal "Can not get version from Github Api for ${githubreleaseuser}/${githubreleaserepo}" + else + if [ "${githublocalversion}" == "${githubreleaseversion}" ]; then + echo -en "\n" + echo -e "No update from github.com/${githubreleaseuser}/${githubreleaserepo}/ available:" + echo -e "* Local build: ${red}${githublocalversion}${default}" + echo -e "* Remote build: ${green}${githubreleaseversion}${default}" + echo -en "\n" + else + # check if version that is installed is higher than the remote version to not override it + last_version=$(echo -e "${githublocalversion}\n${githubreleaseversion}" | sort -V | head -n1) + if [ "${githubreleaseversion}" == "${last_version}" ]; then + echo -en "\n" + echo -e "Update from github.com/${githubreleaseuser}/${githubreleaserepo}/ available:" + echo -e "* Local build: ${red}${githublocalversion}${default}" + echo -e "* Remote build: ${green}${githubreleaseversion}${default}" + echo -en "\n" + updateneeded=1 + else + # local version is higher than the remote version output this to the user + # strange case but could be possible, as a release could be removed from github + echo -en "\n" + echo -e "Local version is newer than the remote version" + echo -e "* Local version: ${green}${githublocalversion}${default}" + echo -e "* Remote version: ${green}${githubreleaseversion}${default}" + echo -en "\n" + exitcode=1 + fi + fi + fi +} diff --git a/lgsm/modules/core_legacy.sh b/lgsm/modules/core_legacy.sh new file mode 100644 index 000000000..2ed942abd --- /dev/null +++ b/lgsm/modules/core_legacy.sh @@ -0,0 +1,93 @@ +#!/bin/bash +# LinuxGSM core_legacy.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Code for backwards compatability with older versions of LinuxGSM. + +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +# This is to help the transition to v20.3.0 and above +legacy_versions_array=(v20.2.1 v20.2.0 v20.1.5 v20.1.4 v20.1.3 v20.1.2 v20.1.1 v20.1.0 v19.12.5 v19.12.4 v19.12.3 v19.12.2 v19.12.1 v19.12.0) +for legacy_version in "${legacy_versions_array[@]}"; do + if [ "${version}" == "${legacy_version}" ]; then + legacymode=1 + fi +done + +if [ -z "${serverfiles}" ]; then + serverfiles="${filesdir}" +fi + +if [ -z "${logdir}" ]; then + logdir="${rootdir}/log" +fi + +if [ -z "${lgsmlogdir}" ]; then + lgsmlogdir="${scriptlogdir}" +fi + +if [ -z "${lgsmlog}" ]; then + lgsmlog="${scriptlog}" +fi + +if [ -z "${lgsmlogdate}" ]; then + lgsmlogdate="${scriptlogdate}" +fi + +if [ -z "${steamcmddir}" ]; then + steamcmddir="${HOME}/.steam/steamcmd" +fi + +if [ -z "${lgsmdir}" ]; then + lgsmdir="${rootdir}/lgsm" +fi + +if [ -z "${tmpdir}" ]; then + tmpdir="${lgsmdir}/tmp" +fi + +if [ -z "${alertlog}" ]; then + alertlog="${emaillog}" +fi + +if [ -z "${servicename}" ]; then + servicename="${selfname}" +fi + +# Alternations to workshop variables. +if [ -z "${wsapikey}" ]; then + if [ "${workshopauth}" ]; then + wsapikey="${workshopauth}" + elif [ "${authkey}" ]; then + wsapikey="${authkey}" + fi +fi + +if [ -z "${wscollectionid}" ]; then + if [ "${workshopauth}" ]; then + wscollectionid="${ws_collection_id}" + elif [ "${authkey}" ]; then + wscollectionid="${workshopcollectionid}" + fi +fi + +if [ -z "${wsstartmap}" ]; then + if [ "${ws_start_map}" ]; then + wscollectionid="${ws_start_map}" + fi +fi + +# Added as part of migrating functions dir to modules dir. +# Will remove functions dir if files in modules dir older than 14 days +functionsdir="${lgsmdir}/modules" +if [ -d "${lgsmdir}/functions" ]; then + if [ "$(find "${lgsmdir}/modules"/ -type f -mtime +"14" | wc -l)" -ne "0" ]; then + rm -rf "${lgsmdir:?}/functions" + fi +fi + +fn_parms() { + fn_reload_startparameters + parms="${startparameters}" +} diff --git a/lgsm/modules/core_logs.sh b/lgsm/modules/core_logs.sh new file mode 100644 index 000000000..8057f30f7 --- /dev/null +++ b/lgsm/modules/core_logs.sh @@ -0,0 +1,110 @@ +#!/bin/bash +# LinuxGSM core_logs.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Acts as a log rotator, removing old logs. + +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +# Check if logfile variable and file exist, create logfile if it doesn't exist. +if [ "${consolelog}" ]; then + if [ ! -f "${consolelog}" ]; then + touch "${consolelog}" + fi +fi + +# For games not displaying a console, and having logs into their game directory. +check_status.sh +if [ "${status}" != "0" ] && [ "${commandname}" == "START" ] && [ -n "${gamelogfile}" ]; then + if [ "$(find "${systemdir}" -name "gamelog*.log")" ]; then + fn_print_info "Moving game logs to ${gamelogdir}" + fn_script_log_info "Moving game logs to ${gamelogdir}" + echo -en "\n" + fn_sleep_time + mv "${systemdir}"/gamelog*.log "${gamelogdir}" + fi +fi + +# Log manager will start the cleanup if it finds logs older than "${logdays}". +if [ "$(find "${lgsmlogdir}"/ -type f -mtime +"${logdays}" | wc -l)" -ne "0" ]; then + fn_print_dots "Starting" + # Set common logs directories + commonlogs="${systemdir}/logs" + commonsourcelogs="${systemdir}/*/logs" + # Set addon logs directories + sourcemodlogdir="${systemdir}/addons/sourcemod/logs" + ulxlogdir="${systemdir}/data/ulx_logs" + darkrplogdir="${systemdir}/data/darkrp_logs" + legacyserverlogdir="${logdir}/server" + # Setting up counting variables + scriptcount="0" + consolecount="0" + gamecount="0" + srcdscount="0" + smcount="0" + ulxcount="0" + darkrpcount="0" + legacycount="0" + fn_sleep_time + fn_print_info "Removing logs older than ${logdays} days" + fn_script_log_info "Removing logs older than ${logdays} days" + # Logging logfiles to be removed according to "${logdays}", counting and removing them. + # Script logfiles. + find "${lgsmlogdir}"/ -type f -mtime +"${logdays}" | tee >> "${lgsmlog}" + scriptcount=$(find "${lgsmlogdir}"/ -type f -mtime +"${logdays}" | wc -l) + find "${lgsmlogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \; + # SRCDS and unreal logfiles. + if [ "${engine}" == "unreal2" ] || [ "${engine}" == "source" ]; then + find "${gamelogdir}"/ -type f -mtime +"${logdays}" | tee >> "${lgsmlog}" + gamecount=$(find "${gamelogdir}"/ -type f -mtime +"${logdays}" | wc -l) + find "${gamelogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \; + fi + # Console logfiles. + if [ "${consolelog}" ]; then + find "${consolelogdir}"/ -type f -mtime +"${logdays}" | tee >> "${lgsmlog}" + consolecount=$(find "${consolelogdir}"/ -type f -mtime +"${logdays}" | wc -l) + find "${consolelogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \; + fi + # Common logfiles. + if [ -d "${commonlogs}" ]; then + find "${commonlogs}"/ -type f -mtime +"${logdays}" | tee >> "${lgsmlog}" + smcount=$(find "${commonlogs}"/ -type f -mtime +"${logdays}" | wc -l) + find "${commonlogs}"/ -mtime +"${logdays}" -type f -exec rm -f {} \; + fi + if [ -d "${commonsourcelogs}" ]; then + find "${commonsourcelogs}"/* -type f -mtime +"${logdays}" | tee >> "${lgsmlog}" + smcount=$(find "${commonsourcelogs}"/* -type f -mtime +"${logdays}" | wc -l) + find "${commonsourcelogs}"/* -mtime +"${logdays}" -type f -exec rm -f {} \; + fi + # Source addons logfiles. + if [ "${engine}" == "source" ]; then + # SourceMod logfiles. + if [ -d "${sourcemodlogdir}" ]; then + find "${sourcemodlogdir}"/ -type f -mtime +"${logdays}" | tee >> "${lgsmlog}" + smcount=$(find "${sourcemodlogdir}"/ -type f -mtime +"${logdays}" | wc -l) + find "${sourcemodlogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \; + fi + # Garry's Mod logfiles. + if [ "${shortname}" == "gmod" ]; then + # ULX logfiles. + if [ -d "${ulxlogdir}" ]; then + find "${ulxlogdir}"/ -type f -mtime +"${logdays}" | tee >> "${lgsmlog}" + ulxcount=$(find "${ulxlogdir}"/ -type f -mtime +"${logdays}" | wc -l) + find "${ulxlogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \; + fi + # DarkRP logfiles. + if [ -d "${darkrplogdir}" ]; then + find "${darkrplogdir}"/ -type f -mtime +"${logdays}" | tee >> "${lgsmlog}" + darkrpcount=$(find "${darkrplogdir}"/ -type f -mtime +"${logdays}" | wc -l) + find "${darkrplogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \; + fi + fi + fi + + # Count total amount of files removed. + countlogs=$((scriptcount + consolecount + gamecount + srcdscount + smcount + ulxcount + darkrpcount)) + # Job done. + fn_print_ok "Removed ${countlogs} log files" + fn_script_log "Removed ${countlogs} log files" +fi diff --git a/lgsm/modules/core_messages.sh b/lgsm/modules/core_messages.sh new file mode 100644 index 000000000..6d3ca9a25 --- /dev/null +++ b/lgsm/modules/core_messages.sh @@ -0,0 +1,598 @@ +#!/bin/bash +# LinuxGSM core_messages.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Defines on-screen messages such as [ OK ] and how script logs look. + +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +# nl: new line: message is following by a new line. +# eol: end of line: message is placed at the end of the current line. +fn_ansi_loader() { + if [ "${ansi}" != "off" ]; then + # echo colors + default="\e[0m" + black="\e[30m" + red="\e[31m" + lightred="\e[91m" + green="\e[32m" + lightgreen="\e[92m" + yellow="\e[33m" + lightyellow="\e[93m" + blue="\e[34m" + lightblue="\e[94m" + magenta="\e[35m" + lightmagenta="\e[95m" + cyan="\e[36m" + lightcyan="\e[96m" + darkgrey="\e[90m" + lightgrey="\e[37m" + white="\e[97m" + fi + # carriage return & erase to end of line. + creeol="\r\033[K" +} + +fn_sleep_time() { + if [ "${sleeptime}" != "0" ] || [ "${travistest}" != "1" ]; then + if [ -z "${sleeptime}" ]; then + sleeptime=0.5 + fi + sleep "${sleeptime}" + fi +} + +# Log display +######################## +## Feb 28 14:56:58 ut99-server: Monitor: +fn_script_log() { + if [ -d "${lgsmlogdir}" ]; then + if [ -n "${commandname}" ]; then + echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: ${1}" >> "${lgsmlog}" + else + echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${1}" >> "${lgsmlog}" + fi + fi +} + +## Feb 28 14:56:58 ut99-server: Monitor: PASS: +fn_script_log_pass() { + if [ -d "${lgsmlogdir}" ]; then + + if [ -n "${commandname}" ]; then + echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: PASS: ${1}" >> "${lgsmlog}" + else + echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: PASS: ${1}" >> "${lgsmlog}" + fi + fi + exitcode=0 +} + +## Feb 28 14:56:58 ut99-server: Monitor: FATAL: +fn_script_log_fatal() { + if [ -d "${lgsmlogdir}" ]; then + if [ -n "${commandname}" ]; then + echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: FATAL: ${1}" >> "${lgsmlog}" + else + echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: FATAL: ${1}" >> "${lgsmlog}" + fi + fi + exitcode=1 +} + +## Feb 28 14:56:58 ut99-server: Monitor: ERROR: +fn_script_log_error() { + if [ -d "${lgsmlogdir}" ]; then + if [ -n "${commandname}" ]; then + echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: ERROR: ${1}" >> "${lgsmlog}" + else + echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ERROR: ${1}" >> "${lgsmlog}" + fi + fi + exitcode=2 +} + +## Feb 28 14:56:58 ut99-server: Monitor: WARN: +fn_script_log_warn() { + if [ -d "${lgsmlogdir}" ]; then + if [ -n "${commandname}" ]; then + echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: WARN: ${1}" >> "${lgsmlog}" + else + echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: WARN: ${1}" >> "${lgsmlog}" + fi + fi + exitcode=3 +} + +## Feb 28 14:56:58 ut99-server: Monitor: INFO: +fn_script_log_info() { + if [ -d "${lgsmlogdir}" ]; then + if [ -n "${commandname}" ]; then + echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: INFO: ${1}" >> "${lgsmlog}" + else + echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: INFO: ${1}" >> "${lgsmlog}" + fi + fi +} + +## Feb 28 14:56:58 ut99-server: Monitor: UPDATE: +fn_script_log_update() { + if [ -d "${lgsmlogdir}" ]; then + if [ -n "${commandname}" ]; then + echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: UPDATE: ${1}" >> "${lgsmlog}" + else + echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: UPDATE: ${1}" >> "${lgsmlog}" + fi + fi +} + +# On-Screen - Automated functions +################################## + +# [ .... ] +fn_print_dots() { + if [ "${commandaction}" ]; then + echo -en "${creeol}[ .... ] ${commandaction} ${selfname}: $*" + else + echo -en "${creeol}[ .... ] $*" + fi + fn_sleep_time +} + +fn_print_dots_nl() { + if [ "${commandaction}" ]; then + echo -e "${creeol}[ .... ] ${commandaction} ${selfname}: $*" + else + echo -e "${creeol}[ .... ] $*" + fi + fn_sleep_time + echo -en "\n" +} + +# [ OK ] +fn_print_ok() { + if [ "${commandaction}" ]; then + echo -en "${creeol}[${green} OK ${default}] ${commandaction} ${selfname}: $*" + else + echo -en "${creeol}[${green} OK ${default}] $*" + fi + fn_sleep_time +} + +fn_print_ok_nl() { + if [ "${commandaction}" ]; then + echo -en "${creeol}[${green} OK ${default}] ${commandaction} ${selfname}: $*" + else + echo -en "${creeol}[${green} OK ${default}] $*" + fi + fn_sleep_time + echo -en "\n" +} + +# [ FAIL ] +fn_print_fail() { + if [ "${commandaction}" ]; then + echo -en "${creeol}[${red} FAIL ${default}] ${commandaction} ${selfname}: $*" + else + echo -en "${creeol}[${red} FAIL ${default}] $*" + fi + fn_sleep_time +} + +fn_print_fail_nl() { + if [ "${commandaction}" ]; then + echo -en "${creeol}[${red} FAIL ${default}] ${commandaction} ${selfname}: $*" + else + echo -en "${creeol}[${red} FAIL ${default}] $*" + fi + fn_sleep_time + echo -en "\n" +} + +# [ ERROR ] +fn_print_error() { + if [ "${commandaction}" ]; then + echo -en "${creeol}[${red} ERROR ${default}] ${commandaction} ${selfname}: $*" + else + echo -en "${creeol}[${red} ERROR ${default}] $*" + fi + fn_sleep_time +} + +fn_print_error_nl() { + if [ "${commandaction}" ]; then + echo -en "${creeol}[${red} ERROR ${default}] ${commandaction} ${selfname}: $*" + else + echo -en "${creeol}[${red} ERROR ${default}] $*" + fi + fn_sleep_time + echo -en "\n" +} + +# [ WARN ] +fn_print_warn() { + if [ "${commandaction}" ]; then + echo -en "${creeol}[${lightyellow} WARN ${default}] ${commandaction} ${selfname}: $*" + else + echo -en "${creeol}[${lightyellow} WARN ${default}] $*" + fi + fn_sleep_time +} + +fn_print_warn_nl() { + if [ "${commandaction}" ]; then + echo -en "${creeol}[${lightyellow} WARN ${default}] ${commandaction} ${selfname}: $*" + else + echo -en "${creeol}[${lightyellow} WARN ${default}] $*" + fi + fn_sleep_time + echo -en "\n" +} + +# [ INFO ] +fn_print_info() { + if [ "${commandaction}" ]; then + echo -en "${creeol}[${cyan} INFO ${default}] ${commandaction} ${selfname}: $*" + else + echo -en "${creeol}[${cyan} INFO ${default}] $*" + fi + fn_sleep_time +} + +fn_print_info_nl() { + if [ "${commandaction}" ]; then + echo -en "${creeol}[${cyan} INFO ${default}] ${commandaction} ${selfname}: $*" + else + echo -en "${creeol}[${cyan} INFO ${default}] $*" + fi + fn_sleep_time + echo -en "\n" +} + +# [ START ] +fn_print_start() { + if [ "${commandaction}" ]; then + echo -en "${creeol}[${lightgreen} START ${default}] ${commandaction} ${selfname}: $*" + else + echo -en "${creeol}[${lightgreen} START ${default}] $*" + fi + fn_sleep_time +} + +fn_print_start_nl() { + if [ "${commandaction}" ]; then + echo -en "${creeol}[${lightgreen} START ${default}] ${commandaction} ${selfname}: $*" + else + echo -en "${creeol}[${lightgreen} START ${default}] $*" + fi + fn_sleep_time + echo -en "\n" +} + +# On-Screen - Interactive messages +################################## + +# No More Room in Hell Debug +# ================================= +fn_print_header() { + echo -e "" + echo -e "${lightyellow}${gamename} ${commandaction}${default}" + echo -e "=================================${default}" +} + +# Complete! +fn_print_complete() { + echo -en "${green}Complete!${default} $*" + fn_sleep_time +} + +fn_print_complete_nl() { + echo -e "${green}Complete!${default} $*" + fn_sleep_time +} + +# Failure! +fn_print_failure() { + echo -en "${red}Failure!${default} $*" + fn_sleep_time +} + +fn_print_failure_nl() { + echo -e "${red}Failure!${default} $*" + fn_sleep_time +} + +# Error! +fn_print_error2() { + echo -en "${red}Error!${default} $*" + fn_sleep_time +} + +fn_print_error2_nl() { + echo -e "${red}Error!${default} $*" + fn_sleep_time +} + +# Warning! +fn_print_warning() { + echo -en "${lightyellow}Warning!${default} $*" + fn_sleep_time +} + +fn_print_warning_nl() { + echo -e "${lightyellow}Warning!${default} $*" + fn_sleep_time +} + +# Information! +fn_print_information() { + echo -en "${cyan}Information!${default} $*" + fn_sleep_time +} + +fn_print_information_nl() { + echo -e "${cyan}Information!${default} $*" + fn_sleep_time +} + +# Y/N Prompt +fn_prompt_yn() { + local prompt="$1" + local initial="$2" + + if [ "${initial}" == "Y" ]; then + prompt+=" [Y/n] " + elif [ "${initial}" == "N" ]; then + prompt+=" [y/N] " + else + prompt+=" [y/n] " + fi + + while true; do + read -e -i "${initial}" -p "${prompt}" -r yn + case "${yn}" in + [Yy] | [Yy][Ee][Ss]) return 0 ;; + [Nn] | [Nn][Oo]) return 1 ;; + *) echo -e "Please answer yes or no." ;; + esac + done +} + +# Prompt for message +fn_prompt_message() { + while true; do + unset prompt + local prompt="$1" + read -e -p "${prompt}" -r answer + if fn_prompt_yn "Continue" Y; then + break + fi + done + echo "${answer}" +} + +# On-Screen End of Line +################################## + +# YES +fn_print_yes_eol() { + echo -en "${cyan}YES${default}" + fn_sleep_time +} + +fn_print_yes_eol_nl() { + echo -e "${cyan}YES${default}" + fn_sleep_time +} + +# NO +fn_print_no_eol() { + echo -en "${red}NO${default}" + fn_sleep_time +} + +fn_print_no_eol_nl() { + echo -e "${red}NO${default}" + fn_sleep_time +} + +# OK +fn_print_ok_eol() { + echo -en "${green}OK${default}" + fn_sleep_time +} + +fn_print_ok_eol_nl() { + echo -e "${green}OK${default}" + fn_sleep_time +} + +# FAIL +fn_print_fail_eol() { + echo -en "${red}FAIL${default}" + fn_sleep_time +} + +fn_print_fail_eol_nl() { + echo -e "${red}FAIL${default}" + fn_sleep_time +} + +# ERROR +fn_print_error_eol() { + echo -en "${red}ERROR${default}" + fn_sleep_time +} + +fn_print_error_eol_nl() { + echo -e "${red}ERROR${default}" + fn_sleep_time +} + +# WAIT +fn_print_wait_eol() { + echo -en "${cyan}WAIT${default}" + fn_sleep_time +} + +fn_print_wait_eol_nl() { + echo -e "${cyan}WAIT${default}" + fn_sleep_time +} + +# WARN +fn_print_warn_eol() { + echo -en "${lightyellow}WARN${default}" + fn_sleep_time +} + +fn_print_warn_eol_nl() { + echo -e "${lightyellow}WARN${default}" + fn_sleep_time +} + +# INFO +fn_print_info_eol() { + echo -en "${cyan}INFO${default}" + fn_sleep_time +} + +fn_print_info_eol_nl() { + echo -e "${cyan}INFO${default}" + fn_sleep_time +} + +# QUERYING +fn_print_querying_eol() { + echo -en "${cyan}QUERYING${default}" + fn_sleep_time +} + +fn_print_querying_eol_nl() { + echo -e "${cyan}QUERYING${default}" + fn_sleep_time +} + +# CHECKING +fn_print_checking_eol() { + echo -en "${cyan}CHECKING${default}" + fn_sleep_time +} + +fn_print_checking_eol_nl() { + echo -e "${cyan}CHECKING${default}" + fn_sleep_time +} + +# DELAY +fn_print_delay_eol() { + echo -en "${green}DELAY${default}" + fn_sleep_time +} + +fn_print_delay_eol_nl() { + echo -e "${green}DELAY${default}" + fn_sleep_time +} + +# CANCELED +fn_print_canceled_eol() { + echo -en "${lightyellow}CANCELED${default}" + fn_sleep_time +} + +fn_print_canceled_eol_nl() { + echo -e "${lightyellow}CANCELED${default}" + fn_sleep_time +} + +# REMOVED +fn_print_removed_eol() { + echo -en "${red}REMOVED${default}" + fn_sleep_time +} + +fn_print_removed_eol_nl() { + echo -e "${red}REMOVED${default}" + fn_sleep_time +} + +# UPDATE +fn_print_update_eol() { + echo -en "${cyan}UPDATE${default}" + fn_sleep_time +} + +fn_print_update_eol_nl() { + echo -e "${cyan}UPDATE${default}" + fn_sleep_time +} + +fn_print_ascii_logo() { + echo -e "" + echo -e " mdMMMMbm" + echo -e " mMMMMMMMMMMm" + echo -e " mMMMMMMMMMMMMm" + echo -e " mMMMMMMMMMMMMMMm" + echo -e " hMMMV^VMMV^VMMMh" + echo -e " MMMMM MM MMMMM" + echo -e " hMMs vv sMMh" + echo -e " hMMM: :MMMh" + echo -e " .hMMMh hMMMh." + echo -e " -dMMMh ${lightgrey}__${default} hMMMd-" + echo -e " :mMMMs ${lightgrey}||${default} sMMMm:" + echo -e " :MMMM+ ${lightgrey}||${default} ${red}_${default} +NMMN:" + echo -e " .mMMM+ ${lightgrey}========${default} +MMMm." + echo -e " yMMMy ${darkgrey}##############${default} yMMMy" + echo -e " mMMM: ${darkgrey}##############${default} :MMMm" + echo -e " mMM ${lightyellow}nn${default} ${lightyellow}nn${default} ${lightyellow}nn${default} ${lightyellow}nn${default} MMm" + echo -e " o ${lightyellow}nNNNNNNNn${default} ${lightyellow}nNNNNNNNn${default} o" + echo -e " ${lightyellow}nNNNNNNNNNn${default} ${lightyellow}nNNNNNNNNNn${default}" + echo -e " ${lightyellow}nNNNNNNNNNNN${default} ${lightyellow}NNNNNNNNNNNn${default}" + echo -e " ${lightyellow}+NNNNNNNNN:${default} ${lightyellow}:NNNNNNNNN+${default}" + echo -e " ${lightyellow}nNNNNNNN${default} /\ ${lightyellow}NNNNNNNn${default}" + echo -e " ${lightyellow}nnnnn${default} db ${lightyellow}nnnnn${default}" + echo -e "" + echo -e "${lightyellow}888${default} ${lightyellow}d8b${default} ${default}.d8888b. .d8888b. 888b d888" + echo -e "${lightyellow}888 Y8P ${default}d88P Y88b d88P Y88b 8888b d8888" + echo -e "${lightyellow}888${default} ${default}888${default} 888 Y88b. 88888b.d88888" + echo -e "${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}88888b.${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} 888 Y888b. 888Y88888P888" + echo -e "${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}88b${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}Y8bd8P${default} 888 88888 Y88b. 888 Y888P 888" + echo -e "${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}X88K${default} 888 888 888 888 Y8P 888" + echo -e "${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}Y88b${default} ${lightyellow}88Y${default} ${lightyellow}.d8pq8b.${default} Y88b d88P Y88b d88P 888 * 888" + echo -e "${lightyellow}LinuxGSM${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}Y8888Y${default} ${lightyellow}888${default} ${lightyellow}888${default} Y2012P88 Y8888P 888 888" + echo -e "" +} + +fn_print_restart_warning() { + fn_print_warn "${selfname} will be restarted" + fn_script_log_warn "${selfname} will be restarted" + totalseconds=3 + for seconds in {3..1}; do + fn_print_warn "${selfname} will be restarted: ${totalseconds}" + totalseconds=$((totalseconds - 1)) + sleep 1 + if [ "${seconds}" == "0" ]; then + break + fi + done + fn_print_warn_nl "${selfname} will be restarted" +} + +# Functions below are used to ensure that logs and UI correctly reflect the command it is actually running. +# Useful when a command has to call upon another command causing the other command to overrite commandname variables + +# Used to remember the command that ran first. +fn_firstcommand_set() { + if [ -z "${firstcommandname}" ]; then + firstcommandname="${commandname}" + firstcommandaction="${commandaction}" + fi +} + +# Used to reset commandname variables to the command the script ran first. +fn_firstcommand_reset() { + commandname="${firstcommandname}" + commandaction="${firstcommandaction}" +} diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh new file mode 100644 index 000000000..8eb843b5a --- /dev/null +++ b/lgsm/modules/core_modules.sh @@ -0,0 +1,816 @@ +#!/bin/bash +# LinuxGSM core_modules.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Defines all modules to allow download and execution of modules using fn_fetch_module. +# This module is called first before any other module. Without this file other modules will not load. + +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +modulesversion="v23.2.0" + +# Core + +core_dl.sh() { + modulefile="${FUNCNAME[0]}" + if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then + fn_fetch_core_dl "lgsm/modules" "core_dl.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" + else + fn_bootstrap_fetch_file_github "lgsm/modules" "core_dl.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" + fi +} + +core_messages.sh() { + modulefile="${FUNCNAME[0]}" + if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then + fn_fetch_core_dl "lgsm/modules" "core_messages.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" + else + fn_bootstrap_fetch_file_github "lgsm/modules" "core_messages.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" + fi +} + +core_legacy.sh() { + modulefile="${FUNCNAME[0]}" + if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then + fn_fetch_core_dl "lgsm/modules" "core_legacy.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" + else + fn_bootstrap_fetch_file_github "lgsm/modules" "core_legacy.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" + fi +} + +core_exit.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +core_getopt.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +core_trap.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +core_steamcmd.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +core_github.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# Commands + +command_backup.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_console.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_debug.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_details.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_sponsor.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_postdetails.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_test_alert.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_monitor.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_start.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_stop.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_validate.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_install.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_install_resources_mta.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_squad_license.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_mods_install.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_mods_update.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_mods_remove.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_fastdl.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_ts3_server_pass.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_restart.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_skeleton.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_wipe.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_send.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# Checks + +check.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_config.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_deps.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_executable.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_glibc.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_ip.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_last_update.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_logs.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_permissions.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_root.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_status.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_steamcmd.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_system_dir.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_system_requirements.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_tmuxception.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_version.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# Compress + +compress_unreal2_maps.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +compress_ut99_maps.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# Mods + +mods_list.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +mods_core.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# Dev + +command_dev_clear_modules.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_dev_debug.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_dev_detect_deps.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_dev_detect_glibc.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_dev_detect_ldd.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_dev_query_raw.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# Fix + +fix.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_ark.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_av.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_arma3.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_armar.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_bt.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_bo.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_cmw.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_csgo.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_dst.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_hw.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_ins.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_kf.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_kf2.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_lo.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_mcb.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_mta.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_nmrih.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_onset.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_ro.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_rust.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_rw.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_sfc.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_st.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_steamcmd.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_terraria.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_tf2.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_ut3.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_rust.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_samp.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_sdtd.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_sof2.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_squad.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_ts3.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_ut2k4.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_ut.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_unt.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_vh.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_wurm.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_zmr.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# Info + +info_distro.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +info_game.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +info_messages.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +info_stats.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# Alert + +alert.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +alert_discord.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +alert_email.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +alert_ifttt.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +alert_mailgun.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +alert_pushbullet.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +alert_pushover.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +alert_gotify.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +alert_telegram.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +alert_rocketchat.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +alert_slack.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} +# Logs + +core_logs.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# Query + +query_gamedig.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# Update + +command_update_modules.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_update_linuxgsm.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_update.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_check_update.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +update_ts3.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +update_minecraft.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +update_minecraft_bedrock.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +update_papermc.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +update_mta.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +update_factorio.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +update_jediknight2.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +update_steamcmd.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +update_vintagestory.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +update_ut99.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fn_update_modules.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# +## Installer modules +# + +fn_autoinstall() { + autoinstall=1 + command_install.sh +} + +install_complete.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_config.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_factorio_save.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_dst_token.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_eula.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_gsquery.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_gslt.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_header.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_logs.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_retry.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_server_dir.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} +install_server_files.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_stats.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_steamcmd.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_ts3.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_ts3db.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_ut2k4.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_dl_ut2k4.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_ut2k4_key.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# Calls code required for legacy servers +core_legacy.sh + +# Creates tmp dir if missing +if [ ! -d "${tmpdir}" ]; then + mkdir -p "${tmpdir}" +fi + +# Creates lock dir if missing +if [ ! -d "${lockdir}" ]; then + mkdir -p "${lockdir}" +fi + +# Calls on-screen messages (bootstrap) +core_messages.sh + +#Calls file downloader (bootstrap) +core_dl.sh + +# Calls the global Ctrl-C trap +core_trap.sh diff --git a/lgsm/modules/core_steamcmd.sh b/lgsm/modules/core_steamcmd.sh new file mode 100644 index 000000000..78c30f60a --- /dev/null +++ b/lgsm/modules/core_steamcmd.sh @@ -0,0 +1,330 @@ +#!/bin/bash +# LinuxGSM core_steamcmd.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Core modules for SteamCMD + +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +fn_install_steamcmd() { + if [ "${shortname}" == "ark" ] && [ "${installsteamcmd}" == "1" ]; then + steamcmddir="${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux" + fi + if [ ! -d "${steamcmddir}" ]; then + mkdir -p "${steamcmddir}" + fi + fn_fetch_file "http://media.steampowered.com/client/steamcmd_linux.tar.gz" "" "" "" "${tmpdir}" "steamcmd_linux.tar.gz" "nochmodx" "norun" "noforce" "nohash" + fn_dl_extract "${tmpdir}" "steamcmd_linux.tar.gz" "${steamcmddir}" + chmod +x "${steamcmddir}/steamcmd.sh" +} + +fn_check_steamcmd_user() { + # Checks if steamuser is setup. + if [ "${steamuser}" == "username" ]; then + fn_print_fail_nl "Steam login not set. Update steamuser in ${configdirserver}" + echo -e " * Change steamuser=\"username\" to a valid steam login." + if [ -d "${lgsmlogdir}" ]; then + fn_script_log_fatal "Steam login not set. Update steamuser in ${configdirserver}" + fi + core_exit.sh + fi + # Anonymous user is set if steamuser is missing. + if [ -z "${steamuser}" ]; then + if [ -d "${lgsmlogdir}" ]; then + fn_script_log_info "Using anonymous Steam login" + fi + steamuser="anonymous" + steampass='' + fi +} + +fn_check_steamcmd() { + # Checks if SteamCMD exists when starting or updating a server. + # Only install if steamcmd package is missing or steamcmd dir is missing. + if [ ! -f "${steamcmddir}/steamcmd.sh" ] && [ -z "$(command -v steamcmd 2> /dev/null)" ]; then + if [ "${commandname}" == "INSTALL" ]; then + fn_install_steamcmd + else + fn_print_warn_nl "SteamCMD is missing" + fn_script_log_warn "SteamCMD is missing" + fn_install_steamcmd + fi + elif [ "${commandname}" == "INSTALL" ]; then + fn_print_information "SteamCMD is already installed..." + fn_print_ok_eol_nl + fi +} + +fn_check_steamcmd_dir() { + # Worksround that pre-installs the correct steam directories to ensure all packages use the correct Standard. + # https://github.com/ValveSoftware/steam-for-linux/issues/6976#issuecomment-610446347 + + # Create Steam installation directory. + if [ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" ]; then + mkdir -p "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" + fi + + # Create common Steam directory. + if [ ! -d "${HOME}/.steam" ]; then + mkdir -p "${HOME}/.steam" + fi + + # Symbolic links to Steam installation directory. + if [ ! -L "${HOME}/.steam/root" ]; then + if [ -d "${HOME}/.steam/root" ]; then + rm -f "${HOME:?}/.steam/root" + fi + ln -s "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" "${HOME}/.steam/root" + fi + + if [ ! -L "${HOME}/.steam/steam" ]; then + if [ -d "${HOME}/.steam/steam" ]; then + rm -rf "${HOME}/.steam/steam" + fi + ln -s "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" "${HOME}/.steam/steam" + fi +} + +fn_check_steamcmd_dir_legacy() { + # Remove old Steam installation directories ~/Steam and ${rootdir}/steamcmd + if [ -d "${rootdir}/steamcmd" ] && [ "${steamcmddir}" == "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" ]; then + rm -rf "${rootdir:?}/steamcmd" + fi + + if [ -d "${HOME}/Steam" ] && [ "${steamcmddir}" == "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" ]; then + rm -rf "${HOME}/Steam" + fi +} + +fn_check_steamcmd_steamapp() { + # Check that steamapp directory fixes issue #3481 + if [ ! -d "${serverfiles}/steamapps" ]; then + mkdir -p "${serverfiles}/steamapps" + fi +} + +fn_check_steamcmd_ark() { + # Checks if SteamCMD exists in + # Engine/Binaries/ThirdParty/SteamCMD/Linux + # to allow ark mods to work + if [ ! -f "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamcmd.sh" ]; then + installsteamcmd=1 + if [ "${commandname}" == "INSTALL" ]; then + fn_install_steamcmd + else + fn_print_warn_nl "ARK mods SteamCMD is missing" + fn_script_log_warn "ARK mods SteamCMD is missing" + fn_install_steamcmd + fi + elif [ "${commandname}" == "INSTALL" ]; then + fn_print_information "ARK mods SteamCMD is already installed..." + fn_print_ok_eol_nl + fi +} + +fn_check_steamcmd_clear() { + # Will remove steamcmd dir if steamcmd package is installed. + if [ "$(command -v steamcmd 2> /dev/null)" ] && [ -d "${rootdir}/steamcmd" ]; then + rm -rf "${steamcmddir:?}" + exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_script_log_fatal "Removing ${rootdir}/steamcmd" + else + fn_script_log_pass "Removing ${rootdir}/steamcmd" + fi + fi +} + +fn_check_steamcmd_exec() { + if [ "$(command -v steamcmd 2> /dev/null)" ]; then + steamcmdcommand="steamcmd" + else + steamcmdcommand="./steamcmd.sh" + fi +} + +fn_update_steamcmd_localbuild() { + # Gets local build info. + fn_print_dots "Checking local build: ${remotelocation}" + fn_appmanifest_check + # Uses appmanifest to find local build. + localbuild=$(grep buildid "${appmanifestfile}" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\ -f3) + + # Set branch to public if no custom branch. + if [ -z "${branch}" ]; then + branch="public" + fi + + # Checks if localbuild variable has been set. + if [ -z "${localbuild}" ]; then + fn_print_fail "Checking local build: ${remotelocation}: missing local build info" + fn_script_log_fatal "Missing local build info" + core_exit.sh + else + fn_print_ok "Checking local build: ${remotelocation}" + fn_script_log_pass "Checking local build" + fi +} + +fn_update_steamcmd_remotebuild() { + # Get remote build info. + if [ -d "${steamcmddir}" ]; then + cd "${steamcmddir}" || exit + fi + + # Removes appinfo.vdf as a fix for not always getting up to date version info from SteamCMD. + if [ "$(find "${HOME}" -type f -name "appinfo.vdf" | wc -l)" -ne "0" ]; then + find "${HOME}" -type f -name "appinfo.vdf" -exec rm -f {} \; + fi + + # password for branch not needed to check the buildid + remotebuildversion=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed -e '/"branches"/,/^}/!d' | sed -n "/\"${branch}\"/,/}/p" | grep -m 1 buildid | tr -cd '[:digit:]') + + if [ "${firstcommandname}" != "INSTALL" ]; then + fn_print_dots "Checking remote build: ${remotelocation}" + # Checks if remotebuildversion variable has been set. + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + fn_print_fail "Checking remote build: ${remotelocation}" + fn_script_log_fatal "Checking remote build" + core_exit.sh + else + fn_print_ok "Checking remote build: ${remotelocation}" + fn_script_log_pass "Checking remote build" + fi + else + # Checks if remotebuild variable has been set. + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + fn_print_failure "Unable to get remote build" + fn_script_log_fatal "Unable to get remote build" + core_exit.sh + fi + fi +} + +fn_update_steamcmd_compare() { + fn_print_dots "Checking for update: ${remotelocation}" + if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "Update available" + echo -e "* Local build: ${red}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + if [ -n "${betapassword}" ]; then + echo -e "* Branch password: ${betapassword}" + fi + echo -e "https://steamdb.info/app/${appid}/" + echo -en "\n" + fn_script_log_info "Update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + if [ -n "${betapassword}" ]; then + fn_script_log_info "Branch password: ${betapassword}" + fi + fn_script_log_info "${localbuild} > ${remotebuildversion}" + + if [ "${commandname}" == "UPDATE" ]; then + unset updateonstart + check_status.sh + # If server stopped. + if [ "${status}" == "0" ]; then + fn_dl_steamcmd + # If server started. + else + fn_print_restart_warning + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + exitbypass=1 + fn_dl_steamcmd + exitbypass=1 + command_start.sh + fn_firstcommand_reset + fi + unset exitbypass + date +%s > "${lockdir}/lastupdate.lock" + alert="update" + elif [ "${commandname}" == "CHECK-UPDATE" ]; then + alert="check-update" + fi + alert.sh + else + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "No update available" + echo -e "* Local build: ${green}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + if [ -n "${betapassword}" ]; then + echo -e "* Branch password: ${betapassword}" + fi + echo -e "https://steamdb.info/app/${appid}/" + echo -en "\n" + fn_script_log_info "No update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + if [ -n "${betapassword}" ]; then + fn_script_log_info "Branch password: ${betapassword}" + fi + fi +} + +fn_appmanifest_info() { + appmanifestfile=$(find -L "${serverfiles}" -type f -name "appmanifest_${appid}.acf") + appmanifestfilewc=$(find -L "${serverfiles}" -type f -name "appmanifest_${appid}.acf" | wc -l) +} + +fn_appmanifest_check() { + fn_appmanifest_info + # Multiple or no matching appmanifest files may sometimes be present. + # This error is corrected if required. + if [ "${appmanifestfilewc}" -ge "2" ]; then + fn_print_error "Multiple appmanifest_${appid}.acf files found" + fn_script_log_error "Multiple appmanifest_${appid}.acf files found" + fn_print_dots "Removing x${appmanifestfilewc} appmanifest_${appid}.acf files" + for appfile in ${appmanifestfile}; do + rm -f "${appfile:?}" + done + appmanifestfilewc1="${appmanifestfilewc}" + fn_appmanifest_info + # if error can not be resolved. + if [ "${appmanifestfilewc}" -ge "2" ]; then + fn_print_fail "Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files" + fn_script_log_fatal "Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files" + echo -e "* Check user permissions" + for appfile in ${appmanifestfile}; do + echo -e " ${appfile}" + done + core_exit.sh + else + fn_print_ok "Removed x${appmanifestfilewc1} appmanifest_${appid}.acf files" + fn_script_log_pass "Removed x${appmanifestfilewc1} appmanifest_${appid}.acf files" + fn_print_info_nl "Forcing update to correct issue" + fn_script_log_info "Forcing update to correct issue" + fn_dl_steamcmd + fi + elif [ "${appmanifestfilewc}" -eq "0" ]; then + fn_print_error_nl "No appmanifest_${appid}.acf found" + fn_script_log_error "No appmanifest_${appid}.acf found" + fn_print_info_nl "Forcing update to correct issue" + fn_script_log_info "Forcing update to correct issue" + fn_dl_steamcmd + fn_appmanifest_info + if [ "${appmanifestfilewc}" -eq "0" ]; then + fn_print_fail_nl "Still no appmanifest_${appid}.acf found" + fn_script_log_fatal "Still no appmanifest_${appid}.acf found" + core_exit.sh + fi + fi +} diff --git a/lgsm/modules/core_trap.sh b/lgsm/modules/core_trap.sh new file mode 100644 index 000000000..ea6fce869 --- /dev/null +++ b/lgsm/modules/core_trap.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# LinuxGSM core_trap.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Handles CTRL-C trap to give an exit code. + +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +fn_exit_trap() { + if [ -z "${exitcode}" ]; then + exitcode=$? + fi + echo -e "" + if [ -z "${exitcode}" ]; then + exitcode=0 + fi + core_exit.sh +} + +# trap to give an exit code. +trap fn_exit_trap INT diff --git a/lgsm/functions/fix.sh b/lgsm/modules/fix.sh old mode 100755 new mode 100644 similarity index 93% rename from lgsm/functions/fix.sh rename to lgsm/modules/fix.sh index 57f6a91fa..322091f5a --- a/lgsm/functions/fix.sh +++ b/lgsm/modules/fix.sh @@ -3,10 +3,10 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Overall function for managing fixes. -# Runs functions that will fix an issue. +# Description: Overall module for managing fixes. +# Runs modules that will fix an issue. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Messages that are displayed for some fixes. fn_fix_msg_start() { @@ -59,7 +59,7 @@ apply_post_install_fix=(av kf kf2 lo ro samp ut2k4 ut ut3) for fix in "${apply_pre_start_fix[@]}" "${apply_post_install_fix[@]}"; do if ! fn_exists_fix "${fix}"; then fn_print_fail_nl "fix_${fix}.sh is registered but doesn't exist. Typo or did you miss to modify core_functions.sh?" - exitcode 1 + exitcode=1 core_exit.sh fi done diff --git a/lgsm/functions/fix_ark.sh b/lgsm/modules/fix_ark.sh old mode 100755 new mode 100644 similarity index 97% rename from lgsm/functions/fix_ark.sh rename to lgsm/modules/fix_ark.sh index f8e0447e3..7ca0e60f8 --- a/lgsm/functions/fix_ark.sh +++ b/lgsm/modules/fix_ark.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with ARK: Survival Evolved. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # removes mulitple appworkshop_346110.acf if found. steamappsfilewc="$(find "${HOME}" -name appworkshop_346110.acf | wc -l)" diff --git a/lgsm/functions/fix_arma3.sh b/lgsm/modules/fix_arma3.sh old mode 100755 new mode 100644 similarity index 89% rename from lgsm/functions/fix_arma3.sh rename to lgsm/modules/fix_arma3.sh index bbf14c9d2..d41738377 --- a/lgsm/functions/fix_arma3.sh +++ b/lgsm/modules/fix_arma3.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Resolves an issue with ARMA3. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Fixes: 20150 Segmentation fault (core dumped) error. if [ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Arma 3" ] || [ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Arma 3 - Other Profiles" ]; then diff --git a/lgsm/functions/fix_armar.sh b/lgsm/modules/fix_armar.sh similarity index 86% rename from lgsm/functions/fix_armar.sh rename to lgsm/modules/fix_armar.sh index 9db42f51a..2a56daf41 100755 --- a/lgsm/functions/fix_armar.sh +++ b/lgsm/modules/fix_armar.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Resolves an issue with Arma Reforger. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Fixes: Profile directory doesn't exist. # Issue Link: https://feedback.bistudio.com/T164845 diff --git a/lgsm/functions/fix_av.sh b/lgsm/modules/fix_av.sh old mode 100755 new mode 100644 similarity index 90% rename from lgsm/functions/fix_av.sh rename to lgsm/modules/fix_av.sh index a61a8be65..c8fcdcfc5 --- a/lgsm/functions/fix_av.sh +++ b/lgsm/modules/fix_av.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Resolves startup issue with Avorion -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/linux64" diff --git a/lgsm/functions/fix_bo.sh b/lgsm/modules/fix_bo.sh similarity index 81% rename from lgsm/functions/fix_bo.sh rename to lgsm/modules/fix_bo.sh index 453691874..3e09a880f 100644 --- a/lgsm/functions/fix_bo.sh +++ b/lgsm/modules/fix_bo.sh @@ -5,6 +5,6 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Ballistic Overkill. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/BODS_Data/Plugins/x86_64" diff --git a/lgsm/functions/fix_bt.sh b/lgsm/modules/fix_bt.sh similarity index 91% rename from lgsm/functions/fix_bt.sh rename to lgsm/modules/fix_bt.sh index 07fd61ce5..bb26155d8 100755 --- a/lgsm/functions/fix_bt.sh +++ b/lgsm/modules/fix_bt.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Resolves an issue with Barotrauma. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Fixes: Missing user data directory error. if [ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Daedalic Entertainment GmbH/Barotrauma" ]; then diff --git a/lgsm/functions/fix_cmw.sh b/lgsm/modules/fix_cmw.sh old mode 100755 new mode 100644 similarity index 89% rename from lgsm/functions/fix_cmw.sh rename to lgsm/modules/fix_cmw.sh index 192f483e8..6b8f1caa8 --- a/lgsm/functions/fix_cmw.sh +++ b/lgsm/modules/fix_cmw.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Resolves the issue of the not starting server on linux -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ ! -f "${executabledir}/steam_appid.txt" ]; then fixname="steam_appid.txt" diff --git a/lgsm/functions/fix_csgo.sh b/lgsm/modules/fix_csgo.sh old mode 100755 new mode 100644 similarity index 95% rename from lgsm/functions/fix_csgo.sh rename to lgsm/modules/fix_csgo.sh index a393f2fd9..eb8cc9560 --- a/lgsm/functions/fix_csgo.sh +++ b/lgsm/modules/fix_csgo.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with CS:GO. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Fixes: server not always creating steam_appid.txt file. if [ ! -f "${serverfiles}/steam_appid.txt" ]; then diff --git a/lgsm/functions/fix_dst.sh b/lgsm/modules/fix_dst.sh old mode 100755 new mode 100644 similarity index 91% rename from lgsm/functions/fix_dst.sh rename to lgsm/modules/fix_dst.sh index e30507dc9..e1f07dcb6 --- a/lgsm/functions/fix_dst.sh +++ b/lgsm/modules/fix_dst.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Don't Starve Together. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Fixes: ./dontstarve_dedicated_server_nullrenderer: ./lib32/libcurl-gnutls.so.4: no version information available (required by ./dontstarve_dedicated_server_nullrenderer). # Issue only occures on CentOS as libcurl-gnutls.so.4 is called libcurl.so.4 on CentOS. diff --git a/lgsm/functions/fix_hw.sh b/lgsm/modules/fix_hw.sh old mode 100755 new mode 100644 similarity index 81% rename from lgsm/functions/fix_hw.sh rename to lgsm/modules/fix_hw.sh index af06924db..6a92a5c04 --- a/lgsm/functions/fix_hw.sh +++ b/lgsm/modules/fix_hw.sh @@ -5,6 +5,6 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Hurtworld. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/Hurtworld_Data/Plugins/x86_64" diff --git a/lgsm/functions/fix_ins.sh b/lgsm/modules/fix_ins.sh old mode 100755 new mode 100644 similarity index 89% rename from lgsm/functions/fix_ins.sh rename to lgsm/modules/fix_ins.sh index 21a979c4c..21bea123a --- a/lgsm/functions/fix_ins.sh +++ b/lgsm/modules/fix_ins.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Insurgency. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Fixes: ./srcds_linux: error while loading shared libraries: libtier0.so: cannot open shared object file: No such file or directory. diff --git a/lgsm/functions/fix_kf.sh b/lgsm/modules/fix_kf.sh old mode 100755 new mode 100644 similarity index 93% rename from lgsm/functions/fix_kf.sh rename to lgsm/modules/fix_kf.sh index e749a2d27..3cfb8fd84 --- a/lgsm/functions/fix_kf.sh +++ b/lgsm/modules/fix_kf.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Killing Floor. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "Applying WebAdmin ROOst.css fix." echo -e "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13" diff --git a/lgsm/functions/fix_kf2.sh b/lgsm/modules/fix_kf2.sh old mode 100755 new mode 100644 similarity index 87% rename from lgsm/functions/fix_kf2.sh rename to lgsm/modules/fix_kf2.sh index b680a9937..7be311b4f --- a/lgsm/functions/fix_kf2.sh +++ b/lgsm/modules/fix_kf2.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Killing Floor 2. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" startparameters="\"${defaultmap}?Game=KFGameContent.KFGameInfo_VersusSurvival\"" diff --git a/lgsm/functions/fix_lo.sh b/lgsm/modules/fix_lo.sh similarity index 80% rename from lgsm/functions/fix_lo.sh rename to lgsm/modules/fix_lo.sh index eec2ebd36..a04248867 100644 --- a/lgsm/functions/fix_lo.sh +++ b/lgsm/modules/fix_lo.sh @@ -1,10 +1,10 @@ #!/bin/bash -# LinuxGSM fix_lo.sh function +# LinuxGSM fix_lo.sh module # Author: Daniel Gibbs # Website: https://linuxgsm.com # Description: Resolves installation issue with Last Oasis -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" appidfile=${executabledir}/steam_appid.txt if [ ! -f "${appidfile}" ]; then diff --git a/lgsm/functions/fix_mcb.sh b/lgsm/modules/fix_mcb.sh old mode 100755 new mode 100644 similarity index 84% rename from lgsm/functions/fix_mcb.sh rename to lgsm/modules/fix_mcb.sh index 4768a40cf..828225e72 --- a/lgsm/functions/fix_mcb.sh +++ b/lgsm/modules/fix_mcb.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Resolves possible startup issue with Minecraft Bedrock. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # official docs state that the server should be started with: LD_LIBRARY_PATH=. ./bedrock_server export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}" diff --git a/lgsm/functions/fix_mta.sh b/lgsm/modules/fix_mta.sh old mode 100755 new mode 100644 similarity index 89% rename from lgsm/functions/fix_mta.sh rename to lgsm/modules/fix_mta.sh index 2c92e8d12..21292d7f3 --- a/lgsm/functions/fix_mta.sh +++ b/lgsm/modules/fix_mta.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Installs the libmysqlclient for database functions on the server. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ ! -f "${lgsmdir}/lib/libmysqlclient.so.16" ]; then fixname="libmysqlclient16" diff --git a/lgsm/functions/fix_nmrih.sh b/lgsm/modules/fix_nmrih.sh old mode 100755 new mode 100644 similarity index 93% rename from lgsm/functions/fix_nmrih.sh rename to lgsm/modules/fix_nmrih.sh index 4bb70c6f9..83a5ad412 --- a/lgsm/functions/fix_nmrih.sh +++ b/lgsm/modules/fix_nmrih.sh @@ -6,7 +6,7 @@ # Description: Create symlinks for renamed No More Room In Hell serverfiles. # Solution from Steam Community post: https://steamcommunity.com/app/224260/discussions/2/1732089092441769414/ -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" ln -s "${serverfiles}/bin/vphysics_srv.so" "${serverfiles}/bin/vphysics.so" ln -s "${serverfiles}/bin/studiorender_srv.so" "${serverfiles}/bin/studiorender.so" diff --git a/lgsm/functions/fix_onset.sh b/lgsm/modules/fix_onset.sh old mode 100755 new mode 100644 similarity index 91% rename from lgsm/functions/fix_onset.sh rename to lgsm/modules/fix_onset.sh index e4183999d..7d644ef7b --- a/lgsm/functions/fix_onset.sh +++ b/lgsm/modules/fix_onset.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Onset. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}" diff --git a/lgsm/functions/fix_ro.sh b/lgsm/modules/fix_ro.sh old mode 100755 new mode 100644 similarity index 94% rename from lgsm/functions/fix_ro.sh rename to lgsm/modules/fix_ro.sh index 895c7c2da..5dd1d3fb8 --- a/lgsm/functions/fix_ro.sh +++ b/lgsm/modules/fix_ro.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Red Orchestra. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "Applying WebAdmin ROOst.css fix." echo -e "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13" diff --git a/lgsm/functions/fix_rust.sh b/lgsm/modules/fix_rust.sh old mode 100755 new mode 100644 similarity index 94% rename from lgsm/functions/fix_rust.sh rename to lgsm/modules/fix_rust.sh index 5f407e89f..0699a8f00 --- a/lgsm/functions/fix_rust.sh +++ b/lgsm/modules/fix_rust.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Resolves startup issue with Rust. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Fixes: [Raknet] Server Shutting Down (Shutting Down). export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/RustDedicated_Data/Plugins/x86_64" diff --git a/lgsm/functions/fix_rw.sh b/lgsm/modules/fix_rw.sh old mode 100755 new mode 100644 similarity index 80% rename from lgsm/functions/fix_rw.sh rename to lgsm/modules/fix_rw.sh index aef41a703..2cc631122 --- a/lgsm/functions/fix_rw.sh +++ b/lgsm/modules/fix_rw.sh @@ -5,6 +5,6 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Rising World. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/linux64" diff --git a/lgsm/functions/fix_samp.sh b/lgsm/modules/fix_samp.sh similarity index 94% rename from lgsm/functions/fix_samp.sh rename to lgsm/modules/fix_samp.sh index a88bf154f..146fc37af 100644 --- a/lgsm/functions/fix_samp.sh +++ b/lgsm/modules/fix_samp.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Resolves issue that the default rcon password is not changed -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ -f "${servercfgfullpath}" ]; then # check if default password is set "changeme" diff --git a/lgsm/functions/fix_sdtd.sh b/lgsm/modules/fix_sdtd.sh old mode 100755 new mode 100644 similarity index 81% rename from lgsm/functions/fix_sdtd.sh rename to lgsm/modules/fix_sdtd.sh index e93db7970..e46f7db8c --- a/lgsm/functions/fix_sdtd.sh +++ b/lgsm/modules/fix_sdtd.sh @@ -5,6 +5,6 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with 7 Days to Die. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}/7DaysToDieServer_Data/Plugins/x86_64" diff --git a/lgsm/functions/fix_sfc.sh b/lgsm/modules/fix_sfc.sh old mode 100755 new mode 100644 similarity index 95% rename from lgsm/functions/fix_sfc.sh rename to lgsm/modules/fix_sfc.sh index 51b95b9d5..891b71803 --- a/lgsm/functions/fix_sfc.sh +++ b/lgsm/modules/fix_sfc.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Source Forts Classic. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ ! -f "${serverfiles}/bin/datacache.so" ]; then ln -s "${serverfiles}/bin/datacache_srv.so" "${serverfiles}/bin/datacache.so" diff --git a/lgsm/functions/fix_sof2.sh b/lgsm/modules/fix_sof2.sh old mode 100755 new mode 100644 similarity index 82% rename from lgsm/functions/fix_sof2.sh rename to lgsm/modules/fix_sof2.sh index 002f42952..43d943cb1 --- a/lgsm/functions/fix_sof2.sh +++ b/lgsm/modules/fix_sof2.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Soldier of Fortune 2. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Fixes: error while loading shared libraries: libcxa.so.1 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}" diff --git a/lgsm/functions/fix_squad.sh b/lgsm/modules/fix_squad.sh similarity index 92% rename from lgsm/functions/fix_squad.sh rename to lgsm/modules/fix_squad.sh index 7d5929b5d..e7162d310 100644 --- a/lgsm/functions/fix_squad.sh +++ b/lgsm/modules/fix_squad.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Squad. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # As the server base dir changed for the game, we need to migrate the default config from the old to the new location oldservercfg="${serverfiles}/Squad/ServerConfig/${servercfg}" diff --git a/lgsm/functions/fix_st.sh b/lgsm/modules/fix_st.sh similarity index 84% rename from lgsm/functions/fix_st.sh rename to lgsm/modules/fix_st.sh index b9fb5b084..44066bb37 100644 --- a/lgsm/functions/fix_st.sh +++ b/lgsm/modules/fix_st.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Resolves startup issue with Stationeers. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Fixes: [Raknet] Server Shutting Down (Shutting Down). export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/rocketstation_DedicatedServer_Data/Plugins/x86_64" diff --git a/lgsm/functions/fix_steamcmd.sh b/lgsm/modules/fix_steamcmd.sh old mode 100755 new mode 100644 similarity index 98% rename from lgsm/functions/fix_steamcmd.sh rename to lgsm/modules/fix_steamcmd.sh index 9644208dc..44980ab32 --- a/lgsm/functions/fix_steamcmd.sh +++ b/lgsm/modules/fix_steamcmd.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues related to SteamCMD. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # function to simplify the steamclient.so fix # example diff --git a/lgsm/functions/fix_terraria.sh b/lgsm/modules/fix_terraria.sh old mode 100755 new mode 100644 similarity index 75% rename from lgsm/functions/fix_terraria.sh rename to lgsm/modules/fix_terraria.sh index 7758fdad9..7e5aa67e2 --- a/lgsm/functions/fix_terraria.sh +++ b/lgsm/modules/fix_terraria.sh @@ -5,6 +5,6 @@ # Website: https://linuxgsm.com # Description: Resolves an issue with Terraria. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" export TERM=xterm diff --git a/lgsm/functions/fix_tf2.sh b/lgsm/modules/fix_tf2.sh old mode 100755 new mode 100644 similarity index 88% rename from lgsm/functions/fix_tf2.sh rename to lgsm/modules/fix_tf2.sh index 77e41a969..085542eed --- a/lgsm/functions/fix_tf2.sh +++ b/lgsm/modules/fix_tf2.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Team Fortress 2. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Fixes: Team Fortress 2 Segmentation fault for Red-Hat Distros #2062. if [ -f "/etc/redhat-release" ] && [ ! -f "${serverfiles}/bin/libcurl-gnutls.so.4" ]; then diff --git a/lgsm/functions/fix_ts3.sh b/lgsm/modules/fix_ts3.sh old mode 100755 new mode 100644 similarity index 94% rename from lgsm/functions/fix_ts3.sh rename to lgsm/modules/fix_ts3.sh index 7c7387cb6..9eb728f48 --- a/lgsm/functions/fix_ts3.sh +++ b/lgsm/modules/fix_ts3.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Teamspeak 3. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Fixes: makes libmariadb2 available #1924. if [ ! -f "${serverfiles}/libmariadb.so.2" ]; then diff --git a/lgsm/functions/fix_unt.sh b/lgsm/modules/fix_unt.sh old mode 100755 new mode 100644 similarity index 81% rename from lgsm/functions/fix_unt.sh rename to lgsm/modules/fix_unt.sh index eae2e6313..77253bd85 --- a/lgsm/functions/fix_unt.sh +++ b/lgsm/modules/fix_unt.sh @@ -5,6 +5,6 @@ # Website: https://linuxgsm.com # Description: Resolves startup issue with Unturned. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/Unturned_Headless_Data/Plugins/x86_64" diff --git a/lgsm/functions/fix_ut.sh b/lgsm/modules/fix_ut.sh old mode 100755 new mode 100644 similarity index 83% rename from lgsm/functions/fix_ut.sh rename to lgsm/modules/fix_ut.sh index 2e6686a8d..aa958e86d --- a/lgsm/functions/fix_ut.sh +++ b/lgsm/modules/fix_ut.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Unreal Tournament. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" #Set Binary Executable echo -e "chmod +x ${executabledir}/${executable}" diff --git a/lgsm/functions/fix_ut2k4.sh b/lgsm/modules/fix_ut2k4.sh old mode 100755 new mode 100644 similarity index 93% rename from lgsm/functions/fix_ut2k4.sh rename to lgsm/modules/fix_ut2k4.sh index 49610e4b6..0a3b89b33 --- a/lgsm/functions/fix_ut2k4.sh +++ b/lgsm/modules/fix_ut2k4.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Unreal Tournament 2004. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "applying WebAdmin ut2003.css fix." echo -e "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13" diff --git a/lgsm/functions/fix_ut3.sh b/lgsm/modules/fix_ut3.sh old mode 100755 new mode 100644 similarity index 91% rename from lgsm/functions/fix_ut3.sh rename to lgsm/modules/fix_ut3.sh index 6bd26a53a..4958537f2 --- a/lgsm/functions/fix_ut3.sh +++ b/lgsm/modules/fix_ut3.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Unreal Tournament 3. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" startparameters="server VCTF-Suspense?Game=UTGameContent.UTVehicleCTFGame_Content?bIsDedicated=true?bIsLanMatch=false?bUsesStats=false?bShouldAdvertise=false?PureServer=1?bAllowJoinInProgress=true?ConfigSubDir=${selfname} -port=${port} -queryport=${queryport} -multihome=${ip} -nohomedir -unattended -log=${gamelog}" diff --git a/lgsm/functions/fix_vh.sh b/lgsm/modules/fix_vh.sh old mode 100755 new mode 100644 similarity index 92% rename from lgsm/functions/fix_vh.sh rename to lgsm/modules/fix_vh.sh index a90c5d0b0..984907747 --- a/lgsm/functions/fix_vh.sh +++ b/lgsm/modules/fix_vh.sh @@ -1,10 +1,10 @@ #!/bin/bash -# LinuxGSM fix_rust.sh function +# LinuxGSM fix_rust.sh module # Author: Alasdair Haig # Website: https://linuxgsm.com # Description: Resolves startup issue with Valheim -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" export LD_LIBRARY_PATH=./linux64:$LD_LIBRARY_PATH diff --git a/lgsm/functions/fix_wurm.sh b/lgsm/modules/fix_wurm.sh old mode 100755 new mode 100644 similarity index 87% rename from lgsm/functions/fix_wurm.sh rename to lgsm/modules/fix_wurm.sh index aba24d382..1536df2e7 --- a/lgsm/functions/fix_wurm.sh +++ b/lgsm/modules/fix_wurm.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Wurm Unlimited. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # First run requires start with no parms. # After first run new dirs are created. diff --git a/lgsm/functions/fix_zmr.sh b/lgsm/modules/fix_zmr.sh old mode 100755 new mode 100644 similarity index 95% rename from lgsm/functions/fix_zmr.sh rename to lgsm/modules/fix_zmr.sh index 491c36638..56f055fc3 --- a/lgsm/functions/fix_zmr.sh +++ b/lgsm/modules/fix_zmr.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Zombie Master: Reborn. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ ! -f "${serverfiles}/bin/datacache.so" ]; then ln -s "${serverfiles}/bin/datacache_srv.so" "${serverfiles}/bin/datacache.so" diff --git a/lgsm/functions/info_distro.sh b/lgsm/modules/info_distro.sh old mode 100755 new mode 100644 similarity index 99% rename from lgsm/functions/info_distro.sh rename to lgsm/modules/info_distro.sh index f29e621d5..411a50458 --- a/lgsm/functions/info_distro.sh +++ b/lgsm/modules/info_distro.sh @@ -6,7 +6,7 @@ # Description: Variables providing useful info on the Operating System such as disk and performace info. # Used for command_details.sh, command_debug.sh and alert.sh. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" ### Game Server pid if [ "${status}" == "1" ]; then diff --git a/lgsm/functions/info_game.sh b/lgsm/modules/info_game.sh similarity index 99% rename from lgsm/functions/info_game.sh rename to lgsm/modules/info_game.sh index 8c9ca310a..59e8d37fa 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Gathers various game server information. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" ## Examples of filtering to get info from config files. # sed 's/foo//g' - remove foo diff --git a/lgsm/functions/info_messages.sh b/lgsm/modules/info_messages.sh old mode 100755 new mode 100644 similarity index 99% rename from lgsm/functions/info_messages.sh rename to lgsm/modules/info_messages.sh index 5478987f1..4dbbdcd96 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Defines server info messages for details and alerts. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Separator is different for details. fn_messages_separator() { diff --git a/lgsm/functions/info_stats.sh b/lgsm/modules/info_stats.sh old mode 100755 new mode 100644 similarity index 99% rename from lgsm/functions/info_stats.sh rename to lgsm/modules/info_stats.sh index 0589770f6..2afe3338d --- a/lgsm/functions/info_stats.sh +++ b/lgsm/modules/info_stats.sh @@ -6,7 +6,7 @@ # Description: Collect optional Stats sent to LinuxGSM project. # Uses Google analytics. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" info_distro.sh diff --git a/lgsm/functions/install_complete.sh b/lgsm/modules/install_complete.sh old mode 100755 new mode 100644 similarity index 86% rename from lgsm/functions/install_complete.sh rename to lgsm/modules/install_complete.sh index ad258b224..58189a4be --- a/lgsm/functions/install_complete.sh +++ b/lgsm/modules/install_complete.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Prints installation completion message and hints. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" echo -e "=================================" diff --git a/lgsm/functions/install_config.sh b/lgsm/modules/install_config.sh old mode 100755 new mode 100644 similarity index 99% rename from lgsm/functions/install_config.sh rename to lgsm/modules/install_config.sh index 35d7df7c6..699a919c3 --- a/lgsm/functions/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Creates default server configs. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Checks if server cfg dir exists, creates it if it doesn't. fn_check_cfgdir() { diff --git a/lgsm/functions/install_dst_token.sh b/lgsm/modules/install_dst_token.sh old mode 100755 new mode 100644 similarity index 95% rename from lgsm/functions/install_dst_token.sh rename to lgsm/modules/install_dst_token.sh index 50bc7ed97..43db58fab --- a/lgsm/functions/install_dst_token.sh +++ b/lgsm/modules/install_dst_token.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Configures Don't Starve Together cluster with given token. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" echo -e "${lightyellow}Enter ${gamename} Cluster Token${default}" diff --git a/lgsm/functions/install_eula.sh b/lgsm/modules/install_eula.sh old mode 100755 new mode 100644 similarity index 95% rename from lgsm/functions/install_eula.sh rename to lgsm/modules/install_eula.sh index 3e51fac71..d70ca7d31 --- a/lgsm/functions/install_eula.sh +++ b/lgsm/modules/install_eula.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Gets user to accept the EULA. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ "${shortname}" == "ts3" ]; then eulaurl="https://www.teamspeak.com/en/privacy-and-terms" diff --git a/lgsm/functions/install_factorio_save.sh b/lgsm/modules/install_factorio_save.sh old mode 100755 new mode 100644 similarity index 86% rename from lgsm/functions/install_factorio_save.sh rename to lgsm/modules/install_factorio_save.sh index f5fdb8a04..c86ee2f37 --- a/lgsm/functions/install_factorio_save.sh +++ b/lgsm/modules/install_factorio_save.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Creates the initial save file for Factorio. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" echo -e "${lightyellow}Creating initial Factorio savefile${default}" diff --git a/lgsm/functions/install_gslt.sh b/lgsm/modules/install_gslt.sh old mode 100755 new mode 100644 similarity index 96% rename from lgsm/functions/install_gslt.sh rename to lgsm/modules/install_gslt.sh index 1ae1ef3b0..e2224276f --- a/lgsm/functions/install_gslt.sh +++ b/lgsm/modules/install_gslt.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Configures GSLT. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" echo -e "${lightyellow}Game Server Login Token${default}" diff --git a/lgsm/functions/install_header.sh b/lgsm/modules/install_header.sh old mode 100755 new mode 100644 similarity index 91% rename from lgsm/functions/install_header.sh rename to lgsm/modules/install_header.sh index 4cf067f8f..b52e116e7 --- a/lgsm/functions/install_header.sh +++ b/lgsm/modules/install_header.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Prints installation header. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" clear fn_print_ascii_logo diff --git a/lgsm/functions/install_logs.sh b/lgsm/modules/install_logs.sh old mode 100755 new mode 100644 similarity index 97% rename from lgsm/functions/install_logs.sh rename to lgsm/modules/install_logs.sh index 80a55fb94..31a408506 --- a/lgsm/functions/install_logs.sh +++ b/lgsm/modules/install_logs.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Creates log directories. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ "${checklogs}" != "1" ]; then echo -e "" diff --git a/lgsm/functions/install_mta_resources.sh b/lgsm/modules/install_mta_resources.sh old mode 100755 new mode 100644 similarity index 88% rename from lgsm/functions/install_mta_resources.sh rename to lgsm/modules/install_mta_resources.sh index 011ad9b71..bafdbdbf1 --- a/lgsm/functions/install_mta_resources.sh +++ b/lgsm/modules/install_mta_resources.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Installs the libmysqlclient for database functions on the server and optionally installs default resources required to run the server. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_print_information_nl "${gamename} will not function without resources!" echo -e " * install default resources using ./${selfname} install-default-resources" diff --git a/lgsm/functions/install_retry.sh b/lgsm/modules/install_retry.sh old mode 100755 new mode 100644 similarity index 82% rename from lgsm/functions/install_retry.sh rename to lgsm/modules/install_retry.sh index a36b4fb38..1fc4bf36a --- a/lgsm/functions/install_retry.sh +++ b/lgsm/modules/install_retry.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Asks for installation retry after failure. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if fn_prompt_yn "Retry install?" Y; then command_install.sh diff --git a/lgsm/functions/install_server_dir.sh b/lgsm/modules/install_server_dir.sh old mode 100755 new mode 100644 similarity index 89% rename from lgsm/functions/install_server_dir.sh rename to lgsm/modules/install_server_dir.sh index 658f4360c..08e83dce6 --- a/lgsm/functions/install_server_dir.sh +++ b/lgsm/modules/install_server_dir.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Creates the server directory. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" echo -e "${lightyellow}Server Directory${default}" diff --git a/lgsm/functions/install_server_files.sh b/lgsm/modules/install_server_files.sh old mode 100755 new mode 100644 similarity index 99% rename from lgsm/functions/install_server_files.sh rename to lgsm/modules/install_server_files.sh index 80075a76a..717030df4 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/modules/install_server_files.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Installs server files. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_install_server_files() { if [ "${shortname}" == "ahl" ]; then diff --git a/lgsm/functions/install_squad_license.sh b/lgsm/modules/install_squad_license.sh old mode 100755 new mode 100644 similarity index 93% rename from lgsm/functions/install_squad_license.sh rename to lgsm/modules/install_squad_license.sh index 181646e85..58053e134 --- a/lgsm/functions/install_squad_license.sh +++ b/lgsm/modules/install_squad_license.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Configures the Squad server's license. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" echo -e "${lightyellow}Squad Server License${default}" diff --git a/lgsm/functions/install_stats.sh b/lgsm/modules/install_stats.sh old mode 100755 new mode 100644 similarity index 93% rename from lgsm/functions/install_stats.sh rename to lgsm/modules/install_stats.sh index d3b45b40b..8c65c007c --- a/lgsm/functions/install_stats.sh +++ b/lgsm/modules/install_stats.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Enabled LinuxGSM Stats. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" echo -e "${lightyellow}LinuxGSM Stats${default}" diff --git a/lgsm/functions/install_steamcmd.sh b/lgsm/modules/install_steamcmd.sh old mode 100755 new mode 100644 similarity index 83% rename from lgsm/functions/install_steamcmd.sh rename to lgsm/modules/install_steamcmd.sh index b1e64a42c..8eeb2de53 --- a/lgsm/functions/install_steamcmd.sh +++ b/lgsm/modules/install_steamcmd.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Downloads SteamCMD on install. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" echo -e "${lightyellow}Installing SteamCMD${default}" diff --git a/lgsm/functions/install_ts3db.sh b/lgsm/modules/install_ts3db.sh old mode 100755 new mode 100644 similarity index 97% rename from lgsm/functions/install_ts3db.sh rename to lgsm/modules/install_ts3db.sh index ed879cd28..703f9b645 --- a/lgsm/functions/install_ts3db.sh +++ b/lgsm/modules/install_ts3db.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Installs the database server MariaDB for TeamSpeak 3. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_install_ts3db_mariadb() { if [ ! -f "${serverfiles}/libts3db_mariadb.so" ]; then diff --git a/lgsm/functions/install_ut2k4_key.sh b/lgsm/modules/install_ut2k4_key.sh old mode 100755 new mode 100644 similarity index 93% rename from lgsm/functions/install_ut2k4_key.sh rename to lgsm/modules/install_ut2k4_key.sh index 124052d05..c09c4590c --- a/lgsm/functions/install_ut2k4_key.sh +++ b/lgsm/modules/install_ut2k4_key.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Activates ut2k4 server with given key. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" echo -e "${lightyellow}Enter ${gamename} CD Key${default}" diff --git a/lgsm/functions/mods_core.sh b/lgsm/modules/mods_core.sh old mode 100755 new mode 100644 similarity index 99% rename from lgsm/functions/mods_core.sh rename to lgsm/modules/mods_core.sh index 8e4ade771..2078ae167 --- a/lgsm/functions/mods_core.sh +++ b/lgsm/modules/mods_core.sh @@ -3,9 +3,9 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Core functions for mods list/install/update/remove +# Description: Core modules for mods list/install/update/remove -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Files and Directories. modsdir="${lgsmdir}/mods" diff --git a/lgsm/functions/mods_list.sh b/lgsm/modules/mods_list.sh old mode 100755 new mode 100644 similarity index 99% rename from lgsm/functions/mods_list.sh rename to lgsm/modules/mods_list.sh index a83b7e303..e093124e9 --- a/lgsm/functions/mods_list.sh +++ b/lgsm/modules/mods_list.sh @@ -8,7 +8,7 @@ # Usage: Then add this array to the mods_global_array. # Usage: If needed, you can scrape the download URL first. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Get a proper URL for mods that don't provide a good one (optional) fn_script_log_info "Retrieving latest mods URLs" diff --git a/lgsm/functions/query_gamedig.sh b/lgsm/modules/query_gamedig.sh old mode 100755 new mode 100644 similarity index 97% rename from lgsm/functions/query_gamedig.sh rename to lgsm/modules/query_gamedig.sh index 265607acd..bbf24f5d7 --- a/lgsm/functions/query_gamedig.sh +++ b/lgsm/modules/query_gamedig.sh @@ -6,7 +6,7 @@ # Description: Querys a gameserver using node-gamedig. # https://github.com/sonicsnes/node-gamedig -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" querystatus="2" # Check if gamedig and jq are installed. if [ "$(command -v gamedig 2> /dev/null)" ] && [ "$(command -v jq 2> /dev/null)" ]; then diff --git a/lgsm/functions/query_gsquery.py b/lgsm/modules/query_gsquery.py old mode 100755 new mode 100644 similarity index 99% rename from lgsm/functions/query_gsquery.py rename to lgsm/modules/query_gsquery.py index 62c92082e..09bb147d9 --- a/lgsm/functions/query_gsquery.py +++ b/lgsm/modules/query_gsquery.py @@ -1,6 +1,6 @@ #! /usr/bin/env python3 # -*- coding: utf-8 -*- -# LinuxGSM query_gsquery.py function +# LinuxGSM query_gsquery.py module # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com diff --git a/lgsm/functions/update_factorio.sh b/lgsm/modules/update_factorio.sh similarity index 98% rename from lgsm/functions/update_factorio.sh rename to lgsm/modules/update_factorio.sh index 548d53b15..2d58f0cf9 100644 --- a/lgsm/functions/update_factorio.sh +++ b/lgsm/modules/update_factorio.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Handles updating of Factorio servers. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_dl() { # Download and extract files to serverfiles diff --git a/lgsm/functions/update_jediknight2.sh b/lgsm/modules/update_jediknight2.sh similarity index 98% rename from lgsm/functions/update_jediknight2.sh rename to lgsm/modules/update_jediknight2.sh index 7560f0158..8a6cd9bfc 100644 --- a/lgsm/functions/update_jediknight2.sh +++ b/lgsm/modules/update_jediknight2.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Handles updating of Jedi Knight 2 servers. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_dl() { # Download and extract files to serverfiles diff --git a/lgsm/functions/update_minecraft.sh b/lgsm/modules/update_minecraft.sh similarity index 98% rename from lgsm/functions/update_minecraft.sh rename to lgsm/modules/update_minecraft.sh index ace4713bc..69dc118b1 100644 --- a/lgsm/functions/update_minecraft.sh +++ b/lgsm/modules/update_minecraft.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Handles updating of Minecraft: Java Edition servers. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_dl() { # Download and extract files to serverfiles diff --git a/lgsm/functions/update_minecraft_bedrock.sh b/lgsm/modules/update_minecraft_bedrock.sh similarity index 98% rename from lgsm/functions/update_minecraft_bedrock.sh rename to lgsm/modules/update_minecraft_bedrock.sh index cf61e3a2b..a0d76aa20 100644 --- a/lgsm/functions/update_minecraft_bedrock.sh +++ b/lgsm/modules/update_minecraft_bedrock.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Handles updating of Minecraft Bedrock servers. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_dl() { fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "bedrock_server.${remotebuildversion}.zip" diff --git a/lgsm/functions/update_mta.sh b/lgsm/modules/update_mta.sh similarity index 98% rename from lgsm/functions/update_mta.sh rename to lgsm/modules/update_mta.sh index 5252c1328..16b8278c7 100644 --- a/lgsm/functions/update_mta.sh +++ b/lgsm/modules/update_mta.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Handles updating of Multi Theft Auto servers. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_dl() { # Download and extract files to tmpdir. diff --git a/lgsm/functions/update_papermc.sh b/lgsm/modules/update_papermc.sh similarity index 98% rename from lgsm/functions/update_papermc.sh rename to lgsm/modules/update_papermc.sh index f48a66e39..447f8808a 100644 --- a/lgsm/functions/update_papermc.sh +++ b/lgsm/modules/update_papermc.sh @@ -1,11 +1,11 @@ #!/bin/bash -# LinuxGSM update_papermc.sh function +# LinuxGSM update_papermc.sh module # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Handles updating of PaperMC and Waterfall servers. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_dl() { # Download and extract files to serverfiles diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/modules/update_steamcmd.sh similarity index 87% rename from lgsm/functions/update_steamcmd.sh rename to lgsm/modules/update_steamcmd.sh index eb773f016..401da43a8 100644 --- a/lgsm/functions/update_steamcmd.sh +++ b/lgsm/modules/update_steamcmd.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Handles updating using SteamCMD. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # init steamcmd functions core_steamcmd.sh @@ -18,7 +18,7 @@ fn_print_dots "${remotelocation}" if [ "${forceupdate}" == "1" ]; then # forceupdate bypasses update checks. - if [ "${status}" != "0" ]&&[ -v "${status}" ]; then + if [ "${status}" != "0" ] && [ -v "${status}" ]; then fn_print_restart_warning exitbypass=1 command_stop.sh diff --git a/lgsm/functions/update_ts3.sh b/lgsm/modules/update_ts3.sh similarity index 98% rename from lgsm/functions/update_ts3.sh rename to lgsm/modules/update_ts3.sh index e76609b2d..dc79090ed 100644 --- a/lgsm/functions/update_ts3.sh +++ b/lgsm/modules/update_ts3.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Handles updating of Teamspeak 3 servers. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_dl() { # Download and extract files to serverfiles diff --git a/lgsm/functions/update_ut99.sh b/lgsm/modules/update_ut99.sh similarity index 98% rename from lgsm/functions/update_ut99.sh rename to lgsm/modules/update_ut99.sh index b6db783e2..a1dc2b3dd 100644 --- a/lgsm/functions/update_ut99.sh +++ b/lgsm/modules/update_ut99.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Handles updating of Unreal Tournament 99 servers. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_dl() { # Download and extract files to serverfiles diff --git a/lgsm/functions/update_vintagestory.sh b/lgsm/modules/update_vintagestory.sh old mode 100755 new mode 100644 similarity index 98% rename from lgsm/functions/update_vintagestory.sh rename to lgsm/modules/update_vintagestory.sh index 84e3192c9..946b6ed0b --- a/lgsm/functions/update_vintagestory.sh +++ b/lgsm/modules/update_vintagestory.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Handles updating of Vintage Story servers. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_dl() { # Download and extract files to serverfiles diff --git a/linuxgsm.sh b/linuxgsm.sh index 3d8b7f376..dd7d51bb3 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -32,7 +32,7 @@ logdir="${rootdir}/log" lgsmlogdir="${logdir}/lgsm" steamcmddir="${HOME}/.steam/steamcmd" serverfiles="${rootdir}/serverfiles" -functionsdir="${lgsmdir}/functions" +modulesdir="${lgsmdir}/modules" tmpdir="${lgsmdir}/tmp" datadir="${lgsmdir}/data" lockdir="${lgsmdir}/lock" @@ -57,14 +57,14 @@ if [ ! "$(command -v curl 2> /dev/null)" ]; then exit 1 fi -# Core function that is required first. -core_functions.sh() { - functionfile="${FUNCNAME[0]}" - fn_bootstrap_fetch_file_github "lgsm/functions" "core_functions.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" +# Core module that is required first. +core_modules.sh() { + modulefile="${FUNCNAME[0]}" + fn_bootstrap_fetch_file_github "lgsm/modules" "core_modules.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nomd5" } # Bootstrap -# Fetches the core functions required before passed off to core_dl.sh. +# Fetches the core modules required before passed off to core_dl.sh. fn_bootstrap_fetch_file() { remote_fileurl="${1}" remote_fileurl_backup="${2}" @@ -183,7 +183,7 @@ fn_bootstrap_fetch_file_github() { run="${5:-0}" forcedl="${6:-0}" md5="${7:-0}" - # Passes vars to the file download function. + # Passes vars to the file download module. fn_bootstrap_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" } @@ -327,11 +327,11 @@ if [ "$(whoami)" == "root" ] && [ ! -f /.dockerenv ]; then echo -e "[ FAIL ] Do NOT run this script as root!" exit 1 fi - elif [ ! -f "${functionsdir}/core_functions.sh" ] || [ ! -f "${functionsdir}/check_root.sh" ] || [ ! -f "${functionsdir}/core_messages.sh" ]; then + elif [ ! -f "${modulesdir}/core_modules.sh" ] || [ ! -f "${modulesdir}/check_root.sh" ] || [ ! -f "${modulesdir}/core_messages.sh" ]; then echo -e "[ FAIL ] Do NOT run this script as root!" exit 1 else - core_functions.sh + core_modules.sh check_root.sh fi fi @@ -377,7 +377,7 @@ if [ "${shortname}" == "core" ]; then # LinuxGSM server mode. else - core_functions.sh + core_modules.sh if [ "${shortname}" != "core-dep" ]; then # Load LinuxGSM configs. # These are required to get all the default variables for the specific server. @@ -397,8 +397,8 @@ else echo -e "OK" fi else - function_file_diff=$(diff -q "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg") - if [ "${function_file_diff}" != "" ]; then + config_file_diff=$(diff -q "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg") + if [ "${config_file_diff}" != "" ]; then fn_print_warn_nl "_default.cfg has altered. reloading config." echo -en "copying _default.cfg...\c" cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index b9ca2789a..97981c0cc 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -32,7 +32,7 @@ logdir="${rootdir}/log" lgsmlogdir="${logdir}/lgsm" steamcmddir="${HOME}/.steam/steamcmd" serverfiles="${rootdir}/serverfiles" -functionsdir="${lgsmdir}/functions" +modulesdir="${lgsmdir}/modules" tmpdir="${lgsmdir}/tmp" datadir="${lgsmdir}/data" lockdir="${lgsmdir}/lock" @@ -51,20 +51,20 @@ if [ -z "${TRAVIS}" ]; then fi travistest="1" ## GitHub Branch Select -# Allows for the use of different function files +# Allows for the use of different module files # from a different repo and/or branch. githubuser="GameServerManagers" githubrepo="LinuxGSM" githubbranch="${TRAVIS_BRANCH}" -# Core function that is required first. -core_functions.sh() { - functionfile="${FUNCNAME[0]}" - fn_bootstrap_fetch_file_github "lgsm/functions" "core_functions.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" +# Core module that is required first. +core_modules.sh() { + modulefile="${FUNCNAME[0]}" + fn_bootstrap_fetch_file_github "lgsm/modules" "core_modules.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" } # Bootstrap -# Fetches the core functions required before passed off to core_dl.sh. +# Fetches the core modules required before passed off to core_dl.sh. fn_bootstrap_fetch_file() { remote_fileurl="${1}" remote_fileurl_backup="${2}" @@ -183,7 +183,7 @@ fn_bootstrap_fetch_file_github() { run="${5:-0}" forcedl="${6:-0}" md5="${7:-0}" - # Passes vars to the file download function. + # Passes vars to the file download module. fn_bootstrap_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" } @@ -327,11 +327,11 @@ if [ "$(whoami)" == "root" ]; then echo -e "[ FAIL ] Do NOT run this script as root!" exit 1 fi - elif [ ! -f "${functionsdir}/core_functions.sh" ] || [ ! -f "${functionsdir}/check_root.sh" ] || [ ! -f "${functionsdir}/core_messages.sh" ]; then + elif [ ! -f "${modulesdir}/core_modules.sh" ] || [ ! -f "${modulesdir}/check_root.sh" ] || [ ! -f "${modulesdir}/core_messages.sh" ]; then echo -e "[ FAIL ] Do NOT run this script as root!" exit 1 else - core_functions.sh + core_modules.sh check_root.sh fi fi @@ -377,7 +377,7 @@ if [ "${shortname}" == "core" ]; then # LinuxGSM server mode. else - core_functions.sh + core_modules.sh if [ "${shortname}" != "core-dep" ]; then # Load LinuxGSM configs. # These are required to get all the default variables for the specific server. @@ -398,8 +398,8 @@ else echo -e "OK" fi else - function_file_diff=$(diff -q "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg") - if [ "${function_file_diff}" != "" ]; then + module_file_diff=$(diff -q "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg") + if [ "${module_file_diff}" != "" ]; then fn_print_warn_nl "_default.cfg has been altered. reloading config." echo -en "copying _default.cfg...\c" cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" @@ -636,7 +636,7 @@ echo -e "" ) echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "0.2 - Enable dev-debug" @@ -653,7 +653,7 @@ echo -e "" fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "1.0 - Pre-install tests" @@ -681,7 +681,7 @@ fi echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "1.2 - getopt" @@ -699,7 +699,7 @@ echo -e "" fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "1.3 - getopt with incorrect args" @@ -718,7 +718,7 @@ getopt="abc123" fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "2.0 - Installation" @@ -739,7 +739,7 @@ echo -e "Command: ./${gameservername} auto-install" fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "3.0 - Start/Stop/Restart Tests" @@ -762,7 +762,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "3.2 - start - online" @@ -781,7 +781,7 @@ fn_setstatus fn_test_result_fail echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "3.3 - start - updateonstart" @@ -801,7 +801,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "3.4 - stop" @@ -820,7 +820,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "3.5 - stop - offline" @@ -839,7 +839,7 @@ fn_setstatus fn_test_result_fail echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "3.6 - restart" @@ -858,7 +858,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "3.7 - restart - offline" @@ -877,7 +877,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "4.0 - Update Tests" @@ -900,7 +900,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "4.2 - update-lgsm" @@ -920,7 +920,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "5.0 - Monitor Tests" @@ -947,7 +947,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "5.2 - monitor - offline - with lockfile" @@ -970,7 +970,7 @@ echo "${port}" >> "${lockdir}/${selfname}.lock" fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "5.3 - monitor - offline - no lockfile" @@ -989,7 +989,7 @@ fn_setstatus fn_test_result_fail echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "5.4 - test-alert" @@ -1008,7 +1008,7 @@ fn_setstatus fn_test_result_fail echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "6.0 - Details Tests" @@ -1031,7 +1031,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "6.2 - postdetails" @@ -1050,7 +1050,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "7.0 - Backup Tests" @@ -1069,7 +1069,7 @@ echo -e "test de-activated until issue #1839 fixed" fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "8.0 - Development Tools Tests" @@ -1092,7 +1092,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "8.2 - dev - detect ldd" @@ -1111,7 +1111,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "8.3 - dev - detect deps" @@ -1130,7 +1130,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "8.4 - dev - query-raw" @@ -1149,7 +1149,7 @@ fn_setstatus fn_test_result_na echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" @@ -1173,7 +1173,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "=================================" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 5c2787086..57dd28cc8 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -32,7 +32,7 @@ logdir="${rootdir}/log" lgsmlogdir="${logdir}/lgsm" steamcmddir="${HOME}/.steam/steamcmd" serverfiles="${rootdir}/serverfiles" -functionsdir="${lgsmdir}/functions" +modulesdir="${lgsmdir}/modules" tmpdir="${lgsmdir}/tmp" datadir="${lgsmdir}/data" lockdir="${lgsmdir}/lock" @@ -52,20 +52,20 @@ fi travistest="1" ## GitHub Branch Select -# Allows for the use of different function files +# Allows for the use of different module files # from a different repo and/or branch. githubuser="GameServerManagers" githubrepo="LinuxGSM" githubbranch="${TRAVIS_BRANCH}" -# Core function that is required first. -core_functions.sh() { - functionfile="${FUNCNAME[0]}" - fn_bootstrap_fetch_file_github "lgsm/functions" "core_functions.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" +# Core module that is required first. +core_modules.sh() { + modulefile="${FUNCNAME[0]}" + fn_bootstrap_fetch_file_github "lgsm/modules" "core_modules.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" } # Bootstrap -# Fetches the core functions required before passed off to core_dl.sh. +# Fetches the core modules required before passed off to core_dl.sh. fn_bootstrap_fetch_file() { remote_fileurl="${1}" remote_fileurl_backup="${2}" @@ -184,7 +184,7 @@ fn_bootstrap_fetch_file_github() { run="${5:-0}" forcedl="${6:-0}" md5="${7:-0}" - # Passes vars to the file download function. + # Passes vars to the file download module. fn_bootstrap_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" } @@ -328,11 +328,11 @@ if [ "$(whoami)" == "root" ]; then echo -e "[ FAIL ] Do NOT run this script as root!" exit 1 fi - elif [ ! -f "${functionsdir}/core_functions.sh" ] || [ ! -f "${functionsdir}/check_root.sh" ] || [ ! -f "${functionsdir}/core_messages.sh" ]; then + elif [ ! -f "${modulesdir}/core_modules.sh" ] || [ ! -f "${modulesdir}/check_root.sh" ] || [ ! -f "${modulesdir}/core_messages.sh" ]; then echo -e "[ FAIL ] Do NOT run this script as root!" exit 1 else - core_functions.sh + core_modules.sh check_root.sh fi fi @@ -378,7 +378,7 @@ if [ "${shortname}" == "core" ]; then # LinuxGSM server mode. else - core_functions.sh + core_modules.sh if [ "${shortname}" != "core-dep" ]; then # Load LinuxGSM configs. # These are required to get all the default variables for the specific server. @@ -399,8 +399,8 @@ else echo -e "OK" fi else - function_file_diff=$(diff -q "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg") - if [ "${function_file_diff}" != "" ]; then + module_file_diff=$(diff -q "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg") + if [ "${module_file_diff}" != "" ]; then fn_print_warn_nl "_default.cfg has been altered. reloading config." echo -en "copying _default.cfg...\c" cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" @@ -641,7 +641,7 @@ echo -e "" ) echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "0.2 - Enable dev-debug" @@ -658,7 +658,7 @@ echo -e "" fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "1.0 - Pre-install tests" @@ -686,7 +686,7 @@ fi echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "1.2 - getopt" @@ -704,7 +704,7 @@ echo -e "" fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "1.3 - getopt with incorrect args" @@ -723,7 +723,7 @@ getopt="abc123" fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "2.0 - Installation" @@ -744,7 +744,7 @@ echo -e "Command: ./${gameservername} auto-install" fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "3.0 - Start/Stop/Restart Tests" @@ -767,7 +767,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "3.2 - start - online" @@ -786,7 +786,7 @@ fn_setstatus fn_test_result_fail echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "3.3 - start - updateonstart" @@ -806,7 +806,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "3.4 - stop" @@ -825,7 +825,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "3.5 - stop - offline" @@ -844,7 +844,7 @@ fn_setstatus fn_test_result_fail echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "3.6 - restart" @@ -863,7 +863,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "3.7 - restart - offline" @@ -882,7 +882,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "4.0 - Update Tests" @@ -905,7 +905,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "4.2 - update - change buildid" @@ -926,7 +926,7 @@ sed -i 's/[0-9]\+/0/' "${serverfiles}/steamapps/appmanifest_${appid}.acf" fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "4.3 - update - change buildid - online" @@ -947,7 +947,7 @@ sed -i 's/[0-9]\+/0/' "${serverfiles}/steamapps/appmanifest_${appid}.acf" fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "4.4 - update - remove appmanifest file" @@ -968,7 +968,7 @@ rm --verbose "${serverfiles:?}/steamapps/appmanifest_${appid}.acf" fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "4.5 - force-update" @@ -988,7 +988,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "4.6 - force-update - online" @@ -1008,7 +1008,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "4.7 - validate" @@ -1027,7 +1027,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "4.8 - validate - online" @@ -1047,7 +1047,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "4.9 - update-lgsm" @@ -1067,7 +1067,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "Inserting IP address" @@ -1108,7 +1108,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "5.2 - monitor - offline - with lockfile" @@ -1131,7 +1131,7 @@ echo "${port}" >> "${lockdir}/${selfname}.lock" fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "5.3 - monitor - offline - no lockfile" @@ -1150,7 +1150,7 @@ fn_setstatus fn_test_result_fail echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "5.4 - test-alert" @@ -1171,7 +1171,7 @@ sed -i 's/[0-9]\+/0/' "${servercfgfullpath}" fn_test_result_fail echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" fn_print_info_nl "Re-generating ${servercfg}." @@ -1199,7 +1199,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "6.2 - postdetails" @@ -1218,7 +1218,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "7.0 - Backup Tests" @@ -1237,7 +1237,7 @@ echo -e "test de-activated until issue #1839 fixed" fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "8.0 - Development Tools Tests" @@ -1260,7 +1260,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "8.2 - dev - detect ldd" @@ -1279,7 +1279,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "8.3 - dev - detect deps" @@ -1298,7 +1298,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "8.4 - dev - query-raw" @@ -1317,7 +1317,7 @@ fn_setstatus fn_test_result_na echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "9.0 - Sponsor" @@ -1340,7 +1340,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "=================================" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 05676ad2f..a32ffd8f5 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -32,7 +32,7 @@ logdir="${rootdir}/log" lgsmlogdir="${logdir}/lgsm" steamcmddir="${HOME}/.steam/steamcmd" serverfiles="${rootdir}/serverfiles" -functionsdir="${lgsmdir}/functions" +modulesdir="${lgsmdir}/modules" tmpdir="${lgsmdir}/tmp" datadir="${lgsmdir}/data" lockdir="${lgsmdir}/lock" @@ -52,20 +52,20 @@ fi travistest="1" ## GitHub Branch Select -# Allows for the use of different function files +# Allows for the use of different module files # from a different repo and/or branch. githubuser="GameServerManagers" githubrepo="LinuxGSM" githubbranch="${TRAVIS_BRANCH}" -# Core function that is required first. -core_functions.sh() { - functionfile="${FUNCNAME[0]}" - fn_bootstrap_fetch_file_github "lgsm/functions" "core_functions.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" +# Core module that is required first. +core_modules.sh() { + modulefile="${FUNCNAME[0]}" + fn_bootstrap_fetch_file_github "lgsm/modules" "core_modules.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" } # Bootstrap -# Fetches the core functions required before passed off to core_dl.sh. +# Fetches the core modules required before passed off to core_dl.sh. fn_bootstrap_fetch_file() { remote_fileurl="${1}" remote_fileurl_backup="${2}" @@ -184,7 +184,7 @@ fn_bootstrap_fetch_file_github() { run="${5:-0}" forcedl="${6:-0}" md5="${7:-0}" - # Passes vars to the file download function. + # Passes vars to the file download module. fn_bootstrap_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" } @@ -328,11 +328,11 @@ if [ "$(whoami)" == "root" ]; then echo -e "[ FAIL ] Do NOT run this script as root!" exit 1 fi - elif [ ! -f "${functionsdir}/core_functions.sh" ] || [ ! -f "${functionsdir}/check_root.sh" ] || [ ! -f "${functionsdir}/core_messages.sh" ]; then + elif [ ! -f "${modulesdir}/core_modules.sh" ] || [ ! -f "${modulesdir}/check_root.sh" ] || [ ! -f "${modulesdir}/core_messages.sh" ]; then echo -e "[ FAIL ] Do NOT run this script as root!" exit 1 else - core_functions.sh + core_modules.sh check_root.sh fi fi @@ -378,7 +378,7 @@ if [ "${shortname}" == "core" ]; then # LinuxGSM server mode. else - core_functions.sh + core_modules.sh if [ "${shortname}" != "core-dep" ]; then # Load LinuxGSM configs. # These are required to get all the default variables for the specific server. @@ -399,8 +399,8 @@ else echo -e "OK" fi else - function_file_diff=$(diff -q "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg") - if [ "${function_file_diff}" != "" ]; then + module_file_diff=$(diff -q "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg") + if [ "${module_file_diff}" != "" ]; then fn_print_warn_nl "_default.cfg has been altered. reloading config." echo -en "copying _default.cfg...\c" cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" @@ -635,7 +635,7 @@ echo -e "" ) echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "0.2 - Enable dev-debug" @@ -652,7 +652,7 @@ echo -e "" fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "1.0 - Pre-install tests" @@ -680,7 +680,7 @@ fi echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "1.2 - getopt" @@ -698,7 +698,7 @@ echo -e "" fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "1.3 - getopt with incorrect args" @@ -717,7 +717,7 @@ getopt="abc123" fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "2.0 - Installation" @@ -738,7 +738,7 @@ echo -e "Command: ./${gameservername} auto-install" fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "3.0 - Start/Stop/Restart Tests" @@ -761,7 +761,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "3.2 - start - online" @@ -780,7 +780,7 @@ fn_setstatus fn_test_result_fail echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "3.3 - start - updateonstart" @@ -800,7 +800,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "30s Pause" echo -e "=================================" @@ -828,7 +828,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "3.5 - stop - offline" @@ -847,7 +847,7 @@ fn_setstatus fn_test_result_fail echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "3.6 - restart" @@ -866,7 +866,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "3.7 - restart - offline" @@ -885,7 +885,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "4.0 - Update Tests" @@ -908,7 +908,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "4.2 - update-lgsm" @@ -928,7 +928,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "Inserting IP address" @@ -979,7 +979,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "5.2 - monitor - offline - with lockfile" @@ -1002,7 +1002,7 @@ echo "${port}" >> "${lockdir}/${selfname}.lock" fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "5.3 - monitor - offline - no lockfile" @@ -1021,7 +1021,7 @@ fn_setstatus fn_test_result_fail echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "5.4 - test-alert" @@ -1040,7 +1040,7 @@ fn_setstatus fn_test_result_fail echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "6.0 - Details Tests" @@ -1063,7 +1063,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "6.2 - postdetails" @@ -1082,7 +1082,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "7.0 - Backup Tests" @@ -1101,7 +1101,7 @@ echo -e "test de-activated until issue #1839 fixed" fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "8.0 - Development Tools Tests" @@ -1124,7 +1124,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "8.2 - dev - detect ldd" @@ -1143,7 +1143,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "8.3 - dev - detect deps" @@ -1162,7 +1162,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "Inserting IP address" @@ -1195,7 +1195,7 @@ fn_setstatus fn_test_result_na echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "9.0 - Sponsor" @@ -1218,7 +1218,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "=================================" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 1f553fd51..7d7ed7180 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -32,7 +32,7 @@ logdir="${rootdir}/log" lgsmlogdir="${logdir}/lgsm" steamcmddir="${HOME}/.steam/steamcmd" serverfiles="${rootdir}/serverfiles" -functionsdir="${lgsmdir}/functions" +modulesdir="${lgsmdir}/modules" tmpdir="${lgsmdir}/tmp" datadir="${lgsmdir}/data" lockdir="${lgsmdir}/lock" @@ -52,20 +52,20 @@ fi travistest="1" ## GitHub Branch Select -# Allows for the use of different function files +# Allows for the use of different module files # from a different repo and/or branch. githubuser="GameServerManagers" githubrepo="LinuxGSM" githubbranch="${TRAVIS_BRANCH}" -# Core function that is required first. -core_functions.sh() { - functionfile="${FUNCNAME[0]}" - fn_bootstrap_fetch_file_github "lgsm/functions" "core_functions.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" +# Core module that is required first. +core_modules.sh() { + modulefile="${FUNCNAME[0]}" + fn_bootstrap_fetch_file_github "lgsm/modules" "core_modules.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" } # Bootstrap -# Fetches the core functions required before passed off to core_dl.sh. +# Fetches the core modules required before passed off to core_dl.sh. fn_bootstrap_fetch_file() { remote_fileurl="${1}" remote_fileurl_backup="${2}" @@ -184,7 +184,7 @@ fn_bootstrap_fetch_file_github() { run="${5:-0}" forcedl="${6:-0}" md5="${7:-0}" - # Passes vars to the file download function. + # Passes vars to the file download module. fn_bootstrap_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" } @@ -328,11 +328,11 @@ if [ "$(whoami)" == "root" ]; then echo -e "[ FAIL ] Do NOT run this script as root!" exit 1 fi - elif [ ! -f "${functionsdir}/core_functions.sh" ] || [ ! -f "${functionsdir}/check_root.sh" ] || [ ! -f "${functionsdir}/core_messages.sh" ]; then + elif [ ! -f "${modulesdir}/core_modules.sh" ] || [ ! -f "${modulesdir}/check_root.sh" ] || [ ! -f "${modulesdir}/core_messages.sh" ]; then echo -e "[ FAIL ] Do NOT run this script as root!" exit 1 else - core_functions.sh + core_modules.sh check_root.sh fi fi @@ -378,7 +378,7 @@ if [ "${shortname}" == "core" ]; then # LinuxGSM server mode. else - core_functions.sh + core_modules.sh if [ "${shortname}" != "core-dep" ]; then # Load LinuxGSM configs. # These are required to get all the default variables for the specific server. @@ -399,8 +399,8 @@ else echo -e "OK" fi else - function_file_diff=$(diff -q "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg") - if [ "${function_file_diff}" != "" ]; then + module_file_diff=$(diff -q "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg") + if [ "${module_file_diff}" != "" ]; then fn_print_warn_nl "_default.cfg has been altered. reloading config." echo -en "copying _default.cfg...\c" cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" @@ -635,7 +635,7 @@ echo -e "" ) echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "0.2 - Enable dev-debug" @@ -652,7 +652,7 @@ echo -e "" fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "1.0 - Pre-install tests" @@ -680,7 +680,7 @@ fi echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "1.2 - getopt" @@ -698,7 +698,7 @@ echo -e "" fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "1.3 - getopt with incorrect args" @@ -717,7 +717,7 @@ getopt="abc123" fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "2.0 - Installation" @@ -738,7 +738,7 @@ echo -e "Command: ./${gameservername} auto-install" fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "3.0 - Start/Stop/Restart Tests" @@ -761,7 +761,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "3.2 - start - online" @@ -780,7 +780,7 @@ fn_setstatus fn_test_result_fail echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "3.3 - start - updateonstart" @@ -800,7 +800,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "3.4 - stop" @@ -819,7 +819,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "3.5 - stop - offline" @@ -838,7 +838,7 @@ fn_setstatus fn_test_result_fail echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "3.6 - restart" @@ -857,7 +857,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "3.7 - restart - offline" @@ -876,7 +876,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "4.0 - Update Tests" @@ -899,7 +899,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "4.2 - update-lgsm" @@ -919,7 +919,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "5.0 - Monitor Tests" @@ -946,7 +946,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "5.2 - monitor - offline - with lockfile" @@ -969,7 +969,7 @@ echo "${port}" >> "${lockdir}/${selfname}.lock" fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "5.3 - monitor - offline - no lockfile" @@ -988,7 +988,7 @@ fn_setstatus fn_test_result_fail echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "5.4 - test-alert" @@ -1007,7 +1007,7 @@ fn_setstatus fn_test_result_fail echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "6.0 - Details Tests" @@ -1030,7 +1030,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "6.2 - postdetails" @@ -1049,7 +1049,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "7.0 - Backup Tests" @@ -1068,7 +1068,7 @@ echo -e "test de-activated until issue #1839 fixed" fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "8.0 - Development Tools Tests" @@ -1091,7 +1091,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "8.2 - dev - detect ldd" @@ -1110,7 +1110,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "8.3 - dev - detect deps" @@ -1129,7 +1129,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "8.4 - dev - query-raw" @@ -1148,7 +1148,7 @@ fn_setstatus fn_test_result_na echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "9.0 - Sponsor" @@ -1171,7 +1171,7 @@ fn_setstatus fn_test_result_pass echo -e "run order" echo -e "=================" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' +grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' echo -e "" echo -e "=================================" From aa4f75c9a3842001a2628c424a61d7fe33bcfa7e Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 6 Apr 2023 21:57:05 +0100 Subject: [PATCH 121/374] chore: fix issue with vscode prettier --- .prettierrc.json => .prettierrc | 0 .vscode/extensions.json | 1 - 2 files changed, 1 deletion(-) rename .prettierrc.json => .prettierrc (100%) diff --git a/.prettierrc.json b/.prettierrc similarity index 100% rename from .prettierrc.json rename to .prettierrc diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 0c9982e65..c7a7dab10 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -5,7 +5,6 @@ "yzhang.markdown-all-in-one", "esbenp.prettier-vscode", "timonwong.shellcheck", - "foxundermoon.shell-format", "redhat.vscode-yaml" ] } From ed1fbbecdf7706035fe4edbcec527fd9ca5272ce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Apr 2023 21:57:58 +0100 Subject: [PATCH 122/374] build(deps): bump actions/add-to-project from 0.4.1 to 0.5.0 (#4167) Bumps [actions/add-to-project](https://github.com/actions/add-to-project) from 0.4.1 to 0.5.0. - [Release notes](https://github.com/actions/add-to-project/releases) - [Commits](https://github.com/actions/add-to-project/compare/v0.4.1...v0.5.0) --- updated-dependencies: - dependency-name: actions/add-to-project dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: Daniel Gibbs Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/add-to-project.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/add-to-project.yml b/.github/workflows/add-to-project.yml index 8e71d1cb5..1a20ef190 100644 --- a/.github/workflows/add-to-project.yml +++ b/.github/workflows/add-to-project.yml @@ -10,7 +10,7 @@ jobs: name: Add game server requests to project runs-on: ubuntu-latest steps: - - uses: actions/add-to-project@v0.4.1 + - uses: actions/add-to-project@v0.5.0 with: project-url: https://github.com/orgs/GameServerManagers/projects/11 github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} From 8e3dfa1030aa9e787549045ae78e588e4216d4b0 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 8 Apr 2023 13:11:46 +0100 Subject: [PATCH 123/374] fix: add command_update_linuxgsm.sh to functions dir --- lgsm/functions/command_update_linuxgsm.sh | 236 ++++++++++++++++++++++ 1 file changed, 236 insertions(+) create mode 100644 lgsm/functions/command_update_linuxgsm.sh diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh new file mode 100644 index 000000000..3c4e6d080 --- /dev/null +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -0,0 +1,236 @@ +#!/bin/bash +# LinuxGSM command_update_linuxgsm.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Deletes the modules dir to allow re-downloading of modules from GitHub. + +commandname="UPDATE-LGSM" +commandaction="Updating LinuxGSM" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +check.sh +info_distro.sh + +fn_print_dots "" +fn_script_log_info "Updating LinuxGSM" + +fn_print_dots "Selecting repo" +fn_script_log_info "Selecting repo" +# Select remotereponame +curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh" 1> /dev/null +if [ $? != "0" ]; then + curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh" 1> /dev/null + if [ $? != "0" ]; then + fn_print_fail_nl "Selecting repo: Unable to to access GitHub or Bitbucket repositories" + fn_script_log_fatal "Selecting repo: Unable to to access GitHub or Bitbucket repositories" + core_exit.sh + else + remotereponame="Bitbucket" + fn_print_ok_nl "Selecting repo: ${remotereponame}" + fi +else + remotereponame="GitHub" + fn_print_ok_nl "Selecting repo: ${remotereponame}" +fi + +# Check linuxsm.sh +echo -en "checking ${remotereponame} linuxgsm.sh...\c" +if [ "${remotereponame}" == "GitHub" ]; then + curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh" 1> /dev/null +else + curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh" 1> /dev/null +fi +if [ $? != "0" ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "Checking ${remotereponame} linuxgsm.sh" + fn_script_log_fatal "Curl returned error: $?" + core_exit.sh +fi + +if [ "${remotereponame}" == "GitHub" ]; then + tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(curl --connect-timeout 10 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh")) +else + tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(curl --connect-timeout 10 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh")) +fi + +if [ "${tmp_script_diff}" != "" ]; then + fn_print_update_eol_nl + fn_script_log_update "Checking ${remotereponame} linuxgsm.sh" + rm -f "${tmpdir:?}/linuxgsm.sh" + fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "nochmodx" "norun" "noforcedl" "nohash" +else + fn_print_ok_eol_nl + fn_script_log_pass "Checking ${remotereponame} linuxgsm.sh" +fi + +# Check gameserver.sh +# Compare gameserver.sh against linuxgsm.sh in the tmp dir. +# Ignoring server specific vars. +echo -en "checking ${selfname}...\c" +fn_script_log_info "Checking ${selfname}" +script_diff=$(diff <(sed '\/shortname/d;\/gameservername/d;\/gamename/d;\/githubuser/d;\/githubrepo/d;\/githubbranch/d' "${tmpdir}/linuxgsm.sh") <(sed '\/shortname/d;\/gameservername/d;\/gamename/d;\/githubuser/d;\/githubrepo/d;\/githubbranch/d' "${rootdir}/${selfname}")) +if [ "${script_diff}" != "" ]; then + fn_print_update_eol_nl + fn_script_log_update "Checking ${selfname}" + echo -en "backup ${selfname}...\c" + fn_script_log_info "Backup ${selfname}" + if [ ! -d "${backupdir}/script" ]; then + mkdir -p "${backupdir}/script" + fi + cp "${rootdir}/${selfname}" "${backupdir}/script/${selfname}-$(date +"%m_%d_%Y_%M").bak" + if [ $? != 0 ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "Backup ${selfname}" + core_exit.sh + else + fn_print_ok_eol_nl + fn_script_log_pass "Backup ${selfname}" + echo -e "backup location ${backupdir}/script/${selfname}-$(date +"%m_%d_%Y_%M").bak" + fn_script_log_pass "Backup location ${backupdir}/script/${selfname}-$(date +"%m_%d_%Y_%M").bak" + fi + + echo -en "copying ${selfname}...\c" + fn_script_log_info "copying ${selfname}" + cp "${tmpdir}/linuxgsm.sh" "${rootdir}/${selfname}" + sed -i "s+shortname=\"core\"+shortname=\"${shortname}\"+g" "${rootdir}/${selfname}" + sed -i "s+gameservername=\"core\"+gameservername=\"${gameservername}\"+g" "${rootdir}/${selfname}" + sed -i "s+gamename=\"core\"+gamename=\"${gamename}\"+g" "${rootdir}/${selfname}" + sed -i "s+githubuser=\"GameServerManagers\"+githubuser=\"${githubuser}\"+g" "${rootdir}/${selfname}" + sed -i "s+githubrepo=\"LinuxGSM\"+githubrepo=\"${githubrepo}\"+g" "${rootdir}/${selfname}" + sed -i "s+githubbranch=\"master\"+githubbranch=\"${githubbranch}\"+g" "${rootdir}/${selfname}" + + if [ $? != "0" ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "copying ${selfname}" + core_exit.sh + else + fn_print_ok_eol_nl + fn_script_log_pass "copying ${selfname}" + fi +else + fn_print_ok_eol_nl + fn_script_log_info "Checking ${selfname}" +fi + +# Check _default.cfg. +echo -en "checking ${remotereponame} config _default.cfg...\c" +fn_script_log_info "Checking ${remotereponame} config _default.cfg" +if [ "${remotereponame}" == "GitHub" ]; then + curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg" 1> /dev/null +else + curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg" 1> /dev/null +fi +if [ $? != "0" ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "Checking ${remotereponame} config _default.cfg" + fn_script_log_fatal "Curl returned error: $?" + core_exit.sh +fi + +if [ "${remotereponame}" == "GitHub" ]; then + config_file_diff=$(diff "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" <(curl --connect-timeout 10 -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 --connect-timeout 10 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg")) +fi + +if [ "${config_file_diff}" != "" ]; then + fn_print_update_eol_nl + fn_script_log_update "Checking ${remotereponame} config _default.cfg" + rm -f "${configdirdefault:?}/config-lgsm/${gameservername:?}/_default.cfg" + fn_fetch_file_github "lgsm/config-default/config-lgsm/${gameservername}" "_default.cfg" "${configdirdefault}/config-lgsm/${gameservername}" "nochmodx" "norun" "noforce" "nohash" + alert="config" + alert.sh +else + fn_print_ok_eol_nl + fn_script_log_pass "Checking ${remotereponame} config _default.cfg" +fi + +# Check distro csv. ${datadir}/${distroid}-${distroversioncsv}.csv +if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then + echo -en "checking ${remotereponame} config ${distroid}-${distroversioncsv}.csv...\c" + fn_script_log_info "Checking ${remotereponame} ${distroid}-${distroversioncsv}.csv" + if [ "${remotereponame}" == "GitHub" ]; then + curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv" 1> /dev/null + else + curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv" 1> /dev/null + fi + if [ $? != "0" ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "Checking ${remotereponame} ${distroid}-${distroversioncsv}.csv" + fn_script_log_fatal "Curl returned error: $?" + core_exit.sh + fi + + if [ "${remotereponame}" == "GitHub" ]; then + config_file_diff=$(diff "${datadir}/${distroid}-${distroversioncsv}.csv" <(curl --connect-timeout 10 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv")) + else + config_file_diff=$(diff "${datadir}/${distroid}-${distroversioncsv}.csv" <(curl --connect-timeout 10 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv")) + fi + + if [ "${config_file_diff}" != "" ]; then + fn_print_update_eol_nl + fn_script_log_update "Checking ${remotereponame} ${distroid}-${distroversioncsv}.csv" + rm -f "${datadir:?}/${distroid}-${distroversioncsv}.csv" + fn_fetch_file_github "lgsm/data" "${distroid}-${distroversioncsv}.csv" "${datadir}" "nochmodx" "norun" "noforce" "nohash" + else + fn_print_ok_eol_nl + fn_script_log_pass "Checking ${remotereponame} ${distroid}-${distroversioncsv}.csv" + fi +fi +# Check and update modules. +if [ -n "${modulesdir}" ]; then + if [ -d "${modulesdir}" ]; then + ( + cd "${modulesdir}" || exit + for modulefile in *; do + # check if module exists in the repo and remove if missing. + # commonly used if module names change. + echo -en "checking ${remotereponame} module ${modulefile}...\c" + github_file_url_dir="lgsm/modules" + if [ "${remotereponame}" == "GitHub" ]; then + curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${modulefile}" 1> /dev/null + else + curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${modulefile}" 1> /dev/null + fi + if [ $? != 0 ]; then + fn_print_error_eol_nl + fn_script_log_error "Checking ${remotereponame} module ${modulefile}" + echo -en "removing module ${modulefile}...\c" + if ! rm -f "${modulefile:?}"; then + fn_print_fail_eol_nl + fn_script_log_fatal "Removing module ${modulefile}" + core_exit.sh + else + fn_print_ok_eol_nl + fn_script_log_pass "Removing module ${modulefile}" + fi + else + # compare file + if [ "${remotereponame}" == "GitHub" ]; then + module_file_diff=$(diff "${modulesdir}/${modulefile}" <(curl --connect-timeout 10 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${modulefile}")) + else + module_file_diff=$(diff "${modulesdir}/${modulefile}" <(curl --connect-timeout 10 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${modulefile}")) + fi + + # results + if [ "${module_file_diff}" != "" ]; then + fn_print_update_eol_nl + fn_script_log_update "Checking ${remotereponame} module ${modulefile}" + rm -rf "${modulesdir:?}/${modulefile}" + fn_update_module + else + fn_print_ok_eol_nl + fn_script_log_pass "Checking ${remotereponame} module ${modulefile}" + fi + fi + done + ) + fi +fi + +fn_print_ok_nl "Updating modules" +fn_script_log_pass "Updating modules" + +core_exit.sh From 0720a79b472b5eea2baab4c9f486c7b1d7a7f8e5 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 Apr 2023 11:09:04 +0100 Subject: [PATCH 124/374] fix(mc): correct variable name --- lgsm/functions/update_minecraft.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/update_minecraft.sh b/lgsm/functions/update_minecraft.sh index ace4713bc..04b4e9d04 100644 --- a/lgsm/functions/update_minecraft.sh +++ b/lgsm/functions/update_minecraft.sh @@ -16,7 +16,7 @@ fn_update_localbuild() { # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" # Uses executable to get local build. - if [ -d "${exutabledir}" ]; then + if [ -d "${executabledir}" ]; then cd "${executabledir}" || exit localbuild=$(unzip -p "minecraft_server.jar" version.json | jq -r '.id') fi From 0172ed608a63ab367e73138bc3678d153389c016 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 Apr 2023 11:10:33 +0100 Subject: [PATCH 125/374] Release v23.2.1 --- lgsm/functions/core_functions.sh | 2 +- linuxgsm.sh | 2 +- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index aa8a43659..75e5f4f35 100755 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -8,7 +8,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.2.0" +modulesversion="v23.2.1" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index 3d8b7f376..b116f957f 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.2.0" +version="v23.2.1" shortname="core" gameservername="core" commandname="CORE" diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index 36060b0fe..0071e24f8 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.2.0" +version="v23.2.1" shortname="fctr" gameservername="fctrserver" commandname="CORE" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index fde725412..07e31417f 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.2.0" +version="v23.2.1" shortname="jc2" gameservername="jc2server" commandname="CORE" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 006cc38a2..78301e39d 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.2.0" +version="v23.2.1" shortname="mc" gameservername="mcserver" commandname="CORE" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 40c7d3787..75464d9ae 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.2.0" +version="v23.2.1" shortname="ts3" gameservername="ts3server" commandname="CORE" From d28a0e74d2529e2216f30840efa28084fe534817 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 Apr 2023 13:37:57 +0100 Subject: [PATCH 127/374] fix(update): incorrect variable name (#4179) --- lgsm/functions/update_factorio.sh | 2 +- lgsm/functions/update_vintagestory.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/update_factorio.sh b/lgsm/functions/update_factorio.sh index 548d53b15..3fad63416 100644 --- a/lgsm/functions/update_factorio.sh +++ b/lgsm/functions/update_factorio.sh @@ -18,7 +18,7 @@ fn_update_localbuild() { # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" # Uses executable to get local build. - if [ -d "${exutabledir}" ]; then + if [ -d "${executabledir}" ]; then cd "${executabledir}" || exit localbuild=$(${executable} --version | grep "Version:" | awk '{print $2}') fi diff --git a/lgsm/functions/update_vintagestory.sh b/lgsm/functions/update_vintagestory.sh index 84e3192c9..67b6e1a3d 100755 --- a/lgsm/functions/update_vintagestory.sh +++ b/lgsm/functions/update_vintagestory.sh @@ -18,7 +18,7 @@ fn_update_localbuild() { # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" # Uses executable to get local build. - if [ -d "${exutabledir}" ]; then + if [ -d "${executabledir}" ]; then cd "${executabledir}" || exit localbuild="$(${preexecutable} ${executable} --version | sed '/^[[:space:]]*$/d')" fi From 818015d18971cd4e1b59211d0ff522518b099a22 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 Apr 2023 13:38:48 +0100 Subject: [PATCH 128/374] fix(check-update): not getting steamcmd executable for check-update (#4180) --- lgsm/functions/check.sh | 2 +- lgsm/functions/command_check_update.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/check.sh b/lgsm/functions/check.sh index 239a24140..0f1e12368 100755 --- a/lgsm/functions/check.sh +++ b/lgsm/functions/check.sh @@ -77,7 +77,7 @@ for allowed_command in "${allowed_commands_array[@]}"; do fi done -allowed_commands_array=(DEBUG START UPDATE VALIDATE) +allowed_commands_array=(DEBUG START UPDATE VALIDATE CHECK-UPDATE) for allowed_command in "${allowed_commands_array[@]}"; do if [ "${allowed_command}" == "${commandname}" ]; then if [ "${appid}" ]; then diff --git a/lgsm/functions/command_check_update.sh b/lgsm/functions/command_check_update.sh index 3753c72c6..b2647e2a1 100755 --- a/lgsm/functions/command_check_update.sh +++ b/lgsm/functions/command_check_update.sh @@ -6,7 +6,7 @@ # Description: Handles updating of servers. commandname="CHECK-UPDATE" -commandaction="check for Update" +commandaction="Check for Update" functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set From aaf9aa49532a04a0b2867d5d8e667dc2c675f5a2 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 Apr 2023 13:40:16 +0100 Subject: [PATCH 129/374] Release v23.2.2 --- lgsm/functions/core_functions.sh | 2 +- linuxgsm.sh | 2 +- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 75e5f4f35..d86f74762 100755 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -8,7 +8,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.2.1" +modulesversion="v23.2.2" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index b116f957f..d8015dd51 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.2.1" +version="v23.2.2" shortname="core" gameservername="core" commandname="CORE" diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index 0071e24f8..22bd97d3b 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.2.1" +version="v23.2.2" shortname="fctr" gameservername="fctrserver" commandname="CORE" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 07e31417f..f16800791 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.2.1" +version="v23.2.2" shortname="jc2" gameservername="jc2server" commandname="CORE" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 78301e39d..389bbd69e 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.2.1" +version="v23.2.2" shortname="mc" gameservername="mcserver" commandname="CORE" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 75464d9ae..cf542b237 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.2.1" +version="v23.2.2" shortname="ts3" gameservername="ts3server" commandname="CORE" From 6bd17366e1e8d207cff0df54b7f0449d9c4c5e28 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 Apr 2023 15:42:18 +0100 Subject: [PATCH 131/374] fix(update): repair mc and pmc updater fix behavior of how the download of the jar file is handled. --- lgsm/functions/update_factorio.sh | 2 +- lgsm/functions/update_jediknight2.sh | 2 +- lgsm/functions/update_minecraft.sh | 6 ++++-- lgsm/functions/update_minecraft_bedrock.sh | 2 +- lgsm/functions/update_papermc.sh | 11 ++++++----- lgsm/functions/update_ts3.sh | 2 +- lgsm/functions/update_ut99.sh | 4 ++-- lgsm/functions/update_vintagestory.sh | 2 +- 8 files changed, 17 insertions(+), 14 deletions(-) diff --git a/lgsm/functions/update_factorio.sh b/lgsm/functions/update_factorio.sh index 3fad63416..852ab9d87 100644 --- a/lgsm/functions/update_factorio.sh +++ b/lgsm/functions/update_factorio.sh @@ -8,7 +8,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_dl() { - # Download and extract files to serverfiles + # Download and extract files to serverfiles. fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "nohash" fn_dl_extract "${tmpdir}" "factorio_headless_${factorioarch}-${remotebuildversion}.tar.xz" "${serverfiles}" "factorio" fn_clear_tmp diff --git a/lgsm/functions/update_jediknight2.sh b/lgsm/functions/update_jediknight2.sh index 7560f0158..a88b96f61 100644 --- a/lgsm/functions/update_jediknight2.sh +++ b/lgsm/functions/update_jediknight2.sh @@ -8,7 +8,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_dl() { - # Download and extract files to serverfiles + # Download and extract files to serverfiles. fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "nohash" fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}/GameData" "linux-amd64" fn_clear_tmp diff --git a/lgsm/functions/update_minecraft.sh b/lgsm/functions/update_minecraft.sh index 04b4e9d04..dbef26d34 100644 --- a/lgsm/functions/update_minecraft.sh +++ b/lgsm/functions/update_minecraft.sh @@ -8,8 +8,9 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_dl() { - # Download and extract files to serverfiles - fn_fetch_file "${remotebuildurl}" "" "" "" "${serverfiles}" "minecraft_server.jar" "chmodx" "norun" "noforce" "nohash" + # Download and extract files to serverfiles. + fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "chmodx" "norun" "noforce" "nohash" + cp -f "${tmpdir}/${remotebuildfilename}" "${serverfiles}/${executable#./}" } fn_update_localbuild() { @@ -45,6 +46,7 @@ fn_update_remotebuild() { else remotebuildversion=$(echo "${remotebuildresponse}" | jq -r --arg branch "${branch}" --arg mcversion "${mcversion}" '.versions | .[] | select(.type==$branch and .id==$mcversion) | .id') fi + remotebuildfilename="minecraft_server.${remotebuildversion}.jar" # Generate link to version manifest json. remotebuildmanifest=$(echo "${remotebuildresponse}" | jq -r --arg branch "${branch}" --arg mcversion "${remotebuildversion}" '.versions | .[] | select(.type==$branch and .id==$mcversion) | .url') # Generate link to server.jar diff --git a/lgsm/functions/update_minecraft_bedrock.sh b/lgsm/functions/update_minecraft_bedrock.sh index cf61e3a2b..aec940126 100644 --- a/lgsm/functions/update_minecraft_bedrock.sh +++ b/lgsm/functions/update_minecraft_bedrock.sh @@ -8,7 +8,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_dl() { - fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "bedrock_server.${remotebuildversion}.zip" + fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "bedrock_server.${remotebuildversion}.zip" "nochmodx" "norun" "noforce" "nohash" echo -e "Extracting to ${serverfiles}...\c" if [ "${firstcommandname}" == "INSTALL" ]; then unzip -oq "${tmpdir}/bedrock_server.${remotebuildversion}.zip" -x "server.properties" -d "${serverfiles}" diff --git a/lgsm/functions/update_papermc.sh b/lgsm/functions/update_papermc.sh index f48a66e39..102ef6570 100644 --- a/lgsm/functions/update_papermc.sh +++ b/lgsm/functions/update_papermc.sh @@ -8,16 +8,17 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_dl() { - # Download and extract files to serverfiles - fn_fetch_file "${remotebuildurl}" "" "" "" "${serverfiles}" "${executable#./}" "chmodx" "norun" "force" "${remotebuildhash}" + # Download and extract files to serverfiles. + fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "chmodx" "norun" "force" "${remotebuildhash}" + cp -f "${tmpdir}/${remotebuildfilename}" "${serverfiles}/${executable#./}" echo "${remotebuildversion}" > "${serverfiles}/build.txt" } fn_update_localbuild() { # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" - # Uses version file to get local build. - localbuild=$(head -n 1 "${serverfiles}/build.txt") + # Uses build file to get local build. + localbuild=$(head -n 1 "${serverfiles}/build.txt" 2> /dev/null) if [ -z "${localbuild}" ]; then fn_print_error "Checking local build: ${remotelocation}: missing local build info" fn_script_log_error "Missing local build info" @@ -31,7 +32,7 @@ fn_update_localbuild() { fn_update_remotebuild() { # Get remote build info. - apiurl="https://papermc.io/api/v2/projects/" + apiurl="https://papermc.io/api/v2/projects" # Get list of projects. remotebuildresponse=$(curl -s "${apiurl}") # Get list of Minecraft versions for project. diff --git a/lgsm/functions/update_ts3.sh b/lgsm/functions/update_ts3.sh index e76609b2d..0f5327de2 100644 --- a/lgsm/functions/update_ts3.sh +++ b/lgsm/functions/update_ts3.sh @@ -8,7 +8,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_dl() { - # Download and extract files to serverfiles + # Download and extract files to serverfiles. fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "${remotebuildhash}" fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}" "teamspeak3-server_linux_${ts3arch}" fn_clear_tmp diff --git a/lgsm/functions/update_ut99.sh b/lgsm/functions/update_ut99.sh index b6db783e2..045b29dbe 100644 --- a/lgsm/functions/update_ut99.sh +++ b/lgsm/functions/update_ut99.sh @@ -8,7 +8,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_dl() { - # Download and extract files to serverfiles + # Download and extract files to serverfiles. fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "nohash" fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}" echo "${remotebuildversion}" > "${serverfiles}/build.txt" @@ -19,7 +19,7 @@ fn_update_localbuild() { # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" # Uses build file to get local build. - localbuild=$(head -n 1 "${serverfiles}/build.txt") + localbuild=$(head -n 1 "${serverfiles}/build.txt" 2> /dev/null) if [ -z "${localbuild}" ]; then fn_print_error "Checking local build: ${remotelocation}: missing local build info" fn_script_log_error "Missing local build info" diff --git a/lgsm/functions/update_vintagestory.sh b/lgsm/functions/update_vintagestory.sh index 67b6e1a3d..7307a4b77 100755 --- a/lgsm/functions/update_vintagestory.sh +++ b/lgsm/functions/update_vintagestory.sh @@ -8,7 +8,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_dl() { - # Download and extract files to serverfiles + # Download and extract files to serverfiles. fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "${remotebuildhash}" fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}" fn_clear_tmp From 38c810db2b7536ccd33f310912c5ef21df49caf7 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 Apr 2023 15:55:17 +0100 Subject: [PATCH 132/374] Release v23.2.3 --- lgsm/functions/core_functions.sh | 2 +- linuxgsm.sh | 2 +- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index d86f74762..b301b7e46 100755 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -8,7 +8,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.2.2" +modulesversion="v23.2.3" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index d8015dd51..758b73725 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.2.2" +version="v23.2.3" shortname="core" gameservername="core" commandname="CORE" diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index 22bd97d3b..cc841abd2 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.2.2" +version="v23.2.3" shortname="fctr" gameservername="fctrserver" commandname="CORE" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index f16800791..a1cc5922a 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.2.2" +version="v23.2.3" shortname="jc2" gameservername="jc2server" commandname="CORE" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 389bbd69e..66b5af804 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.2.2" +version="v23.2.3" shortname="mc" gameservername="mcserver" commandname="CORE" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index cf542b237..809c3eef7 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.2.2" +version="v23.2.3" shortname="ts3" gameservername="ts3server" commandname="CORE" From b529f004ae076ba551a0a37af540f51918002ed0 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 Apr 2023 20:54:54 +0100 Subject: [PATCH 133/374] version v23.2.3 --- lgsm/functions/core_modules.sh | 2 +- lgsm/modules/core_functions.sh | 2 +- lgsm/modules/core_modules.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/functions/core_modules.sh b/lgsm/functions/core_modules.sh index 4c8701997..81a7a5ab6 100644 --- a/lgsm/functions/core_modules.sh +++ b/lgsm/functions/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.2.2" +modulesversion="v23.2.3" # Core diff --git a/lgsm/modules/core_functions.sh b/lgsm/modules/core_functions.sh index df5174186..57e6d96d8 100755 --- a/lgsm/modules/core_functions.sh +++ b/lgsm/modules/core_functions.sh @@ -8,7 +8,7 @@ module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.2.2" +modulesversion="v23.2.3" # Core diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index 4c8701997..81a7a5ab6 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.2.2" +modulesversion="v23.2.3" # Core From 4fd47dafb5e8a0189a6346cbb240b39dc9f61544 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Apr 2023 23:18:02 +0100 Subject: [PATCH 134/374] build(deps): bump actions/add-to-project from 0.4.1 to 0.5.0 (#4183) Bumps [actions/add-to-project](https://github.com/actions/add-to-project) from 0.4.1 to 0.5.0. - [Release notes](https://github.com/actions/add-to-project/releases) - [Commits](https://github.com/actions/add-to-project/compare/v0.4.1...v0.5.0) --- updated-dependencies: - dependency-name: actions/add-to-project dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/add-to-project.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/add-to-project.yml b/.github/workflows/add-to-project.yml index 8e71d1cb5..1a20ef190 100644 --- a/.github/workflows/add-to-project.yml +++ b/.github/workflows/add-to-project.yml @@ -10,7 +10,7 @@ jobs: name: Add game server requests to project runs-on: ubuntu-latest steps: - - uses: actions/add-to-project@v0.4.1 + - uses: actions/add-to-project@v0.5.0 with: project-url: https://github.com/orgs/GameServerManagers/projects/11 github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} From 030d451a00f23ac21bf0a3bfe07806aef20a3da7 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 24 Apr 2023 22:13:48 +0100 Subject: [PATCH 135/374] fix: add docker distro to ats --- lgsm/data/serverlist.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index ae9ae564c..2bce54086 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -4,7 +4,7 @@ ahl2,ahl2server,Action: Source,ubuntu-22.04 ark,arkserver,ARK: Survival Evolved,ubuntu-22.04 arma3,arma3server,ARMA 3,ubuntu-22.04 armar,armarserver,Arma Reforger,ubuntu-20.04 -ats,atsserver,American Truck Simulator +ats,atsserver,American Truck Simulator,ubuntu-22.04 av,avserver,Avorion,ubuntu-22.04 bb,bbserver,BrainBread,ubuntu-22.04 bb2,bb2server,BrainBread 2,ubuntu-22.04 From 40757ae9b5df1398fc4aa17ec3f4ba31d5fa12f6 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 16 May 2023 20:56:58 +0100 Subject: [PATCH 136/374] feat(details): refactor of game info (#4174) * feat(btl): rename bt1944 to btl (#4124) * fix(bt1944): update binary file * feat(btl): rename bt1944 to btl * rename gameworld to worldname * rename autosaveinverval to saveinterval * rust seed * add exit code to details * update some variables * comment * update random * current refactor * modules * json * xml * add core modules to functions dir * functions * fix * use xmllint for parsing xml * check root * check logs * sdtd * quakec * changes * remove dev null * arma3 * add detect details * config origin * fix: cmw mkdir bug * ini improvements * further ini improvements * dst ini * revert * httpport * max players * source engine * fix: cannot iterate over null * fix quakec * fix(nec): no query port * more updates * more updated * more * more * telnet ip * first test of details checking * more details updates * more standardizing * comment out steamport in not set * kf2 master server true * update roserver * fix bug * looks for file called config and uses that * test test test test test * download correct configs * test test test test test test test test test test test test test test test test test test test * remove blank lines * update var names * fail * continue on error * install xmllint * adjust quakec * fix dst * fix java * re order mcb * fix query port mc * fix mom * fix pc * pc add http port * add api and http port * change naming to http from web admin * api port * http * pc2 * add query raw * list cluster config * servercfgparse * update avserver * tidy up steam ports * more servers completed * fix sb * no config file * no config file * add emserver config install * codacy * add legacy vars * add more legacy * add xmllint * mta xmllint * codacy * codacy --- .github/workflows/details-check.yml | 74 + .../workflows/detals-check-generate-matrix.sh | 25 + .../config-lgsm/kf2server/_default.cfg | 2 +- .../config-lgsm/momserver/_default.cfg | 3 +- .../config-lgsm/necserver/_default.cfg | 4 +- .../config-lgsm/ns2cserver/_default.cfg | 8 +- .../config-lgsm/ns2server/_default.cfg | 8 +- .../config-lgsm/pc2server/_default.cfg | 2 +- .../config-lgsm/pcserver/_default.cfg | 2 +- .../config-lgsm/pstbsserver/_default.cfg | 6 +- .../config-lgsm/sbotsserver/_default.cfg | 2 - .../config-lgsm/stserver/_default.cfg | 10 +- .../config-lgsm/vhserver/_default.cfg | 4 +- lgsm/data/almalinux-8.csv | 4 +- lgsm/data/almalinux-9.csv | 4 +- lgsm/data/centos-7.csv | 4 +- lgsm/data/centos-8.csv | 4 +- lgsm/data/centos-9.csv | 4 +- lgsm/data/debian-10.csv | 4 +- lgsm/data/debian-11.csv | 4 +- lgsm/data/debian-9.csv | 4 +- lgsm/data/rhel-7.csv | 4 +- lgsm/data/rhel-8.csv | 4 +- lgsm/data/rhel-9.csv | 4 +- lgsm/data/rocky-8.csv | 4 +- lgsm/data/rocky-9.csv | 4 +- lgsm/data/ubuntu-16.04.csv | 2 +- lgsm/data/ubuntu-18.04.csv | 4 +- lgsm/data/ubuntu-20.04.csv | 4 +- lgsm/data/ubuntu-21.04.csv | 4 +- lgsm/data/ubuntu-21.10.csv | 4 +- lgsm/data/ubuntu-22.04.csv | 4 +- lgsm/functions/check_logs.sh | 26 + lgsm/functions/check_root.sh | 21 + lgsm/functions/core_functions.sh | 290 +- lgsm/functions/core_modules copy.sh | 816 ++++ lgsm/modules/check_ip.sh | 8 +- lgsm/modules/command_dev_details.sh | 94 + lgsm/modules/command_dev_query_raw.sh | 71 +- lgsm/modules/command_sponsor.sh | 0 lgsm/modules/core_functions.sh | 0 lgsm/modules/core_getopt.sh | 5 +- lgsm/modules/core_legacy.sh | 24 + lgsm/modules/core_modules.sh | 5 + lgsm/modules/fix_cmw.sh | 4 +- lgsm/modules/fix_ro.sh | 4 +- lgsm/modules/info_game.sh | 4202 ++++++++--------- lgsm/modules/info_messages.sh | 156 +- lgsm/modules/install_config.sh | 3 + package-lock.json | 14 +- package.json | 2 +- 51 files changed, 3421 insertions(+), 2548 deletions(-) create mode 100644 .github/workflows/details-check.yml create mode 100755 .github/workflows/detals-check-generate-matrix.sh create mode 100644 lgsm/functions/check_logs.sh create mode 100644 lgsm/functions/check_root.sh mode change 100755 => 100644 lgsm/functions/core_functions.sh create mode 100644 lgsm/functions/core_modules copy.sh create mode 100644 lgsm/modules/command_dev_details.sh mode change 100644 => 100755 lgsm/modules/command_sponsor.sh mode change 100755 => 100644 lgsm/modules/core_functions.sh diff --git a/.github/workflows/details-check.yml b/.github/workflows/details-check.yml new file mode 100644 index 000000000..0d1327682 --- /dev/null +++ b/.github/workflows/details-check.yml @@ -0,0 +1,74 @@ +name: Details Check +# This action will check that LinuxGSM is picking up game server config and parameter variables. +on: + workflow_dispatch: + push: + +jobs: + create-matrix: + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Generate matrix with generate-matrix.sh + run: chmod +x .github/workflows/detals-check-generate-matrix.sh; .github/workflows/detals-check-generate-matrix.sh + + - id: set-matrix + run: | + shortnamearray=$(cat shortnamearray.json) + echo "${shortnamearray}" + echo -n "matrix=${shortnamearray}" >> $GITHUB_OUTPUT + + details-check: + needs: create-matrix + continue-on-error: true + runs-on: ubuntu-latest + + strategy: + matrix: ${{ fromJSON(needs.create-matrix.outputs.matrix) }} + + steps: + - name: Install dependencies + run: sudo apt-get install libxml2-utils jq + + - name: Download linuxgsm.sh + run: wget https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/feature/info_game-refactor/linuxgsm.sh; chmod +x linuxgsm.sh + + - name: Grab server + run: LGSM_GITHUBBRANCH="feature/info_game-refactor" ./linuxgsm.sh ${{ matrix.shortname }}server + + - name: Enable developer mode + run: LGSM_GITHUBBRANCH="feature/info_game-refactor" ./${{ matrix.shortname }}server developer + + - id: sets-servercfgname + name: Generate servercfgname + run: | + servercfg=$(sed -n "/^\/ { s/.*= *\"\?\([^\"']*\)\"\?/\1/p;q }" lgsm/config-lgsm/${{ matrix.shortname }}server/_default.cfg) + echo "servercfgname=$servercfg" >> "$GITHUB_OUTPUT" + + - name: Download config + run: | + if [ -z "${{ steps.sets-servercfgname.outputs.servercfgname }}" ]; then + echo "This game server has no config file." + else + curl -f -o config "https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/rename/${{ matrix.shortname }}/${{ steps.sets-servercfgname.outputs.servercfgname }}" + fi + - name: Display config + run: | + if [ -z "${{ steps.sets-servercfgname.outputs.servercfgname }}" ]; then + echo "This game server has no config file." + else + cat config + fi + + - name: Display parameters + run: grep "startparameters" lgsm/config-default/config-lgsm/${{ matrix.shortname }}server/_default.cfg + + - name: Detect details + run: LGSM_GITHUBBRANCH="feature/info_game-refactor" ./${{ matrix.shortname }}server detect-details + + - name: Query Raw + run: LGSM_GITHUBBRANCH="feature/info_game-refactor" ./${{ matrix.shortname }}server query-raw diff --git a/.github/workflows/detals-check-generate-matrix.sh b/.github/workflows/detals-check-generate-matrix.sh new file mode 100755 index 000000000..66f2bd072 --- /dev/null +++ b/.github/workflows/detals-check-generate-matrix.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +curl "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/master/lgsm/data/serverlist.csv" | grep -v '^[[:blank:]]*$' > serverlist.csv + +echo -n "{" > "shortnamearray.json" +echo -n "\"include\":[" >> "shortnamearray.json" + +while read -r line; do + shortname=$(echo "$line" | awk -F, '{ print $1 }') + export shortname + servername=$(echo "$line" | awk -F, '{ print $2 }') + export servername + gamename=$(echo "$line" | awk -F, '{ print $3 }') + 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" +done < serverlist.csv +sed -i '$ s/.$//' "shortnamearray.json" +echo -n "]" >> "shortnamearray.json" +echo -n "}" >> "shortnamearray.json" +rm serverlist.csv diff --git a/lgsm/config-default/config-lgsm/kf2server/_default.cfg b/lgsm/config-default/config-lgsm/kf2server/_default.cfg index a8c3c72bf..a52dcfb1d 100644 --- a/lgsm/config-default/config-lgsm/kf2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/kf2server/_default.cfg @@ -121,7 +121,7 @@ steamcmdforcewindows="no" branch="" betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server -steammaster="false" +steammaster="true" ## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill diff --git a/lgsm/config-default/config-lgsm/momserver/_default.cfg b/lgsm/config-default/config-lgsm/momserver/_default.cfg index 6ebc106b9..05787a4bd 100644 --- a/lgsm/config-default/config-lgsm/momserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/momserver/_default.cfg @@ -12,10 +12,9 @@ ip="0.0.0.0" port="7777" beaconport="15000" -maxplayers="32" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-port="${port}" -beaconport="${beaconport}" -MULTIHOME="${ip}" -maxplayers=${maxplayers}" +startparameters="-port="${port}" -beaconport="${beaconport}" -MULTIHOME="${ip}"" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/necserver/_default.cfg b/lgsm/config-default/config-lgsm/necserver/_default.cfg index 5d3b4d887..ceb42033e 100644 --- a/lgsm/config-default/config-lgsm/necserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/necserver/_default.cfg @@ -139,8 +139,8 @@ stopmode="2" # 3: gamedig # 4: gsquery # 5: tcp -querymode="2" -querytype="protocol-valve" +querymode="1" +querytype="" ## Console type consoleverbose="yes" diff --git a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg index bc3e20cd1..908ce9727 100644 --- a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg @@ -14,9 +14,9 @@ port="27015" defaultmap="co_core" maxplayers="24" servername="LinuxGSM Server" -webadminuser="admin" -webadminpass="admin" -webadminport="8080" +httpuser="admin" +httppassword="admin" +httpport="8080" mods="" serverpassword="" # Add the following line to the parms if you want a private server. Ensuring @@ -24,7 +24,7 @@ serverpassword="" # -password \"${serverpassword}\" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-name \"${servername}\" -port ${port} -webadmin -webdomain ${ip} -webuser ${webadminuser} -webpassword \"${webadminpass}\" -webport ${webadminport} -map ${defaultmap} -limit ${maxplayers} -config_path \"${servercfgdir}\" -modstorage \"${modstoragedir}\" -mods \"${mods}\"" +startparameters="-name \"${servername}\" -port ${port} -webinterface -webdomain ${ip} -webuser ${httpuser} -webpassword \"${httppassword}\" -webport ${httpport} -map ${defaultmap} -limit ${maxplayers} -config_path \"${servercfgdir}\" -modstorage \"${modstoragedir}\" -mods \"${mods}\"" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/ns2server/_default.cfg b/lgsm/config-default/config-lgsm/ns2server/_default.cfg index d3fa2ad13..5a6e8e5c7 100644 --- a/lgsm/config-default/config-lgsm/ns2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2server/_default.cfg @@ -14,9 +14,9 @@ port="27015" defaultmap="ns2_summit" maxplayers="24" servername="LinuxGSM Server" -webadminuser="admin" -webadminpass="admin" -webadminport="8080" +httpuser="admin" +httppassword="admin" +httpport="8080" mods="" serverpassword="" # Add the following line to the parms if you want a private server. Ensuring @@ -24,7 +24,7 @@ serverpassword="" # -password \"${serverpassword}\" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-name \"${servername}\" -port ${port} -webadmin -webdomain ${ip} -webuser ${webadminuser} -webpassword \"${webadminpass}\" -webport ${webadminport} -map ${defaultmap} -limit ${maxplayers} -config_path \"${servercfgdir}\" -logdir \"${gamelogdir}\" -modstorage \"${modstoragedir}\" -mods2 \"${mods}\"" +startparameters="-name \"${servername}\" -port ${port} -webinterface -webdomain ${ip} -webuser ${httpuser} -webpassword \"${httppassword}\" -webport ${httpport} -map ${defaultmap} -limit ${maxplayers} -config_path \"${servercfgdir}\" -logdir \"${gamelogdir}\" -modstorage \"${modstoragedir}\" -mods2 \"${mods}\"" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/pc2server/_default.cfg b/lgsm/config-default/config-lgsm/pc2server/_default.cfg index 72f87b4f0..0bf55aa53 100644 --- a/lgsm/config-default/config-lgsm/pc2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/pc2server/_default.cfg @@ -119,7 +119,7 @@ steamcmdforcewindows="no" branch="" betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server -steammaster="false" +steammaster="true" ## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill diff --git a/lgsm/config-default/config-lgsm/pcserver/_default.cfg b/lgsm/config-default/config-lgsm/pcserver/_default.cfg index af31b615b..53d9fc210 100644 --- a/lgsm/config-default/config-lgsm/pcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pcserver/_default.cfg @@ -115,7 +115,7 @@ steamcmdforcewindows="no" branch="" betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server -steammaster="false" +steammaster="true" ## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill diff --git a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg index f1ccede86..426574aa6 100644 --- a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg @@ -10,15 +10,15 @@ ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" +maxplayers="40" port="10027" queryport="10037" -rconport="21114" randommap="NONE" -maxplayers="40" reservedslots="0" +tickrate="50" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="MULTIHOME=${ip} RANDOM=${randommap} Port=${port} QueryPort=${queryport} RCONPORT=${rconport} FIXEDMAXPLAYERS=${maxplayers} NumReservedSlots=${reservedslots}" +startparameters="MULTIHOME=${ip} RANDOM=${randommap} Port=${port} QueryPort=${queryport} FIXEDMAXPLAYERS=${maxplayers} FIXEDMAXTICKRATE=${tickrate} NumReservedSlots=${reservedslots}" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg index 899842b08..f48afd3f0 100644 --- a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg @@ -13,8 +13,6 @@ port="7777" queryport="27015" defaultmap="StationKappa" servername="LinuxGSM Server" -serverpassword="NOT SET" # Can't be adjusted currently -maxplayers="8" # Can't be adjusted currently ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters startparameters="Port=${port}?QueryPort=${queryport} -startup_map ${defaultmap} -server_name \"${servername}\"" diff --git a/lgsm/config-default/config-lgsm/stserver/_default.cfg b/lgsm/config-default/config-lgsm/stserver/_default.cfg index 834c2d054..b304fa390 100644 --- a/lgsm/config-default/config-lgsm/stserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/stserver/_default.cfg @@ -10,17 +10,17 @@ ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" -servername="LinuxGSM" +maxplayers="10" port="27500" queryport="27015" -worldtype="Moon" -maxplayers="10" -autosaveinterval=300 +saveinterval="300" +servername="LinuxGSM" worldname="moon_save" +worldtype="Moon" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters # Edit with care -startparameters="-LOADLATEST ${worldname} ${worldtype} -settings ServerName ${servername} StartLocalHost true ServerVisible true ServerMaxPlayers ${maxplayers} GamePort ${port} UpdatePort ${queryport} UPNPEnabled true AutoSave true SaveInterval ${autosaveinterval}" +startparameters="-LOADLATEST ${worldname} ${worldtype} -settings ServerName ${servername} StartLocalHost true ServerVisible true ServerMaxPlayers ${maxplayers} GamePort ${port} UpdatePort ${queryport} UPNPEnabled true AutoSave true SaveInterval ${saveinterval}" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/vhserver/_default.cfg b/lgsm/config-default/config-lgsm/vhserver/_default.cfg index 8bb87887b..8fe7cd4dc 100644 --- a/lgsm/config-default/config-lgsm/vhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vhserver/_default.cfg @@ -13,7 +13,7 @@ servername="Valheim Server" # Minimum password length is 5. serverpassword="" port="2456" -gameworld="${selfname}" +worldname="${selfname}" public="1" savedir="$HOME/.config/unity3d/IronGate/Valheim" logFile="" @@ -26,7 +26,7 @@ backuplong="43200" crossplay="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-name '${servername}' -password ${serverpassword} -port ${port} -world ${gameworld} -public ${public} -savedir '${savedir}' -logFile '${logFile}' -saveinterval ${saveinterval} -backups ${backups} -backupshort ${backupshort} -backuplong ${backuplong} ${crossplay:+-crossplay}" +startparameters="-name '${servername}' -password ${serverpassword} -port ${port} -world ${worldname} -public ${public} -savedir '${savedir}' -logFile '${logFile}' -saveinterval ${saveinterval} -backups ${backups} -backupshort ${backupshort} -backuplong ${backuplong} ${crossplay:+-crossplay}" #### LinuxGSM Settings #### diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index 86ff4dc14..8d4b45216 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -68,7 +68,7 @@ mcb,libnsl mh mohaa,compat-libstdc++-33.i686 mom -mta,ncurses-compat-libs +mta,ncurses-compat-libs,libxml2 nd nec nmrih,ncurses-libs.i686 @@ -97,7 +97,7 @@ sb sbots scpsl scpslsm -sdtd,telnet,expect +sdtd,telnet,expect,libxml2 sf sfc,ncurses-libs.i686 sof2 diff --git a/lgsm/data/almalinux-9.csv b/lgsm/data/almalinux-9.csv index 86ff4dc14..8d4b45216 100644 --- a/lgsm/data/almalinux-9.csv +++ b/lgsm/data/almalinux-9.csv @@ -68,7 +68,7 @@ mcb,libnsl mh mohaa,compat-libstdc++-33.i686 mom -mta,ncurses-compat-libs +mta,ncurses-compat-libs,libxml2 nd nec nmrih,ncurses-libs.i686 @@ -97,7 +97,7 @@ sb sbots scpsl scpslsm -sdtd,telnet,expect +sdtd,telnet,expect,libxml2 sf sfc,ncurses-libs.i686 sof2 diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index c1d2b97b8..0769c4ef8 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -68,7 +68,7 @@ mcb,libnsl mh mohaa,compat-libstdc++-33.i686 mom -mta,ncurses-libs +mta,ncurses-libs,libxml2 nd nec nmrih,ncurses-libs.i686 @@ -97,7 +97,7 @@ sb sbots scpsl scpslsm -sdtd,telnet,expect +sdtd,telnet,expect,libxml2 sf sfc,ncurses-libs.i686 sof2 diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index 86ff4dc14..8d4b45216 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -68,7 +68,7 @@ mcb,libnsl mh mohaa,compat-libstdc++-33.i686 mom -mta,ncurses-compat-libs +mta,ncurses-compat-libs,libxml2 nd nec nmrih,ncurses-libs.i686 @@ -97,7 +97,7 @@ sb sbots scpsl scpslsm -sdtd,telnet,expect +sdtd,telnet,expect,libxml2 sf sfc,ncurses-libs.i686 sof2 diff --git a/lgsm/data/centos-9.csv b/lgsm/data/centos-9.csv index 86ff4dc14..8d4b45216 100644 --- a/lgsm/data/centos-9.csv +++ b/lgsm/data/centos-9.csv @@ -68,7 +68,7 @@ mcb,libnsl mh mohaa,compat-libstdc++-33.i686 mom -mta,ncurses-compat-libs +mta,ncurses-compat-libs,libxml2 nd nec nmrih,ncurses-libs.i686 @@ -97,7 +97,7 @@ sb sbots scpsl scpslsm -sdtd,telnet,expect +sdtd,telnet,expect,libxml2 sf sfc,ncurses-libs.i686 sof2 diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index 768be603f..7058cc97e 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -68,7 +68,7 @@ mcb mh mohaa,libstdc++5:i386 mom -mta,libncursesw5 +mta,libncursesw5,libxml2-utils nd nec nmrih,libtinfo5:i386 @@ -97,7 +97,7 @@ sb sbots scpsl,mono-complete scpslsm,mono-complete -sdtd,telnet,expect +sdtd,telnet,expect,libxml2-utils sf sfc,libtinfo5:i386 sof2 diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index 021e66e20..ff8c8ae76 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -68,7 +68,7 @@ mcb mh mohaa,libstdc++5:i386 mom -mta,libncursesw5 +mta,libncursesw5,libxml2-utils nd nec nmrih,libtinfo5:i386 @@ -97,7 +97,7 @@ sb sbots scpsl,mono-complete scpslsm,mono-complete -sdtd,telnet,expect +sdtd,telnet,expect,libxml2-utils sf sfc,libtinfo5:i386 sof2 diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index fa0d6a881..507896a6a 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -68,7 +68,7 @@ mcb mh mohaa,libstdc++5:i386 mom -mta,libncursesw5 +mta,libncursesw5,libxml2-utils nd nec nmrih,libtinfo5:i386 @@ -97,7 +97,7 @@ sb sbots scpsl,mono-complete scpslsm,mono-complete -sdtd,telnet,expect +sdtd,telnet,expect,libxml2-utils sf sfc,libtinfo5:i386 sof2 diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index 4cfe96848..c0b3f7804 100644 --- a/lgsm/data/rhel-7.csv +++ b/lgsm/data/rhel-7.csv @@ -68,7 +68,7 @@ mcb,libnsl mh mohaa,compat-libstdc++-33.i686 mom -mta,ncurses-libs +mta,ncurses-libs,libxml2 nd nec nmrih,ncurses-libs.i686 @@ -97,7 +97,7 @@ sb sbots scpsl scpslsm -sdtd,telnet,expect +sdtd,telnet,expect,libxml2 sf sfc,ncurses-libs.i686 sof2 diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index 86ff4dc14..8d4b45216 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -68,7 +68,7 @@ mcb,libnsl mh mohaa,compat-libstdc++-33.i686 mom -mta,ncurses-compat-libs +mta,ncurses-compat-libs,libxml2 nd nec nmrih,ncurses-libs.i686 @@ -97,7 +97,7 @@ sb sbots scpsl scpslsm -sdtd,telnet,expect +sdtd,telnet,expect,libxml2 sf sfc,ncurses-libs.i686 sof2 diff --git a/lgsm/data/rhel-9.csv b/lgsm/data/rhel-9.csv index 86ff4dc14..8d4b45216 100644 --- a/lgsm/data/rhel-9.csv +++ b/lgsm/data/rhel-9.csv @@ -68,7 +68,7 @@ mcb,libnsl mh mohaa,compat-libstdc++-33.i686 mom -mta,ncurses-compat-libs +mta,ncurses-compat-libs,libxml2 nd nec nmrih,ncurses-libs.i686 @@ -97,7 +97,7 @@ sb sbots scpsl scpslsm -sdtd,telnet,expect +sdtd,telnet,expect,libxml2 sf sfc,ncurses-libs.i686 sof2 diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index 86ff4dc14..8d4b45216 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -68,7 +68,7 @@ mcb,libnsl mh mohaa,compat-libstdc++-33.i686 mom -mta,ncurses-compat-libs +mta,ncurses-compat-libs,libxml2 nd nec nmrih,ncurses-libs.i686 @@ -97,7 +97,7 @@ sb sbots scpsl scpslsm -sdtd,telnet,expect +sdtd,telnet,expect,libxml2 sf sfc,ncurses-libs.i686 sof2 diff --git a/lgsm/data/rocky-9.csv b/lgsm/data/rocky-9.csv index 86ff4dc14..8d4b45216 100644 --- a/lgsm/data/rocky-9.csv +++ b/lgsm/data/rocky-9.csv @@ -68,7 +68,7 @@ mcb,libnsl mh mohaa,compat-libstdc++-33.i686 mom -mta,ncurses-compat-libs +mta,ncurses-compat-libs,libxml2 nd nec nmrih,ncurses-libs.i686 @@ -97,7 +97,7 @@ sb sbots scpsl scpslsm -sdtd,telnet,expect +sdtd,telnet,expect,libxml2 sf sfc,ncurses-libs.i686 sof2 diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index d0f8fcebc..2b152ffef 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -97,7 +97,7 @@ sb sbots scpsl,mono-complete scpslsm,mono-complete -sdtd,telnet,expect +sdtd,telnet,expect,libxml2-utils sf sfc,libtinfo5:i386 sof2 diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index 768be603f..7058cc97e 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -68,7 +68,7 @@ mcb mh mohaa,libstdc++5:i386 mom -mta,libncursesw5 +mta,libncursesw5,libxml2-utils nd nec nmrih,libtinfo5:i386 @@ -97,7 +97,7 @@ sb sbots scpsl,mono-complete scpslsm,mono-complete -sdtd,telnet,expect +sdtd,telnet,expect,libxml2-utils sf sfc,libtinfo5:i386 sof2 diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index d4e8d6533..764812a71 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -68,7 +68,7 @@ mcb mh mohaa,libstdc++5:i386 mom -mta,libncursesw5 +mta,libncursesw5,libxml2-utils nd nec nmrih,libtinfo5:i386 @@ -97,7 +97,7 @@ sb sbots scpsl,mono-complete scpslsm,mono-complete -sdtd,telnet,expect +sdtd,telnet,expect,libxml2-utils sf sfc,libtinfo5:i386 sof2 diff --git a/lgsm/data/ubuntu-21.04.csv b/lgsm/data/ubuntu-21.04.csv index 021e66e20..ff8c8ae76 100644 --- a/lgsm/data/ubuntu-21.04.csv +++ b/lgsm/data/ubuntu-21.04.csv @@ -68,7 +68,7 @@ mcb mh mohaa,libstdc++5:i386 mom -mta,libncursesw5 +mta,libncursesw5,libxml2-utils nd nec nmrih,libtinfo5:i386 @@ -97,7 +97,7 @@ sb sbots scpsl,mono-complete scpslsm,mono-complete -sdtd,telnet,expect +sdtd,telnet,expect,libxml2-utils sf sfc,libtinfo5:i386 sof2 diff --git a/lgsm/data/ubuntu-21.10.csv b/lgsm/data/ubuntu-21.10.csv index 4284cdd9c..ca9576ca0 100644 --- a/lgsm/data/ubuntu-21.10.csv +++ b/lgsm/data/ubuntu-21.10.csv @@ -66,7 +66,7 @@ mcb mh mohaa,libstdc++5:i386 mom -mta,libncursesw5 +mta,libncursesw5,libxml2-utils nd nec nmrih,libtinfo5:i386 @@ -95,7 +95,7 @@ sb sbots scpsl,mono-complete scpslsm,mono-complete -sdtd,telnet,expect +sdtd,telnet,expect,libxml2-utils sf sfc,libtinfo5:i386 sof2 diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index 5aaacff81..50886ad29 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -68,7 +68,7 @@ mcb mh mohaa,libstdc++5:i386 mom -mta,libncursesw5 +mta,libncursesw5,libxml2-utils nd nec nmrih,libtinfo5:i386 @@ -97,7 +97,7 @@ sb sbots scpsl,mono-complete scpslsm,mono-complete -sdtd,telnet,expect +sdtd,telnet,expect,libxml2-utils sf sfc,libtinfo5:i386 sof2 diff --git a/lgsm/functions/check_logs.sh b/lgsm/functions/check_logs.sh new file mode 100644 index 000000000..2087ac915 --- /dev/null +++ b/lgsm/functions/check_logs.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# LinuxGSM check_logs.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Checks if log files exist. + +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +fn_check_logs() { + fn_print_dots "Checking for log files" + fn_print_info_nl "Checking for log files: Creating log files" + checklogs=1 + install_logs.sh +} + +# Create directories for the script and console logs. +if [ ! -d "${lgsmlogdir}" ] || [ ! -d "${consolelogdir}" ]; then + fn_check_logs +fi + +# Create gamelogdir. +# If variable exists gamelogdir exists and log/server does not. +if [ "${gamelogdir}" ] && [ -d "${gamelogdir}" ] && [ ! -d "${logdir}/server" ]; then + fn_check_logs +fi diff --git a/lgsm/functions/check_root.sh b/lgsm/functions/check_root.sh new file mode 100644 index 000000000..26475601a --- /dev/null +++ b/lgsm/functions/check_root.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# LinuxGSM check_root.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Checks if the user tried to run the script as root. + +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +if [ "$(whoami)" == "root" ] && [ ! -f /.dockerenv ]; then + if [ "${commandname}" != "INSTALL" ]; then + fn_print_fail_nl "Do NOT run this script as root!" + if [ -d "${lgsmlogdir}" ]; then + fn_script_log_fatal "${selfname} attempted to run as root." + else + # Forces exit code is log does not yet exist. + exitcode=1 + fi + core_exit.sh + fi +fi diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh old mode 100755 new mode 100644 index 57e6d96d8..cc054c129 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -41,653 +41,653 @@ core_legacy.sh() { core_exit.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } core_getopt.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } core_trap.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } core_steamcmd.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } core_github.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } # Commands command_backup.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } command_console.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } command_debug.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } command_details.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } command_sponsor.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } command_postdetails.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } command_test_alert.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } command_monitor.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } command_start.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } command_stop.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } command_validate.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } command_install.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } command_install_resources_mta.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } install_squad_license.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } command_mods_install.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } command_mods_update.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } command_mods_remove.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } command_fastdl.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } command_ts3_server_pass.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } command_restart.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } command_skeleton.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } command_wipe.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } command_send.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } # Checks check.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } check_config.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } check_deps.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } check_executable.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } check_glibc.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } check_ip.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } check_last_update.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } check_logs.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } check_permissions.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } check_root.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } check_status.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } check_steamcmd.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } check_system_dir.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } check_system_requirements.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } check_tmuxception.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } check_version.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } # Compress compress_unreal2_maps.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } compress_ut99_maps.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } # Mods mods_list.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } mods_core.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } # Dev command_dev_clear_functions.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } command_dev_debug.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } command_dev_detect_deps.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } command_dev_detect_glibc.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } command_dev_detect_ldd.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } command_dev_query_raw.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } # Fix fix.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_ark.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_av.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_arma3.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_armar.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_bt.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_bo.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_cmw.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_csgo.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_dst.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_hw.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_ins.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_kf.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_kf2.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_lo.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_mcb.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_mta.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_nmrih.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_onset.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_ro.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_rust.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_rw.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_sfc.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_st.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_steamcmd.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_terraria.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_tf2.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_ut3.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_rust.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_samp.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_sdtd.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_sof2.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_squad.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_ts3.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_ut2k4.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_ut.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_unt.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_vh.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_wurm.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fix_zmr.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } # Info info_distro.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } info_game.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } info_messages.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } info_stats.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } # Alert alert.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } alert_discord.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } alert_email.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } alert_ifttt.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } alert_mailgun.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } alert_pushbullet.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } alert_pushover.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } alert_gotify.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } alert_telegram.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } alert_rocketchat.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } alert_slack.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } # Logs core_logs.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } # Query query_gamedig.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } # Update command_update_functions.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } command_update_linuxgsm.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } command_update.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } command_check_update.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } update_ts3.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } update_minecraft.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } update_minecraft_bedrock.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } update_papermc.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } update_mta.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } update_factorio.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } update_jediknight2.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } update_steamcmd.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } update_vintagestory.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } update_ut99.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } fn_update_functions.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } # @@ -701,96 +701,96 @@ fn_autoinstall() { install_complete.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } install_config.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } install_factorio_save.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } install_dst_token.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } install_eula.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } install_gsquery.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } install_gslt.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } install_header.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } install_logs.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } install_retry.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } install_server_dir.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } install_server_files.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } install_stats.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } install_steamcmd.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } install_ts3.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } install_ts3db.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } install_ut2k4.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } install_dl_ut2k4.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } install_ut2k4_key.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_function + fn_fetch_module } # Calls code required for legacy servers diff --git a/lgsm/functions/core_modules copy.sh b/lgsm/functions/core_modules copy.sh new file mode 100644 index 000000000..8eb843b5a --- /dev/null +++ b/lgsm/functions/core_modules copy.sh @@ -0,0 +1,816 @@ +#!/bin/bash +# LinuxGSM core_modules.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Defines all modules to allow download and execution of modules using fn_fetch_module. +# This module is called first before any other module. Without this file other modules will not load. + +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +modulesversion="v23.2.0" + +# Core + +core_dl.sh() { + modulefile="${FUNCNAME[0]}" + if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then + fn_fetch_core_dl "lgsm/modules" "core_dl.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" + else + fn_bootstrap_fetch_file_github "lgsm/modules" "core_dl.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" + fi +} + +core_messages.sh() { + modulefile="${FUNCNAME[0]}" + if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then + fn_fetch_core_dl "lgsm/modules" "core_messages.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" + else + fn_bootstrap_fetch_file_github "lgsm/modules" "core_messages.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" + fi +} + +core_legacy.sh() { + modulefile="${FUNCNAME[0]}" + if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then + fn_fetch_core_dl "lgsm/modules" "core_legacy.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" + else + fn_bootstrap_fetch_file_github "lgsm/modules" "core_legacy.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" + fi +} + +core_exit.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +core_getopt.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +core_trap.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +core_steamcmd.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +core_github.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# Commands + +command_backup.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_console.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_debug.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_details.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_sponsor.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_postdetails.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_test_alert.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_monitor.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_start.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_stop.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_validate.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_install.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_install_resources_mta.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_squad_license.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_mods_install.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_mods_update.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_mods_remove.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_fastdl.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_ts3_server_pass.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_restart.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_skeleton.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_wipe.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_send.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# Checks + +check.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_config.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_deps.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_executable.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_glibc.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_ip.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_last_update.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_logs.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_permissions.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_root.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_status.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_steamcmd.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_system_dir.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_system_requirements.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_tmuxception.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +check_version.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# Compress + +compress_unreal2_maps.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +compress_ut99_maps.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# Mods + +mods_list.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +mods_core.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# Dev + +command_dev_clear_modules.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_dev_debug.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_dev_detect_deps.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_dev_detect_glibc.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_dev_detect_ldd.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_dev_query_raw.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# Fix + +fix.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_ark.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_av.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_arma3.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_armar.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_bt.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_bo.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_cmw.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_csgo.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_dst.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_hw.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_ins.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_kf.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_kf2.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_lo.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_mcb.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_mta.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_nmrih.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_onset.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_ro.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_rust.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_rw.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_sfc.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_st.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_steamcmd.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_terraria.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_tf2.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_ut3.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_rust.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_samp.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_sdtd.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_sof2.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_squad.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_ts3.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_ut2k4.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_ut.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_unt.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_vh.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_wurm.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fix_zmr.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# Info + +info_distro.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +info_game.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +info_messages.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +info_stats.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# Alert + +alert.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +alert_discord.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +alert_email.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +alert_ifttt.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +alert_mailgun.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +alert_pushbullet.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +alert_pushover.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +alert_gotify.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +alert_telegram.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +alert_rocketchat.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +alert_slack.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} +# Logs + +core_logs.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# Query + +query_gamedig.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# Update + +command_update_modules.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_update_linuxgsm.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_update.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_check_update.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +update_ts3.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +update_minecraft.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +update_minecraft_bedrock.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +update_papermc.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +update_mta.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +update_factorio.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +update_jediknight2.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +update_steamcmd.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +update_vintagestory.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +update_ut99.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +fn_update_modules.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# +## Installer modules +# + +fn_autoinstall() { + autoinstall=1 + command_install.sh +} + +install_complete.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_config.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_factorio_save.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_dst_token.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_eula.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_gsquery.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_gslt.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_header.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_logs.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_retry.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_server_dir.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} +install_server_files.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_stats.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_steamcmd.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_ts3.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_ts3db.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_ut2k4.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_dl_ut2k4.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +install_ut2k4_key.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +# Calls code required for legacy servers +core_legacy.sh + +# Creates tmp dir if missing +if [ ! -d "${tmpdir}" ]; then + mkdir -p "${tmpdir}" +fi + +# Creates lock dir if missing +if [ ! -d "${lockdir}" ]; then + mkdir -p "${lockdir}" +fi + +# Calls on-screen messages (bootstrap) +core_messages.sh + +#Calls file downloader (bootstrap) +core_dl.sh + +# Calls the global Ctrl-C trap +core_trap.sh diff --git a/lgsm/modules/check_ip.sh b/lgsm/modules/check_ip.sh index 8dc0567b9..a2a16298c 100644 --- a/lgsm/modules/check_ip.sh +++ b/lgsm/modules/check_ip.sh @@ -39,25 +39,25 @@ function fn_is_valid_ip() { # If the IP variable has been set by user. if fn_is_valid_ip "${ip}"; then queryips=("${ip}") - webadminip=("${ip}") + httpip=("${ip}") telnetip=("${ip}") # If game config does have an IP set. elif fn_is_valid_ip "${configip}"; then queryips=("${configip}") ip="${configip}" - webadminip=("${configip}") + httpip=("${configip}") telnetip=("${configip}") # If there is only 1 server IP address. # Some IP details can automaticly use the one IP elif [ "${#current_ips[@]}" == "1" ]; then queryips=("127.0.0.1" "${current_ips[@]}") ip="0.0.0.0" - webadminip=("${current_ips[@]}") + httpip=("${current_ips[@]}") telnetip=("${current_ips[@]}") # If no ip is set by the user and server has more than one IP. else queryips=("127.0.0.1" "${current_ips[@]}") ip="0.0.0.0" - webadminip=("${ip}") + httpip=("${ip}") telnetip=("${ip}") fi diff --git a/lgsm/modules/command_dev_details.sh b/lgsm/modules/command_dev_details.sh new file mode 100644 index 000000000..330d7e2cd --- /dev/null +++ b/lgsm/modules/command_dev_details.sh @@ -0,0 +1,94 @@ +#!/bin/bash +# LinuxGSM command_dev_debug.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Dev only: Enables debugging log to be saved to dev-debug.log. + +if [ -f "config" ]; then + servercfgfullpath="config" +fi +if [ -f "clusterconfig" ]; then + clustercfgfullpath="clusterconfig" +fi + +info_game.sh + +carriagereturn=$(file -b "${servercfgfullpath}" | grep -q CRLF && echo "${red}CRLF${default}" || echo "${lightgreen}LF${default}") + +echo -e "" +echo -e "${lightgreen}Server Details${default}" +echo -e "==================================================================" +echo -e "" + +echo -e "Game: ${gamename}" +echo -e "Config type: ${configtype}" +echo -e "Config file: ${servercfgfullpath}" +if [ -f "${clustercfgfullpath}" ]; then + echo -e "Cluster config file: ${clustercfgfullpath}" +fi +echo -e "Carriage Return: ${carriagereturn}" + +# Create an associative array of the server details. +declare -A server_details=( + ['Admin Password']="${adminpassword}" + ['API Port']="${apiport}" + ['Cave']="${cave}" + ['Cluster']="${cluster}" + ['Config IP']="${configip}" + ['Default Map']="${defaultmap}" + ['Game Mode']="${gamemode}" + ['Game Type']="${gametype}" + ['HTTP Enabled']="${httpenabled}" + ['HTTP IP']="${httpip}" + ['HTTP Password']="${httppassword}" + ['HTTP Port']="${httpport}" + ['HTTP User']="${httpuser}" + ['ip']="${ip}" + ['LAN Port']="${lanport}" + ['Master Port']="${masterport}" + ['Master']="${master}" + ['Maxplayers']="${maxplayers}" + ['OldQueryPortNumber']="${oldqueryportnumber}" + ['Port']="${port}" + ['Query Port']="${queryport}" + ['RCON Enabled']="${rconenabled}" + ['RCON Password']="${rconpassword}" + ['RCON Port']="${rconport}" + ['Reserved Slots']="${reservedslots}" + ['Server Password']="${serverpassword}" + ['Servername']="${servername}" + ['Shard']="${shard}" + ['Sharding']="${sharding}" + ['Steam Auth Port']="${steamauthport}" + ['Telnet IP']="${telnetip}" + ['Tickrate']="${tickrate}" + ['World Name']="${worldname}" + ['World Type']="${worldtype}" +) + +# Initialize a variable to keep track of missing server details. +missing_details="" + +# Loop through the server details and output them. +echo -e "" +echo -e "${lightgreen}Available Server Details${default}" +echo -e "=================================" +for key in "${!server_details[@]}"; do + value=${server_details[$key]} + if [ -z "$value" ]; then + missing_details+="\n${key}" + else + echo -e "$key: $value " + fi +done + +# Output the missing server details if there are any. +if [ -n "$missing_details" ]; then + echo -e "" + echo -e "${lightgreen}Missing Server Details${default}" + echo -e "=================================" + echo -e "${missing_details}" +fi + +core_exit.sh diff --git a/lgsm/modules/command_dev_query_raw.sh b/lgsm/modules/command_dev_query_raw.sh index 0d30e75bf..d75d12f31 100644 --- a/lgsm/modules/command_dev_query_raw.sh +++ b/lgsm/modules/command_dev_query_raw.sh @@ -28,169 +28,164 @@ echo -e "==================================================================" { echo -e "${lightblue}Port Name \tPort Number \tStatus \tTCP \tUDP${default}" if [ -v port ]; then - echo -e "Game: \t${port} \t$(ss -tupl | grep -c ${port}) \t$(ss -tupl | grep ${port} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${port} | grep udp | awk '{ print $2 }')" + echo -e "Game: \t${port} \t$(ss -tupl | grep -c "${port}") \t$(ss -tupl | grep "${port}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${port}" | grep udp | awk '{ print $2 }')" else echo -e "Game:" fi if [ "${shortname}" == "rw" ]; then if [ -v port2 ]; then - echo -e "Game+1: \t${port2} \t$(ss -tupl | grep -c ${port}) \t$(ss -tupl | grep ${port2} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${port2} | grep udp | awk '{ print $2 }')" + echo -e "Game+1: \t${port2} \t$(ss -tupl | grep -c "${port}") \t$(ss -tupl | grep "${port2}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${port2}" | grep udp | awk '{ print $2 }')" else echo -e "Game+1:" fi if [ -v port3 ]; then - echo -e "Game+2: \t${port3} \t$(ss -tupl | grep -c ${port}) \t$(ss -tupl | grep ${port3} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${port3} | grep udp | awk '{ print $2 }')" + echo -e "Game+2: \t${port3} \t$(ss -tupl | grep -c "${port}") \t$(ss -tupl | grep "${port3}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${port3}" | grep udp | awk '{ print $2 }')" else echo -e "Game+2:" fi if [ -v port4 ]; then - echo -e "Game+3: \t${port4} \t$(ss -tupl | grep -c ${port}) \t$(ss -tupl | grep ${port4} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${port4} | grep udp | awk '{ print $2 }')" + echo -e "Game+3: \t${port4} \t$(ss -tupl | grep -c "${port}") \t$(ss -tupl | grep "${port4}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${port4}" | grep udp | awk '{ print $2 }')" else echo -e "Game+3:" fi fi if [ -v port401 ]; then - echo -e "Game+400: \t${port401} \t$(ss -tupl | grep -c ${port401}) \t$(ss -tupl | grep ${port401} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${port401} | grep udp | awk '{ print $2 }')" + echo -e "Game+400: \t${port401} \t$(ss -tupl | grep -c "${port401}") \t$(ss -tupl | grep "${port401}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${port401}" | grep udp | awk '{ print $2 }')" else echo -e "Game+400:" fi if [ -v portipv6 ]; then - echo -e "Game ipv6: \t${portipv6} \t$(ss -tupl | grep -c ${portipv6}) \t$(ss -tupl | grep ${portipv6} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${portipv6} | grep udp | awk '{ print $2 }')" + echo -e "Game ipv6: \t${portipv6} \t$(ss -tupl | grep -c "${portipv6}") \t$(ss -tupl | grep "${portipv6}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${portipv6}" | grep udp | awk '{ print $2 }')" else echo -e "Game ipv6:" fi if [ -v queryport ]; then - echo -e "Query: \t${queryport} \t$(ss -tupl | grep -c ${queryport}) \t$(ss -tupl | grep ${queryport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${queryport} | grep udp | awk '{ print $2 }')" + echo -e "Query: \t${queryport} \t$(ss -tupl | grep -c "${queryport}") \t$(ss -tupl | grep "${queryport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${queryport}" | grep udp | awk '{ print $2 }')" else echo -e "Query:" fi if [ -v httpport ]; then - echo -e "HTTP: \t${httpport} \t$(ss -tupl | grep -c ${httpport}) \t$(ss -tupl | grep ${httpport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${httpport} | grep udp | awk '{ print $2 }')" + echo -e "HTTP: \t${httpport} \t$(ss -tupl | grep -c "${httpport}") \t$(ss -tupl | grep "${httpport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${httpport}" | grep udp | awk '{ print $2 }')" else echo -e "HTTP:" fi if [ -v httpqueryport ]; then - echo -e "HTTP Query: \t${httpqueryport} \t$(ss -tupl | grep -c ${httpqueryport}) \t$(ss -tupl | grep ${httpqueryport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${httpqueryport} | grep udp | awk '{ print $2 }')" + echo -e "HTTP Query: \t${httpqueryport} \t$(ss -tupl | grep -c "${httpqueryport}") \t$(ss -tupl | grep" ${httpqueryport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${httpqueryport} | grep udp | awk '{ print $2 }')" else echo -e "HTTP Query:" fi - if [ -v webadminport ]; then - echo -e "Web Admin: \t${webadminport} \t$(ss -tupl | grep -c ${webadminport}) \t$(ss -tupl | grep ${webadminport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${webadminport} | grep udp | awk '{ print $2 }')" + if [ -v httpport ]; then + echo -e "Web Interface: \t${httpport} \t$(ss -tupl | grep -c "${httpport}") \t$(ss -tupl | grep "${httpport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${httpport}" | grep udp | awk '{ print $2 }')" else - echo -e "Web Admin:" + echo -e "Web Interface:" fi if [ -v 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 }')" + 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 echo -e "Client:" fi if [ -v rconport ]; then - echo -e "RCON: \t${rconport} \t$(ss -tupl | grep -c ${rconport}) \t$(ss -tupl | grep ${rconport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${rconport} | grep udp | awk '{ print $2 }')" + echo -e "RCON: \t${rconport} \t$(ss -tupl | grep -c "${rconport}") \t$(ss -tupl | grep "${rconport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${rconport}" | grep udp | awk '{ print $2 }')" else echo -e "RCON:" fi if [ -v rawport ]; then - echo -e "RAW UDP Socket: \t${rawport} \t$(ss -tupl | grep -c ${rawport}) \t$(ss -tupl | grep ${rawport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${rawport} | grep udp | awk '{ print $2 }')" + echo -e "RAW UDP Socket: \t${rawport} \t$(ss -tupl | grep -c "${rawport}") \t$(ss -tupl | grep "${rawport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${rawport}" | grep udp | awk '{ print $2 }')" else echo -e "RAW UDP Socket:" fi if [ -v masterport ]; then - echo -e "Game: Master: \t${masterport} \t$(ss -tupl | grep -c ${masterport}) \t$(ss -tupl | grep ${masterport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${masterport} | grep udp | awk '{ print $2 }')" + echo -e "Game: Master: \t${masterport} \t$(ss -tupl | grep -c "${masterport}") \t$(ss -tupl | grep "${masterport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${masterport}" | grep udp | awk '{ print $2 }')" else echo -e "Game: Master:" fi if [ -v steamport ]; then - echo -e "Steam: \t${steamport} \t$(ss -tupl | grep -c ${steamport}) \t$(ss -tupl | grep ${steamport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${steamport} | grep udp | awk '{ print $2 }')" + echo -e "Steam: \t${steamport} \t$(ss -tupl | grep -c "${steamport}") \t$(ss -tupl | grep "${steamport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${steamport}" | grep udp | awk '{ print $2 }')" else echo -e "Steam:" fi - if [ -v steamauthport ]; then - echo -e "Steam: Auth: \t${steamauthport} \t$(ss -tupl | grep -c ${steamauthport}) \t$(ss -tupl | grep ${steamauthport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${steamauthport} | grep udp | awk '{ print $2 }')" + if [ -v steamworksport ]; then + echo -e "Steamworks P2P: \t${steamworksport} \t$(ss -tupl | grep -c "${steamworksport}") \t$(ss -tupl | grep "${steamworksport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${steamworksport}" | grep udp | awk '{ print $2 }')" else - echo -e "Steam: Auth:" + echo -e "Steamworks P2P:" fi - if [ -v steammasterport ]; then - echo -e "Steam: Master: \t${steammasterport} \t$(ss -tupl | grep -c ${steammasterport}) \t$(ss -tupl | grep ${steammasterport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${steammasterport} | grep udp | awk '{ print $2 }')" + if [ -v steamauthport ]; then + echo -e "Steam: Auth: \t${steamauthport} \t$(ss -tupl | grep -c "${steamauthport}") \t$(ss -tupl | grep "${steamauthport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${steamauthport}" | grep udp | awk '{ print $2 }')" else - echo -e "Steam: Master:" + echo -e "Steam: Auth:" fi - if [ -v steamqueryport ]; then - echo -e "Steam: Query: \t${steamqueryport} \t$(ss -tupl | grep -c ${steamqueryport}) \t$(ss -tupl | grep ${steamqueryport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${steamqueryport} | grep udp | awk '{ print $2 }')" - else - echo -e "Steam: Query:" - fi if [ -v beaconport ]; then - echo -e "Beacon: \t${beaconport} \t$(ss -tupl | grep -c ${beaconport}) \t$(ss -tupl | grep ${beaconport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${beaconport} | grep udp | awk '{ print $2 }')" + echo -e "Beacon: \t${beaconport} \t$(ss -tupl | grep -c "${beaconport}") \t$(ss -tupl | grep "${beaconport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${beaconport}" | grep udp | awk '{ print $2 }')" else echo -e "Beacon:" fi if [ -v appport ]; then - echo -e "App: \t${appport} \t$(ss -tupl | grep -c ${appport}) \t$(ss -tupl | grep ${appport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${appport} | grep udp | awk '{ print $2 }')" + echo -e "App: \t${appport} \t$(ss -tupl | grep -c "${appport}") \t$(ss -tupl | grep "${appport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${appport}" | grep udp | awk '{ print $2 }')" else echo -e "App:" fi if [ -v telnetport ]; then - echo -e "Telnet: \t${telnetport} \t$(ss -tupl | grep -c ${telnetport}) \t$(ss -tupl | grep ${telnetport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${telnetport} | grep udp | awk '{ print $2 }')" + echo -e "Telnet: \t${telnetport} \t$(ss -tupl | grep -c "${telnetport}") \t$(ss -tupl | grep "${telnetport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${telnetport}" | grep udp | awk '{ print $2 }')" else echo -e "Telnet:" fi if [ -v sourcetvport ]; then - echo -e "SourceTV: \t${sourcetvport} \t$(ss -tupl | grep -c ${sourcetvport}) \t$(ss -tupl | grep ${sourcetvport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${sourcetvport} | grep udp | awk '{ print $2 }')" + echo -e "SourceTV: \t${sourcetvport} \t$(ss -tupl | grep -c "${sourcetvport}") \t$(ss -tupl | grep "${sourcetvport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${sourcetvport}" | grep udp | awk '{ print $2 }')" else echo -e "SourceTV:" fi if [ -v fileport ]; then - echo -e "File: \t${fileport} \t$(ss -tupl | grep -c ${fileport}) \t$(ss -tupl | grep ${fileport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${fileport} | grep udp | awk '{ print $2 }')" + echo -e "File: \t${fileport} \t$(ss -tupl | grep -c "${fileport}") \t$(ss -tupl | grep "${fileport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${fileport}" | grep udp | awk '{ print $2 }')" else echo -e "File:" fi if [ -v udplinkport ]; then - echo -e "UDP Link: \t${udplinkport} \t$(ss -tupl | grep -c ${udplinkport}) \t$(ss -tupl | grep ${udplinkport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${udplinkport} | grep udp | awk '{ print $2 }')" + echo -e "UDP Link: \t${udplinkport} \t$(ss -tupl | grep -c "${udplinkport}") \t$(ss -tupl | grep "${udplinkport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${udplinkport}" | grep udp | awk '{ print $2 }')" else echo -e "UDP Link:" fi if [ -v voiceport ]; then - echo -e "Voice: \t${voiceport} \t$(ss -tupl | grep -c ${voiceport}) \t$(ss -tupl | grep ${voiceport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${voiceport} | grep udp | awk '{ print $2 }')" + echo -e "Voice: \t${voiceport} \t$(ss -tupl | grep -c "${voiceport}") \t$(ss -tupl | grep "${voiceport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${voiceport}" | grep udp | awk '{ print $2 }')" else echo -e "Voice:" fi if [ -v voiceunusedport ]; then - echo -e "Voice (Unused): \t${voiceunusedport} \t$(ss -tupl | grep -c ${voiceunusedport}) \t$(ss -tupl | grep ${voiceunusedport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${voiceunusedport} | grep udp | awk '{ print $2 }')" + echo -e "Voice (Unused): \t${voiceunusedport} \t$(ss -tupl | grep -c "${voiceunusedport}") \t$(ss -tupl | grep "${voiceunusedport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${voiceunusedport}" | grep udp | awk '{ print $2 }')" else echo -e "Voice (Unused):" fi if [ -v battleeyeport ]; then - echo -e "BattleEye: \t${battleeyeport} \t$(ss -tupl | grep -c ${battleeyeport}) \t$(ss -tupl | grep ${battleeyeport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${battleeyeport} | grep udp | awk '{ print $2 }')" + echo -e "BattleEye: \t${battleeyeport} \t$(ss -tupl | grep -c "${battleeyeport}") \t$(ss -tupl | grep "${battleeyeport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${battleeyeport}" | grep udp | awk '{ print $2 }')" else echo -e "BattleEye:" fi if [ -v statsport ]; then - echo -e "Stats: \t${battleeyeport} \t$(ss -tupl | grep -c ${statsport}) \t$(ss -tupl | grep ${statsport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${statsport} | grep udp | awk '{ print $2 }')" + echo -e "Stats: \t${battleeyeport} \t$(ss -tupl | grep -c "${statsport}") \t$(ss -tupl | grep "${statsport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${statsport}" | grep udp | awk '{ print $2 }')" else echo -e "Stats:" fi diff --git a/lgsm/modules/command_sponsor.sh b/lgsm/modules/command_sponsor.sh old mode 100644 new mode 100755 diff --git a/lgsm/modules/core_functions.sh b/lgsm/modules/core_functions.sh old mode 100755 new mode 100644 diff --git a/lgsm/modules/core_getopt.sh b/lgsm/modules/core_getopt.sh index 222ad0cf8..c758409c5 100644 --- a/lgsm/modules/core_getopt.sh +++ b/lgsm/modules/core_getopt.sh @@ -50,6 +50,7 @@ cmd_install_squad_license=("li;license" "install_squad_license.sh" "Add your Squ cmd_fastdl=("fd;fastdl" "command_fastdl.sh" "Build a FastDL directory.") # Dev commands. cmd_dev_debug=("dev;developer" "command_dev_debug.sh" "Enable developer Mode.") +cmd_dev_details=("ddt;detect-details" "command_dev_details.sh" "Display parsed details.") cmd_dev_detect_deps=("dd;detect-deps" "command_dev_detect_deps.sh" "Detect required dependencies.") cmd_dev_detect_glibc=("dg;detect-glibc" "command_dev_detect_glibc.sh" "Detect required glibc.") cmd_dev_detect_ldd=("dl;detect-ldd" "command_dev_detect_ldd.sh" "Detect required dynamic dependencies.") @@ -145,7 +146,7 @@ currentopt+=("${cmd_install[@]}" "${cmd_auto_install[@]}") ## Developer commands. currentopt+=("${cmd_dev_debug[@]}") if [ -f ".dev-debug" ]; then - currentopt+=("${cmd_dev_detect_deps[@]}" "${cmd_dev_detect_glibc[@]}" "${cmd_dev_detect_ldd[@]}" "${cmd_dev_query_raw[@]}" "${cmd_dev_clear_modules[@]}") + currentopt+=("${cmd_dev_details[@]}" "${cmd_dev_detect_deps[@]}" "${cmd_dev_detect_glibc[@]}" "${cmd_dev_detect_ldd[@]}" "${cmd_dev_query_raw[@]}" "${cmd_dev_clear_modules[@]}") fi ## Sponsor. @@ -183,7 +184,7 @@ fn_opt_usage() { core_exit.sh } -# Check if command existw and run corresponding scripts, or display script usage. +# Check if command exists and run corresponding scripts, or display script usage. if [ -z "${getopt}" ]; then fn_opt_usage fi diff --git a/lgsm/modules/core_legacy.sh b/lgsm/modules/core_legacy.sh index 2ed942abd..e9e5c9206 100644 --- a/lgsm/modules/core_legacy.sh +++ b/lgsm/modules/core_legacy.sh @@ -15,6 +15,30 @@ for legacy_version in "${legacy_versions_array[@]}"; do fi done +if [ -n "${webadminuser}" ]; then + httpuser="${webadminuser}" +fi + +if [ -n "${webadminpass}" ]; then + httppassword="${webadminpass}" +fi + +if [ -n "${webadminport}" ]; then + httpport="${webadminport}" +fi + +if [ -n "${webadminip}" ]; then + httpip="${webadminip}" +fi + +if [ -n "${gameworld}" ]; then + worldname="${gameworld}" +fi + +if [ -n "${autosaveinterval}" ]; then + saveinterval="${autosaveinterval}" +fi + if [ -z "${serverfiles}" ]; then serverfiles="${filesdir}" fi diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index 81a7a5ab6..dd5334e5a 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -299,6 +299,11 @@ command_dev_debug.sh() { fn_fetch_module } +command_dev_details.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + command_dev_detect_deps.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module diff --git a/lgsm/modules/fix_cmw.sh b/lgsm/modules/fix_cmw.sh index 6b8f1caa8..2a98d9e53 100644 --- a/lgsm/modules/fix_cmw.sh +++ b/lgsm/modules/fix_cmw.sh @@ -17,7 +17,9 @@ fi if [ ! -f "${servercfgfullpath}" ]; then fn_fix_msg_start fixname="copy config" - mkdir "${servercfgdir}" + if [ ! -d "${servercfgdir}" ]; then + mkdir -p "${servercfgdir}" + fi cp "${systemdir}/UDKGame/Config/"*.ini "${servercfgdir}" fn_fix_msg_end fi diff --git a/lgsm/modules/fix_ro.sh b/lgsm/modules/fix_ro.sh index 5dd1d3fb8..f094c6b38 100644 --- a/lgsm/modules/fix_ro.sh +++ b/lgsm/modules/fix_ro.sh @@ -7,12 +7,12 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -echo -e "Applying WebAdmin ROOst.css fix." +echo -e "Applying webinterface ROOst.css fix." echo -e "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13" sed -i 's/none}/none;/g' "${serverfiles}/Web/ServerAdmin/ROOst.css" sed -i 's/underline}/underline;/g' "${serverfiles}/Web/ServerAdmin/ROOst.css" fn_sleep_time -echo -e "Applying WebAdmin CharSet fix." +echo -e "Applying webinterface CharSet fix." echo -e "http://forums.tripwireinteractive.com/showpost.php?p=442340&postcount=1" sed -i 's/CharSet="iso-8859-1"/CharSet="utf-8"/g' "${systemdir}/uweb.int" fn_sleep_time diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 59e8d37fa..ff77f8471 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -5,2310 +5,2103 @@ # Website: https://linuxgsm.com # Description: Gathers various game server information. +# shellcheck disable=SC2317 moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -## Examples of filtering to get info from config files. -# sed 's/foo//g' - remove foo -# tr -cd '[:digit:]' leave only digits -# tr -d '=\"; ' remove selected characters =\"; -# grep -v "foo" filter out lines that contain foo -# cut -f1 -d "/" remove everything after / - +# Config Type: ini +# Comment: ; or # +# Note: this ini filter does not filter by section. Can cause issues with some games that have multiple sections with the same variable name. +fn_info_game_ini() { + # sed is used to process the file. + # -n: Suppresses automatic printing of pattern space. + # /^\<'"${2}"'\>/: Matches lines starting with the word provided as the second argument ($2), considering it as a whole word. + # { s/.*= *"\?\([^"]*\)"\?/\1/p;q }: Command block executed for lines that match the pattern. + # - s/.*= *"\?\([^"]*\)"\?/\1/: Matches and captures the value after an equals sign (=), possibly surrounded by optional double quotes. + # - .*: Matches any characters before the equals sign. + # - = *"\?: Matches the equals sign and any optional spaces before an optional double quote. + # - \([^"]*\): Captures any characters that are not double quotes. + # - "\?: Matches an optional double quote. + # - /1: Replaces the entire matched pattern with the captured value. + # - p: Prints the modified line. + # - q: Quits processing after modifying and printing the line. + + if [ -n "${3}" ]; then + servercfgparse="${3}" + else + servercfgparse="${servercfgfullpath}" + fi + eval "${1}=\"$(sed -n '/^\<'"${2}"'\>/ { s/.*= *\"\?\([^"]*\)\"\?/\1/p;q }' "${servercfgparse}" | tr -d '\r')\"" + configtype="ini" +} + +# Config Type: custom +# Comment: ; or # +# Note: this ini filter does not filter by section. Can cause issues with some games that have multiple sections with the same variable name. +fn_info_game_keyvalue_pairs() { + # sed is used to process the file. + # -n: Suppresses automatic printing of pattern space. + # /^\<'"${2}"'\>/: Matches lines starting with the word provided as the second argument ($2), considering it as a whole word. + # { s/.*= *"\?\([^"]*\)"\?/\1/p;q }: Command block executed for lines that match the pattern. + # - s/.*= *"\?\([^"]*\)"\?/\1/: Matches and captures the value after an equals sign (=), possibly surrounded by optional double quotes. + # - .*: Matches any characters before the equals sign. + # - = *"\?: Matches the equals sign and any optional spaces before an optional double quote. + # - \([^"]*\): Captures any characters that are not double quotes. + # - "\?: Matches an optional double quote. + # - /1: Replaces the entire matched pattern with the captured value. + # - p: Prints the modified line. + # - q: Quits processing after modifying and printing the line. + + if [ -n "${3}" ]; then + servercfgparse="${3}" + else + servercfgparse="${servercfgfullpath}" + fi + eval "${1}=\"$(sed -n '/^\<'"${2}"'\>/ { s/.*= *\"\?\([^"]*\)\"\?/\1/p;q }' "${servercfgparse}" | tr -d '\r')\"" + configtype="keyvalue_pairs" +} + +# Config Type: QuakeC +# Comment: // or /* */ +fn_info_game_quakec() { + # -n: Suppresses automatic printing of pattern space. + # /^[[:space:]]*\<'"${2}"'\>/: Matches lines starting with optional leading whitespace and the word provided as the second argument ($2), considering it as a whole word. + # { s/.* *"\?\([^"]*\)"\?/\1/p;q }: Command block executed for lines that match the pattern. + # - s/.* *"\?\([^"]*\)"\?/\1/: Matches and captures the value after any number of spaces, possibly surrounded by optional double quotes. + # - .*: Matches any characters before the spaces. + # - *: Matches any number of spaces. + # - "\?: Matches an optional double quote. + # - \([^"]*\): Captures any characters that are not double quotes. + # - "\?: Matches an optional double quote. + # - /1: Replaces the entire matched pattern with the captured value. + # - p: Prints the modified line. + # - q: Quits processing after modifying and printing the line. + + if [ -n "${3}" ]; then + servercfgparse="${3}" + else + servercfgparse="${servercfgfullpath}" + fi + eval "${1}=\"$(sed -n '/[[:space:]]\<'"${2}"'\>/ { s/.* *\"\?\([^"]*\)\"\?/\1/p;q }' "${servercfgparse}" | tr -d '\r')\"" + configtype="quakec" +} + +# Config Type: json +# Comment: // or /* */ +fn_info_game_json() { + if [ -n "${3}" ]; then + servercfgparse="${3}" + else + servercfgparse="${servercfgfullpath}" + fi + eval "${1}=\"$(jq -r "${2}" "${servercfgfullpath}")\"" + configtype="json" +} + +# Config Type: SQF +# Comment: // or /* */ +fn_info_game_sqf() { + # sed is the command itself, indicating that we want to use the sed utility. + # -n: Suppresses automatic printing of pattern space. + # /^\<'"${2}"'\>/: Matches lines starting with the word provided as the second argument ($2), considering it as a whole word. + # { s/.*= *"\?\([^"]*\)"\?/\1/;s/;$//p;q }: Command block executed for lines that match the pattern. + # - s/.*= *"\?\([^"]*\)"\?/\1/: Matches and captures the value after an equals sign (=), possibly surrounded by optional double quotes. + # - .*: Matches any characters before the equals sign. + # - = *"\?: Matches the equals sign and any optional spaces before an optional double quote. + # - \([^"]*\): Captures any characters that are not double quotes. + # - "\?: Matches an optional double quote. + # - /1: Replaces the entire matched pattern with the captured value. + # - s/;$//: Removes a semicolon (;) at the end of the line, if present. + # - p: Prints the modified line. + # - q: Quits processing after modifying and printing the line. + + if [ -n "${3}" ]; then + servercfgparse="${3}" + else + servercfgparse="${servercfgfullpath}" + fi + eval "${1}=\"$(sed -n '/^\<'"${2}"'\>/ { s/.*= *"\?\([^"]*\)"\?/\1/;s/;$//p;q }' "${servercfgparse}" | tr -d '\r')\"" + configtype="sqf" +} + +# Config Type: XML +# Comment: +fn_info_game_xml() { + if [ -n "${3}" ]; then + servercfgparse="${3}" + else + servercfgparse="${servercfgfullpath}" + fi + eval "${1}"="$(xmllint --xpath "string(${2})" "${servercfgparse}")" + configtype="xml" +} + +# Config Type: Valve KeyValues +# Comment: // +fn_info_game_valve_keyvalues() { + # sed is used to process the file. + # -n: Suppresses automatic printing of pattern space. + # /^[[:space:]]*\<'"${2}"'\>/: Matches lines starting with optional leading whitespace and the word provided as the second argument ($2), considering it as a whole word. + # { s/.* *"\?\([^"]*\)"\?/\1/p;q }: Command block executed for lines that match the pattern. + # - s/.* *"\?\([^"]*\)"\?/\1/: Matches and captures the value after any number of spaces, possibly surrounded by optional double quotes. + # - .*: Matches any characters before the spaces. + # - *: Matches any number of spaces. + # - "\?: Matches an optional double quote. + # - \([^"]*\): Captures any characters that are not double quotes. + # - "\?: Matches an optional double quote. + # - /1: Replaces the entire matched pattern with the captured value. + # - p: Prints the modified line. + # - q: Quits processing after modifying and printing the line. + + if [ -n "${3}" ]; then + servercfgparse="${3}" + else + servercfgparse="${servercfgfullpath}" + fi + eval "${1}=\"$(sed -n '/^\<'"${2}"'\>/ { s/.* *"\?\([^"]*\)"\?/\1/p;q }' "${servercfgparse}" | tr -d '\r')\"" + configtype="valve_keyvalues" +} + +# Config Type: Java properties +# Comment: # or ! +fn_info_game_java_properties() { + # sed is used to process the file. + # -n: Suppresses automatic printing of pattern space. + # /^\<'"${2}"'\>/: Matches lines starting with the word provided as the second argument ($2), considering it as a whole word. + # { s/.*= *"\?\([^"]*\)"\?/\1/p;q }: Command block executed for lines that match the pattern. + # - s/.*= *"\?\([^"]*\)"\?/\1/: Matches and captures the value after an equals sign (=), possibly surrounded by optional double quotes. + # - .*: Matches any characters before the equals sign. + # - = *"\?: Matches the equals sign and any optional spaces before an optional double quote. + # - \([^"]*\): Captures any characters that are not double quotes. + # - "\?: Matches an optional double quote. + # - /1: Replaces the entire matched pattern with the captured value. + # - p: Prints the modified line. + # - q: Quits processing after modifying and printing the line. + + if [ -n "${3}" ]; then + servercfgparse="${3}" + else + servercfgparse="${servercfgfullpath}" + fi + eval "${1}=\"$(sed -n '/^\<'"${2}"'\>/ { s/.*= *\"\?\([^"]*\)\"\?/\1/p;q }' "${servercfgparse}" | tr -d '\r')\"" + configtype="java" +} + +# Config Type: ini +# Comment: ; or # +# Note: this ini filter does not filter by section. Can cause issues with some games that have multiple sections with the same variable name. +fn_info_game_lua() { + # - The '-n' option suppresses automatic printing of pattern space. + # - The pattern '/^[[:space:]]*\<'"${2}"'\>/' matches lines that begin with optional whitespace characters, + # followed by the exact word specified by the second argument. + # - If the pattern matches, the following actions are performed within the curly braces: + # - 's/.*= *"\?\([^"]*\)"\?/\1/' extracts the value within double quotes after an equal sign (if present), + # removing any leading or trailing spaces. + # - 's#,.*##' removes everything after the first comma encountered. + # - 'p' prints the modified pattern space. + # - 'q' quits processing after printing the modified pattern space. + + if [ -n "${3}" ]; then + servercfgparse="${3}" + else + servercfgparse="${servercfgfullpath}" + fi + eval "${1}=\"$(sed -n '/^[[:space:]]*\<'"${2}"'\>/ { s/.*= *"\?\([^"]*\)"\?/\1/;s#,.*##;p;q }' "${servercfgparse}" | tr -d '\r')\"" + configtype="lua" +} + +# Config Type: custom (Project Cars) +# Comment: // +fn_info_game_pc_config() { + # sed is used to process the file. + # -n: Suppresses automatic printing of pattern space. + # /^\<'"${2}"'\>/: Matches lines starting with the word provided as the second argument ($2), considering it as a whole word. + # { s/.*: *"\?\([^"]*\)"\?/\1/p;q }: Command block executed for lines that match the pattern. + # - s/.*: *"\?\([^"]*\)"\?/\1/: Matches and captures the value after an equals sign (=), possibly surrounded by optional double quotes. + # - .*: Matches any characters before the equals sign. + # - : *"\?: Matches the : sign and any optional spaces before an optional double quote. + # - \([^"]*\): Captures any characters that are not double quotes. + # - "\?: Matches an optional double quote. + # - /1: Replaces the entire matched pattern with the captured value. + # - p: Prints the modified line. + # - q: Quits processing after modifying and printing the line. + + if [ -n "${3}" ]; then + servercfgparse="${3}" + else + servercfgparse="${servercfgfullpath}" + fi + eval "${1}=\"$(sed -n '/^\<'"${2}"'\>/ { s/.*: *\"\?\([^"]*\)\"\?/\1/p;q }' "${servercfgparse}" | tr -d '\r')\"" + configtype="pc_config" +} + +# Config Type: ini +# Parameters: false +# Comment: ; or # +# Example: NAME=SERVERNAME +# Filetype: ini fn_info_game_ac() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - adminpassword="${unavailable}" - httpport="${zero}" - port="${zero}" - queryport="${zero}" - servername="${unavailable}" - else - adminpassword=$(grep "ADMIN_PASSWORD" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/ADMIN_PASSWORD//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - httpport=$(grep "HTTP_PORT" "${servercfgfullpath}" | tr -cd '[:digit:]') - port=$(grep "TCP_PORT" "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport="${httpport}" - servername=$(grep "NAME" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/NAME//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | head -n 1) - - # Not set - adminpassword=${adminpassword:-"NOT SET"} - httpport=${httpport:-"0"} - port=${port:-"0"} - queryport=${queryport:-"0"} - servername=${servername:-"NOT SET"} - - fi -} - + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_ini "adminpassword" "ADMIN_PASSWORD" + fn_info_game_ini "httpport" "HTTP_PORT" + fn_info_game_ini "port" "TCP_PORT" + fn_info_game_ini "servername" "NAME" + fn_info_game_ini "serverpassword" "PASSWORD" + fi + adminpassword="${adminpassword:-NOT SET}" + httpport="${httpport:-0}" + port="${port:-0}" + queryport="${httpport:-0}" + servername="${servername:-NOT SET}" + serverpassword="${serverpassword:-NOT SET}" +} + +# Config Type: ini +# Parameters: true +# Comment: ; or # +# Example: SessionName=SERVERNAME +# Filetype: ini fn_info_game_ark() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - adminpassword="${unavailable}" - servername="${unavailable}" - serverpassword="${unavailable}" - else - adminpassword=$(sed -nr 's/^ServerAdminPassword=(.*)/\1/p' "${servercfgfullpath}") - servername=$(sed -nr 's/^SessionName=(.*)/\1/p' "${servercfgfullpath}") - serverpassword=$(sed -nr 's/^ServerPassword=(.*)/\1/p' "${servercfgfullpath}") - - # Not set - adminpassword=${adminpassword:-"NOT SET"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - fi - - # Parameters - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - queryport=${queryport:-"0"} - rawport=$((port + 1)) - rconport=${rconport:-"0"} -} - + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_ini "adminpassword" "ServerAdminPassword" + fn_info_game_ini "servername" "SessionName" + fn_info_game_ini "serverpassword" "ServerPassword" + fi + adminpassword="${adminpassword:-"NOT SET"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${queryport:-"0"}" + rawport="$((port + 1))" + rconport="${rconport:-"0"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" +} + +# Config Type: SQF +# Parameters: true +# Comment: // or /* */ +# Example: serverName = "SERVERNAME"; +# Filetype: cfg fn_info_game_arma3() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - adminpassword="${unavailable}" - maxplayers="${zero}" - servername="${unavailable}" - serverpassword="${unavailable}" - else - adminpassword=$(sed -nr 's/^passwordAdmin\s*=\s*"(.*)"\s*;/\1/p' "${servercfgfullpath}") - maxplayers=$(sed -nr 's/^maxPlayers\s*=\s*([0-9]+)\s*;/\1/p' "${servercfgfullpath}") - servername=$(sed -nr 's/^hostname\s*=\s*"(.*)"\s*;/\1/p' "${servercfgfullpath}") - serverpassword=$(sed -nr 's/^password\s*=\s*"(.*)"\s*;/\1/p' "${servercfgfullpath}") - - # Not set - adminpassword=${adminpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - fi - - # Parameters - battleeyeport=$((port + 4)) - port=${port:-"2302"} - queryport=$((port + 1)) - steammasterport=$((port + 2)) - voiceport=${port:-"2302"} - voiceunusedport=$((port + 3)) -} - -fn_info_game_armar() { - if [ ! -f "${servercfgfullpath}" ]; then - adminpassword="${unavailable}" - maxplayers="${zero}" - port=${port:-"0"} - queryport= - servername="${unavailable}" - serverpassword="${unavailable}" - else - adminpassword=$(jq -r '.adminPassword' "${servercfgfullpath}") - battleeyeport=1376 - configip=$(jq -r '.gameHostBindAddress' "${servercfgfullpath}") - maxplayers=$(jq -r '.game.playerCountLimit' "${servercfgfullpath}") - port=$(jq -r '.gameHostBindPort' "${servercfgfullpath}") - queryport=$(jq -r '.steamQueryPort' "${servercfgfullpath}") - servername=$(jq -r '.game.name' "${servercfgfullpath}") - serverpassword=$(jq -r '.game.password' "${servercfgfullpath}") - - # Not set - adminpassword=${adminpassword:-"NOT SET"} - configip=${configip:-"0.0.0.0"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - queryport=${queryport:-"0"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - fi -} - + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_sqf "adminpassword" "passwordAdmin" + fn_info_game_sqf "maxplayers" "maxPlayers" + fn_info_game_sqf "servername" "hostname" + fn_info_game_sqf "serverpassword" "password" + fi + adminpassword="${adminpassword:-"NOT SET"}" + battleeyeport="$((port + 4))" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="$((port + 1))" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + steamport="$((port + 2))" + voiceport="${port:-"0"}" + voiceunusedport="$((port + 3))" +} + +# Config Type: ini +# Parameters: true +# Comment: ; or # +# Example: serverName=SERVERNAME +# Filetype: ini fn_info_game_av() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - maxplayers="${unavailable}" - servername="${unavailable}" - serverpassword="${unavailable}" - port=${zero} - queryport=${zero} - steamqueryport=${zero} - steammasterport=${zero} - rconport=${zero} - rconenabled="${unavailable}" - rconpassword="${unavailable}" - else - maxplayers=$(grep "maxPlayers=" "${servercfgfullpath}" | sed 's/maxPlayers=//') - servername=$(grep "name=" "${servercfgfullpath}" | sed 's/name=//') - serverpassword=$(grep "password=" "${servercfgfullpath}" | sed 's/password=//') - port=$(grep "port=" "${servercfgfullpath}" | sed 's/port=//') - queryport=$((port + 3)) - steamqueryport=$((port + 20)) - steammasterport=$((port + 21)) - rconport=$(grep "rconPort=" "${servercfgfullpath}" | sed 's/rconPort=//') - - rconpassword=$(grep "rconPassword=" "${servercfgfullpath}" | sed 's/rconPassword=//') + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_ini "maxplayers" "maxPlayers" + fn_info_game_ini "port" "port" + fn_info_game_ini "rconport" "rconPort" + fn_info_game_ini "servername" "name" + fn_info_game_ini "serverpassword" "password" + fn_info_game_ini "rconpassword" "rconPassword" if [ -n "${rconpassword}" ]; then rconenabled="true" fi - - # Not set - maxplayers=${maxplayers:-"0"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} - steamqueryport=${steamqueryport:-"0"} - steammasterport=${steammasterport:-"0"} - rconport=${rconport:-"0"} - rconenabled=${rconenabled:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} fi -} - -fn_info_game_bf1942() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - port="${zero}" - queryport="${zero}" - else - servername=$(grep -E "^game.serverName " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverName //g' | tr -d '=\";,:' | xargs) - serverpassword=$(grep "game.serverPassword" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/game.serverPassword//g' | tr -d '=\";,:' | xargs) - maxplayers=$(grep "game.serverMaxPlayers" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') - port=$(grep "game.serverPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') - queryport="22000" - configip=$(grep "game.serverIP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverIP//g' | tr -d '=\";,:' | xargs) - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - queryport=${queryport:-"0"} - configip=${configip:-"0.0.0.0"} + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + + rconenabled="${rconenabled:-"false"}" + rconpassword="${rconpassword:-"NOT SET"}" + rconport="${rconport:-"0"}" + # queryport is port + 3 + # this doesnt respond to any queries, using tcp query on rconport instead. + queryport="${rconport:-"0"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + steamport="$((port + 21))" + steamworksport="$((port + 20))" +} + +# Config Type: ini unknown (Source?) +# Parameters: true +# Comment: # or // +# Example: ServerName=SERVERNAME +# Filetype: txt +fn_info_game_bo() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_ini "maxplayers" "MaxPlayers" + fn_info_game_ini "port" "ServerPort" + fn_info_game_ini "servername" "ServerName" + fn_info_game_ini "serverpassword" "Password" + fi + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="$((port + 1))" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" +} + +# Config Type: ini +# Parameters: true +# Comment: ; or # +# Example: ServerName=SERVERNAME +# Filetype: ini +fn_info_game_btl() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_ini "adminpassword" "AdminPassword" + fn_info_game_ini "servername" "ServerName" + fi + adminpassword="${adminpassword:-"NOT SET"}" + port="${port:-"0"}" + queryport="${queryport:-"0"}" + rconport="$((port + 2))" + servername="${servername:-"NOT SET"}" +} + +# Config Type: ini +# Parameters: true +# Comment: ; or # +# Example: ServerName=SERVERNAME +# Filetype: ini +fn_info_game_cmw() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_ini "maxplayers" "MaxPlayers" + fn_info_game_ini "servername" "ServerName" + fn_info_game_ini "serverpassword" "GamePassword" + fn_info_game_ini "rconport" "RConPort" "${servercfgdir}/DefaultGame.ini" + fi + defaultmap="${defaultmap:-"NOT SET"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${queryport:-"0"}" + rconport="${rconport:-"0"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" +} + +# Config Type: ini +# Parameters: true +# Comment: ; or # +# Example: iMaxClanMembers=1024 +# Filetype: ini +fn_info_game_dodr() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_ini "maxplayers" "iMaxPlayers" fi + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${queryport:-"0"}" + servername="${servername:-"NOT SET"}" } -fn_info_game_bfv() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - port="${zero}" - queryport="${zero}" - else - servername=$(grep "game.serverName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverName//g' | tr -d '=\";,:' | xargs) - serverpassword=$(grep "game.serverPassword" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/game.serverPassword//g' | tr -d '=\";,:' | xargs) - maxplayers=$(grep "game.serverMaxPlayers" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') - port=$(grep "game.serverPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') - queryport="23000" - configip=$(grep "game.serverIP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverIP//g' | tr -d '=\";,:' | xargs) - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - queryport=${queryport:-"0"} - configip=${configip:-"0.0.0.0"} +# Config Type: ini +# Parameters: true +# Comment: ; or # +# Example: cluster_name = SERVERNAME +# Filetype: ini +fn_info_game_dst() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_ini "port" "server_port" + fn_info_game_ini "steamauthport" "authentication_port" + fn_info_game_ini "steamport" "master_server_port" + fi + if [ -f "${clustercfgfullpath}" ]; then + fn_info_game_ini "maxplayers" "max_players" "${clustercfgfullpath}" + fn_info_game_ini "servername" "cluster_name" "${clustercfgfullpath}" + fn_info_game_ini "serverpassword" "cluster_password" "${clustercfgfullpath}" + fn_info_game_ini "tickrate" "tick_rate" "${clustercfgfullpath}" + fn_info_game_ini "masterport" "master_port" "${clustercfgfullpath}" + fn_info_game_ini "gamemode" "game_mode" "${clustercfgfullpath}" + fn_info_game_ini "configip" "bind_ip" "${clustercfgfullpath}" + fi + + cave="${cave:-"NOT SET"}" + cluster="${cluster:-"NOT SET"}" + configip="${configip:-"0.0.0.0"}" + gamemode="${gamemode:-"NOT SET"}" + master="${master:-"NOT SET"}" + masterport="${masterport:-"0"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + shard="${shard:-"NOT SET"}" + sharding="${sharding:-"NOT SET"}" + steamauthport="${steamauthport:-"0"}" + steamport="${steamport:-"0"}" + tickrate="${tickrate:-"0"}" +} + +# Config Type: ini +# Parameters: true +# Comment: ; or # +# Example: ServerName=SERVERNAME +# Filetype: ini +fn_info_game_kf() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_ini "adminpassword" "AdminPassword" + fn_info_game_ini "httpenabled" "bEnabled" + fn_info_game_ini "httppassword" "httppasswordword" + fn_info_game_ini "httpport" "ListenPort" + fn_info_game_ini "httpuser" "AdminName" + fn_info_game_ini "lanport" "LANServerPort" + fn_info_game_ini "maxplayers" "MaxPlayers" + fn_info_game_ini "port" "Port" + fn_info_game_ini "queryportgs" "QueryPort" + fn_info_game_ini "servername" "ServerName" + fn_info_game_ini "serverpassword" "GamePassword" + fi + adminpassword="${adminpassword:-"NOT SET"}" + defaultmap="${defaultmap:-"NOT SET"}" + httpenabled="${httpenabled:-"NOT SET"}" + httppassword="${adminpassword}" + httpport="${httpport:-"0"}" + httpuser="${httpuser:-"NOT SET"}" + lanport="${lanport:-"0"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="$((port + 1))" + queryportgs="${queryportgs:-"0"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + steamport="28852" + steamworksport="20560" +} + +# Config Type: ini +# Parameters: true +# Comment: ; or # +# Example: ServerName=SERVERNAME +# Filetype: ini +fn_info_game_kf2() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_ini "adminpassword" "AdminPassword" + fn_info_game_ini "httpport" "ListenPort" "${servercfgdir}/KFWeb.ini" + fn_info_game_ini "port" "Port" + fn_info_game_ini "servername" "ServerName" + fn_info_game_ini "serverpassword" "GamePassword" + fn_info_game_ini "httpenabled" "bEnabled" + fn_info_game_ini "httppassword" "httppasswordword" + fi + adminpassword="${adminpassword:-"NOT SET"}" + defaultmap="${defaultmap:-"NOT SET"}" + httpport="${httpport:-"0"}" + port="${port:-"0"}" + queryport="${queryport:-"0"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + httpenabled="${httpenabled:-"NOT SET"}" + httppassword="${httppassword:-"NOT SET"}" + httpuser="Admin" +} + +# Config Type: ini +# Parameters: true +# Comment: ; or # +# Example: ServerName=SERVERNAME +# Filetype: ini +fn_info_game_mh() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_ini "servername" "ServerName" + fn_info_game_ini "serverpassword" "ServerPassword" + fn_info_game_ini "rconpassword" "AdminPassword" + fn_info_game_ini "maxplayers" "MaxSlots" + fi + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + rconpassword="${rconpassword:-"NOT SET"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${queryport:-"0"}" + beaconport="${beaconport:-"0"}" +} + +# Config Type: ini +# Parameters: true +# Comment: ; or # +# Example: ServerName="SERVERNAME" +# Filetype: cfg +fn_info_game_pstbs() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_ini "servername" "ServerName" + fn_info_game_ini "maxplayers" "MaxPlayers" + fn_info_game_ini "reservedslots" "NumReservedSlots" + fn_info_game_ini "serverpassword" "ServerPassword" + fi + if [ -f "${servercfgdir}/Rcon.cfg" ]; then + fn_info_game_ini "rconpassword" "Password" "${servercfgdir}/Rcon.cfg" + fn_info_game_ini "rconport" "Port" "${servercfgdir}/Rcon.cfg" + fi + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + if [ -z "${queryport}" ]; then + queryport="${port:-"0"}" fi -} - -fn_info_game_bo() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - port="${zero}" - queryport="${zero}" - maxplayers="${unavailable}" - else - servername=$(grep "ServerName=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "Password=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - port=$(grep "ServerPort=" "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport=$((port + 1)) - maxplayers=$(grep "MaxPlayers=" "${servercfgfullpath}" | tr -cd '[:digit:]') - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} - maxplayers=${maxplayers:-"0"} + randommap="${randommap:-"NOT SET"}" + if [ -z "${rconpassword}" ] || [ "${#rconpassword}" == 1 ]; then + rconpassword="NOT SET" fi + rconport="${rconport:-"0"}" + reservedslots="${reservedslots:-"0"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + tickrate="${tickrate:-"0"}" } -fn_info_game_bt() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - port="${zero}" - queryport="${zero}" - maxplayers="${unavailable}" - else - servername=$(grep -Po 'name="\K.*(?=")' "${servercfgfullpath}") # Assuming GNU grep is used - serverpassword=$(grep -Po 'password="\K.*(?=")' "${servercfgfullpath}") # Assuming GNU grep is used - port=$(grep " port=" "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport=$(grep "queryport=" "${servercfgfullpath}" | tr -cd '[:digit:]') - maxplayers=$(grep "maxplayers=" "${servercfgfullpath}" | tr -cd '[:digit:]') - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} - maxplayers=${maxplayers:-"0"} +# Config Type: ini +# Parameters: false +# Comment: ; or # +# Example: ServerName=SERVERNAME +# Filetype: cfg +fn_info_game_pvr() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_ini "servername" "ServerName" + fn_info_game_ini "maxplayers" "MaxPlayers" fi + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + port401="$((port + 400))" + queryport="${port:-"0"}" + servername="${servername:-"NOT SET"}" } -fn_info_game_btl() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - gamemode="${unavailable}" - else - servername=$(grep -m2 "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "Password" "${servercfgfullpath}" | grep -v "RCONPassword" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - gamemode=$(grep -m2 "PlayMode" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/PlayMode//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - gamemode=${gamemode:-"NOT SET"} - fi - - # Parameters - port=${port:-"0"} - queryport=${queryport:-"0"} - rconport=$((port + 2)) +# Config Type: ini +# Parameters: true +# Comment: ; or # +# Example: PublicName=SERVERNAME +# Filetype: ini +fn_info_game_pz() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_ini "maxplayers" "MaxPlayers" + fn_info_game_ini "port" "DefaultPort" + fn_info_game_ini "rconpassword" "RCONPassword" + fn_info_game_ini "servername" "PublicName" + fn_info_game_ini "serverpassword" "Password" + fn_info_game_ini "worldname" "Map" + + fi + adminpassword="${adminpassword:-"NOT SET"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${port:-"0"}" + rconpassword="${rconpassword:-"NOT SET"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + worldname="${worldname:-"NOT SET"}" } -fn_info_game_cd() { - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - port="${zero}" - rconenabled="false" - rconport="${zero}" - rconpassword="${unavailable}" - steamport="${zero}" - maxplayers="${zero}" - else - servername=$(jq -r '.game_title' "${servercfgfullpath}") - port=$(jq -r '.game_port' "${servercfgfullpath}") - steamport=$(jq -r '.steam_port_messages' "${servercfgfullpath}") - rconenabled=$(jq -r '.rcon' "${servercfgfullpath}") - rconport=$(jq -r '.rcon_port' "${servercfgfullpath}") - rconpassword=$(jq -r '.rcon_password' "${servercfgfullpath}") - maxplayers=$(jq -r '.player_count' "${servercfgfullpath}") +# Config Type: ini +# Parameters: true +# Comment: ; or # +# Example: SERVERNAME=SERVERNAME +# Filetype: ini +fn_info_game_st() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_ini "maxplayers" "MAXPLAYER" + fn_info_game_ini "rconpassword" "RCONPASSWORD" + fn_info_game_ini "servername" "SERVERNAME" + fn_info_game_ini "serverpassword" "PASSWORD" + fi + clearinterval="${clearinterval:-"0"}" + httpport="${port:-"0"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${queryport:-"0"}" + rconpassword="${rconpassword:-"NOT SET"}" + saveinterval="${saveinterval:-"0"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + worldname="${worldname:-"NOT SET"}" + worldtype="${worldtype:-"NOT SET"}" + +} + +# Config Type: ini +# Parameters: true +# Comment: ; or # +# Example: ServerName=SERVERNAME +# Filetype: ini +fn_info_game_stn() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_ini "configip" "ServerIP" + fn_info_game_ini "port" "ServerPort" + fn_info_game_ini "servername" "ServerName" + fn_info_game_ini "serverpassword" "ServerPassword" + fi + configip="${configip:-"0.0.0.0"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="$((port + 1))" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" +} + +# Config Type: ini +# Parameters: true +# Comment: ; or # +# Example: ServerName=ServerName +# Filetype: ini +fn_info_game_ti() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_ini "servername" "ServerName" + fn_info_game_ini "maxplayers" "MaxPlayerCount" fi + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${queryport:-"0"}" + servername="${servername:-"NOT SET"}" } +# Config Type: ini +# Parameters: false +# Comment: ; or # +# Example: default_voice_port=9987 +# Filetype: ini +fn_info_game_ts3() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_ini "configip" "voice_ip" + fn_info_game_ini "dbplugin" "dbplugin" + fn_info_game_ini "fileport" "filetransfer_port" + fn_info_game_ini "port" "default_voice_port" + fn_info_game_ini "queryhttpport" "query_http_port" + fn_info_game_ini "queryhttpsport" "query_https_port" + fn_info_game_ini "queryport" "query_port" + fn_info_game_ini "querysshport" "query_ssh_port" + fi + configip="${configip:-"0.0.0.0"}" + dbplugin="${dbplugin:-"NOT SET"}" + fileport="${fileport:-"0"}" + port="${port:-"0"}" + queryhttpport="${queryhttpport:-"0"}" + queryhttpsport="${queryhttpsport:-"0"}" + queryport="${queryport:-"0"}" + querysshport="${querysshport:-"0"}" + telnetport="${queryport}" +} + +# Config Type: ini +# Parameters: true +# Comment: ; or # +# Example: ServerTitle=SERVERNAME +# Filetype: ini +fn_info_game_tu() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_ini "maxplayers" "MaxPlayers" + fn_info_game_ini "servername" "ServerTitle" + fi + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${queryport:-"0"}" + servername="${servername:-"NOT SET"}" + steamport="$((port + 1))" +} + +# Config Type: ini +# Parameters: true +# Comment: ; or # +# Example: ServerName=SERVERNAME +# Filetype: ini +fn_info_game_ut99() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_ini "adminpassword" "AdminPassword" + fn_info_game_ini "beaconport" "ServerBeaconPort" + fn_info_game_ini "port" "Port" + fn_info_game_ini "queryportgs" "OldQueryPortNumber" + fn_info_game_ini "servername" "ServerName" + fn_info_game_ini "serverpassword" "GamePassword" + fn_info_game_ini "httpenabled" "bEnabled" + fn_info_game_ini "httppassword" "AdminPassword" + fn_info_game_ini "httpport" "ListenPort" + fn_info_game_ini "httpuser" "AdminUserName" + fi + adminpassword="${adminpassword:-"NOT SET"}" + beaconport="${beaconport:-"0"}" + defaultmap="${defaultmap:-"NOT SET"}" + httpport="${httpport:-"0"}" + port="${port:-"0"}" + queryport="$((port + 1))" + queryportgs="${queryportgs:-"0"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + httpenabled="${httpenabled:-"0"}" + httppassword="${httppassword:-"NOT SET"}" + httpuser="${httpuser:-"NOT SET"}" +} + +# Config Type: ini +# Parameters: true +# Comment: ; or # +# Example: ServerName=SERVERNAME +# Filetype: ini +fn_info_game_ut3() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_ini "adminpassword" "AdminPassword" + fn_info_game_ini "maxplayers" "MaxPlayers" + fn_info_game_ini "servername" "ServerName" + fn_info_game_ini "serverpassword" "GamePassword" + fn_info_game_ini "httpenabled" "bEnabled" + fn_info_game_ini "httppassword" "AdminPassword" + fn_info_game_ini "httpport" "ListenPort" + fi + adminpassword="${adminpassword:-"NOT SET"}" + defaultmap="${defaultmap:-"NOT SET"}" + httpport="${httpport:-"0"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${queryport:-"0"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + httpenabled="${httpenabled:-"0"}" + httppassword="${httppassword:-"NOT SET"}" + httpuser="Admin" +} + +# Config Type: ini +# Parameters: true +# Comment: ; or # +# Example: ServerName=SERVERNAME +# Filetype: ini +fn_info_game_unreal2() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_ini "adminpassword" "AdminPassword" + fn_info_game_ini "httpport" "ListenPort" + fn_info_game_ini "port" "Port" + fn_info_game_ini "queryportgs" "OldQueryPortNumber" + fn_info_game_ini "servername" "ServerName" + fn_info_game_ini "serverpassword" "GamePassword" + fn_info_game_ini "httpenabled" "bEnabled" + fn_info_game_ini "httpuser" "AdminName" + fi + adminpassword="${adminpassword:-"NOT SET"}" + defaultmap="${defaultmap:-"NOT SET"}" + httpport="${httpport:-"0"}" + port="${port:-"0"}" + queryport="$((port + 1))" + queryportgs="${queryportgs:-"0"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + httpenabled="${httpenabled:-"0"}" + httppassword="${adminpassword:-"NOT SET"}" + httpuser="${httpuser:-"NOT SET"}" +} + +# Config Type: ini +# Parameters: true +# Comment: ; or # +# Example: ServerName="SERVERNAME" +# Filetype: ini +fn_info_game_ut() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_ini "servername" "ServerName" + fi + defaultmap="${defaultmap:-"NOT SET"}" + gametype="${gametype:-"NOT SET"}" + port="${port:-"0"}" + queryport="$((port + 1))" +} + +# Config Type: ini +# Parameters: true +# Comment: ; or # +# Example: ServerName=SERVERNAME +# Filetype: ini +fn_info_game_ut2k4() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_ini "adminpassword" "AdminPassword" + fn_info_game_ini "httpport" "ListenPort" + fn_info_game_ini "lanport" "LANServerPort" + fn_info_game_ini "port" "Port" + fn_info_game_ini "queryportgs" "OldQueryPortNumber" + fn_info_game_ini "servername" "ServerName" + fn_info_game_ini "serverpassword" "GamePassword" + fn_info_game_ini "httpenabled" "bEnabled" + fn_info_game_ini "httpuser" "AdminName" + fi + adminpassword="${adminpassword:-"NOT SET"}" + defaultmap="${defaultmap:-"NOT SET"}" + httpport="${httpport:-"0"}" + lanport="${lanport:-"0"}" + port="${port:-"0"}" + queryport="$((port + 1))" + queryportgs="${queryportgs:-"0"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + httpenabled="${httpenabled:-"0"}" + httppassword="${adminpassword}" + httpuser="${httpuser:-"NOT SET"}" +} + +# Config Type: json +# Parameters: true +# Comment: // or /* */ +# Example: "name": "SERVERNAME", +# Filetype: json +fn_info_game_armar() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_json "adminpassword" ".adminPassword" + fn_info_game_json "configip" ".gameHostBindAddress" + fn_info_game_json "maxplayers" ".game.playerCountLimit" + fn_info_game_json "port" ".gameHostBindPort" + fn_info_game_json "queryport" ".steamQueryPort" + fn_info_game_json "servername" ".game.name" + fn_info_game_json "serverpassword" ".game.password" + fi + adminpassword="${adminpassword:-"NOT SET"}" + battleeyeport="$((port + 4))" + configip="${configip:-"0.0.0.0"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${queryport:-"0"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" +} + +# Config Type: con +# Parameters: true +# Comment: # or // +# Example: game.serverName "SERVERNAME" +# Filetype: con +fn_info_game_bf1942() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_con "configip" "game.serverIp" + fn_info_game_con "maxplayers" "game.serverMaxPlayers" + fn_info_game_con "port" "game.serverPort" + fn_info_game_con "servername" "game.serverName" + fn_info_game_con "serverpassword" "game.serverPassword" + fi + configip="${configip:-"0.0.0.0"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="22000" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" +} + +# Config Type: con +# Parameters: true +# Comment: # or // +# Example: game.serverName "SERVERNAME" +# Filetype: con +fn_info_game_bfv() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_con "configip" "game.serverIp" + fn_info_game_con "maxplayers" "game.serverMaxPlayers" + fn_info_game_con "port" "game.serverPort" + fn_info_game_con "servername" "game.serverName" + fn_info_game_con "serverpassword" "game.serverPassword" + fi + configip="${configip:-"0.0.0.0"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="22000" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" +} + +# Config Type: XML +# Parameters: false +# Comment: +# Example: +# Filetype: xml +fn_info_game_bt() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_xml "maxplayers" "/serversettings/@MaxPlayers" + fn_info_game_xml "port" "/serversettings/@port" + fn_info_game_xml "queryport" "/serversettings/@queryport" + fn_info_game_xml "servername" "/serversettings/@name" + fn_info_game_xml "serverpassword" "/serversettings/@password" + fn_info_game_xml "tickrate" "/serversettings/@TickRate" + fi + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${queryport:-"0"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + tickrate="${tickrate:-"0"}" +} + +# Config Type: json +# Parameters: false +# Comment: // or /* */ +# Example: "game_title":"SERVERNAME" +# Filetype: json +fn_info_game_cd() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_json "maxplayers" ".player_count" + fn_info_game_json "port" ".game_port" + fn_info_game_json "rconenabled" ".rcon" + fn_info_game_json "rconpassword" ".rcon_password" + fn_info_game_json "rconport" ".rcon_port" + fn_info_game_json "servername" ".game_title" + fn_info_game_json "steamport" ".steam_port_messages" + fi + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + rconenabled="${rconenabled:-"NOT SET"}" + rconpassword="${rconpassword:-"NOT SET"}" + rconport="${rconport:-"0"}" + servername="${servername:-"NOT SET"}" + steamport="${steamport:-"0"}" +} + +# Config Type: json +# Parameters: true +# Comment: // or /* */ +# Example: "worldName":"SERVERNAME" +# Filetype: json fn_info_game_ck() { - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - maxplayers="${zero}" - else - servername=$(jq -r '.worldName' "${servercfgfullpath}") - maxplayers=$(jq -r '.maxNumberPlayers' "${servercfgfullpath}") + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_json "servername" ".worldName" + fn_info_game_json "maxplayers" ".maxNumberPlayers" fi - queryport=$((port + 1)) + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="$((port + 1))" + servername="${servername:-"NOT SET"}" } -fn_info_game_cmw() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - adminpassword="${unavailable}" - rconport=${zero} - servername="${unavailable}" - serverpassword="${unavailable}" - - else - adminpassword=$(grep -E "^adminpassword=" "${servercfgfullpath}" | tr -cd '[:digit:]') - rconport=$(grep -E "^RConPort=" "${servercfgdir}/DefaultGame.ini" | tr -cd '[:digit:]') - servername=$(grep -E "^ServerName" "${servercfgfullpath}" | sed 's/^ServerName=//') - serverpassword=$(grep -E "^GamePassword" "${servercfgfullpath}" | sed 's/^ServerName=//') +# Config Type: QuakeC +# Parameters: true +# Comment: // or /* */ +# Example: set sv_hostname "SERVERNAME" +# Filetype: cfg +fn_info_game_cod() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_quakec "rconpassword" "rconpassword" + fn_info_game_quakec "servername" "sv_hostname" + fi + defaultmap="${defaultmap:-"NOT SET"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${port}" + rconpassword="${rconpassword:-"NOT SET"}" + servername="${servername:-"NOT SET"}" +} + +# Config Type: QuakeC +# Parameters: true +# Comment: // or /* */ +# Example: set sv_hostname "SERVERNAME" +# Filetype: cfg +fn_info_game_coduo() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_quakec "rconpassword" "rconpassword" + fn_info_game_quakec "servername" "sv_hostname" + fi + defaultmap="${defaultmap:-"NOT SET"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${port}" + rconpassword="${rconpassword:-"NOT SET"}" + servername="${servername:-"NOT SET"}" +} + +# Config Type: QuakeC +# Parameters: true +# Comment: // or /* */ +# Example: set sv_hostname "SERVERNAME" +# Filetype: cfg +fn_info_game_cod2() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_quakec "rconpassword" "rconpassword" + fn_info_game_quakec "servername" "sv_hostname" + fi + defaultmap="${defaultmap:-"NOT SET"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${port}" + rconpassword="${rconpassword:-"NOT SET"}" + servername="${servername:-"NOT SET"}" +} + +# Config Type: QuakeC +# Parameters: true +# Comment: // or /* */ +# Example: set sv_hostname "SERVERNAME" +# Filetype: cfg +fn_info_game_cod4() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_quakec "rconpassword" "rcon_password" + fn_info_game_quakec "servername" "sv_hostname" + fi + defaultmap="${defaultmap:-"NOT SET"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${port}" + rconpassword="${rconpassword:-"NOT SET"}" + servername="${servername:-"NOT SET"}" +} + +# Config Type: QuakeC +# Parameters: true +# Comment: // or /* */ +# Example: set sv_hostname "SERVERNAME" +# Filetype: cfg +fn_info_game_codwaw() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_quakec "rconpassword" "rcon_password" + fn_info_game_quakec "servername" "sv_hostname" + fi + defaultmap="${defaultmap:-"NOT SET"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${port}" + rconpassword="${rconpassword:-"NOT SET"}" + servername="${servername:-"NOT SET"}" +} + +# Config Type: json +# Parameters: false +# Comment: // or /* */ +# Example: "ServerName": "SERVERNAME" +# Filetype: json +fn_info_game_col() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_json "configip" ".ServerSettings.ServerIP" + fn_info_game_json "maxplayers" ".ServerSettings.MaxPlayerCount" + fn_info_game_json "port" ".ServerSettings.ServerGamePort" + fn_info_game_json "rconpassword" ".ServerSettings.RCONPassword" + fn_info_game_json "servername" ".ServerSettings.ServerName" + fn_info_game_json "serverpassword" ".ServerSettings.ServerPassword" + fn_info_game_json "steamport" ".ServerSettings.ServerSteamPort" + fi + configip="${configip:-"0.0.0.0"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${port:-"0"}" + rcpassword="${rconpassword:-"NOT SET"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + steamport="${steamport:-"0"}" +} - # Not set - adminpassword=${adminpassword:-"NOT SET"} - rconport=${rconport:-"0"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} +# Config Type: SQF +# Parameters: true +# Comment: // or /* */ +# Example: serverName = "SERVERNAME"; +# Filetype: cfg +fn_info_game_dayz() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_sqf "adminpassword" "passwordAdmin" + fn_info_game_sqf "maxplayers" "maxPlayers" + fn_info_game_sqf "queryport" "steamQueryPort" + fn_info_game_sqf "servername" "hostname" + fn_info_game_sqf "serverpassword" "password" + fi + adminpassword="${adminpassword:-"NOT SET"}" + battleeyeport="$((port + 4))" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${queryport:-"0"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + steamport="$((port + 2))" +} + +# Config Type: json +# Parameters: false +# Comment: // or /* */ +# Example: "Description": "SERVERNAME" +# Filetype: json +fn_info_game_eco() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_json "configip" ".IPAddress" + fn_info_game_json "httpport" ".WebServerPort" + fn_info_game_json "maxplayers" ".MaxConnections" + fn_info_game_json "port" ".GameServerPort" + fn_info_game_json "servername" ".Description" + fn_info_game_json "serverpassword" ".Password" + fn_info_game_json "tickrate" ".Rate" + fi + configip="${configip:-"0.0.0.0"}" + httpport="${httpport:-"0"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + tickrate="${tickrate:-"0"}" +} + +# Config Type: QuakeC +# Parameters: true +# Comment: // or /* */ +# Example: set sv_hostname "SERVERNAME" +# Filetype: cfg +fn_info_game_etl() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_quakec "configip" "net_ip" + fn_info_game_quakec "maxplayers" "sv_maxclients" + fn_info_game_quakec "port" "net_port" + fn_info_game_quakec "rconpassword" "rconpassword" + fn_info_game_quakec "servername" "sv_hostname" + fn_info_game_quakec "serverpassword" "g_password" + fi + configip="${configip:-"0.0.0.0"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + rconpassword="${rconpassword:-"NOT SET"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" +} + +# Config Type: json +# Parameters: true +# Comment: // or /* */ +# Example: "name": "SERVERNAME" +# Filetype: json +fn_info_game_fctr() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_json "authtoken" ".token" + fn_info_game_json "maxplayers" ".max_players" + fn_info_game_json "savegameinterval" ".autosave_interval" + fn_info_game_json "servername" ".name" + fn_info_game_json "serverpassword" ".game_password" + fn_info_game_json "versioncount" ".autosave_slots" + fi + authtoken="${authtoken:-"NOT SET"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + rconpassword="${rconpassword:-"NOT SET"}" + rconport="${rconport:-"0"}" + savegameinterval="${savegameinterval:-"0"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + versioncount="${versioncount:-"0"}" + + # get server version if installed. + local factoriobin="${executabledir}${executable:1}" + if [ -f "${factoriobin}" ]; then + serverversion="$(${factoriobin} --version | grep "Version:" | awk '{print $2}')" fi +} - # Parameters - defaultmap=${defaultmap:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} +# Config Type: parameters (json possibly supported) +# Parameters: true +# Comment: +# Example: -serverName="SERVERNAME" +# Filetype: parameters +fn_info_game_hw() { + servername="${servername:-"NOT SET"}" + port="${port:-"0"}" + queryport="${queryport:-"0"}" + maxplayers="${maxplayers:-"0"}" + defaultmap="${defaultmap:-"NOT SET"}" + creativemode="${creativemode:-"NOT SET"}" +} + +# Config Type: parameters +# Parameters: true +# Comment: +# Example: -hostname='SERVERNAME' +# Filetype: parameters +fn_info_game_inss() { + port="${port:-"0"}" + queryport="${queryport:-"0"}" + rconport="${rconport:-"0"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + defaultmap="${defaultmap:-"NOT SET"}" + defaultscenario="${defaultscenario:-"NOT SET"}" + maxplayers="${maxplayers:-"0"}" +} + +# Config Type: lua (Custom) +# Parameters: false +# Comment: -- +# Example: Name = "SERVERNAME", +# Filetype: lua +fn_info_game_jc2() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_lua "configip" "BindIP" + fn_info_game_lua "maxplayers" "MaxPlayers" + fn_info_game_lua "port" "BindPort" + fn_info_game_lua "serverdescription" "Description" + fn_info_game_lua "servername" "Name" + fn_info_game_lua "serverpassword" "Password" + fi + configip="${configip:-"0.0.0.0"}" + maxplayers="${maxplayers:-"0"}" + queryport="${port}" + queryport="${queryport:-"0"}" + serverdescription="${serverdescription:-"NOT SET"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" +} + +# Config Type: json +# Parameters: false +# Comment: // or /* */ +# Example: "name": "SERVERNAME" +# Filetype: json +fn_info_game_jc3() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_json "configip" ".host" + fn_info_game_json "httpport" ".httpPort" + fn_info_game_json "maxplayers" ".maxPlayers" + fn_info_game_json "port" ".port" + fn_info_game_json "queryport" ".queryPort" + fn_info_game_json "serverdescription" ".description" + fn_info_game_json "servername" ".name" + fn_info_game_json "serverpassword" ".password" + fn_info_game_json "steamport" ".steamPort" + fn_info_game_json "tickrate" ".maxTickRate" + fi + configip="${configip:-"0.0.0.0"}" + httpport="${httpport:-"0"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${queryport:-"0"}" + serverdescription="${serverdescription:-"NOT SET"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + steamport="${steamport:-"0"}" + tickrate="${tickrate:-"0"}" +} + +# Config Type: QuakeC +# Parameters: true +# Comment: // or /* */ +# Example: set sv_hostname "SERVERNAME" +# Filetype: cfg +fn_info_game_jk2() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_quakec "maxplayers" "sv_maxclients" + fn_info_game_quakec "rconpassword" "rconpassword" + fn_info_game_quakec "servername" "sv_hostname" + fn_info_game_quakec "serverpassword" "g_password" + fn_info_game_quakec "serverversion" "mv_serverversion" + fi + defaultmap="${defaultmap:-"NOT SET"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${port}" + rconpassword="${rconpassword:-"NOT SET"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + serverversion="${serverversion:-"NOT SET"}" +} + +# Config Type: unknown +fn_info_game_lo() { + servername="${servername:-"NOT SET"}" + port="${port:-"0"}" + queryport="${queryport:-"0"}" + maxplayers="${slots:-"0"}" } -fn_info_game_cod() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - rconpassword="${unavailable}" - else - servername=$(grep "sv_hostname " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | xargs) - rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - servername=${servername:-"NOT SET"} - rconpassword=${rconpassword=:-"NOT SET"} - fi - - # Parameters - defaultmap=${defaultmap:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} -} - -fn_info_game_coduo() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - rconpassword="${unavailable}" - else - servername=$(grep "sv_hostname " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | xargs) - rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - servername=${servername:-"NOT SET"} - rconpassword=${rconpassword=:-"NOT SET"} - fi - - # Parameters - defaultmap=${defaultmap:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - queryport=${port:-"28960"} -} - -fn_info_game_cod2() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - rconpassword="${unavailable}" - else - servername=$(grep "sv_hostname " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | xargs) - rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - servername=${servername:-"NOT SET"} - rconpassword=${rconpassword=:-"NOT SET"} - fi - - # Parameters - defaultmap=${defaultmap:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - queryport=${port:-"28960"} -} - -fn_info_game_cod4() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - rconpassword="${unavailable}" - else - servername=$(sed -nr 's/^set\s*sv_hostname\s*"(.*)".*/\1/p' "${servercfgfullpath}") - rconpassword=$(sed -nr 's/^set\s*rcon_password\s*"(.*)"\s*\/.*/\1/p' "${servercfgfullpath}") - queryport=${port:-"28960"} - - # Not set - servername=${servername:-"NOT SET"} - rconpassword=${rconpassword=:-"NOT SET"} - queryport=${queryport:-"28960"} - fi - - # Parameters - defaultmap=${defaultmap:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - queryport=${port:-"28960"} -} - -fn_info_game_codwaw() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - rconpassword="${unavailable}" - else - servername=$(grep "sv_hostname " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | xargs) - rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - servername=${servername:-"NOT SET"} - rconpassword=${rconpassword=:-"NOT SET"} - fi - - # Parameters - defaultmap=${defaultmap:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - queryport=${port:-"28960"} -} - -fn_info_game_col() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${unavailable}" - port="${zero}" - queryport="${zero}" - steamport="${zero}" - rconpassword="${unavailable}" - else - servername=$(jq -r '.ServerSettings.ServerName' "${servercfgfullpath}") - serverpassword=$(jq -r '.ServerSettings.ServerPassword' "${servercfgfullpath}") - maxplayers=$(jq -r '.ServerSettings.MaxPlayerCount' "${servercfgfullpath}") - port=$(jq -r '.ServerSettings.ServerGamePort' "${servercfgfullpath}") - queryport=${port:-"0"} - steamport=$(jq -r '.ServerSettings.ServerSteamPort' "${servercfgfullpath}") - rconpassword=$(jq -r '.ServerSettings.RCONPassword' "${servercfgfullpath}") - configip=$(jq -r '.ServerSettings.ServerIP' "${servercfgfullpath}") - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"27004"} - queryport=${queryport:-"0"} - steamport=${steamport:-"27005"} - rconpassword=${rconpassword:-"NOT SET"} - configip=${configip:-"0.0.0.0"} - fi -} - -fn_info_game_dodr() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - maxplayers="${zero}" - else - maxplayers=$(sed -nr 's/^iServerMaxPlayers=(.*)$/\1/p' "${servercfgfullpath}") - - # Not set - maxplayers=${maxplayers:-"0"} - fi - - # Parameters - servername=${servername:-"NOT SET"} - port=${port:-"7777"} - queryport=${queryport:-"27015"} -} - -fn_info_game_dayz() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - adminpassword="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - else - servername=$(sed -nr 's/^hostname\s*=\s*"(.*)"\s*;/\1/p' "${servercfgfullpath}") - adminpassword=$(sed -nr 's/^passwordAdmin\s*=\s*"(.*)"\s*;/\1/p' "${servercfgfullpath}") - serverpassword=$(sed -nr 's/^password\s*=\s*"(.*)"\s*;/\1/p' "${servercfgfullpath}") - maxplayers=$(sed -nr 's/^maxPlayers\s*=\s*([0-9]+)\s*;/\1/p' "${servercfgfullpath}") - queryport=$(sed -nr 's/^steamQueryPort\s*=\s*([0-9]+)\s*;/\1/p' "${servercfgfullpath}") - - # Not Set - servername=${servername:-"NOT SET"} - adminpassword=${adminpassword:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - queryport=${queryport:-"27016"} - fi - - # Parameters - port=${port:-"2302"} - steammasterport=$((port + 2)) - battleeyeport=$((port + 4)) -} - -fn_info_game_dst() { - # Config - if [ ! -f "${clustercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - gamemode="${unavailable}" - tickrate="${zero}" - masterport="${zero}" - else - servername=$(grep "cluster_name" "${clustercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/cluster_name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "cluster_password" "${clustercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/cluster_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "max_players" "${clustercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - gamemode=$(grep "game_mode" "${clustercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/game_mode//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - tickrate=$(grep "tick_rate" "${clustercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - masterport=$(grep "master_port" "${clustercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - configip=$(grep "bind_ip" "${clustercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bind_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - gamemode=${gamemode:-"NOT SET"} - tickrate=${tickrate:-"0"} - masterport=${masterport:-"0"} - configip=${configip:-"0.0.0.0"} - fi - - if [ ! -f "${servercfgfullpath}" ]; then - port="${zero}" - steamauthport="${zero}" - steammasterport="${zero}" - else - port=$(grep "server_port" "${servercfgfullpath}" | grep "^server_port" | grep -v "#" | tr -cd '[:digit:]') - steamauthport=$(grep "authentication_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - steammasterport=$(grep "master_server_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - - # Not set - port=${port:-"0"} - steamauthport=${steamauthport:-"0"} - steammasterport=${steammasterport:-"0"} - fi - - # Parameters - sharding=${sharding:-"NOT SET"} - master=${master:-"NOT SET"} - shard=${shard:-"NOT SET"} - cluster=${cluster:-"NOT SET"} - cave=${cave:-"NOT SET"} -} - -fn_info_game_eco() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - tickrate="${zero}" - port="${zero}" - webadminport="${zero}" - else - configip=$(jq -r '.IPAddress' "${servercfgfullpath}") - servername=$(jq -r '.Description' "${servercfgfullpath}") - serverpassword=$(jq -r '.Password' "${servercfgfullpath}") - maxplayers=$(jq -r '.MaxConnections' "${servercfgfullpath}") - tickrate=$(jq -r '.Rate' "${servercfgfullpath}") - port=$(jq -r '.GameServerPort' "${servercfgfullpath}") - webadminport=$(jq -r '.WebServerPort' "${servercfgfullpath}") - - # Not set - configip=${configip:-"0.0.0.0"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers=:-"0"} - tickrate=${tickrate=:-"0"} - port=${port=:-"0"} - webadminport=${webadminport=:-"0"} - fi -} - -fn_info_game_etl() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - rconpassword="${unavailable}" - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - port="${zero}" - queryport="${zero}" - else - port=$(grep "set net_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - queryport="${port}" - rconpassword=$(grep "set rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//g' -e '/^\//d' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - servername=$(grep "set sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "set g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "set sv_maxclients" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - configip=$(grep "set net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set net_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - rconpassword=${rconpassword:-"NOT SET"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"27960"} - queryport=${queryport:-"27960"} - configip=${configip:-"0.0.0.0"} - fi -} - -fn_info_game_fctr() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="Factorio Server" - serverpassword="${unavailable}" - maxplayers="${zero}" - authtoken="${unavailable}" - savegameinterval="${unavailable}" - versioncount="${unavailable}" - else - servername=$(jq -r '.name' "${servercfgfullpath}") - serverpassword=$(jq -r '.game_password' "${servercfgfullpath}") - maxplayers=$(jq -r '.max_players' "${servercfgfullpath}") - authtoken=$(jq -r '.token' "${servercfgfullpath}") - savegameinterval=$(jq -r '.autosave_interval' "${servercfgfullpath}") - versioncount=$(jq -r '.autosave_slots' "${servercfgfullpath}") - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - authtoken=${authtoken:-"NOT SET"} - savegameinterval=${savegameinterval:-"0"} - versioncount=${versioncount:-"0"} - fi - - # Parameters - port=${port:-"0"} - rconport=${rconport:-"0"} - rconpassword=${rconpassword:-"NOT SET"} - - # get server version if installed - local factoriobin="${executabledir}${executable:1}" - if [ -f "${factoriobin}" ]; then - serverversion=$(${factoriobin} --version | grep "Version:" | awk '{print $2}') - fi -} - -fn_info_game_jc2() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverdescription="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - port="${zero}" - queryport="${zero}" - else - servername=$(grep "Name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/Name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverdescription=$(grep "Description" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/Description//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "Password" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') - port=$(grep "BindPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') - queryport="${port}" - configip=$(grep "BindIP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/BindIP//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - serverdescription=${serverdescription:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - queryport=${queryport:-"0"} - configip=${configip:-"0.0.0.0"} - fi -} - -fn_info_game_hw() { - # Parameters - servername=${servername:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} - maxplayers=${maxplayers:-"0"} - defaultmap=${defaultmap:-"NOT SET"} - creativemode=${creativemode:-"NOT SET"} -} - -fn_info_game_inss() { - # Parameters - port=${port:-"0"} - queryport=${queryport:-"0"} - rconport=${rconport:-"0"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - defaultmap=${defaultmap:-"NOT SET"} - defaultscenario=${defaultscenario:-"NOT SET"} - maxplayers=${maxplayers:-"0"} -} - -fn_info_game_jc3() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverdescription="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - port="${zero}" - queryPort="${zero}" - steamport="${zero}" - httpport="${zero}" - tickrate="${zero}" - else - servername=$(grep "name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverdescription=$(grep "description" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/description//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "\"maxPlayers\"" "${servercfgfullpath}" | tr -cd '[:digit:]') - port=$(grep "\"port\"" "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport=$(grep "\"queryPort\"" "${servercfgfullpath}" | tr -cd '[:digit:]') - steamport=$(grep "\"steamPort\"" "${servercfgfullpath}" | tr -cd '[:digit:]') - httpport=$(grep "\"httpPort\"" "${servercfgfullpath}" | tr -cd '[:digit:]') - tickrate=$(grep "\"maxTickRate\"" "${servercfgfullpath}" | tr -cd '[:digit:]') - configip=$(grep "host" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/host//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - servername=${servername:-"NOT SET"} - serverdescription=${serverdescription:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers=:-"0"} - port=${port=:-"0"} - queryport=${queryport=:-"0"} - steamport=${steamport=:-"0"} - httpport=${httpport=:-"0"} - tickrate=${tickrate=:-"0"} - configip=${configip:-"0.0.0.0"} - fi -} - -fn_info_game_jk2() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - rconpassword="${unavailable}" - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - serverversion="${unavailable}" - else - rconpassword=$(grep "seta rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta rconpassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - servername=$(grep "seta sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "seta g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "seta sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - serverversion=$(grep "seta mv_serverversion" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta mv_serverversion//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - rconpassword=${rconpassword:-"NOT SET"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - serverversion=${serverversion:-"NOT SET"} - fi - - # Parameters - port=${port:-"0"} - queryport=${port} - defaultmap=${defaultmap:-"NOT SET"} -} - -fn_info_game_kf() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - adminpassword="${unavailable}" - port="${zero}" - queryport="${zero}" - queryportgs="${zero}" - steamport="${zero}" - steammasterport="${zero}" - lanport="${zero}" - httpport="${zero}" - webadminenabled="${unavailable}" - webadminuser="${unavailable}" - webadminpass="${unavailable}" - else - servername=$(sed -nr 's/^ServerName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - serverpassword=$(sed -nr 's/^GamePassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - adminpassword=$(sed -nr 's/^AdminPassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - port=$(sed -nr 's/^Port=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport=$((port + 1)) - queryportgs=$(sed -nr 's/^OldQueryPortNumber=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') - steamport="20560" - steammasterport="28852" - lanport=$(grep "LANServerPort=" "${servercfgfullpath}" | tr -cd '[:digit:]') - httpport=$(sed -nr 's/^ListenPort=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') - webadminenabled=$(sed -nr 's/^bEnabled=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - webadminuser=$(sed -nr 's/^AdminName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - webadminpass="${adminpassword}" - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - adminpassword=${adminpassword:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} - queryportgs=${queryportgs:-"0"} - steamport=${steamport:-"0"} - steammasterport=${steammasterport:-"0"} - lanport=${lanport:-"0"} - httpport=${httpport:-"0"} - webadminenabled=${webadminenabled:-"NOT SET"} - webadminuser=${webadminuser:-"NOT SET"} - webadminpass=${webadminpass:-"NOT SET"} - fi - - # Parameters - defaultmap=${defaultmap:-"NOT SET"} -} - -fn_info_game_kf2() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - adminpassword="${unavailable}" - port=${zero} - queryport=${zero} - webadminenabled="${unavailable}" - httpport="${zero}" - webadminuser="${unavailable}" - webadminpass="${unavailable}" - else - servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "GamePassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/GamePassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - adminpassword=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - port=$(grep "Port" "${servercfgdir}/LinuxServer-KFEngine.ini" | sed -e 's/^[ \t]*//g' | grep "^Port" | grep -v "#" | tr -cd '[:digit:]') - webadminenabled=$(grep "bEnabled" "${servercfgdir}/KFWeb.ini" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bEnabled//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - httpport=$(grep "ListenPort" "${servercfgdir}/KFWeb.ini" | grep -v "#" | tr -cd '[:digit:]') - webadminuser="Admin" - webadminpass=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - adminpassword=${adminpassword:-"NOT SET"} - port=${port:-"0"} - webadminenabled=${webadminenabled:-"NOT SET"} - httpport=${webadminport:-"0"} - webadminuser=${webadminuser:-"NOT SET"} - webadminpass=${webadminpass:-"NOT SET"} - fi - - # Parameters - queryport=${queryport:-"0"} - defaultmap=${defaultmap:-"NOT SET"} -} - -fn_info_game_lo() { - # Parameters - servername=${servername:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} - maxplayers=${slots:-"0"} -} - -fn_info_game_mc() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - rconpassword="${unavailable}" - rconport="${zero}" - maxplayers="${zero}" - port="${zero}" - queryport="${zero}" - queryenabled="${unavailable}" - gamemode="${unavailable}" - gameworld="${unavailable}" - else - servername=$(grep "motd" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/motd//g' | tr -d '=\";,:' | sed 's/\\u00A70//g;s/\\u00A71//g;s/\\u00A72//g;s/\\u00A73//g;s/\\u00A74//g;s/\\u00A75//g;s/\\u00A76//g;s/\\u00A77//g;s/\\u00A78//g;s/\\u00A79//g;s/\\u00A7a//g;s/\\u00A7b//g;s/\\u00A7c//g;s/\\u00A7d//g;s/\\u00A7e//g;s/\\u00A7f//g;s/\\u00A7l//g;s/\\u00A7o//g;s/\\u00A7n//g;s/\\u00A7m//g;s/\\u00A7k//g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconpassword=$(grep "rcon.password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/rcon.password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconport=$(grep "rcon.port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - maxplayers=$(grep "max-players" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - port=$(grep "server-port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - queryport=$(grep "query.port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - if [ -z "${queryport}" ]; then - queryport=${port} - fi - queryenabled=$(grep "enable-query" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/enable-query//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - gamemode=$(grep "gamemode" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - gameworld=$(grep "level-name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/level-name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - configip=$(grep "server-ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/server-ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - servername=${servername:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} - rconport=${rconport:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"NOT SET"} - queryport=${queryport:-"NOT SET"} - queryenabled="${queryenabled:-"NOT SET"}" - gamemode=${gamemode:-"NOT SET"} - gameworld=${gameworld:-"NOT SET"} - configip=${configip:-"0.0.0.0"} - fi -} - -fn_info_game_mcb() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - maxplayers="${zero}" - port="${zero}" - portipv6="${zero}" - queryport="${zero}" - gamemode="${unavailable}" - gameworld="${unavailable}" - else - servername=$(grep "server-name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/server-name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "max-players" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - port=$(grep "server-port\b" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - portipv6=$(grep "server-portv6\b" "${servercfgfullpath}" | sed 's/v6//g' | grep -v "#" | tr -cd '[:digit:]') - queryport=${port} - gamemode=$(grep "gamemode" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/gamemode//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - gameworld=$(grep "level-name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/level-name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - servername=${servername:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"NOT SET"} - portipv6=${portipv6:-"NOT SET"} - queryport=${queryport:-"NOT SET"} - gamemode=${gamemode:-"NOT SET"} - gameworld=${gameworld:-"NOT SET"} - fi -} - -fn_info_game_mh() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - rconpassword="${unavailable}" - maxplayers="${unavailable}" - else - servername=$(grep "ServerName" "${servercfgfullpath}" | awk -F '=' '{print $2}') - serverpassword=$(grep "ServerPassword" "${servercfgfullpath}" | awk -F '=' '{print $2}') - rconpassword=$(grep "AdminPassword" "${servercfgfullpath}" | awk -F '=' '{print $2}') - maxplayers=$(grep "MaxSlots" "${servercfgfullpath}" | awk -F '=' '{print $2}') - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi - - # Parameters - port=${port:-"0"} - queryport=${queryport:-"0"} - beaconport=${beaconport:-"0"} -} - -fn_info_game_mohaa() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - rconpassword="${unavailable}" - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - else - rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta rconpassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - - # Not set - rconpassword=${rconpassword:-"NOT SET"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi - - # Parameters - port=${port:-"0"} - queryport=${port:-"0"} - defaultmap=${defaultmap:-"NOT SET"} -} - -fn_info_game_mom() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - defaultmap="${unavailable}" - else - servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "ServerPassword" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/ServerPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/MaxPlayers//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - defaultmap=$(grep "MapName" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/MapName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - defaultmap=${defaultmap:-"NOT SET"} - fi - - # Parameters - port=${port:-"7777"} - beaconport=${queryport:-"15000"} -} - -fn_info_game_mta() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - port=${zero} - queryport=${zero} - httpport=${zero} - ase="${unavailable}" - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - else - port=$(grep -m 1 "serverport" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<" | tr -cd '[:digit:]') - queryport=$((port + 123)) - httpport=$(grep -m 1 "httpport" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<" | tr -cd '[:digit:]') - servername=$(grep -m 1 "servername" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<") - serverpassword=$(grep -m 1 "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<") - maxplayers=$(grep -m 1 "maxplayers" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<" | tr -cd '[:digit:]') - ase=$(grep -m 1 "ase" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<" | tr -cd '[:digit:]') - if [ "${ase}" == "1" ]; then - ase="Enabled" - else - ase="Disabled" - fi - - # Not set - port=${port:-"22003"} - queryport=${queryport:-"2326"} - httpport=${httpport:-"22005"} - ase=${ase:-"Disabled"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi - -} - -fn_info_game_nec() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - servername="Necesse" - serverpassword="${unavailable}" - else - maxplayers=$(grep "slots" "${servercfgfullpath}" | cut -f1 -d "/" | tr -cd '[:digit:]') - port=$(grep "port" "${servercfgfullpath}" | cut -f1 -d "/" | tr -cd '[:digit:]') - serverpassword=$(grep "password" "${servercfgfullpath}" | cut -f1 -d "/" | tr -cd '[:digit:]') - - # Not set - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - servername="Necesse Port ${port}" - serverpassword=${serverpassword:-"NOT SET"} - fi -} - -fn_info_game_onset() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - maxplayers="${zero}" - port="${zero}" - httpport="${zero}" - queryport="${zero}" - else - servername=$(grep -v "servername_short" "${servercfgfullpath}" | grep "servername" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/servername//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "maxplayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - port=$(grep "port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - httpport=$((port - 2)) - queryport=$((port - 1)) - - # Not set - servername=${servername:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"NOT SET"} - httpport=${httpport:-"NOT SET"} - queryport=${queryport:-"NOT SET"} - fi -} - -fn_info_game_pc() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - port="${zero}" - queryport="${zero}" - steamport="${zero}" - else - servername=$(grep "name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "password " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - port=$(grep "hostPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - queryport=$(grep "queryPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - steamport=$(grep "steamPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"NOT SET"} - queryport=${queryport:-"NOT SET"} - steamport=${steamport:-"NOT SET"} - fi -} - -fn_info_game_pc2() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - port="${zero}" - queryport="${zero}" - steamport="${zero}" - else - servername=$(grep "name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "password " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - port=$(grep "hostPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - queryport=$(grep "queryPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - steamport=$(grep "steamPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"NOT SET"} - queryport=${queryport:-"NOT SET"} - steamport=${steamport:-"NOT SET"} - fi -} - -fn_info_game_pstbs() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - maxplayers="${unavailable}" - reservedslots="${unavailable}" - else - servername=$(grep "ServerName=" "${servercfgfullpath}" | sed -e 's/^[ \t]//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=";,:' | sed -e 's/^[ \t]//' -e 's/[ \t]*$//') - maxplayers=$(grep "MaxPlayers=" "${servercfgfullpath}" | tr -cd '[:digit:]') - reservedslots=$(grep "NumReservedSlots=" "${servercfgfullpath}" | tr -cd '[:digit:]') - - # Not set - servername=${servername:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - reservedslots=${reservedslots:-"0"} - fi - - if [ ! -f "${servercfgdir}/Rcon.cfg" ]; then - rconport=${unavailable} - rconpassword=${unavailable} - else - rconport=$(grep "Port=" "${servercfgdir}/Rcon.cfg" | tr -cd '[:digit:]') - rconpassword=$(grep "Password=" "${servercfgdir}/Rcon.cfg" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - rconport=${rconport:-"0"} - if [ -z "${rconpassword}" ] || [ ${#rconpassword} == 1 ]; then - rconpassword="NOT SET" - fi - fi - - # Parameters - port=${port:-"0"} - if [ -z "${queryport}" ]; then - queryport=${port:-"0"} - fi - rconport=${rconport:-"0"} - randommap=${randommap:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - reservedslots=${reservedslots:-"0"} -} - -fn_info_game_pvr() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - maxplayers="${unavailable}" - else - servername=$(grep "ServerName" "${servercfgfullpath}" | awk -F '=' '{print $2}') - maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | awk -F '=' '{print $2}') - - # Not set - servername=${servername:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi - - # Parameters - port=${port:-"0"} - port401=$((port + 400)) - queryport=${port:-"0"} -} - -fn_info_game_prism3d() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - maxplayers="${unavailable}" - port="${zero}" - queryport="${zero}" - servername="${unavailable}" - serverpassword="${unavailable}" - else - maxplayers=$(sed -nr 's/^\s*max_players\s*:\s*([0-9]+)/\1/p' "${servercfgfullpath}") - port=$(sed -nr 's/^\s*connection_dedicated_port\s*:\s*([0-9]+)/\1/p' "${servercfgfullpath}") - queryport=$(sed -nr 's/^\s*query_dedicated_port\s*:\s*([0-9]+)/\1/p' "${servercfgfullpath}") - servername=$(sed -nr 's/^\s*lobby_name\s*:\s*"?([^"\r\n]+)"?/\1/p' "${servercfgfullpath}") - serverpassword=$(sed -nr 's/^\s*password\s*:\s*"(.*)"/\1/p' "${servercfgfullpath}") - - # Not set - maxplayers=${maxplayers:-"0"} - port=${port:-"27015"} - queryport=${queryport:-"27016"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - fi -} - -fn_info_game_pz() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - rconpassword="${unavailable}" - maxplayers="${zero}" - port="${zero}" - queryport="${zero}" - gameworld="${unavailable}" - else - servername=$(grep "PublicName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/PublicName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "Password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^Password" | sed -e '/^#/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconpassword=$(grep "RCONPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/RCONPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - port=$(grep "DefaultPort" "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport=${port} - gameworld=$(grep "Map" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^Map" | sed -e '/^#/d' -e 's/Map//g' | tr -d '=\";' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - queryport=${queryport:-"0"} - gameworld=${gameworld:-"NOT SET"} - fi - - # Parameters - adminpassword=${adminpassword:-"NOT SET"} - -} - -fn_info_game_q2() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - rconpassword="${unavailable}" - servername="${unavailable}" - maxplayers="${zero}" - else - rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - - # Not set - rconpassword=${rconpassword:-"NOT SET"} - servername=${servername:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi - - # Parameters - port=${port:-"0"} - queryport=${port} - defaultmap=${defaultmap:-"NOT SET"} -} - -fn_info_game_q3() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - rconpassword="${unavailable}" - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - else - rconpassword=$(grep "zmq_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set zmq_rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - - # Not set - rconpassword=${rconpassword:-"NOT SET"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi - - # Parameters - port=${port:-"0"} - queryport=${port} - defaultmap=${defaultmap:-"NOT SET"} -} - -fn_info_game_ql() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - rconpassword="${unavailable}" - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - port="${zero}" - queryport="${zero}" - rconport="${zero}" - statsport="${zero}" - else - rconpassword=$(grep "zmq_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set zmq_rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "sv_maxClients" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - port=$(grep "net_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - queryport=${port} - rconport=$(grep "zmq_rcon_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - statsport=$(grep "zmq_stats_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - configip=$(grep "set net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set net_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - rconpassword=${rconpassword:-"NOT SET"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - queryport=${queryport:-"0"} - rconport=${rconport:-"0"} - statsport=${statsport:-"0"} - configip=${configip:-"0.0.0.0"} - fi -} - -fn_info_game_qw() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - rconpassword="${unavailable}" - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - port="${zero}" - else - rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "/") - servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "/") - maxplayers=$(grep "maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - - # Not set - rconpassword=${rconpassword:-"NOT SET"} - servername=${servername:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi - - # Parameters - port=${port:-"0"} - queryport=${port} -} - -fn_info_game_ro() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - adminpassword="${unavailable}" - port="${zero}" - queryport="${zero}" - steamport="${zero}" - steammasterport="${zero}" - lanport="${zero}" - httpport="${zero}" - webadminenabled="${unavailable}" - webadminuser="${unavailable}" - webadminpass="${unavailable}" - else - servername=$(sed -nr 's/^ServerName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - serverpassword=$(sed -nr 's/^GamePassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - adminpassword=$(sed -nr 's/^AdminPassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - port=$(sed -nr 's/^Port=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport=$((port + 1)) - steamport="20610" - steammasterport="28902" - lanport=$(grep "LANServerPort=" "${servercfgfullpath}" | tr -cd '[:digit:]') - httpport=$(sed -nr 's/^ListenPort=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') - webadminenabled=$(sed -nr 's/^bEnabled=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - webadminuser=$(sed -nr 's/^AdminName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - webadminpass="${adminpassword}" - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - adminpassword=${adminpassword:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} - steamport=${steamport:-"0"} - steammasterport=${steammasterport:-"0"} - lanport=${lanport:-"0"} - httpport=${httpport:-"0"} - webadminenabled=${webadminenabled:-"NOT SET"} - webadminuser=${webadminuser:-"NOT SET"} - webadminpass=${webadminpass:-"NOT SET"} - fi - - # Parameters - defaultmap=${defaultmap:-"NOT SET"} -} - -fn_info_game_rtcw() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - rconpassword="${unavailable}" - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - else - rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - - # Not set - rconpassword=${rconpassword:-"NOT SET"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi - - # Parameters - port=${port:-"0"} - queryport=${port:-"0"} - defaultmap=${defaultmap:-"NOT SET"} -} - -fn_info_game_rust() { - # Parameters - servername=${servername:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} - appport=${appport:-"0"} - rconport=${rconport:-"0"} - gamemode=${gamemode:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - rconpassword=${rconpassword:-"NOT SET"} - rconweb=${rconweb:-"NOT SET"} - tickrate=${tickrate:-"0"} - saveinterval=${saveinterval:-"0"} - serverlevel=${serverlevel:-"NOT SET"} - customlevelurl=${customlevelurl:-"NOT SET"} - worldsize=${worldsize:-"0"} - if [ -n "${seed}" ]; then - seed=${seed:-"0"} - elif [ -f "${datadir}/${selfname}-seed.txt" ]; then - seed=$(cat "${datadir}/${selfname}-seed.txt") - else - seed="0" - fi - salt=${salt:-"0"} -} - -fn_info_game_rw() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - rconpassword="${unavailable}" - rconport="${zero}" - maxplayers="${zero}" - port="${zero}" - port2="${zero}" - port3="${zero}" - port4="${zero}" - queryport="${zero}" - gamemode="${unavailable}" - gameworld="${unavailable}" - else - servername=$(grep "server_name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/server_name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "server_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/server_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconport=$(grep "rcon_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - maxplayers=$(grep "settings_max_players" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - port=$(grep "server_port" "${servercfgfullpath}" | grep -v "database_mysql_server_port" | grep -v "#" | tr -cd '[:digit:]') - port2=$((port + 1)) - port3=$((port + 2)) - port4=$((port + 3)) - queryport="${port}" - httpqueryport=$((port - 1)) - gamemode=$(grep "settings_default_gamemode=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/settings_default_gamemode//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - gameworld=$(grep "server_world_name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/server_world_name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - configip=$(grep "server_ip" "${servercfgfullpath}" | grep -v "database_mysql_server_ip" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/server_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} - rconport=${rconport:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - port2=${port2:-"0"} - port3=${port3:-"0"} - port4=${port4:-"0"} - queryport=${queryport:-"0"} - httpqueryport=${httpport:-"0"} - gamemode=${gamemode:-"NOT SET"} - gameworld=${gameworld:-"NOT SET"} - configip=${configip:-"0.0.0.0"} - fi -} - -fn_info_game_samp() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="unnamed server" - rconpassword="${unavailable}" - port="7777" - rconport="${port}" - maxplayers="50" - else - servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/^rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - port=$(grep "port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - queryport=${port} - rconport=${port} - maxplayers=$(grep "maxplayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - - # Not set - servername=${servername:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} - port=${port:-"7777"} - queryport=${port:-"7777"} - rconport=${rconport:-"7777"} - maxplayers=${maxplayers:-"12"} - fi -} - -fn_info_game_sb() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - queryenabled="${unavailable}" - rconenabled="${unavailable}" - rconpassword="${unavailable}" - port="21025" - queryport="21025" - rconport="21026" - maxplayers="8" - else - servername=$(grep "serverName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e 's/serverName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - queryenabled=$(grep "runQueryServer" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e 's/runQueryServer//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconenabled=$(grep "runRconServer" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e 's/runRconServer//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconpassword=$(grep "rconServerPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e 's/rconServerPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - port=$(grep "gameServerPort" "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport=$(grep "queryServerPort" "${servercfgfullpath}" | tr -cd '[:digit:]') - rconport=$(grep "rconServerPort" "${servercfgfullpath}" | tr -cd '[:digit:]') - maxplayers=$(grep "maxPlayers" "${servercfgfullpath}" | tr -cd '[:digit:]') - - # Not set - servername=${servername:-"NOT SET"} - queryenabled=${queryenabled:-"NOT SET"} - rconenabled=${rconenabled:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} - port=${port:-"21025"} - queryport=${queryport:-"21025"} - rconport=${rconport:-"21026"} - maxplayers=${maxplayers:-"8"} - fi -} - -fn_info_game_sbots() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - maxplayers="${unavailable}" - else - servername=$(grep "ServerName=" "${servercfgfullpath}" | sed -e 's/^[ \t]//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=";,:' | sed -e 's/^[ \t]//' -e 's/[ \t]*$//') - maxplayers=$(grep "MaxPlayers=" "${servercfgfullpath}" | tr -cd '[:digit:]') - - # Not set - servername=${servername:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi - - # Parameters - port=${port:-"0"} - queryport=${queryport:-"0"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - defaultmap=${defaultmap:-"NOT SET"} - maxplayers=${maxplayers:-"0"} -} - -fn_info_game_scpsl() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername=${servername:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - configip=${configip:-"0.0.0.0"} - tickrate=${tickrate:-"NOT SET"} - adminpassword=${adminpassword:-"NOT SET"} - else - servername=$(sed -nr 's/^server_name: (.*)$/\1/p' "${servercfgfullpath}") - maxplayers=$(sed -nr 's/^max_players: (.*)$/\1/p' "${servercfgfullpath}") - configip=$(sed -nr 's/^ipv4_bind_ip: (.*)$/\1/p' "${servercfgfullpath}") - tickrate=$(sed -nr 's/^server_tickrate: (.*)$/\1/p' "${servercfgfullpath}") - adminpassword=$(sed -nr 's/^administrator_query_password: (.*)$/\1/p' "${servercfgfullpath}") - fi - - # Parameters - port=${port:-"0"} - queryport=${port} -} - -fn_info_game_sdtd() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - port="${zero}" - port3="${zero}" - queryport="${zero}" - webadminenabled="${unavailable}" - webadminport="${zero}" - webadminpass="${unavailable}" - telnetenabled="${unavailable}" - telnetport="${zero}" - telnetpass="${unavailable}" - telnetip="${unavailable}" - maxplayers="${unavailable}" - gamemode="${unavailable}" - gameworld="${unavailable}" - else - servername=$(grep "ServerName" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") - serverpassword=$(grep "ServerPassword" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") - port=$(grep "ServerPort" "${servercfgfullpath}" | grep -Eo 'value="[0-9]+"' | tr -cd '[:digit:]') - port3=$((port + 2)) - queryport=${port:-"0"} - webadminenabled=$(grep "ControlPanelEnabled" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") - webadminport=$(grep "ControlPanelPort" "${servercfgfullpath}" | tr -cd '[:digit:]') - webadminpass=$(grep "ControlPanelPassword" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") - telnetenabled=$(grep "TelnetEnabled" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") - telnetport=$(grep "TelnetPort" "${servercfgfullpath}" | tr -cd '[:digit:]') - telnetpass=$(grep "TelnetPassword" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") - # Telnet IP will be localhost if no password is set - # check_ip will set the IP first. This will overwrite it. - if [ -z "${telnetpass}" ]; then - telnetip="127.0.0.1" - fi - maxplayers=$(grep "ServerMaxPlayerCount" "${servercfgfullpath}" | tr -cd '[:digit:]') - gamemode=$(grep "GameMode" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") - gameworld=$(grep "GameWorld" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} - webadminenabled=${webadminenabled:-"NOT SET"} - webadminport=${webadminport:-"0"} - webadminpass=${webadminpass:-"NOT SET"} - telnetenabled=${telnetenabled:-"NOT SET"} - telnetport=${telnetport:-"0"} - telnetpass=${telnetpass:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - gamemode=${gamemode:-"NOT SET"} - gameworld=${gameworld:-"NOT SET"} - fi -} - -fn_info_game_sf() { - # Parameters - servername=${selfname:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} - beaconport=${beaconport:-"0"} -} - -fn_info_game_sof2() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - rconpassword="${unavailable}" - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - else - rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - - # Not set - rconpassword=${rconpassword:-"NOT SET"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi - - # Parameters - port=${port:-"0"} - queryport=${port} - defaultmap=${defaultmap:-"NOT SET"} -} - -fn_info_game_sol() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - adminpassword="${unavailable}" - maxplayers="${unavailable}" - port="${zero}" - queryport="${zero}" - servername="${unavailable}" - serverpassword="${unavailable}" - else - adminpassword=$(grep "Admin_Password=" "${servercfgfullpath}" | awk -F '=' '{print $2}') - maxplayers=$(grep "Max_Players=" "${servercfgfullpath}" | tr -cd '[:digit:]') - port=$(grep "Port=" "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport="${port}" - filesport=$((port + 10)) - servername=$(grep "Server_Name=" "${servercfgfullpath}" | awk -F '=' '{print $2}') - serverpassword=$(grep "Game_Password=" "${servercfgfullpath}" | awk -F '=' '{print $2}') - - # Not set - adminpassword=${adminpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"23073"} - queryport=${queryport:-"23083"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - fi -} - -fn_info_game_source() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - rconpassword="${unavailable}" - else - servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "sv_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/sv_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} - fi - - # Parameters - defaultmap=${defaultmap:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - rconport=${port:-"0"} - queryport=${port:-"0"} - clientport=${clientport:-"0"} - # Steamport can be between 26901-26910 and is normaly automatically set. - # Some servers might support -steamport parameter to set - if [ "${steamport}" == "0" ] || [ -v "${steamport}" ]; then - steamport="$(echo "${ssinfo}" | grep "${srcdslinuxpid}" | awk '{print $5}' | grep ":269" | cut -d ":" -f2)" - fi -} - -fn_info_game_spark() { - defaultmap=${defaultmap:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - queryport=$((port + 1)) - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - webadminuser=${webadminuser:-"NOT SET"} - webadminpass=${webadminpass:-"NOT SET"} - webadminport=${webadminport:-"0"} - # Commented out as displaying not set in details parameters - #mods=${mods:-"NOT SET"} -} - -fn_info_game_squad() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - maxplayers="${unavailable}" - else - servername=$(grep "ServerName=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "MaxPlayers=" "${servercfgfullpath}" | tr -cd '[:digit:]') - - servername=${servername:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi - - if [ ! -f "${servercfgdir}/Rcon.cfg" ]; then - rconport=${unavailable} - rconpassword=${unavailable} - else - rconport=$(grep "Port=" "${servercfgdir}/Rcon.cfg" | tr -cd '[:digit:]') - rconpassword=$(grep "Password=" "${servercfgdir}/Rcon.cfg" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - rconport=${rconport:-"0"} - if [ -z "${rconpassword}" ] || [ ${#rconpassword} == 1 ]; then - rconpassword="NOT SET" - fi - - fi - - # Parameters - port=${port:-"0"} - queryport=${queryport:-"0"} -} - -fn_info_game_st() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - rconpassword="${unavailable}" - maxplayers="${unavailable}" - else - servername=$(grep "SERVERNAME" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/SERVERNAME//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "PASSWORD" "${servercfgfullpath}" | grep "^PASSWORD" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/PASSWORD//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconpassword=$(grep "RCONPASSWORD" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/RCONPASSWORD//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "MAXPLAYER" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/MAXPLAYER//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi - - # Parameters - port=${port:-"0"} - queryport=${queryport:-"0"} - httpport=${port:-"0"} - worldtype=${worldtype:-"NOT SET"} - autosaveinterval=${autosaveinterval:-"0"} - clearinterval=${clearinterval:-"0"} - worldname=${worldname:-"NOT SET"} -} - -fn_info_game_terraria() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - port="${zero}" - gameworld="${unavailable}" - maxplayers="${zero}" - queryport="${zero}" - else - servername=$(grep "worldname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/worldname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - port=$(grep "port" "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport=${port:-"0"} - gameworld=$(grep "world=" "${servercfgfullpath}" | grep -v "//" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/world=//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "maxplayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - - # Not set - servername=${servername:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} - gameworld=${gameworld:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi -} - -fn_info_game_stn() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - configip=${configip:-"0.0.0.0"} - port="${zero}" - queryport="${zero}" - serverpassword=${serverpassword:-"NOT SET"} - else - servername=$(sed -nr 's/^ServerName="(.*)"/\1/p' "${servercfgfullpath}") - configip=$(sed -nr 's/^ServerIP=([0-9]+)/\1/p' "${servercfgfullpath}") - port=$(sed -nr 's/^ServerPort=([0-9]+)/\1/p' "${servercfgfullpath}") - serverpassword=$(sed -nr 's/^ServerPassword=(.*)$/\1/p' "${servercfgfullpath}") - queryport=$((port + 1)) - - # Not set - serverpassword=${serverpassword:-"NOT SET"} - port=${port:-"0"} - serverpassword=${serverpassword:-"NOT SET"} - queryport=${queryport:-"0"} - fi -} - -fn_info_game_ti() { - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - maxplayers="${zero}" - else - servername=$(sed -nr 's/^ServerName="(.*)"/\1/p' "${servercfgfullpath}") - maxplayers=$(sed -nr 's/^MaxPlayerCount=([0-9]+)/\1/' "${servercfgfullpath}") - - # Not set - servername=${servername:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi - -} - -fn_info_game_ts3() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - dbplugin="${unavailable}" - port="9987" - queryport="10011" - querysshport="10022" - queryhttpport="10080" - queryhttpsport="10443" - fileport="30033" - telnetport="10011" - else - dbplugin=$(grep "dbplugin=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/dbplugin=//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - port=$(grep "default_voice_port" "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport=$(grep "query_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - querysshport=$(grep "query_ssh_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - queryhttpport=$(grep "query_http_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - queryhttpsport=$(grep "query_https_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - fileport=$(grep "filetransfer_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - telnetport="${queryport}" - configip=$(grep "voice_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/voice_ip//g' | sed 's/,.*//' | tr -d '=\";,' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - dbplugin=${dbplugin:-"NOT SET"} - port=${port:-"9987"} - queryport=${queryport:-"10011"} - querysshport=${querysshport:-"10022"} - queryhttpport=${queryhttpport:-"10080"} - queryhttpsport=${queryhttpsport:-"10443"} - fileport=${fileport:-"30033"} - telnetport=${telnetport:-"10011"} - configip=${configip:-"0.0.0.0"} - fi -} - -fn_info_game_tu() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - maxplayers="${zero}" - else - servername=$(grep "ServerTitle" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/ServerTitle//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - - # Not set - servername=${servername:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi - - # Parameters - port=${port:-"0"} - steamport=$((port + 1)) - queryport=${queryport:-"0"} -} - -fn_info_game_tw() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="unnamed server" - serverpassword="${unavailable}" - rconpassword="${unavailable}" - port="8303" - queryport="8303" - maxplayers="12" - else - servername=$(grep "sv_name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/^sv_name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^password" | sed -e '/^#/d' -e 's/^password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconpassword=$(grep "sv_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/^sv_rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - port=$(grep "sv_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - queryport="${port}" - maxplayers=$(grep "sv_max_clients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} - port=${port:-"8303"} - queryport=${port:-"8303"} - maxplayers=${maxplayers:-"12"} +# Config Type: Java properties +# Comment: # or ! +# Example: motd=SERVERNAME +# Filetype: properties +fn_info_game_mc() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_java_properties "configip" "server-ip" + fn_info_game_java_properties "gamemode" "gamemode" + fn_info_game_java_properties "maxplayers" "max-players" + fn_info_game_java_properties "port" "server-port" + fn_info_game_java_properties "queryenabled" "enable-query" + fn_info_game_java_properties "queryport" "query.port" + fn_info_game_java_properties "rconpassword" "rcon.password" + fn_info_game_java_properties "rconport" "rcon.port" + fn_info_game_java_properties "servername" "motd" + fn_info_game_java_properties "worldname" "level-name" + fi + configip="${configip:-"0.0.0.0"}" + gamemode="${gamemode:-"NOT SET"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"NOT SET"}" + queryenabled="${queryenabled:-"NOT SET"}" + if [ -z "${queryport}" ]; then + queryport="${port}" fi + rconpassword="${rconpassword:-"NOT SET"}" + rconport="${rconport:-"NOT SET"}" + servername="${servername:-"NOT SET"}" + worldname="${worldname:-"NOT SET"}" } -fn_info_game_ut99() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - adminpassword="${unavailable}" - port="${zero}" - queryport="${zero}" - queryportgs="${zero}" - webadminenabled="${unavailable}" - webadminport="${zero}" - webadminuser="${unavailable}" - webadminpass="${unavailable}" - else - servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | sed 's/\r$//') - serverpassword=$(grep "GamePassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/GamePassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | sed 's/\r$//') - adminpassword=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | sed 's/\r$//') - port=$(grep "Port" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^Port" | grep -v "#" | tr -cd '[:digit:]') - queryport=$((port + 1)) - queryportgs=$(grep "OldQueryPortNumber" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - beaconport=$(grep "ServerBeaconPort" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - webadminenabled=$(grep "bEnabled" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bEnabled//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | sed 's/\r$//') - httpport=$(grep "ListenPort" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - webadminuser=$(grep "AdminUsername" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminUsername//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | sed 's/\r$//') - webadminpass=$(grep "UTServerAdmin.UTServerAdmin" "${servercfgfullpath}" -A 4 | grep "AdminPassword" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | sed 's/\r$//') +# Config Type: Java properties +# Comment: # or ! +# Example: server-name=SERVERNAME +# Filetype: properties +fn_info_game_mcb() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_java_properties "gamemode" "gamemode" + fn_info_game_java_properties "maxplayers" "max-players" + fn_info_game_java_properties "port" "server-port" + fn_info_game_java_properties "portv6" "server-portv6" + fn_info_game_java_properties "servername" "server-name" + fn_info_game_java_properties "worldname" "level-name" + fi + gamemode="${gamemode:-"NOT SET"}" + maxplayers="${maxplayers:-"0"}" + portipv6="${portipv6:-"NOT SET"}" + queryport="${port}" + servername="${servername:-"NOT SET"}" + worldname="${worldname:-"NOT SET"}" +} + +# Config Type: QuakeC +# Comment: // or /* */ +# Example: set sv_hostname "SERVERNAME" +# Filetype: cfg +fn_info_game_mohaa() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_quakec "maxplayers" "sv_maxclients" + fn_info_game_quakec "rconpassword" "rconPassword" + fn_info_game_quakec "servername" "sv_hostname" + fn_info_game_quakec "serverpassword" "g_password" + fi + defaultmap="${defaultmap:-"NOT SET"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${port:-"0"}" + rconpassword="${rconpassword:-"NOT SET"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" +} - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - adminpassword=${adminpassword:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} - beaconport=${beaconport:-"8777"} - queryportgs=${queryportgs:-"0"} - webadminenabled=${webadminenabled:-"NOT SET"} - webadminport=${webadminport:-"0"} - webadminuser=${webadminuser:-"NOT SET"} - webadminpass=${webadminpass:-"NOT SET"} +# Config Type: json +# Parameters: true +# Comment: // or /* */ +fn_info_game_mom() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_json "defaultmap" ".MapName" + fn_info_game_json "maxplayers" ".MaxPlayers" + fn_info_game_json "servername" ".ServerName" + fn_info_game_json "serverpassword" ".ServerPassword" + fi + beaconport="${beaconport:-"0"}" + defaultmap="${defaultmap:-"NOT SET"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" +} + +# Config Type: xml +# Comment: +# Example: Default MTA Server +# Filetype: conf +fn_info_game_mta() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_xml "port" "/config/@port" + fn_info_game_xml "httpport" "/config/@httpport" + fn_info_game_xml "servername" "/config/@servername" + fn_info_game_xml "maxplayers" "/config/@maxplayers" + fn_info_game_xml "ase" "/config/@ase" + fi + if [ "${ase}" == "1" ]; then + ase="Enabled" + else + ase="Disabled" + fi + port="${port:-"0"}" + queryport="$((port + 123))" + httpport="${httpport:-"0"}" + ase="${ase:-"Disabled"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + maxplayers="${maxplayers:-"0"}" +} + +# Config Type: custom +# Comment: // +# Example: port = 14159, +# Filetype: cfg +fn_info_game_nec() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_lua "maxplayers" "slots" + fn_info_game_lua "port" "port" + fn_info_game_lua "serverpassword" "password" fi + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + servername="Necesse Port ${port}" + serverpassword="${serverpassword:-"NOT SET"}" +} - # Parameters - defaultmap=${defaultmap:-"NOT SET"} +# Config Type: json +# Parameters: false +# Comment: // or /* */ +fn_info_game_onset() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_json "maxplayers" ".maxplayers" + fn_info_game_json "port" ".port" + fn_info_game_json "servername" ".servername_short" + fn_info_game_json "serverpassword" ".password" + fi + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + httpport="$((port - 2))" + queryport="$((port - 1))" + servername="${servername:-"NOT SET"}" +} + +# Config Type: custom +# Parameters: false +# Comment: // +# Filetype: cfg +fn_info_game_pc() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_pc_config "apiport" "httpApiPort" + fn_info_game_pc_config "httpenabled" "enableHttpApi" + fn_info_game_pc_config "httpport" "httpApiPort" + fn_info_game_pc_config "maxplayers" "maxPlayerCount" + fn_info_game_pc_config "port" "hostPort" + fn_info_game_pc_config "queryport" "queryPort" + fn_info_game_pc_config "servername" "name" + fn_info_game_pc_config "serverpassword" "password" + fn_info_game_pc_config "steamport" "steamPort" + fi + apiport="${apiport:-"0"}" + httpenabled="${httpenabled:-"0"}" + httpport="${httpport:-"0"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${queryport:-"0"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + steamport="${steamport:-"0"}" } -fn_info_game_unreal2() { +fn_info_game_pc2() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_pc_config "apiport" "httpApiPort" + fn_info_game_pc_config "httpenabled" "enableHttpApi" + fn_info_game_pc_config "httpport" "httpApiPort" + fn_info_game_pc_config "maxplayers" "maxPlayerCount" + fn_info_game_pc_config "port" "hostPort" + fn_info_game_pc_config "queryport" "queryPort" + fn_info_game_pc_config "servername" "name" + fn_info_game_pc_config "serverpassword" "password" + fn_info_game_pc_config "steamport" "steamPort" + fi + apiport="${apiport:-"0"}" + httpenabled="${httpenabled:-"0"}" + httpport="${httpport:-"0"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${queryport:-"0"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + steamport="${steamport:-"0"}" +} + +# Config Type: SiiNunit +# Comment: // +# Example: lobby_name: "SERVERNAME" +# Filetype: ssi +fn_info_game_prism3d() { # Config if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - adminpassword="${unavailable}" + maxplayers="${unavailable}" port="${zero}" queryport="${zero}" - queryportgs="${zero}" - webadminenabled="${unavailable}" - webadminport="${zero}" - webadminuser="${unavailable}" - webadminpass="${unavailable}" + servername="${unavailable}" + serverpassword="${unavailable}" else - servername=$(sed -nr 's/^ServerName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - serverpassword=$(sed -nr 's/^GamePassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - adminpassword=$(sed -nr 's/^AdminPassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - port=$(sed -nr 's/^Port=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport=$((port + 1)) - queryportgs=$(sed -nr 's/^OldQueryPortNumber=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') - webadminenabled=$(sed -nr 's/^bEnabled=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - webadminport=$(sed -nr 's/^ListenPort=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') - webadminuser=$(sed -nr 's/^AdminName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - webadminpass="${adminpassword}" + maxplayers=$(sed -nr 's/^\s*max_players\s*:\s*([0-9]+)/\1/p' "${servercfgfullpath}") + port=$(sed -nr 's/^\s*connection_dedicated_port\s*:\s*([0-9]+)/\1/p' "${servercfgfullpath}") + queryport=$(sed -nr 's/^\s*query_dedicated_port\s*:\s*([0-9]+)/\1/p' "${servercfgfullpath}") + servername=$(sed -nr 's/^\s*lobby_name\s*:\s*"?([^"\r\n]+)"?/\1/p' "${servercfgfullpath}") + serverpassword=$(sed -nr 's/^\s*password\s*:\s*"(.*)"/\1/p' "${servercfgfullpath}") # Not set + maxplayers=${maxplayers:-"0"} + port=${port:-"27015"} + queryport=${queryport:-"27016"} servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} - adminpassword=${adminpassword:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} - queryportgs=${queryportgs:-"0"} - webadminenabled=${webadminenabled:-"NOT SET"} - webadminport=${webadminport:-"0"} - webadminuser=${webadminuser:-"NOT SET"} - webadminpass=${webadminpass:-"NOT SET"} fi - - # Parameters - defaultmap=${defaultmap:-"NOT SET"} } -fn_info_game_unt() { - # Parameters - servername=${selfname:-"NOT SET"} - port=${port:-"0"} - queryport=${port} - steamport=$((port + 1)) +# Config Type: QuakeC +# Comment: // or /* */ +# Example: set hostname "SERVERNAME" +# Filetype: cfg +fn_info_game_q2() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_quakec "maxplayers" "maxclients" + fn_info_game_quakec "rconpassword" "rcon_password" + fn_info_game_quakec "servername" "hostname" + fi + defaultmap="${defaultmap:-"NOT SET"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${port}" + rconpassword="${rconpassword:-"NOT SET"}" + servername="${servername:-"NOT SET"}" +} + +# Config Type: QuakeC +# Comment: // or /* */ +# Example: set sv_hostname "SERVERNAME" +# Filetype: cfg +fn_info_game_q3() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_quakec "maxplayers" "sv_maxclients" + fn_info_game_quakec "rconpassword" "rconpassword" + fn_info_game_quakec "servername" "sv_hostname" + fi + maxplayers="${maxplayers:-"0"}" + rconpassword="${rconpassword:-"NOT SET"}" + servername="${servername:-"NOT SET"}" + port="${port:-"0"}" + queryport="${port}" + defaultmap="${defaultmap:-"NOT SET"}" +} + +# Config Type: QuakeC +# Comment: // or /* */ +# Example: set sv_hostname "SERVERNAME" +# Filetype: cfg +fn_info_game_ql() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_quakec "configip" "net_ip" + fn_info_game_quakec "maxplayers" "sv_maxClients" + fn_info_game_quakec "port" "net_port" + fn_info_game_quakec "rconpassword" "zmq_rcon_password" + fn_info_game_quakec "rconport" "zmq_rcon_port" + fn_info_game_quakec "servername" "sv_hostname" + fn_info_game_quakec "serverpassword" "g_password" + fn_info_game_quakec "statsport" "zmq_stats_port" + fi + configip="${configip:-"0.0.0.0"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${port}" + rconpassword="${rconpassword:-"NOT SET"}" + rconport="${rconport:-"0"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + statsport="${statsport:-"0"}" +} + +# Config Type: QuakeC +# Comment: // or /* */ +# Example: hostname "SERVERNAME" +# Filetype: cfg +fn_info_game_qw() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_quakec "maxplayers" "maxclients" + fn_info_game_quakec "rconpassword" "rcon_password" + fn_info_game_quakec "servername" "hostname" + fi + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${port}" + rconpassword="${rconpassword:-"NOT SET"}" + servername="${servername:-"NOT SET"}" } -fn_info_game_ut() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - else - servername=$(grep "ServerName" "${servercfgfullpath}" | awk -F '=' '{print $2}') - - # Not set - servername=${servername:-"NOT SET"} +fn_info_game_ro() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_ini "adminpassword" "AdminPassword" + fn_info_game_ini "httpenabled" "bEnabled" + fn_info_game_ini "httppassword" "httppasswordword" + fn_info_game_ini "httpport" "ListenPort" + fn_info_game_ini "httpuser" "AdminName" + fn_info_game_ini "lanport" "LANServerPort" + fn_info_game_ini "maxplayers" "MaxPlayers" + fn_info_game_ini "port" "Port" + fn_info_game_ini "queryportgs" "QueryPort" + fn_info_game_ini "servername" "ServerName" + fn_info_game_ini "serverpassword" "GamePassword" + fi + adminpassword="${adminpassword:-"NOT SET"}" + defaultmap="${defaultmap:-"NOT SET"}" + httpenabled="${httpenabled:-"NOT SET"}" + httppassword="${adminpassword}" + httpport="${httpport:-"0"}" + httpuser="${httpuser:-"NOT SET"}" + lanport="${lanport:-"0"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="$((port + 1))" + queryportgs="${queryportgs:-"0"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + steamport="28902" + steamworksport="20610" +} + +# Config Type: QuakeC +# Comment: // or /* */ +# Example: set sv_hostname "SERVERNAME" +# Filetype: cfg +fn_info_game_rtcw() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_quakec "rconpassword" "rconpassword" + fn_info_game_quakec "servername" "sv_hostname" + fn_info_game_quakec "serverpassword" "g_password" + fn_info_game_quakec "maxplayers" "sv_maxclients" fi + rconpassword=${rconpassword:-"NOT SET"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + queryport=${port:-"0"} + defaultmap=${defaultmap:-"NOT SET"} +} +# Config Type: Parameters (mostly) +fn_info_game_rust() { # Parameters + servername=${servername:-"NOT SET"} port=${port:-"0"} - queryport=$((port + 1)) + queryport=${queryport:-"0"} + appport=${appport:-"0"} + rconport=${rconport:-"0"} + gamemode=${gamemode:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + rconpassword=${rconpassword:-"NOT SET"} + rconweb=${rconweb:-"NOT SET"} + tickrate=${tickrate:-"0"} + saveinterval=${saveinterval:-"0"} + serverlevel=${serverlevel:-"NOT SET"} + customlevelurl=${customlevelurl:-"NOT SET"} + worldsize=${worldsize:-"0"} + if [ -n "${seed}" ]; then + seed=${seed:-"0"} + elif [ -f "${datadir}/${selfname}-seed.txt" ]; then + seed=$(cat "${datadir}/${selfname}-seed.txt") + fi + salt=${salt:-"0"} } -fn_info_game_unreal2k4() { +fn_info_game_rw() { # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" serverpassword="${unavailable}" - adminpassword="${unavailable}" + rconpassword="${unavailable}" + rconport="${zero}" + maxplayers="${zero}" port="${zero}" + port2="${zero}" + port3="${zero}" + port4="${zero}" queryport="${zero}" - queryportgs="${zero}" - lanport="${zero}" - webadminenabled="${unavailable}" - httpport="${zero}" - webadminuser="${unavailable}" - webadminpass="${unavailable}" + gamemode="${unavailable}" + worldname="${unavailable}" else - servername=$(sed -nr 's/^ServerName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - serverpassword=$(sed -nr 's/^GamePassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - adminpassword=$(sed -nr 's/^AdminPassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - port=$(sed -nr 's/^Port=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport=$((port + 1)) - queryportgs=$(sed -nr 's/^OldQueryPortNumber=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') - lanport=$(grep "LANServerPort=" "${servercfgfullpath}" | tr -cd '[:digit:]') - webadminenabled=$(sed -nr 's/^bEnabled=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - httpport=$(sed -nr 's/^ListenPort=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') - webadminuser=$(sed -nr 's/^AdminName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - webadminpass="${adminpassword}" + servername=$(grep "server_name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/server_name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "server_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/server_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + rconport=$(grep "rcon_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + maxplayers=$(grep "settings_max_players" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + port=$(grep "server_port" "${servercfgfullpath}" | grep -v "database_mysql_server_port" | grep -v "#" | tr -cd '[:digit:]') + port2=$((port + 1)) + port3=$((port + 2)) + port4=$((port + 3)) + queryport="${port}" + httpqueryport=$((port - 1)) + gamemode=$(grep "settings_default_gamemode=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/settings_default_gamemode//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + worldname=$(grep "server_world_name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/server_world_name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + configip=$(grep "server_ip" "${servercfgfullpath}" | grep -v "database_mysql_server_ip" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/server_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') # Not set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} - adminpassword=${adminpassword:-"NOT SET"} + rconpassword=${rconpassword:-"NOT SET"} + rconport=${rconport:-"NOT SET"} + maxplayers=${maxplayers:-"0"} port=${port:-"0"} + port2=${port2:-"0"} + port3=${port3:-"0"} + port4=${port4:-"0"} queryport=${queryport:-"0"} - queryportgs=${queryportgs:-"0"} - lanport=${lanport:-"0"} - webadminenabled=${webadminenabled:-"NOT SET"} - httpport=${httpport:-"0"} - webadminuser=${webadminuser:-"NOT SET"} - webadminpass=${webadminpass:-"NOT SET"} + httpqueryport=${httpport:-"0"} + gamemode=${gamemode:-"NOT SET"} + worldname=${worldname:-"NOT SET"} + configip=${configip:-"0.0.0.0"} fi } -fn_info_game_ut3() { +# Config Type: custom +# Comment: // or /* */ +# example: hostname "SERVERNAME" +# filetypes: cfg +fn_info_game_samp() { # Config if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - adminpassword="${unavailable}" - maxplayers="${unavailable}" - webadminenabled="${unavailable}" - webadminport="${zero}" - webadminuser="${unavailable}" - webadminpass="${unavailable}" + servername="unnamed server" + rconpassword="${unavailable}" + port="7777" + rconport="${port}" + maxplayers="50" else - servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "GamePassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/GamePassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - adminpassword=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - webadminenabled=$(grep "bEnabled" "${servercfgdir}/UTWeb.ini" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bEnabled//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - webadminport=$(grep "ListenPort" "${servercfgdir}/UTWeb.ini" | grep -v "#" | tr -cd '[:digit:]') - webadminuser="Admin" - webadminpass=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/^rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + port=$(grep "port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + queryport=${port} + rconport=${port} + maxplayers=$(grep "maxplayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') # Not set servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - adminpassword=${adminpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - webadminenabled=${webadminenabled:-"NOT SET"} - webadminport=${webadminport:-"0"} - webadminuser=${webadminuser:-"NOT SET"} - webadminpass=${webadminpass:-"NOT SET"} + rconpassword=${rconpassword:-"NOT SET"} + port=${port:-"7777"} + queryport=${port:-"7777"} + rconport=${rconport:-"7777"} + maxplayers=${maxplayers:-"12"} fi +} +# Config Type: json +# Parameters: false +# Comment: // or /* */ +fn_info_game_sb() { + if [ ! -f "${servercfgfullpath}" ]; then + fn_info_game_json "maxplayers" "maxPlayers" + fn_info_game_json "port" "gameServerPort" + fn_info_game_json "queryenabled" "runQueryServer" + fn_info_game_json "queryport" "queryServerPort" + fn_info_game_json "rconenabled" "runRconServer" + fn_info_game_json "rconpassword" "rconServerPassword" + fn_info_game_json "rconport" "rconServerPort" + fn_info_game_json "servername" "serverName" + fi + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryenabled="${queryenabled:-"NOT SET"}" + queryport="${queryport:-"0"}" + rconenabled="${rconenabled:-"NOT SET"}" + rconpassword="${rconpassword:-"NOT SET"}" + rconport="${rconport:-"0"}" + servername="${servername:-"NOT SET"}" +} + +# Config Type: Parameters +fn_info_game_sbots() { + port="${port:-"0"}" + queryport="${queryport:-"0"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + defaultmap="${defaultmap:-"NOT SET"}" + maxplayers="${maxplayers:-"0"}" +} + +# Config Type: custom (possibly YAML) +# Comment: # +# Example: server_name: SERVERNAME +# Filetype: txt +fn_info_game_scpsl() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_pc_config "adminpassword" "administrator_query_password" + fn_info_game_pc_config "configip" "ipv4_bind_ip" + fn_info_game_pc_config "maxplayers" "max_players" + fn_info_game_pc_config "servername" "server_name" + fn_info_game_pc_config "tickrate" "server_tickrate" + fi + adminpassword="${adminpassword:-"NOT SET"}" + configip="${configip:-"0.0.0.0"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${port}" + servername="${servername:-"NOT SET"}" + tickrate="${tickrate:-"NOT SET"}" +} + +# Config Type: xml +# Comment: +# Example: +# Filetype: xml +fn_info_game_sdtd() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_xml "gamemode" "ServerSettings/@GameMode" + fn_info_game_xml "maxplayers" "ServerSettings/@MaxPlayers" + fn_info_game_xml "servername" "ServerSettings/@ServerName" + fn_info_game_xml "serverpassword" "ServerSettings/@ServerPassword" + fn_info_game_xml "serverport" "ServerSettings/@ServerPort" + fn_info_game_xml "telnetenabled" "ServerSettings/@TelnetEnabled" + fn_info_game_xml "telnetpass" "ServerSettings/@TelnetPassword" + fn_info_game_xml "telnetport" "ServerSettings/@TelnetPort" + fn_info_game_xml "httpenabled" "ServerSettings/@ControlPanelEnabled" + fn_info_game_xml "httppassword" "ServerSettings/@ControlPanelPassword" + fn_info_game_xml "httpport" "ServerSettings/@ControlPanelPort" + fn_info_game_xml "worldname" "ServerSettings/@GameWorld" + + fi + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + port="${port:-"0"}" + queryport="${queryport:-"0"}" + httpenabled="${httpenabled:-"NOT SET"}" + httpport="${httpport:-"0"}" + httppassword="${httppassword:-"NOT SET"}" + telnetenabled="${telnetenabled:-"NOT SET"}" + telnetport="${telnetport:-"0"}" + telnetpass="${telnetpass:-"NOT SET"}" + maxplayers="${maxplayers:-"0"}" + gamemode="${gamemode:-"NOT SET"}" + worldname="${worldname:-"NOT SET"}" + # Telnet IP will be localhost if no password is set + # check_ip will set the IP first. This will overwrite it. + if [ -z "${telnetpass}" ]; then + telnetip="127.0.0.1" + fi +} + +# Config Type: Parameters (with an ini) +fn_info_game_sf() { # Parameters + servername="${selfname:-"NOT SET"}" + port="${port:-"0"}" + queryport="${queryport:-"0"}" + beaconport="${beaconport:-"0"}" +} + +# Config Type: QuakeC +# Comment: // or /* */ +# Example: set sv_hostname "SERVERNAME" +# Filetype: cfg +fn_info_game_sof2() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_quakec "rconpassword" "rconpassword" + fn_info_game_quakec "servername" "sv_hostname" + fn_info_game_quakec "serverpassword" "g_password" + fn_info_game_quakec "maxplayers" "sv_maxclients" + fi + rconpassword="${rconpassword:-"NOT SET"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${port}" + defaultmap="${defaultmap:-"NOT SET"}" +} + +# Config Type: ini +# Parameters: true +# Comment: ; or # +# Server_Name=SERVERNAME +# Filetype: ini +fn_info_game_sol() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_config_ini "adminpassword" "Admin_Password" + fn_info_config_ini "maxplayers" "Max_Players" + fn_info_config_ini "port" "Port" + fn_info_config_ini "servername" "Server_Name" + fn_info_config_ini "serverpassword" "Game_Password" + fi + adminpassword="${adminpassword:-"NOT SET"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + filesport="$((port + 10))" + queryport="${port}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" +} + +# Config Type: Valve KeyValues +# Comment: // +# Example: hostname "SERVERNAME" +# Filetype: cfg +fn_info_game_source() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_valve_keyvalues "rconpassword" "rcon_password" + fn_info_game_valve_keyvalues "servername" "hostname" + fn_info_game_valve_keyvalues "serverpassword" "sv_password" + fi + # Steamport can be between 26901-26910 and is normally automatically set. + # Some servers might support -steamport parameter to set + if [ "${steamport}" == "0" ] || [ -v "${steamport}" ]; then + steamport="$(echo "${ssinfo}" | grep "${srcdslinuxpid}" | awk '{print $5}' | grep ":269" | cut -d ":" -f2)" + fi + clientport="${clientport:-"0"}" + defaultmap="${defaultmap:-"NOT SET"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${port:-"0"}" + rconpassword="${rconpassword:-"NOT SET"}" + rconport="${port:-"0"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + # steamport="${steamport:-"0"}" Steamport is optional so we dont want it to show as not set. +} + +fn_info_game_spark() { + defaultmap="${defaultmap:-"NOT SET"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="$((port + 1))" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + httpuser="${httpuser:-"NOT SET"}" + httppassword="${httppassword:-"NOT SET"}" + httpport="${httpport:-"0"}" +} + +# Config Type: Custom (key-value pairs) +# Parameters: true +# Comment: # or // +# Example: ServerName="SERVERNAME" +# Filetype: cfg +fn_info_game_squad() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_keyvalue_pairs "servername" "ServerName" + fn_info_game_keyvalue_pairs "maxplayers" "MaxPlayers" + fi + if [ -f "${servercfgdir}/Rcon.cfg" ]; then + fn_info_game_keyvalue_pairs "rconport" "Port" + fn_info_game_keyvalue_pairs "rconpassword" "Password" + fi + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${queryport:-"0"}" + rconport="${rconport:-"0"}" + servername="${servername:-"NOT SET"}" + if [ -z "${rconpassword}" ] || [ ${#rconpassword} == 1 ]; then + rconpassword="NOT SET" + fi +} + +# Config Type: Custom (key-value pairs) +# Comment: # or // +# Example: ServerName="SERVERNAME" +# Filetype: cfg +fn_info_game_terraria() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_keyvalue_pairs "maxplayers" "maxplayers" + fn_info_game_keyvalue_pairs "port" "port" + fn_info_game_keyvalue_pairs "servername" "worldname" + fn_info_game_keyvalue_pairs "worldname" "world" + fi + queryport="${port:-"0"}" + servername="${servername:-"NOT SET"}" + port="${port:-"0"}" + queryport="${queryport:-"0"}" + worldname="${worldname:-"NOT SET"}" + maxplayers="${maxplayers:-"0"}" +} + +# Config Type: QuakeC (custom) +# Comment: // or /* */ +# Example: set sv_hostname "SERVERNAME" +# Filetype: cfg +fn_info_game_tw() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_quakec "servername" "sv_name" + fn_info_game_quakec "serverpassword" "password" + fn_info_game_quakec "rconpassword" "sv_rcon_password" + fn_info_game_quakec "port" "sv_port" + fn_info_game_quakec "maxplayers" "sv_max_clients" + fi + queryport="${port}" + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + rconpassword=${rconpassword:-"NOT SET"} port=${port:-"0"} - queryport=${queryport:-"0"} - defaultmap=${defaultmap:-"NOT SET"} + maxplayers=${maxplayers:-"0"} +} + +# Config Type: Parameters +fn_info_game_unt() { + servername="${selfname:-"NOT SET"}" + port="${port:-"0"}" + queryport="${port}" + steamport="$((port + 1))" } +# Config Type: Parameters fn_info_game_vh() { - # Parameters - port=${port:-"0"} + port="${port:-"0"}" # Query port only enabled if public server if [ "${public}" != "0" ]; then - queryport=$((port + 1)) + queryport="$((port + 1))" else querymode="1" fi - gameworld=${gameworld:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - servername=${servername:-"NOT SET"} + worldname="${worldname:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + servername="${servername:-"NOT SET"}" } +# Config Type: json +# Parameters: false +# Comment: // or /* */ fn_info_game_vints() { - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - maxplayers="${unavailable}" - serverpassword="${unavailable}" - port="${port:-"0"}" - else - servername=$(jq -r '.ServerName' "${servercfgfullpath}") - maxplayers=$(jq -r '.MaxClients' "${servercfgfullpath}") - serverpassword=$(jq -r 'select(.Password != null) | .Password' "${servercfgfullpath}") - port=$(jq -r '.Port' "${servercfgfullpath}") - configip=$(jq -r 'select(.Ip != null) | .Ip' "${servercfgfullpath}") - fi - queryport=${port:-"0"} - serverpassword=${serverpassword:-"NOT SET"} - configip=${configip:-"0.0.0.0"} + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_json "configip" "select(.Ip != null) | .Ip" + fn_info_game_json "maxplayers" ".MaxClients" + fn_info_game_json "port" ".Port" + fn_info_game_json "servername" ".ServerName" + fn_info_game_json "serverpassword" "select(.Password != null) | .Password" + fi + configip="${configip:-"0.0.0.0"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${port:-"0"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" } +# Config Type: Java properties +# Comment: # or ! +# Example: motd=SERVERNAME +# Filetype: properties fn_info_game_vpmc() { - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - configip="0.0.0.0" - port="25577" - else - servername=$(sed -nr 's/^motd\s*=\s*"(.*)"/\1/p' "${servercfgfullpath}") - bindaddress=$(sed -nr 's/^bind\s*=\s*"([0-9.:]+)"/\1/p' "${servercfgfullpath}") - configip=$(echo "${bindaddress}" | cut -d ':' -f 1) - port=$(echo "${bindaddress}" | cut -d ':' -f 2) - - servername=${servername:-"NOT SET"} + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_java_properties "servername" "motd" + fn_info_game_java_properties "bindaddress" "bind" fi - queryport=${port:-"25577"} + configip="$(echo "${bindaddress}" | cut -d ':' -f 1)" + port="$(echo "${bindaddress}" | cut -d ':' -f 2)" + queryport="${port:-"0"}" + servername="${servername:-"NOT SET"}" } +# Config Type: QuakeC +# Comment: // or /* */ +# Example: set sv_hostname "SERVERNAME" +# Filetype: cfg fn_info_game_wet() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - rconpassword="${unavailable}" - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - port="${zero}" - queryport="${zero}" - else - port=$(grep "set net_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - queryport="${port}" - rconpassword=$(grep "set zmq_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set zmq_rcon_password //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//g' -e '/^\//d' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - servername=$(grep "set sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "set g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "set sv_maxclients" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - configip=$(grep "set net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set net_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - rconpassword=${rconpassword:-"NOT SET"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"27960"} - queryport=${queryport:-"27960"} - configip=${configip:-"0.0.0.0"} - fi -} - + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_quakec "configip" "net_ip" + fn_info_game_quakec "maxplayers" "sv_maxclients" + fn_info_game_quakec "port" "net_port" + fn_info_game_quakec "rconpassword" "zmq_rcon_password" + fn_info_game_quakec "servername" "sv_hostname" + fn_info_game_quakec "serverpassword" "g_password" + fi + configip="${configip:-"0.0.0.0"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${queryport:-"0"}" + rconpassword="${rconpassword:-"NOT SET"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" +} + +# Config Type: QuakeC +# Comment: // or /* */ +# Example: set sv_hostname "SERVERNAME" +# Filetype: cfg fn_info_game_wf() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - rconpassword="${unavailable}" - servername="${unavailable}" - maxplayers="${zero}" - else - rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - - # Not set - rconpassword=${rconpassword:-"NOT SET"} - servername=${servername:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi - - # Parameters - port=${port:-"0"} + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_quakec "maxplayers" "sv_maxclients" + fn_info_game_quakec "rconpassword" "rcon_password" + fn_info_game_quakec "servername" "sv_hostname" + fi + httpport="${httpport:-"0"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" queryport="${port:-"0"}" - webadminport=${webadminport:-"0"} + rconpassword="${rconpassword:-"NOT SET"}" + servername="${servername:-"NOT SET"}" } fn_info_game_wmc() { @@ -2339,6 +2132,9 @@ fn_info_game_wmc() { fi } +# Config Type: custom (key-value) +# Comment: # +# Example: SERVERNAME=SERVERNAME fn_info_game_wurm() { # Config if [ ! -f "${servercfgfullpath}" ]; then @@ -2518,7 +2314,7 @@ elif [ "${shortname}" == "unt" ]; then elif [ "${shortname}" == "ut" ]; then fn_info_game_ut elif [ "${shortname}" == "ut2k4" ]; then - fn_info_game_unreal2k4 + fn_info_game_ut2k4 elif [ "${shortname}" == "ut3" ]; then fn_info_game_ut3 elif [ "${shortname}" == "ut99" ]; then @@ -2557,10 +2353,10 @@ if [ ! -f "${tmpdir}/extip.txt" ]; then extip="$(curl --connect-timeout 10 -s https://api.ipify.org 2> /dev/null)" exitcode=$? # if curl passes add extip to externalip.txt - if [ "${exitcode}" != "0" ]; then - echo "Unable to get external IP address" - else + if [ "${exitcode}" == "0" ]; then echo "${extip}" > "${tmpdir}/extip.txt" + else + echo "Unable to get external IP address" fi else extip="$(cat "${tmpdir}/extip.txt")" @@ -2579,15 +2375,15 @@ fi # Checked after config init, as the queryport is needed if [ -z "${displaymasterserver}" ]; then if [ "$(command -v jq 2> /dev/null)" ]; then - if [ "${ip}" ] && [ "${port}" ]; then + if [ -n "${ip}" ] && [ -n "${port}" ]; then if [ "${steammaster}" == "true" ] || [ "${commandname}" == "DEV-QUERY-RAW" ]; then # Will query server IP addresses first. for queryip in "${queryips[@]}"; do - masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${queryip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" '.response.servers[] | select((.gameport == ($port|tonumber) or (.gameport == ($queryport|tonumber)))) | .addr' | wc -l 2> /dev/null)" + masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${queryip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" 'if .response.servers != null then .response.servers[] | select((.gameport == ($port|tonumber) or .gameport == ($queryport|tonumber))) | .addr else empty end' | wc -l 2> /dev/null)" done # Should that not work it will try the external IP. if [ "${masterserver}" == "0" ]; then - masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${extip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" '.response.servers[] | select((.gameport == ($port|tonumber) or (.gameport == ($queryport|tonumber)))) | .addr' | wc -l 2> /dev/null)" + masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${extip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" 'if .response.servers != null then .response.servers[] | select((.gameport == ($port|tonumber) or .gameport == ($queryport|tonumber))) | .addr else empty end' | wc -l 2> /dev/null)" fi if [ "${masterserver}" == "0" ]; then displaymasterserver="false" diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index 4dbbdcd96..d112764c4 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -35,8 +35,8 @@ fn_info_message_password_strip() { statspassword="********" fi - if [ "${webadminpass}" ]; then - webadminpass="********" + if [ "${httppassword}" ]; then + httppassword="********" fi if [ "${telnetpass}" ]; then @@ -593,6 +593,12 @@ fn_info_message_script() { if [ -n "${networkcfgfullpath}" ]; then echo -e "${lightblue}Network config file:\t${default}${networkcfgfullpath}" fi + + # Cluster config file location (DST) + if [ -n "${clustercfgfullpath}" ]; then + echo -e "${lightblue}Cluster config file:\t${default}${clustercfgfullpath}" + fi + } | column -s $'\t' -t } @@ -803,7 +809,7 @@ fn_info_message_arma3() { fn_port "Game" port udp fn_port "Voice" voiceport udp fn_port "Query" queryport udp - fn_port "Steam Master" steammasterport udp + fn_port "Steam" steamport udp fn_port "Voice (unused)" voiceunusedport udp fn_port "BattleEye" battleeyeport udp } | column -s $'\t' -t @@ -823,8 +829,8 @@ fn_info_message_av() { fn_port "header" fn_port "Game" port udp fn_port "Query" queryport udp - fn_port "Steam Master" steammasterport udp - fn_port "Steam Query" steamqueryport udp + fn_port "Steam" steamport udp + fn_port "Steamworks P2P" steamworksport udp fn_port "RCON" rconport tcp } | column -s $'\t' -t } @@ -962,7 +968,7 @@ fn_info_message_dayz() { fn_port "header" fn_port "Game" port udp fn_port "Query Steam" queryport udp - fn_port "Steam Master" steammasterport udp + fn_port "Steam" steamport udp fn_port "BattleEye" battleeyeport udp } | column -s $'\t' -t } @@ -980,8 +986,8 @@ fn_info_message_dst() { fn_port "header" fn_port "Game: Server" port udp fn_port "Game: Master" masterport udp + fn_port "Steam" steamport udp fn_port "Steam: Auth" steamauthport udp - fn_port "Steam: Master" steammasterport udp } | column -s $'\t' -t } @@ -989,7 +995,7 @@ fn_info_message_eco() { { fn_port "header" fn_port "Game" port udp - fn_port "Web Admin" webadminport tcp + fn_port "Web Interface" httpport tcp } | column -s $'\t' -t } @@ -1076,19 +1082,19 @@ fn_info_message_kf() { fn_port "Game" port udp fn_port "Query" queryport udp fn_port "Query (GameSpy)" queryportgs udp - fn_port "Web Admin" webadminport tcp + fn_port "Web Interface" httpport tcp fn_port "LAN" lanport udp + fn_port "Steamworks P2P" steamworksport udp fn_port "Steam" steamport udp - fn_port "Steam Master" steammasterport udp } | column -s $'\t' -t echo -e "" - echo -e "${lightgreen}${servername} Web Admin${default}" + echo -e "${lightgreen}${servername} Web Interface${default}" fn_messages_separator { - echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}" - echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}" - echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}" - echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}" + echo -e "${lightblue}Web Interface enabled:\t${default}${httpenabled}" + echo -e "${lightblue}Web Interface url:\t${default}http://${httpip}:${httpport}" + echo -e "${lightblue}Web Interface username:\t${default}${httpuser}" + echo -e "${lightblue}Web Interface password:\t${default}${httppassword}" } | column -s $'\t' -t } @@ -1098,16 +1104,16 @@ fn_info_message_kf2() { fn_port "header" fn_port "Game" port udp fn_port "Query" queryport udp - fn_port "Web Admin" webadminport tcp + fn_port "Web Interface" httpport tcp } | column -s $'\t' -t echo -e "" - echo -e "${lightgreen}${servername} Web Admin${default}" + echo -e "${lightgreen}${servername} Web Interface${default}" fn_messages_separator { - echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}" - echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}" - echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}" - echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}" + echo -e "${lightblue}Web Interface enabled:\t${default}${httpenabled}" + echo -e "${lightblue}Web Interface url:\t${default}http://${httpip}:${httpport}" + echo -e "${lightblue}Web Interface username:\t${default}${httpuser}" + echo -e "${lightblue}Web Interface password:\t${default}${httppassword}" } | column -s $'\t' -t } @@ -1193,6 +1199,15 @@ fn_info_message_pc() { fn_port "Game" port udp fn_port "Query" queryport udp fn_port "Steam" steamport udp + fn_port "HTTP" httpport tcp + fn_port "API" apiport tcp + } | column -s $'\t' -t + echo -e "" + echo -e "${lightgreen}${gamename} Web Interface${default}" + fn_messages_separator + { + echo -e "${lightblue}Web Interface enabled:\t${default}${httpenabled}" + echo -e "${lightblue}Web Interface url:\t${default}http://${httpip}:${httpport}" } | column -s $'\t' -t } @@ -1268,19 +1283,19 @@ fn_info_message_ro() { fn_port "header" fn_port "Game" port udp fn_port "Query" queryport udp - fn_port "Web Admin" webadminport tcp + fn_port "Web Interface" httpport tcp fn_port "LAN" lanport udp + fn_port "Steamworks P2P" steamworksport udp fn_port "Steam" steamport udp - fn_port "Steam Master" steammasterport udp } | column -s $'\t' -t echo -e "" - echo -e "${lightgreen}${servername} Web Admin${default}" + echo -e "${lightgreen}${servername} Web Interface${default}" fn_messages_separator { - echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}" - echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}" - echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}" - echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}" + echo -e "${lightblue}Web Interface enabled:\t${default}${httpenabled}" + echo -e "${lightblue}Web Interface url:\t${default}http://${httpip}:${httpport}" + echo -e "${lightblue}Web Interface username:\t${default}${httpuser}" + echo -e "${lightblue}Web Interface password:\t${default}${httppassword}" } | column -s $'\t' -t } @@ -1356,17 +1371,17 @@ fn_info_message_sdtd() { fn_port "Game" port udp fn_port "Game+2" port3 udp fn_port "Query" queryport tcp - fn_port "Web Admin" webadminport tcp + fn_port "Web Interface" httpport tcp fn_port "Telnet" telnetport tcp } | column -s $'\t' -t echo -e "" - echo -e "${lightgreen}${gamename} Web Admin${default}" + echo -e "${lightgreen}${gamename} Web Interface${default}" fn_messages_separator { - echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}" - echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}/index.html" - echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}" - echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}" + echo -e "${lightblue}Web Interface enabled:\t${default}${httpenabled}" + echo -e "${lightblue}Web Interface url:\t${default}http://${httpip}:${httpport}/index.html" + echo -e "${lightblue}Web Interface username:\t${default}${httpuser}" + echo -e "${lightblue}Web Interface password:\t${default}${httppassword}" } | column -s $'\t' -t echo -e "" echo -e "${lightgreen}${gamename} Telnet${default}" @@ -1433,15 +1448,15 @@ fn_info_message_spark() { fn_port "header" fn_port "Game" port udp fn_port "Query" queryport udp - fn_port "Web Admin" webadminport tcp + fn_port "Web Interface" httpport tcp } | column -s $'\t' -t echo -e "" - echo -e "${lightgreen}${gamename} Web Admin${default}" + echo -e "${lightgreen}${gamename} Web Interface${default}" fn_messages_separator { - echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}/index.html" - echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}" - echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}" + echo -e "${lightblue}Web Interface url:\t${default}http://${httpip}:${httpport}/index.html" + echo -e "${lightblue}Web Interface username:\t${default}${httpuser}" + echo -e "${lightblue}Web Interface password:\t${default}${httppassword}" } | column -s $'\t' -t } @@ -1459,13 +1474,13 @@ fn_info_message_st() { fn_port "header" fn_port "Game" port udp fn_port "Query" queryport udp - fn_port "Web Admin" webadminport tcp + fn_port "Web Interface" httpport tcp } | column -s $'\t' -t echo -e "" - echo -e "${lightgreen}${gamename} Web Admin${default}" + echo -e "${lightgreen}${gamename} Web Interface${default}" fn_messages_separator { - echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}" + echo -e "${lightblue}Web Interface url:\t${default}http://${httpip}:${httpport}" } | column -s $'\t' -t } @@ -1515,63 +1530,42 @@ fn_info_message_tu() { } | column -s $'\t' -t } -fn_info_message_unreal() { - fn_info_message_password_strip - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - fn_port "LAN Beacon" beaconport udp - fn_port "Web Admin" webadminport tcp - } | column -s $'\t' -t - echo -e "" - echo -e "${lightgreen}${servername} Web Admin${default}" - fn_messages_separator - { - echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}" - echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}" - echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}" - echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}" - } | column -s $'\t' -t -} - fn_info_message_ut2k4() { { fn_port "header" fn_port "Game" port udp fn_port "Query" queryport udp fn_port "Query (GameSpy)" queryportgs udp - fn_port "Web Admin" webadminport tcp + fn_port "Web Interface" httpport tcp fn_port "LAN" lanport udp } | column -s $'\t' -t echo -e "" - echo -e "${lightgreen}${servername} Web Admin${default}" + echo -e "${lightgreen}${servername} Web Interface${default}" fn_messages_separator { - echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}" - echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}" - echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}" - echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}" + echo -e "${lightblue}Web Interface enabled:\t${default}${httpenabled}" + echo -e "${lightblue}Web Interface url:\t${default}http://${httpip}:${httpport}" + echo -e "${lightblue}Web Interface username:\t${default}${httpuser}" + echo -e "${lightblue}Web Interface password:\t${default}${httppassword}" } | column -s $'\t' -t } fn_info_message_unreal() { - fn_info_message_password_strip { fn_port "header" fn_port "Game" port udp fn_port "Query" queryport udp fn_port "LAN Beacon" beaconport udp - fn_port "Web Admin" webadminport tcp + fn_port "Web Interface" httpport tcp } | column -s $'\t' -t echo -e "" - echo -e "${lightgreen}${servername} Web Admin${default}" + echo -e "${lightgreen}${servername} Web Interface${default}" fn_messages_separator { - echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}" - echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}" - echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}" - echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}" + echo -e "${lightblue}Web Interface enabled:\t${default}${httpenabled}" + echo -e "${lightblue}Web Interface url:\t${default}http://${httpip}:${httpport}" + echo -e "${lightblue}Web Interface username:\t${default}${httpuser}" + echo -e "${lightblue}Web Interface password:\t${default}${httppassword}" } | column -s $'\t' -t } @@ -1598,16 +1592,16 @@ fn_info_message_ut3() { fn_port "header" fn_port "Game" port udp fn_port "Query" queryport udp - fn_port "Web Admin" webadminport tcp + fn_port "Web Interface" httpport tcp } | column -s $'\t' -t echo -e "" - echo -e "${lightgreen}${servername} Web Admin${default}" + echo -e "${lightgreen}${servername} Web Interface${default}" fn_messages_separator { - echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}" - echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}" - echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}" - echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}" + echo -e "${lightblue}Web Interface enabled:\t${default}${httpenabled}" + echo -e "${lightblue}Web Interface url:\t${default}http://${httpip}:${httpport}" + echo -e "${lightblue}Web Interface username:\t${default}${httpuser}" + echo -e "${lightblue}Web Interface password:\t${default}${httppassword}" } | column -s $'\t' -t } diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index 699a919c3..b39539020 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -452,6 +452,9 @@ elif [ "${shortname}" == "eco" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations +elif [ "${shortname}" == "em" ]; then + fn_default_config_local + fn_list_config_locations elif [ "${shortname}" == "etl" ]; then gamedirname="ETLegacy" array_configs+=(server.cfg) diff --git a/package-lock.json b/package-lock.json index b592f5bea..8532248e0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,7 +7,7 @@ "name": "linuxgsm", "license": "MIT", "devDependencies": { - "prettier": "^2.7.1", + "prettier": "^2.8.8", "prettier-plugin-sh": "^0.12.8" } }, @@ -127,9 +127,9 @@ "dev": true }, "node_modules/open": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/open/-/open-8.4.1.tgz", - "integrity": "sha512-/4b7qZNhv6Uhd7jjnREh1NjnPxlTq+XNWPG88Ydkj5AILcA5m3ajvcg57pB24EQjKv0dK62XnDqk9c/hkIG5Kg==", + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", + "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", "dev": true, "dependencies": { "define-lazy-prop": "^2.0.0", @@ -159,9 +159,9 @@ "dev": true }, "node_modules/prettier": { - "version": "2.8.4", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz", - "integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==", + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", "dev": true, "bin": { "prettier": "bin-prettier.js" diff --git a/package.json b/package.json index c62ce3175..f3d3df0fd 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "test": "tests" }, "devDependencies": { - "prettier": "^2.7.1", + "prettier": "^2.8.8", "prettier-plugin-sh": "^0.12.8" }, "scripts": { From 7fec81015c3dbda53055b80854853501fe857a56 Mon Sep 17 00:00:00 2001 From: Nicolas Le Cam Date: Tue, 16 May 2023 22:03:25 +0200 Subject: [PATCH 137/374] feat(pz): Add option to configure server memory usage (#4204) --- lgsm/config-default/config-lgsm/pzserver/_default.cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/pzserver/_default.cfg b/lgsm/config-default/config-lgsm/pzserver/_default.cfg index 399c43f0f..55c3f587b 100644 --- a/lgsm/config-default/config-lgsm/pzserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pzserver/_default.cfg @@ -10,10 +10,11 @@ ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" +javaram="8192" # -Xmx$8192M adminpassword="CHANGE_ME" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="--ip ${ip} -adminpassword \"${adminpassword}\" -servername ${selfname}" +startparameters="--ip ${ip} -adminpassword \"${adminpassword}\" -servername ${selfname} -Xmx${javaram}M" #### LinuxGSM Settings #### From a498a8830307ab5cb87acebf1064370e69592baa Mon Sep 17 00:00:00 2001 From: Nicolas Le Cam Date: Tue, 16 May 2023 22:18:32 +0200 Subject: [PATCH 138/374] feat(deps): Add depencency support for Debian 12 (bookworm) (#4203) * feat(deps): Add depencency support for Debian 12 (bookworm) * add xmllint --------- Co-authored-by: Daniel Gibbs --- .github/ISSUE_TEMPLATE/bug_report.yml | 1 + .github/ISSUE_TEMPLATE/feature_request.yml | 1 + lgsm/data/debian-12.csv | 131 +++++++++++++++++++++ 3 files changed, 133 insertions(+) create mode 100644 lgsm/data/debian-12.csv diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index f0837b108..2b339d122 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -34,6 +34,7 @@ body: - Ubuntu 20.04 - Ubuntu 18.04 - Ubuntu 16.04 + - Debian 12 - Debian 11 - Debian 10 - Debian 9 diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index fb06052ac..45aced3d1 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -34,6 +34,7 @@ body: - Ubuntu 20.04 - Ubuntu 18.04 - Ubuntu 16.04 + - Debian 12 - Debian 11 - Debian 10 - Debian 9 diff --git a/lgsm/data/debian-12.csv b/lgsm/data/debian-12.csv new file mode 100644 index 000000000..3f3e0aed1 --- /dev/null +++ b/lgsm/data/debian-12.csv @@ -0,0 +1,131 @@ +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat-traditional,python3,tar,tmux,unzip,util-linux,wget,xz-utils +steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd +ac +ahl +ahl2 +ark +arma3 +armar,libcurl4 +ats +av +bb +bb2,libcurl4-gnutls-dev:i386 +bd +bf1942,libncurses5:i386,libtinfo5:i386 +bfv,libncurses5:i386,libstdc++5:i386 +bmdm,libncurses5:i386 +bo +bs +bt,libicu-dev,dos2unix +btl +cc +cd +ck,xvfb +cmw +cod,libstdc++5:i386 +cod2,libstdc++5:i386 +cod4 +coduo,libstdc++5:i386 +codwaw +col +cs +cscz +csgo +css,libtinfo5:i386 +dab +dayz +dmc +dod +dodr +dods +doi +dst,libcurl4-gnutls-dev:i386 +dys +eco,libgdiplus +em +etl +ets2 +fctr +fof +gmod,libtinfo5:i386 +hl2dm +hldm +hldms +hw,lib32z1 +ins +inss +ios +jc2 +jc3 +jk2 +kf +kf2 +l4d +l4d2 +lo +mc,openjdk-17-jre +mcb +mh +mohaa,libstdc++5:i386 +mom +mta,libncursesw5,libxml2-utils +nd +nec +nmrih,libtinfo5:i386 +ns +ns2,speex,libtbb12 +ns2c,speex:i386,libtbb12 +onset,libmariadb-dev +opfor +pc +pmc,openjdk-17-jre +pstbs,libgconf-2-4 +pvkii +pvr,libc++1 +pz,openjdk-17-jre,rng-tools5 +q2 +q3 +ql +qw +ricochet +ro +rtcw +rust,lib32z1 +rw,openjdk-17-jre +samp +sb +sbots +scpsl,mono-complete +scpslsm,mono-complete +sdtd,telnet,expect,libxml2-utils +sf +sfc,libtinfo5:i386 +sof2 +sol +squad +st +stn +sven,libssl3:i386,zlib1g:i386 +terraria +tf2,libcurl4-gnutls-dev:i386 +tfc +ti +ts +ts3 +tu +tw +unt +ut +ut2k4 +ut3 +ut99 +vh,libc6-dev +vints,mono-complete +vpmc,openjdk-17-jre +vs +wet +wf +wmc,openjdk-17-jre +wurm,xvfb +zmr,libtinfo5:i386 +zps,libtinfo5:i386 From ecc9934d43baa5613baa4bed2990ef6f26506ab6 Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 16 May 2023 22:30:00 +0200 Subject: [PATCH 139/374] fix(tiserver): fix and update to latest version (#4190) * fix(tiserver): fix and update to latest version * update ti details --------- Co-authored-by: Daniel Gibbs --- .../config-default/config-lgsm/tiserver/_default.cfg | 5 ++++- lgsm/modules/info_game.sh | 12 +++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lgsm/config-default/config-lgsm/tiserver/_default.cfg b/lgsm/config-default/config-lgsm/tiserver/_default.cfg index f31864df3..652c9430e 100644 --- a/lgsm/config-default/config-lgsm/tiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tiserver/_default.cfg @@ -15,8 +15,11 @@ queryport="27015" # Possible maps, see: https://isle.fandom.com/wiki/The_Isle_Server_Settings_and_Configuration#Optional_Maps map="" +# EAC start parameters +eaclaunch="-ini:Engine:[EpicOnlineServices]:DedicatedServerClientId=xyza7891gk5PRo3J7G9puCJGFJjmEguW -ini:Engine:[EpicOnlineServices]:DedicatedServerClientSecret=pKWl6t5i9NJK8gTpVlAxzENZ65P8hYzodV8Dqe5Rlc8" + ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="${map} -MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -log" +startparameters="${map} -MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -log ${eaclaunch}" #### LinuxGSM Settings #### diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index ff77f8471..2f32abf53 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -653,12 +653,18 @@ fn_info_game_stn() { # Filetype: ini fn_info_game_ti() { if [ -f "${servercfgfullpath}" ]; then - fn_info_game_ini "servername" "ServerName" fn_info_game_ini "maxplayers" "MaxPlayerCount" + fn_info_game_ini "queueenabled" "QueueEnabled" + fn_info_game_ini "queueport" "QueuePort" + fn_info_game_ini "rconenabled" "RconEnabled" + fn_info_game_ini "rconport" "RconPort" + fn_info_game_ini "servername" "ServerName" fi maxplayers="${maxplayers:-"0"}" - port="${port:-"0"}" - queryport="${queryport:-"0"}" + queueenabled="${queueenabled:-"NOT SET"}" + queueport="${queueport:-"0"}" + rconenabled="${rconenabled:-"NOT SET"}" + rconport="${rconport:-"0"}" servername="${servername:-"NOT SET"}" } From fae50c4c653deff8109dbdd6cb6974b2001f7f9f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 18 May 2023 13:25:31 +0100 Subject: [PATCH 140/374] feat: optimise gamedig and master server query (#4206) * feat: update gamedig cli commands will speed up querying of servers * feat: master server query will now use extip first extip more likely to succeed thus will speed up query * minor tweaks * bug * ports alphabetical a * reduce gsquery timeout to 2s * display ss command output --- lgsm/modules/check_ip.sh | 10 +-- lgsm/modules/command_dev_query_raw.sh | 117 ++++++++++++++------------ lgsm/modules/info_game.sh | 13 +-- lgsm/modules/info_messages.sh | 17 ++-- lgsm/modules/query_gamedig.sh | 11 +-- lgsm/modules/query_gsquery.py | 2 +- 6 files changed, 89 insertions(+), 81 deletions(-) diff --git a/lgsm/modules/check_ip.sh b/lgsm/modules/check_ip.sh index a2a16298c..7671429cd 100644 --- a/lgsm/modules/check_ip.sh +++ b/lgsm/modules/check_ip.sh @@ -10,7 +10,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" info_game.sh -ip_commands_array=("/bin/ip" "/usr/sbin/ip" "ip") +ip_commands_array=("ip" "/bin/ip" "/usr/sbin/ip") for ip_command in "${ip_commands_array[@]}"; do if [ "$(command -v "${ip_command}" 2> /dev/null)" ]; then ipcommand="${ip_command}" @@ -18,7 +18,7 @@ for ip_command in "${ip_commands_array[@]}"; do fi done -ethtool_commands_array=("/bin/ethtool" "/usr/sbin/ethtool" "ethtool") +ethtool_commands_array=("ethtool" "/bin/ethtool" "/usr/sbin/ethtool") for ethtool_command in "${ethtool_commands_array[@]}"; do if [ "$(command -v "${ethtool_command}" 2> /dev/null)" ]; then ethtoolcommand="${ethtool_command}" @@ -34,21 +34,21 @@ function fn_is_valid_ip() { grep -qEe '^[1-9]+[0-9]*\.[0-9]+\.[0-9]+\.[0-9]+$' <<< "${ip}" } -# Check if server has multiple IP addresses +# Check if server has multiple IP addresses. # If the IP variable has been set by user. if fn_is_valid_ip "${ip}"; then queryips=("${ip}") httpip=("${ip}") telnetip=("${ip}") -# If game config does have an IP set. +# If the game config has an IP set. elif fn_is_valid_ip "${configip}"; then queryips=("${configip}") ip="${configip}" httpip=("${configip}") telnetip=("${configip}") # If there is only 1 server IP address. -# Some IP details can automaticly use the one IP +# Some IP details can automatically use the one IP. elif [ "${#current_ips[@]}" == "1" ]; then queryips=("127.0.0.1" "${current_ips[@]}") ip="0.0.0.0" diff --git a/lgsm/modules/command_dev_query_raw.sh b/lgsm/modules/command_dev_query_raw.sh index d75d12f31..a2cfa1f68 100644 --- a/lgsm/modules/command_dev_query_raw.sh +++ b/lgsm/modules/command_dev_query_raw.sh @@ -51,17 +51,20 @@ echo -e "==================================================================" echo -e "Game+3:" fi fi - - if [ -v port401 ]; then - echo -e "Game+400: \t${port401} \t$(ss -tupl | grep -c "${port401}") \t$(ss -tupl | grep "${port401}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${port401}" | grep udp | awk '{ print $2 }')" - else - echo -e "Game+400:" + if [ "${shortname}" == "pvr" ]; then + if [ -v port401 ]; then + echo -e "Game+400: \t${port401} \t$(ss -tupl | grep -c "${port401}") \t$(ss -tupl | grep "${port401}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${port401}" | grep udp | awk '{ print $2 }')" + else + echo -e "Game+400:" + fi fi - if [ -v portipv6 ]; then - echo -e "Game ipv6: \t${portipv6} \t$(ss -tupl | grep -c "${portipv6}") \t$(ss -tupl | grep "${portipv6}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${portipv6}" | grep udp | awk '{ print $2 }')" - else - echo -e "Game ipv6:" + if [ "${shortname}" == "mcb" ]; then + if [ -v portipv6 ]; then + echo -e "Game ipv6: \t${portipv6} \t$(ss -tupl | grep -c "${portipv6}") \t$(ss -tupl | grep "${portipv6}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${portipv6}" | grep udp | awk '{ print $2 }')" + else + echo -e "Game ipv6:" + fi fi if [ -v queryport ]; then @@ -70,6 +73,42 @@ echo -e "==================================================================" echo -e "Query:" fi + if [ -v apiport ]; then + echo -e "Game: \t${apiport} \t$(ss -tupl | grep -c "${apiport}") \t$(ss -tupl | grep "${apiport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${apiport}" | grep udp | awk '{ print $2 }')" + else + echo -e "API:" + fi + + if [ -v appport ]; then + echo -e "App: \t${appport} \t$(ss -tupl | grep -c "${appport}") \t$(ss -tupl | grep "${appport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${appport}" | grep udp | awk '{ print $2 }')" + else + echo -e "App:" + fi + + if [ -v battleeyeport ]; then + echo -e "BattleEye: \t${battleeyeport} \t$(ss -tupl | grep -c "${battleeyeport}") \t$(ss -tupl | grep "${battleeyeport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${battleeyeport}" | grep udp | awk '{ print $2 }')" + else + echo -e "BattleEye:" + fi + + if [ -v beaconport ]; then + echo -e "Beacon: \t${beaconport} \t$(ss -tupl | grep -c "${beaconport}") \t$(ss -tupl | grep "${beaconport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${beaconport}" | grep udp | awk '{ print $2 }')" + else + echo -e "Beacon:" + fi + + if [ -v 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 + echo -e "Client:" + fi + + if [ -v fileport ]; then + echo -e "File: \t${fileport} \t$(ss -tupl | grep -c "${fileport}") \t$(ss -tupl | grep "${fileport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${fileport}" | grep udp | awk '{ print $2 }')" + else + echo -e "File:" + fi + if [ -v httpport ]; then echo -e "HTTP: \t${httpport} \t$(ss -tupl | grep -c "${httpport}") \t$(ss -tupl | grep "${httpport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${httpport}" | grep udp | awk '{ print $2 }')" else @@ -77,7 +116,7 @@ echo -e "==================================================================" fi if [ -v httpqueryport ]; then - echo -e "HTTP Query: \t${httpqueryport} \t$(ss -tupl | grep -c "${httpqueryport}") \t$(ss -tupl | grep" ${httpqueryport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${httpqueryport} | grep udp | awk '{ print $2 }')" + echo -e "HTTP Query: \t${httpqueryport} \t$(ss -tupl | grep -c "${httpqueryport}") \t$(ss -tupl | grep" ${httpqueryport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${httpqueryport}" | grep udp | awk '{ print $2 }')" else echo -e "HTTP Query:" fi @@ -88,16 +127,10 @@ echo -e "==================================================================" echo -e "Web Interface:" fi - if [ -v 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 - echo -e "Client:" - fi - - if [ -v rconport ]; then - echo -e "RCON: \t${rconport} \t$(ss -tupl | grep -c "${rconport}") \t$(ss -tupl | grep "${rconport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${rconport}" | grep udp | awk '{ print $2 }')" + if [ -v masterport ]; then + echo -e "Game: Master: \t${masterport} \t$(ss -tupl | grep -c "${masterport}") \t$(ss -tupl | grep "${masterport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${masterport}" | grep udp | awk '{ print $2 }')" else - echo -e "RCON:" + echo -e "Game: Master:" fi if [ -v rawport ]; then @@ -106,10 +139,10 @@ echo -e "==================================================================" echo -e "RAW UDP Socket:" fi - if [ -v masterport ]; then - echo -e "Game: Master: \t${masterport} \t$(ss -tupl | grep -c "${masterport}") \t$(ss -tupl | grep "${masterport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${masterport}" | grep udp | awk '{ print $2 }')" + if [ -v rconport ]; then + echo -e "RCON: \t${rconport} \t$(ss -tupl | grep -c "${rconport}") \t$(ss -tupl | grep "${rconport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${rconport}" | grep udp | awk '{ print $2 }')" else - echo -e "Game: Master:" + echo -e "RCON:" fi if [ -v steamport ]; then @@ -130,34 +163,22 @@ echo -e "==================================================================" echo -e "Steam: Auth:" fi - if [ -v beaconport ]; then - echo -e "Beacon: \t${beaconport} \t$(ss -tupl | grep -c "${beaconport}") \t$(ss -tupl | grep "${beaconport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${beaconport}" | grep udp | awk '{ print $2 }')" - else - echo -e "Beacon:" - fi - - if [ -v appport ]; then - echo -e "App: \t${appport} \t$(ss -tupl | grep -c "${appport}") \t$(ss -tupl | grep "${appport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${appport}" | grep udp | awk '{ print $2 }')" - else - echo -e "App:" - fi - if [ -v telnetport ]; then echo -e "Telnet: \t${telnetport} \t$(ss -tupl | grep -c "${telnetport}") \t$(ss -tupl | grep "${telnetport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${telnetport}" | grep udp | awk '{ print $2 }')" else echo -e "Telnet:" fi - if [ -v sourcetvport ]; then - echo -e "SourceTV: \t${sourcetvport} \t$(ss -tupl | grep -c "${sourcetvport}") \t$(ss -tupl | grep "${sourcetvport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${sourcetvport}" | grep udp | awk '{ print $2 }')" + if [ -v statsport ]; then + echo -e "Stats: \t${battleeyeport} \t$(ss -tupl | grep -c "${statsport}") \t$(ss -tupl | grep "${statsport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${statsport}" | grep udp | awk '{ print $2 }')" else - echo -e "SourceTV:" + echo -e "Stats:" fi - if [ -v fileport ]; then - echo -e "File: \t${fileport} \t$(ss -tupl | grep -c "${fileport}") \t$(ss -tupl | grep "${fileport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${fileport}" | grep udp | awk '{ print $2 }')" + if [ -v sourcetvport ]; then + echo -e "SourceTV: \t${sourcetvport} \t$(ss -tupl | grep -c "${sourcetvport}") \t$(ss -tupl | grep "${sourcetvport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${sourcetvport}" | grep udp | awk '{ print $2 }')" else - echo -e "File:" + echo -e "SourceTV:" fi if [ -v udplinkport ]; then @@ -178,23 +199,13 @@ echo -e "==================================================================" echo -e "Voice (Unused):" fi - if [ -v battleeyeport ]; then - echo -e "BattleEye: \t${battleeyeport} \t$(ss -tupl | grep -c "${battleeyeport}") \t$(ss -tupl | grep "${battleeyeport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${battleeyeport}" | grep udp | awk '{ print $2 }')" - else - echo -e "BattleEye:" - fi - - if [ -v statsport ]; then - echo -e "Stats: \t${battleeyeport} \t$(ss -tupl | grep -c "${statsport}") \t$(ss -tupl | grep "${statsport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${statsport}" | grep udp | awk '{ print $2 }')" - else - echo -e "Stats:" - fi - -} | column -s $'\t' -t +} \ + | column -s $'\t' -t echo -e "" echo -e "${lightgreen}SS Output${default}" echo -e "=================================" fn_info_message_ports +eval "${portcommand}" echo -e "" echo -e "${lightgreen}Query Port - Raw Output${default}" echo -e "==================================================================" diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 2f32abf53..52ddfb008 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -2383,13 +2383,14 @@ if [ -z "${displaymasterserver}" ]; then if [ "$(command -v jq 2> /dev/null)" ]; then if [ -n "${ip}" ] && [ -n "${port}" ]; then if [ "${steammaster}" == "true" ] || [ "${commandname}" == "DEV-QUERY-RAW" ]; then - # Will query server IP addresses first. - for queryip in "${queryips[@]}"; do - masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${queryip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" 'if .response.servers != null then .response.servers[] | select((.gameport == ($port|tonumber) or .gameport == ($queryport|tonumber))) | .addr else empty end' | wc -l 2> /dev/null)" - done - # Should that not work it will try the external IP. + # Query external IP first as most liky to succeed. + masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${extip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" 'if .response.servers != null then .response.servers[] | select((.gameport == ($port|tonumber) or .gameport == ($queryport|tonumber))) | .addr else empty end' | wc -l 2> /dev/null)" + if [ "${masterserver}" == "0" ]; then - masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${extip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" 'if .response.servers != null then .response.servers[] | select((.gameport == ($port|tonumber) or .gameport == ($queryport|tonumber))) | .addr else empty end' | wc -l 2> /dev/null)" + # Loop though server IP addresses if external IP fails. + for queryip in "${queryips[@]}"; do + masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${queryip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" 'if .response.servers != null then .response.servers[] | select((.gameport == ($port|tonumber) or .gameport == ($queryport|tonumber))) | .addr else empty end' | wc -l 2> /dev/null)" + done fi if [ "${masterserver}" == "0" ]; then displaymasterserver="false" diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index d112764c4..cc2463af1 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -688,23 +688,24 @@ fn_info_message_ports_edit() { fn_info_message_ports() { echo -e "${lightblue}Useful port diagnostic command:${default}" if [ "${shortname}" == "armar" ]; then - echo -e "ss -tuplwn | grep enfMain" + portcommand="ss -tuplwn | grep enfMain" elif [ "${shortname}" == "av" ]; then - echo -e "ss -tuplwn | grep AvorionServer" + portcommand="ss -tuplwn | grep AvorionServer" elif [ "${shortname}" == "bf1942" ]; then - echo -e "ss -tuplwn | grep bf1942_lnxded" + portcommand="ss -tuplwn | grep bf1942_lnxded" elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "nec" ] || [ "${shortname}" == "pmc" ] || [ "${shortname}" == "rw" ] || [ "${shortname}" == "vpmc" ] || [ "${shortname}" == "wmc" ]; then - echo -e "ss -tuplwn | grep java" + portcommand="ss -tuplwn | grep java" elif [ "${shortname}" == "terraria" ]; then - echo -e "ss -tuplwn | grep Main" + portcommand="ss -tuplwn | grep Main" elif [ "${engine}" == "source" ]; then - echo -e "ss -tuplwn | grep srcds_linux" + portcommand="ss -tuplwn | grep srcds_linux" elif [ "${engine}" == "goldsrc" ]; then - echo -e "ss -tuplwn | grep hlds_linux" + portcommand="ss -tuplwn | grep hlds_linux" else executableshort="$(basename "${executable}" | cut -c -15)" - echo -e "ss -tuplwn | grep ${executableshort}" + portcommand="ss -tuplwn | grep ${executableshort}" fi + echo -e "${portcommand}" echo -e "" } diff --git a/lgsm/modules/query_gamedig.sh b/lgsm/modules/query_gamedig.sh index bbf24f5d7..138e014a0 100644 --- a/lgsm/modules/query_gamedig.sh +++ b/lgsm/modules/query_gamedig.sh @@ -7,6 +7,7 @@ # https://github.com/sonicsnes/node-gamedig moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +# Default query status to failure. Will be changed to 0 if query is successful. querystatus="2" # Check if gamedig and jq are installed. if [ "$(command -v gamedig 2> /dev/null)" ] && [ "$(command -v jq 2> /dev/null)" ]; then @@ -19,16 +20,10 @@ if [ "$(command -v gamedig 2> /dev/null)" ] && [ "$(command -v jq 2> /dev/null)" queryport="${port}" fi # checks if query is working null = pass. - gamedigcmd=$(echo -e "gamedig --type \"${querytype}\" --host \"${queryip}\" --query_port \"${queryport}\"|jq") - gamedigraw=$(gamedig --type "${querytype}" --host "${queryip}" --query_port "${queryport}") + gamedigcmd=$(echo -e "gamedig --type \"${querytype}\" \"${queryip}:${queryport}\"|jq") + gamedigraw=$(gamedig --type "${querytype}" "${queryip}:${queryport}") querystatus=$(echo "${gamedigraw}" | jq '.error|length') - if [ "${querystatus}" != "null" ]; then - gamedigcmd=$(echo -e "gamedig --type \"${querytype}\" --host \"${queryip}\" --port \"${queryport}\"|jq") - gamedigraw=$(gamedig --type "${querytype}" --host "${queryip}" --port "${queryport}") - querystatus=$(echo "${gamedigraw}" | jq '.error|length') - fi - if [ "${querytype}" == "teamspeak3" ]; then fn_info_game_ts3 fi diff --git a/lgsm/modules/query_gsquery.py b/lgsm/modules/query_gsquery.py index 09bb147d9..9fbb6a254 100644 --- a/lgsm/modules/query_gsquery.py +++ b/lgsm/modules/query_gsquery.py @@ -13,7 +13,7 @@ import sys engine_types=('protocol-valve','protocol-quake3','protocol-quake3','protocol-gamespy1','protocol-unreal2','ut3','minecraft','minecraftbe','jc2mp','mumbleping','soldat','teeworlds') class gsquery: - server_response_timeout = 5 + server_response_timeout = 2 default_buffer_length = 1024 sourcequery=('protocol-valve','avalanche3.0','barotrauma','madness','quakelive','realvirtuality','refractor','source','goldsrc','spark','starbound','unity3d','unreal4','wurm') idtech2query=('protocol-quake3','idtech2','quake','iw2.0') From 5997f8b1b5a07d36d4b9f03924b56c9c21e83eda Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 18 May 2023 17:13:43 +0200 Subject: [PATCH 141/374] fix(hwserver): fix startup and change logging (#4189) * fix(hwserver): fix startup and change logging * Update info_game.sh --------- Co-authored-by: Daniel Gibbs --- lgsm/config-default/config-lgsm/hwserver/_default.cfg | 3 +-- lgsm/modules/info_game.sh | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lgsm/config-default/config-lgsm/hwserver/_default.cfg b/lgsm/config-default/config-lgsm/hwserver/_default.cfg index 6f156f9d9..fddcfebfa 100644 --- a/lgsm/config-default/config-lgsm/hwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hwserver/_default.cfg @@ -16,7 +16,6 @@ queryport="12881" maxplayers="20" defaultmap="" # Optional creativemode="0" # Free Build: creativemode="1" -gamelog="gamelog.txt" ## Add admins using STEAMID64 # Example : addadmin 012345678901234567; addadmin 987654321098765432 @@ -28,7 +27,7 @@ loadsave="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters # Edit with care | http://hurtworld.wikia.com/wiki/Hosting_A_Server -startparameters="-batchmode -nographics -exec \"host ${port} ${defaultmap} ${loadsave};queryport ${queryport};maxplayers ${maxplayers};servername ${servername};creativemode ${creativemode};${admins}\"" +startparameters="-batchmode -nographics -logfile ${gamelog} -exec \"host ${port} ${defaultmap} ${loadsave};queryport ${queryport};maxplayers ${maxplayers};servername ${servername};creativemode ${creativemode};${admins}\"" #### LinuxGSM Settings #### diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 52ddfb008..be0286a5c 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -1201,7 +1201,8 @@ fn_info_game_hw() { port="${port:-"0"}" queryport="${queryport:-"0"}" maxplayers="${maxplayers:-"0"}" - defaultmap="${defaultmap:-"NOT SET"}" + # #4189 option setting can be blank + # defaultmap="${defaultmap:-"NOT SET"}" creativemode="${creativemode:-"NOT SET"}" } @@ -2385,7 +2386,6 @@ if [ -z "${displaymasterserver}" ]; then if [ "${steammaster}" == "true" ] || [ "${commandname}" == "DEV-QUERY-RAW" ]; then # Query external IP first as most liky to succeed. masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${extip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" 'if .response.servers != null then .response.servers[] | select((.gameport == ($port|tonumber) or .gameport == ($queryport|tonumber))) | .addr else empty end' | wc -l 2> /dev/null)" - if [ "${masterserver}" == "0" ]; then # Loop though server IP addresses if external IP fails. for queryip in "${queryips[@]}"; do From c2e31552a4e7df6aa2528ff3ca0c27eca6146ffd Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 18 May 2023 18:59:36 +0100 Subject: [PATCH 142/374] fix: add all modules from v23.2.3 to functions dir This will reduce chances of migration issues functions dir will eventually be removed --- lgsm/functions/README.md | 17 + lgsm/functions/alert.sh | 238 ++ lgsm/functions/alert_discord.sh | 59 + lgsm/functions/alert_email.sh | 25 + lgsm/functions/alert_gotify.sh | 30 + lgsm/functions/alert_ifttt.sh | 29 + lgsm/functions/alert_mailgun.sh | 32 + lgsm/functions/alert_pushbullet.sh | 30 + lgsm/functions/alert_pushover.sh | 33 + lgsm/functions/alert_rocketchat.sh | 50 + lgsm/functions/alert_slack.sh | 75 + lgsm/functions/alert_telegram.sh | 30 + lgsm/functions/check.sh | 101 + lgsm/functions/check_config.sh | 35 + lgsm/functions/check_deps.sh | 363 +++ lgsm/functions/check_executable.sh | 20 + lgsm/functions/check_glibc.sh | 29 + lgsm/functions/check_ip.sh | 63 + lgsm/functions/check_last_update.sh | 26 + lgsm/functions/check_permissions.sh | 233 ++ lgsm/functions/check_status.sh | 10 + lgsm/functions/check_steamcmd.sh | 22 + lgsm/functions/check_system_dir.sh | 22 + lgsm/functions/check_system_requirements.sh | 55 + lgsm/functions/check_tmuxception.sh | 33 + lgsm/functions/check_version.sh | 23 + lgsm/functions/command_backup.sh | 268 ++ lgsm/functions/command_check_update.sh | 39 + lgsm/functions/command_console.sh | 58 + lgsm/functions/command_debug.sh | 142 + lgsm/functions/command_details.sh | 41 + lgsm/functions/command_dev_clear_functions.sh | 24 + lgsm/functions/command_dev_debug.sh | 23 + lgsm/functions/command_dev_detect_deps.sh | 231 ++ lgsm/functions/command_dev_detect_glibc.sh | 92 + lgsm/functions/command_dev_detect_ldd.sh | 61 + lgsm/functions/command_dev_query_raw.sh | 280 ++ lgsm/functions/command_donate.sh | 26 + lgsm/functions/command_fastdl.sh | 442 +++ lgsm/functions/command_install.sh | 52 + .../command_install_resources_mta.sh | 32 + lgsm/functions/command_mods_install.sh | 135 + lgsm/functions/command_mods_remove.sh | 153 + lgsm/functions/command_mods_update.sh | 109 + lgsm/functions/command_monitor.sh | 245 ++ lgsm/functions/command_postdetails.sh | 78 + lgsm/functions/command_restart.sh | 18 + lgsm/functions/command_send.sh | 41 + lgsm/functions/command_skeleton.sh | 23 + lgsm/functions/command_start.sh | 224 ++ lgsm/functions/command_stop.sh | 283 ++ lgsm/functions/command_test_alert.sh | 19 + lgsm/functions/command_ts3_server_pass.sh | 57 + lgsm/functions/command_update.sh | 40 + lgsm/functions/command_validate.sh | 49 + lgsm/functions/command_wipe.sh | 183 ++ lgsm/functions/compress_unreal2_maps.sh | 35 + lgsm/functions/compress_ut99_maps.sh | 35 + lgsm/functions/fix.sh | 88 + lgsm/functions/fix_ark.sh | 62 + lgsm/functions/fix_arma3.sh | 16 + lgsm/functions/fix_armar.sh | 17 + lgsm/functions/fix_av.sh | 19 + lgsm/functions/fix_bo.sh | 10 + lgsm/functions/fix_bt.sh | 24 + lgsm/functions/fix_cmw.sh | 23 + lgsm/functions/fix_csgo.sh | 42 + lgsm/functions/fix_dst.sh | 17 + lgsm/functions/fix_hw.sh | 10 + lgsm/functions/fix_ins.sh | 20 + lgsm/functions/fix_kf.sh | 36 + lgsm/functions/fix_kf2.sh | 20 + lgsm/functions/fix_lo.sh | 17 + lgsm/functions/fix_mcb.sh | 11 + lgsm/functions/fix_mta.sh | 16 + lgsm/functions/fix_nmrih.sh | 17 + lgsm/functions/fix_onset.sh | 19 + lgsm/functions/fix_ro.sh | 39 + lgsm/functions/fix_rust.sh | 32 + lgsm/functions/fix_rw.sh | 10 + lgsm/functions/fix_samp.sh | 34 + lgsm/functions/fix_sdtd.sh | 10 + lgsm/functions/fix_sfc.sh | 48 + lgsm/functions/fix_sof2.sh | 11 + lgsm/functions/fix_squad.sh | 26 + lgsm/functions/fix_st.sh | 11 + lgsm/functions/fix_steamcmd.sh | 141 + lgsm/functions/fix_terraria.sh | 10 + lgsm/functions/fix_tf2.sh | 16 + lgsm/functions/fix_ts3.sh | 33 + lgsm/functions/fix_unt.sh | 10 + lgsm/functions/fix_ut.sh | 13 + lgsm/functions/fix_ut2k4.sh | 36 + lgsm/functions/fix_ut3.sh | 20 + lgsm/functions/fix_vh.sh | 35 + lgsm/functions/fix_wurm.sh | 23 + lgsm/functions/fix_zmr.sh | 48 + lgsm/functions/info_distro.sh | 281 ++ lgsm/functions/info_game.sh | 2600 +++++++++++++++++ lgsm/functions/info_messages.sh | 1847 ++++++++++++ lgsm/functions/info_stats.sh | 173 ++ lgsm/functions/install_complete.sh | 18 + lgsm/functions/install_config.sh | 937 ++++++ lgsm/functions/install_dst_token.sh | 45 + lgsm/functions/install_eula.sh | 47 + lgsm/functions/install_factorio_save.sh | 15 + lgsm/functions/install_gslt.sh | 47 + lgsm/functions/install_header.sh | 22 + lgsm/functions/install_logs.sh | 100 + lgsm/functions/install_mta_resources.sh | 12 + lgsm/functions/install_retry.sh | 16 + lgsm/functions/install_server_dir.sh | 26 + lgsm/functions/install_server_files.sh | 255 ++ lgsm/functions/install_squad_license.sh | 25 + lgsm/functions/install_stats.sh | 28 + lgsm/functions/install_steamcmd.sh | 14 + lgsm/functions/install_ts3db.sh | 76 + lgsm/functions/install_ut2k4_key.sh | 30 + lgsm/functions/mods_core.sh | 755 +++++ lgsm/functions/mods_list.sh | 209 ++ lgsm/functions/query_gamedig.sh | 93 + lgsm/functions/query_gsquery.py | 151 + lgsm/functions/update_factorio.sh | 168 ++ lgsm/functions/update_jediknight2.sh | 163 ++ lgsm/functions/update_minecraft.sh | 176 ++ lgsm/functions/update_minecraft_bedrock.sh | 181 ++ lgsm/functions/update_mta.sh | 166 ++ lgsm/functions/update_papermc.sh | 194 ++ lgsm/functions/update_steamcmd.sh | 39 + lgsm/functions/update_ts3.sh | 181 ++ lgsm/functions/update_ut99.sh | 163 ++ lgsm/functions/update_vintagestory.sh | 170 ++ 132 files changed, 15734 insertions(+) create mode 100644 lgsm/functions/README.md create mode 100644 lgsm/functions/alert.sh create mode 100644 lgsm/functions/alert_discord.sh create mode 100644 lgsm/functions/alert_email.sh create mode 100644 lgsm/functions/alert_gotify.sh create mode 100644 lgsm/functions/alert_ifttt.sh create mode 100644 lgsm/functions/alert_mailgun.sh create mode 100644 lgsm/functions/alert_pushbullet.sh create mode 100644 lgsm/functions/alert_pushover.sh create mode 100644 lgsm/functions/alert_rocketchat.sh create mode 100644 lgsm/functions/alert_slack.sh create mode 100644 lgsm/functions/alert_telegram.sh create mode 100644 lgsm/functions/check.sh create mode 100644 lgsm/functions/check_config.sh create mode 100644 lgsm/functions/check_deps.sh create mode 100644 lgsm/functions/check_executable.sh create mode 100644 lgsm/functions/check_glibc.sh create mode 100644 lgsm/functions/check_ip.sh create mode 100644 lgsm/functions/check_last_update.sh create mode 100644 lgsm/functions/check_permissions.sh create mode 100644 lgsm/functions/check_status.sh create mode 100644 lgsm/functions/check_steamcmd.sh create mode 100644 lgsm/functions/check_system_dir.sh create mode 100644 lgsm/functions/check_system_requirements.sh create mode 100644 lgsm/functions/check_tmuxception.sh create mode 100644 lgsm/functions/check_version.sh create mode 100644 lgsm/functions/command_backup.sh create mode 100644 lgsm/functions/command_check_update.sh create mode 100644 lgsm/functions/command_console.sh create mode 100644 lgsm/functions/command_debug.sh create mode 100644 lgsm/functions/command_details.sh create mode 100644 lgsm/functions/command_dev_clear_functions.sh create mode 100644 lgsm/functions/command_dev_debug.sh create mode 100644 lgsm/functions/command_dev_detect_deps.sh create mode 100644 lgsm/functions/command_dev_detect_glibc.sh create mode 100644 lgsm/functions/command_dev_detect_ldd.sh create mode 100644 lgsm/functions/command_dev_query_raw.sh create mode 100644 lgsm/functions/command_donate.sh create mode 100644 lgsm/functions/command_fastdl.sh create mode 100644 lgsm/functions/command_install.sh create mode 100644 lgsm/functions/command_install_resources_mta.sh create mode 100644 lgsm/functions/command_mods_install.sh create mode 100644 lgsm/functions/command_mods_remove.sh create mode 100644 lgsm/functions/command_mods_update.sh create mode 100644 lgsm/functions/command_monitor.sh create mode 100644 lgsm/functions/command_postdetails.sh create mode 100644 lgsm/functions/command_restart.sh create mode 100644 lgsm/functions/command_send.sh create mode 100644 lgsm/functions/command_skeleton.sh create mode 100644 lgsm/functions/command_start.sh create mode 100644 lgsm/functions/command_stop.sh create mode 100644 lgsm/functions/command_test_alert.sh create mode 100644 lgsm/functions/command_ts3_server_pass.sh create mode 100644 lgsm/functions/command_update.sh create mode 100644 lgsm/functions/command_validate.sh create mode 100644 lgsm/functions/command_wipe.sh create mode 100644 lgsm/functions/compress_unreal2_maps.sh create mode 100644 lgsm/functions/compress_ut99_maps.sh create mode 100644 lgsm/functions/fix.sh create mode 100644 lgsm/functions/fix_ark.sh create mode 100644 lgsm/functions/fix_arma3.sh create mode 100644 lgsm/functions/fix_armar.sh create mode 100644 lgsm/functions/fix_av.sh create mode 100644 lgsm/functions/fix_bo.sh create mode 100644 lgsm/functions/fix_bt.sh create mode 100644 lgsm/functions/fix_cmw.sh create mode 100644 lgsm/functions/fix_csgo.sh create mode 100644 lgsm/functions/fix_dst.sh create mode 100644 lgsm/functions/fix_hw.sh create mode 100644 lgsm/functions/fix_ins.sh create mode 100644 lgsm/functions/fix_kf.sh create mode 100644 lgsm/functions/fix_kf2.sh create mode 100644 lgsm/functions/fix_lo.sh create mode 100644 lgsm/functions/fix_mcb.sh create mode 100644 lgsm/functions/fix_mta.sh create mode 100644 lgsm/functions/fix_nmrih.sh create mode 100644 lgsm/functions/fix_onset.sh create mode 100644 lgsm/functions/fix_ro.sh create mode 100644 lgsm/functions/fix_rust.sh create mode 100644 lgsm/functions/fix_rw.sh create mode 100644 lgsm/functions/fix_samp.sh create mode 100644 lgsm/functions/fix_sdtd.sh create mode 100644 lgsm/functions/fix_sfc.sh create mode 100644 lgsm/functions/fix_sof2.sh create mode 100644 lgsm/functions/fix_squad.sh create mode 100644 lgsm/functions/fix_st.sh create mode 100644 lgsm/functions/fix_steamcmd.sh create mode 100644 lgsm/functions/fix_terraria.sh create mode 100644 lgsm/functions/fix_tf2.sh create mode 100644 lgsm/functions/fix_ts3.sh create mode 100644 lgsm/functions/fix_unt.sh create mode 100644 lgsm/functions/fix_ut.sh create mode 100644 lgsm/functions/fix_ut2k4.sh create mode 100644 lgsm/functions/fix_ut3.sh create mode 100644 lgsm/functions/fix_vh.sh create mode 100644 lgsm/functions/fix_wurm.sh create mode 100644 lgsm/functions/fix_zmr.sh create mode 100644 lgsm/functions/info_distro.sh create mode 100644 lgsm/functions/info_game.sh create mode 100644 lgsm/functions/info_messages.sh create mode 100644 lgsm/functions/info_stats.sh create mode 100644 lgsm/functions/install_complete.sh create mode 100644 lgsm/functions/install_config.sh create mode 100644 lgsm/functions/install_dst_token.sh create mode 100644 lgsm/functions/install_eula.sh create mode 100644 lgsm/functions/install_factorio_save.sh create mode 100644 lgsm/functions/install_gslt.sh create mode 100644 lgsm/functions/install_header.sh create mode 100644 lgsm/functions/install_logs.sh create mode 100644 lgsm/functions/install_mta_resources.sh create mode 100644 lgsm/functions/install_retry.sh create mode 100644 lgsm/functions/install_server_dir.sh create mode 100644 lgsm/functions/install_server_files.sh create mode 100644 lgsm/functions/install_squad_license.sh create mode 100644 lgsm/functions/install_stats.sh create mode 100644 lgsm/functions/install_steamcmd.sh create mode 100644 lgsm/functions/install_ts3db.sh create mode 100644 lgsm/functions/install_ut2k4_key.sh create mode 100644 lgsm/functions/mods_core.sh create mode 100644 lgsm/functions/mods_list.sh create mode 100644 lgsm/functions/query_gamedig.sh create mode 100644 lgsm/functions/query_gsquery.py create mode 100644 lgsm/functions/update_factorio.sh create mode 100644 lgsm/functions/update_jediknight2.sh create mode 100644 lgsm/functions/update_minecraft.sh create mode 100644 lgsm/functions/update_minecraft_bedrock.sh create mode 100644 lgsm/functions/update_mta.sh create mode 100644 lgsm/functions/update_papermc.sh create mode 100644 lgsm/functions/update_steamcmd.sh create mode 100644 lgsm/functions/update_ts3.sh create mode 100644 lgsm/functions/update_ut99.sh create mode 100644 lgsm/functions/update_vintagestory.sh diff --git a/lgsm/functions/README.md b/lgsm/functions/README.md new file mode 100644 index 000000000..de008ecfa --- /dev/null +++ b/lgsm/functions/README.md @@ -0,0 +1,17 @@ +# LinuxGSM - Modules + +These modules are scripts that are called upon by the primary script linuxgsm.sh + +## Module Names + +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. diff --git a/lgsm/functions/alert.sh b/lgsm/functions/alert.sh new file mode 100644 index 000000000..59deae2b6 --- /dev/null +++ b/lgsm/functions/alert.sh @@ -0,0 +1,238 @@ +#!/bin/bash +# LinuxGSM alert.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Overall function for managing alerts. + +functionselfname="$(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_message_head + fn_info_message_distro + fn_info_message_server_resource + fn_info_message_gameserver_resource + fn_info_message_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 +} + +fn_alert_test() { + fn_script_log_info "Sending test alert" + alertsubject="Alert - ${selfname} - Test" + alertemoji="🚧" + alertsound="1" + alerturl="not enabled" + alertbody="Testing LinuxGSM Alert. No action to be taken." +} + +fn_alert_restart() { + fn_script_log_info "Sending alert: Restarted: ${executable} not running" + alertsubject="Alert - ${selfname} - Restarted" + alertemoji="🚨" + alertsound="2" + alerturl="not enabled" + alertbody="${selfname} ${executable} not running" +} + +fn_alert_restart_query() { + fn_script_log_info "Sending alert: Restarted: ${selfname}" + alertsubject="Alert - ${selfname} - Restarted" + alertemoji="🚨" + alertsound="2" + alerturl="not enabled" + alertbody="Unable to query: ${selfname}" +} + +fn_alert_update() { + fn_script_log_info "Sending alert: Updated" + alertsubject="Alert - ${selfname} - Updated" + alertemoji="🎮" + alertsound="1" + alerturl="not enabled" + alertbody="${gamename} received update: ${remotebuildversion}" +} + +fn_alert_check_update() { + fn_script_log_info "Sending alert: Update available" + alertsubject="Alert - ${selfname} - Update available" + alertemoji="🎮" + alertsound="1" + alerturl="not enabled" + alertbody="${gamename} update available: ${remotebuildversion}" +} + +fn_alert_permissions() { + fn_script_log_info "Sending alert: Permissions error" + alertsubject="Alert - ${selfname}: Permissions error" + alertemoji="❗" + alertsound="2" + alerturl="not enabled" + alertbody="${selfname} has permissions issues" +} + +fn_alert_config() { + fn_script_log_info "Sending alert: New _default.cfg" + alertsubject="Alert - ${selfname} - New _default.cfg" + alertemoji="🎮" + alertsound="1" + alerturl="not enabled" + alertbody="${selfname} has received a new _default.cfg. Check file for changes." +} + +if [ "${alert}" == "permissions" ]; then + fn_alert_permissions +elif [ "${alert}" == "restart" ]; then + fn_alert_restart +elif [ "${alert}" == "restartquery" ]; then + fn_alert_restart_query +elif [ "${alert}" == "test" ]; then + fn_alert_test +elif [ "${alert}" == "update" ]; then + fn_alert_update +elif [ "${alert}" == "check-update" ]; then + fn_alert_check_update +elif [ "${alert}" == "config" ]; then + fn_alert_config +fi + +# Generate alert log. +fn_alert_log + +# Generates the more info link. +if [ "${postalert}" == "on" ] && [ -n "${postalert}" ]; then + exitbypass=1 + command_postdetails.sh + fn_firstcommand_reset + unset exitbypass +elif [ "${postalert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then + fn_print_warn_nl "More Info not enabled" + fn_script_log_warn "More Info alerts not enabled" +fi + +if [ "${discordalert}" == "on" ] && [ -n "${discordalert}" ]; then + alert_discord.sh +elif [ "${discordalert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then + fn_print_warn_nl "Discord alerts not enabled" + fn_script_log_warn "Discord alerts not enabled" +elif [ -z "${discordtoken}" ] && [ "${commandname}" == "TEST-ALERT" ]; then + fn_print_error_nl "Discord token not set" + echo -e "* https://docs.linuxgsm.com/alerts/discord" + fn_script_error "Discord token not set" +fi + +if [ "${emailalert}" == "on" ] && [ -n "${email}" ]; then + alert_email.sh +elif [ "${emailalert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then + fn_print_warn_nl "Email alerts not enabled" + fn_script_log_warn "Email alerts not enabled" +elif [ -z "${email}" ] && [ "${commandname}" == "TEST-ALERT" ]; then + fn_print_error_nl "Email not set" + fn_script_log_error "Email not set" +fi + +if [ "${gotifyalert}" == "on" ] && [ -n "${gotifyalert}" ]; then + alert_gotify.sh +elif [ "${gotifyalert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then + fn_print_warn_nl "Gotify alerts not enabled" + fn_script_log_warn "Gotify alerts not enabled" +elif [ -z "${gotifytoken}" ] && [ "${commandname}" == "TEST-ALERT" ]; then + fn_print_error_nl "Gotify token not set" + echo -e "* https://docs.linuxgsm.com/alerts/gotify" + fn_script_error "Gotify token not set" +elif [ -z "${gotifywebhook}" ] && [ "${commandname}" == "TEST-ALERT" ]; then + fn_print_error_nl "Gotify webhook not set" + echo -e "* https://docs.linuxgsm.com/alerts/gotify" + fn_script_error "Gotify webhook not set" +fi + +if [ "${iftttalert}" == "on" ] && [ -n "${iftttalert}" ]; then + alert_ifttt.sh +elif [ "${iftttalert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then + fn_print_warn_nl "IFTTT alerts not enabled" + fn_script_log_warn "IFTTT alerts not enabled" +elif [ -z "${ifttttoken}" ] && [ "${commandname}" == "TEST-ALERT" ]; then + fn_print_error_nl "IFTTT token not set" + echo -e "* https://docs.linuxgsm.com/alerts/ifttt" + fn_script_error "IFTTT token not set" +fi + +if [ "${mailgunalert}" == "on" ] && [ -n "${mailgunalert}" ]; then + alert_mailgun.sh +elif [ "${mailgunalert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then + fn_print_warn_nl "Mailgun alerts not enabled" + fn_script_log_warn "Mailgun alerts not enabled" +elif [ -z "${mailguntoken}" ] && [ "${commandname}" == "TEST-ALERT" ]; then + fn_print_error_nl "Mailgun token not set" + echo -e "* https://docs.linuxgsm.com/alerts/mailgun" + fn_script_error "Mailgun token not set" +fi + +if [ "${pushbulletalert}" == "on" ] && [ -n "${pushbullettoken}" ]; then + alert_pushbullet.sh +elif [ "${pushbulletalert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then + fn_print_warn_nl "Pushbullet alerts not enabled" + fn_script_log_warn "Pushbullet alerts not enabled" +elif [ -z "${pushbullettoken}" ] && [ "${commandname}" == "TEST-ALERT" ]; then + fn_print_error_nl "Pushbullet token not set" + echo -e "* https://docs.linuxgsm.com/alerts/pushbullet" + fn_script_error "Pushbullet token not set" +fi + +if [ "${pushoveralert}" == "on" ] && [ -n "${pushoveralert}" ]; then + alert_pushover.sh +elif [ "${pushoveralert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then + fn_print_warn_nl "Pushover alerts not enabled" + fn_script_log_warn "Pushover alerts not enabled" +elif [ -z "${pushovertoken}" ] && [ "${commandname}" == "TEST-ALERT" ]; then + fn_print_error_nl "Pushover token not set" + echo -e "* https://docs.linuxgsm.com/alerts/pushover" + fn_script_error "Pushover token not set" +fi + +if [ "${telegramalert}" == "on" ] && [ -n "${telegramtoken}" ]; then + alert_telegram.sh +elif [ "${telegramalert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then + fn_print_warn_nl "Telegram Messages not enabled" + fn_script_log_warn "Telegram Messages not enabled" +elif [ -z "${telegramtoken}" ] && [ "${commandname}" == "TEST-ALERT" ]; then + fn_print_error_nl "Telegram token not set." + echo -e "* https://docs.linuxgsm.com/alerts/telegram" + fn_script_error "Telegram token not set." +elif [ -z "${telegramchatid}" ] && [ "${commandname}" == "TEST-ALERT" ]; then + fn_print_error_nl "Telegram chat id not set." + echo -e "* https://docs.linuxgsm.com/alerts/telegram" + fn_script_error "Telegram chat id not set." +fi + +if [ "${rocketchatalert}" == "on" ] && [ -n "${rocketchatalert}" ]; then + alert_rocketchat.sh +elif [ "${rocketchatalert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then + fn_print_warn_nl "Rocketchat alerts not enabled" + fn_script_log_warn "Rocketchat alerts not enabled" +elif [ -z "${rocketchattoken}" ] && [ "${commandname}" == "TEST-ALERT" ]; then + fn_print_error_nl "Rocketchat token not set" + #echo -e "* https://docs.linuxgsm.com/alerts/slack" + fn_script_error "Rocketchat token not set" +fi + +if [ "${slackalert}" == "on" ] && [ -n "${slackalert}" ]; then + alert_slack.sh +elif [ "${slackalert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then + fn_print_warn_nl "Slack alerts not enabled" + fn_script_log_warn "Slack alerts not enabled" +elif [ -z "${slacktoken}" ] && [ "${commandname}" == "TEST-ALERT" ]; then + fn_print_error_nl "Slack token not set" + echo -e "* https://docs.linuxgsm.com/alerts/slack" + fn_script_error "Slack token not set" +fi diff --git a/lgsm/functions/alert_discord.sh b/lgsm/functions/alert_discord.sh new file mode 100644 index 000000000..770817516 --- /dev/null +++ b/lgsm/functions/alert_discord.sh @@ -0,0 +1,59 @@ +#!/bin/bash +# LinuxGSM alert_discord.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Sends Discord alert. + +functionselfname="$(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": [{ + "color": "2067276", + "author": { + "name": "${alertemoji} ${alertsubject} ${alertemoji}", + "icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg" + }, + "title": "${servername}", + "description": "${alertbody} \n More info: ${alerturl}", + "url": "", + "type": "content", + "thumbnail": {}, + "fields": [ + { + "name": "Game", + "value": "${gamename}", + "inline": true + }, + { + "name": "Server IP", + "value": "[${alertip}:${port}](https://www.gametracker.com/server_info/${alertip}:${port})", + "inline": true + }, + { + "name": "Hostname", + "value": "${HOSTNAME}", + "inline": true + } + ] + }] +} +EOF +) + +fn_print_dots "Sending Discord alert" + +discordsend=$(curl --connect-timeout 10 -sSL -H "Content-Type: application/json" -X POST -d "$(echo -n "${json}" | jq -c .)" "${discordwebhook}") + +if [ -n "${discordsend}" ]; then + fn_print_fail_nl "Sending Discord alert: ${discordsend}" + fn_script_log_fatal "Sending Discord alert: ${discordsend}" +else + fn_print_ok_nl "Sending Discord alert" + fn_script_log_pass "Sending Discord alert" +fi diff --git a/lgsm/functions/alert_email.sh b/lgsm/functions/alert_email.sh new file mode 100644 index 000000000..ad90e880f --- /dev/null +++ b/lgsm/functions/alert_email.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# LinuxGSM alert_email.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Sends email alert. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +fn_print_dots "Sending Email alert: ${email}" +fn_sleep_time + +if [ -n "${emailfrom}" ]; then + mail -s "${alertsubject}" -r "${emailfrom}" "${email}" < "${alertlog}" +else + mail -s "${alertsubject}" "${email}" < "${alertlog}" +fi +exitcode=$? +if [ "${exitcode}" == "0" ]; then + fn_print_ok_nl "Sending Email alert: ${email}" + fn_script_log_pass "Sending Email alert: ${email}" +else + fn_print_fail_nl "Sending Email alert: ${email}" + fn_script_log_fatal "Sending Email alert: ${email}" +fi diff --git a/lgsm/functions/alert_gotify.sh b/lgsm/functions/alert_gotify.sh new file mode 100644 index 000000000..faeba4593 --- /dev/null +++ b/lgsm/functions/alert_gotify.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# LinuxGSM alert_gotify.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Sends Gotify alert. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +json=$( + cat << EOF +{ + "title": "${alertemoji} ${alertsubject} ${alertemoji}", + "message": "Server name\n${servername}\n\nMessage\n${alertbody}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\nMore info\n${alerturl}", + "priority": 5 +} +EOF +) + +fn_print_dots "Sending Gotify alert" + +gotifysend=$(curl --connect-timeout 10 -sSL "${gotifywebhook}/message"?token="${gotifytoken}" -H "Content-Type: application/json" -X POST -d "$(echo -n "${json}" | jq -c .)") + +if [ -n "${gotifysend}" ]; then + fn_print_ok_nl "Sending Gotify alert" + fn_script_log_pass "Sending Gotify alert" +else + fn_print_fail_nl "Sending Gotify alert: ${gotifysend}" + fn_script_log_fatal "Sending Gotify alert: ${gotifysend}" +fi diff --git a/lgsm/functions/alert_ifttt.sh b/lgsm/functions/alert_ifttt.sh new file mode 100644 index 000000000..f8bbc24ad --- /dev/null +++ b/lgsm/functions/alert_ifttt.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# LinuxGSM alert_ifttt.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Sends IFTTT alert. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +json=$( + cat << EOF +{ + "value1": "${selfname}", + "value2": "${alertemoji} ${alertsubject} ${alertemoji}", + "value3": "Message: \n${alertbody}\n\nGame: \n${gamename}\n\nServer name: \n${servername}\n\nHostname: \n${HOSTNAME}\n\nServer IP: \n${alertip}:${port}\n\nMore info: \n${alerturl}" +} +EOF +) + +fn_print_dots "Sending IFTTT alert" +iftttsend=$(curl --connect-timeout 10 -sSL -H "Content-Type: application/json" -X POST -d "$(echo -n "${json}" | jq -c .)" "https://maker.ifttt.com/trigger/${iftttevent}/with/key/${ifttttoken}" | grep "Bad Request") + +if [ -n "${iftttsend}" ]; then + fn_print_fail_nl "Sending IFTTT alert: ${pushbulletsend}" + fn_script_log_fatal "Sending IFTTT alert: ${pushbulletsend}" +else + fn_print_ok_nl "Sending IFTTT alert" + fn_script_log_pass "Sent IFTTT alert" +fi diff --git a/lgsm/functions/alert_mailgun.sh b/lgsm/functions/alert_mailgun.sh new file mode 100644 index 000000000..25576209c --- /dev/null +++ b/lgsm/functions/alert_mailgun.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# LinuxGSM alert_mailgun.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Sends Mailgun Email alert. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +if [ "${mailgunapiregion}" == "eu" ]; then + mailgunapiurl="https://api.eu.mailgun.net" +else + mailgunapiurl="https://api.mailgun.net" +fi + +fn_print_dots "Sending Email alert: Mailgun: ${mailgunemail}" + +mailgunsend=$(curl --connect-timeout 10 -s --user "api:${mailguntoken}" \ + -F from="LinuxGSM <${mailgunemailfrom}>" \ + -F to="LinuxGSM Admin <${mailgunemail}>" \ + -F subject="${alertemoji} ${alertsubject} ${alertemoji}" \ + -F o:tag='alert' \ + -F o:tag='LinuxGSM' \ + -F text="$(cat "${alertlog}")" "${mailgunapiurl}/v3/${mailgundomain}/messages") + +if [ -z "${mailgunsend}" ]; then + fn_print_fail_nl "Sending Email alert: Mailgun: ${mailgunemail}" + fn_script_log_fatal "Sending Email alert: Mailgun: ${mailgunemail}" +else + fn_print_ok_nl "Sending Email alert: Mailgun: ${mailgunemail}" + fn_script_log_pass "Sending Email alert: Mailgun: ${mailgunemail}" +fi diff --git a/lgsm/functions/alert_pushbullet.sh b/lgsm/functions/alert_pushbullet.sh new file mode 100644 index 000000000..3e82d0db0 --- /dev/null +++ b/lgsm/functions/alert_pushbullet.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# LinuxGSM alert_pushbullet.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Sends Pushbullet Messenger alert. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +json=$( + cat << EOF +{ + "channel_tag": "${channeltag}", + "type": "note", + "title": "${alertemoji} ${alertsubject} ${alertemoji}", + "body": "Server name\n${servername}\n\nMessage\n${alertbody}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\nMore info\n${alerturl}" +} +EOF +) + +fn_print_dots "Sending Pushbullet alert" +pushbulletsend=$(curl --connect-timeout 10 -sSL -u """${pushbullettoken}"":" -H "Content-Type: application/json" -X POST -d "$(echo -n "${json}" | jq -c .)" "https://api.pushbullet.com/v2/pushes" | grep "error_code") + +if [ -n "${pushbulletsend}" ]; then + fn_print_fail_nl "Sending Pushbullet alert: ${pushbulletsend}" + fn_script_log_fatal "Sending Pushbullet alert: ${pushbulletsend}" +else + fn_print_ok_nl "Sending Pushbullet alert" + fn_script_log_pass "Sent Pushbullet alert" +fi diff --git a/lgsm/functions/alert_pushover.sh b/lgsm/functions/alert_pushover.sh new file mode 100644 index 000000000..d7c086478 --- /dev/null +++ b/lgsm/functions/alert_pushover.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# LinuxGSM alert_pushover.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Sends Pushover alert. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +fn_print_dots "Sending Pushover alert" + +# Different alerts are given different priorities and notification sounds. +if [ "${alertsound}" == "1" ]; then + alertsound="" + alertpriority="0" +elif [ "${alertsound}" == "2" ]; then + # restarted. + alertsound="siren" + alertpriority="1" +else + alertsound="" + alertpriority="0" +fi + +pushoversend=$(curl --connect-timeout 10 -sS -F token="${pushovertoken}" -F user="${pushoveruserkey}" -F html="1" -F sound="${alertsound}" -F priority="${alertpriority}" -F title="${alertemoji} ${alertsubject} ${alertemoji}" -F message=" Server name
${servername}

Message
${alertbody}

Game
${gamename}

Server IP
${alertip}:${port}

Hostname
${HOSTNAME}

More info
${alerturl}" "https://api.pushover.net/1/messages.json" | grep errors) + +if [ -n "${pushoversend}" ]; then + fn_print_fail_nl "Sending Pushover alert: ${pushoversend}" + fn_script_log_fatal "Sending Pushover alert: ${pushoversend}" +else + fn_print_ok_nl "Sending Pushover alert" + fn_script_log_pass "Sent Pushover alert" +fi diff --git a/lgsm/functions/alert_rocketchat.sh b/lgsm/functions/alert_rocketchat.sh new file mode 100644 index 000000000..34d018e38 --- /dev/null +++ b/lgsm/functions/alert_rocketchat.sh @@ -0,0 +1,50 @@ +#!/bin/bash +# LinuxGSM alert_rocketchat.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Sends Rocketchat alert. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +json=$( + cat << EOF +{ + "alias": "LinuxGSM", + "text": "*${alertemoji} ${alertsubject} ${alertemoji}* \n *${servername}* \n ${alertbody} \n More info: ${alerturl}", + "attachments": [ + { + "fields": [ + { + "short": true, + "title": "Game:", + "value": "${gamename}" + }, + { + "short": true, + "title": "Server IP:", + "value": "${alertip}:${port}" + }, + { + "short": true, + "title": "Hostname:", + "value": "${HOSTNAME}" + } + ] + } + ] +} +EOF +) + +fn_print_dots "Sending Rocketchat alert" + +rocketchatsend=$(curl --connect-timeout 10 -sSL -H "Content-Type: application/json" -X POST -d "$(echo -n "${json}" | jq -c .)" "${rocketchatwebhook}") + +if [ -n "${rocketchatsend}" ]; then + fn_print_ok_nl "Sending Rocketchat alert" + fn_script_log_pass "Sending Rocketchat alert" +else + fn_print_fail_nl "Sending Rocketchat alert: ${rocketchatsend}" + fn_script_log_fatal "Sending Rocketchat alert: ${rocketchatsend}" +fi diff --git a/lgsm/functions/alert_slack.sh b/lgsm/functions/alert_slack.sh new file mode 100644 index 000000000..2e87c1571 --- /dev/null +++ b/lgsm/functions/alert_slack.sh @@ -0,0 +1,75 @@ +#!/bin/bash +# LinuxGSM alert_slack.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Sends Slack alert. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +json=$( + cat << EOF +{ + "attachments": [ + { + "color": "#36a64f", + "blocks": [ + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "*LinuxGSM Alert*" + } + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "*${alertemoji} ${alertsubject}* \n ${alertbody}" + } + }, + { + "type": "divider" + }, + { + "type": "section", + "fields": [ + { + "type": "mrkdwn", + "text": "*Game:* \n ${gamename}" + }, + { + "type": "mrkdwn", + "text": "*Server IP:* \n ${alertip}:${port}" + }, + { + "type": "mrkdwn", + "text": "*Server Name:* \n ${servername}" + } + ] + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "Hostname: ${HOSTNAME} / More info: ${alerturl}" + } + } + ] + } + ] +} +EOF +) + +fn_print_dots "Sending Slack alert" + +slacksend=$(curl --connect-timeout 10 -sSL -H "Content-Type: application/json" -X POST -d "$(echo -n "${json}" | jq -c .)" "${slackwebhook}") + +if [ "${slacksend}" == "ok" ]; then + fn_print_ok_nl "Sending Slack alert" + fn_script_log_pass "Sending Slack alert" +else + fn_print_fail_nl "Sending Slack alert: ${slacksend}" + fn_script_log_fatal "Sending Slack alert: ${slacksend}" +fi diff --git a/lgsm/functions/alert_telegram.sh b/lgsm/functions/alert_telegram.sh new file mode 100644 index 000000000..27e34beb4 --- /dev/null +++ b/lgsm/functions/alert_telegram.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# LinuxGSM alert_telegram.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Sends Telegram Messenger alert. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +json=$( + cat << EOF +{ + "chat_id": "${telegramchatid}", + "parse_mode": "HTML", + "text": "${alertemoji} ${alertsubject} ${alertemoji}\n\nServer name\n${servername}\n\nMessage\n${alertbody}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\nMore info\n${alerturl}", + "disable_web_page_preview": "yes" +} +EOF +) + +fn_print_dots "Sending Telegram alert" +telegramsend=$(curl --connect-timeout 10 -sSL -H "Content-Type: application/json" -X POST -d "$(echo -n "${json}" | jq -c .)" ${curlcustomstring} "https://${telegramapi}/bot${telegramtoken}/sendMessage" | grep "error_code") + +if [ -n "${telegramsend}" ]; then + fn_print_fail_nl "Sending Telegram alert: ${telegramsend}" + fn_script_log_fatal "Sending Telegram alert: ${telegramsend}" +else + fn_print_ok_nl "Sending Telegram alert" + fn_script_log_pass "Sent Telegram alert" +fi diff --git a/lgsm/functions/check.sh b/lgsm/functions/check.sh new file mode 100644 index 000000000..0f1e12368 --- /dev/null +++ b/lgsm/functions/check.sh @@ -0,0 +1,101 @@ +#!/bin/bash +# LinuxGSM check.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Overall function for managing checks. +# Runs checks that will either halt on or fix an issue. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +# Every command that requires checks just references check.sh. +# check.sh selects which checks to run by using arrays. + +if [ "${commandname}" != "INSTALL" ]; then + check_root.sh +fi + +if [ "${commandname}" != "UPDATE-LGSM" ]; then + check_version.sh +fi + +check_tmuxception.sh + +if [ "$(whoami)" != "root" ] || [ -f /.dockerenv ]; then + if [ "${commandname}" != "MONITOR" ]; then + check_permissions.sh + fi +fi + +if [ "${commandname}" != "INSTALL" ] && [ "${commandname}" != "UPDATE-LGSM" ] && [ "${commandname}" != "DETAILS" ] && [ "${commandname}" != "POST-DETAILS" ]; then + check_system_dir.sh +fi + +allowed_commands_array=(START DEBUG) +for allowed_command in "${allowed_commands_array[@]}"; do + if [ "${allowed_command}" == "${commandname}" ]; then + check_executable.sh + fi +done + +if [ "$(whoami)" != "root" ] || [ -f /.dockerenv ]; then + allowed_commands_array=(DEBUG START INSTALL) + for allowed_command in "${allowed_commands_array[@]}"; do + if [ "${allowed_command}" == "${commandname}" ]; then + check_glibc.sh + fi + done +fi + +allowed_commands_array=(BACKUP CONSOLE DEBUG DETAILS MAP-COMPRESSOR FASTDL MODS-INSTALL MODS-REMOVE MODS-UPDATE MONITOR POST-DETAILS RESTART START STOP TEST-ALERT CHANGE-PASSWORD UPDATE UPDATE-LGSM VALIDATE WIPE) +for allowed_command in "${allowed_commands_array[@]}"; do + if [ "${allowed_command}" == "${commandname}" ]; then + check_logs.sh + fi +done + +allowed_commands_array=(DEBUG START) +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) +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) +for allowed_command in "${allowed_commands_array[@]}"; do + if [ "${allowed_command}" == "${commandname}" ]; then + if [ -z "${installflag}" ]; then + check_ip.sh + fi + fi +done + +allowed_commands_array=(DEBUG START UPDATE VALIDATE CHECK-UPDATE) +for allowed_command in "${allowed_commands_array[@]}"; do + if [ "${allowed_command}" == "${commandname}" ]; then + if [ "${appid}" ]; then + check_steamcmd.sh + fi + fi +done + +allowed_commands_array=(CHANGE-PASSWORD DETAILS MONITOR 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) +for allowed_command in "${allowed_commands_array[@]}"; do + if [ "${allowed_command}" == "${commandname}" ]; then + check_system_requirements.sh + fi +done diff --git a/lgsm/functions/check_config.sh b/lgsm/functions/check_config.sh new file mode 100644 index 000000000..2c65243eb --- /dev/null +++ b/lgsm/functions/check_config.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# LinuxGSM check_config.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Checks if the server config is missing and warns the user if needed. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +if [ -n "${servercfgfullpath}" ] && [ ! -f "${servercfgfullpath}" ]; then + fn_print_dots "" + fn_print_warn_nl "Configuration file missing!" + echo -e "${servercfgfullpath}" + fn_script_log_warn "Configuration file missing!" + fn_script_log_warn "${servercfgfullpath}" + install_config.sh +fi + +if [ "${shortname}" == "rust" ] && [ -v rconpassword ] && [ -z "${rconpassword}" ]; then + fn_print_dots "" + fn_print_fail_nl "RCON password is not set" + fn_script_log_warn "RCON password is not set" +elif [ -v rconpassword ] && [ "${rconpassword}" == "CHANGE_ME" ]; then + fn_print_dots "" + fn_print_warn_nl "Default RCON Password detected" + fn_script_log_warn "Default RCON Password detected" +fi + +if [ "${shortname}" == "vh" ] && [ -z "${serverpassword}" ]; then + fn_print_fail_nl "serverpassword is not set" + fn_script_log_fatal "serverpassword is not set" +elif [ "${shortname}" == "vh" ] && [ "${#serverpassword}" -le "4" ]; then + fn_print_fail_nl "serverpassword is to short (min 5 chars)" + fn_script_log_fatal "serverpassword is to short (min 5 chars)" +fi diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh new file mode 100644 index 000000000..bb8507769 --- /dev/null +++ b/lgsm/functions/check_deps.sh @@ -0,0 +1,363 @@ +#!/bin/bash +# LinuxGSM check_deps.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Checks and installs missing dependencies. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +fn_install_mono_repo() { + if [ "${autodepinstall}" == "0" ]; then + fn_print_information_nl "Automatically adding Mono repository." + fn_script_log_info "Automatically adding Mono repository." + echo -en ".\r" + sleep 1 + echo -en "..\r" + sleep 1 + echo -en "...\r" + sleep 1 + echo -en " \r" + if [ "${distroid}" == "ubuntu" ]; then + if [ "${distroversion}" == "20.04" ]; then + cmd="sudo apt install gnupg ca-certificates;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/ubuntu stable-focal main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" + elif [ "${distroversion}" == "18.04" ]; then + cmd="sudo apt install gnupg ca-certificates;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/ubuntu stable-bionic main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" + elif [ "${distroversion}" == "16.04" ]; then + cmd="sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;sudo apt install apt-transport-https ca-certificates;echo 'deb https://download.mono-project.com/repo/ubuntu stable-xenial main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" + else + monoautoinstall="1" + fi + elif [ "${distroid}" == "debian" ]; then + if [ "${distroversion}" == "10" ]; then + cmd="sudo apt install apt-transport-https dirmngr gnupg ca-certificates;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/debian stable-buster main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" + elif [ "${distroversion}" == "9" ]; then + cmd="sudo apt install apt-transport-https dirmngr gnupg ca-certificates;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/debian stable-stretch main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" + else + monoautoinstall="1" + fi + elif [ "${distroid}" == "centos" ] || [ "${distroid}" == "almalinux" ] || [ "${distroid}" == "rocky" ]; then + if [ "${distroversion}" == "8" ]; then + cmd="sudo rpmkeys --import 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF';su -c 'curl https://download.mono-project.com/repo/centos8-stable.repo | tee /etc/yum.repos.d/mono-centos8-stable.repo'" + elif [ "${distroversion}" == "7" ]; then + cmd="sudo rpmkeys --import 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF';su -c 'curl https://download.mono-project.com/repo/centos7-stable.repo | tee /etc/yum.repos.d/mono-centos7-stable.repo'" + else + monoautoinstall="1" + fi + elif [ "${distroid}" == "fedora" ]; then + if [ "${distroversion}" -ge "29" ]; then + cmd="sudo rpm --import 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF';su -c 'curl https://download.mono-project.com/repo/centos8-stable.repo | tee /etc/yum.repos.d/mono-centos8-stable.repo';dnf update" + else + cmd="sudo rpm --import 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF';su -c 'curl https://download.mono-project.com/repo/centos7-stable.repo | tee /etc/yum.repos.d/mono-centos7-stable.repo';dnf update" + fi + else + monoautoinstall="1" + fi + + # Run the mono repo install. + eval "${cmd}" + + # Did Mono repo install correctly? + if [ "${monoautoinstall}" != "1" ]; then + if [ $? != 0 ]; then + fn_print_failure_nl "Unable to install Mono repository." + fn_script_log_fatal "Unable to install Mono repository." + else + fn_print_complete_nl "Installing Mono repository completed." + fn_script_log_pass "Installing Mono repository completed." + fi + fi + + # Mono can not be auto installed with this distro. + if [ "${monoautoinstall}" == "1" ]; then + fn_print_warning_nl "Mono auto install not available for ${distroname}." + echo -e "Follow instructions on Mono website to install." + echo -e "https://www.mono-project.com/download/stable/#download-lin" + fn_script_log_warn "Unable to install Mono repository. Mono auto install not available for ${distroname}." + fi + + else + fn_print_information_nl "Installing Mono repository." + fn_print_warning_nl "$(whoami) does not have sudo access." + echo -e "Follow instructions on Mono website to install." + echo -e "https://www.mono-project.com/download/stable/#download-lin" + fn_script_log_warn "Unable to install Mono repository. $(whoami) does not have sudo access." + fi +} + +fn_deps_email() { + # Adds postfix to required dependencies if email alert is enabled. + if [ "${emailalert}" == "on" ]; then + if [ -f /usr/bin/mailx ]; then + if [ -d /etc/exim4 ]; then + array_deps_required+=(exim4) + elif [ -d /etc/sendmail ]; then + array_deps_required+=(sendmail) + elif [ "$(command -v dpkg-query 2> /dev/null)" ]; then + array_deps_required+=(mailutils postfix) + elif [ "$(command -v rpm 2> /dev/null)" ]; then + array_deps_required+=(mailx postfix) + fi + else + if [ "$(command -v dpkg-query 2> /dev/null)" ]; then + array_deps_required+=(mailutils postfix) + elif [ "$(command -v rpm 2> /dev/null)" ]; then + array_deps_required+=(mailx postfix) + fi + fi + fi +} + +fn_install_missing_deps() { + # If any dependencies are not installed. + if [ "${#array_deps_missing[*]}" != "0" ]; then + if [ "${commandname}" == "INSTALL" ]; then + fn_print_warning_nl "Missing dependencies: ${red}${array_deps_missing[*]}${default}" + fn_script_log_warn "Missing dependencies: ${array_deps_missing[*]}" + else + fn_print_dots "Missing dependencies" + fn_print_warn "Missing dependencies: ${red}${array_deps_missing[*]}${default}" + fn_script_log_warn "Missing dependencies: ${array_deps_missing[*]}" + fi + fn_sleep_time + + # Attempt automatic dependency installation + if [ "${autoinstall}" == "1" ]; then + sudo -n true > /dev/null 2>&1 + else + sudo -v > /dev/null 2>&1 + fi + autodepinstall="$?" + + if [ "${monostatus}" == "1" ]; then + fn_install_mono_repo + fi + + if [ "${commandname}" == "INSTALL" ]; then + if [ "${autodepinstall}" == "0" ]; then + fn_print_information_nl "$(whoami) has sudo access." + fn_script_log_info "$(whoami) has sudo access." + else + fn_print_warning_nl "$(whoami) does not have sudo access. Manually install dependencies." + fn_script_log_warn "$(whoami) does not have sudo access. Manually install dependencies." + fi + fi + + # Add sudo dpkg --add-architecture i386 if using i386 packages. + if [ "$(command -v dpkg-query 2> /dev/null)" ]; then + if printf '%s\n' "${array_deps_required[@]}" | grep -q -P 'i386'; then + i386installcommand="sudo dpkg --add-architecture i386; " + fi + fi + + # If automatic dependency install is available + if [ "${autodepinstall}" == "0" ]; then + fn_print_information_nl "Automatically installing missing dependencies." + fn_script_log_info "Automatically installing missing dependencies." + echo -en ".\r" + sleep 1 + echo -en "..\r" + sleep 1 + echo -en "...\r" + sleep 1 + echo -en " \r" + if [ "$(command -v dpkg-query 2> /dev/null)" ]; then + cmd="echo steamcmd steam/question select \"I AGREE\" | sudo debconf-set-selections; echo steamcmd steam/license note '' | sudo debconf-set-selections; ${i386installcommand}sudo apt-get update; sudo apt-get -y install ${array_deps_missing[*]}" + eval "${cmd}" + elif [ "$(command -v dnf 2> /dev/null)" ]; then + cmd="sudo dnf -y install ${array_deps_missing[*]}" + eval "${cmd}" + elif [ "$(command -v yum 2> /dev/null)" ]; then + cmd="sudo yum -y install ${array_deps_missing[*]}" + eval "${cmd}" + fi + autodepinstall="$?" + + # If auto install passes remove steamcmd install failure. + if [ "${autodepinstall}" == "0" ]; then + unset steamcmdfail + fi + fi + + # If automatic dependency install is unavailable. + if [ "${autodepinstall}" != "0" ]; then + if [ "$(command -v dpkg-query 2> /dev/null)" ]; then + echo -e "${i386installcommand}sudo apt update; sudo apt install ${array_deps_missing[*]}" + elif [ "$(command -v dnf 2> /dev/null)" ]; then + echo -e "sudo dnf install ${array_deps_missing[*]}" + elif [ "$(command -v yum 2> /dev/null)" ]; then + echo -e "sudo yum install ${array_deps_missing[*]}" + fi + fi + + if [ "${steamcmdfail}" ]; then + if [ "${commandname}" == "INSTALL" ]; then + fn_print_failure_nl "Missing dependencies required to run SteamCMD." + fn_script_log_fatal "Missing dependencies required to run SteamCMD." + core_exit.sh + else + fn_print_error_nl "Missing dependencies required to run SteamCMD." + fn_script_log_error "Missing dependencies required to run SteamCMD." + fi + fi + + else + if [ "${commandname}" == "INSTALL" ]; then + fn_print_information_nl "Required dependencies already installed." + fn_script_log_info "Required dependencies already installed." + fi + fi +} + +fn_check_loop() { + # Loop though required depenencies checking if they are installed. + for deptocheck in ${array_deps_required[*]}; do + fn_deps_detector + done + + # user will be informed of any missing dependencies. + fn_install_missing_deps +} + +# Checks if dependency is installed or not. +fn_deps_detector() { + ## Check. + # SteamCMD: Will be removed from required array if no appid is present or non-free repo is not available. + # This will cause SteamCMD to be installed using tar. + if [ "${deptocheck}" == "libsdl2-2.0-0:i386" ] && [ -z "${appid}" ]; then + array_deps_required=("${array_deps_required[@]/libsdl2-2.0-0:i386/}") + steamcmdstatus=1 + elif [ "${deptocheck}" == "steamcmd" ] && [ -z "${appid}" ]; then + array_deps_required=("${array_deps_required[@]/steamcmd/}") + steamcmdstatus=1 + elif [ "${deptocheck}" == "steamcmd" ] && [ "${distroid}" == "debian" ] && ! grep -qE "^deb .*non-free" /etc/apt/sources.list; then + array_deps_required=("${array_deps_required[@]/steamcmd/}") + steamcmdstatus=1 + # Java: Added for users using Oracle JRE to bypass check. + elif [[ ${deptocheck} == "openjdk"* ]] || [[ ${deptocheck} == "java"* ]]; then + # Is java already installed? + if [ -n "${javaversion}" ]; then + # Added for users using Oracle JRE to bypass check. + depstatus=0 + deptocheck="${javaversion}" + else + depstatus=1 + fi + # Mono: A Mono repo needs to be installed. + elif [ "${deptocheck}" == "mono-complete" ]; then + if [ -n "${monoversion}" ] && [ "${monoversion}" -ge "5" ]; then + # Mono >= 5.0.0 already installed. + depstatus=0 + monostatus=0 + else + # Mono not installed or installed Mono < 5.0.0. + depstatus=1 + monostatus=1 + fi + elif [ "$(command -v dpkg-query 2> /dev/null)" ]; then + dpkg-query -W -f='${Status}' "${deptocheck}" 2> /dev/null | grep -q -P '^install ok installed' + depstatus=$? + elif [ "$(command -v dnf 2> /dev/null)" ]; then + dnf list installed "${deptocheck}" > /dev/null 2>&1 + depstatus=$? + elif [ "$(command -v rpm 2> /dev/null)" ]; then + rpm -q "${deptocheck}" > /dev/null 2>&1 + depstatus=$? + fi + + # Outcome of Check. + if [ "${steamcmdstatus}" == "1" ]; then + # If SteamCMD is not available in repo dont check for it. + unset steamcmdstatus + elif [ "${depstatus}" == "0" ]; then + # If dependency is found. + missingdep=0 + if [ "${commandname}" == "INSTALL" ]; then + echo -e "${green}${deptocheck}${default}" + sleep 0.1 + fi + elif [ "${depstatus}" != "0" ]; then + # If dependency is not found. + missingdep=1 + if [ "${commandname}" == "INSTALL" ]; then + echo -e "${red}${deptocheck}${default}" + sleep 0.1 + fi + # If SteamCMD requirements are not met install will fail. + if [ -n "${appid}" ]; then + for steamcmddeptocheck in ${array_deps_required_steamcmd[*]}; do + if [ "${deptocheck}" != "steamcmd" ] && [ "${deptocheck}" == "${steamcmddeptocheck}" ]; then + steamcmdfail=1 + fi + done + fi + fi + unset depstatus + + # Missing dependencies are added to array_deps_missing. + if [ "${missingdep}" == "1" ]; then + array_deps_missing+=("${deptocheck}") + fi +} + +if [ "${commandname}" == "INSTALL" ]; then + if [ "$(whoami)" == "root" ] && [ ! -f /.dockerenv ]; then + echo -e "" + echo -e "${lightyellow}Checking Dependencies as root${default}" + echo -e "=================================" + fn_print_information_nl "Checking any missing dependencies for ${gamename} server only." + fn_print_information_nl "This will NOT install a ${gamename} server." + fn_sleep_time + else + echo -e "" + echo -e "${lightyellow}Checking Dependencies${default}" + echo -e "=================================" + fi +fi + +# Will warn user if their distro is no longer supported by the vendor. +if [ -n "${distrosupport}" ]; then + if [ "${distrosupport}" == "unsupported" ]; then + fn_print_warning_nl "${distroname} is no longer supported by the vendor. Upgrading is recommended." + fn_script_log_warn "${distroname} is no longer supported by the vendor. Upgrading is recommended." + fi +fi + +info_distro.sh + +if [ ! -f "${tmpdir}/dependency-no-check.tmp" ] && [ ! -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then + # Check that the distro dependency csv file exists. + fn_check_file_github "lgsm/data" "${distroid}-${distroversioncsv}.csv" + if [ -n "${checkflag}" ] && [ "${checkflag}" == "0" ]; then + fn_fetch_file_github "lgsm/data" "${distroid}-${distroversioncsv}.csv" "lgsm/data" "chmodx" "norun" "noforce" "nohash" + fi +fi + +# If the file successfully downloaded run the dependency check. +if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then + depall=$(awk -F, '$1=="all" {$1=""; print $0}' "${datadir}/${distroid}-${distroversioncsv}.csv") + depsteamcmd=$(awk -F, '$1=="steamcmd" {$1=""; print $0}' "${datadir}/${distroid}-${distroversioncsv}.csv") + depshortname=$(awk -v shortname="${shortname}" -F, '$1==shortname {$1=""; print $0}' "${datadir}/${distroid}-${distroversioncsv}.csv") + + # Generate array of missing deps. + array_deps_missing=() + + array_deps_required=("${depall} ${depsteamcmd} ${depshortname}") + array_deps_required_steamcmd=("${depsteamcmd}") + fn_deps_email + # Unique sort dependency array. + IFS=" " read -r -a array_deps_required <<< "$(echo "${array_deps_required[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' ')" + + fn_check_loop +# Warn the user that dependency checking is unavailable for their distro. +elif [ "${commandname}" == "INSTALL" ] || [ -n "${checkflag}" ] && [ "${checkflag}" != "0" ]; then + fn_print_warning_nl "LinuxGSM dependency checking currently unavailable for ${distroname}." + # Prevent future dependency checking if unavailable for the distro. + echo "${version}" > "${tmpdir}/dependency-no-check.tmp" +elif [ -f "${tmpdir}/dependency-no-check.tmp" ]; then + # Allow LinuxGSM to try a dependency check if LinuxGSM has been recently updated. + nocheckversion=$(cat "${tmpdir}/dependency-no-check.tmp") + if [ "${version}" != "${nocheckversion}" ]; then + rm -f "${tmpdir:?}/dependency-no-check.tmp" + fi +fi diff --git a/lgsm/functions/check_executable.sh b/lgsm/functions/check_executable.sh new file mode 100644 index 000000000..d1b5c3efd --- /dev/null +++ b/lgsm/functions/check_executable.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# LinuxGSM check_executable.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Checks if server executable exists. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +# Check if executable exists +execname=$(basename "${executable}") +if [ ! -f "${executabledir}/${execname}" ]; then + fn_print_fail_nl "executable was not found" + echo -e "* ${executabledir}/${execname}" + if [ -d "${lgsmlogdir}" ]; then + fn_script_log_fatal "Executable was not found: ${executabledir}/${execname}" + fi + unset exitbypass + core_exit.sh +fi diff --git a/lgsm/functions/check_glibc.sh b/lgsm/functions/check_glibc.sh new file mode 100644 index 000000000..b1a959f5b --- /dev/null +++ b/lgsm/functions/check_glibc.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# LinuxGSM check_glibc.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Checks if the server has the correct Glibc version. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +info_distro.sh + +if [ "${glibc}" == "null" ]; then + # Glibc is not required. + : +elif [ -z "${glibc}" ]; then + fn_print_dots "glibc" + fn_print_error_nl "glibc requirement unknown" + fn_script_log_error "glibc requirement unknown" +elif [ "$(printf '%s\n'${glibc}'\n' "${glibcversion}" | sort -V | head -n 1)" != "${glibc}" ]; then + fn_print_dots "glibc" + fn_print_error_nl "glibc requirements not met" + fn_script_log_error "glibc requirements not met" + echo -en "\n" + echo -e " * glibc required: ${glibc}" + echo -e " * glibc installed: ${red}${glibcversion}${default}" + echo -en "\n" + fn_print_information_nl "distro upgrade is required" + fn_script_log_info "distro upgrade is required" +fi diff --git a/lgsm/functions/check_ip.sh b/lgsm/functions/check_ip.sh new file mode 100644 index 000000000..4b8eca5ec --- /dev/null +++ b/lgsm/functions/check_ip.sh @@ -0,0 +1,63 @@ +#!/bin/bash +# LinuxGSM check_ip.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Automatically identifies the server interface IP. +# If multiple interfaces are detected the user will need to manually set using ip="0.0.0.0". + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +info_game.sh + +ip_commands_array=("/bin/ip" "/usr/sbin/ip" "ip") +for ip_command in "${ip_commands_array[@]}"; do + if [ "$(command -v "${ip_command}" 2> /dev/null)" ]; then + ipcommand="${ip_command}" + break + fi +done + +ethtool_commands_array=("/bin/ethtool" "/usr/sbin/ethtool" "ethtool") +for ethtool_command in "${ethtool_commands_array[@]}"; do + if [ "$(command -v "${ethtool_command}" 2> /dev/null)" ]; then + ethtoolcommand="${ethtool_command}" + break + fi +done + +mapfile -t current_ips < <(${ipcommand} -o -4 addr | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | sort -u | grep -v 127.0.0) + +function fn_is_valid_ip() { + local ip="${1}" + # excluding 0.* ips also + grep -qEe '^[1-9]+[0-9]*\.[0-9]+\.[0-9]+\.[0-9]+$' <<< "${ip}" +} + +# Check if server has multiple IP addresses + +# If the IP variable has been set by user. +if fn_is_valid_ip "${ip}"; then + queryips=("${ip}") + webadminip=("${ip}") + telnetip=("${ip}") +# If game config does have an IP set. +elif fn_is_valid_ip "${configip}"; then + queryips=("${configip}") + ip="${configip}" + webadminip=("${configip}") + telnetip=("${configip}") +# If there is only 1 server IP address. +# Some IP details can automaticly use the one IP +elif [ "${#current_ips[@]}" == "1" ]; then + queryips=("127.0.0.1" "${current_ips[@]}") + ip="0.0.0.0" + webadminip=("${current_ips[@]}") + telnetip=("${current_ips[@]}") +# If no ip is set by the user and server has more than one IP. +else + queryips=("127.0.0.1" "${current_ips[@]}") + ip="0.0.0.0" + webadminip=("${ip}") + telnetip=("${ip}") +fi diff --git a/lgsm/functions/check_last_update.sh b/lgsm/functions/check_last_update.sh new file mode 100644 index 000000000..ee86c0ba1 --- /dev/null +++ b/lgsm/functions/check_last_update.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# LinuxGSM check_last_update.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Checks lock file to see when last update happened. +# Will reboot server if instance not rebooted since update. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +if [ -f "${lockdir}/${selfname}-laststart.lock" ]; then + laststart=$(cat "${lockdir}/${selfname}-laststart.lock") +fi +if [ -f "${lockdir}/lastupdate.lock" ]; then + lastupdate=$(cat "${lockdir}/lastupdate.lock") +fi + +check_status.sh +if [ -f "${lockdir}/lastupdate.lock" ] && [ "${status}" != "0" ]; then + if [ ! -f "${lockdir}/${selfname}-laststart.lock" ] || [ "${laststart}" -lt "${lastupdate}" ]; then + fn_print_info "${selfname} has not been restarted since last update" + fn_script_log_info "${selfname} has not been restarted since last update" + command_restart.sh + fn_firstcommand_reset + fi +fi diff --git a/lgsm/functions/check_permissions.sh b/lgsm/functions/check_permissions.sh new file mode 100644 index 000000000..0094456ec --- /dev/null +++ b/lgsm/functions/check_permissions.sh @@ -0,0 +1,233 @@ +#!/bin/bash +# LinuxGSM check_permissions.sh +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Checks ownership & permissions of scripts, files and directories. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +fn_check_ownership() { + if [ -f "${rootdir}/${selfname}" ]; then + if [ "$(find "${rootdir}/${selfname}" -not -user "$(whoami)" | wc -l)" -ne "0" ]; then + selfownissue=1 + fi + fi + if [ -d "${functionsdir}" ]; then + if [ "$(find "${functionsdir}" -not -user "$(whoami)" | wc -l)" -ne "0" ]; then + funcownissue=1 + fi + fi + if [ -d "${serverfiles}" ]; then + if [ "$(find "${serverfiles}" -not -user "$(whoami)" | wc -l)" -ne "0" ]; then + filesownissue=1 + fi + fi + if [ "${selfownissue}" == "1" ] || [ "${funcownissue}" == "1" ] || [ "${filesownissue}" == "1" ]; then + fn_print_fail_nl "Ownership issues found" + fn_script_log_fatal "Ownership issues found" + fn_print_information_nl "The current user ($(whoami)) does not have ownership of the following files:" + fn_script_log_info "The current user ($(whoami)) does not have ownership of the following files:" + { + echo -e "User\tGroup\tFile\n" + if [ "${selfownissue}" == "1" ]; then + find "${rootdir}/${selfname}" -not -user "$(whoami)" -printf "%u\t%g\t%p\n" + fi + if [ "${funcownissue}" == "1" ]; then + find "${functionsdir}" -not -user "$(whoami)" -printf "%u\t%g\t%p\n" + fi + if [ "${filesownissue}" == "1" ]; then + find "${serverfiles}" -not -user "$(whoami)" -printf "%u\t%g\t%p\n" + fi + + } | column -s $'\t' -t | tee -a "${lgsmlog}" + echo -e "" + fn_print_information_nl "please see https://docs.linuxgsm.com/support/faq#fail-starting-game-server-permission-issues-found" + fn_script_log "For more information, please see https://docs.linuxgsm.com/support/faq#fail-starting-game-server-permission-issues-found" + if [ "${monitorflag}" == 1 ]; then + alert="permissions" + alert.sh + fi + core_exit.sh + fi +} + +fn_check_permissions() { + if [ -d "${functionsdir}" ]; then + if [ "$(find "${functionsdir}" -type f -not -executable | wc -l)" -ne "0" ]; then + fn_print_fail_nl "Permissions issues found" + fn_script_log_fatal "Permissions issues found" + fn_print_information_nl "The following files are not executable:" + fn_script_log_info "The following files are not executable:" + { + echo -e "File\n" + find "${functionsdir}" -type f -not -executable -printf "%p\n" + } | column -s $'\t' -t | tee -a "${lgsmlog}" + if [ "${monitorflag}" == 1 ]; then + alert="permissions" + alert.sh + fi + core_exit.sh + fi + fi + + # Check rootdir permissions. + if [ "${rootdir}" ]; then + # Get permission numbers on directory under the form 775. + rootdirperm=$(stat -c %a "${rootdir}") + # Grab the first and second digit for user and group permission. + userrootdirperm="${rootdirperm:0:1}" + grouprootdirperm="${rootdirperm:1:1}" + if [ "${userrootdirperm}" != "7" ] && [ "${grouprootdirperm}" != "7" ]; then + fn_print_fail_nl "Permissions issues found" + fn_script_log_fatal "Permissions issues found" + fn_print_information_nl "The following directory does not have the correct permissions:" + fn_script_log_info "The following directory does not have the correct permissions:" + fn_script_log_info "${rootdir}" + ls -l "${rootdir}" + if [ "${monitorflag}" == 1 ]; then + alert="permissions" + alert.sh + fi + core_exit.sh + fi + fi + # Check if executable is executable and attempt to fix it. + # First get executable name. + execname=$(basename "${executable}") + if [ -f "${executabledir}/${execname}" ]; then + # Get permission numbers on file under the form 775. + execperm=$(stat -c %a "${executabledir}/${execname}") + # Grab the first and second digit for user and group permission. + userexecperm="${execperm:0:1}" + groupexecperm="${execperm:1:1}" + # Check for invalid user permission. + if [ "${userexecperm}" == "0" ] || [ "${userexecperm}" == "2" ] || [ "${userexecperm}" == "4" ] || [ "${userexecperm}" == "6" ]; then + # If user permission is invalid, then check for invalid group permissions. + if [ "${groupexecperm}" == "0" ] || [ "${groupexecperm}" == "2" ] || [ "${groupexecperm}" == "4" ] || [ "${groupexecperm}" == "6" ]; then + # If permission issues are found. + fn_print_warn_nl "Permissions issue found" + fn_script_log_warn "Permissions issue found" + fn_print_information_nl "The following file is not executable:" + ls -l "${executabledir}/${execname}" + fn_script_log_info "The following file is not executable:" + fn_script_log_info "${executabledir}/${execname}" + fn_print_information_nl "Applying chmod u+x,g+x ${executabledir}/${execname}" + fn_script_log_info "Applying chmod u+x,g+x ${execperm}" + # Make the executable executable. + chmod u+x,g+x "${executabledir}/${execname}" + # Second check to see if it's been successfully applied. + # Get permission numbers on file under the form 775. + execperm=$(stat -c %a "${executabledir}/${execname}") + # Grab the first and second digit for user and group permission. + userexecperm="${execperm:0:1}" + groupexecperm="${execperm:1:1}" + if [ "${userexecperm}" == "0" ] || [ "${userexecperm}" == "2" ] || [ "${userexecperm}" == "4" ] || [ "${userexecperm}" == "6" ]; then + if [ "${groupexecperm}" == "0" ] || [ "${groupexecperm}" == "2" ] || [ "${groupexecperm}" == "4" ] || [ "${groupexecperm}" == "6" ]; then + # If errors are still found. + fn_print_fail_nl "The following file could not be set executable:" + ls -l "${executabledir}/${execname}" + fn_script_log_warn "The following file could not be set executable:" + fn_script_log_info "${executabledir}/${execname}" + if [ "${monitorflag}" == "1" ]; then + alert="permissions" + alert.sh + fi + core_exit.sh + fi + fi + fi + fi + fi +} + +## The following fn_sys_perm_* functions checks for permission errors in /sys directory. + +# Checks for permission errors in /sys directory. +fn_sys_perm_errors_detect() { + # Reset test variables. + sysdirpermerror="0" + classdirpermerror="0" + netdirpermerror="0" + # Check permissions. + # /sys, /sys/class and /sys/class/net should be readable & executable. + if [ ! -r "/sys" ] || [ ! -x "/sys" ]; then + sysdirpermerror="1" + fi + if [ ! -r "/sys/class" ] || [ ! -x "/sys/class" ]; then + classdirpermerror="1" + fi + if [ ! -r "/sys/class/net" ] || [ ! -x "/sys/class/net" ]; then + netdirpermerror="1" + fi +} + +# Display a message on how to fix the issue manually. +fn_sys_perm_fix_manually_msg() { + echo -e "" + fn_print_information_nl "This error causes servers to fail starting properly" + fn_script_log_info "This error causes servers to fail starting properly." + echo -e " * To fix this issue, run the following command as root:" + fn_script_log_info "To fix this issue, run the following command as root:" + echo -e " chmod a+rx /sys /sys/class /sys/class/net" + fn_script_log "chmod a+rx /sys /sys/class /sys/class/net" + fn_sleep_time + if [ "${monitorflag}" == 1 ]; then + alert="permissions" + alert.sh + fi + core_exit.sh +} + +# Attempt to fix /sys related permission errors if sudo is available, exits otherwise. +fn_sys_perm_errors_fix() { + if sudo -n true > /dev/null 2>&1; then + fn_print_dots "Automatically fixing /sys permissions" + fn_script_log_info "Automatically fixing /sys permissions." + if [ "${sysdirpermerror}" == "1" ]; then + sudo chmod a+rx "/sys" + fi + if [ "${classdirpermerror}" == "1" ]; then + sudo chmod a+rx "/sys/class" + fi + if [ "${netdirpermerror}" == "1" ]; then + sudo chmod a+rx "/sys/class/net" + fi + # Run check again to see if it's fixed. + fn_sys_perm_errors_detect + if [ "${sysdirpermerror}" == "1" ] || [ "${classdirpermerror}" == "1" ] || [ "${netdirpermerror}" == "1" ]; then + fn_print_error "Could not fix /sys permissions" + fn_script_log_error "Could not fix /sys permissions." + fn_sleep_time + # Show the user how to fix. + fn_sys_perm_fix_manually_msg + else + fn_print_ok_nl "Automatically fixing /sys permissions" + fn_script_log_pass "Permissions in /sys fixed" + fi + else + # Show the user how to fix. + fn_sys_perm_fix_manually_msg + fi +} + +# Processes to the /sys related permission errors check & fix/info. +fn_sys_perm_error_process() { + fn_sys_perm_errors_detect + # If any error was found. + if [ "${sysdirpermerror}" == "1" ] || [ "${classdirpermerror}" == "1" ] || [ "${netdirpermerror}" == "1" ]; then + fn_print_error_nl "Permission error(s) found in /sys" + fn_script_log_error "Permission error(s) found in /sys" + # Run the fix + fn_sys_perm_errors_fix + fi +} + +## Run permisions checks when not root or docker. +if [ "$(whoami)" != "root" ] && [ ! -f /.dockerenv ]; then + fn_check_ownership + fn_check_permissions + if [ "${commandname}" == "START" ]; then + fn_sys_perm_error_process + fi +fi diff --git a/lgsm/functions/check_status.sh b/lgsm/functions/check_status.sh new file mode 100644 index 000000000..28ec38eb2 --- /dev/null +++ b/lgsm/functions/check_status.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# LinuxGSM check_status.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Checks the process status of the server. Either online or offline. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +status=$(tmux list-sessions -F "#{session_name}" 2> /dev/null | grep -Ecx "^${sessionname}") diff --git a/lgsm/functions/check_steamcmd.sh b/lgsm/functions/check_steamcmd.sh new file mode 100644 index 000000000..d41e8669f --- /dev/null +++ b/lgsm/functions/check_steamcmd.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# LinuxGSM check_steamcmd.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Checks if SteamCMD is installed correctly. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +# init steamcmd functions +core_steamcmd.sh + +fn_check_steamcmd_clear +fn_check_steamcmd +if [ "${shortname}" == "ark" ]; then + fn_check_steamcmd_ark +fi +fn_check_steamcmd_dir +fn_check_steamcmd_dir_legacy +fn_check_steamcmd_steamapp +fn_check_steamcmd_user +fn_check_steamcmd_exec diff --git a/lgsm/functions/check_system_dir.sh b/lgsm/functions/check_system_dir.sh new file mode 100644 index 000000000..0a732d6d1 --- /dev/null +++ b/lgsm/functions/check_system_dir.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# LinuxGSM check_system_dir.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Checks if systemdir/serverfiles is accessible. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +if [ "${commandname}" != "VALIDATE" ]; then + checkdir="${serverfiles}" +else + checkdir="${systemdir}" +fi + +if [ ! -d "${checkdir}" ]; then + fn_print_fail_nl "Cannot access ${checkdir}: No such directory" + if [ -d "${lgsmlogdir}" ]; then + fn_script_log_fatal "Cannot access ${checkdir}: No such directory." + fi + core_exit.sh +fi diff --git a/lgsm/functions/check_system_requirements.sh b/lgsm/functions/check_system_requirements.sh new file mode 100644 index 000000000..bfe597135 --- /dev/null +++ b/lgsm/functions/check_system_requirements.sh @@ -0,0 +1,55 @@ +#!/bin/bash +# LinuxGSM check_system_requirements.sh +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Checks RAM requirements. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +info_distro.sh + +# RAM requirements in megabytes for each game or engine. + +if [ "${shortname}" == "ark" ]; then + ramrequirementmb="4000" + ramrequirementgb="4" +elif [ "${shortname}" == "bt" ]; then + ramrequirementmb="1000" + ramrequirementgb="1" +elif [ "${shortname}" == "mh" ]; then + ramrequirementmb="4000" + ramrequirementgb="4" +elif [ "${shortname}" == "arma3" ]; then + ramrequirementmb="1000" + ramrequirementgb="1" +elif [ "${shortname}" == "rust" ]; then + ramrequirementmb="4000" + ramrequirementgb="4" +elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ] || [ "${shortname}" == "wmc" ]; then + ramrequirementmb="1000" + ramrequirementgb="1" +elif [ "${shortname}" == "pstbs" ]; then + ramrequirementmb="2000" + ramrequirementgb="2" +elif [ "${shortname}" == "ns2" ] || [ "${shortname}" == "ns2c" ]; then + ramrequirementmb="1000" + ramrequirementgb="1" +elif [ "${shortname}" == "st" ]; then + ramrequirementmb="1000" + ramrequirementgb="1" +elif [ "${shortname}" == "pvr" ]; then + ramrequirementmb="2000" + ramrequirementgb="2" +fi + +# If the game or engine has a minimum RAM Requirement, compare it to system's available RAM. +if [ "${ramrequirementmb}" ]; then + if [ "${physmemtotalmb}" -lt "${ramrequirementmb}" ]; then + fn_print_dots "Check RAM" + # Warn the user. + fn_print_warn_nl "Check RAM: ${ramrequirementgb}G required, ${physmemtotal} available" + echo "* ${gamename} server may fail to run or experience poor performance." + fn_sleep_time + fi +fi diff --git a/lgsm/functions/check_tmuxception.sh b/lgsm/functions/check_tmuxception.sh new file mode 100644 index 000000000..64705a3a8 --- /dev/null +++ b/lgsm/functions/check_tmuxception.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# LinuxGSM check_config.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Checks if run from tmux or screen. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +fn_check_is_in_tmux() { + if [ "${TMUX}" ]; then + fn_print_fail_nl "tmuxception error: Sorry Cobb you cannot start a tmux session inside of a tmux session." + fn_script_log_fatal "Tmuxception error: Attempted to start a tmux session inside of a tmux session." + fn_print_information_nl "LinuxGSM creates a tmux session when starting the server." + echo -e "It is not possible to run a tmux session inside another tmux session" + echo -e "https://docs.linuxgsm.com/requirements/tmux#tmuxception" + core_exit.sh + fi +} + +fn_check_is_in_screen() { + if [ "${STY}" ]; then + fn_print_fail_nl "tmuxception error: Sorry Cobb you cannot start a tmux session inside of a screen session." + fn_script_log_fatal "Tmuxception error: Attempted to start a tmux session inside of a screen session." + fn_print_information_nl "LinuxGSM creates a tmux session when starting the server." + echo -e "It is not possible to run a tmux session inside screen session" + echo -e "https://docs.linuxgsm.com/requirements/tmux#tmuxception" + core_exit.sh + fi +} + +fn_check_is_in_tmux +fn_check_is_in_screen diff --git a/lgsm/functions/check_version.sh b/lgsm/functions/check_version.sh new file mode 100644 index 000000000..657e32b54 --- /dev/null +++ b/lgsm/functions/check_version.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# LinuxGSM command_version.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Will run update-lgsm if gameserver.sh and modules version does not match +# this will allow gameserver.sh to update - useful for multi instance servers. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +if [ -n "${modulesversion}" ] && [ -n "${version}" ] && [ "${version}" != "${modulesversion}" ]; then + exitbypass=1 + echo -e "" + fn_print_error_nl "LinuxGSM version mismatch" + echo -e "" + echo -e "* ${selfname}: ${version}" + echo -e "* modules: ${modulesversion}" + echo -e "" + fn_sleep_time + fn_script_log_error "LinuxGSM Version mismatch: ${selfname}: ${version}: modules: ${modulesversion}" + command_update_linuxgsm.sh + fn_firstcommand_reset +fi diff --git a/lgsm/functions/command_backup.sh b/lgsm/functions/command_backup.sh new file mode 100644 index 000000000..d69c57a0f --- /dev/null +++ b/lgsm/functions/command_backup.sh @@ -0,0 +1,268 @@ +#!/bin/bash +# LinuxGSM command_backup.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Creates a .tar.gz file in the backup directory. + +commandname="BACKUP" +commandaction="Backing up" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +check.sh + +# Trap to remove lockfile on quit. +fn_backup_trap() { + echo -e "" + echo -en "backup ${backupname}.tar.gz..." + 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_print_removed_eol_nl + fn_script_log_info "Backup ${backupname}.tar.gz: REMOVED" + # Remove lock file. + rm -f "${lockdir:?}/backup.lock" + fn_backup_start_server + unset exitbypass + core_exit.sh +} + +# Check if a backup is pending or has been aborted using backup.lock. +fn_backup_check_lockfile() { + if [ -f "${lockdir}/backup.lock" ]; then + fn_print_info_nl "Lock file found: Backup is currently running" + fn_script_log_error "Lock file found: Backup is currently running: ${lockdir}/backup.lock" + core_exit.sh + fi +} + +# Initialisation. +fn_backup_init() { + # Backup file name with selfname and current date. + backupname="${selfname}-$(date '+%Y-%m-%d-%H%M%S')" + + info_distro.sh + fn_print_dots "Backup starting" + fn_script_log_info "Backup starting" + fn_print_ok_nl "Backup starting" + if [ ! -d "${backupdir}" ] || [ "${backupcount}" == "0" ]; then + fn_print_info_nl "There are no previous backups" + else + if [ "${lastbackupdaysago}" == "0" ]; then + daysago="less than 1 day ago" + elif [ "${lastbackupdaysago}" == "1" ]; then + daysago="1 day ago" + else + daysago="${lastbackupdaysago} days ago" + fi + echo -e "* Previous backup was created ${daysago}, total size ${lastbackupsize}" + fi +} + +# Check if server is started and whether to stop it. +fn_backup_stop_server() { + check_status.sh + # Server is running but will not be stopped. + if [ "${stoponbackup}" == "off" ]; then + fn_print_warn_nl "${selfname} is currently running" + echo -e "* Although unlikely; creating a backup while ${selfname} is running might corrupt the backup." + fn_script_log_warn "${selfname} is currently running" + fn_script_log_warn "Although unlikely; creating a backup while ${selfname} is running might corrupt the backup" + # Server is running and will be stopped if stoponbackup=on or unset. + # If server is started + elif [ "${status}" != "0" ]; then + fn_print_restart_warning + startserver="1" + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + fi +} + +# Create required folders. +fn_backup_dir() { + # Create backupdir if it doesn't exist. + if [ ! -d "${backupdir}" ]; then + mkdir -p "${backupdir}" + fi +} + +# Migrate Backups from old dir before refactor +fn_backup_migrate_olddir() { + # Check if old backup dir is there before the refactor and move the backups + if [ -d "${rootdir}/backups" ]; then + if [ "${rootdir}/backups" != "${backupdir}" ]; then + fn_print_dots "Backup directory is being migrated" + fn_script_log_info "Backup directory is being migrated" + fn_script_log_info "${rootdir}/backups > ${backupdir}" + mv "${rootdir}/backups/"* "${backupdir}" 2> /dev/null + exitcode=$? + if [ "${exitcode}" == 0 ]; then + rmdir "${rootdir}/backups" 2> /dev/null + exitcode=$? + fi + if [ "${exitcode}" != 0 ]; then + fn_print_error_nl "Backup directory is being migrated" + fn_script_log_error "Backup directory is being migrated" + else + + fn_print_ok_nl "Backup directory is being migrated" + fn_script_log_pass "Backup directory is being migrated" + fi + fi + fi +} + +fn_backup_create_lockfile() { + # Create lockfile. + date '+%s' > "${lockdir}/backup.lock" + fn_script_log_info "Lockfile generated" + fn_script_log_info "${lockdir}/backup.lock" + # trap to remove lockfile on quit. + trap fn_backup_trap INT +} + +# 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" + 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_fatal "Problem identifying the previous backup directory for exclusion" + core_exit.sh + fi + + tar -czf "${backupdir}/${backupname}.tar.gz" -C "${rootdir}" --exclude "${excludedir}" --exclude "${lockdir}/backup.lock" ./. + local exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_print_fail_eol + fn_script_log_fatal "Backup in progress: FAIL" + echo -e "${extractcmd}" | tee -a "${lgsmlog}" + fn_print_fail_nl "Starting backup" + fn_script_log_fatal "Starting backup" + else + fn_print_ok_eol + fn_print_ok_nl "Completed: ${backupname}.tar.gz, 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}')" + fi + # Remove lock file + rm -f "${lockdir:?}/backup.lock" +} + +# Clear old backups according to maxbackups and maxbackupdays variables. +fn_backup_prune() { + # Clear if backup variables are set. + if [ "${maxbackups}" ] && [ -n "${maxbackupdays}" ]; then + # How many backups there are. + info_distro.sh + # 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) + # If anything can be cleared. + if [ "${backupquotadiff}" -gt "0" ] || [ "${backupsoudatedcount}" -gt "0" ]; then + fn_print_dots "Pruning" + fn_script_log_info "Backup pruning activated" + fn_print_ok_nl "Pruning" + # If maxbackups greater or equal to backupsoutdatedcount, then it is over maxbackupdays. + if [ "${backupquotadiff}" -ge "${backupsoudatedcount}" ]; then + # Display how many backups will be cleared. + echo -e "* Pruning: ${backupquotadiff} backup(s) has exceeded the ${maxbackups} backups limit" + fn_script_log_info "Pruning: ${backupquotadiff} backup(s) has exceeded the ${maxbackups} backups limit" + fn_sleep_time + 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 + fn_print_ok_nl "Pruning: Clearing ${backupquotadiff} backup(s)" + fn_script_log_pass "Pruning: Cleared ${backupquotadiff} backup(s)" + # If maxbackupdays is used over maxbackups. + elif [ "${backupquotadiff}" -lt "${backupsoudatedcount}" ]; then + # Display how many backups will be cleared. + echo -e "* Pruning: ${backupsoudatedcount} backup(s) are older than ${maxbackupdays} days." + fn_script_log_info "Pruning: ${backupsoudatedcount} backup(s) older than ${maxbackupdays} days." + fn_sleep_time + 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 -mtime +"${maxbackupdays}" -exec rm -f {} \; + fn_print_ok_nl "Pruning: Clearing ${backupquotadiff} backup(s)" + fn_script_log_pass "Pruning: Cleared ${backupquotadiff} backup(s)" + fi + fi + fi +} + +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")) + if [ ${#rdirtoks[@]} -eq 0 ]; then + fn_print_fail_nl "Problem assessing rootdir during relative path assessment" + fn_script_log_fatal "Problem assessing rootdir during relative path assessment: ${rootdir}" + core_exit.sh + fi + + # Populate an array of tokens initialized from the backupdir components. + declare -a bdirtoks=($(readlink -f "${backupdir}" | sed "s/\// /g")) + if [ ${#bdirtoks[@]} -eq 0 ]; then + fn_print_fail_nl "Problem assessing backupdir during relative path assessment" + fn_script_log_fatal "Problem assessing backupdir during relative path assessment: ${rootdir}" + core_exit.sh + fi + + # Compare the leading entries of each array. These common elements will be clipped off. + # for the relative path output. + for ((base = 0; base < ${#rdirtoks[@]}; base++)); do + [[ "${rdirtoks[$base]}" != "${bdirtoks[$base]}" ]] && break + done + + # Next, climb out of the remaining rootdir location with updir references. + for ((x = base; x < ${#rdirtoks[@]}; x++)); do + echo -n "../" + done + + # Climb down the remaining components of the backupdir location. + for ((x = base; x < $((${#bdirtoks[@]} - 1)); x++)); do + echo -n "${bdirtoks[$x]}/" + done + + # In the event there were no directories left in the backupdir above to + # traverse down, just add a newline. Otherwise at this point, there is + # one remaining directory component in the backupdir to navigate. + if (("$base" < "${#bdirtoks[@]}")); then + echo -e "${bdirtoks[$((${#bdirtoks[@]} - 1))]}" + else + echo + fi +} + +# Start the server if it was stopped for the backup. +fn_backup_start_server() { + if [ -n "${startserver}" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + fi +} + +# Run functions. +fn_backup_check_lockfile +fn_backup_init +fn_backup_stop_server +fn_backup_dir +fn_backup_migrate_olddir +fn_backup_create_lockfile +fn_backup_compression +fn_backup_prune +fn_backup_start_server + +core_exit.sh diff --git a/lgsm/functions/command_check_update.sh b/lgsm/functions/command_check_update.sh new file mode 100644 index 000000000..b2647e2a1 --- /dev/null +++ b/lgsm/functions/command_check_update.sh @@ -0,0 +1,39 @@ +#!/bin/bash +# LinuxGSM command_check_update.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Handles updating of servers. + +commandname="CHECK-UPDATE" +commandaction="Check for Update" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +fn_print_dots "" +check.sh +core_logs.sh + +if [ "${shortname}" == "ts3" ]; then + update_ts3.sh +elif [ "${shortname}" == "mc" ]; then + update_minecraft.sh +elif [ "${shortname}" == "mcb" ]; then + update_minecraft_bedrock.sh +elif [ "${shortname}" == "pmc" ] || [ "${shortname}" == "vpmc" ] || [ "${shortname}" == "wmc" ]; then + update_papermc.sh +elif [ "${shortname}" == "fctr" ]; then + update_factorio.sh +elif [ "${shortname}" == "mta" ]; then + update_mta.sh +elif [ "${shortname}" == "jk2" ]; then + update_jediknight2.sh +elif [ "${shortname}" == "vints" ]; then + update_vintagestory.sh +elif [ "${shortname}" == "ut99" ]; then + update_ut99.sh +else + update_steamcmd.sh +fi + +core_exit.sh diff --git a/lgsm/functions/command_console.sh b/lgsm/functions/command_console.sh new file mode 100644 index 000000000..5b84789e6 --- /dev/null +++ b/lgsm/functions/command_console.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# LinuxGSM command_console.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Gives access to the server tmux console. + +commandname="CONSOLE" +commandaction="Access console" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +check.sh +fn_print_header + +if [ "${consoleverbose}" == "yes" ]; then + echo -e "* Verbose output: ${lightgreen}yes${default}" +elif [ "${consoleverbose}" == "no" ]; then + echo -e "* Verbose output: ${red}no${default}" +else + echo -e "* Verbose output: ${red}unknown${default}" +fi + +if [ "${consoleinteract}" == "yes" ]; then + echo -e "* Interactive output: ${lightgreen}yes${default}" +elif [ "${consoleinteract}" == "no" ]; then + echo -e "* Interactive output: ${red}no${default}" +else + echo -e "* Interactive output: ${red}unknown${default}" +fi +echo "" +fn_print_information_nl "Press \"CTRL+b\" then \"d\" to exit console." +fn_print_warning_nl "Do NOT press CTRL+c to exit." +echo -e "* https://docs.linuxgsm.com/commands/console" +echo -e "" +if ! fn_prompt_yn "Continue?" Y; then + exitcode=0 + core_exit.sh +fi +fn_print_dots "Accessing console" +check_status.sh +if [ "${status}" != "0" ]; then + fn_print_ok_nl "Accessing console" + fn_script_log_pass "Console accessed" + tmux attach-session -t "${sessionname}" + fn_print_ok_nl "Closing console" + fn_script_log_pass "Console closed" +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 + fn_firstcommand_reset + fi +fi + +core_exit.sh diff --git a/lgsm/functions/command_debug.sh b/lgsm/functions/command_debug.sh new file mode 100644 index 000000000..c6422be65 --- /dev/null +++ b/lgsm/functions/command_debug.sh @@ -0,0 +1,142 @@ +#!/bin/bash +# LinuxGSM command_debug.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Runs the server without tmux and directly from the terminal. + +commandname="DEBUG" +commandaction="Debuging" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +# Trap to remove lockfile on quit. +fn_lockfile_trap() { + # Remove lockfile. + rm -f "${lockdir:?}/${selfname}.lock" + # resets terminal. Servers can sometimes mess up the terminal on exit. + reset + fn_print_dots "Stopping debug" + fn_print_ok_nl "Stopping debug" + fn_script_log_pass "Stopping debug" + # remove trap. + trap - INT + core_exit.sh +} + +check.sh +fix.sh +info_distro.sh +info_game.sh +fn_print_header +{ + echo -e "${lightblue}Distro:\t\t${default}${distroname}" + echo -e "${lightblue}Architecture:\t\t${default}${arch}" + echo -e "${lightblue}Kernel:\t\t${default}${kernel}" + echo -e "${lightblue}Hostname:\t\t${default}${HOSTNAME}" + echo -e "${lightblue}tmux:\t\t${default}${tmuxv}" + echo -e "${lightblue}Avg Load:\t\t${default}${load}" + echo -e "${lightblue}Free Memory:\t\t${default}${physmemfree}" + echo -e "${lightblue}Free Disk:\t\t${default}${availspace}" +} | column -s $'\t' -t + +# glibc required. +if [ -n "${glibc}" ]; then + if [ "${glibc}" == "null" ]; then + # Glibc is not required. + : + 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 + 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}" + fi +fi + +# Server IP. +echo -e "${lightblue}Game Server IP:\t${default}${ip}:${port}" + +# External server IP. +if [ "${extip}" ]; then + if [ "${ip}" != "${extip}" ]; then + echo -e "${lightblue}Internet IP:\t${default}${extip}:${port}" + fi +fi + +# Server password. +if [ "${serverpassword}" ]; then + echo -e "${lightblue}Server password:\t${default}${serverpassword}" +fi + +fn_reload_startparameters +echo -e "${lightblue}Start parameters:${default}" +if [ "${engine}" == "source" ] || [ "${engine}" == "goldsrc" ]; then + echo -e "${executable} ${startparameters} -debug" +elif [ "${engine}" == "quake" ]; then + echo -e "${executable} ${startparameters} -condebug" +else + echo -e "${preexecutable} ${executable} ${startparameters}" +fi +echo -e "" +echo -e "Use debug for identifying server issues only!" +echo -e "Press CTRL+c to drop out of debug mode." +fn_print_warning_nl "If ${selfname} is already running it will be stopped." +echo -e "" +if ! fn_prompt_yn "Continue?" Y; then + exitcode=0 + core_exit.sh +fi + +fn_print_info_nl "Stopping any running servers" +fn_script_log_info "Stopping any running servers" +exitbypass=1 +command_stop.sh +fn_firstcommand_reset +unset exitbypass +fn_print_dots "Starting debug" +fn_script_log_info "Starting debug" +fn_print_ok_nl "Starting debug" + +# Create lockfile. +date '+%s' > "${lockdir}/${selfname}.lock" +echo "${version}" >> "${lockdir}/${selfname}.lock" +echo "${port}" >> "${lockdir}/${selfname}.lock" +fn_script_log_info "Lockfile generated" +fn_script_log_info "${lockdir}/${selfname}.lock" + +if [ "${shortname}" == "av" ]; then + cd "${systemdir}" || exit +else + cd "${executabledir}" || exit +fi + +# Note: do not add double quotes to ${executable} ${startparameters}. +if [ "${engine}" == "source" ] || [ "${engine}" == "goldsrc" ]; then + eval "${executable} ${startparameters} -debug" +elif [ "${engine}" == "quake" ]; then + eval "${executable} ${startparameters} -condebug" +else + # shellcheck disable=SC2086 + eval "${preexecutable} ${executable} ${startparameters}" +fi + +if [ $? -ne 0 ]; then + fn_print_error_nl "Server has stopped: exit code: $?" + fn_script_log_error "Server has stopped: exit code: $?" + fn_print_error_nl "Press ENTER to exit debug mode" + read -r +else + fn_print_ok_nl "Server has stopped" + fn_script_log_pass "Server has stopped" + fn_print_ok_nl "Press ENTER to exit debug mode" + read -r +fi + +fn_lockfile_trap + +fn_print_dots "Stopping debug" +fn_print_ok_nl "Stopping debug" +fn_script_log_info "Stopping debug" + +core_exit.sh diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh new file mode 100644 index 000000000..08d9f031b --- /dev/null +++ b/lgsm/functions/command_details.sh @@ -0,0 +1,41 @@ +#!/bin/bash +# LinuxGSM command_details.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Displays server information. + +commandname="DETAILS" +commandaction="Viewing details" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +# Run checks and gathers details to display. +check.sh +info_distro.sh +info_game.sh +info_messages.sh +if [ "${querymode}" == "2" ] || [ "${querymode}" == "3" ]; then + for queryip in "${queryips[@]}"; do + query_gamedig.sh + if [ "${querystatus}" == "0" ]; then + break + fi + done +fi +fn_info_message_distro +fn_info_message_server_resource +fn_info_message_gameserver_resource +fn_info_message_gameserver +fn_info_message_script +fn_info_message_backup +# Some game servers do not have parms. +if [ "${shortname}" != "jc2" ] && [ "${shortname}" != "dst" ] && [ "${shortname}" != "pz" ] && [ "${engine}" != "renderware" ]; then + fn_info_message_commandlineparms +fi +fn_info_message_ports_edit +fn_info_message_ports +fn_info_message_select_engine +fn_info_message_statusbottom + +core_exit.sh diff --git a/lgsm/functions/command_dev_clear_functions.sh b/lgsm/functions/command_dev_clear_functions.sh new file mode 100644 index 000000000..87c77515d --- /dev/null +++ b/lgsm/functions/command_dev_clear_functions.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# LinuxGSM command_dev_clear_functions.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Deletes the contents of the functions dir. + +commandname="DEV-CLEAR-MODULES" +commandaction="Clearing modules" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +echo -e "=================================" +echo -e "Clear Functions" +echo -e "=================================" +echo -e "" +if fn_prompt_yn "Do you want to delete all functions?" Y; then + rm -rfv "${functionsdir:?}/"* + rm -rfv "${configdirdefault:?}/"* + fn_script_log_info "Cleared modules directory" + fn_script_log_info "Cleared default config directory" +fi + +core_exit.sh diff --git a/lgsm/functions/command_dev_debug.sh b/lgsm/functions/command_dev_debug.sh new file mode 100644 index 000000000..19f16d58e --- /dev/null +++ b/lgsm/functions/command_dev_debug.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# LinuxGSM command_dev_debug.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Dev only: Enables debugging log to be saved to dev-debug.log. + +commandname="DEV-DEBUG" +commandaction="Developer debug" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_reset + +if [ -f "${rootdir}/.dev-debug" ]; then + rm -f "${rootdir:?}/.dev-debug" + fn_print_ok_nl "Disabled dev-debug" + fn_script_log_info "Disabled dev-debug" +else + date '+%s' > "${rootdir}/.dev-debug" + fn_print_ok_nl "Enabled dev-debug" + fn_script_log_info "Enabled dev-debug" +fi + +core_exit.sh diff --git a/lgsm/functions/command_dev_detect_deps.sh b/lgsm/functions/command_dev_detect_deps.sh new file mode 100644 index 000000000..d16b74418 --- /dev/null +++ b/lgsm/functions/command_dev_detect_deps.sh @@ -0,0 +1,231 @@ +#!/bin/bash +# LinuxGSM command_dev_detect_deps.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Detects dependencies the server binary requires. + +commandname="DEV-DETECT-DEPS" +commandaction="Developer detect deps" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +echo -e "=================================" +echo -e "Dependencies Checker" +echo -e "=================================" +echo -e "Checking directory: " +echo -e "${serverfiles}" +if [ "$(command -v eu-readelf 2> /dev/null)" ]; then + readelf=eu-readelf +elif [ "$(command -v readelf 2> /dev/null)" ]; then + readelf=readelf +else + echo -e "readelf/eu-readelf not installed" +fi +files=$(find "${serverfiles}" | wc -l) +find "${serverfiles}" -type f -print0 \ + | while IFS= read -r -d $'\0' line; do + if [ "${readelf}" == "eu-readelf" ]; then + ${readelf} -d "${line}" 2> /dev/null | grep NEEDED | awk '{ print $4 }' | sed 's/\[//g;s/\]//g' >> "${tmpdir}/.depdetect_readelf" + else + ${readelf} -d "${line}" 2> /dev/null | grep NEEDED | awk '{ print $5 }' | sed 's/\[//g;s/\]//g' >> "${tmpdir}/.depdetect_readelf" + fi + echo -n "${i} / ${files}" $'\r' + ((i++)) + done + +sort "${tmpdir}/.depdetect_readelf" | uniq > "${tmpdir}/.depdetect_readelf_uniq" + +touch "${tmpdir}/.depdetect_centos_list" +touch "${tmpdir}/.depdetect_ubuntu_list" +touch "${tmpdir}/.depdetect_debian_list" + +while read -r lib; do + echo -e "${lib}" + libs_array=(libm.so.6 libc.so.6 libtcmalloc_minimal.so.4 libpthread.so.0 libdl.so.2 libnsl.so.1 libgcc_s.so.1 librt.so.1 ld-linux.so.2 libdbus-glib-1.so.2 libgio-2.0.so.0 libglib-2.0.so.0 libGL.so.1 libgobject-2.0.so.0 libnm-glib.so.4 libnm-util.so.2) + for lib_file in "${libs_array[@]}"; do + if [ "${lib}" == "${lib_file}" ]; then + echo -e "glibc.i686" >> "${tmpdir}/.depdetect_centos_list" + echo -e "lib32gcc1" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "lib32gcc1" >> "${tmpdir}/.depdetect_debian_list" + libdetected=1 + fi + done + + libs_array=(libawt.so libjava.so libjli.so libjvm.so libnet.so libnio.so libverify.so) + for lib_file in "${libs_array[@]}"; do + if [ "${lib}" == "${lib_file}" ]; then + echo -e "java-1.8.0-openjdk" >> "${tmpdir}/.depdetect_centos_list" + echo -e "default-jre" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "default-jre" >> "${tmpdir}/.depdetect_debian_list" + libdetected=1 + fi + done + + libs_array=(libtier0.so libtier0_srv.so libvstdlib_srv.so Core.so libvstdlib.so libtier0_s.so Editor.so Engine.so liblua.so libsteam_api.so ld-linux-x86-64.so.2 libPhysX3_x86.so libPhysX3Common_x86.so libPhysX3Cooking_x86.so) + for lib_file in "${libs_array[@]}"; do + # Known shared libs what dont requires dependencies. + if [ "${lib}" == "${lib_file}" ]; then + libdetected=1 + fi + done + + if [ "${lib}" == "libstdc++.so.6" ]; then + echo -e "libstdc++.i686" >> "${tmpdir}/.depdetect_centos_list" + echo -e "libstdc++6:i386" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "libstdc++6:i386" >> "${tmpdir}/.depdetect_debian_list" + libdetected=1 + elif [ "${lib}" == "libstdc++.so.5" ]; then + echo -e "compat-libstdc++-33.i686" >> "${tmpdir}/.depdetect_centos_list" + echo -e "libstdc++5:i386" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "libstdc++5:i386" >> "${tmpdir}/.depdetect_debian_list" + libdetected=1 + elif [ "${lib}" == "libcurl-gnutls.so.4" ]; then + echo -e "libcurl.i686" >> "${tmpdir}/.depdetect_centos_list" + echo -e "libcurl4-gnutls-dev:i386" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "libcurl4-gnutls-dev:i386" >> "${tmpdir}/.depdetect_debian_list" + libdetected=1 + elif [ "${lib}" == "libspeex.so.1" ] || [ "${lib}" == "libspeexdsp.so.1" ]; then + echo -e "speex.i686" >> "${tmpdir}/.depdetect_centos_list" + echo -e "speex:i386" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "speex:i386" >> "${tmpdir}/.depdetect_debian_list" + libdetected=1 + elif [ "${lib}" == "./libSDL-1.2.so.0" ] || [ "${lib}" == "libSDL-1.2.so.0" ]; then + echo -e "SDL.i686" >> "${tmpdir}/.depdetect_centos_list" + echo -e "libsdl1.2debian" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "libsdl1.2debian" >> "${tmpdir}/.depdetect_debian_list" + libdetected=1 + elif [ "${lib}" == "libtbb.so.2" ]; then + echo -e "tbb.i686" >> "${tmpdir}/.depdetect_centos_list" + echo -e "libtbb2" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "libtbb2" >> "${tmpdir}/.depdetect_debian_list" + libdetected=1 + + elif [ "${lib}" == "libXrandr.so.2" ]; then + echo -e "libXrandr" >> "${tmpdir}/.depdetect_centos_list" + echo -e "libxrandr2" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "libxrandr2" >> "${tmpdir}/.depdetect_debian_list" + libdetected=1 + elif [ "${lib}" == "libXext.so.6" ]; then + echo -e "libXext" >> "${tmpdir}/.depdetect_centos_list" + echo -e "libxext6" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "libxext6" >> "${tmpdir}/.depdetect_debian_list" + libdetected=1 + elif [ "${lib}" == "libXtst.so.6" ]; then + echo -e "libXtst" >> "${tmpdir}/.depdetect_centos_list" + echo -e "libxtst6" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "libxtst6" >> "${tmpdir}/.depdetect_debian_list" + libdetected=1 + elif [ "${lib}" == "libpulse.so.0" ]; then + echo -e "pulseaudio-libs" >> "${tmpdir}/.depdetect_centos_list" + echo -e "libpulse0" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "libpulse0" >> "${tmpdir}/.depdetect_debian_list" + libdetected=1 + elif [ "${lib}" == "libopenal.so.1" ]; then + echo -e "" >> "${tmpdir}/.depdetect_centos_list" + echo -e "libopenal1" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "libopenal1" >> "${tmpdir}/.depdetect_debian_list" + libdetected=1 + elif [ "${lib}" == "libgconf-2.so.4" ]; then + echo -e "GConf2" >> "${tmpdir}/.depdetect_centos_list" + echo -e "libgconf2-4" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "libgconf2-4" >> "${tmpdir}/.depdetect_debian_list" + libdetected=1 + elif [ "${lib}" == "libz.so.1" ]; then + echo -e "zlib" >> "${tmpdir}/.depdetect_centos_list" + echo -e "zlib1g" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "zlib1g" >> "${tmpdir}/.depdetect_debian_list" + libdetected=1 + elif [ "${lib}" == "libatk-1.0.so.0" ]; then + echo -e "atk" >> "${tmpdir}/.depdetect_centos_list" + echo -e "libatk1.0-0" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "libatk1.0-0" >> "${tmpdir}/.depdetect_debian_list" + libdetected=1 + elif [ "${lib}" == "libcairo.so.2" ]; then + echo -e "cairo" >> "${tmpdir}/.depdetect_centos_list" + echo -e "libcairo2" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "libcairo2" >> "${tmpdir}/.depdetect_debian_list" + libdetected=1 + elif [ "${lib}" == "libfontconfig.so.1" ]; then + echo -e "fontconfig" >> "${tmpdir}/.depdetect_centos_list" + echo -e "libfontconfig1" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "libfontconfig1" >> "${tmpdir}/.depdetect_debian_list" + libdetected=1 + elif [ "${lib}" == "libfreetype.so.6" ]; then + echo -e "freetype" >> "${tmpdir}/.depdetect_centos_list" + echo -e "libfreetype6" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "libfreetype6" >> "${tmpdir}/.depdetect_debian_list" + libdetected=1 + elif [ "${lib}" == "libc++.so.1" ]; then + echo -e "libcxx" >> "${tmpdir}/.depdetect_centos_list" + echo -e "libc++1" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "libc++1" >> "${tmpdir}/.depdetect_debian_list" + libdetected=1 + fi + + if [ "${libdetected}" != "1" ]; then + unknownlib=1 + echo -e "${lib}" >> "${tmpdir}/.depdetect_unknown" + fi + unset libdetected +done < "${tmpdir}/.depdetect_readelf_uniq" + +sort "${tmpdir}/.depdetect_centos_list" | uniq >> "${tmpdir}/.depdetect_centos_list_uniq" +sort "${tmpdir}/.depdetect_ubuntu_list" | uniq >> "${tmpdir}/.depdetect_ubuntu_list_uniq" +sort "${tmpdir}/.depdetect_debian_list" | uniq >> "${tmpdir}/.depdetect_debian_list_uniq" +if [ "${unknownlib}" == "1" ]; then + sort "${tmpdir}/.depdetect_unknown" | uniq >> "${tmpdir}/.depdetect_unknown_uniq" +fi + +awk -vORS='' '{ print $1,$2 }' "${tmpdir}/.depdetect_centos_list_uniq" > "${tmpdir}/.depdetect_centos_line" +awk -vORS='' '{ print $1,$2 }' "${tmpdir}/.depdetect_ubuntu_list_uniq" > "${tmpdir}/.depdetect_ubuntu_line" +awk -vORS='' '{ print $1,$2 }' "${tmpdir}/.depdetect_debian_list_uniq" > "${tmpdir}/.depdetect_debian_line" +echo -e "" +echo -e "" +echo -e "Required Dependencies" +echo -e "=================================" +echo -e "${executable}" +echo -e "" +echo -e "CentOS" +echo -e "=================================" +cat "${tmpdir}/.depdetect_centos_line" +echo -e "" +echo -e "" +echo -e "Ubuntu" +echo -e "=================================" +cat "${tmpdir}/.depdetect_ubuntu_line" +echo -e "" +echo -e "" +echo -e "Debian" +echo -e "=================================" +cat "${tmpdir}/.depdetect_debian_line" +echo -e "" +if [ "${unknownlib}" == "1" ]; then + echo -e "" + echo -e "Unknown shared Library" + echo -e "=================================" + cat "${tmpdir}/.depdetect_unknown" +fi +echo -e "" +echo -e "Required Librarys" +echo -e "=================================" +sort "${tmpdir}/.depdetect_readelf" | uniq +echo -en "\n" +rm -f "${tmpdir:?}/.depdetect_centos_line" +rm -f "${tmpdir:?}/.depdetect_centos_list" +rm -f "${tmpdir:?}/.depdetect_centos_list_uniq" + +rm -f "${tmpdir:?}/.depdetect_debian_line" +rm -f "${tmpdir:?}/.depdetect_debian_list" +rm -f "${tmpdir:?}/.depdetect_debian_list_uniq" + +rm -f "${tmpdir:?}/.depdetect_ubuntu_line" +rm -f "${tmpdir:?}/.depdetect_ubuntu_list" +rm -f "${tmpdir:?}/.depdetect_ubuntu_list_uniq" + +rm -f "${tmpdir:?}/.depdetect_readelf" +rm -f "${tmpdir:?}/.depdetect_readelf_uniq" +rm -f "${tmpdir:?}/.depdetect_unknown" +rm -f "${tmpdir:?}/.depdetect_unknown_uniq" + +core_exit.sh diff --git a/lgsm/functions/command_dev_detect_glibc.sh b/lgsm/functions/command_dev_detect_glibc.sh new file mode 100644 index 000000000..73280e55d --- /dev/null +++ b/lgsm/functions/command_dev_detect_glibc.sh @@ -0,0 +1,92 @@ +#!/bin/bash +# LinuxGSM command_dev_detect_glibc.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Automatically detects the version of GLIBC that is required. +# Can check a file or directory recursively. + +commandname="DEV-DETECT-GLIBC" +commandaction="Developer detect glibc" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +echo -e "=================================" +echo -e "glibc Requirements Checker" +echo -e "=================================" + +if [ ! "$(command -v objdump)" ]; then + fn_print_failure_nl "objdump is missing" + fn_script_log_fatal "objdump is missing" + core_exit.sh +fi + +if [ -z "${serverfiles}" ]; then + dir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") +fi + +if [ -d "${serverfiles}" ]; then + echo -e "Checking directory: " + echo -e "${serverfiles}" +elif [ -f "${serverfiles}" ]; then + echo -e "Checking file: " + echo -e "${serverfiles}" +fi +echo -e "" + +glibc_check_dir_array=(steamcmddir serverfiles) +for glibc_check_var in "${glibc_check_dir_array[@]}"; do + if [ "${glibc_check_var}" == "serverfiles" ]; then + glibc_check_dir="${serverfiles}" + glibc_check_name="${gamename}" + elif [ "${glibc_check_var}" == "steamcmddir" ]; then + glibc_check_dir="${steamcmddir}" + glibc_check_name="SteamCMD" + fi + + if [ -d "${glibc_check_dir}" ]; then + glibc_check_files=$(find "${glibc_check_dir}" | wc -l) + find "${glibc_check_dir}" -type f -print0 \ + | while IFS= read -r -d $'\0' line; do + glibcversion=$(objdump -T "${line}" 2> /dev/null | grep -oP "GLIBC[^ ]+" | grep -v GLIBCXX | sort | uniq | sort -r --version-sort | head -n 1) + if [ "${glibcversion}" ]; then + echo -e "${glibcversion}: ${line}" >> "${tmpdir}/detect_glibc_files_${glibc_check_var}.tmp" + fi + objdump -T "${line}" 2> /dev/null | grep -oP "GLIBC[^ ]+" >> "${tmpdir}/detect_glibc_${glibc_check_var}.tmp" + echo -n "${i} / ${glibc_check_files}" $'\r' + ((i++)) + done + echo -e "" + echo -e "" + echo -e "${glibc_check_name} glibc Requirements" + echo -e "=================================" + if [ -f "${tmpdir}/detect_glibc_files_${glibc_check_var}.tmp" ]; then + echo -e "Required glibc" + 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" + cat "${tmpdir}/detect_glibc_files_${glibc_check_var}.tmp" + echo -e "" + echo -e "All required GLIBC versions" + cat "${tmpdir}/detect_glibc_${glibc_check_var}.tmp" | sort | uniq | sort -r --version-sort + rm -f "${tmpdir:?}/detect_glibc_${glibc_check_var}.tmp" + rm -f "${tmpdir:?}/detect_glibc_files_${glibc_check_var}.tmp" + else + fn_print_information_nl "glibc is not required" + fi + else + fn_print_information_nl "${glibc_check_name} is not installed" + fi +done +echo -e "" +echo -e "Final glibc Requirement" +echo -e "=================================" +if [ -f "${tmpdir}/detect_glibc_highest.tmp" ]; then + cat "${tmpdir}/detect_glibc_highest.tmp" | sort | uniq | sort -r --version-sort | head -1 + rm -f "${tmpdir:?}/detect_glibc_highest.tmp" +else + fn_print_information_nl "glibc is not required" +fi + +core_exit.sh diff --git a/lgsm/functions/command_dev_detect_ldd.sh b/lgsm/functions/command_dev_detect_ldd.sh new file mode 100644 index 000000000..43630d4e9 --- /dev/null +++ b/lgsm/functions/command_dev_detect_ldd.sh @@ -0,0 +1,61 @@ +#!/bin/bash +# LinuxGSM command_dev_detect_ldd.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Automatically detects required deps using ldd. +# Can check a file or directory recursively. + +commandname="DEV-DETECT-LDD" +commandaction="Developer detect ldd" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +echo -e "=================================" +echo -e "Shared Object dependencies Checker" +echo -e "=================================" + +if [ -z "${serverfiles}" ]; then + dir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") +fi + +if [ -d "${serverfiles}" ]; then + echo -e "Checking directory: " + echo -e "${serverfiles}" +elif [ -f "${serverfiles}" ]; then + echo -e "Checking file: " + echo -e "${serverfiles}" +fi +echo -e "" +touch "${tmpdir}/detect_ldd.tmp" +touch "${tmpdir}/detect_ldd_not_found.tmp" + +files=$(find "${serverfiles}" | wc -l) +find "${serverfiles}" -type f -print0 \ + | while IFS= read -r -d $'\0' line; do + if ldd "${line}" 2> /dev/null | grep -v "not a dynamic executable"; then + echo -e "${line}" >> "${tmpdir}/detect_ldd.tmp" + ldd "${line}" 2> /dev/null | grep -v "not a dynamic executable" >> "${tmpdir}/detect_ldd.tmp" + if ldd "${line}" 2> /dev/null | grep -v "not a dynamic executable" | grep "not found"; then + echo -e "${line}" >> "${tmpdir}/detect_ldd_not_found.tmp" + ldd "${line}" 2> /dev/null | grep -v "not a dynamic executable" | grep "not found" >> "${tmpdir}/detect_ldd_not_found.tmp" + fi + fi + echo -n "$i / $files" $'\r' + ((i++)) + done +echo -e "" +echo -e "" +echo -e "All" +echo -e "=================================" +cat "${tmpdir}/detect_ldd.tmp" + +echo -e "" +echo -e "Not Found" +echo -e "=================================" +cat "${tmpdir}/detect_ldd_not_found.tmp" + +rm -f "${tmpdir:?}/detect_ldd.tmp" +rm -f "${tmpdir:?}/detect_ldd_not_found.tmp" + +core_exit.sh diff --git a/lgsm/functions/command_dev_query_raw.sh b/lgsm/functions/command_dev_query_raw.sh new file mode 100644 index 000000000..26884b259 --- /dev/null +++ b/lgsm/functions/command_dev_query_raw.sh @@ -0,0 +1,280 @@ +#!/bin/bash +# LinuxGSM command_dev_query_raw.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Raw gamedig output of the server. + +commandname="DEV-QUERY-RAW" +commandaction="Developer query raw" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +check.sh +info_game.sh +info_distro.sh +info_messages.sh + +echo -e "" +echo -e "${lightgreen}Query IP Addresses${default}" +echo -e "==================================================================" +echo -e "" +for queryip in "${queryips[@]}"; do + echo -e "${queryip}" +done +echo -e "" +echo -e "${lightgreen}Game Server Ports${default}" +echo -e "==================================================================" +{ + echo -e "${lightblue}Port Name \tPort Number \tStatus \tTCP \tUDP${default}" + if [ -v port ]; then + echo -e "Game: \t${port} \t$(ss -tupl | grep -c ${port}) \t$(ss -tupl | grep ${port} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${port} | grep udp | awk '{ print $2 }')" + else + echo -e "Game:" + fi + if [ "${shortname}" == "rw" ]; then + if [ -v port2 ]; then + echo -e "Game+1: \t${port2} \t$(ss -tupl | grep -c ${port}) \t$(ss -tupl | grep ${port2} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${port2} | grep udp | awk '{ print $2 }')" + else + echo -e "Game+1:" + fi + + if [ -v port3 ]; then + echo -e "Game+2: \t${port3} \t$(ss -tupl | grep -c ${port}) \t$(ss -tupl | grep ${port3} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${port3} | grep udp | awk '{ print $2 }')" + else + echo -e "Game+2:" + fi + + if [ -v port4 ]; then + echo -e "Game+3: \t${port4} \t$(ss -tupl | grep -c ${port}) \t$(ss -tupl | grep ${port4} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${port4} | grep udp | awk '{ print $2 }')" + else + echo -e "Game+3:" + fi + fi + + if [ -v port401 ]; then + echo -e "Game+400: \t${port401} \t$(ss -tupl | grep -c ${port401}) \t$(ss -tupl | grep ${port401} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${port401} | grep udp | awk '{ print $2 }')" + else + echo -e "Game+400:" + fi + + if [ -v portipv6 ]; then + echo -e "Game ipv6: \t${portipv6} \t$(ss -tupl | grep -c ${portipv6}) \t$(ss -tupl | grep ${portipv6} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${portipv6} | grep udp | awk '{ print $2 }')" + else + echo -e "Game ipv6:" + fi + + if [ -v queryport ]; then + echo -e "Query: \t${queryport} \t$(ss -tupl | grep -c ${queryport}) \t$(ss -tupl | grep ${queryport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${queryport} | grep udp | awk '{ print $2 }')" + else + echo -e "Query:" + fi + + if [ -v httpport ]; then + echo -e "HTTP: \t${httpport} \t$(ss -tupl | grep -c ${httpport}) \t$(ss -tupl | grep ${httpport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${httpport} | grep udp | awk '{ print $2 }')" + else + echo -e "HTTP:" + fi + + if [ -v httpqueryport ]; then + echo -e "HTTP Query: \t${httpqueryport} \t$(ss -tupl | grep -c ${httpqueryport}) \t$(ss -tupl | grep ${httpqueryport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${httpqueryport} | grep udp | awk '{ print $2 }')" + else + echo -e "HTTP Query:" + fi + + if [ -v webadminport ]; then + echo -e "Web Admin: \t${webadminport} \t$(ss -tupl | grep -c ${webadminport}) \t$(ss -tupl | grep ${webadminport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${webadminport} | grep udp | awk '{ print $2 }')" + else + echo -e "Web Admin:" + fi + + if [ -v 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 + echo -e "Client:" + fi + + if [ -v rconport ]; then + echo -e "RCON: \t${rconport} \t$(ss -tupl | grep -c ${rconport}) \t$(ss -tupl | grep ${rconport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${rconport} | grep udp | awk '{ print $2 }')" + else + echo -e "RCON:" + fi + + if [ -v rawport ]; then + echo -e "RAW UDP Socket: \t${rawport} \t$(ss -tupl | grep -c ${rawport}) \t$(ss -tupl | grep ${rawport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${rawport} | grep udp | awk '{ print $2 }')" + else + echo -e "RAW UDP Socket:" + fi + + if [ -v masterport ]; then + echo -e "Game: Master: \t${masterport} \t$(ss -tupl | grep -c ${masterport}) \t$(ss -tupl | grep ${masterport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${masterport} | grep udp | awk '{ print $2 }')" + else + echo -e "Game: Master:" + fi + + if [ -v steamport ]; then + echo -e "Steam: \t${steamport} \t$(ss -tupl | grep -c ${steamport}) \t$(ss -tupl | grep ${steamport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${steamport} | grep udp | awk '{ print $2 }')" + else + echo -e "Steam:" + fi + + if [ -v steamauthport ]; then + echo -e "Steam: Auth: \t${steamauthport} \t$(ss -tupl | grep -c ${steamauthport}) \t$(ss -tupl | grep ${steamauthport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${steamauthport} | grep udp | awk '{ print $2 }')" + else + echo -e "Steam: Auth:" + fi + + if [ -v steammasterport ]; then + echo -e "Steam: Master: \t${steammasterport} \t$(ss -tupl | grep -c ${steammasterport}) \t$(ss -tupl | grep ${steammasterport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${steammasterport} | grep udp | awk '{ print $2 }')" + else + echo -e "Steam: Master:" + fi + + if [ -v steamqueryport ]; then + echo -e "Steam: Query: \t${steamqueryport} \t$(ss -tupl | grep -c ${steamqueryport}) \t$(ss -tupl | grep ${steamqueryport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${steamqueryport} | grep udp | awk '{ print $2 }')" + else + echo -e "Steam: Query:" + fi + if [ -v beaconport ]; then + echo -e "Beacon: \t${beaconport} \t$(ss -tupl | grep -c ${beaconport}) \t$(ss -tupl | grep ${beaconport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${beaconport} | grep udp | awk '{ print $2 }')" + else + echo -e "Beacon:" + fi + + if [ -v appport ]; then + echo -e "App: \t${appport} \t$(ss -tupl | grep -c ${appport}) \t$(ss -tupl | grep ${appport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${appport} | grep udp | awk '{ print $2 }')" + else + echo -e "App:" + fi + + if [ -v telnetport ]; then + echo -e "Telnet: \t${telnetport} \t$(ss -tupl | grep -c ${telnetport}) \t$(ss -tupl | grep ${telnetport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${telnetport} | grep udp | awk '{ print $2 }')" + else + echo -e "Telnet:" + fi + + if [ -v sourcetvport ]; then + echo -e "SourceTV: \t${sourcetvport} \t$(ss -tupl | grep -c ${sourcetvport}) \t$(ss -tupl | grep ${sourcetvport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${sourcetvport} | grep udp | awk '{ print $2 }')" + else + echo -e "SourceTV:" + fi + + if [ -v fileport ]; then + echo -e "File: \t${fileport} \t$(ss -tupl | grep -c ${fileport}) \t$(ss -tupl | grep ${fileport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${fileport} | grep udp | awk '{ print $2 }')" + else + echo -e "File:" + fi + + if [ -v udplinkport ]; then + echo -e "UDP Link: \t${udplinkport} \t$(ss -tupl | grep -c ${udplinkport}) \t$(ss -tupl | grep ${udplinkport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${udplinkport} | grep udp | awk '{ print $2 }')" + else + echo -e "UDP Link:" + fi + + if [ -v voiceport ]; then + echo -e "Voice: \t${voiceport} \t$(ss -tupl | grep -c ${voiceport}) \t$(ss -tupl | grep ${voiceport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${voiceport} | grep udp | awk '{ print $2 }')" + else + echo -e "Voice:" + fi + + if [ -v voiceunusedport ]; then + echo -e "Voice (Unused): \t${voiceunusedport} \t$(ss -tupl | grep -c ${voiceunusedport}) \t$(ss -tupl | grep ${voiceunusedport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${voiceunusedport} | grep udp | awk '{ print $2 }')" + else + echo -e "Voice (Unused):" + fi + + if [ -v battleeyeport ]; then + echo -e "BattleEye: \t${battleeyeport} \t$(ss -tupl | grep -c ${battleeyeport}) \t$(ss -tupl | grep ${battleeyeport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${battleeyeport} | grep udp | awk '{ print $2 }')" + else + echo -e "BattleEye:" + fi + + if [ -v statsport ]; then + echo -e "Stats: \t${battleeyeport} \t$(ss -tupl | grep -c ${statsport}) \t$(ss -tupl | grep ${statsport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${statsport} | grep udp | awk '{ print $2 }')" + else + echo -e "Stats:" + fi + +} | column -s $'\t' -t +echo -e "" +echo -e "${lightgreen}SS Output${default}" +echo -e "=================================" +fn_info_message_ports +echo -e "" +echo -e "${lightgreen}Query Port - Raw Output${default}" +echo -e "==================================================================" +echo -e "" +echo -e "PORT: ${port}" +echo -e "QUERY PORT: ${queryport}" +echo -e "" +echo -e "${lightgreen}Gamedig Raw Output${default}" +echo -e "=================================" +echo -e "" +if [ ! "$(command -v gamedig 2> /dev/null)" ]; then + fn_print_failure_nl "gamedig not installed" +fi +if [ ! "$(command -v jq 2> /dev/null)" ]; then + fn_print_failure_nl "jq not installed" +fi +for queryip in "${queryips[@]}"; do + query_gamedig.sh + echo -e "${gamedigcmd}" + echo"" + echo "${gamedigraw}" | jq +done +echo -e "" +echo -e "${lightgreen}gsquery Raw Output${default}" +echo -e "=================================" +echo -e "" +for queryip in "${queryips[@]}"; do + echo -e "./query_gsquery.py -a \"${queryip}\" -p \"${queryport}\" -e \"${querytype}\"" + echo -e "" + if [ ! -f "${functionsdir}/query_gsquery.py" ]; then + fn_fetch_file_github "lgsm/functions" "query_gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nohash" + fi + "${functionsdir}"/query_gsquery.py -a "${queryip}" -p "${queryport}" -e "${querytype}" +done +echo -e "" +echo -e "${lightgreen}TCP Raw Output${default}" +echo -e "=================================" +echo -e "" +for queryip in "${queryips[@]}"; do + echo -e "bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${queryport}''" + echo -e "" + timeout 3 bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${queryport}'' + querystatus="$?" + echo -e "" + if [ "${querystatus}" == "0" ]; then + echo -e "TCP query PASS" + else + echo -e "TCP query FAIL" + fi +done +echo -e "" +echo -e "${lightgreen}Game Port - Raw Output${default}" +echo -e "==================================================================" +echo -e "" +echo -e "${lightgreen}TCP Raw Output${default}" +echo -e "=================================" +echo -e "" +for queryip in "${queryips[@]}"; do + echo -e "bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${port}''" + echo -e "" + timeout 3 bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${port}'' + querystatus="$?" + echo -e "" + if [ "${querystatus}" == "0" ]; then + echo -e "TCP query PASS" + else + echo -e "TCP query FAIL" + fi +done +echo -e "" +echo -e "${lightgreen}Steam Master Server Response${default}" +echo -e "==================================================================" +echo -e "" +echo -e "Response: ${displaymasterserver}" +echo -e "" + +exitcode=0 +core_exit.sh diff --git a/lgsm/functions/command_donate.sh b/lgsm/functions/command_donate.sh new file mode 100644 index 000000000..f00a4d702 --- /dev/null +++ b/lgsm/functions/command_donate.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# LinuxGSM command_donate.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Shows ways to donate. + +commandname="DONATE" +commandaction="Donate" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +fn_print_ascii_logo +echo -e "${lightyellow}Support LinuxGSM${default}" +echo -e "=================================" +echo -e "" +echo -e "Been using LinuxGSM?" +echo -e "Consider donating to support development." +echo -e "" +echo -e "* ${lightblue}Patreon:${default} https://linuxgsm.com/patreon" +echo -e "* ${lightblue}GitHub:${default} https://github.com/sponsors/dgibbs64" +echo -e "* ${lightblue}PayPal:${default} https://linuxgsm.com/paypal" +echo -e "" +echo -e "LinuxGSM est. 2012" + +core_exit.sh diff --git a/lgsm/functions/command_fastdl.sh b/lgsm/functions/command_fastdl.sh new file mode 100644 index 000000000..78abd650a --- /dev/null +++ b/lgsm/functions/command_fastdl.sh @@ -0,0 +1,442 @@ +#!/bin/bash +# LinuxGSM command_fastdl.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Creates a FastDL directory. + +commandname="FASTDL" +commandaction="Fastdl" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +check.sh + +# Directories. +if [ -z "${webdir}" ]; then + webdir="${rootdir}/public_html" +fi +fastdldir="${webdir}/fastdl" +addonsdir="${systemdir}/addons" +# Server lua autorun dir, used to autorun lua on client connect to the server. +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_fatal "bzip2 is not installed" + core_exit.sh +fi + +# Header +fn_print_header +echo -e "More info: https://docs.linuxgsm.com/commands/fastdl" +echo -e "" + +# Prompts user for FastDL creation settings. +echo -e "${commandaction} setup" +echo -e "=================================" + +# Prompt for clearing old files if directory was already here. +if [ -d "${fastdldir}" ]; then + fn_print_warning_nl "FastDL directory already exists." + echo -e "${fastdldir}" + echo -e "" + if fn_prompt_yn "Overwrite existing directory?" Y; then + fn_script_log_info "Overwrite existing directory: YES" + else + core_exit.sh + fi +fi + +# Garry's Mod Specific. +if [ "${shortname}" == "gmod" ]; then + # Prompt for download enforcer, which is using a .lua addfile resource generator. + if fn_prompt_yn "Force clients to download files?" Y; then + luaresource="on" + fn_script_log_info "Force clients to download files: YES" + else + luaresource="off" + fn_script_log_info "Force clients to download filesr: NO" + fi +fi + +# Clears any fastdl directory content. +fn_clear_old_fastdl() { + # Clearing old FastDL. + if [ -d "${fastdldir}" ]; then + echo -en "clearing existing FastDL directory ${fastdldir}..." + rm -rf "${fastdldir:?}" + exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "Clearing existing FastDL directory ${fastdldir}" + core_exit.sh + else + fn_print_ok_eol_nl + fn_script_log_pass "Clearing existing FastDL directory ${fastdldir}" + fi + fi +} + +fn_fastdl_dirs() { + # Check and create directories. + if [ ! -d "${webdir}" ]; then + echo -en "creating web directory ${webdir}..." + mkdir -p "${webdir}" + exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "Creating web directory ${webdir}" + core_exit.sh + else + fn_print_ok_eol_nl + fn_script_log_pass "Creating web directory ${webdir}" + fi + fi + if [ ! -d "${fastdldir}" ]; then + echo -en "creating fastdl directory ${fastdldir}..." + mkdir -p "${fastdldir}" + exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "Creating fastdl directory ${fastdldir}" + core_exit.sh + else + fn_print_ok_eol_nl + fn_script_log_pass "Creating fastdl directory ${fastdldir}" + fi + fi +} + +# 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 + ) + + local bytes="${1}" + local precision="${2}" + + if [[ "${bytes}" == "1" ]]; then + echo -e "1 byte" + else + for item in "${abbrevs[@]}"; do + local factor="${item%:*}" + local abbrev="${item#*:}" + if [[ "${bytes}" -ge "${factor}" ]]; then + size=$(bc -l <<< "${bytes} / ${factor}") + printf "%.*f %s\n" "${precision}" "${size}" "${abbrev}" + break + fi + done + fi +} + +# Provides info about the fastdl directory content and prompts for confirmation. +fn_fastdl_preview() { + # Remove any file list. + if [ -f "${tmpdir}/fastdl_files_to_compress.txt" ]; then + rm -f "${tmpdir:?}/fastdl_files_to_compress.txt" + fi + echo -e "analysing required files" + fn_script_log_info "Analysing required files" + # Garry's Mod + if [ "${shortname}" == "gmod" ]; then + cd "${systemdir}" || exit + allowed_extentions_array=("*.ain" "*.bsp" "*.mdl" "*.mp3" "*.ogg" "*.otf" "*.pcf" "*.phy" "*.png" "*.svg" "*.vtf" "*.vmt" "*.vtx" "*.vvd" "*.ttf" "*.wav") + for allowed_extention in "${allowed_extentions_array[@]}"; do + fileswc=0 + tput sc + while read -r ext; do + ((fileswc++)) + tput rc + tput el + echo -e "gathering ${allowed_extention} : ${fileswc}..." + echo -e "${ext}" >> "${tmpdir}/fastdl_files_to_compress.txt" + done < <(find . -type f -iname "${allowed_extention}") + if [ ${fileswc} != 0 ]; then + fn_print_ok_eol_nl + else + fn_print_info_eol_nl + fi + done + # Source engine + else + fastdl_directories_array=("maps" "materials" "models" "particles" "sound" "resources") + for directory in "${fastdl_directories_array[@]}"; do + if [ -d "${systemdir}/${directory}" ]; then + if [ "${directory}" == "maps" ]; then + local allowed_extentions_array=("*.bsp" "*.ain" "*.nav" "*.jpg" "*.txt") + elif [ "${directory}" == "materials" ]; then + local allowed_extentions_array=("*.vtf" "*.vmt" "*.vbf" "*.png" "*.svg") + elif [ "${directory}" == "models" ]; then + local allowed_extentions_array=("*.vtx" "*.vvd" "*.mdl" "*.phy" "*.jpg" "*.png" "*.vmt" "*.vtf") + elif [ "${directory}" == "particles" ]; then + local allowed_extentions_array=("*.pcf") + elif [ "${directory}" == "sound" ]; then + local allowed_extentions_array=("*.wav" "*.mp3" "*.ogg") + fi + for allowed_extention in "${allowed_extentions_array[@]}"; do + fileswc=0 + tput sc + while read -r ext; do + ((fileswc++)) + tput rc + tput el + echo -e "gathering ${directory} ${allowed_extention} : ${fileswc}..." + echo -e "${ext}" >> "${tmpdir}/fastdl_files_to_compress.txt" + done < <(find "${systemdir}/${directory}" -type f -iname "${allowed_extention}") + tput rc + tput el + echo -e "gathering ${directory} ${allowed_extention} : ${fileswc}..." + if [ ${fileswc} != 0 ]; then + fn_print_ok_eol_nl + else + fn_print_info_eol_nl + fi + done + fi + done + fi + if [ -f "${tmpdir}/fastdl_files_to_compress.txt" ]; then + echo -e "calculating total file size..." + fn_sleep_time + totalfiles=$(wc -l < "${tmpdir}/fastdl_files_to_compress.txt") + # Calculates total file size. + while read -r dufile; do + filesize=$(stat -c %s "${dufile}") + filesizetotal=$((filesizetotal + filesize)) + exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "Calculating total file size." + core_exit.sh + fi + done < "${tmpdir}/fastdl_files_to_compress.txt" + else + fn_print_fail_eol_nl "generating file list" + fn_script_log_fatal "Generating file list." + core_exit.sh + fi + echo -e "about to compress ${totalfiles} files, total size $(fn_human_readable_file_size ${filesizetotal} 0)" + 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" + core_exit.sh + fi +} + +# Builds Garry's Mod fastdl directory content. +fn_fastdl_gmod() { + cd "${systemdir}" || exit + for allowed_extention in "${allowed_extentions_array[@]}"; do + fileswc=0 + tput sc + while read -r fastdlfile; do + ((fileswc++)) + tput rc + tput el + echo -e "copying ${allowed_extention} : ${fileswc}..." + cp --parents "${fastdlfile}" "${fastdldir}" + exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "Copying ${fastdlfile} > ${fastdldir}" + core_exit.sh + else + fn_script_log_pass "Copying ${fastdlfile} > ${fastdldir}" + fi + done < <(find . -type f -iname "${allowed_extention}") + if [ ${fileswc} != 0 ]; then + fn_print_ok_eol_nl + fi + done + # Correct addons directory structure for FastDL. + if [ -d "${fastdldir}/addons" ]; then + echo -en "updating addons file structure..." + cp -Rf "${fastdldir}"/addons/*/* "${fastdldir}" + exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "Updating addons file structure" + core_exit.sh + else + fn_print_ok_eol_nl + fn_script_log_pass "Updating addons file structure" + fi + # Clear addons directory in fastdl. + echo -en "clearing addons dir from fastdl dir..." + fn_sleep_time + rm -rf "${fastdldir:?}/addons" + exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "Clearing addons dir from fastdl dir" + core_exit.sh + else + fn_print_ok_eol_nl + fn_script_log_pass "Clearing addons dir from fastdl dir" + fi + fi + # Correct content that may be into a lua directory by mistake like some darkrpmodification addons. + if [ -d "${fastdldir}/lua" ]; then + echo -en "correcting DarkRP files..." + fn_sleep_time + cp -Rf "${fastdldir}/lua/"* "${fastdldir}" + exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "Correcting DarkRP files" + core_exit.sh + else + fn_print_ok_eol_nl + fn_script_log_pass "Correcting DarkRP files" + fi + fi + if [ -f "${tmpdir}/fastdl_files_to_compress.txt" ]; then + totalfiles=$(wc -l < "${tmpdir}/fastdl_files_to_compress.txt") + # Calculates total file size. + while read -r dufile; do + filesize=$(du -b "${dufile}" | awk '{ print $1 }') + filesizetotal=$((filesizetotal + filesize)) + done < "${tmpdir}/fastdl_files_to_compress.txt" + fi +} + +fn_fastdl_source() { + for directory in "${fastdl_directories_array[@]}"; do + if [ -d "${systemdir}/${directory}" ]; then + if [ "${directory}" == "maps" ]; then + local allowed_extentions_array=("*.bsp" "*.ain" "*.nav" "*.jpg" "*.txt") + elif [ "${directory}" == "materials" ]; then + local allowed_extentions_array=("*.vtf" "*.vmt" "*.vbf" "*.png" "*.svg") + elif [ "${directory}" == "models" ]; then + local allowed_extentions_array=("*.vtx" "*.vvd" "*.mdl" "*.phy" "*.jpg" "*.png") + elif [ "${directory}" == "particles" ]; then + local allowed_extentions_array=("*.pcf") + elif [ "${directory}" == "sound" ]; then + local allowed_extentions_array=("*.wav" "*.mp3" "*.ogg") + fi + for allowed_extention in "${allowed_extentions_array[@]}"; do + fileswc=0 + tput sc + while read -r fastdlfile; do + ((fileswc++)) + tput rc + tput el + echo -e "copying ${directory} ${allowed_extention} : ${fileswc}..." + fn_sleep_time + # get relative path of file in the dir + tmprelfilepath="${fastdlfile#"${systemdir}/"}" + copytodir="${tmprelfilepath%/*}" + # create relative path for fastdl + if [ ! -d "${fastdldir}/${copytodir}" ]; then + mkdir -p "${fastdldir}/${copytodir}" + fi + cp "${fastdlfile}" "${fastdldir}/${copytodir}" + exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "Copying ${fastdlfile} > ${fastdldir}/${copytodir}" + core_exit.sh + else + fn_script_log_pass "Copying ${fastdlfile} > ${fastdldir}/${copytodir}" + fi + done < <(find "${systemdir}/${directory}" -type f -iname "${allowed_extention}") + if [ ${fileswc} != 0 ]; then + fn_print_ok_eol_nl + fi + done + fi + done +} + +# Builds the fastdl directory content. +fn_fastdl_build() { + # Copy all needed files for FastDL. + echo -e "copying files to ${fastdldir}" + fn_script_log_info "Copying files to ${fastdldir}" + if [ "${shortname}" == "gmod" ]; then + fn_fastdl_gmod + fn_fastdl_gmod_dl_enforcer + else + fn_fastdl_source + fi +} + +# Generate lua file that will force download any file into the FastDL directory. +fn_fastdl_gmod_dl_enforcer() { + # Clear old lua file. + if [ -f "${luafastdlfullpath}" ]; then + echo -en "removing existing download enforcer: ${luafastdlfile}..." + rm -f "${luafastdlfullpath:?}" + exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "Removing existing download enforcer ${luafastdlfullpath}" + core_exit.sh + else + fn_print_ok_eol_nl + fn_script_log_pass "Removing existing download enforcer ${luafastdlfullpath}" + fi + fi + # Generate new one if user said yes. + if [ "${luaresource}" == "on" ]; then + echo -en "creating new download enforcer: ${luafastdlfile}..." + touch "${luafastdlfullpath}" + # Read all filenames and put them into a lua file at the right path. + while read -r line; do + echo -e "resource.AddFile( \"${line}\" )" >> "${luafastdlfullpath}" + done < <(find "${fastdldir:?}" \( -type f ! -name "*.bz2" \) -printf '%P\n') + exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "Creating new download enforcer ${luafastdlfullpath}" + core_exit.sh + else + fn_print_ok_eol_nl + fn_script_log_pass "Creating new download enforcer ${luafastdlfullpath}" + fi + fi +} + +# Compresses FastDL files using bzip2. +fn_fastdl_bzip2() { + while read -r filetocompress; do + echo -en "\r\033[Kcompressing ${filetocompress}..." + bzip2 -f "${filetocompress}" + exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "Compressing ${filetocompress}" + core_exit.sh + else + fn_script_log_pass "Compressing ${filetocompress}" + fi + done < <(find "${fastdldir:?}" \( -type f ! -name "*.bz2" \)) + fn_print_ok_eol_nl +} + +# Run functions. +fn_fastdl_preview +fn_clear_old_fastdl +fn_fastdl_dirs +fn_fastdl_build +fn_fastdl_bzip2 +# Finished message. +echo -e "FastDL files are located in:" +echo -e "${fastdldir}" +echo -e "FastDL completed" +fn_script_log_info "FastDL completed" + +core_exit.sh diff --git a/lgsm/functions/command_install.sh b/lgsm/functions/command_install.sh new file mode 100644 index 000000000..19dc59c7e --- /dev/null +++ b/lgsm/functions/command_install.sh @@ -0,0 +1,52 @@ +#!/bin/bash +# LinuxGSM command_install.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Overall function for the installer. + +commandname="INSTALL" +commandaction="Installing" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +check.sh +if [ "$(whoami)" == "root" ] && [ ! -f /.dockerenv ]; then + check_deps.sh +else + install_header.sh + install_server_dir.sh + install_logs.sh + check_deps.sh + installflag=1 + # Download and install. + if [ "${shortname}" == "ut2k4" ]; then + install_server_files.sh + install_ut2k4_key.sh + elif [ -z "${appid}" ]; then + install_server_files.sh + elif [ "${appid}" ]; then + install_steamcmd.sh + install_server_files.sh + fi + + # Configuration. + install_config.sh + if [ -v gslt ]; then + install_gslt.sh + elif [ "${shortname}" == "dst" ]; then + install_dst_token.sh + elif [ "${shortname}" == "squad" ]; then + install_squad_license.sh + elif [ "${shortname}" == "ts3" ]; then + install_ts3db.sh + elif [ "${shortname}" == "mta" ]; then + command_install_resources_mta.sh + fn_firstcommand_reset + fi + + fix.sh + install_stats.sh + install_complete.sh +fi +core_exit.sh diff --git a/lgsm/functions/command_install_resources_mta.sh b/lgsm/functions/command_install_resources_mta.sh new file mode 100644 index 000000000..daf039551 --- /dev/null +++ b/lgsm/functions/command_install_resources_mta.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# LinuxGSM command_install_resources_mta.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Installs the default resources for Multi Theft Auto. + +commandname="DEFAULT-RESOURCES" +commandaction="Default Resources" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +fn_install_resources() { + echo -e "" + echo -e "${lightyellow}Installing Default Resources${default}" + echo -e "=================================" + fn_fetch_file "http://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip" "" "" "" "${tmpdir}" "mtasa-resources-latest.zip" "nochmodx" "norun" "noforce" "nohash" + fn_dl_extract "${tmpdir}" "mtasa-resources-latest.zip" "${resourcesdir}" + echo -e "Default Resources Installed." +} + +fn_print_header + +if [ -z "${autoinstall}" ]; then + fn_print_warning_nl "Installing the default resources with existing resources may cause issues." + if fn_prompt_yn "Do you want to install MTA default resources?" Y; then + fn_install_resources + fi +else + fn_print_warning_nl "Default resources are not installed when using ./${selfname} auto-install." + fn_print_information_nl "To install default resources use ./${selfname} install" +fi diff --git a/lgsm/functions/command_mods_install.sh b/lgsm/functions/command_mods_install.sh new file mode 100644 index 000000000..0edbe5bc0 --- /dev/null +++ b/lgsm/functions/command_mods_install.sh @@ -0,0 +1,135 @@ +#!/bin/bash +# LinuxGSM command_mods_install.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: List and installs available mods along with mods_list.sh and mods_core.sh. + +commandname="MODS-INSTALL" +commandaction="Installing mods" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +check.sh +mods_core.sh + +fn_print_header + +# Displays a list of installed mods. +fn_mods_installed_list +if [ "${installedmodscount}" -gt "0" ]; then + echo -e "Installed addons/mods" + echo -e "=================================" + # Go through all available commands, get details and display them to the user. + for ((llindex = 0; llindex < ${#installedmodslist[@]}; llindex++)); do + # Current mod is the "llindex" value of the array we're going through. + currentmod="${installedmodslist[llindex]}" + fn_mod_get_info + # Display mod info to the user. + echo -e " * ${green}${modcommand}${default}${default}" + done + echo -e "" +fi + +echo -e "Available addons/mods" +echo -e "=================================" +# Display available mods from mods_list.sh. +# Set and reset vars +compatiblemodslistindex=0 +# As long as we're within index values. +while [ "${compatiblemodslistindex}" -lt "${#compatiblemodslist[@]}" ]; do + # Set values for convenience. + displayedmodname="${compatiblemodslist[compatiblemodslistindex]}" + displayedmodcommand="${compatiblemodslist[compatiblemodslistindex + 1]}" + displayedmodsite="${compatiblemodslist[compatiblemodslistindex + 2]}" + displayedmoddescription="${compatiblemodslist[compatiblemodslistindex + 3]}" + # Output mods to the user. + echo -e "${displayedmodname} - ${displayedmoddescription} - ${displayedmodsite}" + echo -e " * ${cyan}${displayedmodcommand}${default}" + # Increment index from the amount of values we just displayed. + let "compatiblemodslistindex+=4" + ((totalmodsavailable++)) +done + +# If no mods are available for a specific game. +if [ -z "${compatiblemodslist}" ]; then + fn_print_fail_nl "No mods are currently available for ${gamename}." + fn_script_log_info "No mods are currently available for ${gamename}." + core_exit.sh +fi +fn_script_log_info "${totalmodsavailable} addons/mods are available for install" + +## User selects a mod. +echo -e "" +while [[ ! " ${availablemodscommands[@]} " =~ " ${usermodselect} " ]]; 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 +done +# Get mod info. +currentmod="${usermodselect}" +fn_mod_get_info + +echo -e "" +echo -e "Installing ${modprettyname}" +echo -e "=================================" +fn_script_log_info "${modprettyname} selected for install" + +# Check if the mod is already installed and warn the user. +if [ -f "${modsinstalledlistfullpath}" ]; then + if [ "$(sed -n "/^${modcommand}$/p" "${modsinstalledlistfullpath}")" ]; then + fn_print_warning_nl "${modprettyname} is already installed" + fn_script_log_warn "${modprettyname} is already installed" + echo -e " * Any configs may be overwritten." + if ! fn_prompt_yn "Continue?" Y; then + core_exit.sh + fi + fn_script_log_info "User selected to continue" + fi +fi + +## Installation. +# If amxmodx check if metamod exists first +if [ "${modcommand}" == "amxmodx" ]; then + fn_mod_exist "metamod" +fi + +if [ "${modcommand}" == "amxmodxcs" ] \ + || [ "${modcommand}" == "amxmodxdod" ] \ + || [ "${modcommand}" == "amxmodxtfc" ] \ + || [ "${modcommand}" == "amxmodxns" ] \ + || [ "${modcommand}" == "amxmodxts" ]; then + fn_mod_exist "amxmodx" +fi + +fn_create_mods_dir +fn_mods_clear_tmp_dir +fn_mods_create_tmp_dir +fn_mod_install_files +fn_mod_lowercase +fn_mod_create_filelist +fn_mod_copy_destination +fn_mod_add_list +fn_mod_tidy_files_list +fn_mods_clear_tmp_dir + +# Create/modify existing liblist.gam file for Metamod +if [ "${modcommand}" == "metamod" ]; then + fn_mod_install_liblist_gam_file +fi + +# Create/modify plugins.ini file for Metamod +if [ "${modcommand}" == "amxmodx" ]; then + fn_mod_install_amxmodx_file +fi + +echo -e "${modprettyname} installed" +fn_script_log_pass "${modprettyname} installed." + +core_exit.sh diff --git a/lgsm/functions/command_mods_remove.sh b/lgsm/functions/command_mods_remove.sh new file mode 100644 index 000000000..7127dcb3c --- /dev/null +++ b/lgsm/functions/command_mods_remove.sh @@ -0,0 +1,153 @@ +#!/bin/bash +# LinuxGSM command_mods_uninstall.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Uninstall mods along with mods_list.sh and mods_core.sh. + +commandname="MODS-REMOVE" +commandaction="Removing mods" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +check.sh +mods_core.sh +fn_mods_check_installed + +fn_print_header +echo -e "Remove addons/mods" +echo -e "=================================" + +# Displays list of installed mods. +# Generates list to display to user. +fn_mods_installed_list +for ((mlindex = 0; mlindex < ${#installedmodslist[@]}; mlindex++)); do + # Current mod is the "mlindex" value of the array we are going through. + currentmod="${installedmodslist[mlindex]}" + # Get mod info. + fn_mod_get_info + # Display mod info to the user. + echo -e "${red}${modcommand}${default} - ${modprettyname} - ${moddescription}" +done + +echo -e "" +# Keep prompting as long as the user input doesn't correspond to an available mod. +while [[ ! " ${installedmodslist[@]} " =~ " ${usermodselect} " ]]; 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 +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 + core_exit.sh +fi + +currentmod="${usermodselect}" +fn_mod_get_info +fn_check_mod_files_list + +# Uninstall the mod. +fn_script_log_info "Removing ${modsfilelistsize} files from ${modprettyname}" +echo -e "removing ${modprettyname}" +echo -e "* ${modsfilelistsize} files to be removed" +echo -e "* location: ${modinstalldir}" +fn_sleep_time +# Go through every file and remove it. +modfileline="1" +tput sc +while [ "${modfileline}" -le "${modsfilelistsize}" ]; do + # Current line defines current file to remove. + currentfileremove=$(sed "${modfileline}q;d" "${modsdir}/${modcommand}-files.txt") + # If file or directory exists, then remove it. + + if [ -f "${modinstalldir}/${currentfileremove}" ] || [ -d "${modinstalldir}/${currentfileremove}" ]; then + rm -rf "${modinstalldir:?}/${currentfileremove:?}" + ((exitcode = $?)) + if [ "${exitcode}" != 0 ]; then + fn_script_log_fatal "Removing ${modinstalldir}/${currentfileremove}" + break + else + fn_script_log_pass "Removing ${modinstalldir}/${currentfileremove}" + fi + fi + tput rc + tput el + echo -e "removing ${modprettyname} ${modfileline} / ${modsfilelistsize} : ${currentfileremove}..." + ((modfileline++)) +done + +# Added logic not to fail since removing game specific mods (amxmodxcs) removes files that will +# not be found when removing the base (amxmodx) mod +if [ "${modcommand}" != "amxmodx" ]; then + if [ "${exitcode}" != 0 ]; then + fn_print_fail_eol_nl + core_exit.sh + else + fn_print_ok_eol_nl + fi +else + fn_print_ok_eol_nl +fi + +# Remove file list. +echo -en "removing ${modcommand}-files.txt..." +fn_sleep_time +rm -rf "${modsdir:?}/${modcommand}-files.txt" +exitcode=$? +if [ "${exitcode}" != 0 ]; then + fn_script_log_fatal "Removing ${modsdir}/${modcommand}-files.txt" + fn_print_fail_eol_nl + core_exit.sh +else + fn_script_log_pass "Removing ${modsdir}/${modcommand}-files.txt" + fn_print_ok_eol_nl +fi + +# Remove mods from installed mods list. +echo -en "removing ${modcommand} from ${modsinstalledlist}..." +fn_sleep_time + +sed -i "/^${modcommand}$/d" "${modsinstalledlistfullpath}" +exitcode=$? +if [ "${exitcode}" != 0 ]; then + fn_script_log_fatal "Removing ${modcommand} from ${modsinstalledlist}" + fn_print_fail_eol_nl + core_exit.sh +else + fn_script_log_pass "Removing ${modcommand} from ${modsinstalledlist}" + fn_print_ok_eol_nl +fi + +# Oxide fix +# Oxide replaces server files, so a validate is required after uninstall. +if [ "${engine}" == "unity3d" ] && [[ "${modprettyname}" == *"Oxide"* ]]; then + fn_print_information_nl "Validating to restore original ${gamename} files replaced by Oxide" + fn_script_log "Validating to restore original ${gamename} files replaced by Oxide" + exitbypass="1" + command_validate.sh + fn_firstcommand_reset + unset exitbypass +fi + +# Remove/modify existing liblist.gam file for Metamod +if [ "${modcommand}" == "metamod" ]; then + fn_mod_remove_liblist_gam_file +fi + +# Remove/modify plugins.ini file for AMX Mod X +if [ "${modcommand}" == "amxmodx" ]; then + fn_mod_remove_amxmodx_file +fi + +echo -e "${modprettyname} removed" +fn_script_log "${modprettyname} removed" + +core_exit.sh diff --git a/lgsm/functions/command_mods_update.sh b/lgsm/functions/command_mods_update.sh new file mode 100644 index 000000000..80b23fea9 --- /dev/null +++ b/lgsm/functions/command_mods_update.sh @@ -0,0 +1,109 @@ +#!/bin/bash +# LinuxGSM command_mods_update.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Updates installed mods along with mods_list.sh and mods_core.sh. + +commandname="MODS-UPDATE" +commandaction="Updating mods" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +check.sh +mods_core.sh + +# Prevents specific files being overwritten upon update (set by ${modkeepfiles}). +# For that matter, remove cfg files after extraction before copying them to destination. +fn_remove_cfg_files() { + if [ "${modkeepfiles}" != "OVERWRITE" ] && [ "${modkeepfiles}" != "NOUPDATE" ]; then + echo -e "the following files/directories will be preserved:" + fn_sleep_time + # Count how many files there are to remove. + filestopreserve=$(echo -e "${modkeepfiles}" | awk -F ';' '{ print NF }') + # Test all subvalues of "modkeepfiles" using the ";" separator. + for ((preservefilesindex = 1; preservefilesindex < filestopreserve; preservefilesindex++)); do + # Put the current file we are looking for into a variable. + filetopreserve=$(echo -e "${modkeepfiles}" | awk -F ';' -v x=${preservefilesindex} '{ print $x }') + echo -e " * serverfiles/${filetopreserve}" + # If it matches an existing file that have been extracted delete the file. + if [ -f "${extractdest}/${filetopreserve}" ] || [ -d "${extractdest}/${filetopreserve}" ]; then + rm -r "${extractdest:?}/${filetopreserve}" + # Write the file path in a tmp file, to rebuild a full file list as it is rebuilt upon update. + if [ ! -f "${modsdir}/.removedfiles.tmp" ]; then + touch "${modsdir}/.removedfiles.tmp" + fi + echo -e "${filetopreserve}" >> "${modsdir}/.removedfiles.tmp" + fi + done + fi +} + +fn_print_dots "Update addons/mods" +fn_mods_check_installed +fn_print_info_nl "Update addons/mods: ${installedmodscount} addons/mods will be updated" +fn_script_log_info "${installedmodscount} mods or addons will be updated" +fn_mods_installed_list +# Go through all available commands, get details and display them to the user. +for ((ulindex = 0; ulindex < ${#installedmodslist[@]}; ulindex++)); do + # Current mod is the "ulindex" value of the array we're going through. + currentmod="${installedmodslist[ulindex]}" + fn_mod_get_info + # Display installed mods and the update policy. + if [ -z "${modkeepfiles}" ]; then + # If modkeepfiles is not set for some reason, that's a problem. + fn_script_log_error "Could not find update policy for ${modprettyname}" + fn_print_error_nl "Could not find update policy for ${modprettyname}" + exitcode="1" + core_exit.sh + # If the mod won't get updated. + elif [ "${modkeepfiles}" == "NOUPDATE" ]; then + echo -e " * ${red}{modprettyname}${default} (won't be updated)" + # If the mode is just overwritten. + elif [ "${modkeepfiles}" == "OVERWRITE" ]; then + echo -e " * ${modprettyname} (overwrite)" + else + echo -e " * ${yellow}${modprettyname}${default} (retain common custom files)" + fi +done + +## Update +# List all installed mods and apply update. +# Reset line value. +installedmodsline="1" +while [ "${installedmodsline}" -le "${installedmodscount}" ]; do + currentmod=$(sed "${installedmodsline}q;d" "${modsinstalledlistfullpath}") + if [ "${currentmod}" ]; then + fn_mod_get_info + # Don not update mod if the policy is set to "NOUPDATE". + if [ "${modkeepfiles}" == "NOUPDATE" ]; then + fn_print_info "${modprettyname} will not be updated to preserve custom files" + fn_script_log_info "${modprettyname} will not be updated to preserve custom files" + else + echo -e "" + echo -e "==> Updating ${modprettyname}" + fn_create_mods_dir + fn_mods_clear_tmp_dir + fn_mods_create_tmp_dir + fn_mod_install_files + fn_mod_lowercase + fn_remove_cfg_files + fn_mod_create_filelist + fn_mod_copy_destination + fn_mod_add_list + fn_mod_tidy_files_list + fn_mods_clear_tmp_dir + fi + ((installedmodsline++)) + else + fn_print_fail "No mod was selected" + fn_script_log_fatal "No mod was selected" + exitcode="1" + core_exit.sh + fi +done +echo -e "" +fn_print_ok_nl "Mods update complete" +fn_script_log_info "Mods update complete" + +core_exit.sh diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh new file mode 100644 index 000000000..20c830e0b --- /dev/null +++ b/lgsm/functions/command_monitor.sh @@ -0,0 +1,245 @@ +#!/bin/bash +# LinuxGSM command_monitor.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Monitors server by checking for running processes +# then passes to gamedig and gsquery. + +commandname="MONITOR" +commandaction="Monitoring" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +fn_monitor_check_lockfile() { + # Monitor does not run it lockfile is not found. + if [ ! -f "${lockdir}/${selfname}.lock" ]; then + fn_print_dots "Checking lockfile: " + fn_print_checking_eol + fn_script_log_info "Checking lockfile: CHECKING" + fn_print_error "Checking lockfile: No lockfile found: " + fn_print_error_eol_nl + fn_script_log_error "Checking lockfile: No lockfile found: ERROR" + echo -e "* Start ${selfname} to run monitor." + core_exit.sh + fi + + # Fix if lockfile is not unix time or contains letters + if [ -f "${lockdir}/${selfname}.lock" ] && [[ "$(head -n 1 "${lockdir}/${selfname}.lock")" =~ [A-Za-z] ]]; then + date '+%s' > "${lockdir}/${selfname}.lock" + echo "${version}" >> "${lockdir}/${selfname}.lock" + echo "${port}" >> "${lockdir}/${selfname}.lock" + fi +} + +fn_monitor_check_update() { + # Monitor will check if update is already running. + if [ "$(pgrep "${selfname} update" | wc -l)" != "0" ]; then + fn_print_dots "Checking active updates: " + fn_print_checking_eol + fn_script_log_info "Checking active updates: CHECKING" + fn_print_error_nl "Checking active updates: SteamCMD is currently checking for updates: " + fn_print_error_eol + fn_script_log_error "Checking active updates: SteamCMD is currently checking for updates: ERROR" + core_exit.sh + fi +} + +fn_monitor_check_session() { + fn_print_dots "Checking session: " + fn_print_checking_eol + fn_script_log_info "Checking session: CHECKING" + # uses status var from check_status.sh + if [ "${status}" != "0" ]; then + fn_print_ok "Checking session: " + fn_print_ok_eol_nl + fn_script_log_pass "Checking session: OK" + else + fn_print_error "Checking session: " + fn_print_fail_eol_nl + fn_script_log_fatal "Checking session: FAIL" + alert="restart" + alert.sh + fn_script_log_info "Checking session: Monitor is restarting ${selfname}" + command_restart.sh + core_exit.sh + fi +} + +fn_monitor_check_queryport() { + # Monitor will check queryport is set before continuing. + if [ -z "${queryport}" ] || [ "${queryport}" == "0" ]; then + fn_print_dots "Checking port: " + fn_print_checking_eol + fn_script_log_info "Checking port: CHECKING" + if [ -n "${rconenabled}" ] && [ "${rconenabled}" != "true" ] && [ "${shortname}" == "av" ]; then + fn_print_warn "Checking port: Unable to query, rcon is not enabled" + fn_script_log_warn "Checking port: Unable to query, rcon is not enabled" + else + fn_print_error "Checking port: Unable to query, queryport is not set" + fn_script_log_error "Checking port: Unable to query, queryport is not set" + fi + core_exit.sh + fi +} + +fn_query_gsquery() { + if [ ! -f "${functionsdir}/query_gsquery.py" ]; then + fn_fetch_file_github "lgsm/functions" "query_gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nohash" + fi + "${functionsdir}"/query_gsquery.py -a "${queryip}" -p "${queryport}" -e "${querytype}" > /dev/null 2>&1 + querystatus="$?" +} + +fn_query_tcp() { + bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${queryport}'' > /dev/null 2>&1 + querystatus="$?" +} + +fn_monitor_query() { + # Will loop and query up to 5 times every 15 seconds. + # Query will wait up to 60 seconds to confirm server is down as server can become non-responsive during map changes. + totalseconds=0 + for queryattempt in {1..5}; do + for queryip in "${queryips[@]}"; do + fn_print_dots "Querying port: ${querymethod}: ${queryip}:${queryport} : ${totalseconds}/${queryattempt}: " + fn_print_querying_eol + fn_script_log_info "Querying port: ${querymethod}: ${queryip}:${queryport} : ${queryattempt} : QUERYING" + # querydelay + if [ "$(head -n 1 "${lockdir}/${selfname}.lock")" -gt "$(date "+%s" -d "${querydelay} mins ago")" ]; then + fn_print_ok "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: " + fn_print_delay_eol_nl + fn_script_log_info "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt} : DELAY" + fn_script_log_info "Query bypassed: ${gameservername} started less than ${querydelay} minutes ago" + fn_script_log_info "Server started: $(date -d @$(head -n 1 "${lockdir}/${selfname}.lock"))" + fn_script_log_info "Current time: $(date)" + monitorpass=1 + core_exit.sh + # will use query method selected in fn_monitor_loop + # gamedig + elif [ "${querymethod}" == "gamedig" ]; then + query_gamedig.sh + # gsquery + elif [ "${querymethod}" == "gsquery" ]; then + fn_query_gsquery + #tcp query + elif [ "${querymethod}" == "tcp" ]; then + fn_query_tcp + fi + + if [ "${querystatus}" == "0" ]; then + # Server query OK. + fn_print_ok "Querying port: ${querymethod}: ${queryip}:${queryport} : ${totalseconds}/${queryattempt}: " + fn_print_ok_eol_nl + fn_script_log_pass "Querying port: ${querymethod}: ${queryip}:${queryport} : ${queryattempt} : OK" + monitorpass=1 + if [ "${querystatus}" == "0" ]; then + # Add query data to log. + if [ "${gdname}" ]; then + fn_script_log_info "Server name: ${gdname}" + fi + if [ "${gdplayers}" ]; then + fn_script_log_info "Players: ${gdplayers}/${gdmaxplayers}" + fi + if [ "${gdbots}" ]; then + fn_script_log_info "Bots: ${gdbots}" + fi + if [ "${gdmap}" ]; then + fn_script_log_info "Map: ${gdmap}" + fi + if [ "${gdgamemode}" ]; then + fn_script_log_info "Game Mode: ${gdgamemode}" + fi + + # send LinuxGSM stats if monitor is OK. + if [ "${stats}" == "on" ] || [ "${stats}" == "y" ]; then + info_stats.sh + fi + fi + core_exit.sh + else + # Server query FAIL. + fn_print_fail "Querying port: ${querymethod}: ${queryip}:${queryport} : ${totalseconds}/${queryattempt}: " + fn_print_fail_eol + fn_script_log_warn "Querying port: ${querymethod}: ${queryip}:${queryport} : ${queryattempt} : FAIL" + # Monitor will try gamedig (if supported) for first 30s then gsquery before restarting. + # gsquery will fail if longer than 60s + if [ "${totalseconds}" -ge "59" ]; then + # Monitor will FAIL if over 60s and trigger gane server reboot. + fn_print_fail "Querying port: ${querymethod}: ${queryip}:${queryport} : ${totalseconds}/${queryattempt}: " + fn_print_fail_eol_nl + fn_script_log_warn "Querying port: ${querymethod}: ${queryip}:${queryport} : ${queryattempt} : FAIL" + # Send alert if enabled. + alert="restartquery" + alert.sh + command_restart.sh + fn_firstcommand_reset + core_exit.sh + fi + fi + done + # Second counter will wait for 15s before breaking loop. + for seconds in {1..15}; do + fn_print_fail "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt} : ${cyan}WAIT${default}" + sleep 0.5 + totalseconds=$((totalseconds + 1)) + if [ "${seconds}" == "15" ]; then + break + fi + done + done +} + +fn_monitor_loop() { + # loop though query methods selected by querymode. + totalseconds=0 + if [ "${querymode}" == "2" ]; then + local query_methods_array=(gamedig gsquery) + elif [ "${querymode}" == "3" ]; then + local query_methods_array=(gamedig) + elif [ "${querymode}" == "4" ]; then + local query_methods_array=(gsquery) + elif [ "${querymode}" == "5" ]; then + local query_methods_array=(tcp) + fi + for querymethod in "${query_methods_array[@]}"; do + # Will check if gamedig is installed and bypass if not. + if [ "${querymethod}" == "gamedig" ]; then + if [ "$(command -v gamedig 2> /dev/null)" ] && [ "$(command -v jq 2> /dev/null)" ]; then + if [ -z "${monitorpass}" ]; then + fn_monitor_query + fi + else + fn_script_log_info "gamedig is not installed" + fn_script_log_info "https://docs.linuxgsm.com/requirements/gamedig" + fi + else + # will not query if query already passed. + if [ -z "${monitorpass}" ]; then + fn_monitor_query + fi + fi + done +} + +monitorflag=1 +check.sh +core_logs.sh +info_game.sh + +# query pre-checks +fn_monitor_check_lockfile +fn_monitor_check_update +fn_monitor_check_session +# Monitor will not continue if session only check. +if [ "${querymode}" != "1" ]; then + fn_monitor_check_queryport + + # Add a querydelay of 1 min if var missing. + if [ -z "${querydelay}" ]; then + querydelay="1" + fi + + fn_monitor_loop +fi +core_exit.sh diff --git a/lgsm/functions/command_postdetails.sh b/lgsm/functions/command_postdetails.sh new file mode 100644 index 000000000..dad44d9af --- /dev/null +++ b/lgsm/functions/command_postdetails.sh @@ -0,0 +1,78 @@ +#!/bin/bash +# LinuxGSM command_postdetails.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Strips sensitive information out of Details output. + +commandname="POST-DETAILS" +commandaction="Posting details" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +posttarget="https://termbin.com" + +# source all of the functions defined in the details command. +info_messages.sh + +fn_bad_postdetailslog() { + fn_print_fail_nl "Unable to create temporary file ${postdetailslog}." + core_exit.sh +} + +# Remove any existing postdetails.log file. +if [ -f "${postdetailslog}" ]; then + rm -f "${postdetailslog:?}" +fi + +# Rather than a one-pass sed parser, default to using a temporary directory. +if [ "${exitbypass}" ]; then + postdetailslog="${alertlog}" +else + # Run checks and gathers details to display. + check.sh + info_game.sh + info_distro.sh + info_messages.sh + for queryip in "${queryips[@]}"; do + query_gamedig.sh + if [ "${querystatus}" == "0" ]; then + break + fi + done + touch "${postdetailslog}" || fn_bad_postdetailslog + { + fn_info_message_distro + fn_info_message_server_resource + fn_info_message_gameserver_resource + fn_info_message_gameserver + fn_info_message_script + fn_info_message_backup + # Some game servers do not have parms. + if [ "${shortname}" != "jc2" ] && [ "${shortname}" != "jc3" ] && [ "${shortname}" != "dst" ] && [ "${shortname}" != "pz" ] && [ "${engine}" != "renderware" ]; then + fn_info_message_commandlineparms + fi + fn_info_message_ports_edit + fn_info_message_ports + fn_info_message_select_engine + fn_info_message_statusbottom + } | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" | tee -a "${postdetailslog}" > /dev/null 2>&1 +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}" + +if [ "${firstcommandname}" == "POST-DETAILS" ]; then + echo -e "" + echo -e "Please share the following url for support: " + echo -e "${pdurl}" +fi +fn_script_log_info "${pdurl}" +alerturl="${pdurl}" + +if [ -z "${exitbypass}" ]; then + core_exit.sh +fi diff --git a/lgsm/functions/command_restart.sh b/lgsm/functions/command_restart.sh new file mode 100644 index 000000000..3bf60c32c --- /dev/null +++ b/lgsm/functions/command_restart.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# LinuxGSM command_restart.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Restarts the server. + +commandname="MODS-INSTALL" +commandaction="Restarting" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +info_game.sh +exitbypass=1 +command_stop.sh +command_start.sh +fn_firstcommand_reset +core_exit.sh diff --git a/lgsm/functions/command_send.sh b/lgsm/functions/command_send.sh new file mode 100644 index 000000000..c143276f6 --- /dev/null +++ b/lgsm/functions/command_send.sh @@ -0,0 +1,41 @@ +#!/bin/bash +# LinuxGSM command_send.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Send command to the server tmux console. + +commandname="SEND" +commandaction="Send" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +check.sh +if [ -z "${userinput2}" ]; then + fn_print_header + fn_print_information_nl "Send a command to the console." +fi + +check_status.sh +if [ "${status}" != "0" ]; then + if [ -n "${userinput2}" ]; then + commandtosend="${userinput2}" + else + echo "" + commandtosend=$(fn_prompt_message "send: ") + fi + echo "" + fn_print_dots "Sending command to console: \"${commandtosend}\"" + tmux send-keys -t "${servicename}" "${commandtosend}" ENTER + fn_print_ok_nl "Sending command to console: \"${commandtosend}\"" + 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 +fi + +core_exit.sh diff --git a/lgsm/functions/command_skeleton.sh b/lgsm/functions/command_skeleton.sh new file mode 100644 index 000000000..53c4ddec5 --- /dev/null +++ b/lgsm/functions/command_skeleton.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# LinuxGSM command_skeleton.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Creates an copy of a game servers directorys. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +fn_print_dots "Creating skeleton directory" +check.sh + +# Find all directorys and create them in the skel directory +find "${rootdir}" -type d -not \( -path ./skel -prune \) | cpio -pdvm skel 2> /dev/null +exitcode=$? +if [ "${exitcode}" != 0 ]; then + fn_print_fail_nl "Creating skeleton directory" + fn_script_log_fatal "Creating skeleton directory" +else + fn_print_ok_nl "Creating skeleton directory: ./skel" + fn_script_log_pass "Creating skeleton directory: ./skel" +fi +core_exit.sh diff --git a/lgsm/functions/command_start.sh b/lgsm/functions/command_start.sh new file mode 100644 index 000000000..04c6b4e64 --- /dev/null +++ b/lgsm/functions/command_start.sh @@ -0,0 +1,224 @@ +#!/bin/bash +# LinuxGSM command_start.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Starts the server. + +commandname="START" +commandaction="Starting" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +addtimestamp="gawk '{ print strftime(\\\"[$logtimestampformat]\\\"), \\\$0 }'" +fn_firstcommand_set + +fn_start_teamspeak3() { + if [ ! -f "${servercfgfullpath}" ]; then + fn_print_warn_nl "${servercfgfullpath} is missing" + fn_script_log_warn "${servercfgfullpath} is missing" + echo " * Creating blank ${servercfg}" + fn_script_log_info "Creating blank ${servercfg}" + fn_sleep_time + echo " * ${servercfg} can remain blank by default." + fn_script_log_info "${servercfgfullpath} can remain blank by default." + fn_sleep_time + echo " * ${servercfg} is located in ${servercfgfullpath}." + fn_script_log_info "${servercfg} is located in ${servercfgfullpath}." + sleep 5 + touch "${servercfgfullpath}" + fi + # Accept license. + if [ ! -f "${executabledir}/.ts3server_license_accepted" ]; then + install_eula.sh + fi + fn_start_tmux +} + +# This will allow the Jedi Knight 2 version to be printed in console on start. +# Used to allow update to detect JK2MV server version. +fn_start_jk2() { + fn_start_tmux + tmux send -t "${sessionname}" version ENTER > /dev/null 2>&1 +} + +fn_start_tmux() { + if [ "${parmsbypass}" ]; then + startparameters="" + fi + # check for tmux size variables. + if [[ "${servercfgtmuxwidth}" =~ ^[0-9]+$ ]]; then + sessionwidth="${servercfgtmuxwidth}" + else + sessionwidth="80" + fi + if [[ "${servercfgtmuxheight}" =~ ^[0-9]+$ ]]; then + sessionheight="${servercfgtmuxheight}" + else + sessionheight="23" + fi + + # Log rotation. + fn_script_log_info "Rotating log files" + if [ "${engine}" == "unreal2" ] && [ -f "${gamelog}" ]; then + mv "${gamelog}" "${gamelogdate}" + fi + if [ -f "${lgsmlog}" ]; then + mv "${lgsmlog}" "${lgsmlogdate}" + fi + if [ -f "${consolelog}" ]; then + mv "${consolelog}" "${consolelogdate}" + fi + + # Create lockfile + date '+%s' > "${lockdir}/${selfname}.lock" + echo "${version}" >> "${lockdir}/${selfname}.lock" + echo "${port}" >> "${lockdir}/${selfname}.lock" + fn_reload_startparameters + + if [ "${shortname}" == "av" ]; then + cd "${systemdir}" || exit + else + cd "${executabledir}" || exit + fi + + tmux new-session -d -x "${sessionwidth}" -y "${sessionheight}" -s "${sessionname}" "${preexecutable} ${executable} ${startparameters}" 2> "${lgsmlogdir}/.${selfname}-tmux-error.tmp" + + # Create logfile. + touch "${consolelog}" + + # Create last start lock file + date +%s > "${lockdir}/${selfname}-laststart.lock" + + # tmux compiled from source will return "master", therefore ignore it. + if [ "${tmuxv}" == "master" ]; then + fn_script_log "tmux version: master (user compiled)" + echo -e "tmux version: master (user compiled)" >> "${consolelog}" + if [ "${consolelogging}" == "on" ] || [ -z "${consolelogging}" ]; then + if [ "$logtimestamp" == "on" ]; then + tmux pipe-pane -o -t "${sessionname}" "exec bash -c \"cat | $addtimestamp\" >> '${consolelog}'" + else + tmux pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'" + fi + fi + + elif [ -n "${tmuxv}" ]; then + # tmux pipe-pane not supported in tmux versions < 1.6. + if [ "${tmuxvdigit}" -lt "16" ]; then + echo -e "Console logging disabled: tmux => 1.6 required + https://linuxgsm.com/tmux-upgrade + Currently installed: $(tmux -V)" > "${consolelog}" + + # Console logging disabled: Bug in tmux 1.8 breaks logging. + elif [ "${tmuxvdigit}" -eq "18" ]; then + echo -e "Console logging disabled: Bug in tmux 1.8 breaks logging + https://linuxgsm.com/tmux-upgrade + Currently installed: $(tmux -V)" > "${consolelog}" + # Console logging enable or not set. + elif [ "${consolelogging}" == "on" ] || [ -z "${consolelogging}" ]; then + if [ "$logtimestamp" == "on" ]; then + tmux pipe-pane -o -t "${sessionname}" "exec bash -c \"cat | $addtimestamp\" >> '${consolelog}'" + else + tmux pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'" + fi + fi + else + echo -e "Unable to detect tmux version" >> "${consolelog}" + fn_script_log_warn "Unable to detect tmux version" + fi + + # Console logging disabled. + if [ "${consolelogging}" == "off" ]; then + echo -e "Console logging disabled by user" >> "${consolelog}" + fn_script_log_info "Console logging disabled by user" + fi + fn_sleep_time + + # If the server fails to start. + check_status.sh + if [ "${status}" == "0" ]; then + fn_print_fail_nl "Unable to start ${servername}" + fn_script_log_fatal "Unable to start ${servername}" + if [ -s "${lgsmlogdir}/.${selfname}-tmux-error.tmp" ]; then + fn_print_fail_nl "Unable to start ${servername}: tmux error:" + fn_script_log_fatal "Unable to start ${servername}: tmux error:" + echo -e "" + echo -e "Command" + echo -e "=================================" + echo -e "tmux new-session -d -s \"${sessionname}\" \"${preexecutable} ${executable} ${startparameters}\"" | tee -a "${lgsmlog}" + echo -e "" + echo -e "Error" + echo -e "=================================" + tee -a "${lgsmlog}" < "${lgsmlogdir}/.${selfname}-tmux-error.tmp" + + # Detected error https://linuxgsm.com/support + if grep -c "Operation not permitted" "${lgsmlogdir}/.${selfname}-tmux-error.tmp"; then + echo -e "" + echo -e "Fix" + echo -e "=================================" + if ! grep "tty:" /etc/group | grep "$(whoami)"; then + echo -e "$(whoami) is not part of the tty group." + fn_script_log_info "$(whoami) is not part of the tty group." + group=$(grep tty /etc/group) + echo -e "" + echo -e " ${group}" + fn_script_log_info "${group}" + echo -e "" + echo -e "Run the following command with root privileges." + echo -e "" + echo -e " usermod -G tty $(whoami)" + echo -e "" + echo -e "https://linuxgsm.com/tmux-op-perm" + fn_script_log_info "https://linuxgsm.com/tmux-op-perm" + else + echo -e "No known fix currently. Please log an issue." + fn_script_log_info "No known fix currently. Please log an issue." + echo -e "https://linuxgsm.com/support" + fn_script_log_info "https://linuxgsm.com/support" + fi + fi + fi + core_exit.sh + else + fn_print_ok "${servername}" + fn_script_log_pass "Started ${servername}" + fi + rm -f "${lgsmlogdir:?}/.${selfname}-tmux-error.tmp" 2> /dev/null + echo -en "\n" +} + +check.sh + +# Is the server already started. +# $status comes from check_status.sh, which is run by check.sh for this command +if [ "${status}" != "0" ]; then + fn_print_dots "${servername}" + fn_print_info_nl "${servername} is already running" + fn_script_log_error "${servername} is already running" + if [ -z "${exitbypass}" ]; then + core_exit.sh + fi +fi +if [ -z "${fixbypass}" ]; then + fix.sh +fi +info_game.sh +core_logs.sh + +# Will check for updates is updateonstart is yes. +if [ "${updateonstart}" == "yes" ] || [ "${updateonstart}" == "1" ] || [ "${updateonstart}" == "on" ]; then + exitbypass=1 + unset updateonstart + command_update.sh + fn_firstcommand_reset +fi + +fn_print_dots "${servername}" + +if [ "${shortname}" == "ts3" ]; then + fn_start_teamspeak3 +elif [ "${shortname}" == "jk2" ]; then + fn_start_jk2 +else + fn_start_tmux +fi + +core_exit.sh diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh new file mode 100644 index 000000000..d18ef7c23 --- /dev/null +++ b/lgsm/functions/command_stop.sh @@ -0,0 +1,283 @@ +#!/bin/bash +# LinuxGSM command_stop.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Stops the server. + +commandname="STOP" +commandaction="Stopping" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +# Attempts graceful shutdown by sending 'CTRL+c'. +fn_stop_graceful_ctrlc() { + fn_print_dots "Graceful: CTRL+c" + fn_script_log_info "Graceful: CTRL+c" + # Sends quit. + tmux send-keys -t "${sessionname}" C-c > /dev/null 2>&1 + # Waits up to 30 seconds giving the server time to shutdown gracefuly. + for seconds in {1..30}; do + check_status.sh + if [ "${status}" == "0" ]; then + fn_print_ok "Graceful: CTRL+c: ${seconds}: " + fn_print_ok_eol_nl + fn_script_log_pass "Graceful: CTRL+c: OK: ${seconds} seconds" + break + fi + sleep 1 + fn_print_dots "Graceful: CTRL+c: ${seconds}" + done + check_status.sh + if [ "${status}" != "0" ]; then + fn_print_error "Graceful: CTRL+c: " + fn_print_fail_eol_nl + fn_script_log_error "Graceful: CTRL+c: FAIL" + fi +} + +# Attempts graceful shutdown by sending a specified command. +# Usage: fn_stop_graceful_cmd "console_command" "timeout_in_seconds" +# e.g.: fn_stop_graceful_cmd "quit" "30" +fn_stop_graceful_cmd() { + fn_print_dots "Graceful: sending \"${1}\"" + fn_script_log_info "Graceful: sending \"${1}\"" + # Sends specific stop command. + tmux send -t "${sessionname}" ENTER "${1}" ENTER > /dev/null 2>&1 + # Waits up to ${seconds} seconds giving the server time to shutdown gracefully. + for ((seconds = 1; seconds <= ${2}; seconds++)); do + check_status.sh + if [ "${status}" == "0" ]; then + fn_print_ok "Graceful: sending \"${1}\": ${seconds}: " + fn_print_ok_eol_nl + fn_script_log_pass "Graceful: sending \"${1}\": OK: ${seconds} seconds" + break + fi + sleep 1 + fn_print_dots "Graceful: sending \"${1}\": ${seconds}" + done + check_status.sh + if [ "${status}" != "0" ]; then + fn_print_error "Graceful: sending \"${1}\": " + fn_print_fail_eol_nl + fn_script_log_error "Graceful: sending \"${1}\": FAIL" + fi +} + +# Attempts graceful shutdown of goldsrc using rcon 'quit' command. +# There is only a 3 second delay before a forced a tmux shutdown +# as GoldSrc servers 'quit' command does a restart rather than shutdown. +fn_stop_graceful_goldsrc() { + fn_print_dots "Graceful: sending \"quit\"" + fn_script_log_info "Graceful: sending \"quit\"" + # sends quit + tmux send -t "${sessionname}" quit ENTER > /dev/null 2>&1 + # Waits 3 seconds as goldsrc servers restart with the quit command. + for seconds in {1..3}; do + sleep 1 + fn_print_dots "Graceful: sending \"quit\": ${seconds}" + done + fn_print_ok "Graceful: sending \"quit\": ${seconds}: " + fn_print_ok_eol_nl + fn_script_log_pass "Graceful: sending \"quit\": OK: ${seconds} seconds" +} + +# telnet command for sdtd graceful shutdown. +fn_stop_graceful_sdtd_telnet() { + if [ -z "${telnetpass}" ] || [ "${telnetpass}" == "NOT SET" ]; then + sdtd_telnet_shutdown=$(expect -c ' + proc abort {} { + puts "Timeout or EOF\n" + exit 1 + } + spawn telnet '"${telnetip}"' '"${telnetport}"' + expect { + "session." { send "shutdown\r" } + default abort + } + expect { eof } + puts "Completed.\n" + ') + else + sdtd_telnet_shutdown=$(expect -c ' + proc abort {} { + puts "Timeout or EOF\n" + exit 1 + } + spawn telnet '"${telnetip}"' '"${telnetport}"' + expect { + "password:" { send "'"${telnetpass}"'\r" } + default abort + } + expect { + "session." { send "shutdown\r" } + default abort + } + expect { eof } + puts "Completed.\n" + ') + fi +} + +# Attempts graceful shutdown of 7 Days To Die using telnet. +fn_stop_graceful_sdtd() { + fn_print_dots "Graceful: telnet" + fn_script_log_info "Graceful: telnet" + if [ "${telnetenabled}" == "false" ]; then + fn_print_info_nl "Graceful: telnet: DISABLED: Enable in ${servercfg}" + elif [ "$(command -v expect 2> /dev/null)" ]; then + # Tries to shutdown with both localhost and server IP. + for telnetip in 127.0.0.1 ${ip}; do + fn_print_dots "Graceful: telnet: ${telnetip}:${telnetport}" + fn_script_log_info "Graceful: telnet: ${telnetip}:${telnetport}" + fn_stop_graceful_sdtd_telnet + completed=$(echo -en "\n ${sdtd_telnet_shutdown}" | grep "Completed.") + refused=$(echo -en "\n ${sdtd_telnet_shutdown}" | grep "Timeout or EOF") + if [ "${refused}" ]; then + fn_print_error "Graceful: telnet: ${telnetip}:${telnetport} : " + fn_print_fail_eol_nl + fn_script_log_error "Graceful: telnet: ${telnetip}:${telnetport} : FAIL" + elif [ "${completed}" ]; then + break + fi + done + + # If telnet shutdown was successful will use telnet again to check + # the connection has closed, confirming that the tmux session can now be killed. + if [ "${completed}" ]; then + for seconds in {1..30}; do + fn_stop_graceful_sdtd_telnet + refused=$(echo -en "\n ${sdtd_telnet_shutdown}" | grep "Timeout or EOF") + if [ "${refused}" ]; then + fn_print_ok "Graceful: telnet: ${telnetip}:${telnetport} : " + fn_print_ok_eol_nl + fn_script_log_pass "Graceful: telnet: ${telnetip}:${telnetport} : ${seconds} seconds" + break + fi + sleep 1 + fn_print_dots "Graceful: telnet: ${seconds}" + done + # If telnet shutdown fails tmux shutdown will be used, this risks loss of world save. + else + if [ "${refused}" ]; then + fn_print_error "Graceful: telnet: " + fn_print_fail_eol_nl + fn_script_log_error "Graceful: telnet: ${telnetip}:${telnetport} : FAIL" + else + fn_print_error_nl "Graceful: telnet: Unknown error" + fn_script_log_error "Graceful: telnet: Unknown error" + fi + echo -en "\n" | tee -a "${lgsmlog}" + echo -en "Telnet output:" | tee -a "${lgsmlog}" + echo -en "\n ${sdtd_telnet_shutdown}" | tee -a "${lgsmlog}" + echo -en "\n\n" | tee -a "${lgsmlog}" + fi + else + fn_print_warn "Graceful: telnet: expect not installed: " + fn_print_fail_eol_nl + fn_script_log_warn "Graceful: telnet: expect not installed: FAIL" + fi +} + +# Attempts graceful shutdown by sending /save /stop. +fn_stop_graceful_avorion() { + fn_print_dots "Graceful: /save /stop" + fn_script_log_info "Graceful: /save /stop" + # Sends /save. + tmux send-keys -t "${sessionname}" /save ENTER > /dev/null 2>&1 + sleep 5 + # Sends /quit. + tmux send-keys -t "${sessionname}" /stop ENTER > /dev/null 2>&1 + # Waits up to 30 seconds giving the server time to shutdown gracefuly. + for seconds in {1..30}; do + check_status.sh + if [ "${status}" == "0" ]; then + fn_print_ok "Graceful: /save /stop: ${seconds}: " + fn_print_ok_eol_nl + fn_script_log_pass "Graceful: /save /stop: OK: ${seconds} seconds" + break + fi + sleep 1 + fn_print_dots "Graceful: /save /stop: ${seconds}" + done + check_status.sh + if [ "${status}" != "0" ]; then + fn_print_error "Graceful: /save /stop: " + fn_print_fail_eol_nl + fn_script_log_error "Graceful: /save /stop: FAIL" + fi +} + +fn_stop_graceful_select() { + if [ "${stopmode}" == "1" ]; then + fn_stop_tmux + elif [ "${stopmode}" == "2" ]; then + fn_stop_graceful_ctrlc + elif [ "${stopmode}" == "3" ]; then + fn_stop_graceful_cmd "quit" 30 + elif [ "${stopmode}" == "4" ]; then + fn_stop_graceful_cmd "quit" 120 + elif [ "${stopmode}" == "5" ]; then + fn_stop_graceful_cmd "stop" 30 + elif [ "${stopmode}" == "6" ]; then + fn_stop_graceful_cmd "q" 30 + elif [ "${stopmode}" == "7" ]; then + fn_stop_graceful_cmd "exit" 30 + elif [ "${stopmode}" == "8" ]; then + fn_stop_graceful_sdtd + elif [ "${stopmode}" == "9" ]; then + fn_stop_graceful_goldsrc + elif [ "${stopmode}" == "10" ]; then + fn_stop_graceful_avorion + elif [ "${stopmode}" == "11" ]; then + fn_stop_graceful_cmd "end" 30 + elif [ "${stopmode}" == "12" ]; then + fn_stop_graceful_cmd "shutdown" 30 + fi +} + +fn_stop_tmux() { + fn_print_dots "${servername}" + fn_script_log_info "tmux kill-session: ${sessionname}: ${servername}" + # Kill tmux session. + tmux kill-session -t "${sessionname}" > /dev/null 2>&1 + sleep 0.5 + check_status.sh + if [ "${status}" == "0" ]; then + fn_print_ok_nl "${servername}" + fn_script_log_pass "Stopped ${servername}" + else + fn_print_fail_nl "Unable to stop ${servername}" + fn_script_log_fatal "Unable to stop ${servername}" + fi +} + +# Checks if the server is already stopped. +fn_stop_pre_check() { + if [ "${status}" == "0" ]; then + fn_print_info_nl "${servername} is already stopped" + fn_script_log_error "${servername} is already stopped" + else + # Select graceful shutdown. + fn_stop_graceful_select + fi + # Check status again, a kill tmux session if graceful shutdown failed. + check_status.sh + if [ "${status}" != "0" ]; then + fn_stop_tmux + fi +} + +check.sh +fn_print_dots "${servername}" + +info_game.sh +fn_stop_pre_check +# Remove lockfile. +if [ -f "${lockdir}/${selfname}.lock" ]; then + rm -f "${lockdir:?}/${selfname}.lock" +fi + +if [ -z "${exitbypass}" ]; then + core_exit.sh +fi diff --git a/lgsm/functions/command_test_alert.sh b/lgsm/functions/command_test_alert.sh new file mode 100644 index 000000000..7fe61e48a --- /dev/null +++ b/lgsm/functions/command_test_alert.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# LinuxGSM command_test_alert.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Sends a test alert. + +commandname="TEST-ALERT" +commandaction="Sending Alert" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +fn_print_dots "${servername}" +check.sh +info_game.sh +alert="test" +alert.sh + +core_exit.sh diff --git a/lgsm/functions/command_ts3_server_pass.sh b/lgsm/functions/command_ts3_server_pass.sh new file mode 100644 index 000000000..be0816d15 --- /dev/null +++ b/lgsm/functions/command_ts3_server_pass.sh @@ -0,0 +1,57 @@ +#!/bin/bash +# LinuxGSM command_ts3_server_pass.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Changes TS3 serveradmin password. + +commandname="CHANGE-PASSWORD" +commandaction="Changing password" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +fn_serveradmin_password_prompt() { + fn_print_header + fn_print_information_nl "You are about to change the ${gamename} ServerAdmin password." + fn_print_warning_nl "${gamename} will restart during this process." + echo -e "" + if ! fn_prompt_yn "Continue?" Y; then + exitcode=0 + core_exit.sh + fi + fn_script_log_info "Initiating ${gamename} ServerAdmin password change" + read -rp "Enter new password: " newpassword + fn_print_info_nl "Changing password" + fn_script_log_info "Changing password" +} + +fn_serveradmin_password_set() { + # Start server in "new password mode". + ts3serverpass="1" + exitbypass="1" + command_start.sh + fn_firstcommand_reset + fn_print_ok_nl "New password applied" + fn_script_log_pass "New ServerAdmin password applied" +} + +# Running functions. +check.sh +fn_serveradmin_password_prompt +if [ "${status}" != "0" ]; then + # Stop any running server. + exitbypass="1" + command_stop.sh + fn_firstcommand_reset + fn_serveradmin_password_set + parms="serveradmin_password=\"${newpassword}\" inifile=\"${servercfgfullpath}\" > /dev/null 2>&1" + ts3serverpass="0" + command_restart.sh + fn_firstcommand_reset +else + fn_serveradmin_password_set + command_stop.sh + fn_firstcommand_reset +fi + +core_exit.sh diff --git a/lgsm/functions/command_update.sh b/lgsm/functions/command_update.sh new file mode 100644 index 000000000..ae5c2065c --- /dev/null +++ b/lgsm/functions/command_update.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# LinuxGSM command_update.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Handles updating of servers. + +commandname="UPDATE" +commandaction="Updating" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +fn_print_dots "" +check.sh +core_logs.sh +check_last_update.sh + +if [ "${shortname}" == "ts3" ]; then + update_ts3.sh +elif [ "${shortname}" == "mc" ]; then + update_minecraft.sh +elif [ "${shortname}" == "mcb" ]; then + update_minecraft_bedrock.sh +elif [ "${shortname}" == "pmc" ] || [ "${shortname}" == "vpmc" ] || [ "${shortname}" == "wmc" ]; then + update_papermc.sh +elif [ "${shortname}" == "fctr" ]; then + update_factorio.sh +elif [ "${shortname}" == "mta" ]; then + update_mta.sh +elif [ "${shortname}" == "jk2" ]; then + update_jediknight2.sh +elif [ "${shortname}" == "vints" ]; then + update_vintagestory.sh +elif [ "${shortname}" == "ut99" ]; then + update_ut99.sh +else + update_steamcmd.sh +fi + +core_exit.sh diff --git a/lgsm/functions/command_validate.sh b/lgsm/functions/command_validate.sh new file mode 100644 index 000000000..15257a3e2 --- /dev/null +++ b/lgsm/functions/command_validate.sh @@ -0,0 +1,49 @@ +#!/bin/bash +# LinuxGSM command_validate.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Runs a server validation. + +commandname="VALIDATE" +commandaction="Validating" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +fn_validate() { + fn_print_warn "Validate might overwrite some customised files" + fn_script_log_warn "${commandaction} server: Validate might overwrite some customised files" + totalseconds=3 + for seconds in {3..1}; do + fn_print_warn "Validate might overwrite some customised files: ${totalseconds}" + totalseconds=$((totalseconds - 1)) + sleep 1 + if [ "${seconds}" == "0" ]; then + break + fi + done + fn_print_warn_nl "Validate might overwrite some customised files" + + fn_dl_steamcmd +} + +# The location where the builds are checked and downloaded. +remotelocation="SteamCMD" +check.sh + +fn_print_dots "${remotelocation}" + +if [ "${status}" != "0" ]; then + fn_print_restart_warning + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + fn_validate + exitbypass=1 + command_start.sh + fn_firstcommand_reset +else + fn_validate +fi + +core_exit.sh diff --git a/lgsm/functions/command_wipe.sh b/lgsm/functions/command_wipe.sh new file mode 100644 index 000000000..e1677e827 --- /dev/null +++ b/lgsm/functions/command_wipe.sh @@ -0,0 +1,183 @@ +#!/bin/bash +# LinuxGSM command_backup.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Wipes server data, useful after updates for some games like Rust. + +commandname="WIPE" +commandaction="Wiping" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +# Provides an exit code upon error. +fn_wipe_exit_code() { + exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_print_fail_eol_nl + core_exit.sh + else + fn_print_ok_eol_nl + fi +} + +# Removes files to wipe server. +fn_wipe_files() { + fn_print_start_nl "${wipetype}" + fn_script_log_info "${wipetype}" + + # Remove Map files + if [ -n "${serverwipe}" ] || [ -n "${mapwipe}" ]; then + if [ -n "$(find "${serveridentitydir}" -type f -name "*.map")" ]; then + echo -en "removing .map file(s)..." + fn_script_log_info "removing *.map file(s)" + fn_sleep_time + find "${serveridentitydir:?}" -type f -name "*.map" -printf "%f\n" >> "${lgsmlog}" + find "${serveridentitydir:?}" -type f -name "*.map" -delete | tee -a "${lgsmlog}" + fn_wipe_exit_code + else + echo -e "no .map file(s) to remove" + fn_sleep_time + fn_script_log_pass "no .map file(s) to remove" + fi + fi + # Remove Save files. + if [ -n "${serverwipe}" ] || [ -n "${mapwipe}" ]; then + if [ -n "$(find "${serveridentitydir}" -type f -name "*.sav*")" ]; then + echo -en "removing .sav file(s)..." + fn_script_log_info "removing .sav file(s)" + fn_sleep_time + find "${serveridentitydir:?}" -type f -name "*.sav*" -printf "%f\n" >> "${lgsmlog}" + find "${serveridentitydir:?}" -type f -name "*.sav*" -delete + fn_wipe_exit_code + else + echo -e "no .sav file(s) to remove" + fn_script_log_pass "no .sav file(s) to remove" + fn_sleep_time + fi + fi + # Remove db files for full wipe. + # Excluding player.tokens.db for Rust+. + if [ -n "${serverwipe}" ]; then + if [ -n "$(find "${serveridentitydir}" -type f ! -name 'player.tokens.db' -name "*.db")" ]; then + echo -en "removing .db file(s)..." + fn_script_log_info "removing .db file(s)" + fn_sleep_time + find "${serveridentitydir:?}" -type f ! -name 'player.tokens.db' -name "*.db" -printf "%f\n" >> "${lgsmlog}" + find "${serveridentitydir:?}" -type f ! -name 'player.tokens.db' -name "*.db" -delete + fn_wipe_exit_code + else + echo -e "no .db file(s) to remove" + fn_sleep_time + fn_script_log_pass "no .db file(s) to remove" + fi + fi +} + +fn_map_wipe_warning() { + fn_print_warn "Map wipe will reset the map data and keep blueprint data" + fn_script_log_warn "Map wipe will reset the map data and keep blueprint data" + totalseconds=3 + for seconds in {3..1}; do + fn_print_warn "Map wipe will reset the map data and keep blueprint data: ${totalseconds}" + totalseconds=$((totalseconds - 1)) + sleep 1 + if [ "${seconds}" == "0" ]; then + break + fi + done + fn_print_warn_nl "Map wipe will reset the map data and keep blueprint data" +} + +fn_full_wipe_warning() { + fn_print_warn "Server wipe will reset the map data and remove blueprint data" + fn_script_log_warn "Server wipe will reset the map data and remove blueprint data" + totalseconds=3 + for seconds in {3..1}; do + fn_print_warn "Server wipe will reset the map data and remove blueprint data: ${totalseconds}" + totalseconds=$((totalseconds - 1)) + sleep 1 + if [ "${seconds}" == "0" ]; then + break + fi + done + fn_print_warn_nl "Server wipe will reset the map data and remove blueprint data" +} + +# Will change the seed if the seed is not defined by the user. +fn_wipe_random_seed() { + if [ -f "${datadir}/${selfname}-seed.txt" ] && [ -n "${randomseed}" ]; then + shuf -i 1-2147483647 -n 1 > "${datadir}/${selfname}-seed.txt" + seed=$(cat "${datadir}/${selfname}-seed.txt") + randomseed=1 + echo -en "generating new random seed (${cyan}${seed}${default})..." + fn_script_log_pass "Generating new random seed (${cyan}${seed}${default})" + fn_sleep_time + fn_print_ok_eol_nl + fi +} + +# A summary of what wipe is going to do. +fn_wipe_details() { + fn_print_information_nl "Wipe does not remove Rust+ data." + echo -en "* Wipe map data: " + if [ -n "${serverwipe}" ] || [ -n "${mapwipe}" ]; then + fn_print_yes_eol_nl + else + fn_print_no_eol_nl + fi + + echo -en "* Wipe blueprint data: " + if [ -n "${serverwipe}" ]; then + fn_print_yes_eol_nl + else + fn_print_no_eol_nl + fi + + echo -en "* Change Procedural Map seed: " + if [ -n "${randomseed}" ]; then + fn_print_yes_eol_nl + else + fn_print_no_eol_nl + fi +} + +fn_print_dots "" +check.sh +fix_rust.sh + +# Check if there is something to wipe. +if [ -n "$(find "${serveridentitydir}" -type f -name "*.map")" ] || [ -n "$(find "${serveridentitydir}" -type f -name "*.sav*")" ] && [ -n "$(find "${serveridentitydir}" -type f ! -name 'player.tokens.db' -name "*.db")" ]; then + if [ -n "${serverwipe}" ]; then + wipetype="Full wipe" + fn_full_wipe_warning + fn_wipe_details + elif [ -n "${mapwipe}" ]; then + wipetype="Map wipe" + fn_map_wipe_warning + fn_wipe_details + fi + check_status.sh + if [ "${status}" != "0" ]; then + fn_print_restart_warning + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + fn_wipe_files + fn_wipe_random_seed + fn_print_complete_nl "${wipetype}" + fn_script_log_pass "${wipetype}" + exitbypass=1 + command_start.sh + fn_firstcommand_reset + else + fn_wipe_files + fn_wipe_random_seed + fn_print_complete_nl "${wipetype}" + fn_script_log_pass "${wipetype}" + fi +else + fn_print_ok_nl "Wipe not required" + fn_script_log_pass "Wipe not required" +fi +core_exit.sh diff --git a/lgsm/functions/compress_unreal2_maps.sh b/lgsm/functions/compress_unreal2_maps.sh new file mode 100644 index 000000000..0c32d3c77 --- /dev/null +++ b/lgsm/functions/compress_unreal2_maps.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# LinuxGSM compress_unreal2_maps.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Compresses unreal maps. + +commandname="MAP-COMPRESSOR" +commandaction="Compressing maps" +functionselfname="$(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 diff --git a/lgsm/functions/compress_ut99_maps.sh b/lgsm/functions/compress_ut99_maps.sh new file mode 100644 index 000000000..9aa074ba9 --- /dev/null +++ b/lgsm/functions/compress_ut99_maps.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# LinuxGSM compress_ut99_maps.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Compresses unreal maps. + +commandname="MAP-COMPRESSOR" +commandaction="Compressing maps" +functionselfname="$(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 diff --git a/lgsm/functions/fix.sh b/lgsm/functions/fix.sh new file mode 100644 index 000000000..57f6a91fa --- /dev/null +++ b/lgsm/functions/fix.sh @@ -0,0 +1,88 @@ +#!/bin/bash +# LinuxGSM fix.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Overall function for managing fixes. +# Runs functions that will fix an issue. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +# Messages that are displayed for some fixes. +fn_fix_msg_start() { + fn_print_dots "Applying ${fixname} fix: ${gamename}" + fn_print_info "Applying ${fixname} fix: ${gamename}" + fn_script_log_info "Applying ${fixname} fix: ${gamename}" +} + +fn_fix_msg_start_nl() { + fn_print_dots "Applying ${fixname} fix: ${gamename}" + fn_print_info_nl "Applying ${fixname} fix: ${gamename}" + fn_script_log_info "Applying ${fixname} fix: ${gamename}" +} + +fn_fix_msg_end() { + if [ $? != 0 ]; then + fn_print_error_nl "Applying ${fixname} fix: ${gamename}" + fn_script_log_error "Applying ${fixname} fix: ${gamename}" + else + fn_print_ok_nl "Applying ${fixname} fix: ${gamename}" + fn_script_log_pass "Applying ${fixname} fix: ${gamename}" + fi +} + +fn_exists_fix() { + local short="${1:?}" + + if [ "$(type -t "fix_${short}.sh")" == 'function' ]; then + return 0 + else + return 1 + fi +} + +fn_apply_fix() { + local phase_message="${1:?}" + local short="${2:?}" + + if fn_exists_fix "${short}"; then + "fix_${short}.sh" + else + fn_print_error_nl "${shortname} is marked to apply pre start fix but there is no fix registered" + fi +} + +apply_pre_start_fix=(arma3 armar ark av bt bo csgo cmw dst hw ins nmrih onset rust rw sdtd sfc sof2 squad st tf2 terraria ts3 mcb mta unt vh wurm zmr) +apply_post_install_fix=(av kf kf2 lo ro samp ut2k4 ut ut3) + +# validate registered fixes for safe development +for fix in "${apply_pre_start_fix[@]}" "${apply_post_install_fix[@]}"; do + if ! fn_exists_fix "${fix}"; then + fn_print_fail_nl "fix_${fix}.sh is registered but doesn't exist. Typo or did you miss to modify core_functions.sh?" + exitcode 1 + core_exit.sh + fi +done + +# Fixes that are run on start. +if [ "${commandname}" != "INSTALL" ] && [ -z "${fixbypass}" ]; then + if [ "${appid}" ]; then + fix_steamcmd.sh + fi + + if grep -qEe "(^|\s)${shortname}(\s|$)" <<< "${apply_pre_start_fix[@]}"; then + fn_apply_fix "pre start" "${shortname}" + fi +fi + +# Fixes that are run on install only. +if [ "${commandname}" == "INSTALL" ]; then + if grep -qEe "(^|\s)${shortname}(\s|$)" <<< "${apply_post_install_fix[@]}"; then + echo -e "" + echo -e "${lightyellow}Applying Post-Install Fixes${default}" + echo -e "=================================" + fn_sleep_time + postinstall=1 + fn_apply_fix "post install" "${shortname}" + fi +fi diff --git a/lgsm/functions/fix_ark.sh b/lgsm/functions/fix_ark.sh new file mode 100644 index 000000000..f8e0447e3 --- /dev/null +++ b/lgsm/functions/fix_ark.sh @@ -0,0 +1,62 @@ +#!/bin/bash +# LinuxGSM fix_ark.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves various issues with ARK: Survival Evolved. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +# removes mulitple appworkshop_346110.acf if found. +steamappsfilewc="$(find "${HOME}" -name appworkshop_346110.acf | wc -l)" +if [ "${steamappsfilewc}" -gt "1" ]; then + fixname="multiple appworkshop acf files" + fn_fix_msg_start + find "${HOME}" -name appworkshop_346110.acf -exec rm -f {} \; + fn_fix_msg_end +elif [ "${steamappsfilewc}" -eq "1" ]; then + # Steam mods directory selecter + # This allows LinxuGSM to select either ~/.steam or ~/Steam. depending on what is being used + steamappsfile=$(find "${HOME}" -name appworkshop_346110.acf) + steamappsdir=$(dirname "${steamappsfile}") + steamappspath=$( + cd "${steamappsdir}" || return + cd ../ + pwd + ) + + # removes the symlink if exists. + # fixes issue with older versions of LinuxGSM linking to /home/arkserver/steamcmd + if [ -L "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux" ]; then + fixname="broken SteamCMD symlink" + fn_fix_msg_start + unlink "${serverfiles:?}/Engine/Binaries/ThirdParty/SteamCMD/Linux" + fn_fix_msg_end + check_steamcmd.sh + fi + + # removed ARK steamcmd directory if steamcmd is missing. + if [ ! -f "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamcmd.sh" ]; then + fixname="remove invalid ARK SteamCMD directory" + fn_fix_msg_start + rm -rf "${serverfiles:?}/Engine/Binaries/ThirdParty/SteamCMD/Linux" + fn_fix_msg_end + check_steamcmd.sh + fi + + # if the steamapps symlink is incorrect unlink it. + if [ -d "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux" ] && [ -L "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps" ] && [ "$(readlink "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps")" != "${steamappspath}" ]; then + fixname="incorrect steamapps symlink" + fn_fix_msg_start + unlink "${serverfiles:?}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps" + fn_fix_msg_end + fi + + # Put symlink to steamapps directory into the ARK SteamCMD directory to link the downloaded mods to the correct location. + if [ ! -L "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps" ]; then + fixname="steamapps symlink" + fn_fix_msg_start + ln -s "${steamappspath}" "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps" + fn_fix_msg_end + fi +fi diff --git a/lgsm/functions/fix_arma3.sh b/lgsm/functions/fix_arma3.sh new file mode 100644 index 000000000..bbf14c9d2 --- /dev/null +++ b/lgsm/functions/fix_arma3.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# LinuxGSM fix_arma3.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves an issue with ARMA3. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +# Fixes: 20150 Segmentation fault (core dumped) error. +if [ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Arma 3" ] || [ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Arma 3 - Other Profiles" ]; then + fixname="20150 Segmentation fault (core dumped)" + fn_fix_msg_start + mkdir -p "${XDG_DATA_HOME:="${HOME}/.local/share"}/Arma 3 - Other Profiles" + fn_fix_msg_end +fi diff --git a/lgsm/functions/fix_armar.sh b/lgsm/functions/fix_armar.sh new file mode 100644 index 000000000..9db42f51a --- /dev/null +++ b/lgsm/functions/fix_armar.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# LinuxGSM fix_armar.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves an issue with Arma Reforger. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +# Fixes: Profile directory doesn't exist. +# Issue Link: https://feedback.bistudio.com/T164845 +if [ ! -d "${serverprofilefullpath}" ]; then + fixname="Profile directory doesn't exist" + fn_fix_msg_start + mkdir -p "${serverprofilefullpath}" + fn_fix_msg_end +fi diff --git a/lgsm/functions/fix_av.sh b/lgsm/functions/fix_av.sh new file mode 100644 index 000000000..a61a8be65 --- /dev/null +++ b/lgsm/functions/fix_av.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# LinuxGSM fix_av.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves startup issue with Avorion + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/linux64" + +# Generates the server config if it doesn't exist. +if [ ! -f "${servercfgfullpath}" ]; then + startparameters="--datapath ${avdatapath} --galaxy-name ${selfname} --init-folders-only" + fn_print_information "starting ${gamename} server to generate configs." + fn_sleep_time + cd "${systemdir}" || exit + eval "${executable} ${startparameters}" +fi diff --git a/lgsm/functions/fix_bo.sh b/lgsm/functions/fix_bo.sh new file mode 100644 index 000000000..453691874 --- /dev/null +++ b/lgsm/functions/fix_bo.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# LinuxGSM fix_hw.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves various issues with Ballistic Overkill. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/BODS_Data/Plugins/x86_64" diff --git a/lgsm/functions/fix_bt.sh b/lgsm/functions/fix_bt.sh new file mode 100644 index 000000000..07fd61ce5 --- /dev/null +++ b/lgsm/functions/fix_bt.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# LinuxGSM fix_bt.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves an issue with Barotrauma. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +# Fixes: Missing user data directory error. +if [ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Daedalic Entertainment GmbH/Barotrauma" ]; then + fixname="Missing user data directory error." + fn_fix_msg_start + mkdir -p "${XDG_DATA_HOME:="${HOME}/.local/share"}/Daedalic Entertainment GmbH/Barotrauma" + fn_fix_msg_end +fi + +# check if startscript is with windows line endings and reformat it +if file -b "${serverfiles}${executable:1}" | grep -q CRLF; then + fixname="Convert ${executable:2} to unix file format" + fn_fix_msg_start + dos2unix -q "${serverfiles}${executable:1}" + fn_fix_msg_end +fi diff --git a/lgsm/functions/fix_cmw.sh b/lgsm/functions/fix_cmw.sh new file mode 100644 index 000000000..192f483e8 --- /dev/null +++ b/lgsm/functions/fix_cmw.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# LinuxGSM fix_cmw.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves the issue of the not starting server on linux + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +if [ ! -f "${executabledir}/steam_appid.txt" ]; then + fixname="steam_appid.txt" + fn_fix_msg_start + echo 219640 > "${executabledir}/steam_appid.txt" + fn_fix_msg_end +fi + +if [ ! -f "${servercfgfullpath}" ]; then + fn_fix_msg_start + fixname="copy config" + mkdir "${servercfgdir}" + cp "${systemdir}/UDKGame/Config/"*.ini "${servercfgdir}" + fn_fix_msg_end +fi diff --git a/lgsm/functions/fix_csgo.sh b/lgsm/functions/fix_csgo.sh new file mode 100644 index 000000000..a393f2fd9 --- /dev/null +++ b/lgsm/functions/fix_csgo.sh @@ -0,0 +1,42 @@ +#!/bin/bash +# LinuxGSM fix_csgo.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves various issues with CS:GO. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +# Fixes: server not always creating steam_appid.txt file. +if [ ! -f "${serverfiles}/steam_appid.txt" ]; then + fixname="730 steam_appid.txt" + fn_fix_msg_start + echo -n "730" >> "${serverfiles}/steam_appid.txt" + fn_fix_msg_end +fi + +# Fixes: Error parsing BotProfile.db - unknown attribute 'Rank'". +if [ -f "${systemdir}/botprofile.db" ] && grep "^\s*Rank" "${systemdir}/botprofile.db" > /dev/null 2>&1; then + fixname="botprofile.db" + fn_fix_msg_start + sed -i 's/^\s*Rank/\t\/\/Rank/g' "${systemdir}/botprofile.db" > /dev/null 2>&1 + fn_fix_msg_end +fi + +# Fixes: Unknown command "cl_bobamt_vert" and exec: couldn't exec joystick.cfg. +if [ -f "${servercfgdir}/valve.rc" ] && grep -E '^\s*exec\s*(default|joystick)\.cfg' "${servercfgdir}/valve.rc" > /dev/null 2>&1; then + fixname="valve.rc" + fn_fix_msg_start + sed -i 's/^\s*exec\s*default.cfg/\/\/exec default.cfg/g' "${servercfgdir}/valve.rc" > /dev/null 2>&1 + sed -i 's/^\s*exec\s*joystick.cfg/\/\/exec joystick.cfg/g' "${servercfgdir}/valve.rc" > /dev/null 2>&1 + fn_fix_msg_end +fi + +# Fixes: Detected engine 11 but could not load: /home/csgo/serverfiles/bin/libgcc_s.so.1: version `GCC_7.0.0' not found (required by /lib/i386-linux-gnu/libstdc++.so.6) +libgccc_so="${serverfiles}/bin/libgcc_s.so.1" +if [ -f "${libgccc_so}" ]; then + fixname="libgcc_s.so.1 move away" + fn_fix_msg_start + mv -v "${libgccc_so}" "${libgccc_so}.bck" + fn_fix_msg_end +fi diff --git a/lgsm/functions/fix_dst.sh b/lgsm/functions/fix_dst.sh new file mode 100644 index 000000000..e30507dc9 --- /dev/null +++ b/lgsm/functions/fix_dst.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# LinuxGSM fix_dst.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves various issues with Don't Starve Together. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +# Fixes: ./dontstarve_dedicated_server_nullrenderer: ./lib32/libcurl-gnutls.so.4: no version information available (required by ./dontstarve_dedicated_server_nullrenderer). +# Issue only occures on CentOS as libcurl-gnutls.so.4 is called libcurl.so.4 on CentOS. +if [ -f "/etc/redhat-release" ] && [ ! -f "${serverfiles}/bin/lib32/libcurl-gnutls.so.4" ]; then + fixname="libcurl-gnutls.so.4" + fn_fix_msg_start + ln -s "/usr/lib/libcurl.so.4" "${serverfiles}/bin/lib32/libcurl-gnutls.so.4" + fn_fix_msg_end +fi diff --git a/lgsm/functions/fix_hw.sh b/lgsm/functions/fix_hw.sh new file mode 100644 index 000000000..af06924db --- /dev/null +++ b/lgsm/functions/fix_hw.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# LinuxGSM fix_hw.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves various issues with Hurtworld. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/Hurtworld_Data/Plugins/x86_64" diff --git a/lgsm/functions/fix_ins.sh b/lgsm/functions/fix_ins.sh new file mode 100644 index 000000000..21a979c4c --- /dev/null +++ b/lgsm/functions/fix_ins.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# LinuxGSM fix_ins.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves various issues with Insurgency. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +# Fixes: ./srcds_linux: error while loading shared libraries: libtier0.so: cannot open shared object file: No such file or directory. + +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/bin" + +# Fixes: issue #529 - gamemode not passed to debug or start. + +if [ "${commandname}" == "DEBUG" ]; then + defaultmap="\"${defaultmap}\"" +else + defaultmap="\\\"${defaultmap}\\\"" +fi diff --git a/lgsm/functions/fix_kf.sh b/lgsm/functions/fix_kf.sh new file mode 100644 index 000000000..e749a2d27 --- /dev/null +++ b/lgsm/functions/fix_kf.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# LinuxGSM fix_kf.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves various issues with Killing Floor. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +echo -e "Applying WebAdmin ROOst.css fix." +echo -e "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13" +sed -i 's/none}/none;/g' "${serverfiles}/Web/ServerAdmin/ROOst.css" +sed -i 's/underline}/underline;/g' "${serverfiles}/Web/ServerAdmin/ROOst.css" +fn_sleep_time +echo -e "Applying WebAdmin CharSet fix." +echo -e "http://forums.tripwireinteractive.com/showpost.php?p=442340&postcount=1" +sed -i 's/CharSet="iso-8859-1"/CharSet="utf-8"/g' "${systemdir}/UWeb.int" +fn_sleep_time +echo -e "applying server name fix." +fn_sleep_time +echo -e "forcing server restart..." +fn_sleep_time +exitbypass=1 +command_start.sh +fn_firstcommand_reset +sleep 5 +exitbypass=1 +command_stop.sh +fn_firstcommand_reset +exitbypass=1 +command_start.sh +fn_firstcommand_reset +sleep 5 +exitbypass=1 +command_stop.sh +fn_firstcommand_reset diff --git a/lgsm/functions/fix_kf2.sh b/lgsm/functions/fix_kf2.sh new file mode 100644 index 000000000..b680a9937 --- /dev/null +++ b/lgsm/functions/fix_kf2.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# LinuxGSM fix_kf2.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves various issues with Killing Floor 2. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +startparameters="\"${defaultmap}?Game=KFGameContent.KFGameInfo_VersusSurvival\"" + +fn_print_information "starting ${gamename} server to generate configs." +fn_sleep_time +exitbypass=1 +command_start.sh +fn_firstcommand_reset +sleep 10 +exitbypass=1 +command_stop.sh +fn_firstcommand_reset diff --git a/lgsm/functions/fix_lo.sh b/lgsm/functions/fix_lo.sh new file mode 100644 index 000000000..eec2ebd36 --- /dev/null +++ b/lgsm/functions/fix_lo.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# LinuxGSM fix_lo.sh function +# Author: Daniel Gibbs +# Website: https://linuxgsm.com +# Description: Resolves installation issue with Last Oasis + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +appidfile=${executabledir}/steam_appid.txt +if [ ! -f "${appidfile}" ]; then + fn_print_information "adding ${appidfile} to ${gamename} server." + fn_sleep_time + echo "903950" > "${appidfile}" +else + fn_print_information "${appidfile} already exists. No action to be taken." + fn_sleep_time +fi diff --git a/lgsm/functions/fix_mcb.sh b/lgsm/functions/fix_mcb.sh new file mode 100644 index 000000000..4768a40cf --- /dev/null +++ b/lgsm/functions/fix_mcb.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# LinuxGSM fix_mcb.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves possible startup issue with Minecraft Bedrock. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +# official docs state that the server should be started with: LD_LIBRARY_PATH=. ./bedrock_server +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}" diff --git a/lgsm/functions/fix_mta.sh b/lgsm/functions/fix_mta.sh new file mode 100644 index 000000000..2c92e8d12 --- /dev/null +++ b/lgsm/functions/fix_mta.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# LinuxGSM fix_mta.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Installs the libmysqlclient for database functions on the server. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +if [ ! -f "${lgsmdir}/lib/libmysqlclient.so.16" ]; then + fixname="libmysqlclient16" + fn_fix_msg_start_nl + fn_sleep_time + fn_fetch_file "https://nightly.mtasa.com/files/modules/64/libmysqlclient.so.16" "" "" "" "${lgsmdir}/lib" "libmysqlclient.so.16" "chmodx" "norun" "noforce" "6c188e0f8fb5d7a29f4bc413b9fed6c2" + fn_fix_msg_end +fi diff --git a/lgsm/functions/fix_nmrih.sh b/lgsm/functions/fix_nmrih.sh new file mode 100644 index 000000000..4bb70c6f9 --- /dev/null +++ b/lgsm/functions/fix_nmrih.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# LinuxGSM fix_nmrih.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Create symlinks for renamed No More Room In Hell serverfiles. +# Solution from Steam Community post: https://steamcommunity.com/app/224260/discussions/2/1732089092441769414/ + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +ln -s "${serverfiles}/bin/vphysics_srv.so" "${serverfiles}/bin/vphysics.so" +ln -s "${serverfiles}/bin/studiorender_srv.so" "${serverfiles}/bin/studiorender.so" +ln -s "${serverfiles}/bin/soundemittersystem_srv.so" "${serverfiles}/bin/soundemittersystem.so" +ln -s "${serverfiles}/bin/shaderapiempty_srv.so" "${serverfiles}/bin/shaderapiempty.so" +ln -s "${serverfiles}/bin/scenefilecache_srv.so" "${serverfiles}/bin/scenefilecache.so" +ln -s "${serverfiles}/bin/replay_srv.so" "${serverfiles}/bin/replay.so" +ln -s "${serverfiles}/bin/materialsystem_srv.so" "${serverfiles}/bin/materialsystem.so" diff --git a/lgsm/functions/fix_onset.sh b/lgsm/functions/fix_onset.sh new file mode 100644 index 000000000..e4183999d --- /dev/null +++ b/lgsm/functions/fix_onset.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# LinuxGSM fix_onset.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves various issues with Onset. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}" + +# Fixes: Failed loading "mariadb": libmariadbclient.so.18: cannot open shared object file: No such file or directory +# Issue only occures on CentOS as libmariadbclient.so.18 is called libmariadb.so.3 on CentOS. +if [ -f "/etc/redhat-release" ] && [ ! -f "${serverfiles}/libmariadbclient.so.18" ] && [ -f "/usr/lib64/libmariadb.so.3" ]; then + fixname="libmariadbclient.so.18" + fn_fix_msg_start + ln -s "/usr/lib64/libmariadb.so.3" "${serverfiles}/libmariadbclient.so.18" + fn_fix_msg_end +fi diff --git a/lgsm/functions/fix_ro.sh b/lgsm/functions/fix_ro.sh new file mode 100644 index 000000000..895c7c2da --- /dev/null +++ b/lgsm/functions/fix_ro.sh @@ -0,0 +1,39 @@ +#!/bin/bash +# LinuxGSM fix_ro.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves various issues with Red Orchestra. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +echo -e "Applying WebAdmin ROOst.css fix." +echo -e "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13" +sed -i 's/none}/none;/g' "${serverfiles}/Web/ServerAdmin/ROOst.css" +sed -i 's/underline}/underline;/g' "${serverfiles}/Web/ServerAdmin/ROOst.css" +fn_sleep_time +echo -e "Applying WebAdmin CharSet fix." +echo -e "http://forums.tripwireinteractive.com/showpost.php?p=442340&postcount=1" +sed -i 's/CharSet="iso-8859-1"/CharSet="utf-8"/g' "${systemdir}/uweb.int" +fn_sleep_time +echo -e "Applying Steam AppID fix." +sed -i 's/1210/1200/g' "${systemdir}/steam_appid.txt" +fn_sleep_time +echo -e "applying server name fix." +fn_sleep_time +echo -e "forcing server restart..." +fn_sleep_time +exitbypass=1 +command_start.sh +fn_firstcommand_reset +sleep 5 +exitbypass=1 +command_stop.sh +fn_firstcommand_reset +exitbypass=1 +command_start.sh +fn_firstcommand_reset +sleep 5 +exitbypass=1 +command_stop.sh +fn_firstcommand_reset diff --git a/lgsm/functions/fix_rust.sh b/lgsm/functions/fix_rust.sh new file mode 100644 index 000000000..5f407e89f --- /dev/null +++ b/lgsm/functions/fix_rust.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# LinuxGSM fix_rust.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves startup issue with Rust. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +# Fixes: [Raknet] Server Shutting Down (Shutting Down). +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/RustDedicated_Data/Plugins/x86_64" + +# Part of random seed feature. +# If seed is not defined by user generate a seed file. +if [ -z "${seed}" ] || [ "${seed}" == "0" ]; then + if [ ! -f "${datadir}/${selfname}-seed.txt" ]; then + shuf -i 1-2147483647 -n 1 > "${datadir}/${selfname}-seed.txt" + seed="$(cat "${datadir}/${selfname}-seed.txt")" + fn_print_info_nl "Generating new random seed (${cyan}${seed}${default})" + fn_script_log_pass "Generating new random seed (${cyan}${seed}${default})" + fi + seed="$(cat "${datadir}/${selfname}-seed.txt")" + randomseed=1 +fi + +# If Carbon mod is installed, run enviroment.sh +if [ -f "${serverfiles}/carbon/tools/environment.sh" ]; then + fn_print_info_nl "Running Carbon environment.sh" + fn_script_log_info "Running Carbon environment.sh" + # shellcheck source=/dev/null + source "${serverfiles}/carbon/tools/environment.sh" +fi diff --git a/lgsm/functions/fix_rw.sh b/lgsm/functions/fix_rw.sh new file mode 100644 index 000000000..aef41a703 --- /dev/null +++ b/lgsm/functions/fix_rw.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# LinuxGSM fix_rw.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves various issues with Rising World. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/linux64" diff --git a/lgsm/functions/fix_samp.sh b/lgsm/functions/fix_samp.sh new file mode 100644 index 000000000..a88bf154f --- /dev/null +++ b/lgsm/functions/fix_samp.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# LinuxGSM fix_sfc.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves issue that the default rcon password is not changed + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +if [ -f "${servercfgfullpath}" ]; then + # check if default password is set "changeme" + currentpass=$(grep -E "^rcon_password" "${servercfgfullpath}" | sed 's/^rcon_password //') + defaultpass="changeme" + # check if default password is set + if [ "${currentpass}" == "${defaultpass}" ]; then + fixname="change default rcon password" + fn_fix_msg_start + fn_script_log_info "changing rcon/admin password." + random=$(tr -dc A-Za-z0-9_ < /dev/urandom | head -c 8 | xargs) + rconpass="admin${random}" + sed -i "s/rcon_password changeme/rcon_password ${rconpass}/g" "${servercfgfullpath}" + fn_fix_msg_end + fi + # check if the hostname is the default name + currenthostname=$(grep -E "^hostname" "${servercfgfullpath}" | sed 's/^hostname //') + defaulthostname="SA-MP 0.3 Server" + if [ "${currenthostname}" == "${defaulthostname}" ]; then + fixname="change default hostname" + fn_fix_msg_start + fn_script_log_info "changing default hostname to LinuxGSM" + sed -i "s/hostname ${defaulthostname}/hostname LinuxGSM/g" "${servercfgfullpath}" + fn_fix_msg_end + fi +fi diff --git a/lgsm/functions/fix_sdtd.sh b/lgsm/functions/fix_sdtd.sh new file mode 100644 index 000000000..e93db7970 --- /dev/null +++ b/lgsm/functions/fix_sdtd.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# LinuxGSM fix_sdtd.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves various issues with 7 Days to Die. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}/7DaysToDieServer_Data/Plugins/x86_64" diff --git a/lgsm/functions/fix_sfc.sh b/lgsm/functions/fix_sfc.sh new file mode 100644 index 000000000..51b95b9d5 --- /dev/null +++ b/lgsm/functions/fix_sfc.sh @@ -0,0 +1,48 @@ +#!/bin/bash +# LinuxGSM fix_sfc.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves various issues with Source Forts Classic. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +if [ ! -f "${serverfiles}/bin/datacache.so" ]; then + ln -s "${serverfiles}/bin/datacache_srv.so" "${serverfiles}/bin/datacache.so" +fi + +if [ ! -f "${serverfiles}/bin/dedicated.so" ]; then + ln -s "${serverfiles}/bin/dedicated_srv.so" "${serverfiles}/bin/dedicated.so" +fi + +if [ ! -f "${serverfiles}/bin/engine.so" ]; then + ln -s "${serverfiles}/bin/engine_srv.so" "${serverfiles}/bin/engine.so" +fi + +if [ ! -f "${serverfiles}/bin/materialsystem.so" ]; then + ln -s "${serverfiles}/bin/materialsystem_srv.so" "${serverfiles}/bin/materialsystem.so" +fi + +if [ ! -f "${serverfiles}/bin/replay.so" ]; then + ln -s "${serverfiles}/bin/replay_srv.so" "${serverfiles}/bin/replay.so" +fi + +if [ ! -f "${serverfiles}/bin/shaderapiempty.so" ]; then + ln -s "${serverfiles}/bin/shaderapiempty_srv.so" "${serverfiles}/bin/shaderapiempty.so" +fi + +if [ ! -f "${serverfiles}/bin/soundemittersystem.so" ]; then + ln -s "${serverfiles}/bin/soundemittersystem_srv.so" "${serverfiles}/bin/soundemittersystem.so" +fi + +if [ ! -f "${serverfiles}/bin/studiorender.so" ]; then + ln -s "${serverfiles}/bin/studiorender_srv.so" "${serverfiles}/bin/studiorender.so" +fi + +if [ ! -f "${serverfiles}/bin/vphysics.so" ]; then + ln -s "${serverfiles}/bin/vphysics_srv.so" "${serverfiles}/bin/vphysics.so" +fi + +if [ ! -f "${serverfiles}/bin/scenefilecache.so" ]; then + ln -s "${serverfiles}/bin/scenefilecache_srv.so" "${serverfiles}/bin/scenefilecache.so" +fi diff --git a/lgsm/functions/fix_sof2.sh b/lgsm/functions/fix_sof2.sh new file mode 100644 index 000000000..002f42952 --- /dev/null +++ b/lgsm/functions/fix_sof2.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# LinuxGSM fix_rust.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves various issues with Soldier of Fortune 2. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +# Fixes: error while loading shared libraries: libcxa.so.1 +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}" diff --git a/lgsm/functions/fix_squad.sh b/lgsm/functions/fix_squad.sh new file mode 100644 index 000000000..7d5929b5d --- /dev/null +++ b/lgsm/functions/fix_squad.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# LinuxGSM fix_squad.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves various issues with Squad. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +# As the server base dir changed for the game, we need to migrate the default config from the old to the new location +oldservercfg="${serverfiles}/Squad/ServerConfig/${servercfg}" +if [ -f "${oldservercfg}" ] && [ -f "${servercfgfullpath}" ]; then + # diff old and new config - if it is different move the old config over the new one + if [ "$(diff -c "${oldservercfg}" "${servercfgfullpath}" | wc -l)" -gt 0 ]; then + fixname="Migrate server config to new Game folder" + fn_fix_msg_start + mv -v "${oldservercfg}" "${servercfgfullpath}" + fn_fix_msg_end + else + fixname="remove the same config from old configdir" + fn_fix_msg_start + rm -f "${oldservercfg}" + fn_fix_msg_end + + fi +fi diff --git a/lgsm/functions/fix_st.sh b/lgsm/functions/fix_st.sh new file mode 100644 index 000000000..b9fb5b084 --- /dev/null +++ b/lgsm/functions/fix_st.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# LinuxGSM fix_rust.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves startup issue with Stationeers. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +# Fixes: [Raknet] Server Shutting Down (Shutting Down). +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/rocketstation_DedicatedServer_Data/Plugins/x86_64" diff --git a/lgsm/functions/fix_steamcmd.sh b/lgsm/functions/fix_steamcmd.sh new file mode 100644 index 000000000..9644208dc --- /dev/null +++ b/lgsm/functions/fix_steamcmd.sh @@ -0,0 +1,141 @@ +#!/bin/bash +# LinuxGSM fix_steamcmd.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves various issues related to SteamCMD. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +# function to simplify the steamclient.so fix +# example +# fn_fix_steamclient_so 32|64 (bit) "${serverfiles}/linux32/" +fn_fix_steamclient_so() { + # $1 type of fix 32 or 64 as possible values + # $2 as destination where the lib will be copied to + if [ "$1" == "32" ]; then + # steamclient.so x86 fix. + if [ ! -f "${2}/steamclient.so" ]; then + fixname="steamclient.so x86" + fn_fix_msg_start + if [ ! -d "${2}" ]; then + mkdir -p "${2}" + fi + if [ -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" ]; then + cp "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${2}/steamclient.so" + elif [ -f "${steamcmddir}/linux32/steamclient.so" ]; then + cp "${steamcmddir}/linux32/steamclient.so" "${2}/steamclient.so" + elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux32/steamclient.so" ]; then + cp "${HOME}/.local/share/Steam/steamcmd/linux32/steamclient.so" "${2}/steamclient.so" + fi + fn_fix_msg_end + fi + elif [ "$1" == "64" ]; then + # steamclient.so x86_64 fix. + if [ ! -f "${2}/steamclient.so" ]; then + fixname="steamclient.so x86_64" + fn_fix_msg_start + if [ ! -d "${2}" ]; then + mkdir -p "${2}" + fi + if [ -f "${HOME}/.steam/steamcmd/linux64/steamclient.so" ]; then + cp "${HOME}/.steam/steamcmd/linux64/steamclient.so" "${2}/steamclient.so" + elif [ -f "${steamcmddir}/linux64/steamclient.so" ]; then + cp "${steamcmddir}/linux64/steamclient.so" "${2}/steamclient.so" + elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux64/steamclient.so" ]; then + cp "${HOME}/.local/share/Steam/steamcmd/linux64/steamclient.so" "${2}/steamclient.so" + fi + fn_fix_msg_end + fi + fi +} + +# Helps fix: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam,or a local steamclient.so. +steamsdk64="${HOME}/.steam/sdk64" +steamclientsdk64="${steamsdk64}/steamclient.so" +# remove any old unlinked versions of steamclient.so +if [ -f "${steamclientsdk64}" ]; then + if [ "$(stat -c '%h' "${steamclientsdk64}")" -eq 1 ]; then + fixname="steamclient.so sdk64 - remove old file" + fn_fix_msg_start + rm -f "${steamclientsdk64}" + fn_fix_msg_end + fi +fi + +# place new hardlink for the file to the disk +if [ ! -f "${steamclientsdk64}" ]; then + fixname="steamclient.so sdk64 hardlink" + fn_fix_msg_start + if [ ! -d "${steamsdk64}" ]; then + mkdir -p "${steamsdk64}" + fi + if [ -f "${HOME}/.steam/steamcmd/linux64/steamclient.so" ]; then + ln "${HOME}/.steam/steamcmd/linux64/steamclient.so" "${steamclientsdk64}" + elif [ -f "${steamcmddir}/linux64/steamclient.so" ]; then + ln "${steamcmddir}/linux64/steamclient.so" "${steamclientsdk64}" + elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux64/steamclient.so" ]; then + ln "${HOME}/.local/share/Steam/steamcmd/linux64/steamclient.so" "${steamclientsdk64}" + else + fn_print_fail_nl "Could not copy any steamclient.so 64bit for the gameserver" + fi + fn_fix_msg_end +fi + +# Helps fix: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam,or a local steamclient.so. +steamsdk32="${HOME}/.steam/sdk32" +steamclientsdk32="${HOME}/.steam/sdk32/steamclient.so" +if [ -f "${steamclientsdk32}" ]; then + if [ " $(stat -c '%h' "${steamclientsdk32}")" -eq 1 ]; then + fixname="steamclient.so sdk32 - remove old file" + fn_fix_msg_start + rm -f "${steamclientsdk32}" + fn_fix_msg_end + fi +fi + +# place new hardlink for the file to the disk +if [ ! -f "${steamclientsdk32}" ]; then + fixname="steamclient.so sdk32 link" + fn_fix_msg_start + if [ ! -d "${steamsdk32}" ]; then + mkdir -p "${steamsdk32}" + fi + if [ -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" ]; then + ln "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${steamclientsdk32}" + elif [ -f "${steamcmddir}/linux32/steamclient.so" ]; then + ln "${steamcmddir}/linux32/steamclient.so" "${steamclientsdk32}" + elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux32/steamclient.so" ]; then + ln "${HOME}/.local/share/Steam/steamcmd/linux32/steamclient.so" "${steamclientsdk32}" + else + fn_print_fail_nl "Could not copy any steamclient.so 32bit for the gameserver" + fi + fn_fix_msg_end +fi + +# steamclient.so fixes +if [ "${shortname}" == "bo" ]; then + fn_fix_steamclient_so "32" "${serverfiles}/BODS_Data/Plugins/x86" + fn_fix_steamclient_so "64" "${serverfiles}/BODS_Data/Plugins/x86_64" +elif [ "${shortname}" == "cmw" ]; then + fn_fix_steamclient_so "32" "${executabledir}/lib" +elif [ "${shortname}" == "cs" ]; then + fn_fix_steamclient_so "32" "${serverfiles}" +elif [ "${shortname}" == "col" ]; then + fn_fix_steamclient_so "64" "${serverfiles}" +elif [ "${shortname}" == "ins" ]; then + fn_fix_steamclient_so "32" "${serverfiles}/bin" +elif [ "${shortname}" == "pz" ]; then + fn_fix_steamclient_so "32" "${serverfiles}/linux32" + fn_fix_steamclient_so "64" "${serverfiles}/linux64" +elif [ "${shortname}" == "pvr" ]; then + fn_fix_steamclient_so "64" "${executabledir}" +elif [ "${shortname}" == "ss3" ]; then + fn_fix_steamclient_so "32" "${serverfiles}/Bin" +elif [ "${shortname}" == "tu" ]; then + fn_fix_steamclient_so "64" "${executabledir}" +elif [ "${shortname}" == "unt" ]; then + fn_fix_steamclient_so "64" "${serverfiles}" +elif [ "${shortname}" == "wurm" ]; then + fn_fix_steamclient_so "64" "${serverfiles}/nativelibs" +fi diff --git a/lgsm/functions/fix_terraria.sh b/lgsm/functions/fix_terraria.sh new file mode 100644 index 000000000..7758fdad9 --- /dev/null +++ b/lgsm/functions/fix_terraria.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# LinuxGSM fix_terraria.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves an issue with Terraria. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +export TERM=xterm diff --git a/lgsm/functions/fix_tf2.sh b/lgsm/functions/fix_tf2.sh new file mode 100644 index 000000000..77e41a969 --- /dev/null +++ b/lgsm/functions/fix_tf2.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# LinuxGSM fix_tf2.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves various issues with Team Fortress 2. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +# Fixes: Team Fortress 2 Segmentation fault for Red-Hat Distros #2062. +if [ -f "/etc/redhat-release" ] && [ ! -f "${serverfiles}/bin/libcurl-gnutls.so.4" ]; then + fixname="libcurl-gnutls.so.4" + fn_fix_msg_start + ln -s "/usr/lib/libcurl.so.4" "${serverfiles}/bin/libcurl-gnutls.so.4" + fn_fix_msg_end +fi diff --git a/lgsm/functions/fix_ts3.sh b/lgsm/functions/fix_ts3.sh new file mode 100644 index 000000000..7c7387cb6 --- /dev/null +++ b/lgsm/functions/fix_ts3.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# LinuxGSM fix_ts3.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves various issues with Teamspeak 3. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +# Fixes: makes libmariadb2 available #1924. +if [ ! -f "${serverfiles}/libmariadb.so.2" ]; then + fixname="libmariadb.so.2" + fn_fix_msg_start + cp "${serverfiles}/redist/libmariadb.so.2" "${serverfiles}/libmariadb.so.2" + fn_fix_msg_end +fi + +# Fixes: failed to register local accounting service: No such file or directory. +accountingfile="/dev/shm/7gbhujb54g8z9hu43jre8" +if [ -f "${accountingfile}" ] && [ "${status}" == "0" ]; then + # Check permissions for the file if the current user owns it, if not exit. + if [ "$(stat -c %U ${accountingfile})" == "$(whoami)" ]; then + fixname="Delete file ${accountingfile}" + fn_fix_msg_start + rm -f "${accountingfile}" + fn_fix_msg_end + # file is not owned by the current user and needs to be deleted manually. + else + fn_print_error_nl "File ${accountingfile} is not owned by $(whoami) and needs to be deleted manually" + fn_script_log_fatal "File ${accountingfile} is not owned by $(whoami) and needs to be deleted manually" + core_exit.sh + fi +fi diff --git a/lgsm/functions/fix_unt.sh b/lgsm/functions/fix_unt.sh new file mode 100644 index 000000000..eae2e6313 --- /dev/null +++ b/lgsm/functions/fix_unt.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# LinuxGSM fix_rust.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves startup issue with Unturned. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/Unturned_Headless_Data/Plugins/x86_64" diff --git a/lgsm/functions/fix_ut.sh b/lgsm/functions/fix_ut.sh new file mode 100644 index 000000000..2e6686a8d --- /dev/null +++ b/lgsm/functions/fix_ut.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# LinuxGSM fix_ut.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves various issues with Unreal Tournament. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +#Set Binary Executable +echo -e "chmod +x ${executabledir}/${executable}" +chmod +x "${executabledir}/${executable}" +fn_sleep_time diff --git a/lgsm/functions/fix_ut2k4.sh b/lgsm/functions/fix_ut2k4.sh new file mode 100644 index 000000000..49610e4b6 --- /dev/null +++ b/lgsm/functions/fix_ut2k4.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# LinuxGSM fix_ut2k4.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves various issues with Unreal Tournament 2004. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +echo -e "applying WebAdmin ut2003.css fix." +echo -e "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13" +sed -i 's/none}/none;/g' "${serverfiles}/Web/ServerAdmin/ut2003.css" +sed -i 's/underline}/underline;/g' "${serverfiles}/Web/ServerAdmin/ut2003.css" +fn_sleep_time +echo -e "applying WebAdmin CharSet fix." +echo -e "http://forums.tripwireinteractive.com/showpost.php?p=442340&postcount=1" +sed -i 's/CharSet="iso-8859-1"/CharSet="utf-8"/g' "${systemdir}/UWeb.int" +fn_sleep_time +echo -e "applying server name fix." +fn_sleep_time +echo -e "forcing server restart." +fn_sleep_time +exitbypass=1 +command_start.sh +fn_firstcommand_reset +sleep 5 +exitbypass=1 +command_stop.sh +fn_firstcommand_reset +exitbypass=1 +command_start.sh +fn_firstcommand_reset +sleep 5 +exitbypass=1 +command_stop.sh +fn_firstcommand_reset diff --git a/lgsm/functions/fix_ut3.sh b/lgsm/functions/fix_ut3.sh new file mode 100644 index 000000000..6bd26a53a --- /dev/null +++ b/lgsm/functions/fix_ut3.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# LinuxGSM fix_ut2.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves various issues with Unreal Tournament 3. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +startparameters="server VCTF-Suspense?Game=UTGameContent.UTVehicleCTFGame_Content?bIsDedicated=true?bIsLanMatch=false?bUsesStats=false?bShouldAdvertise=false?PureServer=1?bAllowJoinInProgress=true?ConfigSubDir=${selfname} -port=${port} -queryport=${queryport} -multihome=${ip} -nohomedir -unattended -log=${gamelog}" + +fn_print_information "starting ${gamename} server to generate configs." +fn_sleep_time +exitbypass=1 +command_start.sh +fn_firstcommand_reset +sleep 10 +exitbypass=1 +command_stop.sh +fn_firstcommand_reset diff --git a/lgsm/functions/fix_vh.sh b/lgsm/functions/fix_vh.sh new file mode 100644 index 000000000..a90c5d0b0 --- /dev/null +++ b/lgsm/functions/fix_vh.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# LinuxGSM fix_rust.sh function +# Author: Alasdair Haig +# Website: https://linuxgsm.com +# Description: Resolves startup issue with Valheim + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +export LD_LIBRARY_PATH=./linux64:$LD_LIBRARY_PATH + +modsdir="${lgsmdir}/mods" +modsinstalledlistfullpath="${modsdir}/installed-mods.txt" +if [ -f "${modsinstalledlistfullpath}" ]; then + # special check if Valheim Plus is installed + if grep -qE "^valheimplus" "${modsinstalledlistfullpath}"; then + if ! grep -qE "^executable=\"./start_server_bepinex.sh\"" "${configdirserver}/${selfname}.cfg"; then + echo 'executable="./start_server_bepinex.sh"' >> "${configdirserver}/${selfname}.cfg" + executable="./start_server_bepinex.sh" + fi + fi + # special exports for BepInEx if installed + if grep -qE "^bepinexvh" "${modsinstalledlistfullpath}"; then + fn_print_info_nl "BepInEx install detected, applying start exports" + fn_script_log_info "BepInEx install detected, applying start exports" + # exports for BepInEx framework from script start_server_bepinex.sh + export DOORSTOP_ENABLE=TRUE + export DOORSTOP_INVOKE_DLL_PATH=./BepInEx/core/BepInEx.Preloader.dll + export DOORSTOP_CORLIB_OVERRIDE_PATH=./unstripped_corlib + + export LD_LIBRARY_PATH="./doorstop_libs:${LD_LIBRARY_PATH}" + export LD_PRELOAD="libdoorstop_x64.so:${LD_PRELOAD}" + + export SteamAppId=892970 + fi +fi diff --git a/lgsm/functions/fix_wurm.sh b/lgsm/functions/fix_wurm.sh new file mode 100644 index 000000000..aba24d382 --- /dev/null +++ b/lgsm/functions/fix_wurm.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# LinuxGSM fix_wurm.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves various issues with Wurm Unlimited. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +# First run requires start with no parms. +# After first run new dirs are created. +if [ ! -d "${serverfiles}/Creative" ]; then + parmsbypass=1 + fixbypass=1 + exitbypass=1 + command_start.sh + fn_firstcommand_reset + sleep 10 + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + unset parmsbypass +fi diff --git a/lgsm/functions/fix_zmr.sh b/lgsm/functions/fix_zmr.sh new file mode 100644 index 000000000..491c36638 --- /dev/null +++ b/lgsm/functions/fix_zmr.sh @@ -0,0 +1,48 @@ +#!/bin/bash +# LinuxGSM fix_sfc.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves various issues with Zombie Master: Reborn. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +if [ ! -f "${serverfiles}/bin/datacache.so" ]; then + ln -s "${serverfiles}/bin/datacache_srv.so" "${serverfiles}/bin/datacache.so" +fi + +if [ ! -f "${serverfiles}/bin/dedicated.so" ]; then + ln -s "${serverfiles}/bin/dedicated_srv.so" "${serverfiles}/bin/dedicated.so" +fi + +if [ ! -f "${serverfiles}/bin/engine.so" ]; then + ln -s "${serverfiles}/bin/engine_srv.so" "${serverfiles}/bin/engine.so" +fi + +if [ ! -f "${serverfiles}/bin/materialsystem.so" ]; then + ln -s "${serverfiles}/bin/materialsystem_srv.so" "${serverfiles}/bin/materialsystem.so" +fi + +if [ ! -f "${serverfiles}/bin/replay.so" ]; then + ln -s "${serverfiles}/bin/replay_srv.so" "${serverfiles}/bin/replay.so" +fi + +if [ ! -f "${serverfiles}/bin/shaderapiempty.so" ]; then + ln -s "${serverfiles}/bin/shaderapiempty_srv.so" "${serverfiles}/bin/shaderapiempty.so" +fi + +if [ ! -f "${serverfiles}/bin/soundemittersystem.so" ]; then + ln -s "${serverfiles}/bin/soundemittersystem_srv.so" "${serverfiles}/bin/soundemittersystem.so" +fi + +if [ ! -f "${serverfiles}/bin/studiorender.so" ]; then + ln -s "${serverfiles}/bin/studiorender_srv.so" "${serverfiles}/bin/studiorender.so" +fi + +if [ ! -f "${serverfiles}/bin/vphysics.so" ]; then + ln -s "${serverfiles}/bin/vphysics_srv.so" "${serverfiles}/bin/vphysics.so" +fi + +if [ ! -f "${serverfiles}/bin/scenefilecache.so" ]; then + ln -s "${serverfiles}/bin/scenefilecache_srv.so" "${serverfiles}/bin/scenefilecache.so" +fi diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh new file mode 100644 index 000000000..f29e621d5 --- /dev/null +++ b/lgsm/functions/info_distro.sh @@ -0,0 +1,281 @@ +#!/bin/bash +# LinuxGSM info_distro.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Variables providing useful info on the Operating System such as disk and performace info. +# Used for command_details.sh, command_debug.sh and alert.sh. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +### Game Server pid +if [ "${status}" == "1" ]; then + gameserverpid="$(tmux list-sessions -F "#{session_name} #{pane_pid}" | grep "^${sessionname} " | awk '{print $NF}')" + if [ "${engine}" == "source" ]; then + srcdslinuxpid="$(ps -ef | grep -v grep | grep "${gameserverpid}" | grep srcds_linux | awk '{print $2}')" + elif [ "${engine}" == "goldsrc" ]; then + hldslinuxpid="$(ps -ef | grep -v grep | grep "${gameserverpid}" | grep hlds_linux | awk '{print $2}')" + fi +fi +### Distro information + +## Distro +# Returns architecture, kernel and distro/os. +arch="$(uname -m)" +kernel="$(uname -r)" + +# Distro Name - Ubuntu 16.04 LTS +# Distro Version - 16.04 +# Distro ID - ubuntu +# Distro Codename - xenial + +# Gathers distro info from various sources filling in missing gaps. +distro_info_array=(os-release lsb_release hostnamectl debian_version redhat-release) +for distro_info in "${distro_info_array[@]}"; do + if [ -f "/etc/os-release" ] && [ "${distro_info}" == "os-release" ]; then + distroname="$(grep "PRETTY_NAME" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')" + distroversion="$(grep "VERSION_ID" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')" + # Special var for rhel like distros to removed point in number e.g 8.4 to just 8. + distroversionrh="$(sed -nr 's/^VERSION_ID="([0-9]*).+?"/\1/p' /etc/os-release)" + distroid="$(grep "ID=" /etc/os-release | grep -v _ID | awk -F\= '{gsub(/"/,"",$2);print $2}')" + distroidlike="$(grep "ID_LIKE=" /etc/os-release | grep -v _ID | awk -F\= '{gsub(/"/,"",$2);print $2}')" + distrocodename="$(grep "VERSION_CODENAME" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')" + elif [ "$(command -v lsb_release 2> /dev/null)" ] && [ "${distro_info}" == "lsb_release" ]; then + if [ -z "${distroname}" ]; then + distroname="$(lsb_release -sd)" + elif [ -z "${distroversion}" ]; then + distroversion="$(lsb_release -sr)" + elif [ -z "${distroid}" ]; then + distroid="$(lsb_release -si)" + elif [ -z "${distrocodename}" ]; then + distrocodename="$(lsb_release -sc)" + fi + elif [ "$(command -v hostnamectl 2> /dev/null)" ] && [ "${distro_info}" == "hostnamectl" ]; then + if [ -z "${distroname}" ]; then + distroname="$(hostnamectl | grep "Operating System" | sed 's/Operating System: //g')" + fi + elif [ -f "/etc/debian_version" ] && [ "${distro_info}" == "debian_version" ]; then + if [ -z "${distroname}" ]; then + distroname="Debian $(cat /etc/debian_version)" + elif [ -z "${distroversion}" ]; then + distroversion="$(cat /etc/debian_version)" + elif [ -z "${distroid}" ]; then + distroid="debian" + fi + elif [ -f "/etc/redhat-release" ] && [ "${distro_info}" == "redhat-release" ]; then + if [ -z "${distroname}" ]; then + distroname="$(cat /etc/redhat-release)" + elif [ -z "${distroversion}" ]; then + distroversion="$(rpm -qa \*-release | grep -Ei "oracle|redhat|centos|fedora" | cut -d"-" -f3)" + elif [ -z "${distroid}" ]; then + distroid="$(awk '{print $1}' /etc/redhat-release)" + fi + fi +done + +# some RHEL based distros use 8.4 instead of just 8. +if [[ "${distroidlike}" == *"rhel"* ]] || [ "${distroid}" == "rhel" ]; then + distroversioncsv="${distroversionrh}" +else + distroversioncsv="${distroversion}" +fi + +# Check if distro supported by distro vendor. +if [ "$(command -v distro-info 2> /dev/null)" ]; then + distrosunsupported="$(distro-info --unsupported)" + distrosunsupported_array=("${distrosunsupported}") + for distrounsupported in "${distrosunsupported_array[@]}"; do + if [ "${distrounsupported}" == "${distrocodename}" ]; then + distrosupport=unsupported + break + else + distrosupport=supported + fi + done +else + distrosupport=unknown +fi + +## Glibc version +# e.g: 1.17 +glibcversion="$(ldd --version | sed -n '1s/.* //p')" + +## tmux version +# e.g: tmux 1.6 +if [ ! "$(command -V tmux 2> /dev/null)" ]; then + tmuxv="${red}NOT INSTALLED!${default}" + tmuxvdigit="0" +else + tmuxvdigit="$(tmux -V | sed "s/tmux //" | sed -n '1 p' | tr -cd '[:digit:]')" + if [ "${tmuxvdigit}" -lt "16" ]; then + tmuxv="$(tmux -V) (>= 1.6 required for console log)" + else + tmuxv="$(tmux -V)" + fi +fi + +if [ "$(command -V java 2> /dev/null)" ]; then + javaversion="$(java -version 2>&1 | grep "version")" +fi + +if [ "$(command -v mono 2> /dev/null)" ]; then + monoversion="$(mono --version 2>&1 | grep -Po '(?<=version )\d')" +fi + +## Uptime +uptime="$(< /proc/uptime)" +uptime=${uptime/[. ]*/} +minutes="$((uptime / 60 % 60))" +hours="$((uptime / 60 / 60 % 24))" +days="$((uptime / 60 / 60 / 24))" + +### Performance information + +## Average server load +load="$(uptime | awk -F 'load average: ' '{ print $2 }')" + +## CPU information +cpumodel="$(awk -F: '/model name/ {name=$2} END {print name}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//')" +cpucores="$(awk -F: '/model name/ {core++} END {print core}' /proc/cpuinfo)" +cpufreqency="$(awk -F: '/cpu MHz/ {freq=$2} END {print freq}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//')" +# CPU usage of the game server pid +if [ -n "${gameserverpid}" ]; then + cpuused="$(ps --forest -o pcpu -g "${gameserverpid}" | awk '{s+=$1} END {print s}')" + cpuusedmhz="$(echo "${cpufreqency} * ${cpuused} / 100" | bc)" +fi + +## Memory information +# Available RAM and swap. + +# Newer distros can use numfmt to give more accurate results. +if [ "$(command -v numfmt 2> /dev/null)" ]; then + # Issue #2005 - Kernel 3.14+ contains MemAvailable which should be used. All others will be calculated. + + # get the raw KB values of these fields. + physmemtotalkb="$(grep MemTotal /proc/meminfo | awk '{print $2}')" + physmemfreekb="$(grep ^MemFree /proc/meminfo | awk '{print $2}')" + physmembufferskb="$(grep ^Buffers /proc/meminfo | awk '{print $2}')" + physmemcachedkb="$(grep ^Cached /proc/meminfo | awk '{print $2}')" + physmemreclaimablekb="$(grep ^SReclaimable /proc/meminfo | awk '{print $2}')" + + # check if MemAvailable Exists. + if grep -q ^MemAvailable /proc/meminfo; then + physmemactualfreekb="$(grep ^MemAvailable /proc/meminfo | awk '{print $2}')" + else + physmemactualfreekb="$((physmemfreekb + physmembufferskb + physmemcachedkb))" + fi + + # Available RAM and swap. + physmemtotalmb="$((physmemtotalkb / 1024))" + physmemtotal="$(numfmt --to=iec --from=iec --suffix=B "${physmemtotalkb}K")" + physmemfree="$(numfmt --to=iec --from=iec --suffix=B "${physmemactualfreekb}K")" + physmemused="$(numfmt --to=iec --from=iec --suffix=B "$((physmemtotalkb - physmemfreekb - physmembufferskb - physmemcachedkb - physmemreclaimablekb))K")" + physmemavailable="$(numfmt --to=iec --from=iec --suffix=B "${physmemactualfreekb}K")" + physmemcached="$(numfmt --to=iec --from=iec --suffix=B "$((physmemcachedkb + physmemreclaimablekb))K")" + + swaptotal="$(numfmt --to=iec --from=iec --suffix=B "$(grep ^SwapTotal /proc/meminfo | awk '{print $2}')K")" + swapfree="$(numfmt --to=iec --from=iec --suffix=B "$(grep ^SwapFree /proc/meminfo | awk '{print $2}')K")" + swapused="$(numfmt --to=iec --from=iec --suffix=B "$(($(grep ^SwapTotal /proc/meminfo | awk '{print $2}') - $(grep ^SwapFree /proc/meminfo | awk '{print $2}')))K")" + # RAM usage of the game server pid + # MB + if [ "${gameserverpid}" ]; then + memused="$(ps --forest -o rss -g "${gameserverpid}" | awk '{s+=$1} END {print s}' | awk '{$1/=1024;printf "%.0f",$1}{print $2}')" + # % + pmemused="$(ps --forest -o %mem -g "${gameserverpid}" | awk '{s+=$1} END {print s}')" + fi +else + # Older distros will need to use free. + # Older versions of free do not support -h option. + if [ "$( + free -h > /dev/null 2>&1 + echo $? + )" -ne "0" ]; then + humanreadable="-m" + else + humanreadable="-h" + fi + physmemtotalmb="$(free -m | awk '/Mem:/ {print $2}')" + physmemtotal="$(free ${humanreadable} | awk '/Mem:/ {print $2}')" + physmemfree="$(free ${humanreadable} | awk '/Mem:/ {print $4}')" + physmemused="$(free ${humanreadable} | awk '/Mem:/ {print $3}')" + + oldfree="$(free ${humanreadable} | awk '/cache:/')" + if [ "${oldfree}" ]; then + physmemavailable="n/a" + physmemcached="n/a" + else + physmemavailable="$(free ${humanreadable} | awk '/Mem:/ {print $7}')" + physmemcached="$(free ${humanreadable} | awk '/Mem:/ {print $6}')" + fi + + swaptotal="$(free ${humanreadable} | awk '/Swap:/ {print $2}')" + swapused="$(free ${humanreadable} | awk '/Swap:/ {print $3}')" + swapfree="$(free ${humanreadable} | awk '/Swap:/ {print $4}')" +fi + +### Disk information + +## Available disk space on the partition. +filesystem="$(LC_ALL=C df -hP "${rootdir}" | tail -n 1 | awk '{print $1}')" +totalspace="$(LC_ALL=C df -hP "${rootdir}" | tail -n 1 | awk '{print $2}')" +usedspace="$(LC_ALL=C df -hP "${rootdir}" | tail -n 1 | awk '{print $3}')" +availspace="$(LC_ALL=C df -hP "${rootdir}" | tail -n 1 | awk '{print $4}')" + +## LinuxGSM used space total. +rootdirdu="$(du -sh "${rootdir}" 2> /dev/null | awk '{print $1}')" +if [ -z "${rootdirdu}" ]; then + rootdirdu="0M" +fi + +## LinuxGSM used space in serverfiles dir. +serverfilesdu="$(du -sh "${serverfiles}" 2> /dev/null | awk '{print $1}')" +if [ -z "${serverfilesdu}" ]; then + serverfilesdu="0M" +fi + +## LinuxGSM used space total minus backup dir. +rootdirduexbackup="$(du -sh --exclude="${backupdir}" "${serverfiles}" 2> /dev/null | awk '{print $1}')" +if [ -z "${rootdirduexbackup}" ]; then + rootdirduexbackup="0M" +fi + +## Backup info +if [ -d "${backupdir}" ]; then + # Used space in backups dir. + backupdirdu="$(du -sh "${backupdir}" | awk '{print $1}')" + # If no backup dir, size is 0M. + if [ -z "${backupdirdu}" ]; then + backupdirdu="0M" + fi + + # number of backups set to 0 by default. + backupcount=0 + + # If there are backups in backup dir. + if [ "$(find "${backupdir}" -name "*.tar.gz" | wc -l)" -ne "0" ]; then + # number of backups. + backupcount="$(find "${backupdir}"/*.tar.gz | wc -l)" + # most recent backup. + lastbackup="$(ls -1t "${backupdir}"/*.tar.gz | head -1)" + # date of most recent backup. + lastbackupdate="$(date -r "${lastbackup}")" + # no of days since last backup. + lastbackupdaysago="$((($(date +'%s') - $(date -r "${lastbackup}" +'%s')) / 60 / 60 / 24))" + # size of most recent backup. + lastbackupsize="$(du -h "${lastbackup}" | awk '{print $1}')" + fi +fi + +# Network Interface name +netint=$(${ipcommand} -o addr | grep "${ip}" | awk '{print $2}') +netlink=$(${ethtoolcommand} "${netint}" 2> /dev/null | grep Speed | awk '{print $2}') + +# Sets the SteamCMD glibc requirement if the game server requirement is less or not required. +if [ "${appid}" ]; then + if [ "${glibc}" = "null" ] || [ -z "${glibc}" ] || [ "$(printf '%s\n'${glibc}'\n' "2.14" | sort -V | head -n 1)" != "2.14" ]; then + glibc="2.14" + fi +fi + +# Gather Port Info using ss +ssinfo="$(ss -tuplwn)" diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh new file mode 100644 index 000000000..8c9ca310a --- /dev/null +++ b/lgsm/functions/info_game.sh @@ -0,0 +1,2600 @@ +#!/bin/bash +# LinuxGSM info_game.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Gathers various game server information. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +## Examples of filtering to get info from config files. +# sed 's/foo//g' - remove foo +# tr -cd '[:digit:]' leave only digits +# tr -d '=\"; ' remove selected characters =\"; +# grep -v "foo" filter out lines that contain foo +# cut -f1 -d "/" remove everything after / + +fn_info_game_ac() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + adminpassword="${unavailable}" + httpport="${zero}" + port="${zero}" + queryport="${zero}" + servername="${unavailable}" + else + adminpassword=$(grep "ADMIN_PASSWORD" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/ADMIN_PASSWORD//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + httpport=$(grep "HTTP_PORT" "${servercfgfullpath}" | tr -cd '[:digit:]') + port=$(grep "TCP_PORT" "${servercfgfullpath}" | tr -cd '[:digit:]') + queryport="${httpport}" + servername=$(grep "NAME" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/NAME//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | head -n 1) + + # Not set + adminpassword=${adminpassword:-"NOT SET"} + httpport=${httpport:-"0"} + port=${port:-"0"} + queryport=${queryport:-"0"} + servername=${servername:-"NOT SET"} + + fi +} + +fn_info_game_ark() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + adminpassword="${unavailable}" + servername="${unavailable}" + serverpassword="${unavailable}" + else + adminpassword=$(sed -nr 's/^ServerAdminPassword=(.*)/\1/p' "${servercfgfullpath}") + servername=$(sed -nr 's/^SessionName=(.*)/\1/p' "${servercfgfullpath}") + serverpassword=$(sed -nr 's/^ServerPassword=(.*)/\1/p' "${servercfgfullpath}") + + # Not set + adminpassword=${adminpassword:-"NOT SET"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + fi + + # Parameters + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + queryport=${queryport:-"0"} + rawport=$((port + 1)) + rconport=${rconport:-"0"} +} + +fn_info_game_arma3() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + adminpassword="${unavailable}" + maxplayers="${zero}" + servername="${unavailable}" + serverpassword="${unavailable}" + else + adminpassword=$(sed -nr 's/^passwordAdmin\s*=\s*"(.*)"\s*;/\1/p' "${servercfgfullpath}") + maxplayers=$(sed -nr 's/^maxPlayers\s*=\s*([0-9]+)\s*;/\1/p' "${servercfgfullpath}") + servername=$(sed -nr 's/^hostname\s*=\s*"(.*)"\s*;/\1/p' "${servercfgfullpath}") + serverpassword=$(sed -nr 's/^password\s*=\s*"(.*)"\s*;/\1/p' "${servercfgfullpath}") + + # Not set + adminpassword=${adminpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + fi + + # Parameters + battleeyeport=$((port + 4)) + port=${port:-"2302"} + queryport=$((port + 1)) + steammasterport=$((port + 2)) + voiceport=${port:-"2302"} + voiceunusedport=$((port + 3)) +} + +fn_info_game_armar() { + if [ ! -f "${servercfgfullpath}" ]; then + adminpassword="${unavailable}" + maxplayers="${zero}" + port=${port:-"0"} + queryport= + servername="${unavailable}" + serverpassword="${unavailable}" + else + adminpassword=$(jq -r '.adminPassword' "${servercfgfullpath}") + battleeyeport=1376 + configip=$(jq -r '.gameHostBindAddress' "${servercfgfullpath}") + maxplayers=$(jq -r '.game.playerCountLimit' "${servercfgfullpath}") + port=$(jq -r '.gameHostBindPort' "${servercfgfullpath}") + queryport=$(jq -r '.steamQueryPort' "${servercfgfullpath}") + servername=$(jq -r '.game.name' "${servercfgfullpath}") + serverpassword=$(jq -r '.game.password' "${servercfgfullpath}") + + # Not set + adminpassword=${adminpassword:-"NOT SET"} + configip=${configip:-"0.0.0.0"} + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + queryport=${queryport:-"0"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + fi +} + +fn_info_game_av() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + maxplayers="${unavailable}" + servername="${unavailable}" + serverpassword="${unavailable}" + port=${zero} + queryport=${zero} + steamqueryport=${zero} + steammasterport=${zero} + rconport=${zero} + rconenabled="${unavailable}" + rconpassword="${unavailable}" + else + maxplayers=$(grep "maxPlayers=" "${servercfgfullpath}" | sed 's/maxPlayers=//') + servername=$(grep "name=" "${servercfgfullpath}" | sed 's/name=//') + serverpassword=$(grep "password=" "${servercfgfullpath}" | sed 's/password=//') + port=$(grep "port=" "${servercfgfullpath}" | sed 's/port=//') + queryport=$((port + 3)) + steamqueryport=$((port + 20)) + steammasterport=$((port + 21)) + rconport=$(grep "rconPort=" "${servercfgfullpath}" | sed 's/rconPort=//') + + rconpassword=$(grep "rconPassword=" "${servercfgfullpath}" | sed 's/rconPassword=//') + if [ -n "${rconpassword}" ]; then + rconenabled="true" + fi + + # Not set + maxplayers=${maxplayers:-"0"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + port=${port:-"0"} + queryport=${queryport:-"0"} + steamqueryport=${steamqueryport:-"0"} + steammasterport=${steammasterport:-"0"} + rconport=${rconport:-"0"} + rconenabled=${rconenabled:-"NOT SET"} + rconpassword=${rconpassword:-"NOT SET"} + fi +} + +fn_info_game_bf1942() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + maxplayers="${zero}" + port="${zero}" + queryport="${zero}" + else + servername=$(grep -E "^game.serverName " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverName //g' | tr -d '=\";,:' | xargs) + serverpassword=$(grep "game.serverPassword" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/game.serverPassword//g' | tr -d '=\";,:' | xargs) + maxplayers=$(grep "game.serverMaxPlayers" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') + port=$(grep "game.serverPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') + queryport="22000" + configip=$(grep "game.serverIP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverIP//g' | tr -d '=\";,:' | xargs) + + # Not set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + queryport=${queryport:-"0"} + configip=${configip:-"0.0.0.0"} + fi +} + +fn_info_game_bfv() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + maxplayers="${zero}" + port="${zero}" + queryport="${zero}" + else + servername=$(grep "game.serverName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverName//g' | tr -d '=\";,:' | xargs) + serverpassword=$(grep "game.serverPassword" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/game.serverPassword//g' | tr -d '=\";,:' | xargs) + maxplayers=$(grep "game.serverMaxPlayers" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') + port=$(grep "game.serverPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') + queryport="23000" + configip=$(grep "game.serverIP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverIP//g' | tr -d '=\";,:' | xargs) + + # Not set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + queryport=${queryport:-"0"} + configip=${configip:-"0.0.0.0"} + fi +} + +fn_info_game_bo() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + port="${zero}" + queryport="${zero}" + maxplayers="${unavailable}" + else + servername=$(grep "ServerName=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "Password=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + port=$(grep "ServerPort=" "${servercfgfullpath}" | tr -cd '[:digit:]') + queryport=$((port + 1)) + maxplayers=$(grep "MaxPlayers=" "${servercfgfullpath}" | tr -cd '[:digit:]') + + # Not set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + port=${port:-"0"} + queryport=${queryport:-"0"} + maxplayers=${maxplayers:-"0"} + fi +} + +fn_info_game_bt() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + port="${zero}" + queryport="${zero}" + maxplayers="${unavailable}" + else + servername=$(grep -Po 'name="\K.*(?=")' "${servercfgfullpath}") # Assuming GNU grep is used + serverpassword=$(grep -Po 'password="\K.*(?=")' "${servercfgfullpath}") # Assuming GNU grep is used + port=$(grep " port=" "${servercfgfullpath}" | tr -cd '[:digit:]') + queryport=$(grep "queryport=" "${servercfgfullpath}" | tr -cd '[:digit:]') + maxplayers=$(grep "maxplayers=" "${servercfgfullpath}" | tr -cd '[:digit:]') + + # Not set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + port=${port:-"0"} + queryport=${queryport:-"0"} + maxplayers=${maxplayers:-"0"} + fi +} + +fn_info_game_btl() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + gamemode="${unavailable}" + else + servername=$(grep -m2 "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "Password" "${servercfgfullpath}" | grep -v "RCONPassword" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + gamemode=$(grep -m2 "PlayMode" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/PlayMode//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + # Not set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + gamemode=${gamemode:-"NOT SET"} + fi + + # Parameters + port=${port:-"0"} + queryport=${queryport:-"0"} + rconport=$((port + 2)) +} + +fn_info_game_cd() { + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + port="${zero}" + rconenabled="false" + rconport="${zero}" + rconpassword="${unavailable}" + steamport="${zero}" + maxplayers="${zero}" + else + servername=$(jq -r '.game_title' "${servercfgfullpath}") + port=$(jq -r '.game_port' "${servercfgfullpath}") + steamport=$(jq -r '.steam_port_messages' "${servercfgfullpath}") + rconenabled=$(jq -r '.rcon' "${servercfgfullpath}") + rconport=$(jq -r '.rcon_port' "${servercfgfullpath}") + rconpassword=$(jq -r '.rcon_password' "${servercfgfullpath}") + maxplayers=$(jq -r '.player_count' "${servercfgfullpath}") + fi +} + +fn_info_game_ck() { + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + maxplayers="${zero}" + else + servername=$(jq -r '.worldName' "${servercfgfullpath}") + maxplayers=$(jq -r '.maxNumberPlayers' "${servercfgfullpath}") + fi + queryport=$((port + 1)) +} + +fn_info_game_cmw() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + adminpassword="${unavailable}" + rconport=${zero} + servername="${unavailable}" + serverpassword="${unavailable}" + + else + adminpassword=$(grep -E "^adminpassword=" "${servercfgfullpath}" | tr -cd '[:digit:]') + rconport=$(grep -E "^RConPort=" "${servercfgdir}/DefaultGame.ini" | tr -cd '[:digit:]') + servername=$(grep -E "^ServerName" "${servercfgfullpath}" | sed 's/^ServerName=//') + serverpassword=$(grep -E "^GamePassword" "${servercfgfullpath}" | sed 's/^ServerName=//') + + # Not set + adminpassword=${adminpassword:-"NOT SET"} + rconport=${rconport:-"0"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + fi + + # Parameters + defaultmap=${defaultmap:-"NOT SET"} + port=${port:-"0"} + queryport=${queryport:-"0"} +} + +fn_info_game_cod() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + rconpassword="${unavailable}" + else + servername=$(grep "sv_hostname " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | xargs) + rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + # Not set + servername=${servername:-"NOT SET"} + rconpassword=${rconpassword=:-"NOT SET"} + fi + + # Parameters + defaultmap=${defaultmap:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} +} + +fn_info_game_coduo() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + rconpassword="${unavailable}" + else + servername=$(grep "sv_hostname " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | xargs) + rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + # Not set + servername=${servername:-"NOT SET"} + rconpassword=${rconpassword=:-"NOT SET"} + fi + + # Parameters + defaultmap=${defaultmap:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + queryport=${port:-"28960"} +} + +fn_info_game_cod2() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + rconpassword="${unavailable}" + else + servername=$(grep "sv_hostname " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | xargs) + rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + # Not set + servername=${servername:-"NOT SET"} + rconpassword=${rconpassword=:-"NOT SET"} + fi + + # Parameters + defaultmap=${defaultmap:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + queryport=${port:-"28960"} +} + +fn_info_game_cod4() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + rconpassword="${unavailable}" + else + servername=$(sed -nr 's/^set\s*sv_hostname\s*"(.*)".*/\1/p' "${servercfgfullpath}") + rconpassword=$(sed -nr 's/^set\s*rcon_password\s*"(.*)"\s*\/.*/\1/p' "${servercfgfullpath}") + queryport=${port:-"28960"} + + # Not set + servername=${servername:-"NOT SET"} + rconpassword=${rconpassword=:-"NOT SET"} + queryport=${queryport:-"28960"} + fi + + # Parameters + defaultmap=${defaultmap:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + queryport=${port:-"28960"} +} + +fn_info_game_codwaw() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + rconpassword="${unavailable}" + else + servername=$(grep "sv_hostname " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | xargs) + rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + # Not set + servername=${servername:-"NOT SET"} + rconpassword=${rconpassword=:-"NOT SET"} + fi + + # Parameters + defaultmap=${defaultmap:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + queryport=${port:-"28960"} +} + +fn_info_game_col() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + maxplayers="${unavailable}" + port="${zero}" + queryport="${zero}" + steamport="${zero}" + rconpassword="${unavailable}" + else + servername=$(jq -r '.ServerSettings.ServerName' "${servercfgfullpath}") + serverpassword=$(jq -r '.ServerSettings.ServerPassword' "${servercfgfullpath}") + maxplayers=$(jq -r '.ServerSettings.MaxPlayerCount' "${servercfgfullpath}") + port=$(jq -r '.ServerSettings.ServerGamePort' "${servercfgfullpath}") + queryport=${port:-"0"} + steamport=$(jq -r '.ServerSettings.ServerSteamPort' "${servercfgfullpath}") + rconpassword=$(jq -r '.ServerSettings.RCONPassword' "${servercfgfullpath}") + configip=$(jq -r '.ServerSettings.ServerIP' "${servercfgfullpath}") + + # Not set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"27004"} + queryport=${queryport:-"0"} + steamport=${steamport:-"27005"} + rconpassword=${rconpassword:-"NOT SET"} + configip=${configip:-"0.0.0.0"} + fi +} + +fn_info_game_dodr() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + maxplayers="${zero}" + else + maxplayers=$(sed -nr 's/^iServerMaxPlayers=(.*)$/\1/p' "${servercfgfullpath}") + + # Not set + maxplayers=${maxplayers:-"0"} + fi + + # Parameters + servername=${servername:-"NOT SET"} + port=${port:-"7777"} + queryport=${queryport:-"27015"} +} + +fn_info_game_dayz() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + adminpassword="${unavailable}" + serverpassword="${unavailable}" + maxplayers="${zero}" + else + servername=$(sed -nr 's/^hostname\s*=\s*"(.*)"\s*;/\1/p' "${servercfgfullpath}") + adminpassword=$(sed -nr 's/^passwordAdmin\s*=\s*"(.*)"\s*;/\1/p' "${servercfgfullpath}") + serverpassword=$(sed -nr 's/^password\s*=\s*"(.*)"\s*;/\1/p' "${servercfgfullpath}") + maxplayers=$(sed -nr 's/^maxPlayers\s*=\s*([0-9]+)\s*;/\1/p' "${servercfgfullpath}") + queryport=$(sed -nr 's/^steamQueryPort\s*=\s*([0-9]+)\s*;/\1/p' "${servercfgfullpath}") + + # Not Set + servername=${servername:-"NOT SET"} + adminpassword=${adminpassword:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + queryport=${queryport:-"27016"} + fi + + # Parameters + port=${port:-"2302"} + steammasterport=$((port + 2)) + battleeyeport=$((port + 4)) +} + +fn_info_game_dst() { + # Config + if [ ! -f "${clustercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + maxplayers="${zero}" + gamemode="${unavailable}" + tickrate="${zero}" + masterport="${zero}" + else + servername=$(grep "cluster_name" "${clustercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/cluster_name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "cluster_password" "${clustercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/cluster_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "max_players" "${clustercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + gamemode=$(grep "game_mode" "${clustercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/game_mode//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + tickrate=$(grep "tick_rate" "${clustercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + masterport=$(grep "master_port" "${clustercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + configip=$(grep "bind_ip" "${clustercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bind_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + # Not set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + gamemode=${gamemode:-"NOT SET"} + tickrate=${tickrate:-"0"} + masterport=${masterport:-"0"} + configip=${configip:-"0.0.0.0"} + fi + + if [ ! -f "${servercfgfullpath}" ]; then + port="${zero}" + steamauthport="${zero}" + steammasterport="${zero}" + else + port=$(grep "server_port" "${servercfgfullpath}" | grep "^server_port" | grep -v "#" | tr -cd '[:digit:]') + steamauthport=$(grep "authentication_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + steammasterport=$(grep "master_server_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + + # Not set + port=${port:-"0"} + steamauthport=${steamauthport:-"0"} + steammasterport=${steammasterport:-"0"} + fi + + # Parameters + sharding=${sharding:-"NOT SET"} + master=${master:-"NOT SET"} + shard=${shard:-"NOT SET"} + cluster=${cluster:-"NOT SET"} + cave=${cave:-"NOT SET"} +} + +fn_info_game_eco() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + maxplayers="${zero}" + tickrate="${zero}" + port="${zero}" + webadminport="${zero}" + else + configip=$(jq -r '.IPAddress' "${servercfgfullpath}") + servername=$(jq -r '.Description' "${servercfgfullpath}") + serverpassword=$(jq -r '.Password' "${servercfgfullpath}") + maxplayers=$(jq -r '.MaxConnections' "${servercfgfullpath}") + tickrate=$(jq -r '.Rate' "${servercfgfullpath}") + port=$(jq -r '.GameServerPort' "${servercfgfullpath}") + webadminport=$(jq -r '.WebServerPort' "${servercfgfullpath}") + + # Not set + configip=${configip:-"0.0.0.0"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers=:-"0"} + tickrate=${tickrate=:-"0"} + port=${port=:-"0"} + webadminport=${webadminport=:-"0"} + fi +} + +fn_info_game_etl() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + rconpassword="${unavailable}" + servername="${unavailable}" + serverpassword="${unavailable}" + maxplayers="${zero}" + port="${zero}" + queryport="${zero}" + else + port=$(grep "set net_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + queryport="${port}" + rconpassword=$(grep "set rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//g' -e '/^\//d' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + servername=$(grep "set sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "set g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "set sv_maxclients" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + configip=$(grep "set net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set net_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + # Not set + rconpassword=${rconpassword:-"NOT SET"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"27960"} + queryport=${queryport:-"27960"} + configip=${configip:-"0.0.0.0"} + fi +} + +fn_info_game_fctr() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="Factorio Server" + serverpassword="${unavailable}" + maxplayers="${zero}" + authtoken="${unavailable}" + savegameinterval="${unavailable}" + versioncount="${unavailable}" + else + servername=$(jq -r '.name' "${servercfgfullpath}") + serverpassword=$(jq -r '.game_password' "${servercfgfullpath}") + maxplayers=$(jq -r '.max_players' "${servercfgfullpath}") + authtoken=$(jq -r '.token' "${servercfgfullpath}") + savegameinterval=$(jq -r '.autosave_interval' "${servercfgfullpath}") + versioncount=$(jq -r '.autosave_slots' "${servercfgfullpath}") + + # Not set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + authtoken=${authtoken:-"NOT SET"} + savegameinterval=${savegameinterval:-"0"} + versioncount=${versioncount:-"0"} + fi + + # Parameters + port=${port:-"0"} + rconport=${rconport:-"0"} + rconpassword=${rconpassword:-"NOT SET"} + + # get server version if installed + local factoriobin="${executabledir}${executable:1}" + if [ -f "${factoriobin}" ]; then + serverversion=$(${factoriobin} --version | grep "Version:" | awk '{print $2}') + fi +} + +fn_info_game_jc2() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverdescription="${unavailable}" + serverpassword="${unavailable}" + maxplayers="${zero}" + port="${zero}" + queryport="${zero}" + else + servername=$(grep "Name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/Name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverdescription=$(grep "Description" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/Description//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "Password" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') + port=$(grep "BindPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') + queryport="${port}" + configip=$(grep "BindIP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/BindIP//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + # Not set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + serverdescription=${serverdescription:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + queryport=${queryport:-"0"} + configip=${configip:-"0.0.0.0"} + fi +} + +fn_info_game_hw() { + # Parameters + servername=${servername:-"NOT SET"} + port=${port:-"0"} + queryport=${queryport:-"0"} + maxplayers=${maxplayers:-"0"} + defaultmap=${defaultmap:-"NOT SET"} + creativemode=${creativemode:-"NOT SET"} +} + +fn_info_game_inss() { + # Parameters + port=${port:-"0"} + queryport=${queryport:-"0"} + rconport=${rconport:-"0"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + defaultmap=${defaultmap:-"NOT SET"} + defaultscenario=${defaultscenario:-"NOT SET"} + maxplayers=${maxplayers:-"0"} +} + +fn_info_game_jc3() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverdescription="${unavailable}" + serverpassword="${unavailable}" + maxplayers="${zero}" + port="${zero}" + queryPort="${zero}" + steamport="${zero}" + httpport="${zero}" + tickrate="${zero}" + else + servername=$(grep "name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverdescription=$(grep "description" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/description//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "\"maxPlayers\"" "${servercfgfullpath}" | tr -cd '[:digit:]') + port=$(grep "\"port\"" "${servercfgfullpath}" | tr -cd '[:digit:]') + queryport=$(grep "\"queryPort\"" "${servercfgfullpath}" | tr -cd '[:digit:]') + steamport=$(grep "\"steamPort\"" "${servercfgfullpath}" | tr -cd '[:digit:]') + httpport=$(grep "\"httpPort\"" "${servercfgfullpath}" | tr -cd '[:digit:]') + tickrate=$(grep "\"maxTickRate\"" "${servercfgfullpath}" | tr -cd '[:digit:]') + configip=$(grep "host" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/host//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + # Not set + servername=${servername:-"NOT SET"} + serverdescription=${serverdescription:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers=:-"0"} + port=${port=:-"0"} + queryport=${queryport=:-"0"} + steamport=${steamport=:-"0"} + httpport=${httpport=:-"0"} + tickrate=${tickrate=:-"0"} + configip=${configip:-"0.0.0.0"} + fi +} + +fn_info_game_jk2() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + rconpassword="${unavailable}" + servername="${unavailable}" + serverpassword="${unavailable}" + maxplayers="${zero}" + serverversion="${unavailable}" + else + rconpassword=$(grep "seta rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta rconpassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + servername=$(grep "seta sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "seta g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "seta sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + serverversion=$(grep "seta mv_serverversion" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta mv_serverversion//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + # Not set + rconpassword=${rconpassword:-"NOT SET"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + serverversion=${serverversion:-"NOT SET"} + fi + + # Parameters + port=${port:-"0"} + queryport=${port} + defaultmap=${defaultmap:-"NOT SET"} +} + +fn_info_game_kf() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + adminpassword="${unavailable}" + port="${zero}" + queryport="${zero}" + queryportgs="${zero}" + steamport="${zero}" + steammasterport="${zero}" + lanport="${zero}" + httpport="${zero}" + webadminenabled="${unavailable}" + webadminuser="${unavailable}" + webadminpass="${unavailable}" + else + servername=$(sed -nr 's/^ServerName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + serverpassword=$(sed -nr 's/^GamePassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + adminpassword=$(sed -nr 's/^AdminPassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + port=$(sed -nr 's/^Port=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') + queryport=$((port + 1)) + queryportgs=$(sed -nr 's/^OldQueryPortNumber=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') + steamport="20560" + steammasterport="28852" + lanport=$(grep "LANServerPort=" "${servercfgfullpath}" | tr -cd '[:digit:]') + httpport=$(sed -nr 's/^ListenPort=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') + webadminenabled=$(sed -nr 's/^bEnabled=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + webadminuser=$(sed -nr 's/^AdminName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + webadminpass="${adminpassword}" + + # Not set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + adminpassword=${adminpassword:-"NOT SET"} + port=${port:-"0"} + queryport=${queryport:-"0"} + queryportgs=${queryportgs:-"0"} + steamport=${steamport:-"0"} + steammasterport=${steammasterport:-"0"} + lanport=${lanport:-"0"} + httpport=${httpport:-"0"} + webadminenabled=${webadminenabled:-"NOT SET"} + webadminuser=${webadminuser:-"NOT SET"} + webadminpass=${webadminpass:-"NOT SET"} + fi + + # Parameters + defaultmap=${defaultmap:-"NOT SET"} +} + +fn_info_game_kf2() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + adminpassword="${unavailable}" + port=${zero} + queryport=${zero} + webadminenabled="${unavailable}" + httpport="${zero}" + webadminuser="${unavailable}" + webadminpass="${unavailable}" + else + servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "GamePassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/GamePassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + adminpassword=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + port=$(grep "Port" "${servercfgdir}/LinuxServer-KFEngine.ini" | sed -e 's/^[ \t]*//g' | grep "^Port" | grep -v "#" | tr -cd '[:digit:]') + webadminenabled=$(grep "bEnabled" "${servercfgdir}/KFWeb.ini" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bEnabled//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + httpport=$(grep "ListenPort" "${servercfgdir}/KFWeb.ini" | grep -v "#" | tr -cd '[:digit:]') + webadminuser="Admin" + webadminpass=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + # Not set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + adminpassword=${adminpassword:-"NOT SET"} + port=${port:-"0"} + webadminenabled=${webadminenabled:-"NOT SET"} + httpport=${webadminport:-"0"} + webadminuser=${webadminuser:-"NOT SET"} + webadminpass=${webadminpass:-"NOT SET"} + fi + + # Parameters + queryport=${queryport:-"0"} + defaultmap=${defaultmap:-"NOT SET"} +} + +fn_info_game_lo() { + # Parameters + servername=${servername:-"NOT SET"} + port=${port:-"0"} + queryport=${queryport:-"0"} + maxplayers=${slots:-"0"} +} + +fn_info_game_mc() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + rconpassword="${unavailable}" + rconport="${zero}" + maxplayers="${zero}" + port="${zero}" + queryport="${zero}" + queryenabled="${unavailable}" + gamemode="${unavailable}" + gameworld="${unavailable}" + else + servername=$(grep "motd" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/motd//g' | tr -d '=\";,:' | sed 's/\\u00A70//g;s/\\u00A71//g;s/\\u00A72//g;s/\\u00A73//g;s/\\u00A74//g;s/\\u00A75//g;s/\\u00A76//g;s/\\u00A77//g;s/\\u00A78//g;s/\\u00A79//g;s/\\u00A7a//g;s/\\u00A7b//g;s/\\u00A7c//g;s/\\u00A7d//g;s/\\u00A7e//g;s/\\u00A7f//g;s/\\u00A7l//g;s/\\u00A7o//g;s/\\u00A7n//g;s/\\u00A7m//g;s/\\u00A7k//g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + rconpassword=$(grep "rcon.password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/rcon.password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + rconport=$(grep "rcon.port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + maxplayers=$(grep "max-players" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + port=$(grep "server-port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + queryport=$(grep "query.port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + if [ -z "${queryport}" ]; then + queryport=${port} + fi + queryenabled=$(grep "enable-query" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/enable-query//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + gamemode=$(grep "gamemode" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + gameworld=$(grep "level-name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/level-name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + configip=$(grep "server-ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/server-ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + # Not set + servername=${servername:-"NOT SET"} + rconpassword=${rconpassword:-"NOT SET"} + rconport=${rconport:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"NOT SET"} + queryport=${queryport:-"NOT SET"} + queryenabled="${queryenabled:-"NOT SET"}" + gamemode=${gamemode:-"NOT SET"} + gameworld=${gameworld:-"NOT SET"} + configip=${configip:-"0.0.0.0"} + fi +} + +fn_info_game_mcb() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + maxplayers="${zero}" + port="${zero}" + portipv6="${zero}" + queryport="${zero}" + gamemode="${unavailable}" + gameworld="${unavailable}" + else + servername=$(grep "server-name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/server-name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "max-players" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + port=$(grep "server-port\b" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + portipv6=$(grep "server-portv6\b" "${servercfgfullpath}" | sed 's/v6//g' | grep -v "#" | tr -cd '[:digit:]') + queryport=${port} + gamemode=$(grep "gamemode" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/gamemode//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + gameworld=$(grep "level-name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/level-name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + # Not set + servername=${servername:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"NOT SET"} + portipv6=${portipv6:-"NOT SET"} + queryport=${queryport:-"NOT SET"} + gamemode=${gamemode:-"NOT SET"} + gameworld=${gameworld:-"NOT SET"} + fi +} + +fn_info_game_mh() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + rconpassword="${unavailable}" + maxplayers="${unavailable}" + else + servername=$(grep "ServerName" "${servercfgfullpath}" | awk -F '=' '{print $2}') + serverpassword=$(grep "ServerPassword" "${servercfgfullpath}" | awk -F '=' '{print $2}') + rconpassword=$(grep "AdminPassword" "${servercfgfullpath}" | awk -F '=' '{print $2}') + maxplayers=$(grep "MaxSlots" "${servercfgfullpath}" | awk -F '=' '{print $2}') + + # Not set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + rconpassword=${rconpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + fi + + # Parameters + port=${port:-"0"} + queryport=${queryport:-"0"} + beaconport=${beaconport:-"0"} +} + +fn_info_game_mohaa() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + rconpassword="${unavailable}" + servername="${unavailable}" + serverpassword="${unavailable}" + maxplayers="${zero}" + else + rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta rconpassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + + # Not set + rconpassword=${rconpassword:-"NOT SET"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + fi + + # Parameters + port=${port:-"0"} + queryport=${port:-"0"} + defaultmap=${defaultmap:-"NOT SET"} +} + +fn_info_game_mom() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + maxplayers="${zero}" + defaultmap="${unavailable}" + else + servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "ServerPassword" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/ServerPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/MaxPlayers//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + defaultmap=$(grep "MapName" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/MapName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + # Not set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + defaultmap=${defaultmap:-"NOT SET"} + fi + + # Parameters + port=${port:-"7777"} + beaconport=${queryport:-"15000"} +} + +fn_info_game_mta() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + port=${zero} + queryport=${zero} + httpport=${zero} + ase="${unavailable}" + servername="${unavailable}" + serverpassword="${unavailable}" + maxplayers="${zero}" + else + port=$(grep -m 1 "serverport" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<" | tr -cd '[:digit:]') + queryport=$((port + 123)) + httpport=$(grep -m 1 "httpport" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<" | tr -cd '[:digit:]') + servername=$(grep -m 1 "servername" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<") + serverpassword=$(grep -m 1 "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<") + maxplayers=$(grep -m 1 "maxplayers" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<" | tr -cd '[:digit:]') + ase=$(grep -m 1 "ase" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<" | tr -cd '[:digit:]') + if [ "${ase}" == "1" ]; then + ase="Enabled" + else + ase="Disabled" + fi + + # Not set + port=${port:-"22003"} + queryport=${queryport:-"2326"} + httpport=${httpport:-"22005"} + ase=${ase:-"Disabled"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + fi + +} + +fn_info_game_nec() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + servername="Necesse" + serverpassword="${unavailable}" + else + maxplayers=$(grep "slots" "${servercfgfullpath}" | cut -f1 -d "/" | tr -cd '[:digit:]') + port=$(grep "port" "${servercfgfullpath}" | cut -f1 -d "/" | tr -cd '[:digit:]') + serverpassword=$(grep "password" "${servercfgfullpath}" | cut -f1 -d "/" | tr -cd '[:digit:]') + + # Not set + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + servername="Necesse Port ${port}" + serverpassword=${serverpassword:-"NOT SET"} + fi +} + +fn_info_game_onset() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + maxplayers="${zero}" + port="${zero}" + httpport="${zero}" + queryport="${zero}" + else + servername=$(grep -v "servername_short" "${servercfgfullpath}" | grep "servername" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/servername//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "maxplayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + port=$(grep "port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + httpport=$((port - 2)) + queryport=$((port - 1)) + + # Not set + servername=${servername:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"NOT SET"} + httpport=${httpport:-"NOT SET"} + queryport=${queryport:-"NOT SET"} + fi +} + +fn_info_game_pc() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + maxplayers="${zero}" + port="${zero}" + queryport="${zero}" + steamport="${zero}" + else + servername=$(grep "name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "password " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + port=$(grep "hostPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + queryport=$(grep "queryPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + steamport=$(grep "steamPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + + # Not set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"NOT SET"} + queryport=${queryport:-"NOT SET"} + steamport=${steamport:-"NOT SET"} + fi +} + +fn_info_game_pc2() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + maxplayers="${zero}" + port="${zero}" + queryport="${zero}" + steamport="${zero}" + else + servername=$(grep "name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "password " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + port=$(grep "hostPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + queryport=$(grep "queryPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + steamport=$(grep "steamPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + + # Not set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"NOT SET"} + queryport=${queryport:-"NOT SET"} + steamport=${steamport:-"NOT SET"} + fi +} + +fn_info_game_pstbs() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + maxplayers="${unavailable}" + reservedslots="${unavailable}" + else + servername=$(grep "ServerName=" "${servercfgfullpath}" | sed -e 's/^[ \t]//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=";,:' | sed -e 's/^[ \t]//' -e 's/[ \t]*$//') + maxplayers=$(grep "MaxPlayers=" "${servercfgfullpath}" | tr -cd '[:digit:]') + reservedslots=$(grep "NumReservedSlots=" "${servercfgfullpath}" | tr -cd '[:digit:]') + + # Not set + servername=${servername:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + reservedslots=${reservedslots:-"0"} + fi + + if [ ! -f "${servercfgdir}/Rcon.cfg" ]; then + rconport=${unavailable} + rconpassword=${unavailable} + else + rconport=$(grep "Port=" "${servercfgdir}/Rcon.cfg" | tr -cd '[:digit:]') + rconpassword=$(grep "Password=" "${servercfgdir}/Rcon.cfg" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + # Not set + rconport=${rconport:-"0"} + if [ -z "${rconpassword}" ] || [ ${#rconpassword} == 1 ]; then + rconpassword="NOT SET" + fi + fi + + # Parameters + port=${port:-"0"} + if [ -z "${queryport}" ]; then + queryport=${port:-"0"} + fi + rconport=${rconport:-"0"} + randommap=${randommap:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + reservedslots=${reservedslots:-"0"} +} + +fn_info_game_pvr() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + maxplayers="${unavailable}" + else + servername=$(grep "ServerName" "${servercfgfullpath}" | awk -F '=' '{print $2}') + maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | awk -F '=' '{print $2}') + + # Not set + servername=${servername:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + fi + + # Parameters + port=${port:-"0"} + port401=$((port + 400)) + queryport=${port:-"0"} +} + +fn_info_game_prism3d() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + maxplayers="${unavailable}" + port="${zero}" + queryport="${zero}" + servername="${unavailable}" + serverpassword="${unavailable}" + else + maxplayers=$(sed -nr 's/^\s*max_players\s*:\s*([0-9]+)/\1/p' "${servercfgfullpath}") + port=$(sed -nr 's/^\s*connection_dedicated_port\s*:\s*([0-9]+)/\1/p' "${servercfgfullpath}") + queryport=$(sed -nr 's/^\s*query_dedicated_port\s*:\s*([0-9]+)/\1/p' "${servercfgfullpath}") + servername=$(sed -nr 's/^\s*lobby_name\s*:\s*"?([^"\r\n]+)"?/\1/p' "${servercfgfullpath}") + serverpassword=$(sed -nr 's/^\s*password\s*:\s*"(.*)"/\1/p' "${servercfgfullpath}") + + # Not set + maxplayers=${maxplayers:-"0"} + port=${port:-"27015"} + queryport=${queryport:-"27016"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + fi +} + +fn_info_game_pz() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + rconpassword="${unavailable}" + maxplayers="${zero}" + port="${zero}" + queryport="${zero}" + gameworld="${unavailable}" + else + servername=$(grep "PublicName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/PublicName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "Password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^Password" | sed -e '/^#/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + rconpassword=$(grep "RCONPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/RCONPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + port=$(grep "DefaultPort" "${servercfgfullpath}" | tr -cd '[:digit:]') + queryport=${port} + gameworld=$(grep "Map" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^Map" | sed -e '/^#/d' -e 's/Map//g' | tr -d '=\";' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + # Not set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + rconpassword=${rconpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + queryport=${queryport:-"0"} + gameworld=${gameworld:-"NOT SET"} + fi + + # Parameters + adminpassword=${adminpassword:-"NOT SET"} + +} + +fn_info_game_q2() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + rconpassword="${unavailable}" + servername="${unavailable}" + maxplayers="${zero}" + else + rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + + # Not set + rconpassword=${rconpassword:-"NOT SET"} + servername=${servername:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + fi + + # Parameters + port=${port:-"0"} + queryport=${port} + defaultmap=${defaultmap:-"NOT SET"} +} + +fn_info_game_q3() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + rconpassword="${unavailable}" + servername="${unavailable}" + serverpassword="${unavailable}" + maxplayers="${zero}" + else + rconpassword=$(grep "zmq_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set zmq_rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + + # Not set + rconpassword=${rconpassword:-"NOT SET"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + fi + + # Parameters + port=${port:-"0"} + queryport=${port} + defaultmap=${defaultmap:-"NOT SET"} +} + +fn_info_game_ql() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + rconpassword="${unavailable}" + servername="${unavailable}" + serverpassword="${unavailable}" + maxplayers="${zero}" + port="${zero}" + queryport="${zero}" + rconport="${zero}" + statsport="${zero}" + else + rconpassword=$(grep "zmq_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set zmq_rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "sv_maxClients" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + port=$(grep "net_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + queryport=${port} + rconport=$(grep "zmq_rcon_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + statsport=$(grep "zmq_stats_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + configip=$(grep "set net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set net_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + # Not set + rconpassword=${rconpassword:-"NOT SET"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + queryport=${queryport:-"0"} + rconport=${rconport:-"0"} + statsport=${statsport:-"0"} + configip=${configip:-"0.0.0.0"} + fi +} + +fn_info_game_qw() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + rconpassword="${unavailable}" + servername="${unavailable}" + serverpassword="${unavailable}" + maxplayers="${zero}" + port="${zero}" + else + rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "/") + servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "/") + maxplayers=$(grep "maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + + # Not set + rconpassword=${rconpassword:-"NOT SET"} + servername=${servername:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + fi + + # Parameters + port=${port:-"0"} + queryport=${port} +} + +fn_info_game_ro() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + adminpassword="${unavailable}" + port="${zero}" + queryport="${zero}" + steamport="${zero}" + steammasterport="${zero}" + lanport="${zero}" + httpport="${zero}" + webadminenabled="${unavailable}" + webadminuser="${unavailable}" + webadminpass="${unavailable}" + else + servername=$(sed -nr 's/^ServerName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + serverpassword=$(sed -nr 's/^GamePassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + adminpassword=$(sed -nr 's/^AdminPassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + port=$(sed -nr 's/^Port=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') + queryport=$((port + 1)) + steamport="20610" + steammasterport="28902" + lanport=$(grep "LANServerPort=" "${servercfgfullpath}" | tr -cd '[:digit:]') + httpport=$(sed -nr 's/^ListenPort=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') + webadminenabled=$(sed -nr 's/^bEnabled=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + webadminuser=$(sed -nr 's/^AdminName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + webadminpass="${adminpassword}" + + # Not set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + adminpassword=${adminpassword:-"NOT SET"} + port=${port:-"0"} + queryport=${queryport:-"0"} + steamport=${steamport:-"0"} + steammasterport=${steammasterport:-"0"} + lanport=${lanport:-"0"} + httpport=${httpport:-"0"} + webadminenabled=${webadminenabled:-"NOT SET"} + webadminuser=${webadminuser:-"NOT SET"} + webadminpass=${webadminpass:-"NOT SET"} + fi + + # Parameters + defaultmap=${defaultmap:-"NOT SET"} +} + +fn_info_game_rtcw() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + rconpassword="${unavailable}" + servername="${unavailable}" + serverpassword="${unavailable}" + maxplayers="${zero}" + else + rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + + # Not set + rconpassword=${rconpassword:-"NOT SET"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + fi + + # Parameters + port=${port:-"0"} + queryport=${port:-"0"} + defaultmap=${defaultmap:-"NOT SET"} +} + +fn_info_game_rust() { + # Parameters + servername=${servername:-"NOT SET"} + port=${port:-"0"} + queryport=${queryport:-"0"} + appport=${appport:-"0"} + rconport=${rconport:-"0"} + gamemode=${gamemode:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + rconpassword=${rconpassword:-"NOT SET"} + rconweb=${rconweb:-"NOT SET"} + tickrate=${tickrate:-"0"} + saveinterval=${saveinterval:-"0"} + serverlevel=${serverlevel:-"NOT SET"} + customlevelurl=${customlevelurl:-"NOT SET"} + worldsize=${worldsize:-"0"} + if [ -n "${seed}" ]; then + seed=${seed:-"0"} + elif [ -f "${datadir}/${selfname}-seed.txt" ]; then + seed=$(cat "${datadir}/${selfname}-seed.txt") + else + seed="0" + fi + salt=${salt:-"0"} +} + +fn_info_game_rw() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + rconpassword="${unavailable}" + rconport="${zero}" + maxplayers="${zero}" + port="${zero}" + port2="${zero}" + port3="${zero}" + port4="${zero}" + queryport="${zero}" + gamemode="${unavailable}" + gameworld="${unavailable}" + else + servername=$(grep "server_name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/server_name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "server_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/server_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + rconport=$(grep "rcon_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + maxplayers=$(grep "settings_max_players" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + port=$(grep "server_port" "${servercfgfullpath}" | grep -v "database_mysql_server_port" | grep -v "#" | tr -cd '[:digit:]') + port2=$((port + 1)) + port3=$((port + 2)) + port4=$((port + 3)) + queryport="${port}" + httpqueryport=$((port - 1)) + gamemode=$(grep "settings_default_gamemode=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/settings_default_gamemode//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + gameworld=$(grep "server_world_name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/server_world_name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + configip=$(grep "server_ip" "${servercfgfullpath}" | grep -v "database_mysql_server_ip" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/server_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + # Not set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + rconpassword=${rconpassword:-"NOT SET"} + rconport=${rconport:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + port2=${port2:-"0"} + port3=${port3:-"0"} + port4=${port4:-"0"} + queryport=${queryport:-"0"} + httpqueryport=${httpport:-"0"} + gamemode=${gamemode:-"NOT SET"} + gameworld=${gameworld:-"NOT SET"} + configip=${configip:-"0.0.0.0"} + fi +} + +fn_info_game_samp() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="unnamed server" + rconpassword="${unavailable}" + port="7777" + rconport="${port}" + maxplayers="50" + else + servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/^rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + port=$(grep "port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + queryport=${port} + rconport=${port} + maxplayers=$(grep "maxplayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + + # Not set + servername=${servername:-"NOT SET"} + rconpassword=${rconpassword:-"NOT SET"} + port=${port:-"7777"} + queryport=${port:-"7777"} + rconport=${rconport:-"7777"} + maxplayers=${maxplayers:-"12"} + fi +} + +fn_info_game_sb() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + queryenabled="${unavailable}" + rconenabled="${unavailable}" + rconpassword="${unavailable}" + port="21025" + queryport="21025" + rconport="21026" + maxplayers="8" + else + servername=$(grep "serverName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e 's/serverName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + queryenabled=$(grep "runQueryServer" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e 's/runQueryServer//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + rconenabled=$(grep "runRconServer" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e 's/runRconServer//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + rconpassword=$(grep "rconServerPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e 's/rconServerPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + port=$(grep "gameServerPort" "${servercfgfullpath}" | tr -cd '[:digit:]') + queryport=$(grep "queryServerPort" "${servercfgfullpath}" | tr -cd '[:digit:]') + rconport=$(grep "rconServerPort" "${servercfgfullpath}" | tr -cd '[:digit:]') + maxplayers=$(grep "maxPlayers" "${servercfgfullpath}" | tr -cd '[:digit:]') + + # Not set + servername=${servername:-"NOT SET"} + queryenabled=${queryenabled:-"NOT SET"} + rconenabled=${rconenabled:-"NOT SET"} + rconpassword=${rconpassword:-"NOT SET"} + port=${port:-"21025"} + queryport=${queryport:-"21025"} + rconport=${rconport:-"21026"} + maxplayers=${maxplayers:-"8"} + fi +} + +fn_info_game_sbots() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + maxplayers="${unavailable}" + else + servername=$(grep "ServerName=" "${servercfgfullpath}" | sed -e 's/^[ \t]//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=";,:' | sed -e 's/^[ \t]//' -e 's/[ \t]*$//') + maxplayers=$(grep "MaxPlayers=" "${servercfgfullpath}" | tr -cd '[:digit:]') + + # Not set + servername=${servername:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + fi + + # Parameters + port=${port:-"0"} + queryport=${queryport:-"0"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + defaultmap=${defaultmap:-"NOT SET"} + maxplayers=${maxplayers:-"0"} +} + +fn_info_game_scpsl() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername=${servername:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + configip=${configip:-"0.0.0.0"} + tickrate=${tickrate:-"NOT SET"} + adminpassword=${adminpassword:-"NOT SET"} + else + servername=$(sed -nr 's/^server_name: (.*)$/\1/p' "${servercfgfullpath}") + maxplayers=$(sed -nr 's/^max_players: (.*)$/\1/p' "${servercfgfullpath}") + configip=$(sed -nr 's/^ipv4_bind_ip: (.*)$/\1/p' "${servercfgfullpath}") + tickrate=$(sed -nr 's/^server_tickrate: (.*)$/\1/p' "${servercfgfullpath}") + adminpassword=$(sed -nr 's/^administrator_query_password: (.*)$/\1/p' "${servercfgfullpath}") + fi + + # Parameters + port=${port:-"0"} + queryport=${port} +} + +fn_info_game_sdtd() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + port="${zero}" + port3="${zero}" + queryport="${zero}" + webadminenabled="${unavailable}" + webadminport="${zero}" + webadminpass="${unavailable}" + telnetenabled="${unavailable}" + telnetport="${zero}" + telnetpass="${unavailable}" + telnetip="${unavailable}" + maxplayers="${unavailable}" + gamemode="${unavailable}" + gameworld="${unavailable}" + else + servername=$(grep "ServerName" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") + serverpassword=$(grep "ServerPassword" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") + port=$(grep "ServerPort" "${servercfgfullpath}" | grep -Eo 'value="[0-9]+"' | tr -cd '[:digit:]') + port3=$((port + 2)) + queryport=${port:-"0"} + webadminenabled=$(grep "ControlPanelEnabled" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") + webadminport=$(grep "ControlPanelPort" "${servercfgfullpath}" | tr -cd '[:digit:]') + webadminpass=$(grep "ControlPanelPassword" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") + telnetenabled=$(grep "TelnetEnabled" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") + telnetport=$(grep "TelnetPort" "${servercfgfullpath}" | tr -cd '[:digit:]') + telnetpass=$(grep "TelnetPassword" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") + # Telnet IP will be localhost if no password is set + # check_ip will set the IP first. This will overwrite it. + if [ -z "${telnetpass}" ]; then + telnetip="127.0.0.1" + fi + maxplayers=$(grep "ServerMaxPlayerCount" "${servercfgfullpath}" | tr -cd '[:digit:]') + gamemode=$(grep "GameMode" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") + gameworld=$(grep "GameWorld" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") + + # Not set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + port=${port:-"0"} + queryport=${queryport:-"0"} + webadminenabled=${webadminenabled:-"NOT SET"} + webadminport=${webadminport:-"0"} + webadminpass=${webadminpass:-"NOT SET"} + telnetenabled=${telnetenabled:-"NOT SET"} + telnetport=${telnetport:-"0"} + telnetpass=${telnetpass:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + gamemode=${gamemode:-"NOT SET"} + gameworld=${gameworld:-"NOT SET"} + fi +} + +fn_info_game_sf() { + # Parameters + servername=${selfname:-"NOT SET"} + port=${port:-"0"} + queryport=${queryport:-"0"} + beaconport=${beaconport:-"0"} +} + +fn_info_game_sof2() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + rconpassword="${unavailable}" + servername="${unavailable}" + serverpassword="${unavailable}" + maxplayers="${zero}" + else + rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + + # Not set + rconpassword=${rconpassword:-"NOT SET"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + fi + + # Parameters + port=${port:-"0"} + queryport=${port} + defaultmap=${defaultmap:-"NOT SET"} +} + +fn_info_game_sol() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + adminpassword="${unavailable}" + maxplayers="${unavailable}" + port="${zero}" + queryport="${zero}" + servername="${unavailable}" + serverpassword="${unavailable}" + else + adminpassword=$(grep "Admin_Password=" "${servercfgfullpath}" | awk -F '=' '{print $2}') + maxplayers=$(grep "Max_Players=" "${servercfgfullpath}" | tr -cd '[:digit:]') + port=$(grep "Port=" "${servercfgfullpath}" | tr -cd '[:digit:]') + queryport="${port}" + filesport=$((port + 10)) + servername=$(grep "Server_Name=" "${servercfgfullpath}" | awk -F '=' '{print $2}') + serverpassword=$(grep "Game_Password=" "${servercfgfullpath}" | awk -F '=' '{print $2}') + + # Not set + adminpassword=${adminpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"23073"} + queryport=${queryport:-"23083"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + fi +} + +fn_info_game_source() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + rconpassword="${unavailable}" + else + servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "sv_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/sv_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + # Not set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + rconpassword=${rconpassword:-"NOT SET"} + fi + + # Parameters + defaultmap=${defaultmap:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + rconport=${port:-"0"} + queryport=${port:-"0"} + clientport=${clientport:-"0"} + # Steamport can be between 26901-26910 and is normaly automatically set. + # Some servers might support -steamport parameter to set + if [ "${steamport}" == "0" ] || [ -v "${steamport}" ]; then + steamport="$(echo "${ssinfo}" | grep "${srcdslinuxpid}" | awk '{print $5}' | grep ":269" | cut -d ":" -f2)" + fi +} + +fn_info_game_spark() { + defaultmap=${defaultmap:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + queryport=$((port + 1)) + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + webadminuser=${webadminuser:-"NOT SET"} + webadminpass=${webadminpass:-"NOT SET"} + webadminport=${webadminport:-"0"} + # Commented out as displaying not set in details parameters + #mods=${mods:-"NOT SET"} +} + +fn_info_game_squad() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + maxplayers="${unavailable}" + else + servername=$(grep "ServerName=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "MaxPlayers=" "${servercfgfullpath}" | tr -cd '[:digit:]') + + servername=${servername:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + fi + + if [ ! -f "${servercfgdir}/Rcon.cfg" ]; then + rconport=${unavailable} + rconpassword=${unavailable} + else + rconport=$(grep "Port=" "${servercfgdir}/Rcon.cfg" | tr -cd '[:digit:]') + rconpassword=$(grep "Password=" "${servercfgdir}/Rcon.cfg" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + rconport=${rconport:-"0"} + if [ -z "${rconpassword}" ] || [ ${#rconpassword} == 1 ]; then + rconpassword="NOT SET" + fi + + fi + + # Parameters + port=${port:-"0"} + queryport=${queryport:-"0"} +} + +fn_info_game_st() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + rconpassword="${unavailable}" + maxplayers="${unavailable}" + else + servername=$(grep "SERVERNAME" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/SERVERNAME//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "PASSWORD" "${servercfgfullpath}" | grep "^PASSWORD" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/PASSWORD//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + rconpassword=$(grep "RCONPASSWORD" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/RCONPASSWORD//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "MAXPLAYER" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/MAXPLAYER//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + # Not set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + rconpassword=${rconpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + fi + + # Parameters + port=${port:-"0"} + queryport=${queryport:-"0"} + httpport=${port:-"0"} + worldtype=${worldtype:-"NOT SET"} + autosaveinterval=${autosaveinterval:-"0"} + clearinterval=${clearinterval:-"0"} + worldname=${worldname:-"NOT SET"} +} + +fn_info_game_terraria() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + port="${zero}" + gameworld="${unavailable}" + maxplayers="${zero}" + queryport="${zero}" + else + servername=$(grep "worldname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/worldname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + port=$(grep "port" "${servercfgfullpath}" | tr -cd '[:digit:]') + queryport=${port:-"0"} + gameworld=$(grep "world=" "${servercfgfullpath}" | grep -v "//" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/world=//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "maxplayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + + # Not set + servername=${servername:-"NOT SET"} + port=${port:-"0"} + queryport=${queryport:-"0"} + gameworld=${gameworld:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + fi +} + +fn_info_game_stn() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + configip=${configip:-"0.0.0.0"} + port="${zero}" + queryport="${zero}" + serverpassword=${serverpassword:-"NOT SET"} + else + servername=$(sed -nr 's/^ServerName="(.*)"/\1/p' "${servercfgfullpath}") + configip=$(sed -nr 's/^ServerIP=([0-9]+)/\1/p' "${servercfgfullpath}") + port=$(sed -nr 's/^ServerPort=([0-9]+)/\1/p' "${servercfgfullpath}") + serverpassword=$(sed -nr 's/^ServerPassword=(.*)$/\1/p' "${servercfgfullpath}") + queryport=$((port + 1)) + + # Not set + serverpassword=${serverpassword:-"NOT SET"} + port=${port:-"0"} + serverpassword=${serverpassword:-"NOT SET"} + queryport=${queryport:-"0"} + fi +} + +fn_info_game_ti() { + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + maxplayers="${zero}" + else + servername=$(sed -nr 's/^ServerName="(.*)"/\1/p' "${servercfgfullpath}") + maxplayers=$(sed -nr 's/^MaxPlayerCount=([0-9]+)/\1/' "${servercfgfullpath}") + + # Not set + servername=${servername:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + fi + +} + +fn_info_game_ts3() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + dbplugin="${unavailable}" + port="9987" + queryport="10011" + querysshport="10022" + queryhttpport="10080" + queryhttpsport="10443" + fileport="30033" + telnetport="10011" + else + dbplugin=$(grep "dbplugin=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/dbplugin=//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + port=$(grep "default_voice_port" "${servercfgfullpath}" | tr -cd '[:digit:]') + queryport=$(grep "query_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + querysshport=$(grep "query_ssh_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + queryhttpport=$(grep "query_http_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + queryhttpsport=$(grep "query_https_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + fileport=$(grep "filetransfer_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + telnetport="${queryport}" + configip=$(grep "voice_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/voice_ip//g' | sed 's/,.*//' | tr -d '=\";,' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + # Not set + dbplugin=${dbplugin:-"NOT SET"} + port=${port:-"9987"} + queryport=${queryport:-"10011"} + querysshport=${querysshport:-"10022"} + queryhttpport=${queryhttpport:-"10080"} + queryhttpsport=${queryhttpsport:-"10443"} + fileport=${fileport:-"30033"} + telnetport=${telnetport:-"10011"} + configip=${configip:-"0.0.0.0"} + fi +} + +fn_info_game_tu() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + maxplayers="${zero}" + else + servername=$(grep "ServerTitle" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/ServerTitle//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + + # Not set + servername=${servername:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + fi + + # Parameters + port=${port:-"0"} + steamport=$((port + 1)) + queryport=${queryport:-"0"} +} + +fn_info_game_tw() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="unnamed server" + serverpassword="${unavailable}" + rconpassword="${unavailable}" + port="8303" + queryport="8303" + maxplayers="12" + else + servername=$(grep "sv_name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/^sv_name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^password" | sed -e '/^#/d' -e 's/^password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + rconpassword=$(grep "sv_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/^sv_rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + port=$(grep "sv_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + queryport="${port}" + maxplayers=$(grep "sv_max_clients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + + # Not set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + rconpassword=${rconpassword:-"NOT SET"} + port=${port:-"8303"} + queryport=${port:-"8303"} + maxplayers=${maxplayers:-"12"} + fi +} + +fn_info_game_ut99() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + adminpassword="${unavailable}" + port="${zero}" + queryport="${zero}" + queryportgs="${zero}" + webadminenabled="${unavailable}" + webadminport="${zero}" + webadminuser="${unavailable}" + webadminpass="${unavailable}" + else + servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | sed 's/\r$//') + serverpassword=$(grep "GamePassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/GamePassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | sed 's/\r$//') + adminpassword=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | sed 's/\r$//') + port=$(grep "Port" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^Port" | grep -v "#" | tr -cd '[:digit:]') + queryport=$((port + 1)) + queryportgs=$(grep "OldQueryPortNumber" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + beaconport=$(grep "ServerBeaconPort" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + webadminenabled=$(grep "bEnabled" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bEnabled//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | sed 's/\r$//') + httpport=$(grep "ListenPort" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + webadminuser=$(grep "AdminUsername" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminUsername//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | sed 's/\r$//') + webadminpass=$(grep "UTServerAdmin.UTServerAdmin" "${servercfgfullpath}" -A 4 | grep "AdminPassword" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | sed 's/\r$//') + + # Not set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + adminpassword=${adminpassword:-"NOT SET"} + port=${port:-"0"} + queryport=${queryport:-"0"} + beaconport=${beaconport:-"8777"} + queryportgs=${queryportgs:-"0"} + webadminenabled=${webadminenabled:-"NOT SET"} + webadminport=${webadminport:-"0"} + webadminuser=${webadminuser:-"NOT SET"} + webadminpass=${webadminpass:-"NOT SET"} + fi + + # Parameters + defaultmap=${defaultmap:-"NOT SET"} +} + +fn_info_game_unreal2() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + adminpassword="${unavailable}" + port="${zero}" + queryport="${zero}" + queryportgs="${zero}" + webadminenabled="${unavailable}" + webadminport="${zero}" + webadminuser="${unavailable}" + webadminpass="${unavailable}" + else + servername=$(sed -nr 's/^ServerName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + serverpassword=$(sed -nr 's/^GamePassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + adminpassword=$(sed -nr 's/^AdminPassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + port=$(sed -nr 's/^Port=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') + queryport=$((port + 1)) + queryportgs=$(sed -nr 's/^OldQueryPortNumber=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') + webadminenabled=$(sed -nr 's/^bEnabled=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + webadminport=$(sed -nr 's/^ListenPort=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') + webadminuser=$(sed -nr 's/^AdminName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + webadminpass="${adminpassword}" + + # Not set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + adminpassword=${adminpassword:-"NOT SET"} + port=${port:-"0"} + queryport=${queryport:-"0"} + queryportgs=${queryportgs:-"0"} + webadminenabled=${webadminenabled:-"NOT SET"} + webadminport=${webadminport:-"0"} + webadminuser=${webadminuser:-"NOT SET"} + webadminpass=${webadminpass:-"NOT SET"} + fi + + # Parameters + defaultmap=${defaultmap:-"NOT SET"} +} + +fn_info_game_unt() { + # Parameters + servername=${selfname:-"NOT SET"} + port=${port:-"0"} + queryport=${port} + steamport=$((port + 1)) +} + +fn_info_game_ut() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + else + servername=$(grep "ServerName" "${servercfgfullpath}" | awk -F '=' '{print $2}') + + # Not set + servername=${servername:-"NOT SET"} + fi + + # Parameters + port=${port:-"0"} + queryport=$((port + 1)) +} + +fn_info_game_unreal2k4() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + adminpassword="${unavailable}" + port="${zero}" + queryport="${zero}" + queryportgs="${zero}" + lanport="${zero}" + webadminenabled="${unavailable}" + httpport="${zero}" + webadminuser="${unavailable}" + webadminpass="${unavailable}" + else + servername=$(sed -nr 's/^ServerName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + serverpassword=$(sed -nr 's/^GamePassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + adminpassword=$(sed -nr 's/^AdminPassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + port=$(sed -nr 's/^Port=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') + queryport=$((port + 1)) + queryportgs=$(sed -nr 's/^OldQueryPortNumber=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') + lanport=$(grep "LANServerPort=" "${servercfgfullpath}" | tr -cd '[:digit:]') + webadminenabled=$(sed -nr 's/^bEnabled=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + httpport=$(sed -nr 's/^ListenPort=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') + webadminuser=$(sed -nr 's/^AdminName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + webadminpass="${adminpassword}" + + # Not set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + adminpassword=${adminpassword:-"NOT SET"} + port=${port:-"0"} + queryport=${queryport:-"0"} + queryportgs=${queryportgs:-"0"} + lanport=${lanport:-"0"} + webadminenabled=${webadminenabled:-"NOT SET"} + httpport=${httpport:-"0"} + webadminuser=${webadminuser:-"NOT SET"} + webadminpass=${webadminpass:-"NOT SET"} + fi +} + +fn_info_game_ut3() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + adminpassword="${unavailable}" + maxplayers="${unavailable}" + webadminenabled="${unavailable}" + webadminport="${zero}" + webadminuser="${unavailable}" + webadminpass="${unavailable}" + else + servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "GamePassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/GamePassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + adminpassword=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + webadminenabled=$(grep "bEnabled" "${servercfgdir}/UTWeb.ini" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bEnabled//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + webadminport=$(grep "ListenPort" "${servercfgdir}/UTWeb.ini" | grep -v "#" | tr -cd '[:digit:]') + webadminuser="Admin" + webadminpass=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + # Not set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + adminpassword=${adminpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + webadminenabled=${webadminenabled:-"NOT SET"} + webadminport=${webadminport:-"0"} + webadminuser=${webadminuser:-"NOT SET"} + webadminpass=${webadminpass:-"NOT SET"} + fi + + # Parameters + port=${port:-"0"} + queryport=${queryport:-"0"} + defaultmap=${defaultmap:-"NOT SET"} +} + +fn_info_game_vh() { + # Parameters + port=${port:-"0"} + # Query port only enabled if public server + if [ "${public}" != "0" ]; then + queryport=$((port + 1)) + else + querymode="1" + fi + gameworld=${gameworld:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + servername=${servername:-"NOT SET"} +} + +fn_info_game_vints() { + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + maxplayers="${unavailable}" + serverpassword="${unavailable}" + port="${port:-"0"}" + else + servername=$(jq -r '.ServerName' "${servercfgfullpath}") + maxplayers=$(jq -r '.MaxClients' "${servercfgfullpath}") + serverpassword=$(jq -r 'select(.Password != null) | .Password' "${servercfgfullpath}") + port=$(jq -r '.Port' "${servercfgfullpath}") + configip=$(jq -r 'select(.Ip != null) | .Ip' "${servercfgfullpath}") + fi + queryport=${port:-"0"} + serverpassword=${serverpassword:-"NOT SET"} + configip=${configip:-"0.0.0.0"} +} + +fn_info_game_vpmc() { + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + configip="0.0.0.0" + port="25577" + else + servername=$(sed -nr 's/^motd\s*=\s*"(.*)"/\1/p' "${servercfgfullpath}") + bindaddress=$(sed -nr 's/^bind\s*=\s*"([0-9.:]+)"/\1/p' "${servercfgfullpath}") + configip=$(echo "${bindaddress}" | cut -d ':' -f 1) + port=$(echo "${bindaddress}" | cut -d ':' -f 2) + + servername=${servername:-"NOT SET"} + fi + queryport=${port:-"25577"} +} + +fn_info_game_wet() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + rconpassword="${unavailable}" + servername="${unavailable}" + serverpassword="${unavailable}" + maxplayers="${zero}" + port="${zero}" + queryport="${zero}" + else + port=$(grep "set net_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + queryport="${port}" + rconpassword=$(grep "set zmq_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set zmq_rcon_password //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//g' -e '/^\//d' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + servername=$(grep "set sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "set g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "set sv_maxclients" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + configip=$(grep "set net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set net_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + # Not set + rconpassword=${rconpassword:-"NOT SET"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"27960"} + queryport=${queryport:-"27960"} + configip=${configip:-"0.0.0.0"} + fi +} + +fn_info_game_wf() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + rconpassword="${unavailable}" + servername="${unavailable}" + maxplayers="${zero}" + else + rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + + # Not set + rconpassword=${rconpassword:-"NOT SET"} + servername=${servername:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + fi + + # Parameters + port=${port:-"0"} + queryport="${port:-"0"}" + webadminport=${webadminport:-"0"} +} + +fn_info_game_wmc() { + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + maxplayers="${zero}" + port="${zero}" + queryport="${zero}" + queryenabled="${unavailable}" + else + servername=$(sed -e '/^listeners:/,/^[a-z]/!d' "${servercfgfullpath}" | sed -nr 's/^[ ]+motd: (.*)$/\1/p' | tr -d "'" | sed 's/&1//') + queryport=$(sed -nr 's/^[ -]+query_port: ([0-9]+)/\1/p' "${servercfgfullpath}") + queryenabled=$(sed -nr 's/^[ ]+query_enabled: (.*)$/\1/p' "${servercfgfullpath}") + port=$(sed -nr 's/^[ ]+host: [0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:([0-9]+)/\1/p' "${servercfgfullpath}") + # the normal max_players does only show in on the client side and has no effect how many players can connect. + maxplayers=$(sed -nr 's/^player_limit: ([-]*[0-9])/\1/p' "${servercfgfullpath}") + configip=$(sed -nr 's/^[ ]+host: ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+):[0-9]+/\1/p' "${servercfgfullpath}") + + if [ "${maxplayers}" == "-1" ] || [ "${maxplayers}" == "0" ]; then + maxplayers="UNLIMITED" + fi + + # Not set + servername=${servername:-"NOT SET"} + queryport=${queryport:-"25577"} + maxplayers=${maxplayers:-"0"} + configip=${configip:-"0.0.0.0"} + fi +} + +fn_info_game_wurm() { + # Config + if [ ! -f "${servercfgfullpath}" ]; then + port="${zero}" + queryport="${zero}" + rconpassword="${unavailable}" + servername="${unavailable}" + serverpassword="${unavailable}" + adminpassword="${unavailable}" + maxplayers="${zero}" + else + port=$(grep "EXTERNALPORT=" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + queryport=$(grep "QUERYPORT=" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + servername=$(grep "SERVERNAME=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/SERVERNAME//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "SERVERPASSWORD=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/SERVERPASSWORD//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + adminpassword=$(grep "ADMINPWD=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/ADMINPWD//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "MAXPLAYERS=" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + configip=$(grep "IP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/IP//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + # Not set + port=${port:-"3724"} + queryport=${queryport:-"27017"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + adminpassword=${adminpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + fi +} + +unavailable="${red}UNAVAILABLE${default}" +zero="${red}0${default}" + +if [ "${shortname}" == "ac" ]; then + fn_info_game_ac +elif [ "${shortname}" == "ark" ]; then + fn_info_game_ark +elif [ "${shortname}" == "arma3" ]; then + fn_info_game_arma3 +elif [ "${shortname}" == "armar" ]; then + fn_info_game_armar +elif [ "${shortname}" == "av" ]; then + fn_info_game_av +elif [ "${shortname}" == "bf1942" ]; then + fn_info_game_bf1942 +elif [ "${shortname}" == "bfv" ]; then + fn_info_game_bfv +elif [ "${shortname}" == "bo" ]; then + fn_info_game_bo +elif [ "${shortname}" == "bt" ]; then + fn_info_game_bt +elif [ "${shortname}" == "btl" ]; then + fn_info_game_btl +elif [ "${shortname}" == "cd" ]; then + fn_info_game_cd +elif [ "${shortname}" == "ck" ]; then + fn_info_game_ck +elif [ "${shortname}" == "cmw" ]; then + fn_info_game_cmw +elif [ "${shortname}" == "cod" ]; then + fn_info_game_cod +elif [ "${shortname}" == "coduo" ]; then + fn_info_game_cod +elif [ "${shortname}" == "cod2" ]; then + fn_info_game_cod2 +elif [ "${shortname}" == "cod4" ]; then + fn_info_game_cod4 +elif [ "${shortname}" == "codwaw" ]; then + fn_info_game_codwaw +elif [ "${shortname}" == "col" ]; then + fn_info_game_col +elif [ "${shortname}" == "dayz" ]; then + fn_info_game_dayz +elif [ "${shortname}" == "dodr" ]; then + fn_info_game_dodr +elif [ "${shortname}" == "dst" ]; then + fn_info_game_dst +elif [ "${shortname}" == "eco" ]; then + fn_info_game_eco +elif [ "${shortname}" == "etl" ]; then + fn_info_game_etl +elif [ "${shortname}" == "fctr" ]; then + fn_info_game_fctr +elif [ "${shortname}" == "hw" ]; then + fn_info_game_hw +elif [ "${shortname}" == "inss" ]; then + fn_info_game_inss +elif [ "${shortname}" == "jc2" ]; then + fn_info_game_jc2 +elif [ "${shortname}" == "jc3" ]; then + fn_info_game_jc3 +elif [ "${shortname}" == "jk2" ]; then + fn_info_game_jk2 +elif [ "${shortname}" == "kf" ]; then + fn_info_game_kf +elif [ "${shortname}" == "kf2" ]; then + fn_info_game_kf2 +elif [ "${shortname}" == "lo" ]; then + fn_info_game_lo +elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ]; then + fn_info_game_mc +elif [ "${shortname}" == "mcb" ]; then + fn_info_game_mcb +elif [ "${shortname}" == "mh" ]; then + fn_info_game_mh +elif [ "${shortname}" == "mohaa" ]; then + fn_info_game_mohaa +elif [ "${shortname}" == "mom" ]; then + fn_info_game_mom +elif [ "${shortname}" == "mta" ]; then + fn_info_game_mta +elif [ "${shortname}" == "nec" ]; then + fn_info_game_nec +elif [ "${shortname}" == "onset" ]; then + fn_info_game_onset +elif [ "${shortname}" == "pc" ]; then + fn_info_game_pc +elif [ "${shortname}" == "pc2" ]; then + fn_info_game_pc2 +elif [ "${shortname}" == "pstbs" ]; then + fn_info_game_pstbs +elif [ "${shortname}" == "pvr" ]; then + fn_info_game_pvr +elif [ "${shortname}" == "pz" ]; then + fn_info_game_pz +elif [ "${shortname}" == "q2" ]; then + fn_info_game_q2 +elif [ "${shortname}" == "q3" ]; then + fn_info_game_q3 +elif [ "${shortname}" == "ql" ]; then + fn_info_game_ql +elif [ "${shortname}" == "qw" ]; then + fn_info_game_qw +elif [ "${shortname}" == "ro" ]; then + fn_info_game_ro +elif [ "${shortname}" == "rtcw" ]; then + fn_info_game_rtcw +elif [ "${shortname}" == "rust" ]; then + fn_info_game_rust +elif [ "${shortname}" == "rw" ]; then + fn_info_game_rw +elif [ "${shortname}" == "samp" ]; then + fn_info_game_samp +elif [ "${shortname}" == "sb" ]; then + fn_info_game_sb +elif [ "${shortname}" == "sbots" ]; then + fn_info_game_sbots +elif [ "${shortname}" == "scpsl" ] || [ "${shortname}" == "scpslsm" ]; then + fn_info_game_scpsl +elif [ "${shortname}" == "sdtd" ]; then + fn_info_game_sdtd +elif [ "${shortname}" == "sf" ]; then + fn_info_game_sf +elif [ "${shortname}" == "sof2" ]; then + fn_info_game_sof2 +elif [ "${shortname}" == "sol" ]; then + fn_info_game_sol +elif [ "${engine}" == "spark" ]; then + fn_info_game_spark +elif [ "${shortname}" == "squad" ]; then + fn_info_game_squad +elif [ "${shortname}" == "st" ]; then + fn_info_game_st +elif [ "${shortname}" == "stn" ]; then + fn_info_game_stn +elif [ "${shortname}" == "terraria" ]; then + fn_info_game_terraria +elif [ "${shortname}" == "ti" ]; then + fn_info_game_ti +elif [ "${shortname}" == "ts3" ]; then + fn_info_game_ts3 +elif [ "${shortname}" == "tu" ]; then + fn_info_game_tu +elif [ "${shortname}" == "tw" ]; then + fn_info_game_tw +elif [ "${shortname}" == "unt" ]; then + fn_info_game_unt +elif [ "${shortname}" == "ut" ]; then + fn_info_game_ut +elif [ "${shortname}" == "ut2k4" ]; then + fn_info_game_unreal2k4 +elif [ "${shortname}" == "ut3" ]; then + fn_info_game_ut3 +elif [ "${shortname}" == "ut99" ]; then + fn_info_game_ut99 +elif [ "${shortname}" == "vh" ]; then + fn_info_game_vh +elif [ "${shortname}" == "vints" ]; then + fn_info_game_vints +elif [ "${shortname}" == "vpmc" ]; then + fn_info_game_vpmc +elif [ "${shortname}" == "wet" ]; then + fn_info_game_wet +elif [ "${shortname}" == "wf" ]; then + fn_info_game_wf +elif [ "${shortname}" == "wmc" ]; then + fn_info_game_wmc +elif [ "${shortname}" == "wurm" ]; then + fn_info_game_wurm +elif [ "${engine}" == "prism3d" ]; then + fn_info_game_prism3d +elif [ "${engine}" == "source" ] || [ "${engine}" == "goldsrc" ]; then + fn_info_game_source +elif [ "${engine}" == "unreal2" ]; then + fn_info_game_unreal2 +fi + +# External IP address +# Cache external IP address for 24 hours +if [ -f "${tmpdir}/extip.txt" ]; then + if [ "$(find "${tmpdir}/extip.txt" -mmin +1440)" ]; then + rm -f "${tmpdir:?}/extip.txt" + fi +fi + +if [ ! -f "${tmpdir}/extip.txt" ]; then + extip="$(curl --connect-timeout 10 -s https://api.ipify.org 2> /dev/null)" + exitcode=$? + # if curl passes add extip to externalip.txt + if [ "${exitcode}" != "0" ]; then + echo "Unable to get external IP address" + else + echo "${extip}" > "${tmpdir}/extip.txt" + fi +else + extip="$(cat "${tmpdir}/extip.txt")" +fi + +# Alert IP address +if [ "${displayip}" ]; then + alertip="${displayip}" +elif [ "${extip}" ]; then + alertip="${extip}" +else + alertip="${ip}" +fi + +# Steam Master Server - checks if detected by master server. +# Checked after config init, as the queryport is needed +if [ -z "${displaymasterserver}" ]; then + if [ "$(command -v jq 2> /dev/null)" ]; then + if [ "${ip}" ] && [ "${port}" ]; then + if [ "${steammaster}" == "true" ] || [ "${commandname}" == "DEV-QUERY-RAW" ]; then + # Will query server IP addresses first. + for queryip in "${queryips[@]}"; do + masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${queryip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" '.response.servers[] | select((.gameport == ($port|tonumber) or (.gameport == ($queryport|tonumber)))) | .addr' | wc -l 2> /dev/null)" + done + # Should that not work it will try the external IP. + if [ "${masterserver}" == "0" ]; then + masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${extip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" '.response.servers[] | select((.gameport == ($port|tonumber) or (.gameport == ($queryport|tonumber)))) | .addr' | wc -l 2> /dev/null)" + fi + if [ "${masterserver}" == "0" ]; then + displaymasterserver="false" + else + displaymasterserver="true" + fi + fi + fi + fi +fi diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh new file mode 100644 index 000000000..5478987f1 --- /dev/null +++ b/lgsm/functions/info_messages.sh @@ -0,0 +1,1847 @@ +#!/bin/bash +# LinuxGSM info_messages.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Defines server info messages for details and alerts. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +# Separator is different for details. +fn_messages_separator() { + if [ "${commandname}" == "DETAILS" ]; then + printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = + else + echo -e "=================================" + fi +} + +# Removes the passwords form all but details. +fn_info_message_password_strip() { + if [ "${commandname}" != "DETAILS" ]; then + if [ "${serverpassword}" ]; then + serverpassword="********" + fi + + if [ "${rconpassword}" ]; then + rconpassword="********" + fi + + if [ "${adminpassword}" ]; then + adminpassword="********" + fi + + if [ "${statspassword}" ]; then + statspassword="********" + fi + + if [ "${webadminpass}" ]; then + webadminpass="********" + fi + + if [ "${telnetpass}" ]; then + telnetpass="********" + fi + + if [ "${wsapikey}" ]; then + wsapikey="********" + fi + + if [ "${gslt}" ]; then + gslt="********" + fi + fi +} + +# Alert Summary +# used with alertlog +fn_info_message_head() { + echo -e "" + echo -e "${lightyellow}Alert Summary${default}" + fn_messages_separator + echo -e "Message" + echo -e "${alertbody}" + echo -e "" + echo -e "Game" + echo -e "${gamename}" + echo -e "" + echo -e "Server name" + echo -e "${servername}" + echo -e "" + echo -e "Hostname" + echo -e "${HOSTNAME}" + echo -e "" + echo -e "Server IP" + echo -e "${ip}:${port}" +} + +fn_info_message_distro() { + # + # Distro Details + # ================================= + # Date: Sun 21 Feb 2021 09:22:53 AM UTC + # Distro: Ubuntu 20.04.2 LTS + # Arch: x86_64 + # Kernel: 5.4.0-65-generic + # Hostname: server + # Uptime: 16d, 5h, 18m + # tmux: tmux 3.0a + # glibc: 2.31 + + echo -e "" + echo -e "${lightyellow}Distro Details${default}" + fn_messages_separator + { + echo -e "${lightblue}Date:\t${default}$(date)" + echo -e "${lightblue}Distro:\t${default}${distroname}" + echo -e "${lightblue}Arch:\t${default}${arch}" + echo -e "${lightblue}Kernel:\t${default}${kernel}" + echo -e "${lightblue}Hostname:\t${default}${HOSTNAME}" + echo -e "${lightblue}Uptime:\t${default}${days}d, ${hours}h, ${minutes}m" + echo -e "${lightblue}tmux:\t${default}${tmuxv}" + echo -e "${lightblue}glibc:\t${default}${glibcversion}" + if [ -n "${javaram}" ]; then + echo -e "${lightblue}Java:\t${default}${javaversion}" + fi + } | column -s $'\t' -t +} + +fn_info_message_server_resource() { + # + # Server Resource + # ================================= + # CPU + # Model: AMD EPYC 7601 32-Core Processor + # Cores: 2 + # Frequency: 2199.994MHz + # Avg Load: 0.01, 0.05, 0.18 + # + # Memory + # Mem: total used free cached available + # Physical: 3.9GB 350MB 3.3GB 3.2GB 3.3GB + # Swap: 512MB 55MB 458MB + # + # Storage + # Filesystem: /dev/sda + # Total: 79G + # Used: 73G + # Available: 1.4G + # + # Network + # IP: 0.0.0.0 + # Internet IP: 176.58.124.96 + + echo -e "" + echo -e "${lightyellow}Server Resource${default}" + fn_messages_separator + { + echo -e "${lightyellow}CPU\t${default}" + echo -e "${lightblue}Model:\t${default}${cpumodel}" + echo -e "${lightblue}Cores:\t${default}${cpucores}" + echo -e "${lightblue}Frequency:\t${default}${cpufreqency}MHz" + echo -e "${lightblue}Avg Load:\t${default}${load}" + } | column -s $'\t' -t + echo -e "" + { + echo -e "${lightyellow}Memory\t${default}" + echo -e "${lightblue}Mem:\t${lightblue}total\tused\tfree\tcached\tavailable${default}" + echo -e "${lightblue}Physical:\t${default}${physmemtotal}\t${physmemused}\t${physmemfree}\t${physmemcached}\t${physmemavailable}${default}" + echo -e "${lightblue}Swap:\t${default}${swaptotal}\t${swapused}\t${swapfree}${default}" + } | column -s $'\t' -t + echo -e "" + { + echo -e "${lightyellow}Storage${default}" + echo -e "${lightblue}Filesystem:\t${default}${filesystem}" + echo -e "${lightblue}Total:\t\t${default}${totalspace}" + echo -e "${lightblue}Used:\t\t${default}${usedspace}" + echo -e "${lightblue}Available:\t${default}${availspace}" + } | column -s $'\t' -t + echo -e "" + { + echo -e "${lightyellow}Network${default}" + if [ -n "${netint}" ]; then + echo -e "${lightblue}Interface:\t${default}${netint}" + fi + if [ -n "${netlink}" ]; then + echo -e "${lightblue}Link Speed:\t${default}${netlink}" + fi + echo -e "${lightblue}IP:\t${default}${ip}" + if [ "${ip}" != "${extip}" ]; then + echo -e "${lightblue}Internet IP:\t${default}${extip}" + fi + } | column -s $'\t' -t +} + +fn_info_message_gameserver_resource() { + # + # Game Server Resource Usage + # ================================= + # CPU Used: 1.1% + # Mem Used: 4.8% 189MB + # + # Storage + # Total: 241M + # Serverfiles: 240M + # Backups: 24K + + echo -e "" + echo -e "${lightyellow}Game Server Resource Usage${default}" + fn_messages_separator + { + if [ "${status}" != "0" ] && [ -v status ]; then + if [ -n "${cpuused}" ]; then + echo -e "${lightblue}CPU Used:\t${default}${cpuused}%${default}" + else + echo -e "${lightblue}CPU Used:\t${red}unknown${default}" + fi + if [ -n "${memused}" ]; then + echo -e "${lightblue}Mem Used:\t${default}${pmemused}%\t${memused}MB${default}" + else + echo -e "${lightblue}Mem Used:\t${default}${pmemused}\t${red}unknown${default}" + fi + else + echo -e "${lightblue}CPU Used:\t${default}0%${default}" + echo -e "${lightblue}Mem Used:\t${default}0%\t0MB${default}" + fi + } | column -s $'\t' -t + echo -e "" + { + echo -e "${lightyellow}Storage${default}" + echo -e "${lightblue}Total:\t${default}${rootdirdu}" + echo -e "${lightblue}Serverfiles:\t${default}${serverfilesdu}" + if [ -d "${backupdir}" ]; then + echo -e "${lightblue}Backups:\t${default}${backupdirdu}" + fi + } | column -s $'\t' -t +} + +fn_info_message_gameserver() { + # + # Counter-Strike: Global Offensive Server Details + # ================================= + # Server name: LinuxGSM + # Server IP: 0.0.0.0:27015 + # Internet IP: 176.48.124.96:34197 + # Server password: NOT SET + # RCON password: adminF54CC0VR + # Players: 0/16 + # Current map: de_mirage + # Default map: de_mirage + # Game type: 0 + # Game mode: 0 + # Tick rate: 64 + # Master Server: listed + # Status: STARTED + + echo -e "" + echo -e "${lightgreen}${gamename} Server Details${default}" + fn_info_message_password_strip + fn_messages_separator + { + # Server name + if [ -n "${gdname}" ]; then + echo -e "${lightblue}Server name:\t${default}${gdname}" + elif [ -n "${servername}" ]; then + echo -e "${lightblue}Server name:\t${default}${servername}" + fi + + # Server description + if [ -n "${serverdescription}" ]; then + echo -e "${lightblue}Server Description:\t${default}${serverdescription}" + fi + + # Appid + if [ -n "${appid}" ]; then + echo -e "${lightblue}App ID:\t${default}${appid}" + fi + + # Branch + if [ -n "${branch}" ]; then + echo -e "${lightblue}Branch:\t${default}${branch}" + fi + + # Beta Password + if [ -n "${betapassword}" ]; then + echo -e "${lightblue}Beta Password:\t${default}${betapassword}" + fi + + # Server Version + if [ -n "${gdversion}" ]; then + echo -e "${lightblue}Server Version:\t${default}${gdversion}" + fi + + # Server ip + echo -e "${lightblue}Server IP:\t${default}${ip}:${port}" + + # Internet ip + if [ -n "${extip}" ]; then + if [ "${ip}" != "${extip}" ]; then + echo -e "${lightblue}Internet IP:\t${default}${extip}:${port}" + fi + fi + + # Display ip + if [ -n "${displayip}" ]; then + echo -e "${lightblue}Display IP:\t${default}${displayip}:${port}" + fi + + # Server password + if [ -n "${serverpassword}" ]; then + echo -e "${lightblue}Server password:\t${default}${serverpassword}" + fi + + # Query enabled (Starbound) + if [ -n "${queryenabled}" ]; then + echo -e "${lightblue}Query enabled:\t${default}${queryenabled}" + fi + + # RCON enabled (Starbound) + if [ -n "${rconenabled}" ]; then + echo -e "${lightblue}RCON enabled:\t${default}${rconenabled}" + fi + + # RCON password + if [ -n "${rconpassword}" ]; then + echo -e "${lightblue}RCON password:\t${default}${rconpassword}" + fi + + # RCON web (Rust) + if [ -n "${rconweb}" ]; then + echo -e "${lightblue}RCON web:\t${default}${rconweb}" + fi + + # Admin password + if [ -n "${adminpassword}" ]; then + echo -e "${lightblue}Admin password:\t${default}${adminpassword}" + fi + + # Stats password (Quake Live) + if [ -n "${statspassword}" ]; then + echo -e "${lightblue}Stats password:\t${default}${statspassword}" + fi + + # Players + if [ "${querystatus}" != "0" ]; then + if [ -n "${maxplayers}" ]; then + echo -e "${lightblue}Maxplayers:\t${default}${maxplayers}" + fi + else + if [ -n "${gdplayers}" ] && [ -n "${gdmaxplayers}" ]; then + echo -e "${lightblue}Players:\t${default}${gdplayers}/${gdmaxplayers}" + elif [ -n "${gdplayers}" ] && [ -n "${maxplayers}" ]; then + echo -e "${lightblue}Players:\t${default}${gdplayers}/${maxplayers}" + elif [ -z "${gdplayers}" ] && [ -n "${gdmaxplayers}" ]; then + echo -e "${lightblue}Players:\t${default}0/${gdmaxplayers}" + elif [ -n "${gdplayers}" ] && [ -z "${gdmaxplayers}" ]; then + echo -e "${lightblue}Players:\t${default}${gdplayers}/∞" + elif [ -z "${gdplayers}" ] && [ -z "${gdmaxplayers}" ] && [ -n "${maxplayers}" ]; then + echo -e "${lightblue}Maxplayers:\t${default}${maxplayers}" + fi + fi + + # Reverved Slots + if [ -n "${statspassword}" ]; then + echo -e "${lightblue}Reserved Slots:\t${default}${reservedslots}" + fi + + # Bots + if [ -n "${gdbots}" ]; then + echo -e "${lightblue}Bots:\t${default}${gdbots}" + fi + + # Current map + if [ -n "${gdmap}" ]; then + echo -e "${lightblue}Current map:\t${default}${gdmap}" + fi + + # Default map + if [ -n "${defaultmap}" ]; then + echo -e "${lightblue}Default map:\t${default}${defaultmap}" + fi + + if [ -n "${defaultscenario}" ]; then + # Current scenario (Insurgency: Sandstorm) + if [ -n "${gdgamemode}" ]; then + echo -e "${lightblue}Current scenario:\t${default}${gdgamemode}" + fi + else + # Current game mode + if [ -n "${gdgamemode}" ]; then + echo -e "${lightblue}Current game mode:\t${default}${gdgamemode}" + fi + fi + + # Default scenario + if [ -n "${defaultscenario}" ]; then + echo -e "${lightblue}Default scenario:\t${default}${defaultscenario}" + fi + + # Game type + if [ -n "${gametype}" ]; then + echo -e "${lightblue}Game type:\t${default}${gametype}" + fi + + # Game mode + if [ -n "${gamemode}" ]; then + echo -e "${lightblue}Game mode:\t${default}${gamemode}" + fi + + # Game world + if [ -n "${gameworld}" ]; then + echo -e "${lightblue}Game world:\t${default}${gameworld}" + fi + + # Tick rate + if [ -n "${tickrate}" ]; then + echo -e "${lightblue}Tick rate:\t${default}${tickrate}" + fi + + # Sharding (Don't Starve Together) + if [ -n "${sharding}" ]; then + echo -e "${lightblue}Sharding:\t${default}${sharding}" + fi + + # Master (Don't Starve Together) + if [ -n "${master}" ]; then + echo -e "${lightblue}Master:\t${default}${master}" + fi + + # Shard (Don't Starve Together) + if [ -n "${shard}" ]; then + echo -e "${lightblue}Shard:\t${default}${shard}" + fi + + # Cluster (Don't Starve Together) + if [ -n "${cluster}" ]; then + echo -e "${lightblue}Cluster:\t${default}${cluster}" + fi + + # Cave (Don't Starve Together) + if [ -n "${cave}" ]; then + echo -e "${lightblue}Cave:\t${default}${cave}" + fi + + # Creativemode (Hurtworld) + if [ -n "${creativemode}" ]; then + echo -e "${lightblue}Creativemode:\t${default}${creativemode}" + fi + + # TeamSpeak dbplugin + if [ -n "${dbplugin}" ]; then + echo -e "${lightblue}dbplugin:\t${default}${dbplugin}" + fi + + # ASE (Multi Theft Auto) + if [ -n "${ase}" ]; then + echo -e "${lightblue}ASE:\t${default}${ase}" + fi + + # Save interval (Rust) + if [ -n "${saveinterval}" ]; then + echo -e "${lightblue}Save interval:\t${default}${saveinterval}s" + fi + + # Seed (Rust) + if [ -n "${seed}" ]; then + echo -e "${lightblue}Seed:\t${default}${seed}" + fi + + # Salt (Rust) + if [ -n "${salt}" ]; then + echo -e "${lightblue}Salt:\t${default}${salt}" + fi + + # World Size (Rust) + if [ -n "${worldsize}" ]; then + echo -e "${lightblue}World size:\t${default}${worldsize}m" + fi + + # Random map rotation mode (Squad and Post Scriptum) + if [ -n "${randommap}" ]; then + echo -e "${lightblue}Map rotation:\t${default}${randommap}" + fi + + # Server Version (Jedi Knight II: Jedi Outcast) + if [ -n "${serverversion}" ]; then + echo -e "${lightblue}Server Version:\t${default}${serverversion}" + fi + + # authentication token (Factorio) + if [ -n "${authtoken}" ]; then + echo -e "${lightblue}Auth Token:\t${default}${authtoken}" + fi + + # savegameinterval (Factorio) + if [ -n "${savegameinterval}" ]; then + echo -e "${lightblue}Savegame Interval:\t${default}${savegameinterval}" + fi + + # versioncount (Factorio) + if [ -n "${versioncount}" ]; then + echo -e "${lightblue}Version Count:\t${default}${versioncount}" + fi + + # Listed on Master server + if [ -n "${displaymasterserver}" ]; then + if [ "${displaymasterserver}" == "true" ]; then + echo -e "${lightblue}Master server:\t${green}listed${default}" + else + echo -e "${lightblue}Master server:\t${red}not listed${default}" + fi + fi + + # Game server status + if [ "${status}" == "0" ]; then + echo -e "${lightblue}Status:\t${red}STOPPED${default}" + else + echo -e "${lightblue}Status:\t${green}STARTED${default}" + fi + } | column -s $'\t' -t + echo -e "" +} + +fn_info_message_script() { + # csgoserver Script Details + # ================================= + # Script name: csgoserver + # LinuxGSM version: v21.1.3 + # glibc required: 2.18 + # Discord alert: off + # Email alert: off + # Gotify alert: off + # IFTTT alert: off + # Mailgun (email) alert: off + # Pushbullet alert: off + # Pushover alert: off + # Rocketchat alert: off + # Slack alert: off + # Telegram alert: off + # Update on start: off + # User: lgsm + # Location: /home/lgsm/csgoserver + # Config file: /home/lgsm/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg + + echo -e "${lightgreen}${selfname} Script Details${default}" + fn_messages_separator + { + # Script name + echo -e "${lightblue}Script name:\t${default}${selfname}" + + # LinuxGSM version + if [ -n "${version}" ]; then + echo -e "${lightblue}LinuxGSM version:\t${default}${version}" + fi + + # glibc required + if [ -n "${glibc}" ]; then + if [ "${glibc}" == "null" ]; then + # Glibc is not required. + : + 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 + 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}" + fi + fi + + # Discord alert + echo -e "${lightblue}Discord alert:\t${default}${discordalert}" + # Email alert + echo -e "${lightblue}Email alert:\t${default}${emailalert}" + # Gotify alert + echo -e "${lightblue}Gotify alert:\t${default}${gotifyalert}" + # IFTTT alert + echo -e "${lightblue}IFTTT alert:\t${default}${iftttalert}" + # Mailgun alert + echo -e "${lightblue}Mailgun (email) alert:\t${default}${mailgunalert}" + # Pushbullet alert + echo -e "${lightblue}Pushbullet alert:\t${default}${pushbulletalert}" + # Pushover alert + echo -e "${lightblue}Pushover alert:\t${default}${pushoveralert}" + # Rocketchat alert + echo -e "${lightblue}Rocketchat alert:\t${default}${rocketchatalert}" + # Slack alert + echo -e "${lightblue}Slack alert:\t${default}${slackalert}" + # Telegram alert + echo -e "${lightblue}Telegram alert:\t${default}${telegramalert}" + + # Update on start + if [ -n "${updateonstart}" ]; then + echo -e "${lightblue}Update on start:\t${default}${updateonstart}" + fi + + # User + echo -e "${lightblue}User:\t${default}$(whoami)" + + # Script location + echo -e "${lightblue}Location:\t${default}${rootdir}" + + # Config file location + if [ -n "${servercfgfullpath}" ]; then + if [ -f "${servercfgfullpath}" ]; then + echo -e "${lightblue}Config file:\t${default}${servercfgfullpath}" + elif [ -d "${servercfgfullpath}" ]; then + echo -e "${lightblue}Config dir:\t${default}${servercfgfullpath}" + else + echo -e "${lightblue}Config file:\t${default}${red}${servercfgfullpath}${default} (${red}FILE MISSING${default})" + fi + fi + + # Network config file location (ARMA 3) + if [ -n "${networkcfgfullpath}" ]; then + echo -e "${lightblue}Network config file:\t${default}${networkcfgfullpath}" + fi + } | column -s $'\t' -t +} + +fn_info_message_backup() { + # + # Backups + # ================================= + # No. of backups: 1 + # Latest backup: + # date: Fri May 6 18:34:19 UTC 2016 + # file: /home/lgsm/qlserver/backups/ql-server-2016-05-06-183239.tar.gz + # size: 945M + + echo -e "" + echo -e "${lightgreen}Backups${default}" + fn_messages_separator + if [ ! -d "${backupdir}" ] || [ "${backupcount}" == "0" ]; then + echo -e "No Backups created" + else + { + echo -e "${lightblue}No. of backups:\t${default}${backupcount}" + echo -e "${lightblue}Latest backup:${default}" + if [ "${lastbackupdaysago}" == "0" ]; then + echo -e "${lightblue} date:\t${default}${lastbackupdate} (less than 1 day ago)" + elif [ "${lastbackupdaysago}" == "1" ]; then + echo -e "${lightblue} date:\t${default}${lastbackupdate} (1 day ago)" + else + echo -e "${lightblue} date:\t${default}${lastbackupdate} (${lastbackupdaysago} days ago)" + fi + echo -e "${lightblue} file:\t${default}${lastbackup}" + echo -e "${lightblue} size:\t${default}${lastbackupsize}" + } | column -s $'\t' -t + fi +} + +fn_info_message_commandlineparms() { + # + # Command-line Parameters + # ================================= + # ./run_server_x86.sh +set net_strict 1 + + echo -e "" + echo -e "${lightgreen}Command-line Parameters${default}" + fn_info_message_password_strip + fn_messages_separator + if [ "${serverpassword}" == "NOT SET" ]; then + unset serverpassword + fi + fn_reload_startparameters + echo -e "${preexecutable} ${executable} ${startparameters}" +} + +fn_info_message_ports_edit() { + # + # Ports + # ================================= + # Change ports by editing the parameters in: + # /home/lgsm/qlserver/serverfiles/baseq3/ql-server.cfg + echo -e "" + echo -e "${lightgreen}Ports${default}" + fn_messages_separator + echo -e "${lightblue}Change ports by editing the parameters in:${default}" + + startparameterslocation="${red}UNKNOWN${default}" + # engines/games that require editing in the config file. + local ports_edit_array=("ac" "arma3" "armar" "bo" "bt" "cd" "dst" "eco" "idtech2" "idtech3" "idtech3_ql" "jc2" "jc3" "lwjgl2" "mcb" "nec" "pc" "pc2" "prism3d" "pz" "qw" "refractor" "renderware" "rw" "sb" "sdtd" "st" "stn" "ts3" "tw" "terraria" "unreal" "unreal2" "unreal3" "vints" "wurm") + for port_edit in "${ports_edit_array[@]}"; do + if [ "${shortname}" == "ut3" ]; then + startparameterslocation="${servercfgdir}/UTWeb.ini" + elif [ "${shortname}" == "kf2" ]; then + startparameterslocation="${servercfgdir}/LinuxServer-KFEngine.ini\n${servercfgdir}/KFWeb.ini" + elif [ "${engine}" == "${port_edit}" ] || [ "${gamename}" == "${port_edit}" ] || [ "${shortname}" == "${port_edit}" ]; then + startparameterslocation="${servercfgfullpath}" + fi + done + # engines/games that require editing the start parameters. + local ports_edit_array=("av" "ck" "col" "fctr" "goldsrc" "hw" "iw3.0" "ioquake3" "qfusion" "rust" "scpsl" "scpslsm" "sol" "spark" "source" "unreal4" "arma3" "dayz" "unt" "vh") + for port_edit in "${ports_edit_array[@]}"; do + if [ "${engine}" == "${port_edit}" ] || [ "${gamename}" == "${port_edit}" ] || [ "${shortname}" == "${port_edit}" ]; then + startparameterslocation="${configdirserver}" + fi + done + echo -e "${startparameterslocation}" + echo -e "" +} + +fn_info_message_ports() { + echo -e "${lightblue}Useful port diagnostic command:${default}" + if [ "${shortname}" == "armar" ]; then + echo -e "ss -tuplwn | grep enfMain" + elif [ "${shortname}" == "av" ]; then + echo -e "ss -tuplwn | grep AvorionServer" + elif [ "${shortname}" == "bf1942" ]; then + echo -e "ss -tuplwn | grep bf1942_lnxded" + elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "nec" ] || [ "${shortname}" == "pmc" ] || [ "${shortname}" == "rw" ] || [ "${shortname}" == "vpmc" ] || [ "${shortname}" == "wmc" ]; then + echo -e "ss -tuplwn | grep java" + elif [ "${shortname}" == "terraria" ]; then + echo -e "ss -tuplwn | grep Main" + elif [ "${engine}" == "source" ]; then + echo -e "ss -tuplwn | grep srcds_linux" + elif [ "${engine}" == "goldsrc" ]; then + echo -e "ss -tuplwn | grep hlds_linux" + else + executableshort="$(basename "${executable}" | cut -c -15)" + echo -e "ss -tuplwn | grep ${executableshort}" + fi + echo -e "" +} + +fn_info_message_statusbottom() { + echo -e "" + if [ "${status}" == "0" ]; then + echo -e "${lightblue}Status:\t${red}STOPPED${default}" + else + echo -e "${lightblue}Status:\t${green}STARTED${default}" + fi + echo -e "" +} + +fn_info_logs() { + echo -e "" + echo -e "${selfname} Logs" + echo -e "=================================" + + if [ -n "${lgsmlog}" ]; then + echo -e "\nScript log\n===================" + if [ ! "$(ls -A "${lgsmlogdir}")" ]; then + echo -e "${lgsmlogdir} (NO LOG FILES)" + elif [ ! -s "${lgsmlog}" ]; then + echo -e "${lgsmlog} (LOG FILE IS EMPTY)" + else + echo -e "${lgsmlog}" + tail -25 "${lgsmlog}" + fi + echo -e "" + fi + + if [ -n "${consolelog}" ]; then + echo -e "\nConsole log\n====================" + if [ ! "$(ls -A "${consolelogdir}")" ]; then + echo -e "${consolelogdir} (NO LOG FILES)" + elif [ ! -s "${consolelog}" ]; then + echo -e "${consolelog} (LOG FILE IS EMPTY)" + else + echo -e "${consolelog}" + tail -25 "${consolelog}" | awk '{ sub("\r$", ""); print }' + fi + echo -e "" + fi + + if [ -n "${gamelogdir}" ]; then + echo -e "\nServer log\n===================" + if [ ! "$(ls -A "${gamelogdir}")" ]; then + echo -e "${gamelogdir} (NO LOG FILES)" + else + echo -e "${gamelogdir}" + # dos2unix sed 's/\r//' + tail "${gamelogdir}"/* 2> /dev/null | grep -v "==>" | sed '/^$/d' | sed 's/\r//' | tail -25 + fi + echo -e "" + fi +} + +# Engine/Game Specific details + +# Function used to generate port info. by passing info to function. (Reduces repeating code) +# example output +# DESCRIPTION PORT PROTOCOL LISTEN +# Game 7777 udp 1 +# RAW UDP Socket 7778 udp 1 +# Query 27015 udp 1 +# RCON 27020 tcp 1 + +fn_port() { + if [ "${1}" == "header" ]; then + echo -e "${lightblue}DESCRIPTION\tPORT\tPROTOCOL\tLISTEN${default}" + else + portname="${1}" + porttype="${2}" + portprotocol="${3}" + echo -e "${portname}\t${!porttype}\t${portprotocol}\t$(echo "${ssinfo}" | grep "${portprotocol}" | grep -c "${!porttype}")" + fi +} + +fn_info_message_ac() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Game" port tcp + fn_port "Query" queryport udp + fn_port "HTTP" httpport tcp + } | column -s $'\t' -t +} + +fn_info_message_ark() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "RAW UDP Socket" rawport udp + fn_port "Query" queryport udp + fn_port "RCON" rconport tcp + } | column -s $'\t' -t +} + +fn_info_message_arma3() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Voice" voiceport udp + fn_port "Query" queryport udp + fn_port "Steam Master" steammasterport udp + fn_port "Voice (unused)" voiceunusedport udp + fn_port "BattleEye" battleeyeport udp + } | column -s $'\t' -t +} + +fn_info_message_armar() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Steam Query" queryport udp + fn_port "BattleEye" battleeyeport tcp + } | column -s $'\t' -t +} + +fn_info_message_av() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "Steam Master" steammasterport udp + fn_port "Steam Query" steamqueryport udp + fn_port "RCON" rconport tcp + } | column -s $'\t' -t +} + +fn_info_message_bf1942() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_message_bfv() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_message_bo() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_message_bt() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_message_btl() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "RCON" rconport tcp + } | column -s $'\t' -t +} + +fn_info_messages_cd() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Steam" steamport udp + fn_port "RCON" rconport tcp + } | column -s $'\t' -t +} + +fn_info_messages_ck() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_message_cmw() { + fn_info_message_password_strip + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "RCON" rconport tcp + } | column -s $'\t' -t +} + +fn_info_message_cod() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_message_coduo() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_message_cod2() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_message_cod4() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_message_codwaw() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_message_col() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport tcp + fn_port "Steam" steamport tcp + } | column -s $'\t' -t +} + +fn_info_message_csgo() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport tcp + fn_port "RCON" rconport tcp + fn_port "SourceTV" sourcetvport udp + fn_port "Client" clientport udp + } | column -s $'\t' -t +} + +fn_info_message_dayz() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query Steam" queryport udp + fn_port "Steam Master" steammasterport udp + fn_port "BattleEye" battleeyeport udp + } | column -s $'\t' -t +} + +fn_info_message_dodr() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_message_dst() { + { + fn_port "header" + fn_port "Game: Server" port udp + fn_port "Game: Master" masterport udp + fn_port "Steam: Auth" steamauthport udp + fn_port "Steam: Master" steammasterport udp + } | column -s $'\t' -t +} + +fn_info_message_eco() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Web Admin" webadminport tcp + } | column -s $'\t' -t +} + +fn_info_message_etl() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_message_fctr() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "RCON" rconport tcp + } | column -s $'\t' -t +} + +fn_info_message_goldsrc() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Client" clientport udp + } | column -s $'\t' -t +} + +fn_info_message_hw() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_message_ins() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport tcp + fn_port "RCON" rconport tcp + fn_port "SourceTV" sourcetvport udp + fn_port "Client" clientport udp + } | column -s $'\t' -t +} + +fn_info_message_inss() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "RCON" rconport tcp + } | column -s $'\t' -t +} + +fn_info_message_jc2() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_message_jc3() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "Steam" steamport udp + fn_port "HTTP" httpport tcp + } | column -s $'\t' -t +} + +fn_info_message_jk2() { + { + fn_port "header" + fn_port "Game" port udp + } | column -s $'\t' -t +} + +fn_info_message_kf() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "Query (GameSpy)" queryportgs udp + fn_port "Web Admin" webadminport tcp + fn_port "LAN" lanport udp + fn_port "Steam" steamport udp + fn_port "Steam Master" steammasterport udp + } | column -s $'\t' -t + echo -e "" + echo -e "${lightgreen}${servername} Web Admin${default}" + fn_messages_separator + { + echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}" + echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}" + echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}" + echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}" + } | column -s $'\t' -t +} + +fn_info_message_kf2() { + fn_info_message_password_strip + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "Web Admin" webadminport tcp + } | column -s $'\t' -t + echo -e "" + echo -e "${lightgreen}${servername} Web Admin${default}" + fn_messages_separator + { + echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}" + echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}" + echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}" + echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}" + } | column -s $'\t' -t +} + +fn_info_message_lo() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_message_mc() { + { + fn_port "header" + fn_port "Game" port tcp + fn_port "Query" queryport udp + fn_port "RCON" rconport tcp + } | column -s $'\t' -t +} + +fn_info_message_mcb() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Game" portipv6 udp6 + } | column -s $'\t' -t +} + +fn_info_message_mh() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "Beacon" beaconport udp + } | column -s $'\t' -t +} + +fn_info_message_mohaa() { + { + fn_port "header" + fn_port "Game" port udp + } | column -s $'\t' -t +} + +fn_info_message_mom() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Beacon" beaconport udp + } | column -s $'\t' -t +} + +fn_info_message_mta() { + { + fn_port "header" + fn_port "Game" port udp + if [ "${ase}" == "Enabled" ]; then + fn_port "Query" queryport udp + fi + fn_port "HTTP" httpport tcp + } | column -s $'\t' -t +} + +fn_info_message_nec() { + { + fn_port "header" + fn_port "Game" port udp + } | column -s $'\t' -t +} + +fn_info_message_onset() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "HTTP" httpport tcp + } | column -s $'\t' -t +} + +fn_info_message_pc() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "Steam" steamport udp + } | column -s $'\t' -t +} + +fn_info_message_pc2() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "Steam" steamport udp + } | column -s $'\t' -t +} + +fn_info_message_pstbs() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "RCON" rconport tcp + } | column -s $'\t' -t +} + +fn_info_message_pvr() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Game" port tcp + fn_port "Game+400" port401 udp + fn_port "Query" queryport tcp + } | column -s $'\t' -t +} + +fn_info_message_pz() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_message_qw() { + { + fn_port "header" + fn_port "Game" port udp + } | column -s $'\t' -t +} + +fn_info_message_q2() { + { + fn_port "header" + fn_port "Game" port udp + } | column -s $'\t' -t +} + +fn_info_message_q3() { + { + fn_port "header" + fn_port "Game" port udp + } | column -s $'\t' -t +} + +fn_info_message_ql() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "RCON" rconport tcp + fn_port "Stats" statsport udp + } | column -s $'\t' -t +} + +fn_info_message_ro() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "Web Admin" webadminport tcp + fn_port "LAN" lanport udp + fn_port "Steam" steamport udp + fn_port "Steam Master" steammasterport udp + } | column -s $'\t' -t + echo -e "" + echo -e "${lightgreen}${servername} Web Admin${default}" + fn_messages_separator + { + echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}" + echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}" + echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}" + echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}" + } | column -s $'\t' -t +} + +fn_info_message_rtcw() { + { + fn_port "header" + fn_port "Game" port udp + } | column -s $'\t' -t +} + +fn_info_message_rust() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "RCON" rconport tcp + fn_port "App" appport tcp + } | column -s $'\t' -t +} + +fn_info_message_rw() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Game+1" port2 udp + fn_port "Game+2" port3 udp + fn_port "Game+3" port4 udp + fn_port "Game+1" port2 tcp + fn_port "Game+2" port3 tcp + fn_port "Game+3" port4 tcp + fn_port "Query" queryport tcp + fn_port "Query HTTP" httpqueryport tcp + fn_port "RCON" rconport tcp + } | column -s $'\t' -t +} + +fn_info_message_samp() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "RCON" rconport udp + } | column -s $'\t' -t +} + +fn_info_message_sb() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport tcp + fn_port "RCON" rconport tcp + } | column -s $'\t' -t +} + +fn_info_message_sbots() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_message_scpsl() { + { + fn_port "header" + fn_port "Game" port tcp + } | column -s $'\t' -t +} + +fn_info_message_sdtd() { + fn_info_message_password_strip + { + fn_port "header" + fn_port "Game" port udp + fn_port "Game+2" port3 udp + fn_port "Query" queryport tcp + fn_port "Web Admin" webadminport tcp + fn_port "Telnet" telnetport tcp + } | column -s $'\t' -t + echo -e "" + echo -e "${lightgreen}${gamename} Web Admin${default}" + fn_messages_separator + { + echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}" + echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}/index.html" + echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}" + echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}" + } | column -s $'\t' -t + echo -e "" + echo -e "${lightgreen}${gamename} Telnet${default}" + fn_messages_separator + { + echo -e "${lightblue}Telnet enabled:\t${default}${telnetenabled}" + echo -e "${lightblue}Telnet address:\t${default}${telnetip} ${telnetport}" + echo -e "${lightblue}Telnet password:\t${default}${telnetpass}" + } | column -s $'\t' -t +} + +fn_info_message_sf() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "Beacon" beaconport udp + } | column -s $'\t' -t +} + +fn_info_message_sof2() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_message_sol() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "Files" filesport tcp + } | column -s $'\t' -t +} + +fn_info_message_prism3d() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_message_source() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport tcp + fn_port "RCON" rconport tcp + fn_port "SourceTV" sourcetvport udp + # Will not show if unaviable + if [ "${steamport}" == "0" ] || [ -v "${steamport}" ]; then + fn_port "Steam" steamport udp + fi + fn_port "Client" clientport udp + } | column -s $'\t' -t +} + +fn_info_message_spark() { + fn_info_message_password_strip + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "Web Admin" webadminport tcp + } | column -s $'\t' -t + echo -e "" + echo -e "${lightgreen}${gamename} Web Admin${default}" + fn_messages_separator + { + echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}/index.html" + echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}" + echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}" + } | column -s $'\t' -t +} + +fn_info_message_squad() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "RCON" rconport tcp + } | column -s $'\t' -t +} + +fn_info_message_st() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "Web Admin" webadminport tcp + } | column -s $'\t' -t + echo -e "" + echo -e "${lightgreen}${gamename} Web Admin${default}" + fn_messages_separator + { + echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}" + } | column -s $'\t' -t +} + +fn_info_message_ti() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_message_ts3() { + { + fn_port "header" + fn_port "Voice" port udp + fn_port "Query" queryport tcp + fn_port "Query (SSH)" querysshport tcp + fn_port "Query (http)" queryhttpport tcp + fn_port "Query (https)" queryhttpsport tcp + fn_port "File Transfer" fileport tcp + fn_port "Telnet" telnetport tcp + } | column -s $'\t' -t +} + +fn_info_message_tw() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_message_terraria() { + { + fn_port "header" + fn_port "Game" port tcp + fn_port "Query" queryport tcp + } | column -s $'\t' -t +} + +fn_info_message_tu() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "Steam" steamport udp + } | column -s $'\t' -t +} + +fn_info_message_unreal() { + fn_info_message_password_strip + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "LAN Beacon" beaconport udp + fn_port "Web Admin" webadminport tcp + } | column -s $'\t' -t + echo -e "" + echo -e "${lightgreen}${servername} Web Admin${default}" + fn_messages_separator + { + echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}" + echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}" + echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}" + echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}" + } | column -s $'\t' -t +} + +fn_info_message_ut2k4() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "Query (GameSpy)" queryportgs udp + fn_port "Web Admin" webadminport tcp + fn_port "LAN" lanport udp + } | column -s $'\t' -t + echo -e "" + echo -e "${lightgreen}${servername} Web Admin${default}" + fn_messages_separator + { + echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}" + echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}" + echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}" + echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}" + } | column -s $'\t' -t +} + +fn_info_message_unreal() { + fn_info_message_password_strip + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "LAN Beacon" beaconport udp + fn_port "Web Admin" webadminport tcp + } | column -s $'\t' -t + echo -e "" + echo -e "${lightgreen}${servername} Web Admin${default}" + fn_messages_separator + { + echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}" + echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}" + echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}" + echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}" + } | column -s $'\t' -t +} + +fn_info_message_unt() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "Steam" steamport udp + } | column -s $'\t' -t +} + +fn_info_message_ut() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_message_ut3() { + fn_info_message_password_strip + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "Web Admin" webadminport tcp + } | column -s $'\t' -t + echo -e "" + echo -e "${lightgreen}${servername} Web Admin${default}" + fn_messages_separator + { + echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}" + echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}" + echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}" + echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}" + } | column -s $'\t' -t +} + +fn_info_message_vh() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_message_vints() { + { + fn_port "header" + fn_port "Game" port tcp + } | column -s $'\t' -t +} + +fn_info_message_vpmc() { + { + fn_port "header" + fn_port "Game" port tcp + } | column -s $'\t' -t +} + +fn_info_message_wet() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_message_wf() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "HTTP" httpport tcp + } | column -s $'\t' -t +} + +fn_info_message_wurm() { + { + fn_port "header" + fn_port "Game" port tcp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_message_stn() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_message_select_engine() { + # Display details depending on game or engine. + if [ "${shortname}" == "ac" ]; then + fn_info_message_ac + elif [ "${shortname}" == "ark" ]; then + fn_info_message_ark + elif [ "${shortname}" == "arma3" ]; then + fn_info_message_arma3 + elif [ "${shortname}" == "armar" ]; then + fn_info_message_armar + elif [ "${shortname}" == "av" ]; then + fn_info_message_av + elif [ "${shortname}" == "bf1942" ]; then + fn_info_message_bf1942 + elif [ "${shortname}" == "bfv" ]; then + fn_info_message_bfv + elif [ "${shortname}" == "bo" ]; then + fn_info_message_bo + elif [ "${shortname}" == "bt" ]; then + fn_info_message_bt + elif [ "${shortname}" == "btl" ]; then + fn_info_message_btl + elif [ "${shortname}" == "cd" ]; then + fn_info_messages_cd + elif [ "${shortname}" == "ck" ]; then + fn_info_messages_ck + elif [ "${shortname}" == "csgo" ]; then + fn_info_message_csgo + elif [ "${shortname}" == "cmw" ]; then + fn_info_message_cmw + elif [ "${shortname}" == "cod" ]; then + fn_info_message_cod + elif [ "${shortname}" == "coduo" ]; then + fn_info_message_coduo + elif [ "${shortname}" == "cod2" ]; then + fn_info_message_cod2 + elif [ "${shortname}" == "cod4" ]; then + fn_info_message_cod4 + elif [ "${shortname}" == "codwaw" ]; then + fn_info_message_codwaw + elif [ "${shortname}" == "col" ]; then + fn_info_message_col + elif [ "${shortname}" == "dayz" ]; then + fn_info_message_dayz + elif [ "${shortname}" == "dodr" ]; then + fn_info_message_dodr + elif [ "${shortname}" == "dst" ]; then + fn_info_message_dst + elif [ "${shortname}" == "eco" ]; then + fn_info_message_eco + elif [ "${shortname}" == "etl" ]; then + fn_info_message_etl + elif [ "${shortname}" == "fctr" ]; then + fn_info_message_fctr + elif [ "${shortname}" == "hw" ]; then + fn_info_message_hw + elif [ "${shortname}" == "ins" ]; then + fn_info_message_ins + elif [ "${shortname}" == "inss" ]; then + fn_info_message_inss + elif [ "${shortname}" == "jc2" ]; then + fn_info_message_jc2 + elif [ "${shortname}" == "jc3" ]; then + fn_info_message_jc3 + elif [ "${shortname}" == "jk2" ]; then + fn_info_message_jk2 + elif [ "${shortname}" == "kf" ]; then + fn_info_message_kf + elif [ "${shortname}" == "kf2" ]; then + fn_info_message_kf2 + elif [ "${shortname}" == "lo" ]; then + fn_info_message_lo + elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ] || [ "${shortname}" == "wmc" ]; then + fn_info_message_mc + elif [ "${shortname}" == "mcb" ]; then + fn_info_message_mcb + elif [ "${shortname}" == "mh" ]; then + fn_info_message_mh + elif [ "${shortname}" == "mohaa" ]; then + fn_info_message_mohaa + elif [ "${shortname}" == "mom" ]; then + fn_info_message_mom + elif [ "${shortname}" == "mta" ]; then + fn_info_message_mta + elif [ "${shortname}" == "nec" ]; then + fn_info_message_nec + elif [ "${shortname}" == "onset" ]; then + fn_info_message_onset + elif [ "${shortname}" == "pc" ]; then + fn_info_message_pc + elif [ "${shortname}" == "pc2" ]; then + fn_info_message_pc2 + elif [ "${shortname}" == "pstbs" ]; then + fn_info_message_pstbs + elif [ "${shortname}" == "pvr" ]; then + fn_info_message_pvr + elif [ "${shortname}" == "pz" ]; then + fn_info_message_pz + elif [ "${shortname}" == "q2" ]; then + fn_info_message_q2 + elif [ "${shortname}" == "q3" ]; then + fn_info_message_q3 + elif [ "${shortname}" == "ql" ]; then + fn_info_message_ql + elif [ "${shortname}" == "qw" ]; then + fn_info_message_qw + elif [ "${shortname}" == "ro" ]; then + fn_info_message_ro + elif [ "${shortname}" == "rtcw" ]; then + fn_info_message_rtcw + elif [ "${shortname}" == "samp" ]; then + fn_info_message_samp + elif [ "${shortname}" == "sb" ]; then + fn_info_message_sb + elif [ "${shortname}" == "sbots" ]; then + fn_info_message_sbots + elif [ "${shortname}" == "scpsl" ] || [ "${shortname}" == "scpslsm" ]; then + fn_info_message_scpsl + elif [ "${shortname}" == "sdtd" ]; then + fn_info_message_sdtd + elif [ "${shortname}" == "sf" ]; then + fn_info_message_sf + elif [ "${shortname}" == "sof2" ]; then + fn_info_message_sof2 + elif [ "${shortname}" == "sol" ]; then + fn_info_message_sol + elif [ "${shortname}" == "squad" ]; then + fn_info_message_squad + elif [ "${shortname}" == "st" ]; then + fn_info_message_st + elif [ "${shortname}" == "stn" ]; then + fn_info_message_stn + elif [ "${shortname}" == "terraria" ]; then + fn_info_message_terraria + elif [ "${shortname}" == "ti" ]; then + fn_info_message_ti + elif [ "${shortname}" == "ts3" ]; then + fn_info_message_ts3 + elif [ "${shortname}" == "tu" ]; then + fn_info_message_tu + elif [ "${shortname}" == "tw" ]; then + fn_info_message_tw + elif [ "${shortname}" == "unt" ]; then + fn_info_message_unt + elif [ "${shortname}" == "vh" ]; then + fn_info_message_vh + elif [ "${shortname}" == "vints" ]; then + fn_info_message_vints + elif [ "${shortname}" == "rust" ]; then + fn_info_message_rust + elif [ "${shortname}" == "rw" ]; then + fn_info_message_rw + elif [ "${shortname}" == "ut" ]; then + fn_info_message_ut + elif [ "${shortname}" == "ut2k4" ]; then + fn_info_message_ut2k4 + elif [ "${shortname}" == "ut3" ]; then + fn_info_message_ut3 + elif [ "${shortname}" == "vpmc" ]; then + fn_info_message_vpmc + elif [ "${shortname}" == "wet" ]; then + fn_info_message_wet + elif [ "${shortname}" == "wf" ]; then + fn_info_message_wf + elif [ "${shortname}" == "wurm" ]; then + fn_info_message_wurm + elif [ "${engine}" == "goldsrc" ]; then + fn_info_message_goldsrc + elif [ "${engine}" == "prism3d" ]; then + fn_info_message_prism3d + elif [ "${engine}" == "source" ]; then + fn_info_message_source + elif [ "${engine}" == "spark" ]; then + fn_info_message_spark + elif [ "${engine}" == "unreal" ]; then + fn_info_message_unreal + else + fn_print_error_nl "Unable to detect game server." + fi +} diff --git a/lgsm/functions/info_stats.sh b/lgsm/functions/info_stats.sh new file mode 100644 index 000000000..0589770f6 --- /dev/null +++ b/lgsm/functions/info_stats.sh @@ -0,0 +1,173 @@ +#!/bin/bash +# LinuxGSM info_stats.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Collect optional Stats sent to LinuxGSM project. +# Uses Google analytics. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +info_distro.sh + +# remove uuid that was used in v20.2.0 and below +if [ -f "${datadir}/uuid.txt" ]; then + rm -f "${datadir:?}/uuid.txt" +fi + +# generate uuid's +# this consists of a standard uuid and a docker style name +# to allow human readable uuid's. +# e.g angry_proskuriakova_38a9ef76-4ae3-46a6-a895-7af474831eba + +if [ ! -f "${datadir}/uuid-${selfname}.txt" ] || [ ! -f "${datadir}/uuid-install.txt" ]; then + # download dictionary words + if [ ! -f "${datadir}/name-left.csv" ]; then + fn_fetch_file_github "lgsm/data" "name-left.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nohash" + fi + if [ ! -f "${datadir}/name-right.csv" ]; then + fn_fetch_file_github "lgsm/data" "name-right.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nohash" + fi + + # generate instance uuid + if [ -n "$(command -v uuidgen 2> /dev/null)" ]; then + uuid="$(uuidgen)" + else + uuid="$(cat /proc/sys/kernel/random/uuid)" + fi + + nameleft="$(shuf -n 1 "${datadir}/name-left.csv")" + nameright="$(shuf -n 1 "${datadir}/name-right.csv")" + echo "instance_${nameleft}_${nameright}_${uuid}" > "${datadir}/uuid-${selfname}.txt" + # generate install uuid if missing + if [ ! -f "${datadir}/uuid-install.txt" ]; then + echo "${nameleft}_${nameright}_${uuid}" > "${datadir}/uuid-install.txt" + fi +fi + +uuidinstance=$(cat "${datadir}/uuid-${selfname}.txt") +uuidinstall=$(cat "${datadir}/uuid-install.txt") +# machine-id is a unique id set on OS install +uuidhardware=$(cat "/etc/machine-id") + +# results are rounded up to reduce number of different results in analytics. +# nearest 100Mhz. +cpuusedmhzroundup="$(((cpuusedmhz + 99) / 100 * 100))" +# nearest 100MB +memusedroundup="$(((memused + 99) / 100 * 100))" + +# Spliting the metrics in to 3 propertys allows more accurate metrics on numbers of invidual instances, installs and hardware. +# Instance Property - UA-165287622-1 +# Install Property - UA-165287622-2 +# Hardware Property - UA-165287622-3 + +## Distro. +curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=distro" -d "ea=${distroname}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=distro" -d "ea=${distroname}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=distro" -d "ea=${distroname}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + +## Game Server Name. +curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=game" -d "ea=${gamename}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=game" -d "ea=${gamename}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=game" -d "ea=${gamename}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + +## LinuxGSM Version. +curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=version" -d "ea=${version}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=version" -d "ea=${version}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=version" -d "ea=${version}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + +## CPU usage of a game server. +if [ -n "${cpuusedmhzroundup}" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=cpuused" -d "ea=${cpuusedmhzroundup}MHz" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=cpuused" -d "ea=${cpuusedmhzroundup}MHz" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=cpuused" -d "ea=${cpuusedmhzroundup}MHz" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +fi +## Ram usage of a game server. +if [ -n "${memusedroundup}" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=ramused" -d "ea=${memusedroundup}MB" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=ramused" -d "ea=${memusedroundup}MB" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=ramused" -d "ea=${memusedroundup}MB" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +fi +## Disk usage of a game server. +if [ -n "${serverfilesdu}" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=diskused" -d "ea=${serverfilesdu}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=diskused" -d "ea=${serverfilesdu}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=diskused" -d "ea=${serverfilesdu}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +fi + +## CPU Model. +if [ -n "${cpumodel}" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=servercpu" -d "ea=${cpumodel} ${cpucores} cores" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=servercpu" -d "ea=${cpumodel} ${cpucores} cores" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=servercpu" -d "ea=${cpumodel} ${cpucores} cores" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + +fi + +## CPU Frequency. +if [ -n "${cpufreqency}" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=servercpufreq" -d "ea=${cpufreqency} x${cpucores}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=servercpufreq" -d "ea=${cpufreqency} x${cpucores}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=servercpufreq" -d "ea=${cpufreqency} x${cpucores}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +fi + +## Server RAM. +if [ -n "${physmemtotal}" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=serverram" -d "ea=${physmemtotal}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=serverram" -d "ea=${physmemtotal}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=serverram" -d "ea=${physmemtotal}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +fi + +## Server Disk. +if [ -n "${totalspace}" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=serverdisk" -d "ea=${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=serverdisk" -d "ea=${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=serverdisk" -d "ea=${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +fi + +## Alert Stats. +if [ "${discordalert}" == "on" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=Discord" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +fi +if [ "${emailalert}" == "on" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=Email" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +fi +if [ "${iftttalert}" == "on" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=IFTTT" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +fi +if [ "${mailgunalert}" == "on" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=Mailgun" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +fi +if [ "${pushbulletalert}" == "on" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=Pushbullet" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +fi +if [ "${pushoveralert}" == "on" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=Pushover" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +fi +if [ "${rocketchatalert}" == "on" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=Rocket Chat" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +fi +if [ "${slackalert}" == "on" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=Slack" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +fi +if [ "${telegramalert}" == "on" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=Telegram" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +fi + +## Summary Stats +curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=summary" -d "ea=GAME: ${gamename} | DISTRO: ${distroname} | CPU MODEL: ${cpumodel} ${cpucores} cores | RAM: ${physmemtotal} | DISK: ${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=summary" -d "ea=GAME: ${gamename} | DISTRO: ${distroname} | CPU MODEL: ${cpumodel} ${cpucores} cores | RAM: ${physmemtotal} | DISK: ${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=summary" -d "ea=GAME: ${gamename} | DISTRO: ${distroname} | CPU MODEL: ${cpumodel} ${cpucores} cores | RAM: ${physmemtotal} | DISK: ${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + +fn_script_log_info "Send LinuxGSM stats" +fn_script_log_info "* uuid-${selfname}: ${uuidinstance}" +fn_script_log_info "* uuid-install: ${uuidinstall}" +fn_script_log_info "* uuid-hardware: ${uuidhardware}" +fn_script_log_info "* Game Name: ${gamename}" +fn_script_log_info "* Distro Name: ${distroname}" +fn_script_log_info "* Game Server CPU Used: ${cpuusedmhzroundup}MHz" +fn_script_log_info "* Game Server RAM Used: ${memusedroundup}MB" +fn_script_log_info "* Game Server Disk Used: ${serverfilesdu}" +fn_script_log_info "* Server CPU Model: ${cpumodel}" +fn_script_log_info "* Server CPU Frequency: ${cpufreqency}" +fn_script_log_info "* Server RAM: ${physmemtotal}" +fn_script_log_info "* Server Disk: ${totalspace}" diff --git a/lgsm/functions/install_complete.sh b/lgsm/functions/install_complete.sh new file mode 100644 index 000000000..ad258b224 --- /dev/null +++ b/lgsm/functions/install_complete.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# LinuxGSM install_complete.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Prints installation completion message and hints. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +echo -e "" +echo -e "=================================" +echo -e "Install Complete!" +fn_script_log_info "Install Complete!" +echo -e "" +echo -e "To start server type:" +echo -e "./${selfname} start" +echo -e "" +core_exit.sh diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh new file mode 100644 index 000000000..35d7df7c6 --- /dev/null +++ b/lgsm/functions/install_config.sh @@ -0,0 +1,937 @@ +#!/bin/bash +# LinuxGSM install_config.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Creates default server configs. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +# Checks if server cfg dir exists, creates it if it doesn't. +fn_check_cfgdir() { + if [ ! -d "${servercfgdir}" ]; then + echo -e "creating ${servercfgdir} config directory." + fn_script_log_info "creating ${servercfgdir} config directory." + mkdir -pv "${servercfgdir}" + fi +} + +# Downloads default configs from Game-Server-Configs repo to lgsm/config-default. +fn_fetch_default_config() { + echo -e "" + echo -e "${lightyellow}Downloading ${gamename} Configs${default}" + echo -e "=================================" + echo -e "default configs from https://github.com/GameServerManagers/Game-Server-Configs" + fn_sleep_time + mkdir -p "${lgsmdir}/config-default/config-game" + githuburl="https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/master" + for config in "${array_configs[@]}"; do + fn_fetch_file "${githuburl}/${gamedirname}/${config}" "${remote_fileurl_backup}" "GitHub" "Bitbucket" "${lgsmdir}/config-default/config-game" "${config}" "nochmodx" "norun" "forcedl" "nohash" + done +} + +# Copys default configs from Game-Server-Configs repo to server config location. +fn_default_config_remote() { + for config in "${array_configs[@]}"; do + # every config is copied + echo -e "copying ${config} config file." + fn_script_log_info "copying ${servercfg} config file." + if [ "${config}" == "${servercfgdefault}" ]; then + mkdir -p "${servercfgdir}" + cp -nv "${lgsmdir}/config-default/config-game/${config}" "${servercfgfullpath}" + elif [ "${shortname}" == "arma3" ] && [ "${config}" == "${networkcfgdefault}" ]; then + mkdir -p "${servercfgdir}" + cp -nv "${lgsmdir}/config-default/config-game/${config}" "${networkcfgfullpath}" + elif [ "${shortname}" == "dst" ] && [ "${config}" == "${clustercfgdefault}" ]; then + cp -nv "${lgsmdir}/config-default/config-game/${clustercfgdefault}" "${clustercfgfullpath}" + else + mkdir -p "${servercfgdir}" + cp -nv "${lgsmdir}/config-default/config-game/${config}" "${servercfgdir}/${config}" + fi + done + fn_sleep_time +} + +# Copys local default config to server config location. +fn_default_config_local() { + echo -e "copying ${servercfgdefault} config file." + cp -nv "${servercfgdir}/${servercfgdefault}" "${servercfgfullpath}" + fn_sleep_time +} + +# Changes some variables within the default configs. +# SERVERNAME to LinuxGSM +# PASSWORD to random password +fn_set_config_vars() { + if [ -f "${servercfgfullpath}" ]; then + random=$(tr -dc A-Za-z0-9_ < /dev/urandom | head -c 8 | xargs) + servername="LinuxGSM" + rconpass="admin${random}" + echo -e "changing hostname." + fn_script_log_info "changing hostname." + fn_sleep_time + # prevents var from being overwritten with the servername. + if grep -q "SERVERNAME=SERVERNAME" "${lgsmdir}/config-default/config-game/${config}" 2> /dev/null; then + sed -i "s/SERVERNAME=SERVERNAME/SERVERNAME=${servername}/g" "${servercfgfullpath}" + elif grep -q "SERVERNAME=\"SERVERNAME\"" "${lgsmdir}/config-default/config-game/${config}" 2> /dev/null; then + sed -i "s/SERVERNAME=\"SERVERNAME\"/SERVERNAME=\"${servername}\"/g" "${servercfgfullpath}" + else + sed -i "s/SERVERNAME/${servername}/g" "${servercfgfullpath}" + fi + echo -e "changing rcon/admin password." + fn_script_log_info "changing rcon/admin password." + if [ "${shortname}" == "squad" ]; then + sed -i "s/ADMINPASSWORD/${rconpass}/g" "${servercfgdir}/Rcon.cfg" + else + sed -i "s/ADMINPASSWORD/${rconpass}/g" "${servercfgfullpath}" + fi + fn_sleep_time + else + fn_script_log_warn "Config file not found, cannot alter it." + echo -e "Config file not found, cannot alter it." + fn_sleep_time + fi +} + +# Changes some variables within the default Don't Starve Together configs. +fn_set_dst_config_vars() { + ## cluster.ini + if grep -Fq "SERVERNAME" "${clustercfgfullpath}"; then + echo -e "changing server name." + fn_script_log_info "changing server name." + sed -i "s/SERVERNAME/LinuxGSM/g" "${clustercfgfullpath}" + fn_sleep_time + echo -e "changing shard mode." + fn_script_log_info "changing shard mode." + sed -i "s/USESHARDING/${sharding}/g" "${clustercfgfullpath}" + fn_sleep_time + echo -e "randomizing cluster key." + fn_script_log_info "randomizing cluster key." + randomkey=$(tr -dc A-Za-z0-9_ < /dev/urandom | head -c 8 | xargs) + sed -i "s/CLUSTERKEY/${randomkey}/g" "${clustercfgfullpath}" + fn_sleep_time + else + echo -e "${clustercfg} is already configured." + fn_script_log_info "${clustercfg} is already configured." + fi + + ## server.ini + # removing unnecessary options (dependent on sharding & shard type). + if [ "${sharding}" == "false" ]; then + sed -i "s/ISMASTER//g" "${servercfgfullpath}" + sed -i "/SHARDNAME/d" "${servercfgfullpath}" + elif [ "${master}" == "true" ]; then + sed -i "/SHARDNAME/d" "${servercfgfullpath}" + fi + + echo -e "changing shard name." + fn_script_log_info "changing shard name." + sed -i "s/SHARDNAME/${shard}/g" "${servercfgfullpath}" + fn_sleep_time + echo -e "changing master setting." + fn_script_log_info "changing master setting." + sed -i "s/ISMASTER/${master}/g" "${servercfgfullpath}" + fn_sleep_time + + ## worldgenoverride.lua + if [ "${cave}" == "true" ]; then + echo -e "defining ${shard} as cave in ${servercfgdir}/worldgenoverride.lua." + fn_script_log_info "defining ${shard} as cave in ${servercfgdir}/worldgenoverride.lua." + echo 'return { override_enabled = true, preset = "DST_CAVE", }' > "${servercfgdir}/worldgenoverride.lua" + fi + fn_sleep_time + echo -e "" +} + +# Lists local config file locations +fn_list_config_locations() { + echo -e "" + echo -e "${lightyellow}Config File Locations${default}" + echo -e "=================================" + if [ -n "${servercfgfullpath}" ]; then + if [ -f "${servercfgfullpath}" ]; then + echo -e "Game Server Config File: ${servercfgfullpath}" + elif [ -d "${servercfgfullpath}" ]; then + echo -e "Game Server Config Dir: ${servercfgfullpath}" + else + echo -e "Config file: ${red}${servercfgfullpath} (${red}FILE MISSING${default})" + fi + fi + echo -e "LinuxGSM Config: ${lgsmdir}/config-lgsm/${gameservername}" + echo -e "Documentation: https://docs.linuxgsm.com/configuration/game-server-config" +} + +if [ "${shortname}" == "sdtd" ]; then + gamedirname="7DaysToDie" + fn_default_config_local + fn_list_config_locations +elif [ "${shortname}" == "ac" ]; then + gamedirname="AssettoCorsa" + array_configs+=(server_cfg.ini) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "ahl" ]; then + gamedirname="ActionHalfLife" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "ahl2" ]; then + gamedirname="ActionSource" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "ark" ]; then + gamedirname="ARKSurvivalEvolved" + fn_check_cfgdir + array_configs+=(GameUserSettings.ini) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "arma3" ]; then + gamedirname="Arma3" + fn_check_cfgdir + array_configs+=(server.cfg network.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "armar" ]; then + gamedirname="ArmaReforger" + fn_check_cfgdir + array_configs+=(server.json) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "ats" ]; then + gamedirname="AmericanTruckSimulator" + fn_check_cfgdir + array_configs+=(server_config.sii) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "bo" ]; then + gamedirname="BallisticOverkill" + array_configs+=(config.txt) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "bd" ]; then + gamedirname="BaseDefense" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "bt" ]; then + gamedirname="Barotrauma" + fn_check_cfgdir + array_configs+=(serversettings.xml) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "btl" ]; then + gamedirname="BattalionLegacy" + fn_check_cfgdir + array_configs+=(DefaultGame.ini) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "bf1942" ]; then + gamedirname="Battlefield1942" + array_configs+=(serversettings.con) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "bfv" ]; then + gamedirname="BattlefieldVietnam" + array_configs+=(serversettings.con) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "bs" ]; then + gamedirname="BladeSymphony" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "bb" ]; then + gamedirname="BrainBread" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "bb2" ]; then + gamedirname="BrainBread2" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "bmdm" ]; then + gamedirname="BlackMesa" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "cd" ]; then + gamedirname="CraftingDead" + array_configs+=(properties.json) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "ck" ]; then + gamedirname="CoreKeeper" + array_configs+=(ServerConfig.json) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "cod" ]; then + gamedirname="CallOfDuty" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "coduo" ]; then + gamedirname="CallOfDutyUnitedOffensive" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "cod2" ]; then + gamedirname="CallOfDuty2" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "cod4" ]; then + gamedirname="CallOfDuty4" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "codwaw" ]; then + gamedirname="CallOfDutyWorldAtWar" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "cc" ]; then + gamedirname="CodenameCURE" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "col" ]; then + gamedirname="ColonySurvival" + array_configs+=(colserver.json) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "cs" ]; then + gamedirname="CounterStrike" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "cscz" ]; then + gamedirname="CounterStrikeConditionZero" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "csgo" ]; then + gamedirname="CounterStrikeGlobalOffensive" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "css" ]; then + gamedirname="CounterStrikeSource" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "dayz" ]; then + gamedirname="DayZ" + fn_check_cfgdir + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "dod" ]; then + gamedirname="DayOfDefeat" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "dodr" ]; then + gamedirname="DayOfDragons" + array_configs+=(Game.ini) + fn_fetch_default_config + fn_default_config_remote + fn_list_config_locations +elif [ "${shortname}" == "dods" ]; then + gamedirname="DayOfDefeatSource" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "doi" ]; then + gamedirname="DayOfInfamy" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "dmc" ]; then + gamedirname="DeathmatchClassic" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "dst" ]; then + gamedirname="DontStarveTogether" + fn_check_cfgdir + array_configs+=(cluster.ini server.ini) + fn_fetch_default_config + fn_default_config_remote + fn_set_dst_config_vars + fn_list_config_locations +elif [ "${shortname}" == "dab" ]; then + gamedirname="DoubleActionBoogaloo" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "dys" ]; then + gamedirname="Dystopia" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "eco" ]; then + gamedirname="Eco" + array_configs+=(Network.eco) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "etl" ]; then + gamedirname="ETLegacy" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "ets2" ]; then + gamedirname="EuroTruckSimulator2" + fn_check_cfgdir + array_configs+=(server_config.sii) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "fctr" ]; then + gamedirname="Factorio" + array_configs+=(server-settings.json) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "fof" ]; then + gamedirname="FistfulofFrags" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "gmod" ]; then + gamedirname="GarrysMod" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "hldm" ]; then + gamedirname="HalfLifeDeathmatch" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "hldms" ]; then + gamedirname="HalfLifeDeathmatchSource" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "opfor" ]; then + gamedirname="OpposingForce" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "hl2dm" ]; then + gamedirname="HalfLife2Deathmatch" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "ins" ]; then + gamedirname="Insurgency" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "ios" ]; then + gamedirname="IOSoccer" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "jc2" ]; then + gamedirname="JustCause2" + array_configs+=(config.lua) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "jc3" ]; then + gamedirname="JustCause3" + array_configs+=(config.json) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "kf" ]; then + gamedirname="KillingFloor" + array_configs+=(Default.ini) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "l4d" ]; then + gamedirname="Left4Dead" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "l4d2" ]; then + gamedirname="Left4Dead2" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ]; then + gamedirname="Minecraft" + array_configs+=(server.properties) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "mcb" ]; then + gamedirname="MinecraftBedrock" + array_configs+=(server.properties) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "mohaa" ]; then + gamedirname="MedalOfHonorAlliedAssault" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "mh" ]; then + gamedirname="Mordhau" + fn_check_cfgdir + array_configs+=(Game.ini) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "ns" ]; then + gamedirname="NaturalSelection" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "nmrih" ]; then + gamedirname="NoMoreRoominHell" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "nd" ]; then + gamedirname="NuclearDawn" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "mta" ]; then + gamedirname="MultiTheftAuto" + fn_check_cfgdir + array_configs+=(acl.xml mtaserver.conf vehiclecolors.conf) + fn_fetch_default_config + fn_default_config_remote + fn_list_config_locations +elif [ "${shotname}" == "mom" ]; then + gamedirname="MemoriesofMars" + array_configs+=(DedicatedServerConfig.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "pvr" ]; then + gamedirname="PavlovVR" + fn_check_cfgdir + array_configs+=(Game.ini) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars +elif [ "${shortname}" == "pvkii" ]; then + gamedirname="PiratesVikingandKnightsII" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "pz" ]; then + gamedirname="ProjectZomboid" + fn_check_cfgdir + array_configs+=(server.ini) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "nec" ]; then + gamedirname="Necesse" + fn_check_cfgdir + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "pc" ]; then + gamedirname="ProjectCars" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "pc2" ]; then + gamedirname="ProjectCars2" + fn_default_config_local + fn_list_config_locations +elif [ "${shortname}" == "q2" ]; then + gamedirname="Quake2" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "q3" ]; then + gamedirname="Quake3Arena" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "ql" ]; then + gamedirname="QuakeLive" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "jk2" ]; then + gamedirname="JediKnightIIJediOutcast" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars +elif [ "${shortname}" == "qw" ]; then + gamedirname="QuakeWorld" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "ricochet" ]; then + gamedirname="Ricochet" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "rtcw" ]; then + gamedirname="ReturnToCastleWolfenstein" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "rust" ]; then + gamedirname="Rust" + fn_check_cfgdir + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_list_config_locations +elif [ "${shortname}" == "scpsl" ] || [ "${shortname}" == "scpslsm" ]; then + gamedirname="SCPSecretLaboratory" + array_configs+=(config_gameplay.txt config_localadmin.txt) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "sf" ]; then + gamedirname="Satisfactory" + array_configs+=(GameUserSettings.ini) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "sol" ]; then + gamedirname="Soldat" + array_configs+=(soldat.ini) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "sof2" ]; then + gamedirname="SoldierOfFortune2Gold" + array_configs+=(server.cfg mapcycle.txt) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "sfc" ]; then + gamedirname="SourceFortsClassic" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "squad" ]; then + gamedirname="Squad" + array_configs+=(Admins.cfg Bans.cfg License.cfg Server.cfg Rcon.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "sb" ]; then + gamedirname="Starbound" + array_configs+=(starbound_server.config) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "st" ]; then + gamedirname="Stationeers" + array_configs+=(default.ini) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "stn" ]; then + gamedirname="SurvivetheNights" + array_configs+=(ServerConfig.txt ServerUsers.txt TpPresets.json UserPermissions.json) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "sven" ]; then + gamedirname="SvenCoop" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "tf2" ]; then + gamedirname="TeamFortress2" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "tfc" ]; then + gamedirname="TeamFortressClassic" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "ti" ]; then + gamedirname="TheIsle" + array_configs+=(Game.ini) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "ts" ]; then + gamedirname="TheSpecialists" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "ts3" ]; then + gamedirname="TeamSpeak3" + array_configs+=(ts3server.ini) + fn_fetch_default_config + fn_default_config_remote + fn_list_config_locations +elif [ "${shortname}" == "tw" ]; then + gamedirname="Teeworlds" + array_configs+=(server.cfg ctf.cfg dm.cfg duel.cfg tdm.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "terraria" ]; then + gamedirname="Terraria" + array_configs+=(serverconfig.txt) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "tu" ]; then + gamedirname="TowerUnite" + fn_check_cfgdir + array_configs+=(TowerServer.ini) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "ut" ]; then + gamedirname="UnrealTournament" + array_configs+=(Game.ini Engine.ini) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "ut2k4" ]; then + gamedirname="UnrealTournament2004" + array_configs+=(UT2004.ini) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "ut99" ]; then + gamedirname="UnrealTournament99" + array_configs+=(Default.ini) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "unt" ]; then + gamedirname="Unturned" + array_configs+=(Config.json) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "vints" ]; then + gamedirname="VintageStory" + array_configs+=(serverconfig.json) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "vs" ]; then + gamedirname="VampireSlayer" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "wet" ]; then + gamedirname="WolfensteinEnemyTerritory" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "wf" ]; then + gamedirname="Warfork" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "wmc" ]; then + gamedirname="Waterfall" + array_configs+=(config.yml) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars +elif [ "${shortname}" == "wurm" ]; then + gamedirname="WurmUnlimited" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "zmr" ]; then + gamedirname="ZombieMasterReborn" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "zps" ]; then + gamedirname="ZombiePanicSource" + array_configs+=(server.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +fi diff --git a/lgsm/functions/install_dst_token.sh b/lgsm/functions/install_dst_token.sh new file mode 100644 index 000000000..50bc7ed97 --- /dev/null +++ b/lgsm/functions/install_dst_token.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# LinuxGSM install_dst_token.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Configures Don't Starve Together cluster with given token. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +echo -e "" +echo -e "${lightyellow}Enter ${gamename} Cluster Token${default}" +echo -e "=================================" +fn_sleep_time +echo -e "A cluster token is required to run this server!" +echo -e "Follow the instructions in this link to obtain this key:" +echo -e "https://linuxgsm.com/dst-auth-token" +echo -e "" +if [ -z "${autoinstall}" ]; then + overwritetoken="true" + if [ -s "${clustercfgdir}/cluster_token.txt" ]; then + echo -e "The cluster token is already set. Do you want to overwrite it?" + fn_script_log_info "Don't Starve Together cluster token is already set" + if fn_prompt_yn "Continue?" N; then + overwritetoken="true" + else + overwritetoken="false" + fi + fi + if [ "${overwritetoken}" == "true" ]; then + echo -e "Once you have the cluster token, enter it below" + echo -n "Cluster Token: " + read -r token + mkdir -pv "${clustercfgdir}" + echo -e "${token}" > "${clustercfgdir}/cluster_token.txt" + if [ -f "${clustercfgdir}/cluster_token.txt" ]; then + echo -e "Don't Starve Together cluster token created" + fn_script_log_info "Don't Starve Together cluster token created" + fi + unset overwritetoken + fi +else + echo -e "You can add your cluster token using the following command" + echo -e "./${selfname} cluster-token" +fi +echo -e "" diff --git a/lgsm/functions/install_eula.sh b/lgsm/functions/install_eula.sh new file mode 100644 index 000000000..3e51fac71 --- /dev/null +++ b/lgsm/functions/install_eula.sh @@ -0,0 +1,47 @@ +#!/bin/bash +# LinuxGSM install_eula.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Gets user to accept the EULA. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +if [ "${shortname}" == "ts3" ]; then + eulaurl="https://www.teamspeak.com/en/privacy-and-terms" +elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ]; then + eulaurl="https://account.mojang.com/documents/minecraft_eula" +elif [ "${shortname}" == "ut" ]; then + eulaurl="https://www.epicgames.com/unrealtournament/unreal-tournament-pre-alpha-test-development-build-eula" +fi + +echo -e "" +echo -e "${lightyellow}Accept ${gamename} EULA${default}" +echo -e "=================================" +fn_sleep_time +echo -e "You are required to accept the EULA:" +echo -e "${eulaurl}" +echo -e "" +if [ -z "${autoinstall}" ]; then + echo -e "By continuing you are indicating your agreement to the EULA." + echo -e "" + if ! fn_prompt_yn "Continue?" Y; then + exitcode=0 + core_exit.sh + fi +elif [ "${commandname}" == "START" ]; then + fn_print_info "By continuing you are indicating your agreement to the EULA." + sleep 5 +else + echo -e "By using auto-install you are indicating your agreement to the EULA." + sleep 5 +fi + +if [ "${shortname}" == "ts3" ]; then + touch "${executabledir}/.ts3server_license_accepted" +elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ]; then + touch "${serverfiles}/eula.txt" + echo -e "eula=true" > "${serverfiles}/eula.txt" +elif [ "${shortname}" == "ut" ]; then + : +fi diff --git a/lgsm/functions/install_factorio_save.sh b/lgsm/functions/install_factorio_save.sh new file mode 100644 index 000000000..f5fdb8a04 --- /dev/null +++ b/lgsm/functions/install_factorio_save.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# LinuxGSM install_factorio_save.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Creates the initial save file for Factorio. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +echo -e "" +echo -e "${lightyellow}Creating initial Factorio savefile${default}" +echo -e "=================================" +fn_sleep_time +check_glibc.sh +"${executabledir}"/factorio --create "${serverfiles}/save1" diff --git a/lgsm/functions/install_gslt.sh b/lgsm/functions/install_gslt.sh new file mode 100644 index 000000000..1ae1ef3b0 --- /dev/null +++ b/lgsm/functions/install_gslt.sh @@ -0,0 +1,47 @@ +#!/bin/bash +# LinuxGSM install_gslt.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Configures GSLT. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +echo -e "" +echo -e "${lightyellow}Game Server Login Token${default}" +echo -e "=================================" +fn_sleep_time +if [ "${shortname}" == "csgo" ] || [ "${shortname}" == "css" ] || [ "${shortname}" == "nmrih" ] || [ "${shortname}" == "bs" ]; then + echo -e "GSLT is required to run a public ${gamename} server" + fn_script_log_info "GSLT is required to run a public ${gamename} server" +else + echo -e "GSLT is an optional feature for ${gamename} server" + fn_script_log_info "GSLT is an optional feature for ${gamename} server" +fi + +echo -e "Get more info and a token here:" +echo -e "https://docs.linuxgsm.com/steamcmd/gslt" +fn_script_log_info "Get more info and a token here:" +fn_script_log_info "https://docs.linuxgsm.com/steamcmd/gslt" +echo -e "" +if [ -z "${autoinstall}" ]; then + if [ "${shortname}" != "tu" ]; then + echo -e "Enter token below (Can be blank)." + echo -n "GSLT TOKEN: " + read -r token + if ! grep -q "^gslt=" "${configdirserver}/${selfname}.cfg" > /dev/null 2>&1; then + echo -e "\ngslt=\"${token}\"" >> "${configdirserver}/${selfname}.cfg" + else + sed -i -e "s/gslt=\"[^\"]*\"/gslt=\"${token}\"/g" "${configdirserver}/${selfname}.cfg" + fi + fi +fi +fn_sleep_time +if [ "${shortname}" == "tu" ]; then + echo -e "The GSLT can be changed by editing ${servercfgdir}/${servercfg}." + fn_script_log_info "The GSLT can be changed by editing ${servercfgdir}/${servercfg}." +else + echo -e "The GSLT can be changed by editing ${configdirserver}/${selfname}.cfg." + fn_script_log_info "The GSLT can be changed by editing ${configdirserver}/${selfname}.cfg." +fi +echo -e "" diff --git a/lgsm/functions/install_header.sh b/lgsm/functions/install_header.sh new file mode 100644 index 000000000..4cf067f8f --- /dev/null +++ b/lgsm/functions/install_header.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# LinuxGSM install_header.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Prints installation header. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +clear +fn_print_ascii_logo +fn_sleep_time +echo -e "=================================" +echo -e "${lightyellow}Linux${default}GSM_" +echo -e "by Daniel Gibbs" +echo -e "${lightblue}Version:${default} ${version}" +echo -e "${lightblue}Game:${default} ${gamename}" +echo -e "${lightblue}Website:${default} https://linuxgsm.com" +echo -e "${lightblue}Contributors:${default} https://linuxgsm.com/contrib" +echo -e "${lightblue}Sponsor:${default} https://linuxgsm.com/sponsor" +echo -e "=================================" +fn_sleep_time diff --git a/lgsm/functions/install_logs.sh b/lgsm/functions/install_logs.sh new file mode 100644 index 000000000..80a55fb94 --- /dev/null +++ b/lgsm/functions/install_logs.sh @@ -0,0 +1,100 @@ +#!/bin/bash +# LinuxGSM install_logs.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Creates log directories. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +if [ "${checklogs}" != "1" ]; then + echo -e "" + echo -e "${lightyellow}Creating log directories${default}" + echo -e "=================================" +fi +fn_sleep_time +# Create LinuxGSM logs. +echo -en "installing log dir: ${logdir}..." +mkdir -p "${logdir}" +if [ $? != 0 ]; then + fn_print_fail_eol_nl + core_exit.sh +else + fn_print_ok_eol_nl +fi + +echo -en "installing LinuxGSM log dir: ${lgsmlogdir}..." +mkdir -p "${lgsmlogdir}" +if [ $? != 0 ]; then + fn_print_fail_eol_nl + core_exit.sh +else + fn_print_ok_eol_nl +fi +echo -en "creating LinuxGSM log: ${lgsmlog}..." +touch "${lgsmlog}" +if [ $? != 0 ]; then + fn_print_fail_eol_nl + core_exit.sh +else + fn_print_ok_eol_nl +fi +# Create Console logs. +if [ "${consolelogdir}" ]; then + echo -en "installing console log dir: ${consolelogdir}..." + mkdir -p "${consolelogdir}" + if [ $? != 0 ]; then + fn_print_fail_eol_nl + core_exit.sh + else + fn_print_ok_eol_nl + fi + echo -en "creating console log: ${consolelog}..." + if ! touch "${consolelog}"; then + fn_print_fail_eol_nl + core_exit.sh + else + fn_print_ok_eol_nl + fi +fi + +# Create Game logs. +if [ "${gamelogdir}" ] && [ ! -d "${gamelogdir}" ]; then + echo -en "installing game log dir: ${gamelogdir}..." + if ! mkdir -p "${gamelogdir}"; then + fn_print_fail_eol_nl + core_exit.sh + else + fn_print_ok_eol_nl + fi +fi + +# Symlink to gamelogdir +# unless gamelogdir is within logdir. +# e.g serverfiles/log is not within log/: symlink created +# log/server is in log/: symlink not created +if [ "${gamelogdir}" ]; then + if [ "${gamelogdir:0:${#logdir}}" != "${logdir}" ]; then + echo -en "creating symlink to game log dir: ${logdir}/server -> ${gamelogdir}..." + if ! ln -nfs "${gamelogdir}" "${logdir}/server"; then + fn_print_fail_eol_nl + core_exit.sh + else + fn_print_ok_eol_nl + fi + fi +fi + +# If server uses SteamCMD create a symbolic link to the Steam logs. +if [ -d "${rootdir}/Steam/logs" ]; then + if [ ! -L "${logdir}/steamcmd" ]; then + echo -en "creating symlink to steam log dir: ${logdir}/steamcmd -> ${rootdir}/Steam/logs..." + if ! ln -nfs "${rootdir}/Steam/logs" "${logdir}/steamcmd"; then + fn_print_fail_eol_nl + core_exit.sh + else + fn_print_ok_eol_nl + fi + fi +fi +fn_script_log_info "Logs installed" diff --git a/lgsm/functions/install_mta_resources.sh b/lgsm/functions/install_mta_resources.sh new file mode 100644 index 000000000..011ad9b71 --- /dev/null +++ b/lgsm/functions/install_mta_resources.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# LinuxGSM install_mta_resources.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Installs the libmysqlclient for database functions on the server and optionally installs default resources required to run the server. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +fn_print_information_nl "${gamename} will not function without resources!" +echo -e " * install default resources using ./${selfname} install-default-resources" +echo -e " * download resources from https://community.multitheftauto.com" diff --git a/lgsm/functions/install_retry.sh b/lgsm/functions/install_retry.sh new file mode 100644 index 000000000..a36b4fb38 --- /dev/null +++ b/lgsm/functions/install_retry.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# LinuxGSM install_retry.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Asks for installation retry after failure. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +if fn_prompt_yn "Retry install?" Y; then + command_install.sh + core_exit.sh +else + exitcode=0 + core_exit.sh +fi diff --git a/lgsm/functions/install_server_dir.sh b/lgsm/functions/install_server_dir.sh new file mode 100644 index 000000000..658f4360c --- /dev/null +++ b/lgsm/functions/install_server_dir.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# LinuxGSM install_server_dir.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Creates the server directory. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +echo -e "" +echo -e "${lightyellow}Server Directory${default}" +echo -e "=================================" +fn_sleep_time +if [ -d "${serverfiles}" ]; then + fn_print_warning_nl "A server is already installed here." +fi +pwd +if [ -z "${autoinstall}" ]; then + if ! fn_prompt_yn "Continue?" Y; then + exitcode=0 + core_exit.sh + fi +fi +if [ ! -d "${serverfiles}" ]; then + mkdir -v "${serverfiles}" +fi diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh new file mode 100644 index 000000000..e550e1455 --- /dev/null +++ b/lgsm/functions/install_server_files.sh @@ -0,0 +1,255 @@ +#!/bin/bash +# LinuxGSM install_server_files.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Installs server files. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +fn_install_server_files() { + if [ "${shortname}" == "ahl" ]; then + remote_fileurl="http://linuxgsm.download/ActionHalfLife/action_halflife-1.0.tar.xz" + local_filedir="${tmpdir}" + local_filename="action_halflife-1.0.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="61d7b79fd714888b6d65944fdaafa94a" + elif [ "${shortname}" == "bf1942" ]; then + remote_fileurl="http://linuxgsm.download/BattleField1942/bf1942_lnxded-1.61-hacked-to-1.612.full.tar.xz" + local_filedir="${tmpdir}" + local_filename="bf1942_lnxded-1.61-hacked-to-1.612.full.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="4223bf4ed85f5162c24b2cba51249b9e" + elif [ "${shortname}" == "bfv" ]; then + remote_fileurl="http://linuxgsm.download/BattlefieldVietnam/bfv_linded-v1.21-20041207_patch.tar.xz" + local_filedir="${tmpdir}" + local_filename="bfv_linded-v1.21-20041207_patch.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="e3b4962cdd9d41e23c6fed65101bccde" + elif [ "${shortname}" == "bb" ]; then + remote_fileurl="http://linuxgsm.download/BrainBread/brainbread-v1.2-linuxserver.tar.xz" + local_filedir="${tmpdir}" + local_filename="brainbread-v1.2-linuxserver.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="55f227183b736397806d5b6db6143f15" + elif [ "${shortname}" == "cod" ]; then + remote_fileurl="http://linuxgsm.download/CallOfDuty/cod-lnxded-1.5b-full.tar.xz" + local_filedir="${tmpdir}" + local_filename="cod-lnxded-1.5-large.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="ee0ad1ccbfa1fd27fde01a4a431a5c2f" + elif [ "${shortname}" == "coduo" ]; then + remote_fileurl="http://linuxgsm.download/CallOfDutyUnitedOffensive/coduo-lnxded-1.51b-full.tar.xz" + local_filedir="${tmpdir}" + local_filename="coduo-lnxded-1.51b-full.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="35cabccd67adcda44aaebc59405915b9" + elif [ "${shortname}" == "cod2" ]; then + remote_fileurl="http://linuxgsm.download/CallOfDuty2/cod2-lnxded-1.3-full.tar.xz" + local_filedir="${tmpdir}" + local_filename="cod2-lnxded-1.3-full.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="b8c4c611f01627dd43348e78478a3d41" + elif [ "${shortname}" == "cod4" ]; then + remote_fileurl="http://linuxgsm.download/CallOfDuty4/cod4x18_lnxded.tar.xz" + local_filedir="${tmpdir}" + local_filename="cod4x18_lnxded.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="d255b59b9756d7dbead67718208512ee" + elif [ "${shortname}" == "codwaw" ]; then + remote_fileurl="http://linuxgsm.download/CallOfDutyWorldAtWar/codwaw-lnxded-1.7-full.tar.xz" + local_filedir="${tmpdir}" + local_filename="codwaw-lnxded-1.7-full.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="2c6be1bb66ea631b9b2e7ae6216c6680" + elif [ "${shortname}" == "etl" ]; then + remote_fileurl="http://linuxgsm.download/WolfensteinEnemyTerritory/etlegacy-v2.78.1-i386-et-260b.tar.xz" + local_filedir="${tmpdir}" + local_filename="etlegacy-v2.78.1-i386-et-260b.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="7c08b52cb09b30eadb98ea05ef780fc7" + elif [ "${shortname}" == "mohaa" ]; then + remote_fileurl="http://linuxgsm.download/MedalofHonorAlliedAssault/moh_revival_v1.12_RC3.5.1.tar.xz" + local_filedir="${tmpdir}" + local_filename="moh_revival_v1.12_RC3.5.1.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="7c664538999252eeaf2b6d9949416480" + elif [ "${shortname}" == "ns" ]; then + remote_fileurl="http://linuxgsm.download/NaturalSelection/ns_dedicated_server_v32.tar.xz" + local_filedir="${tmpdir}" + local_filename="ns_dedicated_server_v32.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="23ec3cadd93d8bb1c475bad5b9cce370" + elif [ "${shortname}" == "q2" ]; then + remote_fileurl="http://linuxgsm.download/Quake2/quake2-3.20-glibc-i386-full-linux2.0.tar.xz" + local_filedir="${tmpdir}" + local_filename="quake2-3.20-glibc-i386-full-linux2.0.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="2908164a32d4808bb720f2161f6b0c82" + elif [ "${shortname}" == "q3" ]; then + remote_fileurl="http://linuxgsm.download/Quake3/quake3-1.32c-x86-full-linux.tar.xz" + local_filedir="${tmpdir}" + local_filename="quake3-1.32c-x86-full-linux.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="b0e26d8919fe9313fb9d8ded2360f3db" + elif [ "${shortname}" == "qw" ]; then + remote_fileurl="http://linuxgsm.download/QuakeWorld/nquake.server.linux.190506.full.tar.xz" + local_filedir="${tmpdir}" + local_filename="nquake.server.linux.190506.full.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="82055b7d973206c13a606db8ba288d03" + elif [ "${shortname}" == "rtcw" ]; then + remote_fileurl="http://linuxgsm.download/ReturnToCastleWolfenstein/iortcw-1.51c-x86_64-server-linux-20190507.tar.xz" + local_filedir="${tmpdir}" + local_filename="iortcw-1.51c-x86_64-server-linux-20190507.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="df6ff664d37dd0d22787848bdb3cac5f" + elif [ "${shortname}" == "sfc" ]; then + remote_fileurl="http://linuxgsm.download/SourceFortsClassic/SFClassic-1.0-RC7-fix.tar.xz" + local_filedir="${tmpdir}" + local_filename="SFClassic-1.0-RC7-fix.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="70077137185700e28fe6bbb6021d12bc" + elif [ "${shortname}" == "sof2" ]; then + remote_fileurl="http://linuxgsm.download/SoldierOfFortune2/sof2gold-1.03.tar.xz" + local_filedir="${tmpdir}" + local_filename="sof2gold-1.03.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="201e23bab04207d00ce813d001c483d9" + elif [ "${shortname}" == "ts" ]; then + remote_fileurl="http://linuxgsm.download/TheSpecialists/ts-3-linux-final.tar.xz" + local_filedir="${tmpdir}" + local_filename="ts-3-linux-final.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="3c66ecff6e3644f7ac88015732a0fb93" + elif [ "${shortname}" == "ut2k4" ]; then + remote_fileurl="http://linuxgsm.download/UnrealTournament2004/ut2004-server-3369-3-ultimate-linux.tar.xz" + local_filedir="${tmpdir}" + local_filename="ut2004-server-3369-3-ultimate-linux.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="9fceaab68554749f4b45be66613b9a15" + elif [ "${shortname}" == "ut99" ]; then + remote_fileurl="http://linuxgsm.download/UnrealTournament99/ut99-server-469b-ultimate-linux.tar.xz" + local_filedir="${tmpdir}" + local_filename="ut99-server-469b-ultimate-linux.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="dba3f1122a5e60ee45ece7422fcf78f5" + elif [ "${shortname}" == "ut" ]; then + remote_fileurl="http://linuxgsm.download/UnrealTournament/UnrealTournament-Server-XAN-3525360-Linux.tar.xz" + local_filedir="${tmpdir}" + local_filename="UnrealTournament-Server-XAN-3525360-Linux.tar.xz" + chmodx="noexecute" run="norun" + force="noforce" + md5="41dd92015713a78211eaccf503b72393" + elif [ "${shortname}" == "ut3" ]; then + remote_fileurl="http://linuxgsm.download/UnrealTournament3/UT3-linux-server-2.1.tar.xz" + local_filedir="${tmpdir}" + local_filename="UT3-linux-server-2.1.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="8876cca61e3f83ea08db25208bde6ac6" + elif [ "${shortname}" == "vs" ]; then + remote_fileurl="http://linuxgsm.download/VampireSlayer/vs_l-6.0_full.tar.xz" + local_filedir="${tmpdir}" + local_filename="vs_l-6.0_full.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="b322f79e0abd31847493c52acf802667" + elif [ "${shortname}" == "wet" ]; then + remote_fileurl="http://linuxgsm.download/WolfensteinEnemyTerritory/enemy-territory.260b.tar.xz" + local_filedir="${tmpdir}" + local_filename="enemy-territory.260b.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="581a333cc7eacda2f56d5a00fe11eafa" + elif [ "${shortname}" == "samp" ]; then + remote_fileurl="https://files.sa-mp.com/samp037svr_R2-1.tar.gz" + local_filedir="${tmpdir}" + local_filename="samp037svr_R2-1.tar.gz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="93705e165550c97484678236749198a4" + elif [ "${shortname}" == "zmr" ]; then + remote_fileurl="http://linuxgsm.download/ZombieMasterReborn/zombie_master_reborn_b6_1.tar.xz" + local_filedir="${tmpdir}" + local_filename="zombie_master_reborn_b6_1.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="0188ae86dbc9376f11ae3032dba2d665" + else + fn_print_fail_nl "Installing ${gamename} Server failed, missing default configuration" + fn_script_log_fatal "Installing ${gamename} Server failed, missing default configuration" + fi + fn_fetch_file "${remote_fileurl}" "" "" "" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" + fn_dl_extract "${local_filedir}" "${local_filename}" "${serverfiles}" +} + +echo -e "" +echo -e "${lightyellow}Installing ${gamename} Server${default}" +echo -e "=================================" +fn_sleep_time + +if [ "${appid}" ]; then + remotelocation="SteamCMD" + fn_dl_steamcmd +fi + +if [ "${shortname}" == "ts3" ]; then + update_ts3.sh +elif [ "${shortname}" == "mc" ]; then + install_eula.sh + update_minecraft.sh +elif [ "${shortname}" == "mcb" ]; then + update_minecraft_bedrock.sh +elif [ "${shortname}" == "pmc" ]; then + install_eula.sh + update_papermc.sh +elif [ "${shortname}" == "wmc" ] || [ "${shortname}" == "vpmc" ]; then + update_papermc.sh +elif [ "${shortname}" == "mta" ]; then + update_mta.sh +elif [ "${shortname}" == "fctr" ]; then + update_factorio.sh + install_factorio_save.sh +elif [ "${shortname}" == "jk2" ]; then + update_jediknight2.sh +elif [ "${shortname}" == "vints" ]; then + update_vintagestory.sh +elif [ "${shortname}" == "ut99" ]; then + fn_install_server_files + update_ut99.sh +elif [ -z "${appid}" ] || [ "${shortname}" == "ahl" ] || [ "${shortname}" == "bb" ] || [ "${shortname}" == "ns" ] || [ "${shortname}" == "sfc" ] || [ "${shortname}" == "ts" ] || [ "${shortname}" == "vs" ] || [ "${shortname}" == "zmr" ]; then + if [ "${shortname}" == "ut" ]; then + install_eula.sh + fi + fn_install_server_files +fi + +if [ -z "${autoinstall}" ]; then + echo -e "" + echo -e "=================================" + if ! fn_prompt_yn "Was the install successful?" Y; then + install_retry.sh + fi +fi diff --git a/lgsm/functions/install_squad_license.sh b/lgsm/functions/install_squad_license.sh new file mode 100644 index 000000000..181646e85 --- /dev/null +++ b/lgsm/functions/install_squad_license.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# LinuxGSM install_squad_license.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Configures the Squad server's license. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +echo -e "" +echo -e "${lightyellow}Squad Server License${default}" +echo -e "=================================" +fn_sleep_time +echo -e "Server license is an optional feature for ${gamename} server" +fn_script_log_info "Server license is an optional feature for ${gamename} server" + +echo -e "Get more info and a server license here:" +echo -e "http://forums.joinsquad.com/topic/16519-server-licensing-general-info/" +fn_script_log_info "Get more info and a server license here:" +fn_script_log_info "http://forums.joinsquad.com/topic/16519-server-licensing-general-info/" +echo -e "" +fn_sleep_time +echo -e "The Squad server license can be changed by editing ${servercfgdir}/License.cfg." +fn_script_log_info "The Squad server license can be changed by editing ${selfname}." +echo -e "" diff --git a/lgsm/functions/install_stats.sh b/lgsm/functions/install_stats.sh new file mode 100644 index 000000000..d3b45b40b --- /dev/null +++ b/lgsm/functions/install_stats.sh @@ -0,0 +1,28 @@ +#!/bin/bash +# LinuxGSM install_stats.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Enabled LinuxGSM Stats. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +echo -e "" +echo -e "${lightyellow}LinuxGSM Stats${default}" +echo -e "=================================" +fn_sleep_time +echo -e "Assist LinuxGSM development by sending anonymous stats to developers." +echo -e "More info: https://docs.linuxgsm.com/configuration/linuxgsm-stats" +echo -e "The following info will be sent:" +echo -e "* game server" +echo -e "* distro" +echo -e "* game server resource usage" +echo -e "* server hardware info" +if [ -z "${autoinstall}" ]; then + if fn_prompt_yn "Allow anonymous usage statistics?" Y; then + echo "stats=\"on\"" >> "${configdirserver}/common.cfg" + fn_print_information_nl "Stats setting is now enabled in common.cfg." + fi +else + fn_print_information_nl "auto-install leaves stats off by default. Stats can be enabled in common.cfg" +fi diff --git a/lgsm/functions/install_steamcmd.sh b/lgsm/functions/install_steamcmd.sh new file mode 100644 index 000000000..b1e64a42c --- /dev/null +++ b/lgsm/functions/install_steamcmd.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# LinuxGSM install_steamcmd.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Downloads SteamCMD on install. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +echo -e "" +echo -e "${lightyellow}Installing SteamCMD${default}" +echo -e "=================================" +fn_sleep_time +check_steamcmd.sh diff --git a/lgsm/functions/install_ts3db.sh b/lgsm/functions/install_ts3db.sh new file mode 100644 index 000000000..ed879cd28 --- /dev/null +++ b/lgsm/functions/install_ts3db.sh @@ -0,0 +1,76 @@ +#!/bin/bash +# LinuxGSM install_ts3db.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Installs the database server MariaDB for TeamSpeak 3. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +fn_install_ts3db_mariadb() { + if [ ! -f "${serverfiles}/libts3db_mariadb.so" ]; then + echo -e "copying libmariadb.so.2...\c" + cp "${serverfiles}/redist/libmariadb.so.2" "${serverfiles}" + local exitcode=$? + if [ "${exitcode}" != "0" ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "copying libmariadb.so.2" + core_exit.sh + else + fn_print_ok_eol_nl + fn_script_log_pass "copying libmariadb.so.2" + fi + fi + + echo -e "" + echo -e "${lightyellow}Configure ${gamename} Server for MariaDB${default}" + echo -e "=================================" + fn_sleep_time + read -rp "Enter MariaDB hostname: " mariahostname + read -rp "Enter MariaDB port: " mariaport + read -rp "Enter MariaDB username: " mariausername + read -rp "Enter MariaDB password: " mariapassword + read -rp "Enter MariaDB database name: " mariadbname + read -rp "Enter MariaDB socket path: " mariadbsocket + + { + echo -e "[config]" + echo -e "host='${mariahostname}'" + echo -e "port='${mariaport}'" + echo -e "username='${mariausername}'" + echo -e "password='${mariapassword}'" + echo -e "database='${mariadbname}'" + echo -e "socket='${mariadbsocket}'" + } >> "${servercfgdir}/ts3db_mariadb.ini" + sed -i "s/dbplugin=ts3db_sqlite3/dbplugin=ts3db_mariadb/g" "${servercfgfullpath}" + sed -i "s/dbpluginparameter=/dbpluginparameter=ts3db_mariadb.ini/g" "${servercfgfullpath}" + sed -i "s/dbsqlcreatepath=create_sqlite\//dbsqlcreatepath=create_mariadb\//g" "${servercfgfullpath}" + echo -e "updating ts3db_mariadb.ini." + fn_sleep_time +} + +echo -e "" +echo -e "${lightyellow}Select Database${default}" +echo -e "=================================" +fn_sleep_time +if [ -z "${autoinstall}" ]; then + if fn_prompt_yn "Do you want to use MariaDB instead of sqlite? (MariaDB must be pre-configured)" N; then + fn_install_ts3db_mariadb + fi +else + fn_print_information_nl "./${selfname} auto-install is uses sqlite. For MariaDB use ./${selfname} install" +fi + +install_eula.sh + +echo -e "" +echo -e "${lightyellow}Getting Privilege Key${default}" +echo -e "=================================" +fn_sleep_time +fn_print_information_nl "Save these details for later." +fn_print_information_nl "Key also saved in:" +echo -e "${serverfiles}/privilege_key.txt" +cd "${executabledir}" || exit +./ts3server_startscript.sh start inifile=ts3-server.ini 2>&1 | tee "${serverfiles}/privilege_key.txt" +sleep 5 +./ts3server_startscript.sh stop diff --git a/lgsm/functions/install_ut2k4_key.sh b/lgsm/functions/install_ut2k4_key.sh new file mode 100644 index 000000000..124052d05 --- /dev/null +++ b/lgsm/functions/install_ut2k4_key.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# LinuxGSM install_ut2k4_key.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Activates ut2k4 server with given key. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +echo -e "" +echo -e "${lightyellow}Enter ${gamename} CD Key${default}" +echo -e "=================================" +fn_sleep_time +echo -e "To get your server listed on the Master Server list" +echo -e "you must get a free CD key. Get a key here:" +echo -e "https://www.epicgames.com/unrealtournament/forums/cdkey.php?2004" +echo -e "" +if [ -z "${autoinstall}" ]; then + echo -e "Once you have the key enter it below" + echo -n "KEY: " + read -r CODE + echo -e ""\""CDKey"\""="\""${CODE}"\""" > "${systemdir}/cdkey" + if [ -f "${systemdir}/cdkey" ]; then + fn_script_log_info "UT2K4 Server CD Key created" + fi +else + echo -e "You can add your key using the following command" + echo -e "./${selfname} server-cd-key" +fi +echo -e "" diff --git a/lgsm/functions/mods_core.sh b/lgsm/functions/mods_core.sh new file mode 100644 index 000000000..8e4ade771 --- /dev/null +++ b/lgsm/functions/mods_core.sh @@ -0,0 +1,755 @@ +#!/bin/bash +# LinuxGSM command_mods_install.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Core functions for mods list/install/update/remove + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +# Files and Directories. +modsdir="${lgsmdir}/mods" +modstmpdir="${modsdir}/tmp" +extractdest="${modstmpdir}/extract" +modsinstalledlist="installed-mods.txt" +modsinstalledlistfullpath="${modsdir}/${modsinstalledlist}" + +## Installation. + +# Download management. +fn_mod_install_files() { + fn_fetch_file "${modurl}" "" "" "" "${modstmpdir}" "${modfilename}" + # Check if variable is valid checking if file has been downloaded and exists. + if [ ! -f "${modstmpdir}/${modfilename}" ]; then + fn_print_failure "An issue occurred downloading ${modprettyname}" + fn_script_log_fatal "An issue occurred downloading ${modprettyname}" + core_exit.sh + fi + if [ ! -d "${extractdest}" ]; then + mkdir -p "${extractdest}" + fi + fn_dl_extract "${modstmpdir}" "${modfilename}" "${extractdest}" +} + +# Convert mod files to lowercase if needed. +fn_mod_lowercase() { + # Checking lowercase settings from mods array definition + if [ "${modlowercase}" == "LowercaseOn" ]; then + echo -en "converting ${modprettyname} files to lowercase..." + fn_sleep_time + fn_script_log_info "Converting ${modprettyname} files to lowercase" + # Total files and directories for the mod, to output to the user + fileswc=$(find "${extractdest}" | wc -l) + # Total uppercase files and directories for the mod, to output to the user + filesupperwc=$(find "${extractdest}" -name '*[[:upper:]]*' | wc -l) + fn_script_log_info "Found ${filesupperwc} uppercase files out of ${fileswc}, converting" + echo -en "Found ${filesupperwc} uppercase files out of ${fileswc}, converting..." + # Convert files and directories starting from the deepest to prevent issues (-depth argument) + while read -r src; do + # We have to convert only the last file from the path, otherwise we will fail to convert anything if a parent dir has any uppercase + # therefore, we have to separate the end of the filename to only lowercase it rather than the whole line + # Gather parent dir, filename lowercase filename, and set lowercase destination name + latestparentdir=$(dirname "${src}") + latestfilelc=$(basename "${src}" | tr '[:upper:]' '[:lower:]') + dst="${latestparentdir}/${latestfilelc}" + # Only convert if destination does not already exist for some reason + if [ ! -e "${dst}" ]; then + # Finally we can rename the file + mv "${src}" "${dst}" + # Exit if it fails for any reason + local exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_print_fail_eol_nl + core_exit.sh + fi + fi + done < <(find "${extractdest}" -depth -name '*[[:upper:]]*') + fn_print_ok_eol_nl + fi +} + +# Create ${modcommand}-files.txt containing the full extracted file/directory list. +fn_mod_create_filelist() { + echo -en "building ${modcommand}-files.txt..." + fn_sleep_time + # ${modsdir}/${modcommand}-files.txt. + find "${extractdest}" -mindepth 1 -printf '%P\n' > "${modsdir}/${modcommand}-files.txt" + local exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "Building ${modsdir}/${modcommand}-files.txt" + core_exit.sh + else + fn_print_ok_eol_nl + fn_script_log_pass "Building ${modsdir}/${modcommand}-files.txt" + fi + # Adding removed files if needed. + if [ -f "${modsdir}/.removedfiles.tmp" ]; then + cat "${modsdir}/.removedfiles.tmp" >> "${modsdir}/${modcommand}-files.txt" + fi +} + +# Copy the mod into serverfiles. +fn_mod_copy_destination() { + echo -en "copying ${modprettyname} to ${modinstalldir}..." + fn_sleep_time + cp -Rf "${extractdest}/." "${modinstalldir}/" + local exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "Copying ${modprettyname} to ${modinstalldir}" + else + fn_print_ok_eol_nl + fn_script_log_pass "Copying ${modprettyname} to ${modinstalldir}" + fi +} + +# Add the mod to the installed-mods.txt. +fn_mod_add_list() { + if [ -z "$(sed -n "/^${modcommand}$/p" "${modsinstalledlistfullpath}")" ]; then + echo -e "${modcommand}" >> "${modsinstalledlistfullpath}" + fn_script_log_info "${modcommand} added to ${modsinstalledlist}" + fi +} + +# Prevent sensitive directories from being erased upon uninstall by removing them from: ${modcommand}-files.txt. +fn_mod_tidy_files_list() { + # Check file list validity. + fn_check_mod_files_list + # Output to the user + echo -en "tidy up ${modcommand}-files.txt..." + fn_sleep_time + fn_script_log_info "Tidy up ${modcommand}-files.txt" + # Lines/files to remove from file list (end with ";" separator). + removefromlist="cfg;addons;RustDedicated_Data;RustDedicated_Data\/Managed;RustDedicated_Data\/Managed\/x86;RustDedicated_Data\/Managed\/x64;" + # Loop through files to remove from file list, + # generate elements to remove from list. + removefromlistamount=$(echo -e "${removefromlist}" | awk -F ';' '{ print NF }') + # Test all subvalue of "removefromlist" using the ";" separator. + for ((filesindex = 1; filesindex < removefromlistamount; filesindex++)); do + # Put current file into test variable. + removefilevar=$(echo -e "${removefromlist}" | awk -F ';' -v x=${filesindex} '{ print $x }') + # Delete line(s) matching exactly. + sed -i "/^${removefilevar}$/d" "${modsdir}/${modcommand}-files.txt" + # Exit on error. + local exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "Error while tidying line: ${removefilevar} from: ${modsdir}/${modcommand}-files.txt" + core_exit.sh + break + fi + done + fn_print_ok_eol_nl + # Sourcemod fix + # Remove metamod from sourcemod fileslist. + if [ "${modcommand}" == "sourcemod" ]; then + # Remove addons/metamod & addons/metamod/sourcemod.vdf from ${modcommand}-files.txt. + sed -i "/^addons\/metamod$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/metamod\/sourcemod.vdf$/d" "${modsdir}/${modcommand}-files.txt" + fi + + # Remove common paths from deletion list (Add your sourcemod mod here) + if [ "${modcommand}" == "gokz" ] || [ "${modcommand}" == "ttt" ] || [ "${modcommand}" == "steamworks" ] || [ "${modcommand}" == "get5" ]; then + sed -i "/^addons\/sourcemod$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/configs$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/extensions$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/logs$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/plugins$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/plugins\/disabled$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/scripting$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/scripting\/include$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/translations$/d" "${modsdir}/${modcommand}-files.txt" + # Don't delete directories of translations like 'fr', 'sv', 'de', etc + sed -i "/^addons\/sourcemod\/translations\/[A-Za-z0-9_]*$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^cfg\/sourcemod$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^maps$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^materialss$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^materials\/models$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^materials\/models\/weapons$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^materials\/darkness$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^materials\/decals$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^materials\/overlays$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^models$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^models\/weapons$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^sound$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^sound\/weapons$/d" "${modsdir}/${modcommand}-files.txt" + fi + + # Remove paths of specific mods from deletion list + if [ "${modcommand}" == "gokz" ]; then + sed -i "/^addons\/sourcemod\/scripting\/include\/smjansson.inc$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/scripting\/include\/GlobalAPI-Core.inc$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/scripting\/include\/sourcebanspp.inc$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/scripting\/include\/autoexecconfig.inc$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/scripting\/include\/colorvariables.inc$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/scripting\/include\/movementapi.inc$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/scripting\/include\/movement.inc$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/scripting\/include\/dhooks.inc$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/scripting\/include\/updater.inc$/d" "${modsdir}/${modcommand}-files.txt" + fi +} + +## Information Gathering. + +# Get details of a mod any (relevant and unique, such as full mod name or install command) value. +fn_mod_get_info() { + # Variable to know when job is done. + modinfocommand="0" + # Find entry in global array. + for ((index = 0; index <= ${#mods_global_array[@]}; index++)); do + # When entry is found. + if [ "${mods_global_array[index]}" == "${currentmod}" ]; then + # Go back to the previous "MOD" separator. + for ((index = index; index <= ${#mods_global_array[@]}; index--)); do + # When "MOD" is found. + if [ "${mods_global_array[index]}" == "MOD" ]; then + # Get info. + fn_mods_define + modinfocommand="1" + break + fi + done + fi + # Exit the loop if job is done. + if [ "${modinfocommand}" == "1" ]; then + break + fi + done + + # What happens if mod is not found. + if [ "${modinfocommand}" == "0" ]; then + fn_script_log_error "Could not find information for ${currentmod}" + fn_print_error_nl "Could not find information for ${currentmod}" + core_exit.sh + fi +} + +# Define all variables for a mod at once when index is set to a separator. +fn_mods_define() { + if [ -z "$index" ]; then + fn_script_log_fatal "index variable not set. Please report an issue." + fn_print_error "index variable not set. Please report an issue." + echo -e "* https://github.com/GameServerManagers/LinuxGSM/issues" + core_exit.sh + fi + modcommand="${mods_global_array[index + 1]}" + modprettyname="${mods_global_array[index + 2]}" + modurl="${mods_global_array[index + 3]}" + modfilename="${mods_global_array[index + 4]}" + modsubdirs="${mods_global_array[index + 5]}" + modlowercase="${mods_global_array[index + 6]}" + modinstalldir="${mods_global_array[index + 7]}" + modkeepfiles="${mods_global_array[index + 8]}" + modengines="${mods_global_array[index + 9]}" + modgames="${mods_global_array[index + 10]}" + modexcludegames="${mods_global_array[index + 11]}" + modsite="${mods_global_array[index + 12]}" + moddescription="${mods_global_array[index + 13]}" +} + +# Builds list of installed mods. +# using installed-mods.txt grabing mod info from mods_list.sh. +fn_mods_installed_list() { + fn_mods_count_installed + # Set/reset variables. + installedmodsline="1" + installedmodslist=() + modprettynamemaxlength="0" + modsitemaxlength="0" + moddescriptionmaxlength="0" + modcommandmaxlength="0" + # Loop through every line of the installed mods list ${modsinstalledlistfullpath}. + while [ "${installedmodsline}" -le "${installedmodscount}" ]; do + currentmod=$(sed "${installedmodsline}q;d" "${modsinstalledlistfullpath}") + # Get mod info to make sure mod exists. + fn_mod_get_info + # Add the mod to available commands. + installedmodslist+=("${modcommand}") + # Increment line check. + ((installedmodsline++)) + done + if [ "${installedmodscount}" ]; then + fn_script_log_info "${installedmodscount} addons/mods are currently installed" + fi +} + +# Loops through mods_global_array to define available mods & provide available commands for mods installation. +fn_mods_available() { + # First, reset variables. + compatiblemodslist=() + availablemodscommands=() + # Find compatible games. + # Find separators through the global array. + for ((index = "0"; index <= ${#mods_global_array[@]}; index++)); do + # If current value is a separator; then. + if [ "${mods_global_array[index]}" == "${modseparator}" ]; then + # Set mod variables. + fn_mods_define + # Test if game is compatible. + fn_mod_compatible_test + # If game is compatible. + if [ "${modcompatibility}" == "1" ]; then + # Put it into an array to prepare user output. + compatiblemodslist+=("${modprettyname}" "${modcommand}" "${modsite}" "${moddescription}") + # Keep available commands in an array to make life easier. + availablemodscommands+=("${modcommand}") + fi + fi + done +} + +## Mod compatibility check. + +# Find out if a game is compatible with a mod from a modgames (list of games supported by a mod) variable. +fn_compatible_mod_games() { + # Reset test value. + modcompatiblegame="0" + # If value is set to GAMES (ignore). + if [ "${modgames}" != "GAMES" ]; then + # How many games we need to test. + gamesamount=$(echo -e "${modgames}" | awk -F ';' '{ print NF }') + # Test all subvalue of "modgames" using the ";" separator. + for ((gamevarindex = 1; gamevarindex < gamesamount; gamevarindex++)); do + # Put current game name into modtest variable. + gamemodtest=$(echo -e "${modgames}" | awk -F ';' -v x=${gamevarindex} '{ print $x }') + # If game name matches. + if [ "${gamemodtest}" == "${gamename}" ]; then + # Mod is compatible. + modcompatiblegame="1" + fi + done + fi +} + +# Find out if an engine is compatible with a mod from a modengines (list of engines supported by a mod) variable. +fn_compatible_mod_engines() { + # Reset test value. + modcompatibleengine="0" + # If value is set to ENGINES (ignore). + if [ "${modengines}" != "ENGINES" ]; then + # How many engines we need to test. + enginesamount=$(echo -e "${modengines}" | awk -F ';' '{ print NF }') + # Test all subvalue of "modengines" using the ";" separator. + for ((gamevarindex = 1; gamevarindex < ${enginesamount}; gamevarindex++)); do + # Put current engine name into modtest variable. + enginemodtest=$(echo -e "${modengines}" | awk -F ';' -v x=${gamevarindex} '{ print $x }') + # If engine name matches. + if [ "${enginemodtest}" == "${engine}" ]; then + # Mod is compatible. + modcompatibleengine="1" + fi + done + fi +} + +# Find out if a game is not compatible with a mod from a modnotgames (list of games not supported by a mod) variable. +fn_not_compatible_mod_games() { + # Reset test value. + modeincompatiblegame="0" + # If value is set to NOTGAMES (ignore). + if [ "${modexcludegames}" != "NOTGAMES" ]; then + # How many engines we need to test. + excludegamesamount=$(echo -e "${modexcludegames}" | awk -F ';' '{ print NF }') + # Test all subvalue of "modexcludegames" using the ";" separator. + for ((gamevarindex = 1; gamevarindex < excludegamesamount; gamevarindex++)); do + # Put current engine name into modtest variable. + excludegamemodtest=$(echo -e "${modexcludegames}" | awk -F ';' -v x=${gamevarindex} '{ print $x }') + # If engine name matches. + if [ "${excludegamemodtest}" == "${gamename}" ]; then + # Mod is compatible. + modeincompatiblegame="1" + fi + done + fi +} + +# Sums up if a mod is compatible or not with modcompatibility=0/1. +fn_mod_compatible_test() { + # Test game and engine compatibility. + fn_compatible_mod_games + fn_compatible_mod_engines + fn_not_compatible_mod_games + if [ "${modeincompatiblegame}" == "1" ]; then + modcompatibility="0" + elif [ "${modcompatibleengine}" == "1" ] || [ "${modcompatiblegame}" == "1" ]; then + modcompatibility="1" + else + modcompatibility="0" + fi +} + +## Directory management. + +# Create mods files and directories if it doesn't exist. +fn_create_mods_dir() { + # Create lgsm data modsdir. + if [ ! -d "${modsdir}" ]; then + echo -en "creating LinuxGSM mods data directory ${modsdir}..." + mkdir -p "${modsdir}" + exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "Creating mod download dir ${modsdir}" + core_exit.sh + else + fn_print_ok_eol_nl + fn_script_log_pass "Creating mod download dir ${modsdir}" + fi + fi + # Create mod install directory. + if [ ! -d "${modinstalldir}" ]; then + echo -en "creating mods install directory ${modinstalldir}..." + mkdir -p "${modinstalldir}" + exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "Creating mod install directory ${modinstalldir}" + core_exit.sh + else + fn_print_ok_eol_nl + fn_script_log_pass "Creating mod install directory ${modinstalldir}" + fi + fi + + # Create lgsm/data/${modsinstalledlist}. + if [ ! -f "${modsinstalledlistfullpath}" ]; then + touch "${modsinstalledlistfullpath}" + fn_script_log_info "Created ${modsinstalledlistfullpath}" + fi +} + +# Create tmp download mod directory. +fn_mods_create_tmp_dir() { + if [ ! -d "${modstmpdir}" ]; then + mkdir -p "${modstmpdir}" + exitcode=$? + echo -en "creating mod download directory ${modstmpdir}..." + if [ "${exitcode}" != 0 ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "Creating mod download directory ${modstmpdir}" + core_exit.sh + else + fn_print_ok_eol_nl + fn_script_log_pass "Creating mod download directory ${modstmpdir}" + fi + fi +} + +# Remove the tmp mod download directory when finished. +fn_mods_clear_tmp_dir() { + if [ -d "${modstmpdir}" ]; then + echo -en "clearing mod download directory ${modstmpdir}..." + rm -rf "${modstmpdir:?}" + exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "Clearing mod download directory ${modstmpdir}" + core_exit.sh + else + fn_print_ok_eol_nl + fn_script_log_pass "Clearing mod download directory ${modstmpdir}" + fi + + fi + # Clear temp file list as well. + if [ -f "${modsdir}/.removedfiles.tmp" ]; then + rm -f "${modsdir:?}/.removedfiles.tmp" + fi +} + +# Counts how many mods were installed. +fn_mods_count_installed() { + if [ -f "${modsinstalledlistfullpath}" ]; then + installedmodscount=$(wc -l < "${modsinstalledlistfullpath}") + else + installedmodscount=0 + fi +} + +# Exits if no mods were installed. +fn_mods_check_installed() { + # Count installed mods. + fn_mods_count_installed + # If no mods are found. + if [ ${installedmodscount} -eq 0 ]; then + echo -e "" + fn_print_failure_nl "No installed mods or addons were found" + echo -e " * Install mods using LinuxGSM first with: ./${selfname} mods-install" + fn_script_log_error "No installed mods or addons were found." + core_exit.sh + fi +} + +# Checks that mod files list exists and isn't empty. +fn_check_mod_files_list() { + # File list must exist and be valid before any operation on it. + if [ -f "${modsdir}/${modcommand}-files.txt" ]; then + # How many lines is the file list. + modsfilelistsize=$(wc -l < "${modsdir}/${modcommand}-files.txt") + # If file list is empty. + if [ "${modsfilelistsize}" -eq 0 ]; then + fn_print_failure "${modcommand}-files.txt is empty" + echo -e "* Unable to remove ${modprettyname}" + fn_script_log_fatal "${modcommand}-files.txt is empty: Unable to remove ${modprettyname}." + core_exit.sh + fi + else + fn_print_failure "${modsdir}/${modcommand}-files.txt does not exist" + fn_script_log_fatal "${modsdir}/${modcommand}-files.txt does not exist: Unable to remove ${modprettyname}." + core_exit.sh + fi +} + +fn_mod_exist() { + modreq=$1 + # requires one parameter, the mod + if [ -f "${modsdir}/${modreq}-files.txt" ]; then + # how many lines is the file list + modsfilelistsize=$(wc -l < "${modsdir}/${modreq}-files.txt") + # if file list is empty + if [ "${modsfilelistsize}" -eq 0 ]; then + fn_mod_required_fail_exist "${modreq}" + fi + else + fn_mod_required_fail_exist "${modreq}" + fi +} + +fn_mod_required_fail_exist() { + modreq=$1 + # requires one parameter, the mod + fn_script_log_fatal "${modreq}-files.txt is empty: unable to find ${modreq} installed" + echo -en "* Unable to find '${modreq}' which is required prior to installing this mod..." + fn_print_fail_eol_nl + core_exit.sh +} + +fn_mod_liblist_gam_filenames() { + # clear variables just in case + moddll="" + modso="" + moddylib="" + + # default libraries + case ${gamename} in + "Counter-Strike 1.6") + moddll="mp.dll" + modso="cs.so" + moddylib="cs.dylib" + ;; + "Day of Defeat") + moddll="dod.dll" + modso="dod.so" + moddylib="dod.dylib" + ;; + "Team Fortress Classic") + moddll="tfc.dll" + modso="tfc.so" + moddylib="tfc.dylib" + ;; + "Natural Selection") + moddll="ns.dll" + modso="ns_i386.so" + moddylib="" + ;; + "The Specialists") + moddll="mp.dll" + modso="ts_i386.so" + moddylib="" + ;; + "Half-Life: Deathmatch") + moddll="hl.dll" + modso="hl.so" + moddylib="hl.dylib" + ;; + esac +} + +# modifers for liblist.gam to add/remote metamod binaries +fn_mod_install_liblist_gam_file() { + + fn_mod_liblist_gam_filenames + + if [ -f "${modinstalldir}/liblist.gam" ]; then + # modify the liblist.gam file to initialize Metamod + logentry="sed replace (dlls\\${moddll}) ${modinstalldir}/liblist.gam" + echo -en "modifying gamedll in liblist.gam..." + rpldll="s/dlls\\\\${moddll}/addons\/metamod\/dlls\/metamod.dll/g" + sed -i $rpldll "${modinstalldir}/liblist.gam" + grep -q "addons/metamod/dlls/metamod.dll" "${modinstalldir}/liblist.gam" + exitcode=$? + # if replacement back didn't happen, error out. + if [ "${exitcode}" != 0 ]; then + fn_script_log_fatal "${logentry}" + fn_print_fail_eol_nl + else + fn_script_log_pass "${logentry}" + fn_print_ok_eol_nl + fi + + # modify the liblist.gam file to initialize metamod + logentry="sed replace (dlls\\${modso}) ${modinstalldir}/liblist.gam" + echo -en "modifying gamedll_linux in liblist.gam..." + rplso="s/dlls\/${modso}/addons\/metamod\/dlls\/metamod.so/g" + sed -i $rplso "${modinstalldir}/liblist.gam" + grep -q "addons/metamod/dlls/metamod.so" "${modinstalldir}/liblist.gam" + exitcode=$? + # if replacement back didn't happen, error out + if [ "${exitcode}" != 0 ]; then + fn_script_log_fatal "${logentry}" + fn_print_fail_eol_nl + else + fn_script_log_pass "${logentry}" + fn_print_ok_eol_nl + fi + + # mac os needs to be checked not all mods support mac os + if [ -n "${moddylib}" ]; then + # modify the liblist.gam file to initialize metamod + logentry="sed replace (dlls\\${moddylib}) ${modinstalldir}/liblist.gam" + echo -en "modifying gamedll_osx in liblist.gam..." + rpldylib="s/dlls\/${moddylib}/addons\/metamod\/dlls\/metamod.dylib/g" + sed -i $rpldylib "${modinstalldir}/liblist.gam" + grep -q "addons/metamod/dlls/metamod.dylib" "${modinstalldir}/liblist.gam" + exitcode=$? + # if replacement back didn't happen, error out. + if [ "${exitcode}" != 0 ]; then + fn_script_log_fatal "${logentry}" + fn_print_fail_eol_nl + else + fn_script_log_pass ${logentry} + fn_print_ok_eol_nl + fi + fi + fi +} + +fn_mod_remove_liblist_gam_file() { + + fn_mod_liblist_gam_filenames + + if [ -f "${modinstalldir}/liblist.gam" ]; then + # modify the liblist.gam file back to defaults + logentry="sed replace (addons/metamod/dlls/metamod.dll) ${modinstalldir}/liblist.gam" + echo -en "modifying gamedll in liblist.gam..." + rpldll="s/addons\/metamod\/dlls\/metamod.dll/dlls\\\\${moddll}/g" + sed -i $rpldll "${modinstalldir}/liblist.gam" + grep -q "${moddll}" "${modinstalldir}/liblist.gam" + exitcode=$? + # if replacement back didn't happen, error out. + if [ "${exitcode}" != 0 ]; then + fn_script_log_fatal "${logentry}" + fn_print_fail_eol_nl + else + fn_script_log_pass ${logentry} + fn_print_ok_eol_nl + fi + + # modify the liblist.gam file back to defaults + logentry="sed replace (addons/metamod/dlls/metamod.so) ${modinstalldir}/liblist.gam" + echo -en "modifying gamedll_linux in liblist.gam..." + rplso="s/addons\/metamod\/dlls\/metamod.so/dlls\/${modso}/g" + sed -i $rplso "${modinstalldir}/liblist.gam" + grep -q "${modso}" "${modinstalldir}/liblist.gam" + exitcode=$? + # if replacement back didn't happen, error out + if [ "${exitcode}" != 0 ]; then + fn_script_log_fatal "${logentry}" + fn_print_fail_eol_nl + else + fn_script_log_pass ${logentry} + fn_print_ok_eol_nl + fi + + # mac os needs to be checked not all mods support mac os + if [ -n "${moddylib}" ]; then + # modify the liblist.gam file back to defaults + logentry="sed replace (addons/metamod/dlls/metamod.dylib) ${modinstalldir}/liblist.gam" + echo -en "modifying gamedll_osx in liblist.gam..." + rpldylib="s/addons\/metamod\/dlls\/metamod.dylib/dlls\/${moddylib}/g" + sed -i $rpldylib "${modinstalldir}/liblist.gam" + grep -q "${moddylib}" "${modinstalldir}/liblist.gam" + # if replacement back didn't happen, error out. + exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_script_log_fatal "${logentry}" + fn_print_fail_eol_nl + else + fn_script_log_pass ${logentry} + fn_print_ok_eol_nl + fi + fi + fi +} + +fn_mod_install_amxmodx_file() { + # does plugins.ini exist? + if [ -f "${modinstalldir}/addons/metamod/plugins.ini" ]; then + # since it does exist, is the entry already in plugins.ini + logentry="line (linux addons/amxmodx/dlls/amxmodx_mm_i386.so) inserted into ${modinstalldir}/addons/metamod/plugins.ini" + echo -en "adding amxmodx_mm_i386.so in plugins.ini..." + grep -q "amxmodx_mm_i386.so" "${modinstalldir}/addons/metamod/plugins.ini" + exitcode=$? + if [ "${exitcode}" != 0 ]; then + # file exists but the entry does not, let's add it + echo "linux addons/amxmodx/dlls/amxmodx_mm_i386.so" >> "${modinstalldir}/addons/metamod/plugins.ini" + exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_script_log_fatal "${logentry}" + fn_print_fail_eol_nl + else + fn_script_log_pass ${logentry} + fn_print_ok_eol_nl + fi + fi + else + # create new file and add the mod to it + echo "linux addons/amxmodx/dlls/amxmodx_mm_i386.so" > "${modinstalldir}/addons/metamod/plugins.ini" + exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_script_log_fatal "${logentry}" + fn_print_fail_eol_nl + core_exit.sh + else + fn_script_log_pass ${logentry} + fn_print_ok_eol_nl + fi + fi +} + +fn_mod_remove_amxmodx_file() { + if [ -f "${modinstalldir}/addons/metamod/plugins.ini" ]; then + # since it does exist, is the entry already in plugins.ini + logentry="line (linux addons/amxmodx/dlls/amxmodx_mm_i386.so) removed from ${modinstalldir}/addons/metamod/plugins.ini" + echo -en "removing amxmodx_mm_i386.so in plugins.ini..." + grep -q "linux addons/amxmodx/dlls/amxmodx_mm_i386.so" "${modinstalldir}/addons/metamod/plugins.ini" + # iIs it found? If so remove it and clean up + exitcode=$? + if [ "${exitcode}" == 0 ]; then + # delete the line we inserted + sed -i '/linux addons\/amxmodx\/dlls\/amxmodx_mm_i386.so/d' "${modinstalldir}/addons/metamod/plugins.ini" + # remove empty lines + sed -i '/^$/d' "${modinstalldir}/addons/metamod/plugins.ini" + exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_script_log_fatal "${logentry}" + fn_print_fail_eol_nl + else + fn_script_log_pass ${logentry} + fn_print_ok_eol_nl + fi + + # if file is empty, remove it. + if [ -f "${modinstalldir}/addons/metamod/plugins.ini" ]; then + rm -f "${modinstalldir}/addons/metamod/plugins.ini" + fn_script_log_pass "file removed ${modinstalldir}/addons/metamod/plugins.ini because it was empty" + fi + fi + fi +} + +## Database initialisation. + +mods_list.sh +fn_mods_available diff --git a/lgsm/functions/mods_list.sh b/lgsm/functions/mods_list.sh new file mode 100644 index 000000000..a83b7e303 --- /dev/null +++ b/lgsm/functions/mods_list.sh @@ -0,0 +1,209 @@ +#!/bin/bash +# LinuxGSM mods_list.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Lists and defines available mods for LinuxGSM supported servers; works along with mods_core.sh. +# Usage: To add a mod, you need to add an array variable following the guide to set proper values; +# Usage: Then add this array to the mods_global_array. +# Usage: If needed, you can scrape the download URL first. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +# Get a proper URL for mods that don't provide a good one (optional) +fn_script_log_info "Retrieving latest mods URLs" + +# Metamod (Half-life 1 Classic Engine) +metamodversion="1.21.1-am" +metamodlatestfile="metamod-${metamodversion}.zip" +metamoddownloadurl="https://www.amxmodx.org/release/${metamodlatestfile}" +metamodurl="${metamoddownloadurl}" +# AMX Mod X: Base +amxxbaseversion="1.8.2" +amxxbasemod="base" +amxxbaselatestfile="amxmodx-${amxxbaseversion}-${amxxbasemod}-linux.tar.gz" +amxxbasedownloadurl="https://www.amxmodx.org/release/${amxxbaselatestfile}" +amxxbaseurl="${amxxbasedownloadurl}" +# AMX Mod X: Counter-Strike +amxxcsversion="1.8.2" +amxxcsmod="cstrike" +amxxcslatestfile="amxmodx-${amxxbaseversion}-${amxxcsmod}-linux.tar.gz" +amxxcsdownloadurl="https://www.amxmodx.org/release/${amxxcslatestfile}" +amxxcsurl="${amxxcsdownloadurl}" +# AMX Mod X: Day of Defeat +amxxdodversion="1.8.2" +amxxdodmod="dod" +amxxdodlatestfile="amxmodx-${amxxdodversion}-${amxxdodmod}-linux.tar.gz" +amxxdoddownloadurl="https://www.amxmodx.org/release/${amxxdodlatestfile}" +amxxdodurl="${amxxdoddownloadurl}" +# AMX Mod X: Team Fortress Classic +amxxtfcversion="1.8.2" +amxxtfcmod="tfc" +amxxtfclatestfile="amxmodx-${amxxtfcversion}-${amxxtfcmod}-linux.tar.gz" +amxxtfcdownloadurl="https://www.amxmodx.org/release/${amxxtfclatestfile}" +amxxtfcurl="${amxxtfcdownloadurl}" +# AMX Mod X: Natural Selection +amxxnsversion="1.8.2" +amxxnsmod="ns" +amxxnslatestfile="amxmodx-${amxxnsversion}-${amxxnsmod}-linux.tar.gz" +amxxnsdownloadurl="https://www.amxmodx.org/release/${amxxnslatestfile}" +amxxnsurl="${amxxnsdownloadurl}" +# AMX Mod X: The Specialists +amxxtsversion="1.8.2" +amxxtsmod="ts" +amxxtslatestfile="amxmodx-${amxxtsversion}-${amxxtsmod}-linux.tar.gz" +amxxtsdownloadurl="https://www.amxmodx.org/release/${amxxtslatestfile}" +amxxtsurl="${amxxtsdownloadurl}" +# Metamod:Source +metamodsourceversion="1.11" +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" +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}" +sourcemodurl="${sourcemoddownloadurl}" +# Steamworks +steamworksscrapeurl="https://users.alliedmods.net/~kyles/builds/SteamWorks" +steamworkslatestfile=$(curl --connect-timeout 10 -sL ${steamworksscrapeurl} | grep -m 1 linux | cut -d '"' -f 4) +steamworksdownloadurl="${steamworksscrapeurl}/${steamworkslatestfile}" +steamworksurl="${steamworksdownloadurl}" +# CS:GO Mods +get5lastbuild=$(curl --connect-timeout 10 -sL https://api.github.com/repos/splewis/get5/releases/latest | jq '.assets[] |select(.browser_download_url | endswith(".tar.gz"))') +get5latestfile=$(echo -e "${get5lastbuild}" | jq -r '.name') +get5latestfilelink=$(echo -e "${get5lastbuild}" | jq -r '.browser_download_url') +csgopracticelatest=$(curl --connect-timeout 10 -sL https://api.github.com/repos/splewis/csgo-practice-mode/releases/latest | jq '.assets[]') +csgopracticelatestfile=$(echo -e "${csgopracticelatest}" | jq -r '.name') +csgopracticelatestlink=$(echo -e "${csgopracticelatest}" | jq -r '.browser_download_url') +csgopuglatest=$(curl --connect-timeout 10 -sL https://api.github.com/repos/splewis/csgo-pug-setup/releases/latest | jq '.assets[]') +csgopuglatestfile=$(echo -e "${csgopuglatest}" | jq -r '.name') +csgopuglatestlink=$(echo -e "${csgopuglatest}" | jq -r '.browser_download_url') +gokzlatestversion=$(curl --connect-timeout 10 -s https://api.github.com/repos/KZGlobalTeam/gokz/releases/latest | grep "tag_name" | cut -d : -f 2,3 | sed -E 's/.*"([^"]+)".*/\1/') +gokzlatestfile="GOKZ-v${gokzlatestversion}.zip" +gokzlatestlink="https://github.com/KZGlobalTeam/gokz/releases/download/${gokzlatestversion}/${gokzlatestfile}" +movementapilatestversion=$(curl --connect-timeout 10 -s https://api.github.com/repos/danzayau/MovementAPI/releases/latest | grep "tag_name" | cut -d : -f 2,3 | sed -E 's/.*"([^"]+)".*/\1/') +movementapilatestfile="MovementAPI-v${movementapilatestversion}.zip" +movementapilatestlink="https://github.com/danzayau/MovementAPI/releases/download/${movementapilatestversion}/${movementapilatestfile}" + +# Rust +carbonrustapilatestfile="Carbon.Linux.Release.tar.gz" +carbonrustlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/CarbonCommunity/Carbon.Core/releases/tags/production_build | jq -r '.assets[]|select(.name == "Carbon.Linux.Release.tar.gz") | .browser_download_url') + +# Oxide +oxiderustlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/OxideMod/Oxide.Rust/releases/latest | jq -r '.assets[]|select(.browser_download_url | contains("linux")) | .browser_download_url') +oxidehurtworldlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/OxideMod/Oxide.Hurtworld/releases/latest | jq -r '.assets[].browser_download_url') +oxidesdtdlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/OxideMod/Oxide.SevenDaysToDie/releases/latest | jq -r '.assets[]|select(.browser_download_url | contains("linux")) | .browser_download_url') +# Valheim Plus +valeimpluslatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/valheimPlus/ValheimPlus/releases/latest | jq -r '.assets[]|select(.browser_download_url | contains("UnixServer.tar.gz")) | .browser_download_url') +# Valheim BepInEx +bepinexvhlatestlink=$(curl --connect-timeout 10 -sL "https://valheim.thunderstore.io/api/experimental/package/denikson/BepInExPack_Valheim/" -H "accept: application/json" | jq -r '.latest.download_url') + +# Define mods information (required) + +# Separator name +modseparator="MOD" + +# REQUIRED: mod_info_name=( MOD "modcommand" "Pretty Name" "URL" "filename" "modsubdirs" "LowercaseOn/Off" "/files/to/keep;" "/install/path" "ENGINES" "GAMES" "NOTGAMES" "AUTHOR_URL" "Short Description" ) +# Example 1) Well made mod: mod_info_name=( MOD "awesomemod" "This is an Awesome Mod" "https://awesomemod.com/latest.zip" "awesomemod.zip" "0" "LowercaseOff" "OVERWRITE" "${systemdir}/addons" "source;unity3d;" "GAMES" "NOTGAMES" "https://awesomemod.com/" "This mod knows that 42 is the answer" ) +# Example 2) Poorly made mod: mod_info_name=( MOD "stupidmod" "This is a stupid mod" "${crappymodurl}" "StupidMod.zip" "2" "LowercaseOn" "cfg;data/crappymod;" "${systemdir}" "source;" "GAMES" "Garry's mod;Counter-Strike: Source;" "This mod is dumber than dumb" ) +# None of those values can be empty +# index | Usage +# [0] | MOD: separator, all mods must begin with it +# [1] | "modcommand": the LGSM name and command to install the mod (must be unique and lowercase) +# [2] | "Pretty Name": the common name people use to call the mod that will be displayed to the user +# [3] | "URL": link to the mod archive file; can be a variable previously defined while scraping a URL +# [4] | "filename": the output filename +# [5] | "modsubdirs": in how many subdirectories is the mod (none is 0) (not used at release, but could be in the future) +# [6] | "LowercaseOn/Off": LowercaseOff or LowercaseOn: enable/disable converting extracted files and directories to lowercase (some games require it) +# [7] | "modinstalldir": the directory in which to install the mode (use LGSM dir variables such as ${systemdir}) +# [8] | "/files/to/keep;", files & directories that should not be overwritten upon update, separated and ended with a semicolon; you can also use "OVERWRITE" value to ignore the value or "NOUPDATE" to disallow updating; for files to keep upon uninstall, see fn_mod_tidy_files_list from mods_core.sh +# [9] | "Supported Engines;": list them according to LGSM ${engine} variables, separated and ended with a semicolon, or use ENGINES to ignore the value +# [10] | "Supported Games;": list them according to LGSM ${gamename} variables, separated and ended with a semicolon, or use GAMES to ignore the value +# [11] | "Unsupported Games;": list them according to LGSM ${gamename} variables, separated and ended with a semicolon, or use NOTGAMES to ignore the value (useful to exclude a game when using Supported Engines) +# [12] | "AUTHOR_URL" is the author's website, displayed to the user when chosing mods to install +# [13] | "Short Description" a description showed to the user upon installation/removal + +# Half-life 1 Engine Mods +mod_info_metamod=(MOD "metamod" "Metamod" "${metamodurl}" "${metamodlatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/metamod/plugins.ini;" "ENGINES" "Counter-Strike 1.6;Day of Defeat;Team Fortress Classic;Natural Selection;The Specialists;Half-Life: Deathmatch;" "NOTGAMES" "https://github.com/alliedmodders/metamod-hl1" "Plugins Framework") +mod_info_base_amxx=(MOD "amxmodx" "AMX Mod X: Base" "${amxxbaseurl}" "${amxxbaselatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/amxmodx/configs;" "ENGINES" "Counter-Strike 1.6;Day of Defeat;Team Fortress Classic;Natural Selection;The Specialists;Half-Life: Deathmatch;" "NOTGAMES" "https://www.amxmodx.org" "Admin Features (requires Metamod)") + +# CS 1.6 (HL1) Engine Mods +mod_info_cs_amxx=(MOD "amxmodxcs" "AMX Mod X: Counter-Strike" "${amxxcsurl}" "${amxxcslatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/amxmodx/configs;" "ENGINES" "Counter-Strike 1.6;" "NOTGAMES" "https://www.amxmodx.org" "Admin Features (requires Metamod & AMX Mod X: Base)") + +# DOD (HL1) Engine Mods +mod_info_dod_amxx=(MOD "amxmodxdod" "AMX Mod X: Day of Defeat" "${amxxdodurl}" "${amxxdodlatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/amxmodx/configs;" "ENGINES" "Day of Defeat;" "NOTGAMES" "https://www.amxmodx.org" "Admin Features (requires Metamod & AMX Mod X: Base)") + +# TFC (HL1) Engine Mods +mod_info_tfc_amxx=(MOD "amxmodxtfc" "AMX Mod X: Team Fortress Classic" "${amxxtfcurl}" "${amxxtfclatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/amxmodx/configs;" "ENGINES" "Team Fortress Classic;" "NOTGAMES" "https://www.amxmodx.org" "Admin Features (requires Metamod & AMX Mod X: Base)") + +# NS (Natural Selection) (HL1) Engine Mods +mod_info_ns_amxx=(MOD "amxmodxns" "AMX Mod X: Natural Selection" "${amxxnsurl}" "${amxxnslatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/amxmodx/configs;" "ENGINES" "Natural Selection;" "NOTGAMES" "https://www.amxmodx.org" "Admin Features (requires Metamod & AMX Mod X: Base)") + +# TS (The Specialists) (HL1) Engine Mods +mod_info_ts_amxx=(MOD "amxmodxts" "AMX Mod X: The Specialists" "${amxxtsurl}" "${amxxtslatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/amxmodx/configs;" "ENGINES" "The Specialists;" "NOTGAMES" "https://www.amxmodx.org" "Admin Features (requires Metamod & AMX Mod X: Base)") + +# Source mods +mod_info_metamodsource=(MOD "metamodsource" "Metamod: Source" "${metamodsourceurl}" "${metamodsourcelatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/metamod/metaplugins.ini;" "source;" "GAMES" "NOTGAMES" "https://www.sourcemm.net" "Plugins Framework") +mod_info_sourcemod=(MOD "sourcemod" "SourceMod" "${sourcemodurl}" "${sourcemodlatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "source;" "GAMES" "NOTGAMES" "http://www.sourcemod.net" "Admin Features (requires Metamod: Source)") +mod_info_steamworks=(MOD "steamworks" "SteamWorks" "${steamworksurl}" "${steamworkslatestfile}" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/KyleSanderson/SteamWorks" "Exposing SteamWorks functions to SourcePawn") +mod_info_stripper=(MOD "stripper" "Stripper Source" "http://www.bailopan.net/stripper/snapshots/1.2/stripper-1.2.2-git129-linux.tar.gz" "stripper-1.2.2-git129-linux.tar.gz" "0" "LowercaseOff" "${systemdir}" "addons/stripper/maps;" "ENGINES" "Counter-Strike: Global Offensive;Counter-Strike: Source;Day of Defeat: Source;Half Life: Deathmatch;Half Life 2: Deathmatch;Insurgency;Left 4 Dead;Left 4 Dead 2;Nuclear Dawn;Team Fortress 2;" "NOTGAMES" "http://www.bailopan.net/stripper/" "Add or remove objects from map (requires MetaMod)") + +# CS:GO Mods +mod_info_gokz=(MOD "gokz" "GOKZ" "${gokzlatestlink}" "${gokzlatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/KZGlobalTeam/gokz" "GOKZ ${gokzlatestversion} - Implements the KZ game mode (requires SourceMod and MetaMod)") +mod_info_ttt=(MOD "ttt" "Trouble in Terrorist Town" "https://csgottt.com/downloads/ttt-latest-dev-${sourcemodversion}.zip" "ttt-latest.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/Bara/TroubleinTerroristTown" "Implements the TTT game mode (requires SourceMod and MetaMod)") +mod_info_get5=(MOD "get5" "Get 5" "${get5latestfilelink}" "${get5latestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/get5" "Plugin for competitive matches/scrims (requires SourceMod and MetaMod)") +mod_info_prac=(MOD "prac" "csgo practice mode" "${csgopracticelatestlink}" "${csgopracticelatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/csgo-practice-mode" "Practice Mode is a sourcemod plugin for helping players/teams run practices.") +mod_info_pug=(MOD "pug" "PUG" "${csgopuglatestlink}" "${csgopuglatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/csgo-pug-setup" "plugin for setting up private pug/10man games") +mod_info_dhook=(MOD "dhook" "dhook" "https://forums.alliedmods.net/attachment.php?attachmentid=190123&d=1625050030" "dhooks-2.2.0d17.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://forums.alliedmods.net/showpost.php?p=2588686&postcount=589" "DHooks 2.2.0 - Required for GOKZ") +mod_info_movement=(MOD "movementapi" "movementapi" "${movementapilatestlink}" "${movementapilatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/danzayau/MovementAPI" "Movement API ${movementapilatestversion} - Required for GOKZ") +mod_info_cleaner=(MOD "cleaner" "cleaner" "https://github.com/e54385991/console-cleaner/archive/refs/heads/master.zip" "console-cleaner.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/e54385991/console-cleaner" "Console Cleaner - Optional for GOKZ") + +# Garry's Mod Addons +mod_info_ulib=(MOD "ulib" "ULib" "https://codeload.github.com/TeamUlysses/ulib/zip/master" "ulib-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://ulyssesmod.net" "Complete Framework") +mod_info_ulx=(MOD "ulx" "ULX" "https://codeload.github.com/TeamUlysses/ulx/zip/master" "ulx-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://ulyssesmod.net" "Admin Panel (requires ULib)") +mod_info_utime=(MOD "utime" "UTime" "https://github.com/TeamUlysses/utime/archive/master.zip" "utime-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://ulyssesmod.net" "Keep track of players play time") +mod_info_uclip=(MOD "uclip" "UClip" "https://github.com/TeamUlysses/uclip/archive/master.zip" "uclip-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://ulyssesmod.net" "An alternative to noclip") +mod_info_acf=(MOD "acf" "Armoured Combat Framework" "https://github.com/nrlulz/ACF/archive/master.zip" "acf-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "acf-master/lua/acf/shared/guns;" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/nrlulz/ACF" "Realistic Wepons & Engines") +mod_info_acf_missiles=(MOD "acfmissiles" "ACF Missiles" "https://github.com/Bubbus/ACF-Missiles/archive/master.zip" "acf-missiles-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/Bubbus/ACF-Missiles" "More missiles for ACF") +mod_info_advdupe2=(MOD "advdupe2" "Advanced Duplicator 2" "https://github.com/wiremod/advdupe2/archive/master.zip" "advdupe2-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://www.wiremod.com" "Save your constructions. Second version") +mod_info_pac3=(MOD "pac3" "PAC3" "https://github.com/CapsAdmin/pac3/archive/master.zip" "pac3-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/CapsAdmin/pac3" "Advanced player model customization") +mod_info_wiremod=(MOD "wiremod" "Wiremod" "https://github.com/wiremod/wire/archive/master.zip" "wire-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/wiremod/wire" "Base Wiremod Addon") +mod_info_wiremodextras=(MOD "wiremod-extras" "Wiremod Extras" "https://github.com/wiremod/wire-extras/archive/master.zip" "wire-extras-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/wiremod/wire-extras/" "Addition to Wiremod, Extra Content") +mod_info_advduplicator=(MOD "advdupe1" "Advanced Duplicator 1" "https://github.com/wiremod/advduplicator/archive/master.zip" "advduplicator-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/wiremod/advduplicator" "Save your constructions. First version") +mod_info_trackassemblytool=(MOD "trackassemblytool" "Track Assembly Tool" "https://github.com/dvdvideo1234/trackassemblytool/archive/master.zip" "trackassemblytool-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/TrackAssemblyTool" "Assembles segmented track. Supports wire") +mod_info_physpropertiesadv=(MOD "physpropertiesadv" "Phys Properties Adv" "https://github.com/dvdvideo1234/physpropertiesadv/archive/master.zip" "physpropertiesadv-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/PhysPropertiesAdv" "Advanced configurable properties") +mod_info_controlsystemse2=(MOD "controlsystemse2" "Control Systems E2" "https://github.com/dvdvideo1234/controlsystemse2/archive/master.zip" "controlsystemse2-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/ControlSystemsE2" "PID controllers and fast traces for E2. Minor included in wire-extas") +mod_info_e2pistontiming=(MOD "e2pistontiming" "E2 Piston Timing" "https://github.com/dvdvideo1234/e2pistontiming/archive/master.zip" "e2pistontiming-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/E2PistonTiming" "Routine driven piston engine timings for E2") +mod_info_propcannontool=(MOD "propcannontool" "Prop Cannon Tool" "https://github.com/dvdvideo1234/propcannontool/archive/master.zip" "propcannontool-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/PropCannonTool" "Cannon entity that can fire props. Supports wire") +mod_info_gearassemblytool=(MOD "gearassemblytool" "Gear Assembly Tool" "https://github.com/dvdvideo1234/gearassemblytool/archive/master.zip" "gearassemblytool-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/GearAssemblyTool" "Assembles segmented gearbox") +mod_info_spinnertool=(MOD "spinnertool" "Spinner Tool" "https://github.com/dvdvideo1234/spinnertool/archive/master.zip" "spinnertool-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/SpinnerTool" "Torque lever controlled spinner. Supports wire") +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") +mod_info_darkrp=(MOD "darkrp" "DarkRP" "https://github.com/FPtje/DarkRP/archive/master.zip" "darkrp-master.zip" "0" "LowercaseOn" "${systemdir}/gamemodes" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://darkrp.com" "Most popular gamemode") +mod_info_darkrpmodification=(MOD "darkrpmodification" "DarkRP Modification" "https://github.com/FPtje/darkrpmodification/archive/master.zip" "darkrpmodification-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "NOUPDATE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://darkrp.com" "Customize DarkRP settings") +mod_info_laserstool=(MOD "laserstool" "Laser STool" "https://github.com/dvdvideo1234/laserstool/archive/main.zip" "laserstool-main.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/LaserSTool" "Scripted tool that spawns laser entities, simulates light rays and even kill players") + +# Rust +mod_info_rustcarbon=(MOD "rustcarbon" "Carbon for Rust" "${carbonrustlatestlink}" "Carbon.Linux.Release.tar.gz" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Rust;" "NOTGAMES" "carbonmod.gg" "Allows for the use of both plugins and harmony mods") + +# Oxidemod +mod_info_rustoxide=(MOD "rustoxide" "Oxide for Rust" "${oxiderustlatestlink}" "Oxide.Rust-linux.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Rust;" "NOTGAMES" "https://umod.org/games/rust" "Allows for the use of plugins") +mod_info_hwoxide=(MOD "hwoxide" "Oxide for Hurtworld" "${oxidehurtworldlatestlink}" "Oxide.Hurtworld.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Hurtworld;" "NOTGAMES" "https://umod.org/games/hurtworld" "Allows for the use of plugins") +mod_info_sdtdoxide=(MOD "sdtdoxide" "Oxide for 7 Days To Die" "${oxidesdtdlatestlink}" "Oxide.SevenDaysToDie.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "7 Days To Die;" "NOTGAMES" "https://umod.org/games/7-days-to-die" "Allows for the use of plugins") + +# ValheimPlus +mod_info_valheimplus=(MOD "valheimplus" "Valheim PLUS" "${valeimpluslatestlink}" "ValheimPlus.tar.gz" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Valheim;" "NOTGAMES" "https://github.com/valheimPlus/ValheimPlus" "Mod to improve Valheim gameplay") + +# BepInEx Valheim +mod_info_bepinexvh=(MOD "bepinexvh" "BepInEx Valheim" "${bepinexvhlatestlink}" "denikson-BepInExPack_Valheim.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Valheim;" "NOTGAMES" "https://valheim.thunderstore.io/package/denikson/BepInExPack_Valheim/" "Unity / XNA game patcher and plugin framework") + +# REQUIRED: Set all mods info into the global array +mods_global_array=("${mod_info_metamod[@]}" "${mod_info_base_amxx[@]}" "${mod_info_cs_amxx[@]}" "${mod_info_dod_amxx[@]}" "${mod_info_tfc_amxx[@]}" "${mod_info_ns_amxx[@]}" "${mod_info_ts_amxx[@]}" "${mod_info_metamodsource[@]}" "${mod_info_sourcemod[@]}" "${mod_info_steamworks[@]}" "${mod_info_gokz[@]}" "${mod_info_ttt[@]}" "${mod_info_get5[@]}" "${mod_info_prac[@]}" "${mod_info_pug[@]}" "${mod_info_dhook[@]}" "${mod_info_movement[@]}" "${mod_info_cleaner[@]}" "${mod_info_ulib[@]}" "${mod_info_ulx[@]}" "${mod_info_utime[@]}" "${mod_info_uclip[@]}" "${mod_info_acf[@]}" "${mod_info_acf_missiles[@]}" "${mod_info_acf_sweps[@]}" "${mod_info_advdupe2[@]}" "${mod_info_pac3[@]}" "${mod_info_wiremod[@]}" "${mod_info_wiremodextras[@]}" "${mod_info_darkrp[@]}" "${mod_info_darkrpmodification[@]}" "${mod_info_rustcarbon[@]}" "${mod_info_rustoxide[@]}" "${mod_info_hwoxide[@]}" "${mod_info_sdtdoxide[@]}" "${mod_info_advduplicator[@]}" "${mod_info_trackassemblytool[@]}" "${mod_info_physpropertiesadv[@]}" "${mod_info_controlsystemse2[@]}" "${mod_info_e2pistontiming[@]}" "${mod_info_propcannontool[@]}" "${mod_info_gearassemblytool[@]}" "${mod_info_spinnertool[@]}" "${mod_info_surfacefrictiontool[@]}" "${mod_info_magneticdipole[@]}" "${mod_info_environmentorganizer[@]}" "${mod_info_precision_alignment[@]}" "${mod_info_improved_stacker[@]}" "${mod_info_improved_weight[@]}" "${mod_info_improved_antinoclip[@]}" "${mod_info_laserstool[@]}" "${mod_info_valheimplus[@]}" "${mod_info_bepinexvh[@]}") diff --git a/lgsm/functions/query_gamedig.sh b/lgsm/functions/query_gamedig.sh new file mode 100644 index 000000000..265607acd --- /dev/null +++ b/lgsm/functions/query_gamedig.sh @@ -0,0 +1,93 @@ +#!/bin/bash +# LinuxGSM query_gamedig.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Querys a gameserver using node-gamedig. +# https://github.com/sonicsnes/node-gamedig + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +querystatus="2" +# Check if gamedig and jq are installed. +if [ "$(command -v gamedig 2> /dev/null)" ] && [ "$(command -v jq 2> /dev/null)" ]; then + + # will bypass query if server offline. + check_status.sh + if [ "${status}" != "0" ]; then + # GameDig requires you use the voice port when querying. + if [ "${querytype}" == "teamspeak3" ]; then + queryport="${port}" + fi + # checks if query is working null = pass. + gamedigcmd=$(echo -e "gamedig --type \"${querytype}\" --host \"${queryip}\" --query_port \"${queryport}\"|jq") + gamedigraw=$(gamedig --type "${querytype}" --host "${queryip}" --query_port "${queryport}") + querystatus=$(echo "${gamedigraw}" | jq '.error|length') + + if [ "${querystatus}" != "null" ]; then + gamedigcmd=$(echo -e "gamedig --type \"${querytype}\" --host \"${queryip}\" --port \"${queryport}\"|jq") + gamedigraw=$(gamedig --type "${querytype}" --host "${queryip}" --port "${queryport}") + querystatus=$(echo "${gamedigraw}" | jq '.error|length') + fi + + if [ "${querytype}" == "teamspeak3" ]; then + fn_info_game_ts3 + fi + + # server name. + gdname=$(echo "${gamedigraw}" | jq -re '.name') + if [ "${gdname}" == "null" ]; then + unset gdname + fi + + # numplayers. + if [ "${querytype}" == "minecraft" ]; then + gdplayers=$(echo "${gamedigraw}" | jq -re '.players | length-1') + elif [ "${querytype}" == "teamspeak3" ]; then + gdplayers=$(echo "${gamedigraw}" | jq -re '.raw.virtualserver_clientsonline') + else + gdplayers=$(echo "${gamedigraw}" | jq -re '.players | length') + fi + if [ "${gdplayers}" == "null" ]; then + unset gdplayers + elif [ "${gdplayers}" == "[]" ] || [ "${gdplayers}" == "-1" ]; then + gdplayers=0 + fi + + # maxplayers. + gdmaxplayers=$(echo "${gamedigraw}" | jq -re '.maxplayers') + if [ "${gdmaxplayers}" == "null" ]; then + unset gdmaxplayers + elif [ "${gdmaxplayers}" == "[]" ]; then + gdmaxplayers=0 + fi + + # current map. + gdmap=$(echo "${gamedigraw}" | jq -re '.map') + if [ "${gdmap}" == "null" ]; then + unset gdmap + fi + + # current gamemode. + gdgamemode=$(echo "${gamedigraw}" | jq -re '.raw.rules.GameMode_s') + if [ "${gdgamemode}" == "null" ]; then + unset gdgamemode + fi + + # numbots. + gdbots=$(echo "${gamedigraw}" | jq -re '.bots | length') + if [ "${gdbots}" == "null" ] || [ "${gdbots}" == "0" ]; then + unset gdbots + fi + + # server version. + if [ "${querytype}" == "teamspeak3" ]; then + gdversion=$(echo "${gamedigraw}" | jq -re '.raw.virtualserver_version') + else + gdversion=$(echo "${gamedigraw}" | jq -re '.raw.version') + fi + + if [ "${gdversion}" == "null" ] || [ "${gdversion}" == "0" ]; then + unset gdversion + fi + fi +fi diff --git a/lgsm/functions/query_gsquery.py b/lgsm/functions/query_gsquery.py new file mode 100644 index 000000000..62c92082e --- /dev/null +++ b/lgsm/functions/query_gsquery.py @@ -0,0 +1,151 @@ +#! /usr/bin/env python3 +# -*- coding: utf-8 -*- +# LinuxGSM query_gsquery.py function +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Allows querying of various game servers. + +import argparse +import socket +import sys + +engine_types=('protocol-valve','protocol-quake3','protocol-quake3','protocol-gamespy1','protocol-unreal2','ut3','minecraft','minecraftbe','jc2mp','mumbleping','soldat','teeworlds') + +class gsquery: + server_response_timeout = 5 + default_buffer_length = 1024 + sourcequery=('protocol-valve','avalanche3.0','barotrauma','madness','quakelive','realvirtuality','refractor','source','goldsrc','spark','starbound','unity3d','unreal4','wurm') + idtech2query=('protocol-quake3','idtech2','quake','iw2.0') + idtech3query=('protocol-quake3','iw3.0','ioquake3','qfusion') + minecraftquery=('minecraft','lwjgl2') + minecraftbequery=('minecraftbe',) + jc2mpquery=('jc2mp',) + mumblequery=('mumbleping',) + soldatquery=('soldat',) + twquery=('teeworlds',) + unrealquery=('protocol-gamespy1','unreal') + unreal2query=('protocol-unreal2','unreal2') + unreal3query=('ut3','unreal3') + + def __init__(self, arguments): + self.argument = arguments + # + if self.argument.engine in self.sourcequery: + self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0' + elif self.argument.engine in self.idtech2query: + 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: + 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' + elif self.argument.engine in self.minecraftbequery: + self.query_prompt_string = b'\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\xfe\xfe\xfe\xfe\xfd\xfd\xfd\xfd\x12\x34\x56\x78\x00\x00\x00\x00\x00\x00\x00\x00' + elif self.argument.engine in self.mumblequery: + self.query_prompt_string = b'\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x07\x08' + elif self.argument.engine in self.soldatquery: + self.query_prompt_string = b'\x69\x00' + elif self.argument.engine in self.twquery: + self.query_prompt_string = b'\x04\x00\x00\xff\xff\xff\xff\x05' + bytearray(511) + elif self.argument.engine in self.unrealquery: + self.query_prompt_string = b'\x5C\x69\x6E\x66\x6F\x5C' + elif self.argument.engine in self.unreal2query: + self.query_prompt_string = b'\x79\x00\x00\x00\x00' + elif self.argument.engine in self.unreal3query: + self.query_prompt_string = b'\xFE\xFD\x09\x00\x00\x00\x00' + + self.connected = False + self.response = None + + @staticmethod + def fatal_error(error_message, error_code=1): + sys.stderr.write('ERROR: ' + str(error_message) + '\n') + sys.exit(error_code) + + @staticmethod + def exit_success(success_message=''): + sys.stdout.write('OK: ' + str(success_message) + '\n') + sys.exit(0) + + def responding(self): + # Connect. + connection = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) + connection.settimeout(self.server_response_timeout) + try: + self.connected = connection.connect((self.argument.address, int(self.argument.port))) + except socket.timeout: + self.fatal_error('Request timed out', 1) + except Exception: + self.fatal_error('Unable to connect', 1) + # Send. + connection.send(self.query_prompt_string) + # Receive. + try: + self.response = connection.recv(self.default_buffer_length) + except socket.error: + self.fatal_error('Unable to receive', 2) + connection.close() + # Response. + if self.response is None: + self.fatal_error('No response', 3) + if len(self.response) < 5: + sys.exit('Short response.', 3) + else: + self.exit_success(str(self.response)) + +def parse_args(): + parser = argparse.ArgumentParser( + description='Allows querying of various game servers.', + usage='usage: python3 %(prog)s [options]', + add_help=False + ) + parser.add_argument( + '-a', '--address', + type=str, + required=True, + help='The IPv4 address of the server.' + ) + parser.add_argument( + '-p', '--port', + type=int, + required=True, + help='The IPv4 port of the server.' + ) + parser.add_argument( + '-e', '--engine', + metavar='ENGINE', + choices=engine_types, + help='Engine type: ' + ' '.join(engine_types) + ) + parser.add_argument( + '-v', '--verbose', + action='store_true', + help='Display verbose output.' + ) + parser.add_argument( + '-d', '--debug', + action='store_true', + help='Display debugging output.' + ) + parser.add_argument( + '-V', '--version', + action='version', + version='%(prog)s 0.0.1', + help='Display version and exit.' + ) + parser.add_argument( + '-h', '--help', + action='help', + help='Display help and exit.' + ) + return parser.parse_args() + +def main(): + arguments = parse_args() + server = gsquery(arguments) + server.responding() + +if __name__ == '__main__': + main() diff --git a/lgsm/functions/update_factorio.sh b/lgsm/functions/update_factorio.sh new file mode 100644 index 000000000..852ab9d87 --- /dev/null +++ b/lgsm/functions/update_factorio.sh @@ -0,0 +1,168 @@ +#!/bin/bash +# LinuxGSM update_factorio.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Handles updating of Factorio servers. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +fn_update_dl() { + # Download and extract files to serverfiles. + fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "nohash" + fn_dl_extract "${tmpdir}" "factorio_headless_${factorioarch}-${remotebuildversion}.tar.xz" "${serverfiles}" "factorio" + fn_clear_tmp +} + +fn_update_localbuild() { + # Gets local build info. + fn_print_dots "Checking local build: ${remotelocation}" + # Uses executable to get local build. + if [ -d "${executabledir}" ]; then + cd "${executabledir}" || exit + localbuild=$(${executable} --version | grep "Version:" | awk '{print $2}') + fi + if [ -z "${localbuild}" ]; then + fn_print_error "Checking local build: ${remotelocation}: missing local build info" + fn_script_log_error "Missing local build info" + fn_script_log_error "Set localbuild to 0" + localbuild="0" + else + fn_print_ok "Checking local build: ${remotelocation}" + fn_script_log_pass "Checking local build" + fi +} + +fn_update_remotebuild() { + # Get 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) + remotebuildurl="https://factorio.com/get-download/${branch}/headless/${factorioarch}" + remotebuildfilename="factorio_headless_${factorioarch}-${remotebuildversion}.tar.xz" + + if [ "${firstcommandname}" != "INSTALL" ]; then + fn_print_dots "Checking remote build: ${remotelocation}" + # Checks if remotebuildversion variable has been set. + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + fn_print_fail "Checking remote build: ${remotelocation}" + fn_script_log_fatal "Checking remote build" + core_exit.sh + else + fn_print_ok "Checking remote build: ${remotelocation}" + fn_script_log_pass "Checking remote build" + fi + else + # Checks if remotebuild variable has been set. + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + fn_print_failure "Unable to get remote build" + fn_script_log_fatal "Unable to get remote build" + core_exit.sh + fi + fi +} + +fn_update_compare() { + fn_print_dots "Checking for update: ${remotelocation}" + if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "Update available" + echo -e "* Local build: ${red}${localbuild} ${factorioarch}${default}" + echo -e "* Remote build: ${green}${remotebuildversion} ${factorioarch}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi + echo -en "\n" + fn_script_log_info "Update available" + fn_script_log_info "Local build: ${localbuild} ${factorioarch}" + fn_script_log_info "Remote build: ${remotebuildversion} ${factorioarch}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + fn_script_log_info "${localbuild} > ${remotebuildversion}" + + if [ "${commandname}" == "UPDATE" ]; then + unset updateonstart + check_status.sh + # If server stopped. + if [ "${status}" == "0" ]; then + fn_update_dl + if [ "${localbuild}" == "0" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + sleep 5 + command_stop.sh + fn_firstcommand_reset + fi + # If server started. + else + fn_print_restart_warning + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + exitbypass=1 + fn_update_dl + exitbypass=1 + command_start.sh + fn_firstcommand_reset + fi + unset exitbypass + date +%s > "${lockdir}/lastupdate.lock" + alert="update" + elif [ "${commandname}" == "CHECK-UPDATE" ]; then + alert="check-update" + fi + alert.sh + else + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "No update available" + echo -e "* Local build: ${green}${localbuild} ${factorioarch}${default}" + echo -e "* Remote build: ${green}${remotebuildversion} ${factorioarch}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + echo -en "\n" + fn_script_log_info "No update available" + fn_script_log_info "Local build: ${localbuild} ${factorioarch}" + fn_script_log_info "Remote build: ${remotebuildversion} ${factorioarch}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi + fi +} + +# Game server architecture. +factorioarch="linux64" + +# The location where the builds are checked and downloaded. +remotelocation="factorio.com" + +if [ "${firstcommandname}" == "INSTALL" ]; then + fn_update_remotebuild + fn_update_dl +else + fn_print_dots "Checking for update" + fn_print_dots "Checking for update: ${remotelocation}" + fn_script_log_info "Checking for update: ${remotelocation}" + fn_update_localbuild + fn_update_remotebuild + fn_update_compare +fi diff --git a/lgsm/functions/update_jediknight2.sh b/lgsm/functions/update_jediknight2.sh new file mode 100644 index 000000000..a88b96f61 --- /dev/null +++ b/lgsm/functions/update_jediknight2.sh @@ -0,0 +1,163 @@ +#!/bin/bash +# LinuxGSM update_jk2.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Handles updating of Jedi Knight 2 servers. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +fn_update_dl() { + # Download and extract files to serverfiles. + fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "nohash" + fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}/GameData" "linux-amd64" + fn_clear_tmp +} + +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 | sed 's/.*://' | awk '{print $1}' | head -n 1 | sed 's/v//') + if [ -z "${localbuild}" ]; then + fn_print_error "Checking local build: ${remotelocation}: missing local build info" + fn_script_log_error "Missing local build info" + fn_script_log_error "Set localbuild to 0" + localbuild="0" + else + fn_print_ok "Checking local build: ${remotelocation}" + fn_script_log_pass "Checking local build" + fi +} + +fn_update_remotebuild() { + # Get 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') + remotebuildurl=$(echo "${remotebuildresponse}" | jq -r '.assets[]|select(.browser_download_url | contains("dedicated.zip")) | .browser_download_url') + remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '.tag_name') + + if [ "${firstcommandname}" != "INSTALL" ]; then + fn_print_dots "Checking remote build: ${remotelocation}" + # Checks if remotebuildversion variable has been set. + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + fn_print_fail "Checking remote build: ${remotelocation}" + fn_script_log_fatal "Checking remote build" + core_exit.sh + else + fn_print_ok "Checking remote build: ${remotelocation}" + fn_script_log_pass "Checking remote build" + fi + else + # Checks if remotebuild variable has been set. + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + fn_print_failure "Unable to get remote build" + fn_script_log_fatal "Unable to get remote build" + core_exit.sh + fi + fi +} + +fn_update_compare() { + fn_print_dots "Checking for update: ${remotelocation}" + if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "Update available" + echo -e "* Local build: ${red}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi + echo -en "\n" + fn_script_log_info "Update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + fn_script_log_info "${localbuild} > ${remotebuildversion}" + + if [ "${commandname}" == "UPDATE" ]; then + unset updateonstart + check_status.sh + # If server stopped. + if [ "${status}" == "0" ]; then + fn_update_dl + if [ "${localbuild}" == "0" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + sleep 5 + command_stop.sh + fn_firstcommand_reset + fi + # If server started. + else + fn_print_restart_warning + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + exitbypass=1 + fn_update_dl + exitbypass=1 + command_start.sh + fn_firstcommand_reset + fi + unset exitbypass + date +%s > "${lockdir}/lastupdate.lock" + alert="update" + elif [ "${commandname}" == "CHECK-UPDATE" ]; then + alert="check-update" + fi + alert.sh + else + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "No update available" + echo -e "* Local build: ${green}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + echo -en "\n" + fn_script_log_info "No update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi + fi +} + +# The location where the builds are checked and downloaded. +remotelocation="github.com" + +if [ "${firstcommandname}" == "INSTALL" ]; then + fn_update_remotebuild + fn_update_dl +else + update_steamcmd.sh + fn_print_dots "Checking for update" + fn_print_dots "Checking for update: ${remotelocation}" + fn_script_log_info "Checking for update: ${remotelocation}" + fn_update_localbuild + fn_update_remotebuild + fn_update_compare +fi diff --git a/lgsm/functions/update_minecraft.sh b/lgsm/functions/update_minecraft.sh new file mode 100644 index 000000000..dbef26d34 --- /dev/null +++ b/lgsm/functions/update_minecraft.sh @@ -0,0 +1,176 @@ +#!/bin/bash +# LinuxGSM update_minecraft.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Handles updating of Minecraft: Java Edition servers. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +fn_update_dl() { + # Download and extract files to serverfiles. + fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "chmodx" "norun" "noforce" "nohash" + cp -f "${tmpdir}/${remotebuildfilename}" "${serverfiles}/${executable#./}" +} + +fn_update_localbuild() { + # Gets local build info. + fn_print_dots "Checking local build: ${remotelocation}" + # Uses executable to get local build. + if [ -d "${executabledir}" ]; then + cd "${executabledir}" || exit + localbuild=$(unzip -p "minecraft_server.jar" version.json | jq -r '.id') + fi + if [ -z "${localbuild}" ]; then + fn_print_error "Checking local build: ${remotelocation}: missing local build info" + fn_script_log_error "Missing local build info" + fn_script_log_error "Set localbuild to 0" + localbuild="0" + else + fn_print_ok "Checking local build: ${remotelocation}" + fn_script_log_pass "Checking local build" + fi +} + +fn_update_remotebuild() { + # Get remote build info. + apiurl="https://launchermeta.mojang.com/mc/game/version_manifest.json" + remotebuildresponse=$(curl -s "${apiurl}") + # Latest release. + if [ "${branch}" == "release" ] && [ "${mcversion}" == "latest" ]; then + remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '.latest.release') + # Latest snapshot. + elif [ "${branch}" == "snapshot" ] && [ "${mcversion}" == "latest" ]; then + remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '.latest.snapshot') + # Specific release/snapshot. + else + remotebuildversion=$(echo "${remotebuildresponse}" | jq -r --arg branch "${branch}" --arg mcversion "${mcversion}" '.versions | .[] | select(.type==$branch and .id==$mcversion) | .id') + fi + remotebuildfilename="minecraft_server.${remotebuildversion}.jar" + # Generate link to version manifest json. + remotebuildmanifest=$(echo "${remotebuildresponse}" | jq -r --arg branch "${branch}" --arg mcversion "${remotebuildversion}" '.versions | .[] | select(.type==$branch and .id==$mcversion) | .url') + # Generate link to server.jar + remotebuildurl=$(curl -s "${remotebuildmanifest}" | jq -r '.downloads.server.url') + + if [ "${firstcommandname}" != "INSTALL" ]; then + fn_print_dots "Checking remote build: ${remotelocation}" + # Checks if remotebuildversion variable has been set. + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + fn_print_fail "Checking remote build: ${remotelocation}" + fn_script_log_fatal "Checking remote build" + core_exit.sh + else + fn_print_ok "Checking remote build: ${remotelocation}" + fn_script_log_pass "Checking remote build" + fi + else + # Checks if remotebuild variable has been set. + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + fn_print_failure "Unable to get remote build" + fn_script_log_fatal "Unable to get remote build" + core_exit.sh + fi + fi +} + +fn_update_compare() { + fn_print_dots "Checking for update: ${remotelocation}" + if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "Update available" + echo -e "* Local build: ${red}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi + echo -en "\n" + fn_script_log_info "Update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + fn_script_log_info "${localbuild} > ${remotebuildversion}" + + if [ "${commandname}" == "UPDATE" ]; then + unset updateonstart + check_status.sh + # If server stopped. + if [ "${status}" == "0" ]; then + fn_update_dl + if [ "${localbuild}" == "0" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + sleep 5 + command_stop.sh + fn_firstcommand_reset + fi + # If server started. + else + fn_print_restart_warning + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + exitbypass=1 + fn_update_dl + exitbypass=1 + command_start.sh + fn_firstcommand_reset + fi + unset exitbypass + date +%s > "${lockdir}/lastupdate.lock" + alert="update" + elif [ "${commandname}" == "CHECK-UPDATE" ]; then + alert="check-update" + fi + alert.sh + else + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "No update available" + echo -e "* Local build: ${green}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + echo -en "\n" + fn_script_log_info "No update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi + fi +} + +# The location where the builds are checked and downloaded. +remotelocation="mojang.com" + +if [ "${firstcommandname}" == "INSTALL" ]; then + fn_update_remotebuild + fn_update_dl +else + fn_print_dots "Checking for update" + fn_print_dots "Checking for update: ${remotelocation}" + fn_script_log_info "Checking for update: ${remotelocation}" + fn_update_localbuild + fn_update_remotebuild + fn_update_compare +fi diff --git a/lgsm/functions/update_minecraft_bedrock.sh b/lgsm/functions/update_minecraft_bedrock.sh new file mode 100644 index 000000000..aec940126 --- /dev/null +++ b/lgsm/functions/update_minecraft_bedrock.sh @@ -0,0 +1,181 @@ +#!/bin/bash +# LinuxGSM update_minecraft_bedrock.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Handles updating of Minecraft Bedrock servers. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +fn_update_dl() { + fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "bedrock_server.${remotebuildversion}.zip" "nochmodx" "norun" "noforce" "nohash" + echo -e "Extracting to ${serverfiles}...\c" + if [ "${firstcommandname}" == "INSTALL" ]; then + unzip -oq "${tmpdir}/bedrock_server.${remotebuildversion}.zip" -x "server.properties" -d "${serverfiles}" + else + unzip -oq "${tmpdir}/bedrock_server.${remotebuildversion}.zip" -x "permissions.json" "server.properties" "allowlist.json" -d "${serverfiles}" + fi + local exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "Extracting ${local_filename}" + if [ -f "${lgsmlog}" ]; then + echo -e "${extractcmd}" >> "${lgsmlog}" + fi + echo -e "${extractcmd}" + core_exit.sh + else + fn_print_ok_eol_nl + fn_script_log_pass "Extracting ${local_filename}" + fi +} + +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') + if [ -z "${localbuild}" ]; then + fn_print_error "Checking local build: ${remotelocation}: missing local build info" + fn_script_log_error "Missing local build info" + fn_script_log_error "Set localbuild to 0" + localbuild="0" + else + fn_print_ok "Checking local build: ${remotelocation}" + fn_script_log_pass "Checking local build" + fi +} + +fn_update_remotebuild() { + # Random number for userAgent + randnum=$((1 + RANDOM % 5000)) + # 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.${randnum}.212 Safari/537.36" "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*' | sed 's/.*\///' | grep -Eo "[.0-9]+[0-9]") + else + remotebuildversion="${mcversion}" + fi + remotebuildurl="https://minecraft.azureedge.net/bin-linux/bedrock-server-${remotebuildversion}.zip" + + if [ "${firstcommandname}" != "INSTALL" ]; then + fn_print_dots "Checking remote build: ${remotelocation}" + # Checks if remotebuildversion variable has been set. + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + fn_print_fail "Checking remote build: ${remotelocation}" + fn_script_log_fatal "Checking remote build" + core_exit.sh + else + fn_print_ok "Checking remote build: ${remotelocation}" + fn_script_log_pass "Checking remote build" + fi + else + # Checks if remotebuild variable has been set. + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + fn_print_failure "Unable to get remote build" + fn_script_log_fatal "Unable to get remote build" + core_exit.sh + fi + fi +} + +fn_update_compare() { + fn_print_dots "Checking for update: ${remotelocation}" + if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "Update available" + echo -e "* Local build: ${red}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi + echo -en "\n" + fn_script_log_info "Update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + fn_script_log_info "${localbuild} > ${remotebuildversion}" + + if [ "${commandname}" == "UPDATE" ]; then + unset updateonstart + check_status.sh + # If server stopped. + if [ "${status}" == "0" ]; then + fn_update_dl + if [ "${localbuild}" == "0" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + sleep 5 + command_stop.sh + fn_firstcommand_reset + fi + # If server started. + else + fn_print_restart_warning + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + exitbypass=1 + fn_update_dl + exitbypass=1 + command_start.sh + fn_firstcommand_reset + fi + unset exitbypass + date +%s > "${lockdir}/lastupdate.lock" + alert="update" + elif [ "${commandname}" == "CHECK-UPDATE" ]; then + alert="check-update" + fi + alert.sh + else + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "No update available" + echo -e "* Local build: ${green}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + echo -en "\n" + fn_script_log_info "No update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi + fi +} + +# The location where the builds are checked and downloaded. +remotelocation="minecraft.net" + +if [ "${firstcommandname}" == "INSTALL" ]; then + fn_update_remotebuild + fn_update_dl +else + fn_print_dots "Checking for update" + fn_print_dots "Checking for update: ${remotelocation}" + fn_script_log_info "Checking for update: ${remotelocation}" + fn_update_localbuild + fn_update_remotebuild + fn_update_compare +fi diff --git a/lgsm/functions/update_mta.sh b/lgsm/functions/update_mta.sh new file mode 100644 index 000000000..5252c1328 --- /dev/null +++ b/lgsm/functions/update_mta.sh @@ -0,0 +1,166 @@ +#!/bin/bash +# LinuxGSM update_mta.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Handles updating of Multi Theft Auto servers. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +fn_update_dl() { + # Download and extract files to tmpdir. + fn_fetch_file "http://linux.mtasa.com/dl/multitheftauto_linux_x64.tar.gz" "" "" "" "${tmpdir}" "multitheftauto_linux_x64.tar.gz" "nochmodx" "norun" "force" "nohash" + fn_dl_extract "${tmpdir}" "multitheftauto_linux_x64.tar.gz" "${serverfiles}" "multitheftauto_linux_x64" +} + +fn_update_localbuild() { + # Gets local build info. + fn_print_dots "Checking local build: ${remotelocation}" + # Uses log file to get local build. + localbuild=$(grep "= Multi Theft Auto: San Andreas v" "${serverfiles}/mods/deathmatch/logs/server.log" | awk '{ print $7 }' | sed -r 's/^.{1}//' | tail -1) + if [ -z "${localbuild}" ]; then + fn_print_error "Checking local build: ${remotelocation}: missing local build info" + fn_script_log_error "Missing local build info" + fn_script_log_error "Set localbuild to 0" + localbuild="0" + else + fn_print_ok "Checking local build: ${remotelocation}" + fn_script_log_pass "Checking local build" + fi +} + +fn_update_remotebuild() { + # Get remote build info. + apiurl="https://api.github.com/repos/multitheftauto/mtasa-blue/releases/latest" + remotebuildresponse=$(curl -s "${apiurl}") + remotebuildfilename=$(echo "${remotebuildresponse}" | jq -r '.assets[]|select(.browser_download_url | contains("Linux-amd64")) | .name') + remotebuildurl=$(echo "${remotebuildresponse}" | jq -r '.assets[]|select(.browser_download_url | contains("Linux-amd64")) | .browser_download_url') + remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '.tag_name') + if [ "${firstcommandname}" != "INSTALL" ]; then + fn_print_dots "Checking remote build: ${remotelocation}" + # Checks if remotebuildversion variable has been set. + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + fn_print_fail "Checking remote build: ${remotelocation}" + fn_script_log_fatal "Checking remote build" + core_exit.sh + else + fn_print_ok "Checking remote build: ${remotelocation}" + fn_script_log_pass "Checking remote build" + fi + else + # Checks if remotebuild variable has been set. + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + fn_print_failure "Unable to get remote build" + fn_script_log_fatal "Unable to get remote build" + core_exit.sh + fi + fi +} + +fn_update_compare() { + fn_print_dots "Checking for update: ${remotelocation}" + if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then + if [ "${forceupdate}" == "1" ]; then + # forceupdate bypasses checks, useful for small build changes + mtaupdatestatus="forced" + else + mtaupdatestatus="available" + fi + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "Update available" + echo -e "* Local build: ${red}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi + echo -en "\n" + fn_script_log_info "Update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + fn_script_log_info "${localbuild} > ${remotebuildversion}" + + if [ "${commandname}" == "UPDATE" ]; then + unset updateonstart + check_status.sh + # If server stopped. + if [ "${status}" == "0" ]; then + fn_update_dl + if [ "${localbuild}" == "0" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + sleep 5 + command_stop.sh + fn_firstcommand_reset + fi + # If server started. + else + fn_print_restart_warning + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + exitbypass=1 + fn_update_dl + exitbypass=1 + command_start.sh + fn_firstcommand_reset + fi + unset exitbypass + date +%s > "${lockdir}/lastupdate.lock" + alert="update" + elif [ "${commandname}" == "CHECK-UPDATE" ]; then + alert="check-update" + fi + alert.sh + else + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "No update available" + echo -e "* Local build: ${green}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + echo -en "\n" + fn_script_log_info "No update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi + fi +} + +# The location where the builds are checked and downloaded. +remotelocation="linux.mtasa.com" + +if [ "${firstcommandname}" == "INSTALL" ]; then + fn_update_remotebuild + fn_update_dl +else + fn_print_dots "Checking for update" + fn_print_dots "Checking for update: ${remotelocation}" + fn_script_log_info "Checking for update: ${remotelocation}" + fn_update_localbuild + fn_update_remotebuild + fn_update_compare +fi diff --git a/lgsm/functions/update_papermc.sh b/lgsm/functions/update_papermc.sh new file mode 100644 index 000000000..102ef6570 --- /dev/null +++ b/lgsm/functions/update_papermc.sh @@ -0,0 +1,194 @@ +#!/bin/bash +# LinuxGSM update_papermc.sh function +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Handles updating of PaperMC and Waterfall servers. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +fn_update_dl() { + # Download and extract files to serverfiles. + fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "chmodx" "norun" "force" "${remotebuildhash}" + cp -f "${tmpdir}/${remotebuildfilename}" "${serverfiles}/${executable#./}" + echo "${remotebuildversion}" > "${serverfiles}/build.txt" +} + +fn_update_localbuild() { + # Gets local build info. + fn_print_dots "Checking local build: ${remotelocation}" + # Uses build file to get local build. + localbuild=$(head -n 1 "${serverfiles}/build.txt" 2> /dev/null) + if [ -z "${localbuild}" ]; then + fn_print_error "Checking local build: ${remotelocation}: missing local build info" + fn_script_log_error "Missing local build info" + fn_script_log_error "Set localbuild to 0" + localbuild="0" + else + fn_print_ok "Checking local build: ${remotelocation}" + fn_script_log_pass "Checking local build" + fi +} + +fn_update_remotebuild() { + # Get remote build info. + apiurl="https://papermc.io/api/v2/projects" + # Get list of projects. + remotebuildresponse=$(curl -s "${apiurl}") + # Get list of Minecraft versions for project. + remotebuildresponseproject=$(curl -s "${apiurl}/${paperproject}") + # Get latest Minecraft: Java Edition version or user specified version. + if [ "${mcversion}" == "latest" ]; then + remotebuildmcversion=$(echo "${remotebuildresponseproject}" | jq -r '.versions[-1]') + else + # Checks if user specified version exists. + remotebuildmcversion=$(echo "${remotebuildresponseproject}" | jq -r -e --arg mcversion "${mcversion}" '.versions[]|select(. == $mcversion)') + if [ -z "${remotebuildmcversion}" ]; then + # user passed version does not exist + fn_print_error_nl "Version ${mcversion} not available from ${remotelocation}" + fn_script_log_error "Version ${mcversion} not available from ${remotelocation}" + core_exit.sh + fi + fi + # Get list of paper builds for specific Minecraft: Java Edition version. + remotebuildresponsemcversion=$(curl -s "${apiurl}/paper/versions/${remotebuildmcversion}") + # Get latest paper build for specific Minecraft: Java Edition version. + remotebuildpaperversion=$(echo "${remotebuildresponsemcversion}" | jq -r '.builds[-1]') + # Get various info about the paper build. + remotebuildresponseversion=$(curl -s "${apiurl}/${paperproject}/versions/${remotebuildmcversion}/builds/${remotebuildpaperversion}") + remotebuildfilename=$(echo "${remotebuildresponseversion}" | jq -r '.downloads.application.name') + remotebuildhash=$(echo "${remotebuildresponseversion}" | jq -r '.downloads.application.sha256') + remotebuildurl="${apiurl}/${paperproject}/versions/${remotebuildmcversion}/builds/${remotebuildpaperversion}/downloads/${remotebuildfilename}" + # Combines Minecraft: Java Edition version and paper build. e.g 1.16.5-456 + remotebuildversion="${remotebuildmcversion}-${remotebuildpaperversion}" + + if [ "${firstcommandname}" != "INSTALL" ]; then + fn_print_dots "Checking remote build: ${remotelocation}" + # Checks if remotebuildversion variable has been set. + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + fn_print_fail "Checking remote build: ${remotelocation}" + fn_script_log_fatal "Checking remote build" + core_exit.sh + else + fn_print_ok "Checking remote build: ${remotelocation}" + fn_script_log_pass "Checking remote build" + fi + else + # Checks if remotebuild variable has been set. + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + fn_print_failure "Unable to get remote build" + fn_script_log_fatal "Unable to get remote build" + core_exit.sh + fi + fi +} + +fn_update_compare() { + fn_print_dots "Checking for update: ${remotelocation}" + if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "Update available" + echo -e "* Local build: ${red}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi + echo -en "\n" + fn_script_log_info "Update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + fn_script_log_info "${localbuild} > ${remotebuildversion}" + + if [ "${commandname}" == "UPDATE" ]; then + unset updateonstart + check_status.sh + # If server stopped. + if [ "${status}" == "0" ]; then + fn_update_dl + if [ "${localbuild}" == "0" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + sleep 5 + command_stop.sh + fn_firstcommand_reset + fi + # If server started. + else + fn_print_restart_warning + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + exitbypass=1 + fn_update_dl + exitbypass=1 + command_start.sh + fn_firstcommand_reset + fi + unset exitbypass + date +%s > "${lockdir}/lastupdate.lock" + alert="update" + elif [ "${commandname}" == "CHECK-UPDATE" ]; then + alert="check-update" + fi + alert.sh + else + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "No update available" + echo -e "* Local build: ${green}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + echo -en "\n" + fn_script_log_info "No update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi + fi +} + +# The location where the builds are checked and downloaded. +remotelocation="papermc.io" + +if [ "${shortname}" == "pmc" ]; then + paperproject="paper" +elif [ "${shortname}" == "vpmc" ]; then + paperproject="velocity" +elif [ "${shortname}" == "wmc" ]; then + paperproject="waterfall" +fi + +if [ "${firstcommandname}" == "INSTALL" ]; then + fn_update_remotebuild + fn_update_dl +else + fn_print_dots "Checking for update" + fn_print_dots "Checking for update: ${remotelocation}" + fn_script_log_info "Checking for update: ${remotelocation}" + fn_update_localbuild + fn_update_remotebuild + fn_update_compare +fi diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh new file mode 100644 index 000000000..85bacb899 --- /dev/null +++ b/lgsm/functions/update_steamcmd.sh @@ -0,0 +1,39 @@ +#!/bin/bash +# LinuxGSM update_steamcmd.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Handles updating using SteamCMD. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +# init steamcmd functions +core_steamcmd.sh + +# The location where the builds are checked and downloaded. +remotelocation="SteamCMD" +check.sh + +fn_print_dots "${remotelocation}" + +if [ "${forceupdate}" == "1" ]; then + # forceupdate bypasses update checks. + if [ "${status}" != "0" ]; then + fn_print_restart_warning + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + fn_dl_steamcmd + date +%s > "${lockdir}/lastupdate.lock" + exitbypass=1 + command_start.sh + fn_firstcommand_reset + else + fn_dl_steamcmd + date +%s > "${lockdir}/lastupdate.lock" + fi +else + fn_update_steamcmd_localbuild + fn_update_steamcmd_remotebuild + fn_update_steamcmd_compare +fi diff --git a/lgsm/functions/update_ts3.sh b/lgsm/functions/update_ts3.sh new file mode 100644 index 000000000..0f5327de2 --- /dev/null +++ b/lgsm/functions/update_ts3.sh @@ -0,0 +1,181 @@ +#!/bin/bash +# LinuxGSM command_ts3.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Handles updating of Teamspeak 3 servers. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +fn_update_dl() { + # Download and extract files to serverfiles. + fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "${remotebuildhash}" + fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}" "teamspeak3-server_linux_${ts3arch}" + fn_clear_tmp +} + +fn_update_localbuild() { + # Gets local build info. + fn_print_dots "Checking local build: ${remotelocation}" + # Uses log file to get local build. + localbuild=$(grep -Eo "TeamSpeak 3 Server ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}" "$(find ./* -name "ts3server*_0.log" 2> /dev/null | sort | tail -1)" | grep -Eo "((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}" | tail -1) + if [ -z "${localbuild}" ]; then + fn_print_error "Checking local build: ${remotelocation}: missing local build info" + fn_script_log_error "Missing local build info" + fn_script_log_error "Set localbuild to 0" + localbuild="0" + else + fn_print_ok "Checking local build: ${remotelocation}" + fn_script_log_pass "Checking local build" + fi +} + +fn_update_remotebuild() { + # Get remote build info. + apiurl="https://www.teamspeak.com/versions/server.json" + remotebuildresponse=$(curl -s "${apiurl}") + + if [ "${ts3arch}" == "amd64" ]; then + remotebuildurl=$(echo -e "${remotebuildresponse}" | jq -r '.linux.x86_64.mirrors."teamspeak.com"') + remotebuildhash=$(echo -e "${remotebuildresponse}" | jq -r '.linux.x86_64.checksum') + elif [ "${ts3arch}" == "x86" ]; then + remotebuildurl=$(echo -e "${remotebuildresponse}" | jq -r '.linux.x86.mirrors."teamspeak.com"') + remotebuildhash=$(echo -e "${remotebuildresponse}" | jq -r '.linux.x86.checksum') + fi + remotebuildfilename=$(basename "${remotebuildurl}") + remotebuildversion=$(echo -e "${remotebuildresponse}" | jq -r '.linux.x86_64.version') + + if [ "${firstcommandname}" != "INSTALL" ]; then + fn_print_dots "Checking remote build: ${remotelocation}" + # Checks if remotebuildversion variable has been set. + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + fn_print_fail "Checking remote build: ${remotelocation}" + fn_script_log_fatal "Checking remote build" + core_exit.sh + else + fn_print_ok "Checking remote build: ${remotelocation}" + fn_script_log_pass "Checking remote build" + fi + else + # Checks if remotebuild variable has been set. + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + fn_print_failure "Unable to get remote build" + fn_script_log_fatal "Unable to get remote build" + core_exit.sh + fi + fi +} + +fn_update_compare() { + fn_print_dots "Checking for update: ${remotelocation}" + if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "Update available" + echo -e "* Local build: ${red}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi + echo -en "\n" + fn_script_log_info "Update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + fn_script_log_info "${localbuild} > ${remotebuildversion}" + + if [ "${commandname}" == "UPDATE" ]; then + unset updateonstart + check_status.sh + # If server stopped. + if [ "${status}" == "0" ]; then + fn_update_dl + if [ "${localbuild}" == "0" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + sleep 5 + command_stop.sh + fn_firstcommand_reset + fi + # If server started. + else + fn_print_restart_warning + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + exitbypass=1 + fn_update_dl + exitbypass=1 + command_start.sh + fn_firstcommand_reset + fi + unset exitbypass + date +%s > "${lockdir}/lastupdate.lock" + alert="update" + elif [ "${commandname}" == "CHECK-UPDATE" ]; then + alert="check-update" + fi + alert.sh + else + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "No update available" + echo -e "* Local build: ${green}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + echo -en "\n" + fn_script_log_info "No update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi + fi +} + +# Game server architecture. +info_distro.sh +if [ "${arch}" == "x86_64" ]; then + ts3arch="amd64" +elif [ "${arch}" == "i386" ] || [ "${arch}" == "i686" ]; then + ts3arch="x86" +else + fn_print_failure "Unknown or unsupported architecture: ${arch}" + fn_script_log_fatal "Unknown or unsupported architecture: ${arch}" + core_exit.sh +fi + +# The location where the builds are checked and downloaded. +remotelocation="teamspeak.com" + +if [ "${firstcommandname}" == "INSTALL" ]; then + fn_update_remotebuild + fn_update_dl +else + fn_print_dots "Checking for update" + fn_print_dots "Checking for update: ${remotelocation}" + fn_script_log_info "Checking for update: ${remotelocation}" + fn_update_localbuild + fn_update_remotebuild + fn_update_compare +fi diff --git a/lgsm/functions/update_ut99.sh b/lgsm/functions/update_ut99.sh new file mode 100644 index 000000000..045b29dbe --- /dev/null +++ b/lgsm/functions/update_ut99.sh @@ -0,0 +1,163 @@ +#!/bin/bash +# LinuxGSM command_ut99.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Handles updating of Unreal Tournament 99 servers. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +fn_update_dl() { + # Download and extract files to serverfiles. + fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "nohash" + fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}" + echo "${remotebuildversion}" > "${serverfiles}/build.txt" + fn_clear_tmp +} + +fn_update_localbuild() { + # Gets local build info. + fn_print_dots "Checking local build: ${remotelocation}" + # Uses build file to get local build. + localbuild=$(head -n 1 "${serverfiles}/build.txt" 2> /dev/null) + if [ -z "${localbuild}" ]; then + fn_print_error "Checking local build: ${remotelocation}: missing local build info" + fn_script_log_error "Missing local build info" + fn_script_log_error "Set localbuild to 0" + localbuild="0" + else + fn_print_ok "Checking local build: ${remotelocation}" + fn_script_log_pass "Checking local build" + fi +} + +fn_update_remotebuild() { + # Get 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') + remotebuildurl=$(echo "${remotebuildresponse}" | jq -r '.assets[]|select(.browser_download_url | contains("Linux-amd64")) | .browser_download_url') + remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '.tag_name') + + if [ "${firstcommandname}" != "INSTALL" ]; then + fn_print_dots "Checking remote build: ${remotelocation}" + # Checks if remotebuildversion variable has been set. + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + fn_print_fail "Checking remote build: ${remotelocation}" + fn_script_log_fatal "Checking remote build" + core_exit.sh + else + fn_print_ok "Checking remote build: ${remotelocation}" + fn_script_log_pass "Checking remote build" + fi + else + # Checks if remotebuild variable has been set. + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + fn_print_failure "Unable to get remote build" + fn_script_log_fatal "Unable to get remote build" + core_exit.sh + fi + fi +} + +fn_update_compare() { + fn_print_dots "Checking for update: ${remotelocation}" + if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "Update available" + echo -e "* Local build: ${red}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi + echo -en "\n" + fn_script_log_info "Update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + fn_script_log_info "${localbuild} > ${remotebuildversion}" + + if [ "${commandname}" == "UPDATE" ]; then + unset updateonstart + check_status.sh + # If server stopped. + if [ "${status}" == "0" ]; then + fn_update_dl + if [ "${localbuild}" == "0" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + sleep 5 + command_stop.sh + fn_firstcommand_reset + fi + # If server started. + else + fn_print_restart_warning + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + exitbypass=1 + fn_update_dl + exitbypass=1 + command_start.sh + fn_firstcommand_reset + fi + unset exitbypass + date +%s > "${lockdir}/lastupdate.lock" + alert="update" + elif [ "${commandname}" == "CHECK-UPDATE" ]; then + alert="check-update" + fi + alert.sh + else + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "No update available" + echo -e "* Local build: ${green}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + echo -en "\n" + fn_script_log_info "No update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi + fi +} + +# The location where the builds are checked and downloaded. +remotelocation="github.com" + +if [ "${firstcommandname}" == "INSTALL" ]; then + fn_update_remotebuild + fn_update_dl +else + fn_print_dots "Checking for update" + fn_print_dots "Checking for update: ${remotelocation}" + fn_script_log_info "Checking for update: ${remotelocation}" + fn_update_localbuild + fn_update_remotebuild + fn_update_compare +fi diff --git a/lgsm/functions/update_vintagestory.sh b/lgsm/functions/update_vintagestory.sh new file mode 100644 index 000000000..7307a4b77 --- /dev/null +++ b/lgsm/functions/update_vintagestory.sh @@ -0,0 +1,170 @@ +#!/bin/bash +# LinuxGSM update_vintagestory.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Handles updating of Vintage Story servers. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +fn_update_dl() { + # Download and extract files to serverfiles. + fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "${remotebuildhash}" + fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}" + fn_clear_tmp +} + +fn_update_localbuild() { + # Gets local build info. + fn_print_dots "Checking local build: ${remotelocation}" + # Uses executable to get local build. + if [ -d "${executabledir}" ]; then + cd "${executabledir}" || exit + localbuild="$(${preexecutable} ${executable} --version | sed '/^[[:space:]]*$/d')" + fi + if [ -z "${localbuild}" ]; then + fn_print_error "Checking local build: ${remotelocation}: missing local build info" + fn_script_log_error "Missing local build info" + fn_script_log_error "Set localbuild to 0" + localbuild="0" + else + fn_print_ok "Checking local build: ${remotelocation}" + fn_script_log_pass "Checking local build" + fi +} + +fn_update_remotebuild() { + # Get 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 + remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '[ to_entries[] ] | .[].key' | grep -E "\-rc|\-pre" | sort -r -V | head -1) + fi + remotebuildfilename=$(echo "${remotebuildresponse}" | jq --arg remotebuildversion "${remotebuildversion}" -r '.[$remotebuildversion].server.filename') + remotebuildurl=$(echo "${remotebuildresponse}" | jq --arg remotebuildversion "${remotebuildversion}" -r '.[$remotebuildversion].server.urls.cdn') + remotebuildhash=$(echo "${remotebuildresponse}" | jq --arg remotebuildversion "${remotebuildversion}" -r '.[$remotebuildversion].server.md5') + + if [ "${firstcommandname}" != "INSTALL" ]; then + fn_print_dots "Checking remote build: ${remotelocation}" + # Checks if remotebuildversion variable has been set. + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + fn_print_fail "Checking remote build: ${remotelocation}" + fn_script_log_fatal "Checking remote build" + core_exit.sh + else + fn_print_ok "Checking remote build: ${remotelocation}" + fn_script_log_pass "Checking remote build" + fi + else + # Checks if remotebuild variable has been set. + if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then + fn_print_failure "Unable to get remote build" + fn_script_log_fatal "Unable to get remote build" + core_exit.sh + fi + fi +} + +fn_update_compare() { + fn_print_dots "Checking for update: ${remotelocation}" + if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "Update available" + echo -e "* Local build: ${red}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi + echo -en "\n" + fn_script_log_info "Update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + fn_script_log_info "${localbuild} > ${remotebuildversion}" + + if [ "${commandname}" == "UPDATE" ]; then + unset updateonstart + check_status.sh + # If server stopped. + if [ "${status}" == "0" ]; then + fn_update_dl + if [ "${localbuild}" == "0" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + sleep 5 + command_stop.sh + fn_firstcommand_reset + fi + # If server started. + else + fn_print_restart_warning + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + exitbypass=1 + fn_update_dl + exitbypass=1 + command_start.sh + fn_firstcommand_reset + fi + unset exitbypass + date +%s > "${lockdir}/lastupdate.lock" + alert="update" + elif [ "${commandname}" == "CHECK-UPDATE" ]; then + alert="check-update" + fi + alert.sh + else + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "No update available" + echo -e "* Local build: ${green}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuildversion}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + echo -en "\n" + fn_script_log_info "No update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuildversion}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + echo -e "Remote build info" + echo -e "* apiurl: ${apiurl}" + echo -e "* remotebuildfilename: ${remotebuildfilename}" + echo -e "* remotebuildurl: ${remotebuildurl}" + echo -e "* remotebuildversion: ${remotebuildversion}" + fi + fi +} + +# The location where the builds are checked and downloaded. +remotelocation="vintagestory.at" + +if [ "${firstcommandname}" == "INSTALL" ]; then + fn_update_remotebuild + fn_update_dl +else + fn_print_dots "Checking for update" + fn_print_dots "Checking for update: ${remotelocation}" + fn_script_log_info "Checking for update: ${remotelocation}" + fn_update_localbuild + fn_update_remotebuild + fn_update_compare +fi From f9a5ed089ab688edd2ff20a5bad267cb42b68ec5 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 18 May 2023 21:10:43 +0100 Subject: [PATCH 143/374] fix: revert modules in functions dir to v23.2.3 --- lgsm/functions/check_logs.sh | 2 +- lgsm/functions/check_root.sh | 2 +- lgsm/functions/command_update_linuxgsm.sh | 48 ++-- lgsm/functions/core_dl.sh | 110 ++++---- lgsm/functions/core_exit.sh | 18 +- lgsm/functions/core_functions.sh | 294 +++++++++++----------- lgsm/functions/core_getopt.sh | 14 +- lgsm/functions/core_github.sh | 6 +- lgsm/functions/core_legacy.sh | 11 +- lgsm/functions/core_logs.sh | 2 +- lgsm/functions/core_messages.sh | 2 +- lgsm/functions/core_steamcmd.sh | 4 +- lgsm/functions/core_trap.sh | 2 +- 13 files changed, 252 insertions(+), 263 deletions(-) diff --git a/lgsm/functions/check_logs.sh b/lgsm/functions/check_logs.sh index 2087ac915..fa3df92d1 100644 --- a/lgsm/functions/check_logs.sh +++ b/lgsm/functions/check_logs.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Checks if log files exist. -moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_check_logs() { fn_print_dots "Checking for log files" diff --git a/lgsm/functions/check_root.sh b/lgsm/functions/check_root.sh index 26475601a..dab033148 100644 --- a/lgsm/functions/check_root.sh +++ b/lgsm/functions/check_root.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Checks if the user tried to run the script as root. -moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ "$(whoami)" == "root" ] && [ ! -f /.dockerenv ]; then if [ "${commandname}" != "INSTALL" ]; then diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh index 3c4e6d080..569bc7cdb 100644 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -3,11 +3,11 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Deletes the modules dir to allow re-downloading of modules from GitHub. +# Description: Deletes the functions dir to allow re-downloading of functions from GitHub. commandname="UPDATE-LGSM" commandaction="Updating LinuxGSM" -moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set check.sh @@ -180,49 +180,49 @@ if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then fi fi # Check and update modules. -if [ -n "${modulesdir}" ]; then - if [ -d "${modulesdir}" ]; then +if [ -n "${functionsdir}" ]; then + if [ -d "${functionsdir}" ]; then ( - cd "${modulesdir}" || exit - for modulefile in *; do + cd "${functionsdir}" || exit + for functionfile in *; do # check if module exists in the repo and remove if missing. # commonly used if module names change. - echo -en "checking ${remotereponame} module ${modulefile}...\c" - github_file_url_dir="lgsm/modules" + echo -en "checking ${remotereponame} module ${functionfile}...\c" + github_file_url_dir="lgsm/functions" if [ "${remotereponame}" == "GitHub" ]; then - curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${modulefile}" 1> /dev/null + curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}" 1> /dev/null else - curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${modulefile}" 1> /dev/null + curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${functionfile}" 1> /dev/null fi if [ $? != 0 ]; then fn_print_error_eol_nl - fn_script_log_error "Checking ${remotereponame} module ${modulefile}" - echo -en "removing module ${modulefile}...\c" - if ! rm -f "${modulefile:?}"; then + fn_script_log_error "Checking ${remotereponame} module ${functionfile}" + echo -en "removing module ${functionfile}...\c" + if ! rm -f "${functionfile:?}"; then fn_print_fail_eol_nl - fn_script_log_fatal "Removing module ${modulefile}" + fn_script_log_fatal "Removing module ${functionfile}" core_exit.sh else fn_print_ok_eol_nl - fn_script_log_pass "Removing module ${modulefile}" + fn_script_log_pass "Removing module ${functionfile}" fi else # compare file if [ "${remotereponame}" == "GitHub" ]; then - module_file_diff=$(diff "${modulesdir}/${modulefile}" <(curl --connect-timeout 10 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${modulefile}")) + function_file_diff=$(diff "${functionsdir}/${functionfile}" <(curl --connect-timeout 10 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}")) else - module_file_diff=$(diff "${modulesdir}/${modulefile}" <(curl --connect-timeout 10 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${modulefile}")) + function_file_diff=$(diff "${functionsdir}/${functionfile}" <(curl --connect-timeout 10 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${functionfile}")) fi # results - if [ "${module_file_diff}" != "" ]; then + if [ "${function_file_diff}" != "" ]; then fn_print_update_eol_nl - fn_script_log_update "Checking ${remotereponame} module ${modulefile}" - rm -rf "${modulesdir:?}/${modulefile}" - fn_update_module + fn_script_log_update "Checking ${remotereponame} module ${functionfile}" + rm -rf "${functionsdir:?}/${functionfile}" + fn_update_function else fn_print_ok_eol_nl - fn_script_log_pass "Checking ${remotereponame} module ${modulefile}" + fn_script_log_pass "Checking ${remotereponame} module ${functionfile}" fi fi done @@ -230,7 +230,7 @@ if [ -n "${modulesdir}" ]; then fi fi -fn_print_ok_nl "Updating modules" -fn_script_log_pass "Updating modules" +fn_print_ok_nl "Updating functions" +fn_script_log_pass "Updating functions" core_exit.sh diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index 405e9dc6b..53a60cc1a 100644 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -17,7 +17,7 @@ # fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}" # fn_fetch_file "http://example.com/file.tar.bz2" "http://example.com/file2.tar.bz2" "file.tar.bz2" "file2.tar.bz2" "/some/dir" "file.tar.bz2" "chmodx" "run" "forcedl" "10cd7353aa9d758a075c600a6dd193fd" -moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_dl_steamcmd() { fn_print_start_nl "${remotelocation}" @@ -453,13 +453,11 @@ fn_fetch_file() { fi } -# GitHub file download modules. +# GitHub file download functions. # Used to simplify downloading specific files from GitHub. -# github_file_url_dir: the directory of the file in the GitHub: lgsm/modules -# github_file_url_name: the filename of the file to download from GitHub: core_messages.sh -# github_file_url_dir: the directory of the file in the GitHub: lgsm/modules -# github_file_url_name: the filename of the file to download from GitHub: core_messages.sh +# github_fileurl_dir: the directory of the file in the GitHub: lgsm/functions +# github_fileurl_name: the filename of the file to download from GitHub: core_messages.sh # githuburl: the full GitHub url # remote_fileurl: The URL of the file: http://example.com/dl/File.tar.bz2 @@ -472,58 +470,58 @@ fn_fetch_file() { # Fetches files from the Git repo. fn_fetch_file_github() { - github_file_url_dir="${1}" - github_file_url_name="${2}" + github_fileurl_dir="${1}" + github_fileurl_name="${2}" # For legacy versions - code can be removed at a future date if [ "${legacymode}" == "1" ]; then - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. - elif [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" + elif [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}" else - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" fi remote_fileurl_name="GitHub" remote_fileurl_backup_name="Bitbucket" local_filedir="${3}" - local_filename="${github_file_url_name}" + local_filename="${github_fileurl_name}" chmodx="${4:-0}" run="${5:-0}" forcedl="${6:-0}" hash="${7:-0}" - # Passes vars to the file download module. + # Passes vars to the file download function. fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}" } fn_check_file_github() { - github_file_url_dir="${1}" - github_file_url_name="${2}" - if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" + github_fileurl_dir="${1}" + github_fileurl_name="${2}" + if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}" else - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" fi remote_fileurl_name="GitHub" remote_fileurl_backup_name="Bitbucket" - fn_check_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${github_file_url_name}" + fn_check_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${github_fileurl_name}" } # Fetches config files from the Git repo. fn_fetch_config() { - github_file_url_dir="${1}" - github_file_url_name="${2}" + github_fileurl_dir="${1}" + github_fileurl_name="${2}" # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. - if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" + if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}" else - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" fi remote_fileurl_name="GitHub" remote_fileurl_backup_name="Bitbucket" @@ -533,55 +531,55 @@ fn_fetch_config() { run="norun" forcedl="noforce" hash="nohash" - # Passes vars to the file download module. + # Passes vars to the file download function. fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}" } # Fetches modules from the Git repo during first download. -fn_fetch_module() { - github_file_url_dir="lgsm/modules" - github_file_url_name="${modulefile}" +fn_fetch_function() { + github_fileurl_dir="lgsm/functions" + github_fileurl_name="${functionfile}" # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. - if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" + if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}" else - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" fi remote_fileurl_name="GitHub" remote_fileurl_backup_name="Bitbucket" - local_filedir="${modulesdir}" - local_filename="${github_file_url_name}" + local_filedir="${functionsdir}" + local_filename="${github_fileurl_name}" chmodx="chmodx" run="run" forcedl="noforce" hash="nohash" - # Passes vars to the file download module. + # Passes vars to the file download function. fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}" } # Fetches modules from the Git repo during update-lgsm. -fn_update_module() { - github_file_url_dir="lgsm/modules" - github_file_url_name="${modulefile}" +fn_update_function() { + github_fileurl_dir="lgsm/functions" + github_fileurl_name="${functionfile}" # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. - if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" + if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}" else - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" fi remote_fileurl_name="GitHub" remote_fileurl_backup_name="Bitbucket" - local_filedir="${modulesdir}" - local_filename="${github_file_url_name}" + local_filedir="${functionsdir}" + local_filename="${github_fileurl_name}" chmodx="chmodx" run="norun" forcedl="noforce" hash="nohash" - # Passes vars to the file download module. + # Passes vars to the file download function. fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}" } @@ -620,7 +618,7 @@ fn_dl_latest_release_github() { fn_print_fail_nl "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" fn_script_log_fatal "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" else - # Fetch file from the remote location from the existing module to the ${tmpdir} for now. + # Fetch file from the remote location from the existing function to the ${tmpdir} for now. fn_fetch_file "${githubreleasedownloadlink}" "" "${githubreleasefilename}" "" "${githubreleasedownloadpath}" "${githubreleasefilename}" fi fi diff --git a/lgsm/functions/core_exit.sh b/lgsm/functions/core_exit.sh index a8686c2a8..95d9d8cae 100644 --- a/lgsm/functions/core_exit.sh +++ b/lgsm/functions/core_exit.sh @@ -5,14 +5,14 @@ # Website: https://linuxgsm.com # Description: Handles exiting of LinuxGSM by running and reporting an exit code. -moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_exit_dev_debug() { if [ -f "${rootdir}/.dev-debug" ]; then echo -e "" - echo -e "${moduleselfname} exiting with code: ${exitcode}" + echo -e "${functionselfname} exiting with code: ${exitcode}" if [ -f "${rootdir}/dev-debug.log" ]; then - grep "modulefile=" "${rootdir}/dev-debug.log" | sed 's/modulefile=//g' > "${rootdir}/dev-debug-module-order.log" + grep "functionfile=" "${rootdir}/dev-debug.log" | sed 's/functionfile=//g' > "${rootdir}/dev-debug-function-order.log" fi fi } @@ -29,13 +29,13 @@ elif [ "${exitcode}" != "0" ]; then # List LinuxGSM version in logs fn_script_log_info "LinuxGSM version: ${version}" if [ "${exitcode}" == "1" ]; then - fn_script_log_fatal "${moduleselfname} exiting with code: ${exitcode}" + fn_script_log_fatal "${functionselfname} exiting with code: ${exitcode}" elif [ "${exitcode}" == "2" ]; then - fn_script_log_error "${moduleselfname} exiting with code: ${exitcode}" + fn_script_log_error "${functionselfname} exiting with code: ${exitcode}" elif [ "${exitcode}" == "3" ]; then - fn_script_log_warn "${moduleselfname} exiting with code: ${exitcode}" + fn_script_log_warn "${functionselfname} exiting with code: ${exitcode}" else - fn_script_log_warn "${moduleselfname} exiting with code: ${exitcode}" + fn_script_log_warn "${functionselfname} exiting with code: ${exitcode}" fi fn_exit_dev_debug # remove trap. @@ -44,7 +44,7 @@ elif [ "${exitcode}" != "0" ]; then elif [ "${exitcode}" ] && [ "${exitcode}" == "0" ]; then # List LinuxGSM version in logs fn_script_log_info "LinuxGSM version: ${version}" - fn_script_log_pass "${moduleselfname} exiting with code: ${exitcode}" + fn_script_log_pass "${functionselfname} exiting with code: ${exitcode}" fn_exit_dev_debug # remove trap. trap - INT @@ -53,7 +53,7 @@ else # List LinuxGSM version in logs fn_script_log_info "LinuxGSM version: ${version}" fn_print_error "No exit code set" - fn_script_log_pass "${moduleselfname} exiting with code: NOT SET" + fn_script_log_pass "${functionselfname} exiting with code: NOT SET" fn_exit_dev_debug # remove trap. trap - INT diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index cc054c129..b301b7e46 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -6,7 +6,7 @@ # Description: Defines all functions to allow download and execution of functions using fn_fetch_function. # This function is called first before any other function. Without this file other functions will not load. -module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" modulesversion="v23.2.3" @@ -41,653 +41,653 @@ core_legacy.sh() { core_exit.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } core_getopt.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } core_trap.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } core_steamcmd.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } core_github.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } # Commands command_backup.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } command_console.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } command_debug.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } command_details.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } -command_sponsor.sh() { +command_donate.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } command_postdetails.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } command_test_alert.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } command_monitor.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } command_start.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } command_stop.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } command_validate.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } command_install.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } command_install_resources_mta.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } install_squad_license.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } command_mods_install.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } command_mods_update.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } command_mods_remove.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } command_fastdl.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } command_ts3_server_pass.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } command_restart.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } command_skeleton.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } command_wipe.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } command_send.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } # Checks check.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } check_config.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } check_deps.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } check_executable.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } check_glibc.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } check_ip.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } check_last_update.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } check_logs.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } check_permissions.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } check_root.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } check_status.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } check_steamcmd.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } check_system_dir.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } check_system_requirements.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } check_tmuxception.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } check_version.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } # Compress compress_unreal2_maps.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } compress_ut99_maps.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } # Mods mods_list.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } mods_core.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } # Dev command_dev_clear_functions.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } command_dev_debug.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } command_dev_detect_deps.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } command_dev_detect_glibc.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } command_dev_detect_ldd.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } command_dev_query_raw.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } # Fix fix.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_ark.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_av.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_arma3.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_armar.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_bt.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_bo.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_cmw.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_csgo.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_dst.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_hw.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_ins.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_kf.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_kf2.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_lo.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_mcb.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_mta.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_nmrih.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_onset.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_ro.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_rust.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_rw.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_sfc.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_st.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_steamcmd.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_terraria.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_tf2.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_ut3.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_rust.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_samp.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_sdtd.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_sof2.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_squad.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_ts3.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_ut2k4.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_ut.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_unt.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_vh.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_wurm.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fix_zmr.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } # Info info_distro.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } info_game.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } info_messages.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } info_stats.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } # Alert alert.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } alert_discord.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } alert_email.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } alert_ifttt.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } alert_mailgun.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } alert_pushbullet.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } alert_pushover.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } alert_gotify.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } alert_telegram.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } alert_rocketchat.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } alert_slack.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } # Logs core_logs.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } # Query query_gamedig.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } # Update command_update_functions.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } command_update_linuxgsm.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } command_update.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } command_check_update.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } update_ts3.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } update_minecraft.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } update_minecraft_bedrock.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } update_papermc.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } update_mta.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } update_factorio.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } update_jediknight2.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } update_steamcmd.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } update_vintagestory.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } update_ut99.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } fn_update_functions.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } # @@ -701,96 +701,96 @@ fn_autoinstall() { install_complete.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } install_config.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } install_factorio_save.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } install_dst_token.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } install_eula.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } install_gsquery.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } install_gslt.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } install_header.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } install_logs.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } install_retry.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } install_server_dir.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } install_server_files.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } install_stats.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } install_steamcmd.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } install_ts3.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } install_ts3db.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } install_ut2k4.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } install_dl_ut2k4.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } install_ut2k4_key.sh() { functionfile="${FUNCNAME[0]}" - fn_fetch_module + fn_fetch_function } # Calls code required for legacy servers diff --git a/lgsm/functions/core_getopt.sh b/lgsm/functions/core_getopt.sh index 222ad0cf8..808fe2e2a 100644 --- a/lgsm/functions/core_getopt.sh +++ b/lgsm/functions/core_getopt.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: getopt arguments. -moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" ### Define all commands here. ## User commands | Trigger commands | Description @@ -18,11 +18,11 @@ cmd_restart=("r;restart" "command_restart.sh" "Restart the server.") cmd_details=("dt;details" "command_details.sh" "Display server information.") cmd_postdetails=("pd;postdetails" "command_postdetails.sh" "Post details to termbin.com (removing passwords).") cmd_backup=("b;backup" "command_backup.sh" "Create backup archives of the server.") -cmd_update_linuxgsm=("ul;update-lgsm;uf;update-modules" "command_update_linuxgsm.sh" "Check and apply any LinuxGSM updates.") +cmd_update_linuxgsm=("ul;update-lgsm;uf;update-functions" "command_update_linuxgsm.sh" "Check and apply any LinuxGSM updates.") cmd_test_alert=("ta;test-alert" "command_test_alert.sh" "Send a test alert.") cmd_monitor=("m;monitor" "command_monitor.sh" "Check server status and restart if crashed.") cmd_skeleton=("sk;skeleton" "command_skeleton.sh" "Create a skeleton directory.") -cmd_sponso=("s;sponsor" "command_sponsor.sh" "Donation options.") +cmd_donate=("do;donate" "command_donate.sh" "Donation options.") cmd_send=("sd;send" "command_send.sh" "Send command to game server console.") # Console servers only. cmd_console=("c;console" "command_console.sh" "Access server console.") @@ -54,7 +54,7 @@ cmd_dev_detect_deps=("dd;detect-deps" "command_dev_detect_deps.sh" "Detect requi cmd_dev_detect_glibc=("dg;detect-glibc" "command_dev_detect_glibc.sh" "Detect required glibc.") cmd_dev_detect_ldd=("dl;detect-ldd" "command_dev_detect_ldd.sh" "Detect required dynamic dependencies.") cmd_dev_query_raw=("qr;query-raw" "command_dev_query_raw.sh" "The raw output of gamedig and gsquery.") -cmd_dev_clear_modules=("cf;clear-modules" "command_dev_clear_modules.sh" "Delete the contents of the modules dir.") +cmd_dev_clear_functions=("cf;clear-functions" "command_dev_clear_functions.sh" "Delete the contents of the functions dir.") ### Set specific opt here. @@ -145,11 +145,11 @@ currentopt+=("${cmd_install[@]}" "${cmd_auto_install[@]}") ## Developer commands. currentopt+=("${cmd_dev_debug[@]}") if [ -f ".dev-debug" ]; then - currentopt+=("${cmd_dev_detect_deps[@]}" "${cmd_dev_detect_glibc[@]}" "${cmd_dev_detect_ldd[@]}" "${cmd_dev_query_raw[@]}" "${cmd_dev_clear_modules[@]}") + currentopt+=("${cmd_dev_detect_deps[@]}" "${cmd_dev_detect_glibc[@]}" "${cmd_dev_detect_ldd[@]}" "${cmd_dev_query_raw[@]}" "${cmd_dev_clear_functions[@]}") fi -## Sponsor. -currentopt+=("${cmd_sponsor[@]}") +## Donate. +currentopt+=("${cmd_donate[@]}") ### Build list of available commands. optcommands=() diff --git a/lgsm/functions/core_github.sh b/lgsm/functions/core_github.sh index 228fe1078..0462e65bf 100644 --- a/lgsm/functions/core_github.sh +++ b/lgsm/functions/core_github.sh @@ -1,11 +1,11 @@ #!/bin/bash -# LinuxGSM core_github.sh module +# LinuxGSM core_github.sh function # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: core module file for updates via github +# Description: core function file for updates via github -moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" github_api="https://api.github.com" diff --git a/lgsm/functions/core_legacy.sh b/lgsm/functions/core_legacy.sh index 2ed942abd..f9aa51455 100644 --- a/lgsm/functions/core_legacy.sh +++ b/lgsm/functions/core_legacy.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Code for backwards compatability with older versions of LinuxGSM. -moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # This is to help the transition to v20.3.0 and above legacy_versions_array=(v20.2.1 v20.2.0 v20.1.5 v20.1.4 v20.1.3 v20.1.2 v20.1.1 v20.1.0 v19.12.5 v19.12.4 v19.12.3 v19.12.2 v19.12.1 v19.12.0) @@ -78,15 +78,6 @@ if [ -z "${wsstartmap}" ]; then fi fi -# Added as part of migrating functions dir to modules dir. -# Will remove functions dir if files in modules dir older than 14 days -functionsdir="${lgsmdir}/modules" -if [ -d "${lgsmdir}/functions" ]; then - if [ "$(find "${lgsmdir}/modules"/ -type f -mtime +"14" | wc -l)" -ne "0" ]; then - rm -rf "${lgsmdir:?}/functions" - fi -fi - fn_parms() { fn_reload_startparameters parms="${startparameters}" diff --git a/lgsm/functions/core_logs.sh b/lgsm/functions/core_logs.sh index 8057f30f7..1f0e27540 100644 --- a/lgsm/functions/core_logs.sh +++ b/lgsm/functions/core_logs.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Acts as a log rotator, removing old logs. -moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Check if logfile variable and file exist, create logfile if it doesn't exist. if [ "${consolelog}" ]; then diff --git a/lgsm/functions/core_messages.sh b/lgsm/functions/core_messages.sh index 6d3ca9a25..5362dd3d3 100644 --- a/lgsm/functions/core_messages.sh +++ b/lgsm/functions/core_messages.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Defines on-screen messages such as [ OK ] and how script logs look. -moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # nl: new line: message is following by a new line. # eol: end of line: message is placed at the end of the current line. diff --git a/lgsm/functions/core_steamcmd.sh b/lgsm/functions/core_steamcmd.sh index 78c30f60a..119748fb7 100644 --- a/lgsm/functions/core_steamcmd.sh +++ b/lgsm/functions/core_steamcmd.sh @@ -3,9 +3,9 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Core modules for SteamCMD +# Description: Core functions for SteamCMD -moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_install_steamcmd() { if [ "${shortname}" == "ark" ] && [ "${installsteamcmd}" == "1" ]; then diff --git a/lgsm/functions/core_trap.sh b/lgsm/functions/core_trap.sh index ea6fce869..ae2b79470 100644 --- a/lgsm/functions/core_trap.sh +++ b/lgsm/functions/core_trap.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Handles CTRL-C trap to give an exit code. -moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_exit_trap() { if [ -z "${exitcode}" ]; then From 03365ca5a747844335635623a94c6002388562a7 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 19 May 2023 18:58:48 +0100 Subject: [PATCH 144/374] feat: serverlist validate (#4207) * server list validate * dir * dir * dir * cr * add missing pc2 * pc2 * fix branch * exit code * repo * branch * fix csv * letter * tidy * codacy * exit code --- .github/workflows/details-check.yml | 10 +++++----- .github/workflows/serverlist-validate.sh | 22 ++++++++++++++++++++++ .github/workflows/serverlist-validate.yml | 13 +++++++++++++ .github/workflows/version-check.yml | 13 +------------ lgsm/data/almalinux-8.csv | 1 + lgsm/data/almalinux-9.csv | 1 + lgsm/data/centos-7.csv | 1 + lgsm/data/centos-8.csv | 1 + lgsm/data/centos-9.csv | 1 + lgsm/data/debian-10.csv | 1 + lgsm/data/debian-11.csv | 1 + lgsm/data/debian-12.csv | 1 + lgsm/data/debian-9.csv | 1 + lgsm/data/rhel-7.csv | 1 + lgsm/data/rhel-8.csv | 1 + lgsm/data/rhel-9.csv | 1 + lgsm/data/rocky-8.csv | 1 + lgsm/data/rocky-9.csv | 1 + lgsm/data/serverlist.csv | 1 - lgsm/data/ubuntu-16.04.csv | 1 + lgsm/data/ubuntu-18.04.csv | 1 + lgsm/data/ubuntu-20.04.csv | 1 + lgsm/data/ubuntu-21.04.csv | 1 + lgsm/data/ubuntu-21.10.csv | 5 ++++- lgsm/data/ubuntu-22.04.csv | 1 + 25 files changed, 64 insertions(+), 19 deletions(-) create mode 100755 .github/workflows/serverlist-validate.sh create mode 100644 .github/workflows/serverlist-validate.yml diff --git a/.github/workflows/details-check.yml b/.github/workflows/details-check.yml index 0d1327682..b268bd03d 100644 --- a/.github/workflows/details-check.yml +++ b/.github/workflows/details-check.yml @@ -35,13 +35,13 @@ jobs: run: sudo apt-get install libxml2-utils jq - name: Download linuxgsm.sh - run: wget https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/feature/info_game-refactor/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: Grab server - run: LGSM_GITHUBBRANCH="feature/info_game-refactor" ./linuxgsm.sh ${{ matrix.shortname }}server + run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./linuxgsm.sh ${{ matrix.shortname }}server - name: Enable developer mode - run: LGSM_GITHUBBRANCH="feature/info_game-refactor" ./${{ matrix.shortname }}server developer + run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server developer - id: sets-servercfgname name: Generate servercfgname @@ -68,7 +68,7 @@ jobs: run: grep "startparameters" lgsm/config-default/config-lgsm/${{ matrix.shortname }}server/_default.cfg - name: Detect details - run: LGSM_GITHUBBRANCH="feature/info_game-refactor" ./${{ matrix.shortname }}server detect-details + run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server detect-details - name: Query Raw - run: LGSM_GITHUBBRANCH="feature/info_game-refactor" ./${{ matrix.shortname }}server query-raw + run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server query-raw diff --git a/.github/workflows/serverlist-validate.sh b/.github/workflows/serverlist-validate.sh new file mode 100755 index 000000000..b43e803e0 --- /dev/null +++ b/.github/workflows/serverlist-validate.sh @@ -0,0 +1,22 @@ +#!/bin/bash +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 "lgsm/data" || exit +serverlistcount="$(wc -l < serverlist.csv)" +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$')" +# loop though each csv file and make sure the number of lines is the same as the serverlistcount +for csv in $csvlist; do + csvcount="$(wc -l < "${csv}")" + csvcount=$((csvcount-2)) + if [ "$csvcount" -ne "$serverlistcount" ]; then + echo "ERROR: $csv ($csvcount) does not match serverlist.csv ($serverlistcount)" + exitcode=1 + else + echo "OK: $csv ($csvcount) and serverlist.csv ($serverlistcount) match" + fi +done + +exit ${exitcode} diff --git a/.github/workflows/serverlist-validate.yml b/.github/workflows/serverlist-validate.yml new file mode 100644 index 000000000..e12c0e95c --- /dev/null +++ b/.github/workflows/serverlist-validate.yml @@ -0,0 +1,13 @@ +name: Server list Validation +on: + workflow_dispatch: + push: + +jobs: + serverlist-validate: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: compare versions + run: chmod +x .github/workflows/serverlist-validate.sh; .github/workflows/serverlist-validate.sh diff --git a/.github/workflows/version-check.yml b/.github/workflows/version-check.yml index b2aac2f87..a12b34420 100644 --- a/.github/workflows/version-check.yml +++ b/.github/workflows/version-check.yml @@ -1,26 +1,15 @@ -# This is a basic workflow to help you get started with Actions - name: Version Check -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch on: push -# A workflow run is made up of one or more jobs that can run sequentially or in parallel permissions: contents: read jobs: - # This workflow contains a single job called "build" - Version-Check: - # The type of runner that the job will run on + version-Check: runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3 - # Runs a single command using the runners shell - name: compare versions run: chmod +x .github/workflows/version-check.sh; .github/workflows/version-check.sh diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index 8d4b45216..eb72d965e 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -78,6 +78,7 @@ ns2c,speex.i686,tbb.i686 onset,mariadb-connector-c opfor pc +pc2 pmc,java-17-openjdk pstbs,GConf2 pvkii diff --git a/lgsm/data/almalinux-9.csv b/lgsm/data/almalinux-9.csv index 8d4b45216..eb72d965e 100644 --- a/lgsm/data/almalinux-9.csv +++ b/lgsm/data/almalinux-9.csv @@ -78,6 +78,7 @@ ns2c,speex.i686,tbb.i686 onset,mariadb-connector-c opfor pc +pc2 pmc,java-17-openjdk pstbs,GConf2 pvkii diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index 0769c4ef8..cd537127e 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -78,6 +78,7 @@ ns2c,speex.i686,tbb.i686 onset,mariadb-connector-c opfor pc +pc2 pmc,java-11-openjdk pstbs,GConf2 pvkii diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index 8d4b45216..eb72d965e 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -78,6 +78,7 @@ ns2c,speex.i686,tbb.i686 onset,mariadb-connector-c opfor pc +pc2 pmc,java-17-openjdk pstbs,GConf2 pvkii diff --git a/lgsm/data/centos-9.csv b/lgsm/data/centos-9.csv index 8d4b45216..eb72d965e 100644 --- a/lgsm/data/centos-9.csv +++ b/lgsm/data/centos-9.csv @@ -78,6 +78,7 @@ ns2c,speex.i686,tbb.i686 onset,mariadb-connector-c opfor pc +pc2 pmc,java-17-openjdk pstbs,GConf2 pvkii diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index 7058cc97e..eca612229 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -78,6 +78,7 @@ ns2c,speex:i386,libtbb2 onset,libmariadb-dev opfor pc +pc2 pmc,openjdk-11-jre pstbs,libgconf-2-4 pvkii diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index ff8c8ae76..0eecc40fd 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -78,6 +78,7 @@ ns2c,speex:i386,libtbb2 onset,libmariadb-dev opfor pc +pc2 pmc,openjdk-17-jre pstbs,libgconf-2-4 pvkii diff --git a/lgsm/data/debian-12.csv b/lgsm/data/debian-12.csv index 3f3e0aed1..2bd92c32d 100644 --- a/lgsm/data/debian-12.csv +++ b/lgsm/data/debian-12.csv @@ -78,6 +78,7 @@ ns2c,speex:i386,libtbb12 onset,libmariadb-dev opfor pc +pc2 pmc,openjdk-17-jre pstbs,libgconf-2-4 pvkii diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index 507896a6a..8a4fd6df4 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -78,6 +78,7 @@ ns2c,speex:i386,libtbb2 onset,libmariadb-dev opfor pc +pc2 pmc,openjdk-8-jre pstbs,libgconf-2-4 pvkii diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index c0b3f7804..dbf578bb9 100644 --- a/lgsm/data/rhel-7.csv +++ b/lgsm/data/rhel-7.csv @@ -78,6 +78,7 @@ ns2c,speex.i686,tbb.i686 onset,mariadb-connector-c opfor pc +pc2 pmc,java-11-openjdk pstbs,GConf2 pvkii diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index 8d4b45216..eb72d965e 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -78,6 +78,7 @@ ns2c,speex.i686,tbb.i686 onset,mariadb-connector-c opfor pc +pc2 pmc,java-17-openjdk pstbs,GConf2 pvkii diff --git a/lgsm/data/rhel-9.csv b/lgsm/data/rhel-9.csv index 8d4b45216..eb72d965e 100644 --- a/lgsm/data/rhel-9.csv +++ b/lgsm/data/rhel-9.csv @@ -78,6 +78,7 @@ ns2c,speex.i686,tbb.i686 onset,mariadb-connector-c opfor pc +pc2 pmc,java-17-openjdk pstbs,GConf2 pvkii diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index 8d4b45216..eb72d965e 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -78,6 +78,7 @@ ns2c,speex.i686,tbb.i686 onset,mariadb-connector-c opfor pc +pc2 pmc,java-17-openjdk pstbs,GConf2 pvkii diff --git a/lgsm/data/rocky-9.csv b/lgsm/data/rocky-9.csv index 8d4b45216..eb72d965e 100644 --- a/lgsm/data/rocky-9.csv +++ b/lgsm/data/rocky-9.csv @@ -78,6 +78,7 @@ ns2c,speex.i686,tbb.i686 onset,mariadb-connector-c opfor pc +pc2 pmc,java-17-openjdk pstbs,GConf2 pvkii diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 2bce54086..60d0dc893 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -128,4 +128,3 @@ wmc,wmcserver,WaterfallMC,ubuntu-22.04 wurm,wurmserver,Wurm Unlimited,ubuntu-22.04 zmr,zmrserver,Zombie Master: Reborn,ubuntu-22.04 zps,zpsserver,Zombie Panic! Source,ubuntu-22.04 - diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index 2b152ffef..387a862d9 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -78,6 +78,7 @@ ns2c,speex:i386,libtbb2 onset,libmariadb-dev opfor pc +pc2 pmc,openjdk-8-jre pstbs,libgconf-2-4 pvkii diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index 7058cc97e..eca612229 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -78,6 +78,7 @@ ns2c,speex:i386,libtbb2 onset,libmariadb-dev opfor pc +pc2 pmc,openjdk-11-jre pstbs,libgconf-2-4 pvkii diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index 764812a71..a07d23a0b 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -78,6 +78,7 @@ ns2c,speex:i386,libtbb2 onset,libmariadb-dev opfor pc +pc2 pmc,openjdk-17-jre pstbs,libgconf-2-4 pvkii diff --git a/lgsm/data/ubuntu-21.04.csv b/lgsm/data/ubuntu-21.04.csv index ff8c8ae76..0eecc40fd 100644 --- a/lgsm/data/ubuntu-21.04.csv +++ b/lgsm/data/ubuntu-21.04.csv @@ -78,6 +78,7 @@ ns2c,speex:i386,libtbb2 onset,libmariadb-dev opfor pc +pc2 pmc,openjdk-17-jre pstbs,libgconf-2-4 pvkii diff --git a/lgsm/data/ubuntu-21.10.csv b/lgsm/data/ubuntu-21.10.csv index ca9576ca0..e1504baca 100644 --- a/lgsm/data/ubuntu-21.10.csv +++ b/lgsm/data/ubuntu-21.10.csv @@ -16,10 +16,11 @@ bfv,libncurses5:i386,libstdc++5:i386 bmdm,libncurses5:i386 bo bs -bt,libicu-dev +bt,libicu-dev,dos2unix btl cc ck,xvfb +cd cmw cod,libstdc++5:i386 cod2,libstdc++5:i386 @@ -32,6 +33,7 @@ cscz csgo css,libtinfo5:i386 dab +dayz dmc dod dodr @@ -76,6 +78,7 @@ ns2c,speex:i386,libtbb2 onset,libmariadb-dev opfor pc +pc2 pmc,openjdk-17-jre pstbs,libgconf-2-4 pvkii diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index 50886ad29..06190f47e 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -78,6 +78,7 @@ ns2c,speex:i386,libtbb2 onset,libmariadb-dev opfor pc +pc2 pmc,openjdk-17-jre pstbs,libgconf-2-4 pvkii From 1ca0b54e2ac012ef828017438ec52cf63467bdc3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 May 2023 22:52:32 +0100 Subject: [PATCH 145/374] build(deps): bump JasonEtco/is-sponsor-label-action from 1 to 2 (#4209) Bumps [JasonEtco/is-sponsor-label-action](https://github.com/JasonEtco/is-sponsor-label-action) from 1 to 2. - [Release notes](https://github.com/JasonEtco/is-sponsor-label-action/releases) - [Commits](https://github.com/JasonEtco/is-sponsor-label-action/compare/v1...v2) --- updated-dependencies: - dependency-name: JasonEtco/is-sponsor-label-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/label-sponsors.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/label-sponsors.yml b/.github/workflows/label-sponsors.yml index 8cf880da9..c16f66ff6 100644 --- a/.github/workflows/label-sponsors.yml +++ b/.github/workflows/label-sponsors.yml @@ -9,6 +9,6 @@ jobs: name: is-sponsor-label runs-on: ubuntu-latest steps: - - uses: JasonEtco/is-sponsor-label-action@v1 + - uses: JasonEtco/is-sponsor-label-action@v2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From b149b5a7ebc8a9a2807b795cb9d355fc6311a59a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 25 May 2023 12:30:50 +0100 Subject: [PATCH 146/374] feat(new server): HYPERCHARGE: Unboxed (#4163) --- .../config-lgsm/hcuserver/_default.cfg | 190 ++++++++++++++++++ lgsm/data/serverlist.csv | 1 + lgsm/functions/info_messages.sh | 2 + lgsm/modules/info_game.sh | 13 ++ lgsm/modules/info_messages.sh | 8 + 5 files changed, 214 insertions(+) create mode 100644 lgsm/config-default/config-lgsm/hcuserver/_default.cfg diff --git a/lgsm/config-default/config-lgsm/hcuserver/_default.cfg b/lgsm/config-default/config-lgsm/hcuserver/_default.cfg new file mode 100644 index 000000000..7fa7fd3b0 --- /dev/null +++ b/lgsm/config-default/config-lgsm/hcuserver/_default.cfg @@ -0,0 +1,190 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! +# Copy settings from here and use them in either: +# common.cfg - applies settings to every instance. +# [instance].cfg - applies settings to a specific instance. + +#### Game Server Settings #### + +## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters +ip="0.0.0.0" +port="7777" +queryport="27015" +defaultmap="KidsBedroom" +maxplayers="8" +servername="LinuxGSM" + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="${defaultmap}?Difficulty=1?Game=DM?MapList=KidsBedroom,Playground,Garden,Hallway_Simple,Bathroom,Hallway_Hard,Attic_Daytime,Shed,ToyPalace,Kitchen,Garage?MaxPlayers=${maxplayers}?WeaponTypes=7?TimeLimit=600?ScoreLimit=30?Teamplay -ServerName='${servername}' -Port=${port} -QueryPort=${queryport} -NOCONSOLE -unattended" + +## Server Parameters for Plague mode +#startparameters="${defaultmap}?Game=PL?MapList=KidsBedroom,Garden,Hallway_Simple,Attic_Daytime,Garage,Shed,Kitchen,Hallway_Hard,ToyPalace,Bathroom?MaxPlayers=${maxplayers}?WeaponTypes=7?TimeLimit=600 -ServerName='${servername}' -Port=${port} -QueryPort=${queryport} -NOCONSOLE -unattended" + +## Server Parameters for Co-op mode +#startparameters="${defaultmap}?Difficulty=1?Game=WV?MapList=KidsBedroom?MaxPlayers=4 -ServerName='${servername}' -Port=${port} -QueryPort=${queryport} -NOCONSOLE -unattended" + + +#### LinuxGSM Settings #### + +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + +## Notification Alerts +# (on|off) + +# Display IP | https://docs.linuxgsm.com/alerts#display-ip +displayip="" + +# More info | https://docs.linuxgsm.com/alerts#more-info +postalert="off" + +# Discord Alerts | https://docs.linuxgsm.com/alerts/discord +discordalert="off" +discordwebhook="webhook" + +# Email Alerts | https://docs.linuxgsm.com/alerts/email +emailalert="off" +email="email@example.com" +emailfrom="" + +# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun +mailgunalert="off" +mailgunapiregion="us" +mailguntoken="accesstoken" +mailgundomain="example.com" +mailgunemailfrom="alert@example.com" +mailgunemail="email@myemail.com" + +# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover +pushoveralert="off" +pushovertoken="accesstoken" +pushoveruserkey="userkey" + +# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat +rocketchatalert="off" +rocketchatwebhook="webhook" +rocketchattoken="" + +# Slack Alerts | https://docs.linuxgsm.com/alerts/slack +slackalert="off" +slackwebhook="webhook" + +# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram +# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +telegramapi="api.telegram.org" +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +curlcustomstring="" + +## Updating | https://docs.linuxgsm.com/commands/update +updateonstart="off" + +## Backup | https://docs.linuxgsm.com/commands/backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://docs.linuxgsm.com/features/logging +consolelogging="on" +logdays="7" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="5" + +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors +ansi="on" + +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time +sleeptime="0.5" + +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd +# Server appid +appid="1045940"s +steamcmdforcewindows="no" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +betapassword="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="false" + +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode +# 1: tmux kill +# 2: CTRL+c +# 3: quit +# 4: quit 120s +# 5: stop +# 6: q +# 7: exit +# 8: 7 Days to Die +# 9: GoldSrc +# 10: Avorion +# 11: end +stopmode="2" + +## Query mode +# 1: session only +# 2: gamedig (gsquery fallback) +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="1" +querytype="" + +## Console type +consoleverbose="no" +consoleinteract="no" + +## Game Server Details +# Do not edit +gamename="HYPERCHARGE: Unboxed" +engine="unreal4" +glibc="2.17" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}/Unboxed" +executabledir="${systemdir}/Binaries/Linux" +executable="./UnboxedServer-Linux-Shipping" +servercfgdir="${systemdir}/Saved/Config/LinuxServer" +servercfg="GameUserSettings.ini" +servercfgdefault="GameUserSettings.ini" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/Saved/Logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 60d0dc893..e462e32e6 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -46,6 +46,7 @@ ets2,ets2server,Euro Truck Simulator 2,ubuntu-22.04 fctr,fctrserver,Factorio,ubuntu-22.04 fof,fofserver,Fistful of Frags,ubuntu-22.04 gmod,gmodserver,Garrys Mod,ubuntu-22.04 +hcu,hcuserver,HYPERCHARGE: Unboxed,ubuntu-22.04 hl2dm,hl2dmserver,Half-Life 2: Deathmatch,ubuntu-22.04 hldm,hldmserver,Half-Life: Deathmatch,ubuntu-22.04 hldms,hldmsserver,Half-Life Deathmatch: Source,ubuntu-22.04 diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index 5478987f1..3766049c6 100644 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -1719,6 +1719,8 @@ fn_info_message_select_engine() { fn_info_message_etl elif [ "${shortname}" == "fctr" ]; then fn_info_message_fctr + elif [ "${shortname}" == "hcu" ]; then + fn_info_message_hcu elif [ "${shortname}" == "hw" ]; then fn_info_message_hw elif [ "${shortname}" == "ins" ]; then diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index be0286a5c..3b5081ad6 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -442,6 +442,19 @@ fn_info_game_dst() { tickrate="${tickrate:-"0"}" } +# Config Type: parameters +# Parameters: true +# Comment: ; or # +# Example: SessionName=SERVERNAME +# Filetype: ini +fn_info_game_hcu() { + defaultmap="${defaultmap:-"NOT SET"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${queryport:-"0"}" + servername="${servername:-"NOT SET"}" +} + # Config Type: ini # Parameters: true # Comment: ; or # diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index cc2463af1..c22685293 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -1024,6 +1024,14 @@ fn_info_message_goldsrc() { } | column -s $'\t' -t } +fn_ingo_message_hcu(){ + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport tcp + } | column -s $'\t' -t +} + fn_info_message_hw() { { fn_port "header" From 099d94017acb633a4cf52560a212c3490a214240 Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 25 May 2023 22:36:03 +0200 Subject: [PATCH 147/374] feature(newserver): Operation: Harsh Doorstop (#4112) * feat(newserver): Operation: Harsh Doorstop --------- Co-authored-by: Daniel Gibbs --- .../config-lgsm/inssserver/_default.cfg | 2 +- .../config-lgsm/ohdserver/_default.cfg | 191 ++++++++++++++++++ lgsm/data/almalinux-8.csv | 2 + lgsm/data/almalinux-9.csv | 2 + lgsm/data/centos-7.csv | 2 + lgsm/data/centos-8.csv | 2 + lgsm/data/centos-9.csv | 2 + lgsm/data/debian-10.csv | 2 + lgsm/data/debian-11.csv | 2 + lgsm/data/debian-12.csv | 2 + lgsm/data/debian-9.csv | 2 + lgsm/data/rhel-7.csv | 2 + lgsm/data/rhel-8.csv | 2 + lgsm/data/rhel-9.csv | 2 + lgsm/data/rocky-8.csv | 2 + lgsm/data/rocky-9.csv | 2 + lgsm/data/serverlist.csv | 1 + lgsm/data/ubuntu-16.04.csv | 2 + lgsm/data/ubuntu-18.04.csv | 2 + lgsm/data/ubuntu-20.04.csv | 2 + lgsm/data/ubuntu-21.04.csv | 2 + lgsm/data/ubuntu-21.10.csv | 2 + lgsm/data/ubuntu-22.04.csv | 2 + lgsm/modules/info_game.sh | 66 +++--- lgsm/modules/info_messages.sh | 11 + lgsm/modules/install_config.sh | 7 + 26 files changed, 293 insertions(+), 25 deletions(-) create mode 100644 lgsm/config-default/config-lgsm/ohdserver/_default.cfg diff --git a/lgsm/config-default/config-lgsm/inssserver/_default.cfg b/lgsm/config-default/config-lgsm/inssserver/_default.cfg index 5317f6be9..eb26d9211 100644 --- a/lgsm/config-default/config-lgsm/inssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/inssserver/_default.cfg @@ -20,7 +20,7 @@ defaultscenario="Scenario_Crossing_Push_Security" maxplayers="28" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -## Parameter Docs | https://sandstorm-support.newworldinteractive.com/hc/en-us/articles/360049211072-Server-Admin-Guide +## Parameter Docs | https://mod.io/g/insurgencysandstorm/r/server-admin-guide startparameters="${defaultmap}?Scenario=${defaultscenario}?MaxPlayers=${maxplayers} -Port=${port} -QueryPort=${queryport} -hostname='${servername}' -Rcon -RconPassword=${rconpassword} -RconListenPort=${rconport} -log" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/ohdserver/_default.cfg b/lgsm/config-default/config-lgsm/ohdserver/_default.cfg new file mode 100644 index 000000000..4e855eb81 --- /dev/null +++ b/lgsm/config-default/config-lgsm/ohdserver/_default.cfg @@ -0,0 +1,191 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! +# Copy settings from here and use them in either: +# common.cfg - applies settings to every instance. +# [instance].cfg - applies settings to a specific instance. + +#### Game Server Settings #### + +## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters +ip="0.0.0.0" +port="7777" +queryport="27005" +servername="LinuxGSM Server" +serverpassword="" +# Maps: risala, khafji_p, lamdong, montecassino, argonne +defaultmap="AAS-TestMap" +maxplayers="16" + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="${defaultmap}?MaxPlayers=${maxplayers}?Password=${serverpassword} -Port=${port} -QueryPort=${queryport} -SteamServerName='${servername}' -log" + +#### LinuxGSM Settings #### + +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + +## Notification Alerts +# (on|off) + +# Display IP | https://docs.linuxgsm.com/alerts#display-ip +displayip="" + +# More info | https://docs.linuxgsm.com/alerts#more-info +postalert="off" + +# Discord Alerts | https://docs.linuxgsm.com/alerts/discord +discordalert="off" +discordwebhook="webhook" + +# Email Alerts | https://docs.linuxgsm.com/alerts/email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + +# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun +mailgunalert="off" +mailgunapiregion="us" +mailguntoken="accesstoken" +mailgundomain="example.com" +mailgunemailfrom="alert@example.com" +mailgunemail="email@myemail.com" + +# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover +pushoveralert="off" +pushovertoken="accesstoken" +pushoveruserkey="userkey" + +# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat +rocketchatalert="off" +rocketchatwebhook="webhook" +rocketchattoken="" + +# Slack Alerts | https://docs.linuxgsm.com/alerts/slack +slackalert="off" +slackwebhook="webhook" + +# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram +# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +telegramapi="api.telegram.org" +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +curlcustomstring="" + +## Updating | https://docs.linuxgsm.com/commands/update +updateonstart="off" + +## Backup | https://docs.linuxgsm.com/commands/backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://docs.linuxgsm.com/features/logging +consolelogging="on" +logdays="7" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="1" + +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors +ansi="on" + +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time +sleeptime="0.5" + +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd +# Server appid +appid="950900" +steamcmdforcewindows="no" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +betapassword="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="false" + +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode +# 1: tmux kill +# 2: CTRL+c +# 3: quit +# 4: quit 120s +# 5: stop +# 6: q +# 7: exit +# 8: 7 Days to Die +# 9: GoldSrc +# 10: Avorion +# 11: end +stopmode="2" + +## Query mode +# 1: session only +# 2: gamedig (gsquery fallback) +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Console type +consoleverbose="yes" +consoleinteract="no" + +## Game Server Details +# Do not edit +gamename="Operation: Harsh Doorstop" +engine="unreal4" +glibc="2.17" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}/HarshDoorstop" +executabledir="${systemdir}/Binaries/Linux" +executable="./HarshDoorstopServer-Linux-Shipping" +servercfgdir="${systemdir}/Saved/Config/LinuxServer" +servercfg="Game.ini" +servercfgdefault="Game.ini" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/Saved/Logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +gamelog="${gamelogdir}/${selfname}-game.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index eb72d965e..58882431c 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,ncurses-libs.i686 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,ncurses-libs.i686 ns ns2,speex,tbb ns2c,speex.i686,tbb.i686 +ohd onset,mariadb-connector-c opfor pc diff --git a/lgsm/data/almalinux-9.csv b/lgsm/data/almalinux-9.csv index eb72d965e..58882431c 100644 --- a/lgsm/data/almalinux-9.csv +++ b/lgsm/data/almalinux-9.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,ncurses-libs.i686 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,ncurses-libs.i686 ns ns2,speex,tbb ns2c,speex.i686,tbb.i686 +ohd onset,mariadb-connector-c opfor pc diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index cd537127e..1f8357148 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,ncurses-libs.i686 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,ncurses-libs.i686 ns ns2,speex,tbb ns2c,speex.i686,tbb.i686 +ohd onset,mariadb-connector-c opfor pc diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index eb72d965e..58882431c 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,ncurses-libs.i686 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,ncurses-libs.i686 ns ns2,speex,tbb ns2c,speex.i686,tbb.i686 +ohd onset,mariadb-connector-c opfor pc diff --git a/lgsm/data/centos-9.csv b/lgsm/data/centos-9.csv index eb72d965e..58882431c 100644 --- a/lgsm/data/centos-9.csv +++ b/lgsm/data/centos-9.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,ncurses-libs.i686 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,ncurses-libs.i686 ns ns2,speex,tbb ns2c,speex.i686,tbb.i686 +ohd onset,mariadb-connector-c opfor pc diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index eca612229..228a03624 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,libtinfo5:i386 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 ns2c,speex:i386,libtbb2 +ohd onset,libmariadb-dev opfor pc diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index 0eecc40fd..1944a7c23 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,libtinfo5:i386 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 ns2c,speex:i386,libtbb2 +ohd onset,libmariadb-dev opfor pc diff --git a/lgsm/data/debian-12.csv b/lgsm/data/debian-12.csv index 2bd92c32d..5c6169cd3 100644 --- a/lgsm/data/debian-12.csv +++ b/lgsm/data/debian-12.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,libtinfo5:i386 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,libtinfo5:i386 ns ns2,speex,libtbb12 ns2c,speex:i386,libtbb12 +ohd onset,libmariadb-dev opfor pc diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index 8a4fd6df4..eaaed82c0 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,libtinfo5:i386 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 ns2c,speex:i386,libtbb2 +ohd onset,libmariadb-dev opfor pc diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index dbf578bb9..14729d731 100644 --- a/lgsm/data/rhel-7.csv +++ b/lgsm/data/rhel-7.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,ncurses-libs.i686 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,ncurses-libs.i686 ns ns2,speex,tbb ns2c,speex.i686,tbb.i686 +ohd onset,mariadb-connector-c opfor pc diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index eb72d965e..58882431c 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,ncurses-libs.i686 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,ncurses-libs.i686 ns ns2,speex,tbb ns2c,speex.i686,tbb.i686 +ohd onset,mariadb-connector-c opfor pc diff --git a/lgsm/data/rhel-9.csv b/lgsm/data/rhel-9.csv index eb72d965e..58882431c 100644 --- a/lgsm/data/rhel-9.csv +++ b/lgsm/data/rhel-9.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,ncurses-libs.i686 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,ncurses-libs.i686 ns ns2,speex,tbb ns2c,speex.i686,tbb.i686 +ohd onset,mariadb-connector-c opfor pc diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index eb72d965e..58882431c 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,ncurses-libs.i686 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,ncurses-libs.i686 ns ns2,speex,tbb ns2c,speex.i686,tbb.i686 +ohd onset,mariadb-connector-c opfor pc diff --git a/lgsm/data/rocky-9.csv b/lgsm/data/rocky-9.csv index eb72d965e..58882431c 100644 --- a/lgsm/data/rocky-9.csv +++ b/lgsm/data/rocky-9.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,ncurses-libs.i686 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,ncurses-libs.i686 ns ns2,speex,tbb ns2c,speex.i686,tbb.i686 +ohd onset,mariadb-connector-c opfor pc diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index e462e32e6..b442460dc 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -74,6 +74,7 @@ nmrih,nmrihserver,No More Room in Hell,ubuntu-22.04 ns,nsserver,Natural Selection,ubuntu-22.04 ns2,ns2server,Natural Selection 2,ubuntu-22.04 ns2c,ns2cserver,NS2: Combat,ubuntu-22.04 +ohd,ohdserver,Operation: Harsh Doorstop,ubuntu-22.04 onset,onsetserver,Onset,ubuntu-20.04 opfor,opforserver,Opposing Force,ubuntu-22.04 pc,pcserver,Project Cars,ubuntu-22.04 diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index 387a862d9..4c20ca0a7 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,libtinfo5:i386 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 ns2c,speex:i386,libtbb2 +ohd onset,libmariadb-dev opfor pc diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index eca612229..228a03624 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,libtinfo5:i386 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 ns2c,speex:i386,libtbb2 +ohd onset,libmariadb-dev opfor pc diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index a07d23a0b..ce7c8dee4 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,libtinfo5:i386 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 ns2c,speex:i386,libtbb2 +ohd onset,libmariadb-dev opfor pc diff --git a/lgsm/data/ubuntu-21.04.csv b/lgsm/data/ubuntu-21.04.csv index 0eecc40fd..1944a7c23 100644 --- a/lgsm/data/ubuntu-21.04.csv +++ b/lgsm/data/ubuntu-21.04.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,libtinfo5:i386 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 ns2c,speex:i386,libtbb2 +ohd onset,libmariadb-dev opfor pc diff --git a/lgsm/data/ubuntu-21.10.csv b/lgsm/data/ubuntu-21.10.csv index e1504baca..0358b8545 100644 --- a/lgsm/data/ubuntu-21.10.csv +++ b/lgsm/data/ubuntu-21.10.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,libtinfo5:i386 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 ns2c,speex:i386,libtbb2 +ohd onset,libmariadb-dev opfor pc diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index 06190f47e..88bffb66e 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -48,6 +48,7 @@ ets2 fctr fof gmod,libtinfo5:i386 +hcu hl2dm hldm hldms @@ -75,6 +76,7 @@ nmrih,libtinfo5:i386 ns ns2,speex,libtbb2 ns2c,speex:i386,libtbb2 +ohd onset,libmariadb-dev opfor pc diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 3b5081ad6..6e9d87f0d 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -1339,13 +1339,13 @@ fn_info_game_mc() { configip="${configip:-"0.0.0.0"}" gamemode="${gamemode:-"NOT SET"}" maxplayers="${maxplayers:-"0"}" - port="${port:-"NOT SET"}" + port="${port:-"0"}" queryenabled="${queryenabled:-"NOT SET"}" if [ -z "${queryport}" ]; then queryport="${port}" fi rconpassword="${rconpassword:-"NOT SET"}" - rconport="${rconport:-"NOT SET"}" + rconport="${rconport:-"0"}" servername="${servername:-"NOT SET"}" worldname="${worldname:-"NOT SET"}" } @@ -1451,6 +1451,22 @@ fn_info_game_nec() { serverpassword="${serverpassword:-"NOT SET"}" } +# Config Type: ini +# Parameters: true +# Comment: ; or # +# Example: ServerName=SERVERNAME +# Filetype: ini +fn_info_game_ohd(){ + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_ini rconenabled "bEnabled" + fn_info_game_ini rconport "ListenPort" + fn_info_game_ini rconpassword "Password" + fi + rconenabled="${rconenabled:-"false"}" + rconport="${rconport:-"0"}" + rconpassword="${rconpassword:-"NOT SET"}" +} + # Config Type: json # Parameters: false # Comment: // or /* */ @@ -1733,20 +1749,20 @@ fn_info_game_rw() { configip=$(grep "server_ip" "${servercfgfullpath}" | grep -v "database_mysql_server_ip" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/server_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} - rconport=${rconport:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - port2=${port2:-"0"} - port3=${port3:-"0"} - port4=${port4:-"0"} - queryport=${queryport:-"0"} - httpqueryport=${httpport:-"0"} - gamemode=${gamemode:-"NOT SET"} - worldname=${worldname:-"NOT SET"} - configip=${configip:-"0.0.0.0"} + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + rconpassword="${rconpassword:-"NOT SET"}" + rconport="${rconport:-"0"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + port2="${port2:-"0"}" + port3="${port3:-"0"}" + port4="${port4:-"0"}" + queryport="${queryport:-"0"}" + httpqueryport="${httpport:-"0"}" + gamemode="${gamemode:-"NOT SET"}" + worldname="${worldname:-"NOT SET"}" + configip="${configip:-"0.0.0.0"}" fi } @@ -1766,17 +1782,17 @@ fn_info_game_samp() { servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/^rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') port=$(grep "port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - queryport=${port} - rconport=${port} + queryport="${port}" + rconport="${port}" maxplayers=$(grep "maxplayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') # Not set - servername=${servername:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} - port=${port:-"7777"} - queryport=${port:-"7777"} - rconport=${rconport:-"7777"} - maxplayers=${maxplayers:-"12"} + servername="${servername:-"NOT SET"}" + rconpassword="${rconpassword:-"NOT SET"}" + port="${port:-"7777"}" + queryport="${port:-"7777"}" + rconport="${rconport:-"7777"}" + maxplayers="${maxplayers:-"12"}" fi } @@ -2267,6 +2283,8 @@ elif [ "${shortname}" == "mta" ]; then fn_info_game_mta elif [ "${shortname}" == "nec" ]; then fn_info_game_nec +elif [ "${shortname}" == "ohd" ]; then + fn_info_game_ohd elif [ "${shortname}" == "onset" ]; then fn_info_game_onset elif [ "${shortname}" == "pc" ]; then diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index c22685293..b4cc65652 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -1193,6 +1193,15 @@ fn_info_message_nec() { } | column -s $'\t' -t } +fn_info_message_ohd() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "RCON" rconport tcp + } | column -s $'\t' -t +} + fn_info_message_onset() { { fn_port "header" @@ -1754,6 +1763,8 @@ fn_info_message_select_engine() { fn_info_message_mta elif [ "${shortname}" == "nec" ]; then fn_info_message_nec + elif [ "${shortname}" == "ohd" ]; then + fn_info_message_ohd elif [ "${shortname}" == "onset" ]; then fn_info_message_onset elif [ "${shortname}" == "pc" ]; then diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index b39539020..9cdb319a9 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -505,6 +505,13 @@ elif [ "${shortname}" == "hldms" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations +elif [ "${shortname}" == "ohd" ]; then + gamedirname="OperationHarshDoorstop" + array_configs+=(Game.ini) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "opfor" ]; then gamedirname="OpposingForce" array_configs+=(server.cfg) From 87751181101633fe534cd6d7833c62046ade4aaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20o=28=28=CF=89=20=29=29o?= Date: Fri, 26 May 2023 20:36:28 +0100 Subject: [PATCH 148/374] python version change for rhel-9 & centos-9 (#4213) * python version change for rhel-9 & centos-9 - python36 is no longer available in the repo list for rhel-9 & centos-9 - not possible to use "dnf install python36" or "yum install python36", manually compiling from source or using pyenv is only way - switching from python36 to python3 in lgsm data files works for latest rhel-9 (redhat9) dev build * python36 to python3 for rocky-9 * python36 to python3 for almalinux-9 --- lgsm/data/almalinux-9.csv | 2 +- lgsm/data/centos-9.csv | 2 +- lgsm/data/rhel-9.csv | 2 +- lgsm/data/rocky-9.csv | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lgsm/data/almalinux-9.csv b/lgsm/data/almalinux-9.csv index 58882431c..bef471c6c 100644 --- a/lgsm/data/almalinux-9.csv +++ b/lgsm/data/almalinux-9.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz +all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python3,tar,tmux,unzip,util-linux,wget,xz steamcmd,glibc.i686,libstdc++.i686 ac ahl diff --git a/lgsm/data/centos-9.csv b/lgsm/data/centos-9.csv index 58882431c..bef471c6c 100644 --- a/lgsm/data/centos-9.csv +++ b/lgsm/data/centos-9.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz +all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python3,tar,tmux,unzip,util-linux,wget,xz steamcmd,glibc.i686,libstdc++.i686 ac ahl diff --git a/lgsm/data/rhel-9.csv b/lgsm/data/rhel-9.csv index 58882431c..bef471c6c 100644 --- a/lgsm/data/rhel-9.csv +++ b/lgsm/data/rhel-9.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz +all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python3,tar,tmux,unzip,util-linux,wget,xz steamcmd,glibc.i686,libstdc++.i686 ac ahl diff --git a/lgsm/data/rocky-9.csv b/lgsm/data/rocky-9.csv index 58882431c..bef471c6c 100644 --- a/lgsm/data/rocky-9.csv +++ b/lgsm/data/rocky-9.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz +all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python3,tar,tmux,unzip,util-linux,wget,xz steamcmd,glibc.i686,libstdc++.i686 ac ahl From 561206ccb4d3c2135503e53fa72c511fd8340b7c Mon Sep 17 00:00:00 2001 From: Christian Date: Fri, 26 May 2023 23:57:26 +0200 Subject: [PATCH 149/374] feat(newserver): Craftopia (#3739) * feat(newserver): Craftopia * exitcode 0 --------- Co-authored-by: Daniel Gibbs --- .../config-lgsm/ctserver/_default.cfg | 182 ++++++++++++++++++ lgsm/data/almalinux-8.csv | 1 + lgsm/data/almalinux-9.csv | 1 + lgsm/data/centos-7.csv | 1 + lgsm/data/centos-8.csv | 1 + lgsm/data/centos-9.csv | 1 + lgsm/data/debian-10.csv | 1 + lgsm/data/debian-11.csv | 1 + lgsm/data/debian-12.csv | 1 + lgsm/data/debian-9.csv | 1 + lgsm/data/rhel-7.csv | 1 + lgsm/data/rhel-8.csv | 1 + lgsm/data/rhel-9.csv | 1 + lgsm/data/rocky-8.csv | 1 + lgsm/data/rocky-9.csv | 1 + lgsm/data/serverlist.csv | 1 + lgsm/data/ubuntu-16.04.csv | 1 + lgsm/data/ubuntu-18.04.csv | 1 + lgsm/data/ubuntu-20.04.csv | 1 + lgsm/data/ubuntu-21.04.csv | 1 + lgsm/data/ubuntu-21.10.csv | 2 + lgsm/data/ubuntu-22.04.csv | 3 +- lgsm/modules/command_details.sh | 1 + lgsm/modules/info_game.sh | 114 ++++++----- lgsm/modules/info_messages.sh | 19 +- lgsm/modules/install_config.sh | 7 + 26 files changed, 301 insertions(+), 46 deletions(-) create mode 100644 lgsm/config-default/config-lgsm/ctserver/_default.cfg diff --git a/lgsm/config-default/config-lgsm/ctserver/_default.cfg b/lgsm/config-default/config-lgsm/ctserver/_default.cfg new file mode 100644 index 000000000..9bef1f2ec --- /dev/null +++ b/lgsm/config-default/config-lgsm/ctserver/_default.cfg @@ -0,0 +1,182 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! +# Copy settings from here and use them in either: +# common.cfg - applies settings to every instance. +# [instance].cfg - applies settings to a specific instance. + +#### Game Server Settings #### + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="-batchmode -showlogs" + +#### LinuxGSM Settings #### + +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + +## Notification Alerts +# (on|off) + +# Display IP | https://docs.linuxgsm.com/alerts#display-ip +displayip="" + +# More info | https://docs.linuxgsm.com/alerts#more-info +postalert="off" + +# Discord Alerts | https://docs.linuxgsm.com/alerts/discord +discordalert="off" +discordwebhook="webhook" + +# Email Alerts | https://docs.linuxgsm.com/alerts/email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + +# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun +mailgunalert="off" +mailgunapiregion="us" +mailguntoken="accesstoken" +mailgundomain="example.com" +mailgunemailfrom="alert@example.com" +mailgunemail="email@myemail.com" + +# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover +pushoveralert="off" +pushovertoken="accesstoken" +pushoveruserkey="userkey" + +# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat +rocketchatalert="off" +rocketchatwebhook="webhook" +rocketchattoken="" + +# Slack Alerts | https://docs.linuxgsm.com/alerts/slack +slackalert="off" +slackwebhook="webhook" + +# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram +# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +telegramapi="api.telegram.org" +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +curlcustomstring="" + +## Updating | https://docs.linuxgsm.com/commands/update +updateonstart="off" + +## Backup | https://docs.linuxgsm.com/commands/backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://docs.linuxgsm.com/features/logging +consolelogging="on" +logdays="7" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="1" + +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors +ansi="on" + +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time +sleeptime="0.5" + +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd +# Server appid +appid="1670340" +steamcmdforcewindows="no" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +betapassword="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="false" + +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode +# 1: tmux kill +# 2: CTRL+c +# 3: quit +# 4: quit 120s +# 5: stop +# 6: q +# 7: exit +# 8: 7 Days to Die +# 9: GoldSrc +# 10: Avorion +# 11: end +stopmode="5" + +## Query mode +# 1: session only +# 2: gamedig (gsquery fallback) +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="1" +querytype="" + +## Console type +consoleverbose="no" +consoleinteract="yes" + +## Game Server Details +# Do not edit +gamename="Craftopia" +engine="unity3d" +glibc="2.17" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}" +executabledir="${serverfiles}" +executable="./Craftopia.x86_64" +servercfgdir="${systemdir}" +servercfg="ServerSetting.ini" +servercfgdefault="ServerSetting.ini" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +logdir="${rootdir}/log" +#gamelogdir="${serverfiles}" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +gamelog="${gamelogdir}/${selfname}-game.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" + +## Logs Naming +gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" +lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index 58882431c..1f8abc8e1 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -32,6 +32,7 @@ cs cscz csgo css,ncurses-libs.i686 +ct dab dayz dmc diff --git a/lgsm/data/almalinux-9.csv b/lgsm/data/almalinux-9.csv index bef471c6c..fb760c4f0 100644 --- a/lgsm/data/almalinux-9.csv +++ b/lgsm/data/almalinux-9.csv @@ -32,6 +32,7 @@ cs cscz csgo css,ncurses-libs.i686 +ct dab dayz dmc diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index 1f8357148..7db6b259c 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -32,6 +32,7 @@ cs cscz csgo css,ncurses-libs.i686 +ct dab dayz dmc diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index 58882431c..1f8abc8e1 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -32,6 +32,7 @@ cs cscz csgo css,ncurses-libs.i686 +ct dab dayz dmc diff --git a/lgsm/data/centos-9.csv b/lgsm/data/centos-9.csv index bef471c6c..fb760c4f0 100644 --- a/lgsm/data/centos-9.csv +++ b/lgsm/data/centos-9.csv @@ -32,6 +32,7 @@ cs cscz csgo css,ncurses-libs.i686 +ct dab dayz dmc diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index 228a03624..0009af180 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -32,6 +32,7 @@ cs cscz csgo css,libtinfo5:i386 +ct dab dayz dmc diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index 1944a7c23..2ea69fdbb 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -32,6 +32,7 @@ cs cscz csgo css,libtinfo5:i386 +ct dab dayz dmc diff --git a/lgsm/data/debian-12.csv b/lgsm/data/debian-12.csv index 5c6169cd3..072b28bc5 100644 --- a/lgsm/data/debian-12.csv +++ b/lgsm/data/debian-12.csv @@ -32,6 +32,7 @@ cs cscz csgo css,libtinfo5:i386 +ct dab dayz dmc diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index eaaed82c0..690591705 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -32,6 +32,7 @@ cs cscz csgo css,libtinfo5:i386 +ct dab dayz dmc diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index 14729d731..5d25cd304 100644 --- a/lgsm/data/rhel-7.csv +++ b/lgsm/data/rhel-7.csv @@ -32,6 +32,7 @@ cs cscz csgo css,ncurses-libs.i686 +ct dab dayz dmc diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index 58882431c..1f8abc8e1 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -32,6 +32,7 @@ cs cscz csgo css,ncurses-libs.i686 +ct dab dayz dmc diff --git a/lgsm/data/rhel-9.csv b/lgsm/data/rhel-9.csv index bef471c6c..fb760c4f0 100644 --- a/lgsm/data/rhel-9.csv +++ b/lgsm/data/rhel-9.csv @@ -32,6 +32,7 @@ cs cscz csgo css,ncurses-libs.i686 +ct dab dayz dmc diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index 58882431c..1f8abc8e1 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -32,6 +32,7 @@ cs cscz csgo css,ncurses-libs.i686 +ct dab dayz dmc diff --git a/lgsm/data/rocky-9.csv b/lgsm/data/rocky-9.csv index bef471c6c..fb760c4f0 100644 --- a/lgsm/data/rocky-9.csv +++ b/lgsm/data/rocky-9.csv @@ -32,6 +32,7 @@ cs cscz csgo css,ncurses-libs.i686 +ct dab dayz dmc diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index b442460dc..8b2b5c705 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -30,6 +30,7 @@ cs,csserver,Counter-Strike 1.6,ubuntu-22.04 cscz,csczserver,Counter-Strike: Condition Zero,ubuntu-22.04 csgo,csgoserver,Counter-Strike: Global Offensive,ubuntu-22.04 css,cssserver,Counter-Strike: Source,ubuntu-22.04 +ct,ctserver,Craftopia,ubuntu-22.04 dab,dabserver,Double Action: Boogaloo,ubuntu-22.04 dayz,dayzserver,DayZ,ubuntu-22.04 dmc,dmcserver,Deathmatch Classic,ubuntu-22.04 diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index 4c20ca0a7..cac4c9659 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -32,6 +32,7 @@ cs cscz csgo css,libtinfo5:i386 +ct dab dayz dmc diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index 228a03624..0009af180 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -32,6 +32,7 @@ cs cscz csgo css,libtinfo5:i386 +ct dab dayz dmc diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index ce7c8dee4..29028c16c 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -32,6 +32,7 @@ cs cscz csgo css,libtinfo5:i386 +ct dab dayz dmc diff --git a/lgsm/data/ubuntu-21.04.csv b/lgsm/data/ubuntu-21.04.csv index 1944a7c23..2ea69fdbb 100644 --- a/lgsm/data/ubuntu-21.04.csv +++ b/lgsm/data/ubuntu-21.04.csv @@ -32,6 +32,7 @@ cs cscz csgo css,libtinfo5:i386 +ct dab dayz dmc diff --git a/lgsm/data/ubuntu-21.10.csv b/lgsm/data/ubuntu-21.10.csv index 0358b8545..367dc67f4 100644 --- a/lgsm/data/ubuntu-21.10.csv +++ b/lgsm/data/ubuntu-21.10.csv @@ -19,6 +19,7 @@ bs bt,libicu-dev,dos2unix btl cc +cd ck,xvfb cd cmw @@ -32,6 +33,7 @@ cs cscz csgo css,libtinfo5:i386 +ct dab dayz dmc diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index 88bffb66e..370fea8fb 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -19,8 +19,8 @@ bs bt,libicu-dev,dos2unix btl cc -ck,xvfb cd +ck,xvfb cmw cod,libstdc++5:i386 cod2,libstdc++5:i386 @@ -32,6 +32,7 @@ cs cscz csgo css,libtinfo5:i386 +ct dab dayz dmc diff --git a/lgsm/modules/command_details.sh b/lgsm/modules/command_details.sh index 2c8e3a658..d180b3b18 100644 --- a/lgsm/modules/command_details.sh +++ b/lgsm/modules/command_details.sh @@ -38,4 +38,5 @@ fn_info_message_ports fn_info_message_select_engine fn_info_message_statusbottom +exitcode=0 core_exit.sh diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 6e9d87f0d..c7a233c03 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -906,6 +906,32 @@ fn_info_game_bf1942() { serverpassword="${serverpassword:-"NOT SET"}" } +# Config Type: ini +# Parameters: true +# Comment: ; or # +# Example: ServerName=SERVERNAME +# Filetype: ini +fn_info_game_ct(){ + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_ini "configip" "bindAddress" + fn_info_game_ini "gamemode" "gameMode" + fn_info_game_ini "maxplayers" "maxPlayerNumber" + fn_info_game_ini "port" "port" + fn_info_game_ini "saveinterval" "autoSaveSec" + fn_info_game_ini "servername" "name" + fn_info_game_ini "serverpassword" "serverPassword" + fn_info_game_ini "serverpasswordenabled" "usePassword" + fi + configip="${configip:-"0.0.0.0"}" + gamemode="${gamemode:-"NOT SET"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + saveinterval="${saveinterval:-"0"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + serverpasswordenabled="${serverpasswordenabled:-"NOT SET"}" +} + # Config Type: con # Parameters: true # Comment: # or // @@ -1554,11 +1580,11 @@ fn_info_game_prism3d() { serverpassword=$(sed -nr 's/^\s*password\s*:\s*"(.*)"/\1/p' "${servercfgfullpath}") # Not set - maxplayers=${maxplayers:-"0"} - port=${port:-"27015"} - queryport=${queryport:-"27016"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} + maxplayers="${maxplayers:-"0"}" + port="${port:-"27015"}" + queryport="${queryport:-"27016"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" fi } @@ -1683,38 +1709,38 @@ fn_info_game_rtcw() { fn_info_game_quakec "serverpassword" "g_password" fn_info_game_quakec "maxplayers" "sv_maxclients" fi - rconpassword=${rconpassword:-"NOT SET"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - queryport=${port:-"0"} - defaultmap=${defaultmap:-"NOT SET"} + rconpassword="${rconpassword:-"NOT SET"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${port:-"0"}" + defaultmap="${defaultmap:-"NOT SET"}" } # Config Type: Parameters (mostly) fn_info_game_rust() { # Parameters - servername=${servername:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} - appport=${appport:-"0"} - rconport=${rconport:-"0"} - gamemode=${gamemode:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - rconpassword=${rconpassword:-"NOT SET"} - rconweb=${rconweb:-"NOT SET"} - tickrate=${tickrate:-"0"} - saveinterval=${saveinterval:-"0"} - serverlevel=${serverlevel:-"NOT SET"} - customlevelurl=${customlevelurl:-"NOT SET"} - worldsize=${worldsize:-"0"} + servername="${servername:-"NOT SET"}" + port="${port:-"0"}" + queryport="${queryport:-"0"}" + appport="${appport:-"0"}" + rconport="${rconport:-"0"}" + gamemode="${gamemode:-"NOT SET"}" + maxplayers="${maxplayers:-"0"}" + rconpassword="${rconpassword:-"NOT SET"}" + rconweb="${rconweb:-"NOT SET"}" + tickrate="${tickrate:-"0"}" + saveinterval="${saveinterval:-"0"}" + serverlevel="${serverlevel:-"NOT SET"}" + customlevelurl="${customlevelurl:-"NOT SET"}" + worldsize="${worldsize:-"0"}" if [ -n "${seed}" ]; then - seed=${seed:-"0"} + seed="${seed:-"0"}" elif [ -f "${datadir}/${selfname}-seed.txt" ]; then seed=$(cat "${datadir}/${selfname}-seed.txt") fi - salt=${salt:-"0"} + salt="${salt:-"0"}" } fn_info_game_rw() { @@ -2037,11 +2063,11 @@ fn_info_game_tw() { fn_info_game_quakec "maxplayers" "sv_max_clients" fi queryport="${port}" - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} - port=${port:-"0"} - maxplayers=${maxplayers:-"0"} + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + rconpassword="${rconpassword:-"NOT SET"}" + port="${port:-"0"}" + maxplayers="${maxplayers:-"0"}" } # Config Type: Parameters @@ -2161,10 +2187,10 @@ fn_info_game_wmc() { fi # Not set - servername=${servername:-"NOT SET"} - queryport=${queryport:-"25577"} - maxplayers=${maxplayers:-"0"} - configip=${configip:-"0.0.0.0"} + servername="${servername:-"NOT SET"}" + queryport="${queryport:-"25577"}" + maxplayers="${maxplayers:-"0"}" + configip="${configip:-"0.0.0.0"}" fi } @@ -2191,12 +2217,12 @@ fn_info_game_wurm() { configip=$(grep "IP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/IP//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') # Not set - port=${port:-"3724"} - queryport=${queryport:-"27017"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - adminpassword=${adminpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} + port="${port:-"3724"}" + queryport="${queryport:-"27017"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + adminpassword="${adminpassword:-"NOT SET"}" + maxplayers="${maxplayers:-"0"}" fi } @@ -2241,6 +2267,8 @@ elif [ "${shortname}" == "codwaw" ]; then fn_info_game_codwaw elif [ "${shortname}" == "col" ]; then fn_info_game_col +elif [ "${shortname}" == "ct" ]; then + fn_info_game_ct elif [ "${shortname}" == "dayz" ]; then fn_info_game_dayz elif [ "${shortname}" == "dodr" ]; then diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index b4cc65652..a360f6202 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -285,6 +285,11 @@ fn_info_message_gameserver() { echo -e "${lightblue}Display IP:\t${default}${displayip}:${port}" fi + # Server password enabled (Craftopia) + if [ -n "${serverpasswordenabled}" ]; then + echo -e "${lightblue}Server password enabled:\t${default}${serverpasswordenabled}" + fi + # Server password if [ -n "${serverpassword}" ]; then echo -e "${lightblue}Server password:\t${default}${serverpassword}" @@ -664,7 +669,7 @@ fn_info_message_ports_edit() { startparameterslocation="${red}UNKNOWN${default}" # engines/games that require editing in the config file. - local ports_edit_array=("ac" "arma3" "armar" "bo" "bt" "cd" "dst" "eco" "idtech2" "idtech3" "idtech3_ql" "jc2" "jc3" "lwjgl2" "mcb" "nec" "pc" "pc2" "prism3d" "pz" "qw" "refractor" "renderware" "rw" "sb" "sdtd" "st" "stn" "ts3" "tw" "terraria" "unreal" "unreal2" "unreal3" "vints" "wurm") + local ports_edit_array=("ac" "arma3" "armar" "bo" "bt" "cd" "ct" "dst" "eco" "idtech2" "idtech3" "idtech3_ql" "jc2" "jc3" "lwjgl2" "mcb" "nec" "pc" "pc2" "prism3d" "pz" "qw" "refractor" "renderware" "rw" "sb" "sdtd" "st" "stn" "ts3" "tw" "terraria" "unreal" "unreal2" "unreal3" "vints" "wurm") for port_edit in "${ports_edit_array[@]}"; do if [ "${shortname}" == "ut3" ]; then startparameterslocation="${servercfgdir}/UTWeb.ini" @@ -964,7 +969,15 @@ fn_info_message_csgo() { } | column -s $'\t' -t } -fn_info_message_dayz() { +fn_info_message_ct(){ + fn_info_message_password_strip + { + fn_port "header" + fn_port "Game" port udp + } | column -s $'\t' -t +} + +fn_info_message_dayz(){ { fn_port "header" fn_port "Game" port udp @@ -1719,6 +1732,8 @@ fn_info_message_select_engine() { fn_info_message_codwaw elif [ "${shortname}" == "col" ]; then fn_info_message_col + elif [ "${shortname}" == "ct" ]; then + fn_info_message_ct elif [ "${shortname}" == "dayz" ]; then fn_info_message_dayz elif [ "${shortname}" == "dodr" ]; then diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index 9cdb319a9..b0ff4a785 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -381,6 +381,13 @@ elif [ "${shortname}" == "css" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations +elif [ "${shortname}" == "ct" ]; then + gamedirname="Craftopia" + array_configs+=( ServerSetting.ini ) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "dayz" ]; then gamedirname="DayZ" fn_check_cfgdir From ae4cc3b699730ea3250b3493298460eaf63ed9c6 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 26 May 2023 23:33:14 +0100 Subject: [PATCH 150/374] fix(ck): Add libxi6 package to debian distros This commit adds the libxi6 package to the Debian and Ubuntu distribution files. The libxi6 package is required for some games that use X11 input extension library. This change will ensure that LGSM users can install and run these games on their systems without encountering any issues. --- lgsm/data/debian-10.csv | 2 +- lgsm/data/debian-11.csv | 2 +- lgsm/data/debian-12.csv | 2 +- lgsm/data/ubuntu-16.04.csv | 2 +- lgsm/data/ubuntu-18.04.csv | 2 +- lgsm/data/ubuntu-20.04.csv | 2 +- lgsm/data/ubuntu-21.04.csv | 2 +- lgsm/data/ubuntu-21.10.csv | 2 +- lgsm/data/ubuntu-22.04.csv | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index 0009af180..7425cf361 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -20,7 +20,7 @@ bt,libicu-dev,dos2unix btl cc cd -ck,xvfb +ck,xvfb,libxi6 cmw cod,libstdc++5:i386 cod2,libstdc++5:i386 diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index 2ea69fdbb..5aa309c30 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -20,7 +20,7 @@ bt,libicu-dev,dos2unix btl cc cd -ck,xvfb +ck,xvfb,libxi6 cmw cod,libstdc++5:i386 cod2,libstdc++5:i386 diff --git a/lgsm/data/debian-12.csv b/lgsm/data/debian-12.csv index 072b28bc5..d34887dd6 100644 --- a/lgsm/data/debian-12.csv +++ b/lgsm/data/debian-12.csv @@ -20,7 +20,7 @@ bt,libicu-dev,dos2unix btl cc cd -ck,xvfb +ck,xvfb,libxi6 cmw cod,libstdc++5:i386 cod2,libstdc++5:i386 diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index cac4c9659..7b883615c 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -20,7 +20,7 @@ bt,libicu-dev,dos2unix btl cc cd -ck,xvfb +ck,xvfb,libxi6 cmw cod,libstdc++5:i386 cod2,libstdc++5:i386 diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index 0009af180..7425cf361 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -20,7 +20,7 @@ bt,libicu-dev,dos2unix btl cc cd -ck,xvfb +ck,xvfb,libxi6 cmw cod,libstdc++5:i386 cod2,libstdc++5:i386 diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index 29028c16c..93b29f108 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -20,7 +20,7 @@ bt,libicu-dev,dos2unix btl cc cd -ck,xvfb +ck,xvfb,libxi6 cmw cod,libstdc++5:i386 cod2,libstdc++5:i386 diff --git a/lgsm/data/ubuntu-21.04.csv b/lgsm/data/ubuntu-21.04.csv index 2ea69fdbb..5aa309c30 100644 --- a/lgsm/data/ubuntu-21.04.csv +++ b/lgsm/data/ubuntu-21.04.csv @@ -20,7 +20,7 @@ bt,libicu-dev,dos2unix btl cc cd -ck,xvfb +ck,xvfb,libxi6 cmw cod,libstdc++5:i386 cod2,libstdc++5:i386 diff --git a/lgsm/data/ubuntu-21.10.csv b/lgsm/data/ubuntu-21.10.csv index 367dc67f4..af451ca24 100644 --- a/lgsm/data/ubuntu-21.10.csv +++ b/lgsm/data/ubuntu-21.10.csv @@ -20,7 +20,7 @@ bt,libicu-dev,dos2unix btl cc cd -ck,xvfb +ck,xvfb,libxi6 cd cmw cod,libstdc++5:i386 diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index 370fea8fb..1f1cd1c4b 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -20,7 +20,7 @@ bt,libicu-dev,dos2unix btl cc cd -ck,xvfb +ck,xvfb,libxi6 cmw cod,libstdc++5:i386 cod2,libstdc++5:i386 From fd55a294a17b430fa93821e788b298aa0f391dd1 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 26 May 2023 23:40:10 +0100 Subject: [PATCH 151/374] feat: Add Ubuntu 23.04 support Added support for Ubuntu 23.04 by creating a new CSV file with package dependencies for each game server. Also, fixed a minor typo in the info_game.sh script where "most liky" was corrected to "most likely". --- lgsm/data/ubuntu-23.04.csv | 135 +++++++++++++++++++++++++++++++++++++ lgsm/modules/info_game.sh | 2 +- 2 files changed, 136 insertions(+), 1 deletion(-) create mode 100644 lgsm/data/ubuntu-23.04.csv diff --git a/lgsm/data/ubuntu-23.04.csv b/lgsm/data/ubuntu-23.04.csv new file mode 100644 index 000000000..1f1cd1c4b --- /dev/null +++ b/lgsm/data/ubuntu-23.04.csv @@ -0,0 +1,135 @@ +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils +steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd +ac +ahl +ahl2 +ark +arma3 +armar,libcurl4 +ats +av +bb +bb2,libcurl4-gnutls-dev:i386 +bd +bf1942,libncurses5:i386,libtinfo5:i386 +bfv,libncurses5:i386,libstdc++5:i386 +bmdm,libncurses5:i386 +bo +bs +bt,libicu-dev,dos2unix +btl +cc +cd +ck,xvfb,libxi6 +cmw +cod,libstdc++5:i386 +cod2,libstdc++5:i386 +cod4 +coduo,libstdc++5:i386 +codwaw +col +cs +cscz +csgo +css,libtinfo5:i386 +ct +dab +dayz +dmc +dod +dodr +dods +doi +dst,libcurl4-gnutls-dev:i386 +dys +eco,libgdiplus +em +etl +ets2 +fctr +fof +gmod,libtinfo5:i386 +hcu +hl2dm +hldm +hldms +hw,lib32z1 +ins +inss +ios +jc2 +jc3 +jk2 +kf +kf2 +l4d +l4d2 +lo +mc,openjdk-17-jre +mcb +mh +mohaa,libstdc++5:i386 +mom +mta,libncursesw5,libxml2-utils +nd +nec +nmrih,libtinfo5:i386 +ns +ns2,speex,libtbb2 +ns2c,speex:i386,libtbb2 +ohd +onset,libmariadb-dev +opfor +pc +pc2 +pmc,openjdk-17-jre +pstbs,libgconf-2-4 +pvkii +pvr,libc++1 +pz,openjdk-17-jre,rng-tools5 +q2 +q3 +ql +qw +ricochet +ro +rtcw +rust,lib32z1 +rw,openjdk-17-jre +samp +sb +sbots +scpsl,mono-complete +scpslsm,mono-complete +sdtd,telnet,expect,libxml2-utils +sf +sfc,libtinfo5:i386 +sof2 +sol +squad +st +stn +sven,libssl1.1:i386,zlib1g:i386 +terraria +tf2,libcurl4-gnutls-dev:i386 +tfc +ti +ts +ts3 +tu +tw +unt +ut +ut2k4 +ut3 +ut99 +vh,libc6-dev +vints,mono-complete +vpmc,openjdk-17-jre +vs +wet +wf +wmc,openjdk-17-jre +wurm,xvfb +zmr,libtinfo5:i386 +zps,libtinfo5:i386 diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index c7a233c03..5f9b4aaf7 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -2443,7 +2443,7 @@ if [ -z "${displaymasterserver}" ]; then if [ "$(command -v jq 2> /dev/null)" ]; then if [ -n "${ip}" ] && [ -n "${port}" ]; then if [ "${steammaster}" == "true" ] || [ "${commandname}" == "DEV-QUERY-RAW" ]; then - # Query external IP first as most liky to succeed. + # Query external IP first as most likely to succeed. masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${extip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" 'if .response.servers != null then .response.servers[] | select((.gameport == ($port|tonumber) or .gameport == ($queryport|tonumber))) | .addr else empty end' | wc -l 2> /dev/null)" if [ "${masterserver}" == "0" ]; then # Loop though server IP addresses if external IP fails. From a20d72cede689845788faa8ae3423b0a88cfa81a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 27 May 2023 21:38:29 +0100 Subject: [PATCH 152/374] minor fixes --- .../config-lgsm/ns2cserver/_default.cfg | 2 +- .../config-lgsm/ns2server/_default.cfg | 2 +- lgsm/data/debian-9.csv | 2 +- lgsm/functions/core_modules copy.sh | 816 ------------------ lgsm/modules/info_messages.sh | 6 +- 5 files changed, 7 insertions(+), 821 deletions(-) delete mode 100644 lgsm/functions/core_modules copy.sh diff --git a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg index 908ce9727..c1a6251b3 100644 --- a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg @@ -24,7 +24,7 @@ serverpassword="" # -password \"${serverpassword}\" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-name \"${servername}\" -port ${port} -webinterface -webdomain ${ip} -webuser ${httpuser} -webpassword \"${httppassword}\" -webport ${httpport} -map ${defaultmap} -limit ${maxplayers} -config_path \"${servercfgdir}\" -modstorage \"${modstoragedir}\" -mods \"${mods}\"" +startparameters="-name \"${servername}\" -port ${port} -webadmin -webdomain ${ip} -webuser ${httpuser} -webpassword \"${httppassword}\" -webport ${httpport} -map ${defaultmap} -limit ${maxplayers} -config_path \"${servercfgdir}\" -modstorage \"${modstoragedir}\" -mods \"${mods}\"" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/ns2server/_default.cfg b/lgsm/config-default/config-lgsm/ns2server/_default.cfg index 5a6e8e5c7..e41efe7d2 100644 --- a/lgsm/config-default/config-lgsm/ns2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2server/_default.cfg @@ -24,7 +24,7 @@ serverpassword="" # -password \"${serverpassword}\" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-name \"${servername}\" -port ${port} -webinterface -webdomain ${ip} -webuser ${httpuser} -webpassword \"${httppassword}\" -webport ${httpport} -map ${defaultmap} -limit ${maxplayers} -config_path \"${servercfgdir}\" -logdir \"${gamelogdir}\" -modstorage \"${modstoragedir}\" -mods2 \"${mods}\"" +startparameters="-name \"${servername}\" -port ${port} -webadmin -webdomain ${ip} -webuser ${httpuser} -webpassword \"${httppassword}\" -webport ${httpport} -map ${defaultmap} -limit ${maxplayers} -config_path \"${servercfgdir}\" -logdir \"${gamelogdir}\" -modstorage \"${modstoragedir}\" -mods2 \"${mods}\"" #### LinuxGSM Settings #### diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index 690591705..17c6d7d8b 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -20,7 +20,7 @@ bt,libicu-dev,dos2unix btl cc cd -ck,xvfb +ck,xvfb,libxi6 cmw cod,libstdc++5:i386 cod2,libstdc++5:i386 diff --git a/lgsm/functions/core_modules copy.sh b/lgsm/functions/core_modules copy.sh deleted file mode 100644 index 8eb843b5a..000000000 --- a/lgsm/functions/core_modules copy.sh +++ /dev/null @@ -1,816 +0,0 @@ -#!/bin/bash -# LinuxGSM core_modules.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Defines all modules to allow download and execution of modules using fn_fetch_module. -# This module is called first before any other module. Without this file other modules will not load. - -moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -modulesversion="v23.2.0" - -# Core - -core_dl.sh() { - modulefile="${FUNCNAME[0]}" - if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then - fn_fetch_core_dl "lgsm/modules" "core_dl.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" - else - fn_bootstrap_fetch_file_github "lgsm/modules" "core_dl.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" - fi -} - -core_messages.sh() { - modulefile="${FUNCNAME[0]}" - if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then - fn_fetch_core_dl "lgsm/modules" "core_messages.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" - else - fn_bootstrap_fetch_file_github "lgsm/modules" "core_messages.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" - fi -} - -core_legacy.sh() { - modulefile="${FUNCNAME[0]}" - if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then - fn_fetch_core_dl "lgsm/modules" "core_legacy.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" - else - fn_bootstrap_fetch_file_github "lgsm/modules" "core_legacy.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" - fi -} - -core_exit.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -core_getopt.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -core_trap.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -core_steamcmd.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -core_github.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -# Commands - -command_backup.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_console.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_debug.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_details.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_sponsor.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_postdetails.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_test_alert.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_monitor.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_start.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_stop.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_validate.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_install.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_install_resources_mta.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_squad_license.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_mods_install.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_mods_update.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_mods_remove.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_fastdl.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_ts3_server_pass.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_restart.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_skeleton.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_wipe.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_send.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -# Checks - -check.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -check_config.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -check_deps.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -check_executable.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -check_glibc.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -check_ip.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -check_last_update.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -check_logs.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -check_permissions.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -check_root.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -check_status.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -check_steamcmd.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -check_system_dir.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -check_system_requirements.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -check_tmuxception.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -check_version.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -# Compress - -compress_unreal2_maps.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -compress_ut99_maps.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -# Mods - -mods_list.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -mods_core.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -# Dev - -command_dev_clear_modules.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_dev_debug.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_dev_detect_deps.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_dev_detect_glibc.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_dev_detect_ldd.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_dev_query_raw.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -# Fix - -fix.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_ark.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_av.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_arma3.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_armar.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_bt.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_bo.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_cmw.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_csgo.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_dst.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_hw.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_ins.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_kf.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_kf2.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_lo.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_mcb.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_mta.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_nmrih.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_onset.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_ro.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_rust.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_rw.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_sfc.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_st.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_steamcmd.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_terraria.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_tf2.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_ut3.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_rust.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_samp.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_sdtd.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_sof2.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_squad.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_ts3.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_ut2k4.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_ut.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_unt.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_vh.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_wurm.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_zmr.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -# Info - -info_distro.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -info_game.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -info_messages.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -info_stats.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -# Alert - -alert.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -alert_discord.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -alert_email.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -alert_ifttt.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -alert_mailgun.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -alert_pushbullet.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -alert_pushover.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -alert_gotify.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -alert_telegram.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -alert_rocketchat.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -alert_slack.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} -# Logs - -core_logs.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -# Query - -query_gamedig.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -# Update - -command_update_modules.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_update_linuxgsm.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_update.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_check_update.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -update_ts3.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -update_minecraft.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -update_minecraft_bedrock.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -update_papermc.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -update_mta.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -update_factorio.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -update_jediknight2.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -update_steamcmd.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -update_vintagestory.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -update_ut99.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fn_update_modules.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -# -## Installer modules -# - -fn_autoinstall() { - autoinstall=1 - command_install.sh -} - -install_complete.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_config.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_factorio_save.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_dst_token.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_eula.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_gsquery.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_gslt.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_header.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_logs.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_retry.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_server_dir.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} -install_server_files.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_stats.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_steamcmd.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_ts3.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_ts3db.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_ut2k4.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_dl_ut2k4.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_ut2k4_key.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -# Calls code required for legacy servers -core_legacy.sh - -# Creates tmp dir if missing -if [ ! -d "${tmpdir}" ]; then - mkdir -p "${tmpdir}" -fi - -# Creates lock dir if missing -if [ ! -d "${lockdir}" ]; then - mkdir -p "${lockdir}" -fi - -# Calls on-screen messages (bootstrap) -core_messages.sh - -#Calls file downloader (bootstrap) -core_dl.sh - -# Calls the global Ctrl-C trap -core_trap.sh diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index a360f6202..13fe28535 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -680,7 +680,7 @@ fn_info_message_ports_edit() { fi done # engines/games that require editing the start parameters. - local ports_edit_array=("av" "ck" "col" "fctr" "goldsrc" "hw" "iw3.0" "ioquake3" "qfusion" "rust" "scpsl" "scpslsm" "sol" "spark" "source" "unreal4" "arma3" "dayz" "unt" "vh") + local ports_edit_array=("av" "ck" "col" "fctr" "goldsrc" "hcu" "hw" "iw3.0" "ioquake3" "qfusion" "rust" "scpsl" "scpslsm" "sol" "spark" "source" "unreal4" "arma3" "dayz" "unt" "vh") for port_edit in "${ports_edit_array[@]}"; do if [ "${engine}" == "${port_edit}" ] || [ "${gamename}" == "${port_edit}" ] || [ "${shortname}" == "${port_edit}" ]; then startparameterslocation="${configdirserver}" @@ -1037,7 +1037,7 @@ fn_info_message_goldsrc() { } | column -s $'\t' -t } -fn_ingo_message_hcu(){ +fn_info_message_hcu(){ { fn_port "header" fn_port "Game" port udp @@ -1746,6 +1746,8 @@ fn_info_message_select_engine() { fn_info_message_etl elif [ "${shortname}" == "fctr" ]; then fn_info_message_fctr + elif [ "${shortname}" == "hcu" ]; then + fn_info_message_hcu elif [ "${shortname}" == "hw" ]; then fn_info_message_hw elif [ "${shortname}" == "ins" ]; then From 5905cad50f8b48415fac1713a57ca929de9bec0b Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 27 May 2023 22:53:40 +0100 Subject: [PATCH 153/374] config tidy up --- .../config-lgsm/acserver/_default.cfg | 2 -- .../config-lgsm/avserver/_default.cfg | 2 -- .../config-lgsm/boserver/_default.cfg | 1 - .../config-lgsm/dayzserver/_default.cfg | 4 ---- .../config-lgsm/hcuserver/_default.cfg | 15 ++++++++++++--- .../config-lgsm/necserver/_default.cfg | 1 + .../config-lgsm/rustserver/_default.cfg | 4 ++-- 7 files changed, 15 insertions(+), 14 deletions(-) diff --git a/lgsm/config-default/config-lgsm/acserver/_default.cfg b/lgsm/config-default/config-lgsm/acserver/_default.cfg index 8d572b695..80595da51 100644 --- a/lgsm/config-default/config-lgsm/acserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/acserver/_default.cfg @@ -12,8 +12,6 @@ steamuser="username" steampass='password' -## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters - ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters startparameters="-c ${servercfgfullpath}" diff --git a/lgsm/config-default/config-lgsm/avserver/_default.cfg b/lgsm/config-default/config-lgsm/avserver/_default.cfg index a77e347a8..e22333aac 100644 --- a/lgsm/config-default/config-lgsm/avserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/avserver/_default.cfg @@ -8,8 +8,6 @@ #### Game Server Settings #### -## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters - ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters startparameters="--galaxy-name ${selfname} --ip ${ip} --datapath ${avdatapath}" diff --git a/lgsm/config-default/config-lgsm/boserver/_default.cfg b/lgsm/config-default/config-lgsm/boserver/_default.cfg index 4f44086c2..0cea5eb30 100644 --- a/lgsm/config-default/config-lgsm/boserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/boserver/_default.cfg @@ -12,7 +12,6 @@ # GSLT can be used for running a public server. # More info: https://docs.linuxgsm.com/steamcmd/gslt gslt="" -ip="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters startparameters="-batchmode -nographics -dedicated -configfile=${servercfgfullpath}" diff --git a/lgsm/config-default/config-lgsm/dayzserver/_default.cfg b/lgsm/config-default/config-lgsm/dayzserver/_default.cfg index d6d63d2b1..57ee4fb4d 100644 --- a/lgsm/config-default/config-lgsm/dayzserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dayzserver/_default.cfg @@ -8,10 +8,6 @@ #### Game Server Settings #### -## SteamCMD Login | https://docs.linuxgsm.com/steamcmd#steamcmd-login -# steamuser="username" -# steampass='password' - ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" port="2302" diff --git a/lgsm/config-default/config-lgsm/hcuserver/_default.cfg b/lgsm/config-default/config-lgsm/hcuserver/_default.cfg index 7fa7fd3b0..7ab893f52 100644 --- a/lgsm/config-default/config-lgsm/hcuserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hcuserver/_default.cfg @@ -9,11 +9,11 @@ #### Game Server Settings #### ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters +defaultmap="KidsBedroom" ip="0.0.0.0" +maxplayers="8" port="7777" queryport="27015" -defaultmap="KidsBedroom" -maxplayers="8" servername="LinuxGSM" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters @@ -52,6 +52,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" @@ -119,7 +124,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid -appid="1045940"s +appid="1045940" steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" @@ -188,3 +193,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/necserver/_default.cfg b/lgsm/config-default/config-lgsm/necserver/_default.cfg index ceb42033e..a64c8792c 100644 --- a/lgsm/config-default/config-lgsm/necserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/necserver/_default.cfg @@ -7,6 +7,7 @@ # [instance].cfg - applies settings to a specific instance. #### Game Server Settings #### + ## Pre-defined Paramters | https://docs.linuxgsm.com/configuration/start-parameters#predefined-parameters worldname="MyWorld" diff --git a/lgsm/config-default/config-lgsm/rustserver/_default.cfg b/lgsm/config-default/config-lgsm/rustserver/_default.cfg index acda7f6e4..6a679f168 100644 --- a/lgsm/config-default/config-lgsm/rustserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rustserver/_default.cfg @@ -12,8 +12,8 @@ ip="0.0.0.0" port="28015" rconport="28016" -appport=28082 -queryport=28017 +appport="28082" +queryport="28017" rconpassword="CHANGE_ME" rconweb="1" # Value is: 1 for the Facepunch web panel, Rustadmin desktop and Rustadmin Online; 0 for RCON tools like Rusty. servername="Rust" From 0d3402d3ab2218e42a3cca8226aafe766fdaad51 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 28 May 2023 00:02:22 +0100 Subject: [PATCH 154/374] remove duplicate --- lgsm/data/ubuntu-21.10.csv | 1 - 1 file changed, 1 deletion(-) diff --git a/lgsm/data/ubuntu-21.10.csv b/lgsm/data/ubuntu-21.10.csv index af451ca24..5aa309c30 100644 --- a/lgsm/data/ubuntu-21.10.csv +++ b/lgsm/data/ubuntu-21.10.csv @@ -21,7 +21,6 @@ btl cc cd ck,xvfb,libxi6 -cd cmw cod,libstdc++5:i386 cod2,libstdc++5:i386 From e12353b21cf05218aabdc8dbd5e58b6518cc9ec3 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 28 May 2023 14:07:29 +0100 Subject: [PATCH 155/374] Release v23.3.0 --- lgsm/functions/core_functions.sh | 2 +- lgsm/functions/core_modules.sh | 2 +- lgsm/modules/core_functions.sh | 2 +- lgsm/modules/core_modules.sh | 2 +- linuxgsm.sh | 2 +- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index b301b7e46..50c69522e 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -8,7 +8,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.2.3" +modulesversion="v23.3.0" # Core diff --git a/lgsm/functions/core_modules.sh b/lgsm/functions/core_modules.sh index 81a7a5ab6..fd98349bc 100644 --- a/lgsm/functions/core_modules.sh +++ b/lgsm/functions/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.2.3" +modulesversion="v23.3.0" # Core diff --git a/lgsm/modules/core_functions.sh b/lgsm/modules/core_functions.sh index 57e6d96d8..c6f926451 100644 --- a/lgsm/modules/core_functions.sh +++ b/lgsm/modules/core_functions.sh @@ -8,7 +8,7 @@ module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.2.3" +modulesversion="v23.3.0" # Core diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index dd5334e5a..a950e8c22 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.2.3" +modulesversion="v23.3.0" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index 683b75710..787fb3a35 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.2.3" +version="v23.3.0" shortname="core" gameservername="core" commandname="CORE" diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index a8d1161f2..e3a5ab80e 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.2.3" +version="v23.3.0" shortname="fctr" gameservername="fctrserver" commandname="CORE" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 041b4c6d8..29ed21ab2 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.2.3" +version="v23.3.0" shortname="jc2" gameservername="jc2server" commandname="CORE" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 009d97608..155275c30 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.2.3" +version="v23.3.0" shortname="mc" gameservername="mcserver" commandname="CORE" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 1db76c279..82533f557 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.2.3" +version="v23.3.0" shortname="ts3" gameservername="ts3server" commandname="CORE" From 1c78d4b06f0c2969b0d45c37167d8f74def1a4fe Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 28 May 2023 15:11:16 +0100 Subject: [PATCH 156/374] fix(sdtd): resolve sdtd details not collecting note xmllint is now required to gather details for sdtd This commit updates the server details to include new fields such as Internet IP, Server IP, Telnet Enabled, Telnet Password and Telnet Port. It also updates the game info for 7 Days to Die to use different XML tags for retrieving values. --- lgsm/modules/command_dev_details.sh | 6 +++- lgsm/modules/info_game.sh | 47 +++++++++++++++-------------- lgsm/modules/info_messages.sh | 1 - 3 files changed, 29 insertions(+), 25 deletions(-) diff --git a/lgsm/modules/command_dev_details.sh b/lgsm/modules/command_dev_details.sh index 330d7e2cd..28abb87b1 100644 --- a/lgsm/modules/command_dev_details.sh +++ b/lgsm/modules/command_dev_details.sh @@ -44,7 +44,7 @@ declare -A server_details=( ['HTTP Password']="${httppassword}" ['HTTP Port']="${httpport}" ['HTTP User']="${httpuser}" - ['ip']="${ip}" + ['Internet IP']="${extip}" ['LAN Port']="${lanport}" ['Master Port']="${masterport}" ['Master']="${master}" @@ -56,12 +56,16 @@ declare -A server_details=( ['RCON Password']="${rconpassword}" ['RCON Port']="${rconport}" ['Reserved Slots']="${reservedslots}" + ['Server IP']="${ip}" ['Server Password']="${serverpassword}" ['Servername']="${servername}" ['Shard']="${shard}" ['Sharding']="${sharding}" ['Steam Auth Port']="${steamauthport}" + ['Telnet Enabled']="${telnetenabled}" ['Telnet IP']="${telnetip}" + ['Telnet Password']="${telnetpassword}" + ['Telnet Port']="${telnetport}" ['Tickrate']="${tickrate}" ['World Name']="${worldname}" ['World Type']="${worldtype}" diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 5f9b4aaf7..8b91629c0 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -1883,38 +1883,39 @@ fn_info_game_scpsl() { # Filetype: xml fn_info_game_sdtd() { if [ -f "${servercfgfullpath}" ]; then - fn_info_game_xml "gamemode" "ServerSettings/@GameMode" - fn_info_game_xml "maxplayers" "ServerSettings/@MaxPlayers" - fn_info_game_xml "servername" "ServerSettings/@ServerName" - fn_info_game_xml "serverpassword" "ServerSettings/@ServerPassword" - fn_info_game_xml "serverport" "ServerSettings/@ServerPort" - fn_info_game_xml "telnetenabled" "ServerSettings/@TelnetEnabled" - fn_info_game_xml "telnetpass" "ServerSettings/@TelnetPassword" - fn_info_game_xml "telnetport" "ServerSettings/@TelnetPort" - fn_info_game_xml "httpenabled" "ServerSettings/@ControlPanelEnabled" - fn_info_game_xml "httppassword" "ServerSettings/@ControlPanelPassword" - fn_info_game_xml "httpport" "ServerSettings/@ControlPanelPort" - fn_info_game_xml "worldname" "ServerSettings/@GameWorld" - + fn_info_game_xml "gamemode" "/ServerSettings/property[@name='GameMode']/@value" + fn_info_game_xml "httpenabled" "/ServerSettings/property[@name='ControlPanelEnabled']/@value" + fn_info_game_xml "httppassword" "/ServerSettings/property[@name='ControlPanelPassword']/@value" + fn_info_game_xml "httpport" "/ServerSettings/property[@name='ControlPanelPort']/@value" + fn_info_game_xml "maxplayers" "/ServerSettings/property[@name='ServerMaxPlayerCount']/@value" + fn_info_game_xml "servername" "/ServerSettings/property[@name='ServerName']/@value" + fn_info_game_xml "serverpassword" "/ServerSettings/property[@name='ServerPassword']/@value" + fn_info_game_xml "port" "/ServerSettings/property[@name='ServerPort']/@value" + fn_info_game_xml "telnetenabled" "/ServerSettings/property[@name='TelnetEnabled']/@value" + fn_info_game_xml "telnetpass" "/ServerSettings/property[@name='TelnetPassword']/@value" + fn_info_game_xml "telnetport" "/ServerSettings/property[@name='TelnetPort']/@value" + fn_info_game_xml "worldname" "/ServerSettings/property[@name='GameWorld']/@value" fi - servername="${servername:-"NOT SET"}" - serverpassword="${serverpassword:-"NOT SET"}" - port="${port:-"0"}" - queryport="${queryport:-"0"}" + gamemode="${gamemode:-"NOT SET"}" httpenabled="${httpenabled:-"NOT SET"}" - httpport="${httpport:-"0"}" httppassword="${httppassword:-"NOT SET"}" - telnetenabled="${telnetenabled:-"NOT SET"}" - telnetport="${telnetport:-"0"}" - telnetpass="${telnetpass:-"NOT SET"}" + httpport="${httpport:-"0"}" maxplayers="${maxplayers:-"0"}" - gamemode="${gamemode:-"NOT SET"}" - worldname="${worldname:-"NOT SET"}" + port="${port:-"0"}" + port3="$((port + 2))" + queryport="${port:-"0"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + telnetenabled="${telnetenabled:-"NOT SET"}" # Telnet IP will be localhost if no password is set # check_ip will set the IP first. This will overwrite it. if [ -z "${telnetpass}" ]; then telnetip="127.0.0.1" fi + telnetpass="${telnetpass:-"NOT SET"}" + telnetport="${telnetport:-"0"}" + worldname="${worldname:-"NOT SET"}" + } # Config Type: Parameters (with an ini) diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index 13fe28535..520dfa58e 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -1411,7 +1411,6 @@ fn_info_message_sdtd() { { echo -e "${lightblue}Web Interface enabled:\t${default}${httpenabled}" echo -e "${lightblue}Web Interface url:\t${default}http://${httpip}:${httpport}/index.html" - echo -e "${lightblue}Web Interface username:\t${default}${httpuser}" echo -e "${lightblue}Web Interface password:\t${default}${httppassword}" } | column -s $'\t' -t echo -e "" From 9e85791e3255ab9823ce5af92dde073fc6f61686 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 28 May 2023 15:14:02 +0100 Subject: [PATCH 157/374] Release v23.3.1 --- lgsm/functions/core_functions.sh | 2 +- lgsm/functions/core_modules.sh | 2 +- lgsm/modules/core_functions.sh | 2 +- lgsm/modules/core_modules.sh | 2 +- linuxgsm.sh | 2 +- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 50c69522e..3c5777c70 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -8,7 +8,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.3.0" +modulesversion="v23.3.1" # Core diff --git a/lgsm/functions/core_modules.sh b/lgsm/functions/core_modules.sh index fd98349bc..80e890d1a 100644 --- a/lgsm/functions/core_modules.sh +++ b/lgsm/functions/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.3.0" +modulesversion="v23.3.1" # Core diff --git a/lgsm/modules/core_functions.sh b/lgsm/modules/core_functions.sh index c6f926451..973181547 100644 --- a/lgsm/modules/core_functions.sh +++ b/lgsm/modules/core_functions.sh @@ -8,7 +8,7 @@ module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.3.0" +modulesversion="v23.3.1" # Core diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index a950e8c22..827e62888 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.3.0" +modulesversion="v23.3.1" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index 787fb3a35..30531fa75 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.0" +version="v23.3.1" shortname="core" gameservername="core" commandname="CORE" diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index e3a5ab80e..6ecaad71a 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.0" +version="v23.3.1" shortname="fctr" gameservername="fctrserver" commandname="CORE" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 29ed21ab2..7eb3fe2b2 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.0" +version="v23.3.1" shortname="jc2" gameservername="jc2server" commandname="CORE" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 155275c30..4275b1f67 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.0" +version="v23.3.1" shortname="mc" gameservername="mcserver" commandname="CORE" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 82533f557..f7f1cfb8c 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.0" +version="v23.3.1" shortname="ts3" gameservername="ts3server" commandname="CORE" From 56d222041f58743877540136b301408a52a5aa13 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 28 May 2023 15:48:00 +0100 Subject: [PATCH 158/374] fix(sdtd): add port3 to master server query this will allow master server query to work for sdtd --- lgsm/modules/info_game.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 8b91629c0..b90033d9c 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -2444,12 +2444,12 @@ if [ -z "${displaymasterserver}" ]; then if [ "$(command -v jq 2> /dev/null)" ]; then if [ -n "${ip}" ] && [ -n "${port}" ]; then if [ "${steammaster}" == "true" ] || [ "${commandname}" == "DEV-QUERY-RAW" ]; then - # Query external IP first as most likely to succeed. - masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${extip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" 'if .response.servers != null then .response.servers[] | select((.gameport == ($port|tonumber) or .gameport == ($queryport|tonumber))) | .addr else empty end' | wc -l 2> /dev/null)" + # Query external IP first as most liky to succeed. + masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${extip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" --arg port3 "${port3}" 'if .response.servers != null then .response.servers[] | select((.gameport == ($port|tonumber) or .gameport == ($queryport|tonumber) or .gameport == ($port3|tonumber))) | .addr else empty end' | wc -l 2> /dev/null)" if [ "${masterserver}" == "0" ]; then # Loop though server IP addresses if external IP fails. for queryip in "${queryips[@]}"; do - masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${queryip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" 'if .response.servers != null then .response.servers[] | select((.gameport == ($port|tonumber) or .gameport == ($queryport|tonumber))) | .addr else empty end' | wc -l 2> /dev/null)" + masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${queryip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" --arg port3 "${port3}" 'if .response.servers != null then .response.servers[] | select((.gameport == ($port|tonumber) or .gameport == ($queryport|tonumber) or .gameport == ($port3|tonumber))) | .addr else empty end' | wc -l 2> /dev/null)" done fi if [ "${masterserver}" == "0" ]; then From 778b004b7f2f7efbc2dc6a712b845858266729c3 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 28 May 2023 16:00:55 +0100 Subject: [PATCH 159/374] change core_functions to older version v23.2.3 --- lgsm/functions/core_functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 3c5777c70..b301b7e46 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -8,7 +8,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.3.1" +modulesversion="v23.2.3" # Core From bacb12441a7bc370dc7297ffe7a17666db4ad47e Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 28 May 2023 22:55:26 +0100 Subject: [PATCH 160/374] docs: update Squad server license link The script now points to the updated wiki page for information on obtaining a server license. The old forum link has been replaced with the new one. --- lgsm/modules/install_squad_license.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/install_squad_license.sh b/lgsm/modules/install_squad_license.sh index 58053e134..75499f4a0 100644 --- a/lgsm/modules/install_squad_license.sh +++ b/lgsm/modules/install_squad_license.sh @@ -15,9 +15,9 @@ echo -e "Server license is an optional feature for ${gamename} server" fn_script_log_info "Server license is an optional feature for ${gamename} server" echo -e "Get more info and a server license here:" -echo -e "http://forums.joinsquad.com/topic/16519-server-licensing-general-info/" +echo -e "https://squad.fandom.com/wiki/Server_licensing" fn_script_log_info "Get more info and a server license here:" -fn_script_log_info "http://forums.joinsquad.com/topic/16519-server-licensing-general-info/" +fn_script_log_info "https://squad.fandom.com/wiki/Server_licensing" echo -e "" fn_sleep_time echo -e "The Squad server license can be changed by editing ${servercfgdir}/License.cfg." From d170895d44f42b5f46ef367175b29e44af8aead5 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 29 May 2023 00:03:59 +0100 Subject: [PATCH 161/374] feat(info_game): add default queryport and port3 values This commit adds default values of 123456789 for queryport and port3 if they are not set. This is to prevent the query from failing. Additionally, this commit unsets the ports if they are set to 123456789. --- lgsm/modules/info_game.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index b90033d9c..f355e683d 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -2441,6 +2441,14 @@ fi # Steam Master Server - checks if detected by master server. # Checked after config init, as the queryport is needed if [ -z "${displaymasterserver}" ]; then + # if queryport and port3 are not set then set them to 123456789 + # this is to prevent the query from failing. + if [ -z "${queryport}" ]; then + queryport="123456789" + fi + if [ -z "${port3}" ]; then + port3="123456789" + fi if [ "$(command -v jq 2> /dev/null)" ]; then if [ -n "${ip}" ] && [ -n "${port}" ]; then if [ "${steammaster}" == "true" ] || [ "${commandname}" == "DEV-QUERY-RAW" ]; then @@ -2460,4 +2468,11 @@ if [ -z "${displaymasterserver}" ]; then fi fi fi + # unset the ports if they are set to 123456789 + if [ "${port3}" == "123456789" ]; then + unset port3 + fi + if [ "${queryport}" == "123456789" ]; then + unset queryport + fi fi From 29ff74cba3bb67da32070705ba5420bd7cd8fcce Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 28 May 2023 22:55:26 +0100 Subject: [PATCH 162/374] docs: update Squad server license link The script now points to the updated wiki page for information on obtaining a server license. The old forum link has been replaced with the new one. --- lgsm/modules/install_squad_license.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/install_squad_license.sh b/lgsm/modules/install_squad_license.sh index 58053e134..75499f4a0 100644 --- a/lgsm/modules/install_squad_license.sh +++ b/lgsm/modules/install_squad_license.sh @@ -15,9 +15,9 @@ echo -e "Server license is an optional feature for ${gamename} server" fn_script_log_info "Server license is an optional feature for ${gamename} server" echo -e "Get more info and a server license here:" -echo -e "http://forums.joinsquad.com/topic/16519-server-licensing-general-info/" +echo -e "https://squad.fandom.com/wiki/Server_licensing" fn_script_log_info "Get more info and a server license here:" -fn_script_log_info "http://forums.joinsquad.com/topic/16519-server-licensing-general-info/" +fn_script_log_info "https://squad.fandom.com/wiki/Server_licensing" echo -e "" fn_sleep_time echo -e "The Squad server license can be changed by editing ${servercfgdir}/License.cfg." From 7ddbbfd64ae768654ea4aaf9c68ab4bbd5b65a18 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 29 May 2023 00:05:18 +0100 Subject: [PATCH 163/374] feat: improve error message for unknown game server (#4218) The code changes modify the error message displayed when an unknown game server is entered. The new message now capitalizes the first letter of "unknown" and adds an exit status of 1 to terminate the script. --- linuxgsm.sh | 3 ++- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index 30531fa75..1a5b21904 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -369,7 +369,8 @@ if [ "${shortname}" == "core" ]; then if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then fn_install_file else - echo -e "[ FAIL ] unknown game server" + echo -e "[ FAIL ] Unknown game server" + exit 1 fi else fn_install_getopt diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index 6ecaad71a..fb9cfd5c0 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -369,7 +369,7 @@ if [ "${shortname}" == "core" ]; then if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then fn_install_file else - echo -e "[ FAIL ] unknown game server" + echo -e "[ FAIL ] Unknown game server" fi else fn_install_getopt diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 7eb3fe2b2..999e191fb 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -370,7 +370,7 @@ if [ "${shortname}" == "core" ]; then if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then fn_install_file else - echo -e "[ FAIL ] unknown game server" + echo -e "[ FAIL ] Unknown game server" fi else fn_install_getopt diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 4275b1f67..75656e14a 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -370,7 +370,7 @@ if [ "${shortname}" == "core" ]; then if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then fn_install_file else - echo -e "[ FAIL ] unknown game server" + echo -e "[ FAIL ] Unknown game server" fi else fn_install_getopt diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index f7f1cfb8c..e3093f3b5 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -370,7 +370,7 @@ if [ "${shortname}" == "core" ]; then if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then fn_install_file else - echo -e "[ FAIL ] unknown game server" + echo -e "[ FAIL ] Unknown game server" fi else fn_install_getopt From cff22244852e0f9731367803c450a4b92b126acd Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 29 May 2023 00:08:52 +0100 Subject: [PATCH 164/374] fix(info_game): fix RCON port and password details for Squad This commit adds the RCON port and password to the info_game function for Squad. The values are retrieved from the Rcon.cfg file if it exists in the server configuration directory. --- lgsm/modules/info_game.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index f355e683d..c3e1a37b3 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -2019,8 +2019,8 @@ fn_info_game_squad() { fn_info_game_keyvalue_pairs "maxplayers" "MaxPlayers" fi if [ -f "${servercfgdir}/Rcon.cfg" ]; then - fn_info_game_keyvalue_pairs "rconport" "Port" - fn_info_game_keyvalue_pairs "rconpassword" "Password" + fn_info_game_keyvalue_pairs "rconport" "Port" "${servercfgdir}/Rcon.cfg" + fn_info_game_keyvalue_pairs "rconpassword" "Password" "${servercfgdir}/Rcon.cfg" fi maxplayers="${maxplayers:-"0"}" port="${port:-"0"}" From 19dc1fbf34b39ae449357550c80decc75355c60d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 29 May 2023 01:02:04 +0100 Subject: [PATCH 165/374] fix: Update function name and arguments in info_game.sh The fn_info_config_ini function was renamed to fn_info_game_ini for consistency with other functions. The function arguments were also updated to match the new naming convention. --- lgsm/modules/info_game.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index c3e1a37b3..4039d9b74 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -1954,11 +1954,11 @@ fn_info_game_sof2() { # Filetype: ini fn_info_game_sol() { if [ -f "${servercfgfullpath}" ]; then - fn_info_config_ini "adminpassword" "Admin_Password" - fn_info_config_ini "maxplayers" "Max_Players" - fn_info_config_ini "port" "Port" - fn_info_config_ini "servername" "Server_Name" - fn_info_config_ini "serverpassword" "Game_Password" + fn_info_game_ini "adminpassword" "Admin_Password" + fn_info_game_ini "maxplayers" "Max_Players" + fn_info_game_ini "port" "Port" + fn_info_game_ini "servername" "Server_Name" + fn_info_game_ini "serverpassword" "Game_Password" fi adminpassword="${adminpassword:-"NOT SET"}" maxplayers="${maxplayers:-"0"}" From ba7c795b513bc8b2a99ef18f18a1d8ff24b2681a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 29 May 2023 01:18:23 +0100 Subject: [PATCH 166/374] fix: repair Starbound details This commit updates the info_game.sh file by changing the servercfgfullpath variable to servercfgparse in line 96. It also modifies the fn_info_game_sb function to check if the server config file exists before parsing it, and changes the JSON keys in lines 1828-1836 from camelCase to dot notation. --- lgsm/modules/info_game.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 4039d9b74..d2714ec3e 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -93,7 +93,7 @@ fn_info_game_json() { else servercfgparse="${servercfgfullpath}" fi - eval "${1}=\"$(jq -r "${2}" "${servercfgfullpath}")\"" + eval "${1}=\"$(jq -r "${2}" "${servercfgparse}")\"" configtype="json" } @@ -1826,15 +1826,15 @@ fn_info_game_samp() { # Parameters: false # Comment: // or /* */ fn_info_game_sb() { - if [ ! -f "${servercfgfullpath}" ]; then - fn_info_game_json "maxplayers" "maxPlayers" - fn_info_game_json "port" "gameServerPort" - fn_info_game_json "queryenabled" "runQueryServer" - fn_info_game_json "queryport" "queryServerPort" - fn_info_game_json "rconenabled" "runRconServer" - fn_info_game_json "rconpassword" "rconServerPassword" - fn_info_game_json "rconport" "rconServerPort" - fn_info_game_json "servername" "serverName" + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_json "maxplayers" ".maxPlayers" + fn_info_game_json "port" ".gameServerPort" + fn_info_game_json "queryenabled" ".runQueryServer" + fn_info_game_json "queryport" ".queryServerPort" + fn_info_game_json "rconenabled" ".runRconServer" + fn_info_game_json "rconpassword" ".rconServerPassword" + fn_info_game_json "rconport" ".rconServerPort" + fn_info_game_json "servername" ".serverName" fi maxplayers="${maxplayers:-"0"}" port="${port:-"0"}" From 58c173db61cf9a113202f8b3c49e5f248fd3f314 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 29 May 2023 19:48:16 +0100 Subject: [PATCH 167/374] Release v23.3.2 --- lgsm/modules/core_functions.sh | 2 +- lgsm/modules/core_modules.sh | 2 +- linuxgsm.sh | 2 +- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lgsm/modules/core_functions.sh b/lgsm/modules/core_functions.sh index 973181547..ff0fe50de 100644 --- a/lgsm/modules/core_functions.sh +++ b/lgsm/modules/core_functions.sh @@ -8,7 +8,7 @@ module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.3.1" +modulesversion="v23.3.2" # Core diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index 827e62888..71a3180c0 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.3.1" +modulesversion="v23.3.2" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index 1a5b21904..4e3d27e15 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.1" +version="v23.3.2" shortname="core" gameservername="core" commandname="CORE" diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index fb9cfd5c0..f135c98eb 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.1" +version="v23.3.2" shortname="fctr" gameservername="fctrserver" commandname="CORE" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 999e191fb..2f0204f7b 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.1" +version="v23.3.2" shortname="jc2" gameservername="jc2server" commandname="CORE" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 75656e14a..38b39e62d 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.1" +version="v23.3.2" shortname="mc" gameservername="mcserver" commandname="CORE" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index e3093f3b5..d3e73133d 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.1" +version="v23.3.2" shortname="ts3" gameservername="ts3server" commandname="CORE" From d76e65eadf78bf539dcce73d00162fce1f609b78 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 29 May 2023 21:24:00 +0100 Subject: [PATCH 168/374] chore: add details to details check --- .github/workflows/details-check.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/details-check.yml b/.github/workflows/details-check.yml index b268bd03d..7b04f2036 100644 --- a/.github/workflows/details-check.yml +++ b/.github/workflows/details-check.yml @@ -67,6 +67,9 @@ jobs: - name: Display parameters run: grep "startparameters" lgsm/config-default/config-lgsm/${{ matrix.shortname }}server/_default.cfg + - name: Details + run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server details + - name: Detect details run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server detect-details From 2e00adc109380625d929fc84f9c8d26ab039e0fa Mon Sep 17 00:00:00 2001 From: Brandon Frohs Date: Fri, 9 Jun 2023 11:35:34 -0400 Subject: [PATCH 169/374] fix(mcb): update version check to account for a colon (#4227) * update version check to account for a colon --------- Co-authored-by: Daniel Gibbs --- lgsm/functions/update_minecraft_bedrock.sh | 2 +- lgsm/modules/update_minecraft_bedrock.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/update_minecraft_bedrock.sh b/lgsm/functions/update_minecraft_bedrock.sh index aec940126..c17088171 100644 --- a/lgsm/functions/update_minecraft_bedrock.sh +++ b/lgsm/functions/update_minecraft_bedrock.sh @@ -34,7 +34,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 Version "${consolelogdir}"/* 2> /dev/null | tail -1 | sed 's/.*Version: //' | tr -d '\000-\011\013-\037') if [ -z "${localbuild}" ]; then fn_print_error "Checking local build: ${remotelocation}: missing local build info" fn_script_log_error "Missing local build info" diff --git a/lgsm/modules/update_minecraft_bedrock.sh b/lgsm/modules/update_minecraft_bedrock.sh index 075286096..3c3885a9d 100644 --- a/lgsm/modules/update_minecraft_bedrock.sh +++ b/lgsm/modules/update_minecraft_bedrock.sh @@ -34,7 +34,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 Version "${consolelogdir}"/* 2> /dev/null | tail -1 | sed 's/.*Version: //' | tr -d '\000-\011\013-\037') if [ -z "${localbuild}" ]; then fn_print_error "Checking local build: ${remotelocation}: missing local build info" fn_script_log_error "Missing local build info" From 71be098ec08e8c63e4f36b6a683e93ed054b405c Mon Sep 17 00:00:00 2001 From: Bibo164 <14028796+Bibo164@users.noreply.github.com> Date: Fri, 9 Jun 2023 17:36:23 +0200 Subject: [PATCH 170/374] fix(pmc): Removed hardcoded project name in update update_papermc.sh (#4225) * fix: Removed hardcoded project name in update update_papermc.sh Script was unable to fetch the proper builds for WaterfallMC due to it checking PaperMC instead. Replaced the hardcoded .../paper/... project name with the already existing ${paperproject} to fix the issue --------- Co-authored-by: Daniel Gibbs --- lgsm/modules/update_papermc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/modules/update_papermc.sh b/lgsm/modules/update_papermc.sh index b7bdee8fd..b70a2d69d 100644 --- a/lgsm/modules/update_papermc.sh +++ b/lgsm/modules/update_papermc.sh @@ -51,7 +51,7 @@ fn_update_remotebuild() { fi fi # Get list of paper builds for specific Minecraft: Java Edition version. - remotebuildresponsemcversion=$(curl -s "${apiurl}/paper/versions/${remotebuildmcversion}") + remotebuildresponsemcversion=$(curl -s "${apiurl}/${paperproject}/versions/${remotebuildmcversion}") # Get latest paper build for specific Minecraft: Java Edition version. remotebuildpaperversion=$(echo "${remotebuildresponsemcversion}" | jq -r '.builds[-1]') # Get various info about the paper build. From 9e347fe9fae88349fb7c0b500d709103847376c7 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 9 Jun 2023 16:38:29 +0100 Subject: [PATCH 171/374] Release v23.3.3 This commit updates the version of the core to v23.3.3. Additionally, it removes updates the .gitignore file. --- .gitignore | 3 +-- linuxgsm.sh | 2 +- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 6 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 8bb6a5b32..e5c465ce2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ -*.db -.idea +.vscode/settings.json /node_modules diff --git a/linuxgsm.sh b/linuxgsm.sh index 4e3d27e15..d8a28d604 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.2" +version="v23.3.3" shortname="core" gameservername="core" commandname="CORE" diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index f135c98eb..3c97fffaf 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.2" +version="v23.3.3" shortname="fctr" gameservername="fctrserver" commandname="CORE" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 2f0204f7b..9604ddb06 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.2" +version="v23.3.3" shortname="jc2" gameservername="jc2server" commandname="CORE" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 38b39e62d..ff2a01b12 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.2" +version="v23.3.3" shortname="mc" gameservername="mcserver" commandname="CORE" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index d3e73133d..bf0bf9fb7 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.2" +version="v23.3.3" shortname="ts3" gameservername="ts3server" commandname="CORE" From 44931f7995b90ad3cc3507a9762eb89ad90980d9 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 9 Jun 2023 16:58:39 +0100 Subject: [PATCH 172/374] feat: swap details-check steps to fail faster if the branch disappears the check will fail straight away rather then spend 1m download dependency's --- .github/workflows/details-check.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/details-check.yml b/.github/workflows/details-check.yml index 7b04f2036..d36a07ef0 100644 --- a/.github/workflows/details-check.yml +++ b/.github/workflows/details-check.yml @@ -31,12 +31,12 @@ jobs: matrix: ${{ fromJSON(needs.create-matrix.outputs.matrix) }} steps: - - name: Install dependencies - run: sudo apt-get install libxml2-utils jq - - name: Download 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 + - name: Grab server run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./linuxgsm.sh ${{ matrix.shortname }}server From 75b47bb2b92a83130f9892630f72985bb34dfad1 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 9 Jun 2023 17:02:15 +0100 Subject: [PATCH 173/374] Release v23.3.3 --- lgsm/modules/core_functions.sh | 2 +- lgsm/modules/core_modules.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/core_functions.sh b/lgsm/modules/core_functions.sh index ff0fe50de..446db1f86 100644 --- a/lgsm/modules/core_functions.sh +++ b/lgsm/modules/core_functions.sh @@ -8,7 +8,7 @@ module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.3.2" +modulesversion="v23.3.3" # Core diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index 71a3180c0..35a919422 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.3.2" +modulesversion="v23.3.3" # Core From e79800567c92474af70f0deb26544dedc5647a3a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 9 Jun 2023 17:02:15 +0100 Subject: [PATCH 174/374] Release v23.3.3 --- lgsm/modules/core_functions.sh | 2 +- lgsm/modules/core_modules.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/core_functions.sh b/lgsm/modules/core_functions.sh index ff0fe50de..446db1f86 100644 --- a/lgsm/modules/core_functions.sh +++ b/lgsm/modules/core_functions.sh @@ -8,7 +8,7 @@ module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.3.2" +modulesversion="v23.3.3" # Core diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index 71a3180c0..35a919422 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.3.2" +modulesversion="v23.3.3" # Core From fa24b0837082c644d56f4331fc51e1e2a1efc676 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 9 Jun 2023 17:10:50 +0100 Subject: [PATCH 175/374] feat: Add concurrency to details-check workflow This commit adds a new feature to the details-check workflow by including concurrency. The group is set to the branch name and cancel-in-progress is enabled. --- .github/workflows/details-check.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/details-check.yml b/.github/workflows/details-check.yml index d36a07ef0..19376a15d 100644 --- a/.github/workflows/details-check.yml +++ b/.github/workflows/details-check.yml @@ -4,6 +4,10 @@ on: workflow_dispatch: push: +concurrency: + group: ${{ github.ref_name }} + cancel-in-progress: true + jobs: create-matrix: runs-on: ubuntu-latest From 2cebdfea66a8ef43050104c1e18bbebf365ba41d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 11 Jun 2023 16:24:04 +0100 Subject: [PATCH 176/374] feat: add header to serverlist.csv (#4231) * feat: add header to serverlist.csv added header to serverlistto help ansible and other tools better work with the csv file * feat: update serverlist menu The script now skips the first line of the serverlist file when generating the list for 'list' and 'install' commands. This ensures that the header is not included in the output. * fix: check details * fix serverlist validate test --- .github/workflows/detals-check-generate-matrix.sh | 2 +- .github/workflows/serverlist-validate.sh | 2 +- lgsm/data/serverlist.csv | 1 + linuxgsm.sh | 4 ++-- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/detals-check-generate-matrix.sh b/.github/workflows/detals-check-generate-matrix.sh index 66f2bd072..14cbb6ee7 100755 --- a/.github/workflows/detals-check-generate-matrix.sh +++ b/.github/workflows/detals-check-generate-matrix.sh @@ -18,7 +18,7 @@ while read -r line; do echo -n "\"shortname\":" >> "shortnamearray.json" echo -n "\"${shortname}\"" >> "shortnamearray.json" echo -n "}," >> "shortnamearray.json" -done < serverlist.csv +done < <(tail -n +2 serverlist.csv) sed -i '$ s/.$//' "shortnamearray.json" echo -n "]" >> "shortnamearray.json" echo -n "}" >> "shortnamearray.json" diff --git a/.github/workflows/serverlist-validate.sh b/.github/workflows/serverlist-validate.sh index b43e803e0..50b2da712 100755 --- a/.github/workflows/serverlist-validate.sh +++ b/.github/workflows/serverlist-validate.sh @@ -3,7 +3,7 @@ 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 "lgsm/data" || exit -serverlistcount="$(wc -l < serverlist.csv)" +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$')" diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 8b2b5c705..7888c7983 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -1,3 +1,4 @@ +shortname,gameservername,gamename,os ac,acserver,Assetto Corsa,ubuntu-22.04 ahl,ahlserver,Action Half-Life,ubuntu-22.04 ahl2,ahl2server,Action: Source,ubuntu-22.04 diff --git a/linuxgsm.sh b/linuxgsm.sh index d8a28d604..b5786e70d 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -347,11 +347,11 @@ if [ "${shortname}" == "core" ]; then if [ "${userinput}" == "list" ] || [ "${userinput}" == "l" ]; then { - tail -n +1 "${serverlist}" | awk -F "," '{print $2 "\t" $3}' + tail -n +2 "${serverlist}" | awk -F "," '{print $2 "\t" $3}' } | column -s $'\t' -t | more exit elif [ "${userinput}" == "install" ] || [ "${userinput}" == "i" ]; then - tail -n +1 "${serverlist}" | awk -F "," '{print $1 "," $2 "," $3}' > "${serverlistmenu}" + tail -n +2 "${serverlist}" | awk -F "," '{print $1 "," $2 "," $3}' > "${serverlistmenu}" fn_install_menu result "LinuxGSM" "Select game server to install." "${serverlistmenu}" userinput="${result}" fn_server_info From 604ff78942bff7c99c9bda28f92cafc37ead1dbc Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 14 Jun 2023 21:49:41 +0100 Subject: [PATCH 177/374] feat: Update details-check.yml to use main branch for Game-Server-Configs The code changes update the details-check.yml file to use the main branch instead of the rename branch for Game-Server-Configs. This ensures that the correct config file is downloaded for game servers. --- .github/workflows/details-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/details-check.yml b/.github/workflows/details-check.yml index 7b04f2036..eaaea86e9 100644 --- a/.github/workflows/details-check.yml +++ b/.github/workflows/details-check.yml @@ -54,7 +54,7 @@ jobs: if [ -z "${{ steps.sets-servercfgname.outputs.servercfgname }}" ]; then echo "This game server has no config file." else - curl -f -o config "https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/rename/${{ matrix.shortname }}/${{ steps.sets-servercfgname.outputs.servercfgname }}" + curl -f -o config "https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/main/${{ matrix.shortname }}/${{ steps.sets-servercfgname.outputs.servercfgname }}" fi - name: Display config run: | From e95d77f38af08dfe980428f264ae1a079433d7e3 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 14 Jun 2023 23:54:31 +0100 Subject: [PATCH 178/374] chore: update GitHub workflow names and add more descriptive names This commit updates the name of several GitHub workflows to use proper capitalization and adds more descriptive names. The changes include: - Add to project workflow: updated name from "Add game server requests to project" to "Add to Project" - Details check workflow: updated name from "Details Check" to "Check LinuxGSM game server config and parameter variables" - Git sync workflow: updated name from "Github to Bitbucket sync" to "Sync GitHub repo with backup Bitbucket repo" - Issue labeler workflow: updated name from "Issue Labeler" to "Automatically label issues based on configuration file" - Lock threads workflow: updated name from "Lock Threads" to "Automatically lock inactive threads after one week" - Potential duplicates workflow: updated name from "Potential Duplicates" to "Detect potential duplicate issues and apply a label" - Server list validation workflow: updated name from "Server list Validation" to Validate LinuxGSM serverlist.json format - Trigger docker build workflow: added more descriptive names for each job - Update copyright years in license file workflow: removed unnecessary dashes at the beginning, added a more concise description - Version check workflow: added a more concise description --- .github/workflows/add-to-project.yml | 6 ++--- .github/workflows/details-check.yml | 9 ++++--- .github/workflows/git-sync.yml | 9 ++++--- .github/workflows/label-sponsors.yml | 14 ---------- .github/workflows/labeler.yml | 26 ++++++++++++------- .github/workflows/lock.yml | 14 +++++----- .github/workflows/potential-duplicates.yml | 19 ++++---------- .github/workflows/serverlist-validate.yml | 7 ++--- .github/workflows/trigger-docker-build.yml | 9 ++++--- ...update-copyright-years-in-license-file.yml | 8 +++--- .github/workflows/version-check.yml | 9 ++++--- 11 files changed, 58 insertions(+), 72 deletions(-) delete mode 100644 .github/workflows/label-sponsors.yml diff --git a/.github/workflows/add-to-project.yml b/.github/workflows/add-to-project.yml index 1a20ef190..e429645bf 100644 --- a/.github/workflows/add-to-project.yml +++ b/.github/workflows/add-to-project.yml @@ -1,4 +1,4 @@ -name: Add to project +name: Add to Project on: issues: types: @@ -7,10 +7,10 @@ on: jobs: add-to-project: - name: Add game server requests to project runs-on: ubuntu-latest steps: - - uses: actions/add-to-project@v0.5.0 + - name: Add to Project + uses: actions/add-to-project@v0.5.0 with: project-url: https://github.com/orgs/GameServerManagers/projects/11 github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} diff --git a/.github/workflows/details-check.yml b/.github/workflows/details-check.yml index eaaea86e9..609b90a52 100644 --- a/.github/workflows/details-check.yml +++ b/.github/workflows/details-check.yml @@ -1,5 +1,5 @@ -name: Details Check # This action will check that LinuxGSM is picking up game server config and parameter variables. +name: Details Check on: workflow_dispatch: push: @@ -16,7 +16,8 @@ jobs: - name: Generate matrix with generate-matrix.sh run: chmod +x .github/workflows/detals-check-generate-matrix.sh; .github/workflows/detals-check-generate-matrix.sh - - id: set-matrix + - name: Set Matrix + id: set-matrix run: | shortnamearray=$(cat shortnamearray.json) echo "${shortnamearray}" @@ -43,8 +44,8 @@ jobs: - name: Enable developer mode run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server developer - - id: sets-servercfgname - name: Generate servercfgname + - name: Generate servercfgname + id: sets-servercfgname run: | servercfg=$(sed -n "/^\/ { s/.*= *\"\?\([^\"']*\)\"\?/\1/p;q }" lgsm/config-lgsm/${{ matrix.shortname }}server/_default.cfg) echo "servercfgname=$servercfg" >> "$GITHUB_OUTPUT" diff --git a/.github/workflows/git-sync.yml b/.github/workflows/git-sync.yml index e013ae32d..42ddd42e5 100644 --- a/.github/workflows/git-sync.yml +++ b/.github/workflows/git-sync.yml @@ -1,4 +1,4 @@ -name: Github to Bitbucket sync +name: Github to Bitbucket Sync # This action will sync the github repo with a backup bitbucket repo. # This will allow LinuxGSM to use Bitbucket as and alternative download if github fails. on: @@ -6,16 +6,17 @@ on: branches: - master - develop + jobs: - GitHub-to-Bitbucket: + gitHub-to-bitbucket: runs-on: ubuntu-latest steps: - - name: webfactory/ssh-agent@v0.8.0 + - name: SSH Agent uses: webfactory/ssh-agent@v0.8.0 with: ssh-private-key: ${{ secrets.BITBUCKET_SECRET }} - - name: wei/git-sync@v3.0.0 + - name: Git Sync uses: wei/git-sync@v3.0.0 with: ssh_private_key: ${{ secrets.BITBUCKET_SECRET }} diff --git a/.github/workflows/label-sponsors.yml b/.github/workflows/label-sponsors.yml deleted file mode 100644 index c16f66ff6..000000000 --- a/.github/workflows/label-sponsors.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Label sponsors -on: - pull_request: - types: [opened] - issues: - types: [opened] -jobs: - build: - name: is-sponsor-label - runs-on: ubuntu-latest - steps: - - uses: JasonEtco/is-sponsor-label-action@v2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index ebf260f6f..f04630831 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -1,24 +1,30 @@ -name: "Issue Labeler" +name: Issue Labeler on: issues: - types: [opened, edited] - pull_request: - types: [opened, edited] + types: + - opened + - edited permissions: + issues: write contents: read jobs: - triage: - permissions: - contents: read # for github/issue-labeler to get repo contents - issues: write # for github/issue-labeler to create or remove labels + issue-labeler: runs-on: ubuntu-latest steps: - - uses: github/issue-labeler@v3.1 + - name: Issue Labeler + uses: github/issue-labeler@v3.1 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" configuration-path: .github/labeler.yml - not-before: enable-versioned-regex: 0 include-title: 1 + + is-sponsor-label: + runs-on: ubuntu-latest + steps: + - name: Is Sponsor Label + uses: JasonEtco/is-sponsor-label-action@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index 774f84364..4883914f8 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -1,20 +1,18 @@ -name: "Lock Threads" - +name: Lock Threads on: schedule: - - cron: "0 0 * * *" + - cron: "0 0 * * 1" permissions: - contents: read + issues: write + pull-requests: write jobs: lock: - permissions: - issues: write # for dessant/lock-threads to lock issues - pull-requests: write # for dessant/lock-threads to lock PRs runs-on: ubuntu-latest steps: - - uses: dessant/lock-threads@v4 + - name: Lock Threads + uses: dessant/lock-threads@v4 with: github-token: ${{ secrets.GITHUB_TOKEN }} issue-comment: > diff --git a/.github/workflows/potential-duplicates.yml b/.github/workflows/potential-duplicates.yml index f1e783674..3c7f4334c 100644 --- a/.github/workflows/potential-duplicates.yml +++ b/.github/workflows/potential-duplicates.yml @@ -1,30 +1,21 @@ name: Potential Duplicates on: issues: - types: [opened] + types: + - opened jobs: - run: + potential-duplicates: runs-on: ubuntu-latest steps: - - uses: wow-actions/potential-duplicates@v1 + - name: Potential Duplicates + uses: wow-actions/potential-duplicates@v1 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # Issue title filter work with anymatch https://www.npmjs.com/package/anymatch. - # Any matched issue will stop detection immediately. - # You can specify multi filters in each line. filter: "" - # Exclude keywords in title before detecting. exclude: "" - # Label to set, when potential duplicates are detected. label: potential-duplicate - # Get issues with state to compare. Supported state: 'all', 'closed', 'open'. state: all - # If similarity is higher than this threshold([0,1]), issue will be marked as duplicate. threshold: 0.8 - # Reactions to be add to comment when potential duplicates are detected. - # Available reactions: "-1", "+1", "confused", "laugh", "heart", "hooray", "rocket", "eyes" - #reactions: 'eyes, confused' - # Comment to post when potential duplicates are detected. comment: > Potential duplicates: {{#issues}} - [#{{ number }}] {{ title }} ({{ accuracy }}%) diff --git a/.github/workflows/serverlist-validate.yml b/.github/workflows/serverlist-validate.yml index e12c0e95c..39f37e1df 100644 --- a/.github/workflows/serverlist-validate.yml +++ b/.github/workflows/serverlist-validate.yml @@ -1,4 +1,4 @@ -name: Server list Validation +name: Server List Validation on: workflow_dispatch: push: @@ -7,7 +7,8 @@ jobs: serverlist-validate: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v3 - - name: compare versions + - name: Compare Versions run: chmod +x .github/workflows/serverlist-validate.sh; .github/workflows/serverlist-validate.sh diff --git a/.github/workflows/trigger-docker-build.yml b/.github/workflows/trigger-docker-build.yml index dec3dd462..76d4275a6 100644 --- a/.github/workflows/trigger-docker-build.yml +++ b/.github/workflows/trigger-docker-build.yml @@ -3,12 +3,13 @@ on: release: types: - published + jobs: trigger_build_docker-linuxgsm: - name: Trigger Build docker-linuxgsm runs-on: ubuntu-latest steps: - - uses: convictional/trigger-workflow-and-wait@v1.6.5 + - name: Trigger Workflow and Wait (linuxgsm) + uses: convictional/trigger-workflow-and-wait@v1.6.5 with: owner: GameServerManagers repo: docker-linuxgsm @@ -16,10 +17,10 @@ jobs: workflow_file_name: docker-publish.yml trigger_build_docker-gameserver: - name: Trigger Build docker-linuxgsm runs-on: ubuntu-latest steps: - - uses: convictional/trigger-workflow-and-wait@v1.6.5 + - name: Trigger Workflow and Wait (gameserver) + uses: convictional/trigger-workflow-and-wait@v1.6.5 with: owner: GameServerManagers repo: docker-gameserver diff --git a/.github/workflows/update-copyright-years-in-license-file.yml b/.github/workflows/update-copyright-years-in-license-file.yml index 162a27944..d90ba4a5d 100644 --- a/.github/workflows/update-copyright-years-in-license-file.yml +++ b/.github/workflows/update-copyright-years-in-license-file.yml @@ -1,6 +1,4 @@ ---- name: Update copyright year(s) in license file - on: workflow_dispatch: schedule: @@ -10,10 +8,12 @@ jobs: update-license-year: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v3 with: fetch-depth: 0 - - uses: FantasticFiasco/action-update-license-year@v3 + - name: Action Update License Year + uses: FantasticFiasco/action-update-license-year@v3 with: token: ${{ secrets.GITHUB_TOKEN }} path: LICENSE.md diff --git a/.github/workflows/version-check.yml b/.github/workflows/version-check.yml index a12b34420..cb51d4b2f 100644 --- a/.github/workflows/version-check.yml +++ b/.github/workflows/version-check.yml @@ -1,6 +1,6 @@ name: Version Check - -on: push +on: + push: permissions: contents: read @@ -9,7 +9,8 @@ jobs: version-Check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v3 - - name: compare versions + - name: Version Check run: chmod +x .github/workflows/version-check.sh; .github/workflows/version-check.sh From 105350fbe320ecf2155e1500a0df2daded1f6711 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 14 Jun 2023 23:55:41 +0100 Subject: [PATCH 179/374] feat: Add temporary fix for Satisfactory upgrade (#4243) This commit adds a temporary fix for upgrading Satisfactory from Update 7 to Update 8. A symlink is created between UnrealServer-Linux-Shipping and UE4Server-Linux-Shipping until the update is released. --- lgsm/modules/check_executable.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lgsm/modules/check_executable.sh b/lgsm/modules/check_executable.sh index 40721fbf4..6c8feab2a 100644 --- a/lgsm/modules/check_executable.sh +++ b/lgsm/modules/check_executable.sh @@ -7,6 +7,13 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +# #4241 temporary fix for Satisfactory for upgrade betweern Update 7 & Update 8 - remove this once update 8 is released +if [ "${shortname}" == "sf" ]; then + if [ ! -f "${serverfiles}/Engine/Binaries/Linux/UE4Server-Linux-Shipping" ]; then + ln -s "${serverfiles}/Engine/Binaries/Linux/UnrealServer-Linux-Shipping" "${serverfiles}/Engine/Binaries/Linux/UE4Server-Linux-Shipping" + fi +fi + # Check if executable exists execname=$(basename "${executable}") if [ ! -f "${executabledir}/${execname}" ]; then From 5915545f93cf3319141632d6cf03ec657928dae7 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 14 Jun 2023 23:56:55 +0100 Subject: [PATCH 180/374] feat: improve server configuration parsing (#4242) This commit improves the way server configurations are parsed by using xmllint to extract values from XML files. The eval function is also used to assign the extracted value to a variable. --- lgsm/modules/info_game.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index d2714ec3e..f0dd73d18 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -131,7 +131,7 @@ fn_info_game_xml() { else servercfgparse="${servercfgfullpath}" fi - eval "${1}"="$(xmllint --xpath "string(${2})" "${servercfgparse}")" + eval "${1}=\"$(xmllint --xpath "string(${2})" "${servercfgparse}")\"" configtype="xml" } From 28adc88f130d3e1373d6ca304148cfced19cf27d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 15 Jun 2023 21:56:40 +0100 Subject: [PATCH 181/374] Release v23.3.4 --- lgsm/modules/core_functions.sh | 2 +- lgsm/modules/core_modules.sh | 2 +- linuxgsm.sh | 2 +- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lgsm/modules/core_functions.sh b/lgsm/modules/core_functions.sh index 446db1f86..44e162304 100644 --- a/lgsm/modules/core_functions.sh +++ b/lgsm/modules/core_functions.sh @@ -8,7 +8,7 @@ module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.3.3" +modulesversion="v23.3.4" # Core diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index 35a919422..afa9cad83 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.3.3" +modulesversion="v23.3.4" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index d8a28d604..b8739f00d 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.3" +version="v23.3.4" shortname="core" gameservername="core" commandname="CORE" diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index 3c97fffaf..e0af4f415 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.3" +version="v23.3.4" shortname="fctr" gameservername="fctrserver" commandname="CORE" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 9604ddb06..45ebdcc69 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.3" +version="v23.3.4" shortname="jc2" gameservername="jc2server" commandname="CORE" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index ff2a01b12..6388bda63 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.3" +version="v23.3.4" shortname="mc" gameservername="mcserver" commandname="CORE" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index bf0bf9fb7..348323963 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.3" +version="v23.3.4" shortname="ts3" gameservername="ts3server" commandname="CORE" From d9d6b6ebd3de669ce8431924ba53af0e19663e97 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 19 Jun 2023 17:52:15 +0100 Subject: [PATCH 182/374] fix(bt): add missing libxml2-utils The commit adds the libxml2-utils package to several CSV files. This change is necessary for the proper functioning of some scripts that depend on this package. --- lgsm/data/almalinux-8.csv | 2 +- lgsm/data/almalinux-9.csv | 2 +- lgsm/data/centos-7.csv | 2 +- lgsm/data/centos-8.csv | 2 +- lgsm/data/centos-9.csv | 2 +- lgsm/data/debian-10.csv | 2 +- lgsm/data/debian-11.csv | 2 +- lgsm/data/debian-12.csv | 2 +- lgsm/data/debian-9.csv | 2 +- lgsm/data/rhel-7.csv | 2 +- lgsm/data/rhel-8.csv | 2 +- lgsm/data/rhel-9.csv | 2 +- lgsm/data/rocky-8.csv | 2 +- lgsm/data/rocky-9.csv | 2 +- lgsm/data/ubuntu-16.04.csv | 2 +- lgsm/data/ubuntu-18.04.csv | 2 +- lgsm/data/ubuntu-20.04.csv | 2 +- lgsm/data/ubuntu-21.04.csv | 2 +- lgsm/data/ubuntu-21.10.csv | 2 +- lgsm/data/ubuntu-22.04.csv | 2 +- lgsm/data/ubuntu-23.04.csv | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index 1f8abc8e1..f5d55c6a1 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -16,7 +16,7 @@ bfv,compat-libstdc++-33.i686,glibc.i686 bmdm,ncurses-libs.i686 bo bs -bt,libicu,dos2unix +bt,libicu,dos2unix,libxml2 btl cc cd diff --git a/lgsm/data/almalinux-9.csv b/lgsm/data/almalinux-9.csv index fb760c4f0..45f3b666d 100644 --- a/lgsm/data/almalinux-9.csv +++ b/lgsm/data/almalinux-9.csv @@ -16,7 +16,7 @@ bfv,compat-libstdc++-33.i686,glibc.i686 bmdm,ncurses-libs.i686 bo bs -bt,libicu,dos2unix +bt,libicu,dos2unix,libxml2 btl cc cd diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index 7db6b259c..0bc480d60 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -16,7 +16,7 @@ bfv,compat-libstdc++-33.i686,glibc.i686 bmdm,ncurses-libs.i686 bo bs -bt,libicu,dos2unix +bt,libicu,dos2unix,libxml2 btl cc cd diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index 1f8abc8e1..f5d55c6a1 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -16,7 +16,7 @@ bfv,compat-libstdc++-33.i686,glibc.i686 bmdm,ncurses-libs.i686 bo bs -bt,libicu,dos2unix +bt,libicu,dos2unix,libxml2 btl cc cd diff --git a/lgsm/data/centos-9.csv b/lgsm/data/centos-9.csv index fb760c4f0..45f3b666d 100644 --- a/lgsm/data/centos-9.csv +++ b/lgsm/data/centos-9.csv @@ -16,7 +16,7 @@ bfv,compat-libstdc++-33.i686,glibc.i686 bmdm,ncurses-libs.i686 bo bs -bt,libicu,dos2unix +bt,libicu,dos2unix,libxml2 btl cc cd diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index 7425cf361..d403e1b9a 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -16,7 +16,7 @@ bfv,libncurses5:i386,libstdc++5:i386 bmdm,libncurses5:i386 bo bs -bt,libicu-dev,dos2unix +bt,libicu-dev,dos2unix,libxml2-utils btl cc cd diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index 5aa309c30..cc4333dd4 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -16,7 +16,7 @@ bfv,libncurses5:i386,libstdc++5:i386 bmdm,libncurses5:i386 bo bs -bt,libicu-dev,dos2unix +bt,libicu-dev,dos2unix,libxml2-utils btl cc cd diff --git a/lgsm/data/debian-12.csv b/lgsm/data/debian-12.csv index d34887dd6..402421e13 100644 --- a/lgsm/data/debian-12.csv +++ b/lgsm/data/debian-12.csv @@ -16,7 +16,7 @@ bfv,libncurses5:i386,libstdc++5:i386 bmdm,libncurses5:i386 bo bs -bt,libicu-dev,dos2unix +bt,libicu-dev,dos2unix,libxml2-utils btl cc cd diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index 17c6d7d8b..cc0cc910b 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -16,7 +16,7 @@ bfv,libncurses5:i386,libstdc++5:i386 bmdm,libncurses5:i386 bo bs -bt,libicu-dev,dos2unix +bt,libicu-dev,dos2unix,libxml2-utils btl cc cd diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index 5d25cd304..8c2382f60 100644 --- a/lgsm/data/rhel-7.csv +++ b/lgsm/data/rhel-7.csv @@ -16,7 +16,7 @@ bfv,compat-libstdc++-33.i686,glibc.i686 bmdm,ncurses-libs.i686 bo bs -bt,libicu,dos2unix +bt,libicu,dos2unix,libxml2 btl cc cd diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index 1f8abc8e1..f5d55c6a1 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -16,7 +16,7 @@ bfv,compat-libstdc++-33.i686,glibc.i686 bmdm,ncurses-libs.i686 bo bs -bt,libicu,dos2unix +bt,libicu,dos2unix,libxml2 btl cc cd diff --git a/lgsm/data/rhel-9.csv b/lgsm/data/rhel-9.csv index fb760c4f0..45f3b666d 100644 --- a/lgsm/data/rhel-9.csv +++ b/lgsm/data/rhel-9.csv @@ -16,7 +16,7 @@ bfv,compat-libstdc++-33.i686,glibc.i686 bmdm,ncurses-libs.i686 bo bs -bt,libicu,dos2unix +bt,libicu,dos2unix,libxml2 btl cc cd diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index 1f8abc8e1..f5d55c6a1 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -16,7 +16,7 @@ bfv,compat-libstdc++-33.i686,glibc.i686 bmdm,ncurses-libs.i686 bo bs -bt,libicu,dos2unix +bt,libicu,dos2unix,libxml2 btl cc cd diff --git a/lgsm/data/rocky-9.csv b/lgsm/data/rocky-9.csv index fb760c4f0..45f3b666d 100644 --- a/lgsm/data/rocky-9.csv +++ b/lgsm/data/rocky-9.csv @@ -16,7 +16,7 @@ bfv,compat-libstdc++-33.i686,glibc.i686 bmdm,ncurses-libs.i686 bo bs -bt,libicu,dos2unix +bt,libicu,dos2unix,libxml2 btl cc cd diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index 7b883615c..85fe0c9f2 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -16,7 +16,7 @@ bfv,libncurses5:i386,libstdc++5:i386 bmdm,libncurses5:i386 bo bs -bt,libicu-dev,dos2unix +bt,libicu-dev,dos2unix,libxml2-utils btl cc cd diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index 7425cf361..d403e1b9a 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -16,7 +16,7 @@ bfv,libncurses5:i386,libstdc++5:i386 bmdm,libncurses5:i386 bo bs -bt,libicu-dev,dos2unix +bt,libicu-dev,dos2unix,libxml2-utils btl cc cd diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index 93b29f108..9ee9e2df6 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -16,7 +16,7 @@ bfv,libncurses5:i386,libstdc++5:i386 bmdm,libncurses5:i386 bo bs -bt,libicu-dev,dos2unix +bt,libicu-dev,dos2unix,libxml2-utils btl cc cd diff --git a/lgsm/data/ubuntu-21.04.csv b/lgsm/data/ubuntu-21.04.csv index 5aa309c30..cc4333dd4 100644 --- a/lgsm/data/ubuntu-21.04.csv +++ b/lgsm/data/ubuntu-21.04.csv @@ -16,7 +16,7 @@ bfv,libncurses5:i386,libstdc++5:i386 bmdm,libncurses5:i386 bo bs -bt,libicu-dev,dos2unix +bt,libicu-dev,dos2unix,libxml2-utils btl cc cd diff --git a/lgsm/data/ubuntu-21.10.csv b/lgsm/data/ubuntu-21.10.csv index 5aa309c30..cc4333dd4 100644 --- a/lgsm/data/ubuntu-21.10.csv +++ b/lgsm/data/ubuntu-21.10.csv @@ -16,7 +16,7 @@ bfv,libncurses5:i386,libstdc++5:i386 bmdm,libncurses5:i386 bo bs -bt,libicu-dev,dos2unix +bt,libicu-dev,dos2unix,libxml2-utils btl cc cd diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index 1f1cd1c4b..5aa3fe941 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -16,7 +16,7 @@ bfv,libncurses5:i386,libstdc++5:i386 bmdm,libncurses5:i386 bo bs -bt,libicu-dev,dos2unix +bt,libicu-dev,dos2unix,libxml2-utils btl cc cd diff --git a/lgsm/data/ubuntu-23.04.csv b/lgsm/data/ubuntu-23.04.csv index 1f1cd1c4b..5aa3fe941 100644 --- a/lgsm/data/ubuntu-23.04.csv +++ b/lgsm/data/ubuntu-23.04.csv @@ -16,7 +16,7 @@ bfv,libncurses5:i386,libstdc++5:i386 bmdm,libncurses5:i386 bo bs -bt,libicu-dev,dos2unix +bt,libicu-dev,dos2unix,libxml2-utils btl cc cd From 7d958ea222345419ad9eba2e492067bead3e4db3 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 30 Jun 2023 00:52:27 +0100 Subject: [PATCH 183/374] fix(st): update st settings to get it working again --- .../config-lgsm/stserver/_default.cfg | 16 +++------- lgsm/data/almalinux-8.csv | 2 +- lgsm/data/almalinux-9.csv | 2 +- lgsm/data/centos-7.csv | 2 +- lgsm/data/centos-8.csv | 2 +- lgsm/data/centos-9.csv | 2 +- lgsm/data/debian-10.csv | 2 +- lgsm/data/debian-11.csv | 2 +- lgsm/data/debian-12.csv | 2 +- lgsm/data/debian-9.csv | 2 +- lgsm/data/rhel-7.csv | 2 +- lgsm/data/rhel-8.csv | 2 +- lgsm/data/rhel-9.csv | 2 +- lgsm/data/rocky-8.csv | 2 +- lgsm/data/rocky-9.csv | 2 +- lgsm/data/ubuntu-16.04.csv | 2 +- lgsm/data/ubuntu-18.04.csv | 2 +- lgsm/data/ubuntu-20.04.csv | 2 +- lgsm/data/ubuntu-21.04.csv | 2 +- lgsm/data/ubuntu-21.10.csv | 2 +- lgsm/data/ubuntu-22.04.csv | 2 +- lgsm/data/ubuntu-23.04.csv | 2 +- lgsm/modules/info_game.sh | 31 +++++++++---------- lgsm/modules/info_messages.sh | 13 ++------ lgsm/modules/install_config.sh | 9 +----- 25 files changed, 45 insertions(+), 66 deletions(-) diff --git a/lgsm/config-default/config-lgsm/stserver/_default.cfg b/lgsm/config-default/config-lgsm/stserver/_default.cfg index b304fa390..c06d22a8d 100644 --- a/lgsm/config-default/config-lgsm/stserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/stserver/_default.cfg @@ -9,18 +9,12 @@ #### Game Server Settings #### ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters -ip="0.0.0.0" -maxplayers="10" -port="27500" -queryport="27015" -saveinterval="300" -servername="LinuxGSM" worldname="moon_save" worldtype="Moon" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters # Edit with care -startparameters="-LOADLATEST ${worldname} ${worldtype} -settings ServerName ${servername} StartLocalHost true ServerVisible true ServerMaxPlayers ${maxplayers} GamePort ${port} UpdatePort ${queryport} UPNPEnabled true AutoSave true SaveInterval ${saveinterval}" +startparameters="-LOADLATEST ${worldname} ${worldtype}" #### LinuxGSM Settings #### @@ -148,18 +142,18 @@ stopmode="3" # 3: gamedig # 4: gsquery # 5: tcp -querymode="2" -querytype="protocol-valve" +querymode="1" +querytype="" ## Console type consoleverbose="yes" -consoleinteract="vo" +consoleinteract="yes" ## Game Server Details # Do not edit gamename="Stationeers" engine="unity3d" -glibc="2.15" +glibc="2.34" #### Directories #### # Edit with care diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index f5d55c6a1..ee8301e53 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -107,7 +107,7 @@ sfc,ncurses-libs.i686 sof2 sol squad -st +st,libxml2 stn sven terraria diff --git a/lgsm/data/almalinux-9.csv b/lgsm/data/almalinux-9.csv index 45f3b666d..c7d86c6e3 100644 --- a/lgsm/data/almalinux-9.csv +++ b/lgsm/data/almalinux-9.csv @@ -107,7 +107,7 @@ sfc,ncurses-libs.i686 sof2 sol squad -st +st,libxml2 stn sven terraria diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index 0bc480d60..2bd1ea57a 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -107,7 +107,7 @@ sfc,ncurses-libs.i686 sof2 sol squad -st +st,libxml2 stn sven terraria diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index f5d55c6a1..ee8301e53 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -107,7 +107,7 @@ sfc,ncurses-libs.i686 sof2 sol squad -st +st,libxml2 stn sven terraria diff --git a/lgsm/data/centos-9.csv b/lgsm/data/centos-9.csv index 45f3b666d..c7d86c6e3 100644 --- a/lgsm/data/centos-9.csv +++ b/lgsm/data/centos-9.csv @@ -107,7 +107,7 @@ sfc,ncurses-libs.i686 sof2 sol squad -st +st,libxml2 stn sven terraria diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index d403e1b9a..646df8b2b 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -107,7 +107,7 @@ sfc,libtinfo5:i386 sof2 sol squad -st +st,libxml2-utils stn sven,libssl1.1:i386,zlib1g:i386 terraria diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index cc4333dd4..8f31ec9c4 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -107,7 +107,7 @@ sfc,libtinfo5:i386 sof2 sol squad -st +st,libxml2-utils stn sven,libssl1.1:i386,zlib1g:i386 terraria diff --git a/lgsm/data/debian-12.csv b/lgsm/data/debian-12.csv index 402421e13..51b565a00 100644 --- a/lgsm/data/debian-12.csv +++ b/lgsm/data/debian-12.csv @@ -107,7 +107,7 @@ sfc,libtinfo5:i386 sof2 sol squad -st +st,libxml2-utils stn sven,libssl3:i386,zlib1g:i386 terraria diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index cc0cc910b..8ff958ddd 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -107,7 +107,7 @@ sfc,libtinfo5:i386 sof2 sol squad -st +st,libxml2-utils stn sven,libssl1.1:i386,zlib1g:i386 terraria diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index 8c2382f60..196651a2f 100644 --- a/lgsm/data/rhel-7.csv +++ b/lgsm/data/rhel-7.csv @@ -107,7 +107,7 @@ sfc,ncurses-libs.i686 sof2 sol squad -st +st,libxml2 stn sven terraria diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index f5d55c6a1..ee8301e53 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -107,7 +107,7 @@ sfc,ncurses-libs.i686 sof2 sol squad -st +st,libxml2 stn sven terraria diff --git a/lgsm/data/rhel-9.csv b/lgsm/data/rhel-9.csv index 45f3b666d..c7d86c6e3 100644 --- a/lgsm/data/rhel-9.csv +++ b/lgsm/data/rhel-9.csv @@ -107,7 +107,7 @@ sfc,ncurses-libs.i686 sof2 sol squad -st +st,libxml2 stn sven terraria diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index f5d55c6a1..ee8301e53 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -107,7 +107,7 @@ sfc,ncurses-libs.i686 sof2 sol squad -st +st,libxml2 stn sven terraria diff --git a/lgsm/data/rocky-9.csv b/lgsm/data/rocky-9.csv index 45f3b666d..c7d86c6e3 100644 --- a/lgsm/data/rocky-9.csv +++ b/lgsm/data/rocky-9.csv @@ -107,7 +107,7 @@ sfc,ncurses-libs.i686 sof2 sol squad -st +st,libxml2 stn sven terraria diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index 85fe0c9f2..3e860cd1f 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -107,7 +107,7 @@ sfc,libtinfo5:i386 sof2 sol squad -st +st,libxml2-utils stn sven,libssl1.1:i386,zlib1g:i386 terraria diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index d403e1b9a..646df8b2b 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -107,7 +107,7 @@ sfc,libtinfo5:i386 sof2 sol squad -st +st,libxml2-utils stn sven,libssl1.1:i386,zlib1g:i386 terraria diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index 9ee9e2df6..bb026e94a 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -107,7 +107,7 @@ sfc,libtinfo5:i386 sof2 sol squad -st +st,libxml2-utils stn sven,libssl1.1:i386,zlib1g:i386 terraria diff --git a/lgsm/data/ubuntu-21.04.csv b/lgsm/data/ubuntu-21.04.csv index cc4333dd4..8f31ec9c4 100644 --- a/lgsm/data/ubuntu-21.04.csv +++ b/lgsm/data/ubuntu-21.04.csv @@ -107,7 +107,7 @@ sfc,libtinfo5:i386 sof2 sol squad -st +st,libxml2-utils stn sven,libssl1.1:i386,zlib1g:i386 terraria diff --git a/lgsm/data/ubuntu-21.10.csv b/lgsm/data/ubuntu-21.10.csv index cc4333dd4..8f31ec9c4 100644 --- a/lgsm/data/ubuntu-21.10.csv +++ b/lgsm/data/ubuntu-21.10.csv @@ -107,7 +107,7 @@ sfc,libtinfo5:i386 sof2 sol squad -st +st,libxml2-utils stn sven,libssl1.1:i386,zlib1g:i386 terraria diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index 5aa3fe941..ba801e507 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -107,7 +107,7 @@ sfc,libtinfo5:i386 sof2 sol squad -st +st,libxml2-utils stn sven,libssl1.1:i386,zlib1g:i386 terraria diff --git a/lgsm/data/ubuntu-23.04.csv b/lgsm/data/ubuntu-23.04.csv index 5aa3fe941..ba801e507 100644 --- a/lgsm/data/ubuntu-23.04.csv +++ b/lgsm/data/ubuntu-23.04.csv @@ -107,7 +107,7 @@ sfc,libtinfo5:i386 sof2 sol squad -st +st,libxml2-utils stn sven,libssl1.1:i386,zlib1g:i386 terraria diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index f0dd73d18..6374b14e3 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -613,30 +613,29 @@ fn_info_game_pz() { worldname="${worldname:-"NOT SET"}" } -# Config Type: ini -# Parameters: true -# Comment: ; or # -# Example: SERVERNAME=SERVERNAME -# Filetype: ini +# Config Type: xml +# Comment: +# Example: SERVERNAME +# Filetype: xml fn_info_game_st() { if [ -f "${servercfgfullpath}" ]; then - fn_info_game_ini "maxplayers" "MAXPLAYER" - fn_info_game_ini "rconpassword" "RCONPASSWORD" - fn_info_game_ini "servername" "SERVERNAME" - fn_info_game_ini "serverpassword" "PASSWORD" + fn_info_game_xml "adminpassword" "/SettingData/AdminPassword" + fn_info_game_xml "maxplayers" "/SettingData/ServerMaxPlayers" + fn_info_game_xml "port" "/SettingData/GamePort" + fn_info_game_xml "queryport" "/SettingData/UpdatePort" + fn_info_game_xml "saveinterval" "/SettingData/SaveInterval" + fn_info_game_xml "servername" "/SettingData/ServerName" + fn_info_game_xml "serverpassword" "/SettingData/ServerPassword" fi - clearinterval="${clearinterval:-"0"}" - httpport="${port:-"0"}" + adminpassword="${adminpassword:-"NOT SET"}" maxplayers="${maxplayers:-"0"}" port="${port:-"0"}" queryport="${queryport:-"0"}" - rconpassword="${rconpassword:-"NOT SET"}" saveinterval="${saveinterval:-"0"}" servername="${servername:-"NOT SET"}" serverpassword="${serverpassword:-"NOT SET"}" worldname="${worldname:-"NOT SET"}" worldtype="${worldtype:-"NOT SET"}" - } # Config Type: ini @@ -911,7 +910,7 @@ fn_info_game_bf1942() { # Comment: ; or # # Example: ServerName=SERVERNAME # Filetype: ini -fn_info_game_ct(){ +fn_info_game_ct() { if [ -f "${servercfgfullpath}" ]; then fn_info_game_ini "configip" "bindAddress" fn_info_game_ini "gamemode" "gameMode" @@ -1240,7 +1239,7 @@ fn_info_game_hw() { port="${port:-"0"}" queryport="${queryport:-"0"}" maxplayers="${maxplayers:-"0"}" - # #4189 option setting can be blank + # #4189 option setting can be blank # defaultmap="${defaultmap:-"NOT SET"}" creativemode="${creativemode:-"NOT SET"}" } @@ -1482,7 +1481,7 @@ fn_info_game_nec() { # Comment: ; or # # Example: ServerName=SERVERNAME # Filetype: ini -fn_info_game_ohd(){ +fn_info_game_ohd() { if [ -f "${servercfgfullpath}" ]; then fn_info_game_ini rconenabled "bEnabled" fn_info_game_ini rconport "ListenPort" diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index 520dfa58e..8d356f959 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -969,7 +969,7 @@ fn_info_message_csgo() { } | column -s $'\t' -t } -fn_info_message_ct(){ +fn_info_message_ct() { fn_info_message_password_strip { fn_port "header" @@ -977,7 +977,7 @@ fn_info_message_ct(){ } | column -s $'\t' -t } -fn_info_message_dayz(){ +fn_info_message_dayz() { { fn_port "header" fn_port "Game" port udp @@ -1037,7 +1037,7 @@ fn_info_message_goldsrc() { } | column -s $'\t' -t } -fn_info_message_hcu(){ +fn_info_message_hcu() { { fn_port "header" fn_port "Game" port udp @@ -1504,13 +1504,6 @@ fn_info_message_st() { fn_port "header" fn_port "Game" port udp fn_port "Query" queryport udp - fn_port "Web Interface" httpport tcp - } | column -s $'\t' -t - echo -e "" - echo -e "${lightgreen}${gamename} Web Interface${default}" - fn_messages_separator - { - echo -e "${lightblue}Web Interface url:\t${default}http://${httpip}:${httpport}" } | column -s $'\t' -t } diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index b0ff4a785..b39ed298c 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -383,7 +383,7 @@ elif [ "${shortname}" == "css" ]; then fn_list_config_locations elif [ "${shortname}" == "ct" ]; then gamedirname="Craftopia" - array_configs+=( ServerSetting.ini ) + array_configs+=(ServerSetting.ini) fn_fetch_default_config fn_default_config_remote fn_set_config_vars @@ -791,13 +791,6 @@ elif [ "${shortname}" == "sb" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations -elif [ "${shortname}" == "st" ]; then - gamedirname="Stationeers" - array_configs+=(default.ini) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations elif [ "${shortname}" == "stn" ]; then gamedirname="SurvivetheNights" array_configs+=(ServerConfig.txt ServerUsers.txt TpPresets.json UserPermissions.json) From f37f220a67af81fdb6eab5af8339124fc05c720f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 30 Jun 2023 01:14:06 +0100 Subject: [PATCH 184/374] fix(etl): re add queryport --- lgsm/modules/info_game.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 6374b14e3..dfddd52df 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -1193,6 +1193,7 @@ fn_info_game_etl() { configip="${configip:-"0.0.0.0"}" maxplayers="${maxplayers:-"0"}" port="${port:-"0"}" + queryport="${port}" rconpassword="${rconpassword:-"NOT SET"}" servername="${servername:-"NOT SET"}" serverpassword="${serverpassword:-"NOT SET"}" From 14c5a14945a2f640b69db21a8302c2cdf706362c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 30 Jun 2023 01:15:37 +0100 Subject: [PATCH 185/374] fix(core_getopt): fix typo in command name The commit fixes a typo in the command name "cmd_sponso" to "cmd_sponsor" in the core_getopt.sh file. This change ensures that the correct command is used for donation options. --- lgsm/modules/core_getopt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/modules/core_getopt.sh b/lgsm/modules/core_getopt.sh index c758409c5..b191b3ebc 100644 --- a/lgsm/modules/core_getopt.sh +++ b/lgsm/modules/core_getopt.sh @@ -22,7 +22,7 @@ cmd_update_linuxgsm=("ul;update-lgsm;uf;update-modules" "command_update_linuxgsm cmd_test_alert=("ta;test-alert" "command_test_alert.sh" "Send a test alert.") cmd_monitor=("m;monitor" "command_monitor.sh" "Check server status and restart if crashed.") cmd_skeleton=("sk;skeleton" "command_skeleton.sh" "Create a skeleton directory.") -cmd_sponso=("s;sponsor" "command_sponsor.sh" "Donation options.") +cmd_sponsor=("s;sponsor" "command_sponsor.sh" "Donation options.") cmd_send=("sd;send" "command_send.sh" "Send command to game server console.") # Console servers only. cmd_console=("c;console" "command_console.sh" "Access server console.") From 7b115fe07a90048fc8117b44401a31ce7ec1b4bf Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 30 Jun 2023 14:25:41 +0100 Subject: [PATCH 186/374] fix(sol): update query mode The query mode has been changed from "4" (gsquery) to "5" (tcp) in the solserver configuration file. Additionally, the query type has been cleared. This ensures that the server uses TCP for querying and removes any specific query type. --- lgsm/config-default/config-lgsm/solserver/_default.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/config-default/config-lgsm/solserver/_default.cfg b/lgsm/config-default/config-lgsm/solserver/_default.cfg index 6db45dc53..e6d641b63 100644 --- a/lgsm/config-default/config-lgsm/solserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/solserver/_default.cfg @@ -141,8 +141,8 @@ stopmode="2" # 3: gamedig # 4: gsquery # 5: tcp -querymode="4" -querytype="soldat" +querymode="5" +querytype="" ## Console type consoleverbose="yes" From 532e9059603fc9796b099858792a92991973fc51 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 30 Jun 2023 14:37:36 +0100 Subject: [PATCH 187/374] fix(ut3): update querymode and querytype in UT3 server config The commit updates the `querymode` to "1" and removes the value for `querytype` in the UT3 server configuration file. This change ensures that the correct query mode is used for server queries. --- lgsm/config-default/config-lgsm/ut3server/_default.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/config-default/config-lgsm/ut3server/_default.cfg b/lgsm/config-default/config-lgsm/ut3server/_default.cfg index 87b99bdb8..62d4833ed 100644 --- a/lgsm/config-default/config-lgsm/ut3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut3server/_default.cfg @@ -144,8 +144,8 @@ stopmode="2" # 3: gamedig # 4: gsquery # 5: tcp -querymode="2" -querytype="ut3" +querymode="1" +querytype="" ## Console type consoleverbose="yes" From be0cc9369790e6f94e4858fa07905af22efb538c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 30 Jun 2023 18:25:30 +0100 Subject: [PATCH 188/374] fix(bt): update querymode and querytype in btserver config The `querymode` and `querytype` values in the btserver configuration file have been updated. The new values are `1` for `querymode` and an empty string for `querytype`. This change ensures that the correct query mode is used for server queries. --- lgsm/config-default/config-lgsm/btserver/_default.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/config-default/config-lgsm/btserver/_default.cfg b/lgsm/config-default/config-lgsm/btserver/_default.cfg index 1fda28f37..37c257154 100644 --- a/lgsm/config-default/config-lgsm/btserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/btserver/_default.cfg @@ -137,8 +137,8 @@ stopmode="7" # 3: gamedig # 4: gsquery # 5: tcp -querymode="2" -querytype="protocol-valve" +querymode="1" +querytype="" ## Console type consoleverbose="yes" From 9a0df53b974702447ee339e9e7d453f92c09fce1 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 1 Jul 2023 21:25:00 +0100 Subject: [PATCH 189/374] fix: update serverlist.csv - Updated the operating system version for Action: Source server from ubuntu-22.04 to ubuntu-20.04 - Updated the operating system version for Arma Reforger server from ubuntu-22.04 to ubuntu-20.04 --- lgsm/data/serverlist.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 8b2b5c705..a1f12395f 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -1,6 +1,6 @@ ac,acserver,Assetto Corsa,ubuntu-22.04 ahl,ahlserver,Action Half-Life,ubuntu-22.04 -ahl2,ahl2server,Action: Source,ubuntu-22.04 +ahl2,ahl2server,Action: Source,ubuntu-20.04 ark,arkserver,ARK: Survival Evolved,ubuntu-22.04 arma3,arma3server,ARMA 3,ubuntu-22.04 armar,armarserver,Arma Reforger,ubuntu-20.04 From f2779d1b2d3e762203c8b8d8444f932fc565a117 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 1 Jul 2023 23:03:56 +0100 Subject: [PATCH 190/374] feat(docker): create ENV for directory changes in docker adds ability to update some variables using ENV variables in docker. a --- linuxgsm.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index b8739f00d..2b2800437 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -28,17 +28,17 @@ rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") sessionname=$(echo "${selfname}" | cut -f1 -d".") lgsmdir="${rootdir}/lgsm" -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" lgsmlogdir="${logdir}/lgsm" steamcmddir="${HOME}/.steam/steamcmd" -serverfiles="${rootdir}/serverfiles" +[ -n "${LGSM_SERVERFILES}" ] && serverfiles="${LGSM_SERVERFILES}" || serverfiles="${rootdir}/serverfiles" modulesdir="${lgsmdir}/modules" tmpdir="${lgsmdir}/tmp" datadir="${lgsmdir}/data" lockdir="${lgsmdir}/lock" serverlist="${datadir}/serverlist.csv" serverlistmenu="${datadir}/serverlistmenu.csv" -configdir="${lgsmdir}/config-lgsm" +[ -n "${LGSM_CONFIG}" ] && configdir="${LGSM_CONFIG}" || configdir="${lgsmdir}/config-lgsm" configdirserver="${configdir}/${gameservername}" configdirdefault="${lgsmdir}/config-default" userinput="${1}" From 2ff6b682391faec69876c961f1fc1d2338a5ca39 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 2 Jul 2023 00:39:40 +0100 Subject: [PATCH 191/374] refactor(docker): simplify root user check The code changes remove the unnecessary check for the presence of a Docker environment in multiple scripts. Instead, they now only check if the current user is not root. This simplifies the logic and improves readability. - Simplify root user check in `check.sh`, `check_deps.sh`, `check_permissions.sh`, `check_root.sh`, `command_install.sh`, `core_exit.sh`, and `linuxgsm.sh` - Remove redundant checks for Docker environment - Improve code readability --- lgsm/modules/check.sh | 4 ++-- lgsm/modules/check_deps.sh | 2 +- lgsm/modules/check_permissions.sh | 4 ++-- lgsm/modules/check_root.sh | 2 +- lgsm/modules/command_install.sh | 2 +- lgsm/modules/core_exit.sh | 2 +- linuxgsm.sh | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lgsm/modules/check.sh b/lgsm/modules/check.sh index 10fa080c6..1b8796e47 100644 --- a/lgsm/modules/check.sh +++ b/lgsm/modules/check.sh @@ -21,7 +21,7 @@ fi check_tmuxception.sh -if [ "$(whoami)" != "root" ] || [ -f /.dockerenv ]; then +if [ "$(whoami)" != "root" ]; then if [ "${commandname}" != "MONITOR" ]; then check_permissions.sh fi @@ -38,7 +38,7 @@ for allowed_command in "${allowed_commands_array[@]}"; do fi done -if [ "$(whoami)" != "root" ] || [ -f /.dockerenv ]; then +if [ "$(whoami)" != "root" ]; then allowed_commands_array=(DEBUG START INSTALL) for allowed_command in "${allowed_commands_array[@]}"; do if [ "${allowed_command}" == "${commandname}" ]; then diff --git a/lgsm/modules/check_deps.sh b/lgsm/modules/check_deps.sh index 1db5c96c3..560490b97 100644 --- a/lgsm/modules/check_deps.sh +++ b/lgsm/modules/check_deps.sh @@ -301,7 +301,7 @@ fn_deps_detector() { } if [ "${commandname}" == "INSTALL" ]; then - if [ "$(whoami)" == "root" ] && [ ! -f /.dockerenv ]; then + if [ "$(whoami)" == "root" ]; then echo -e "" echo -e "${lightyellow}Checking Dependencies as root${default}" echo -e "=================================" diff --git a/lgsm/modules/check_permissions.sh b/lgsm/modules/check_permissions.sh index bb3e6764f..d582e5f24 100644 --- a/lgsm/modules/check_permissions.sh +++ b/lgsm/modules/check_permissions.sh @@ -223,8 +223,8 @@ fn_sys_perm_error_process() { fi } -## Run permisions checks when not root or docker. -if [ "$(whoami)" != "root" ] && [ ! -f /.dockerenv ]; then +## Run permisions checks when not root. +if [ "$(whoami)" != "root" ]; then fn_check_ownership fn_check_permissions if [ "${commandname}" == "START" ]; then diff --git a/lgsm/modules/check_root.sh b/lgsm/modules/check_root.sh index 26475601a..063a2b0d3 100644 --- a/lgsm/modules/check_root.sh +++ b/lgsm/modules/check_root.sh @@ -7,7 +7,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -if [ "$(whoami)" == "root" ] && [ ! -f /.dockerenv ]; then +if [ "$(whoami)" == "root" ]; then if [ "${commandname}" != "INSTALL" ]; then fn_print_fail_nl "Do NOT run this script as root!" if [ -d "${lgsmlogdir}" ]; then diff --git a/lgsm/modules/command_install.sh b/lgsm/modules/command_install.sh index 32f846fac..e8cba7560 100644 --- a/lgsm/modules/command_install.sh +++ b/lgsm/modules/command_install.sh @@ -11,7 +11,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set check.sh -if [ "$(whoami)" == "root" ] && [ ! -f /.dockerenv ]; then +if [ "$(whoami)" == "root" ]; then check_deps.sh else install_header.sh diff --git a/lgsm/modules/core_exit.sh b/lgsm/modules/core_exit.sh index a8686c2a8..d43f0555a 100644 --- a/lgsm/modules/core_exit.sh +++ b/lgsm/modules/core_exit.sh @@ -18,7 +18,7 @@ fn_exit_dev_debug() { } # If running dependency check as root will remove any files that belong to root user. -if [ "$(whoami)" == "root" ] && [ ! -f /.dockerenv ]; then +if [ "$(whoami)" == "root" ]; then find "${lgsmdir}"/ -group root -prune -exec rm -rf {} + > /dev/null 2>&1 find "${logdir}"/ -group root -prune -exec rm -rf {} + > /dev/null 2>&1 fi diff --git a/linuxgsm.sh b/linuxgsm.sh index 2b2800437..7713c3adc 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -321,7 +321,7 @@ fn_install_file() { } # Prevent LinuxGSM from running as root. Except if doing a dependency install. -if [ "$(whoami)" == "root" ] && [ ! -f /.dockerenv ]; then +if [ "$(whoami)" == "root" ]; then if [ "${userinput}" == "install" ] || [ "${userinput}" == "auto-install" ] || [ "${userinput}" == "i" ] || [ "${userinput}" == "ai" ]; then if [ "${shortname}" == "core" ]; then echo -e "[ FAIL ] Do NOT run this script as root!" From 257c0069773323c9c511dc3ad2c5336f1814fa7b Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 2 Jul 2023 00:53:22 +0100 Subject: [PATCH 192/374] Release v23.3.5 --- lgsm/modules/core_functions.sh | 2 +- lgsm/modules/core_modules.sh | 2 +- linuxgsm.sh | 2 +- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lgsm/modules/core_functions.sh b/lgsm/modules/core_functions.sh index 44e162304..ac5d847f7 100644 --- a/lgsm/modules/core_functions.sh +++ b/lgsm/modules/core_functions.sh @@ -8,7 +8,7 @@ module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.3.4" +modulesversion="v23.3.5" # Core diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index afa9cad83..7c8c1096c 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.3.4" +modulesversion="v23.3.5" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index 7713c3adc..72b96dbc7 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.4" +version="v23.3.5" shortname="core" gameservername="core" commandname="CORE" diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index e0af4f415..29c449b26 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.4" +version="v23.3.5" shortname="fctr" gameservername="fctrserver" commandname="CORE" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 45ebdcc69..064185bc0 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.4" +version="v23.3.5" shortname="jc2" gameservername="jc2server" commandname="CORE" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 6388bda63..c1e775f06 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.4" +version="v23.3.5" shortname="mc" gameservername="mcserver" commandname="CORE" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 348323963..652ee8f8d 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.4" +version="v23.3.5" shortname="ts3" gameservername="ts3server" commandname="CORE" From fd8c83ee32b9dd59fbf81273ec9b1055c982d8fe Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 2 Jul 2023 01:03:00 +0100 Subject: [PATCH 193/374] feat(docker): add trigger for building Docker LinuxGSM and GameServer Added triggers to the workflow file `trigger-docker-build.yml` to build Docker images for LinuxGSM and GameServer. The trigger for GameServer is dependent on the completion of the LinuxGSM build. --- .github/workflows/trigger-docker-build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/trigger-docker-build.yml b/.github/workflows/trigger-docker-build.yml index 76d4275a6..61ec91d39 100644 --- a/.github/workflows/trigger-docker-build.yml +++ b/.github/workflows/trigger-docker-build.yml @@ -6,6 +6,7 @@ on: jobs: trigger_build_docker-linuxgsm: + name: Trigger Build Docker LinuxGSM runs-on: ubuntu-latest steps: - name: Trigger Workflow and Wait (linuxgsm) @@ -17,6 +18,8 @@ jobs: workflow_file_name: docker-publish.yml trigger_build_docker-gameserver: + name: Trigger Build Docker GameServer + needs: trigger_build_docker-linuxgsm runs-on: ubuntu-latest steps: - name: Trigger Workflow and Wait (gameserver) From 76badc21ed6311acecd503e7c7c8a2d60c6cff2d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 2 Jul 2023 01:03:00 +0100 Subject: [PATCH 194/374] feat(docker): add trigger for building Docker LinuxGSM and GameServer Added triggers to the workflow file `trigger-docker-build.yml` to build Docker images for LinuxGSM and GameServer. The trigger for GameServer is dependent on the completion of the LinuxGSM build. --- .github/workflows/trigger-docker-build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/trigger-docker-build.yml b/.github/workflows/trigger-docker-build.yml index 76d4275a6..61ec91d39 100644 --- a/.github/workflows/trigger-docker-build.yml +++ b/.github/workflows/trigger-docker-build.yml @@ -6,6 +6,7 @@ on: jobs: trigger_build_docker-linuxgsm: + name: Trigger Build Docker LinuxGSM runs-on: ubuntu-latest steps: - name: Trigger Workflow and Wait (linuxgsm) @@ -17,6 +18,8 @@ jobs: workflow_file_name: docker-publish.yml trigger_build_docker-gameserver: + name: Trigger Build Docker GameServer + needs: trigger_build_docker-linuxgsm runs-on: ubuntu-latest steps: - name: Trigger Workflow and Wait (gameserver) From a9a074407080c414c3f4444bc86f7b0c217b6e6b Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 3 Jul 2023 16:01:03 +0100 Subject: [PATCH 195/374] fix: update server configurations and game versions - Set `consoleverbose` to "yes" in BTL Server configuration - Remove redundant line in KF Server configuration - Remove redundant line in RO Server configuration - Update VH Server executable path and remove redundant line - Update BTL Server game version to Ubuntu 20.04 in serverlist.csv --- lgsm/config-default/config-lgsm/bfvserver/_default.cfg | 2 +- lgsm/config-default/config-lgsm/btlserver/_default.cfg | 2 +- lgsm/config-default/config-lgsm/kfserver/_default.cfg | 1 - lgsm/config-default/config-lgsm/roserver/_default.cfg | 1 - lgsm/config-default/config-lgsm/vhserver/_default.cfg | 1 - lgsm/data/serverlist.csv | 2 +- 6 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lgsm/config-default/config-lgsm/bfvserver/_default.cfg b/lgsm/config-default/config-lgsm/bfvserver/_default.cfg index 27d7cd504..1b3b70c58 100644 --- a/lgsm/config-default/config-lgsm/bfvserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bfvserver/_default.cfg @@ -132,7 +132,7 @@ querytype="" ## Console type consoleverbose="yes" -consoleinteract="no" +consoleinteract="yes" ## Game Server Details # Do not edit diff --git a/lgsm/config-default/config-lgsm/btlserver/_default.cfg b/lgsm/config-default/config-lgsm/btlserver/_default.cfg index b1b738fe2..867beba4b 100644 --- a/lgsm/config-default/config-lgsm/btlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/btlserver/_default.cfg @@ -146,7 +146,7 @@ querymode="2" querytype="protocol-valve" ## Console type -consoleverbose="no" +consoleverbose="yes" consoleinteract="no" ## Game Server Details diff --git a/lgsm/config-default/config-lgsm/kfserver/_default.cfg b/lgsm/config-default/config-lgsm/kfserver/_default.cfg index 71b1a178b..f03d7da05 100644 --- a/lgsm/config-default/config-lgsm/kfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/kfserver/_default.cfg @@ -166,7 +166,6 @@ glibc="2.4" # Edit with care ## Game Server Directories -serverfiles="${rootdir}/serverfiles" systemdir="${serverfiles}/System" executabledir="${systemdir}" executable="./ucc-bin" diff --git a/lgsm/config-default/config-lgsm/roserver/_default.cfg b/lgsm/config-default/config-lgsm/roserver/_default.cfg index 9ff217a8b..9ee90f5d4 100644 --- a/lgsm/config-default/config-lgsm/roserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/roserver/_default.cfg @@ -162,7 +162,6 @@ glibc="2.4" # Edit with care ## Game Server Directories -serverfiles="${rootdir}/serverfiles" systemdir="${serverfiles}/system" executabledir="${systemdir}" executable="./ucc-bin" diff --git a/lgsm/config-default/config-lgsm/vhserver/_default.cfg b/lgsm/config-default/config-lgsm/vhserver/_default.cfg index 8fe7cd4dc..93aaa83e6 100644 --- a/lgsm/config-default/config-lgsm/vhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vhserver/_default.cfg @@ -174,7 +174,6 @@ glibc="2.15" systemdir="${serverfiles}" executabledir="${serverfiles}" executable="./valheim_server.x86_64" -serverfiles="${rootdir}/serverfiles" ## Backup Directory backupdir="${lgsmdir}/backup" diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index a1f12395f..fded141d4 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -15,7 +15,7 @@ bmdm,bmdmserver,Black Mesa: Deathmatch,ubuntu-22.04 bo,boserver,Ballistic Overkill,ubuntu-22.04 bs,bsserver,Blade Symphony,ubuntu-22.04 bt,btserver,Barotrauma,ubuntu-22.04 -btl,btlserver,BATTALION: Legacy,ubuntu-22.04 +btl,btlserver,BATTALION: Legacy,ubuntu-20.04 cc,ccserver,Codename CURE,ubuntu-22.04 cd,cdserver,Crafting Dead,ubuntu-22.04 ck,ckserver,Core Keeper,ubuntu-22.04 From 9d699ee36d782bfc450c0e6ccd1cc17a318e6ec9 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 3 Jul 2023 20:47:00 +0100 Subject: [PATCH 196/374] refactor: improve lockfile checking and add backup and debug mode checks The code changes refactor the `fn_monitor_check_lockfile` function to include additional checks for backup and debug modes. The new functions `fn_monitor_check_backup` and `fn_monitor_check_debug` are added to handle these checks. Additionally, the `fn_monitor_check_install` function is introduced to check if an installation is currently running. The existing check for active updates in the `fn_monitor_check_update` function is also improved. These changes enhance the monitoring functionality by providing more comprehensive checks for different scenarios, ensuring that the monitor does not run when certain conditions are met. --- lgsm/functions/core_steamcmd.sh | 6 +++- lgsm/modules/command_monitor.sh | 60 +++++++++++++++++++++++++++------ 2 files changed, 55 insertions(+), 11 deletions(-) diff --git a/lgsm/functions/core_steamcmd.sh b/lgsm/functions/core_steamcmd.sh index 119748fb7..77dd12d5e 100644 --- a/lgsm/functions/core_steamcmd.sh +++ b/lgsm/functions/core_steamcmd.sh @@ -32,10 +32,14 @@ fn_check_steamcmd_user() { # Anonymous user is set if steamuser is missing. if [ -z "${steamuser}" ]; then if [ -d "${lgsmlogdir}" ]; then - fn_script_log_info "Using anonymous Steam login" + fn_script_log_info "Login to SteamCMD as: anonymous" fi steamuser="anonymous" steampass='' + else + if [ -d "${lgsmlogdir}" ]; then + fn_script_log_info "Login to SteamCMD as: ${steamuser}" + fi fi } diff --git a/lgsm/modules/command_monitor.sh b/lgsm/modules/command_monitor.sh index f2db9ca2d..7899a5c34 100644 --- a/lgsm/modules/command_monitor.sh +++ b/lgsm/modules/command_monitor.sh @@ -12,11 +12,14 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set fn_monitor_check_lockfile() { - # Monitor does not run it lockfile is not found. + # Monitor does not run if lockfile is not found. if [ ! -f "${lockdir}/${selfname}.lock" ]; then fn_print_dots "Checking lockfile: " fn_print_checking_eol fn_script_log_info "Checking lockfile: CHECKING" + fn_monitor_check_update + fn_monitor_check_backup + fn_monitor_check_debug fn_print_error "Checking lockfile: No lockfile found: " fn_print_error_eol_nl fn_script_log_error "Checking lockfile: No lockfile found: ERROR" @@ -32,19 +35,55 @@ fn_monitor_check_lockfile() { fi } -fn_monitor_check_update() { - # Monitor will check if update is already running. - if [ "$(pgrep "${selfname} update" | wc -l)" != "0" ]; then - fn_print_dots "Checking active updates: " +fn_monitor_check_backup() { + # Monitor will check if backup is running. + if [ "$(pgrep "${selfname} backup" | wc -l)" != "0" ] || [ "$(pgrep "${selfname} b" | wc -l)" != "0" ]; then + fn_print_info_nl "Checking lockfile: LinuxGSM is currently running a backup: " + fn_print_info_eol + fn_script_log_info "Checking lockfile: LinuxGSM is currently running a backup" + core_exit.sh + fi +} + +fn_monitor_check_debug() { + # Monitor will check if backup is running. + if [ "$(pgrep -fc "${selfname} backup")" != "0" ] || [ "$(pgrep -fc "${selfname} b")" != "0" ]; then + fn_print_info_nl "Checking lockfile: LinuxGSM is currently in debug mode: " + fn_print_info_eol + fn_script_log_pass "Checking lockfile: LinuxGSM is currently in debug mode" + core_exit.sh + fi +} + +fn_monitor_check_install() { + # Monitor will check if update is running. + if [ "$(pgrep -fc "${selfname} install")" != "0" ] || [ "$(pgrep -fc "${selfname} i")" != "0" ] || [ "$(pgrep -fc "${selfname} auto-install")" != "0" ] || [ "$(pgrep -fc "${selfname} ai")" != "0" ]; then + fn_print_dots "Checking for installer: " fn_print_checking_eol - fn_script_log_info "Checking active updates: CHECKING" - fn_print_error_nl "Checking active updates: SteamCMD is currently checking for updates: " - fn_print_error_eol - fn_script_log_error "Checking active updates: SteamCMD is currently checking for updates: ERROR" + fn_script_log_info "Checking for installer: CHECKING" + fn_print_info_nl "Checking for installer: LinuxGSM is currently installing: " + fn_print_info_eol + fn_script_log_pass "Checking for installer: LinuxGSM is currently installing" core_exit.sh fi } +fn_monitor_check_update() { + # Monitor will check if an update is running. + if [ "$(pgrep -fc "${selfname} update")" != "0" ] || [ "$(pgrep -fc "${selfname} u")" != "0" ] || [ "$(pgrep -fc "${selfname} validate")" != "0" ] || [ "$(pgrep -fc "${selfname} v")" != "0" ]; then + # Specific check for docker. Will ignore the command watch -n 1800 ./csgoserver update + if [ "$(pgrep -fc "n*${selfname} update")" != "0" ]; then + fn_print_dots "Checking active updates: " + fn_print_checking_eol + fn_script_log_info "Checking active updates: CHECKING" + fn_print_info_nl "Checking active updates: SteamCMD is currently checking for updates: " + fn_print_info_eol + fn_script_log_pass "Checking active updates: SteamCMD is currently checking for updates" + core_exit.sh + fi + fi +} + fn_monitor_check_session() { fn_print_dots "Checking session: " fn_print_checking_eol @@ -223,13 +262,14 @@ fn_monitor_loop() { } monitorflag=1 +# Dont do any monitoring or checks if installer is running. +fn_monitor_check_install check.sh core_logs.sh info_game.sh # query pre-checks fn_monitor_check_lockfile -fn_monitor_check_update fn_monitor_check_session # Monitor will not continue if session only check. if [ "${querymode}" != "1" ]; then From 6716839c8bb5e43d999c50488bf996bf67f73896 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 3 Jul 2023 21:42:59 +0100 Subject: [PATCH 197/374] feat: add steamcmd checking to monitor --- lgsm/functions/check.sh | 10 +++++----- lgsm/modules/command_monitor.sh | 9 +++------ 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/lgsm/functions/check.sh b/lgsm/functions/check.sh index 0f1e12368..e19853424 100644 --- a/lgsm/functions/check.sh +++ b/lgsm/functions/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 START) for allowed_command in "${allowed_commands_array[@]}"; do if [ "${allowed_command}" == "${commandname}" ]; then check_executable.sh @@ -47,7 +47,7 @@ if [ "$(whoami)" != "root" ] || [ -f /.dockerenv ]; then done fi -allowed_commands_array=(BACKUP CONSOLE DEBUG DETAILS MAP-COMPRESSOR FASTDL MODS-INSTALL MODS-REMOVE MODS-UPDATE MONITOR POST-DETAILS RESTART START STOP TEST-ALERT CHANGE-PASSWORD UPDATE UPDATE-LGSM VALIDATE WIPE) +allowed_commands_array=(BACKUP CHANGE-PASSWORD CONSOLE DEBUG DETAILS FASTDL MAP-COMPRESSOR MODS-INSTALL MODS-REMOVE MODS-UPDATE MONITOR POST-DETAILS RESTART START STOP TEST-ALERT UPDATE UPDATE-LGSM VALIDATE WIPE) for allowed_command in "${allowed_commands_array[@]}"; do if [ "${allowed_command}" == "${commandname}" ]; then check_logs.sh @@ -68,7 +68,7 @@ for allowed_command in "${allowed_commands_array[@]}"; do 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 START STOP) 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=(CHECK-UPDATE DEBUG MONITOR START UPDATE VALIDATE) for allowed_command in "${allowed_commands_array[@]}"; do if [ "${allowed_command}" == "${commandname}" ]; then if [ "${appid}" ]; then @@ -86,7 +86,7 @@ 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 POST-DETAILS START STOP UPDATE VALIDATE) for allowed_command in "${allowed_commands_array[@]}"; do if [ "${allowed_command}" == "${commandname}" ]; then check_status.sh diff --git a/lgsm/modules/command_monitor.sh b/lgsm/modules/command_monitor.sh index 7899a5c34..bdb7a933b 100644 --- a/lgsm/modules/command_monitor.sh +++ b/lgsm/modules/command_monitor.sh @@ -72,13 +72,10 @@ fn_monitor_check_update() { # Monitor will check if an update is running. if [ "$(pgrep -fc "${selfname} update")" != "0" ] || [ "$(pgrep -fc "${selfname} u")" != "0" ] || [ "$(pgrep -fc "${selfname} validate")" != "0" ] || [ "$(pgrep -fc "${selfname} v")" != "0" ]; then # Specific check for docker. Will ignore the command watch -n 1800 ./csgoserver update - if [ "$(pgrep -fc "n*${selfname} update")" != "0" ]; then - fn_print_dots "Checking active updates: " - fn_print_checking_eol - fn_script_log_info "Checking active updates: CHECKING" - fn_print_info_nl "Checking active updates: SteamCMD is currently checking for updates: " + if [ "$(pgrep -fc "n*${selfname} update")" == "0" ]; then + fn_print_info_nl "Checking lockfile: LinuxGSM is currently checking for updates: " fn_print_info_eol - fn_script_log_pass "Checking active updates: SteamCMD is currently checking for updates" + fn_script_log_pass "Checking lockfile: LinuxGSM is currently checking for updates" core_exit.sh fi fi From f43a84623a985781bb8640e6b92484d899cb2e50 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 4 Jul 2023 09:50:27 +0100 Subject: [PATCH 198/374] refactor: improve monitor check update function The `fn_monitor_check_update` function has been refactored to improve readability and efficiency. Specifically, a specific check for docker has been added to ignore the command "watch -n 1800 ./csgoserver update". Additionally, the logic for updating the `monitorps` variable has been simplified. --- lgsm/modules/command_monitor.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lgsm/modules/command_monitor.sh b/lgsm/modules/command_monitor.sh index bdb7a933b..97f86d996 100644 --- a/lgsm/modules/command_monitor.sh +++ b/lgsm/modules/command_monitor.sh @@ -69,13 +69,18 @@ fn_monitor_check_install() { } fn_monitor_check_update() { + # Specific check for docker. Will ignore the command watch -n 1800 ./csgoserver update + monitorps=0 + if [ "$(pgrep -fc "n*${selfname} update")" != "0" ]; then + monitorps="$((monitorps - 1))" + fi # Monitor will check if an update is running. if [ "$(pgrep -fc "${selfname} update")" != "0" ] || [ "$(pgrep -fc "${selfname} u")" != "0" ] || [ "$(pgrep -fc "${selfname} validate")" != "0" ] || [ "$(pgrep -fc "${selfname} v")" != "0" ]; then - # Specific check for docker. Will ignore the command watch -n 1800 ./csgoserver update - if [ "$(pgrep -fc "n*${selfname} update")" == "0" ]; then - fn_print_info_nl "Checking lockfile: LinuxGSM is currently checking for updates: " + monitorps="$((monitorps + 2))" + if [ "${monitorps}" != "0" ]; then + fn_print_info_nl "Checking lockfile: LinuxGSM is currently updating: " fn_print_info_eol - fn_script_log_pass "Checking lockfile: LinuxGSM is currently checking for updates" + fn_script_log_pass "Checking lockfile: LinuxGSM is currently updating" core_exit.sh fi fi From 9cd5abdbf5fbe1e4a43a6d8d36e912a3892865cc Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 4 Jul 2023 17:01:54 +0100 Subject: [PATCH 199/374] refactor(mr): update querymode and querytype in _default.cfg The commit updates the querymode to "1" and removes the value for querytype in the _default.cfg file. This change refactors the configuration related to querying game servers. Mordhau query port no longer starts with the server. Disabling querying --- lgsm/config-default/config-lgsm/mhserver/_default.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/config-default/config-lgsm/mhserver/_default.cfg b/lgsm/config-default/config-lgsm/mhserver/_default.cfg index 1011e8768..04fa3e060 100644 --- a/lgsm/config-default/config-lgsm/mhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mhserver/_default.cfg @@ -145,8 +145,8 @@ stopmode="2" # 3: gamedig # 4: gsquery # 5: tcp -querymode="2" -querytype="protocol-valve" +querymode="1" +querytype="" ## Console type consoleverbose="yes" From 21f91009de91f62f5b57d8c957b6dcb451c1cf2f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 4 Jul 2023 21:33:24 +0100 Subject: [PATCH 200/374] refactor(mohaa): update querymode and querytype in mohaaserver config The querymode and querytype values in the mohaaserver config have been updated. The new values are querymode="1" and an empty string for querytype. This change refactors the configuration to use a different method for querying game server information. --- lgsm/config-default/config-lgsm/mohaaserver/_default.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg index 0077221f4..ad4717e9f 100644 --- a/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg @@ -129,8 +129,8 @@ stopmode="3" # 3: gamedig # 4: gsquery # 5: tcp -querymode="2" -querytype="protocol-quake3" +querymode="1" +querytype="" ## Console type consoleverbose="yes" From a6d24cdc77191d6a3548064271c9f378566b4c4a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 4 Jul 2023 21:42:44 +0100 Subject: [PATCH 201/374] refactor(jc3): update querymode and querytype in jc3server config The `querymode` has been changed from "2" to "1" and the `querytype` has been cleared in the jc3server configuration file. This change refactors the way server queries are handled. --- lgsm/config-default/config-lgsm/jc3server/_default.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/config-default/config-lgsm/jc3server/_default.cfg b/lgsm/config-default/config-lgsm/jc3server/_default.cfg index fd049f80d..98ff2a09f 100644 --- a/lgsm/config-default/config-lgsm/jc3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc3server/_default.cfg @@ -137,8 +137,8 @@ stopmode="2" # 3: gamedig # 4: gsquery # 5: tcp -querymode="2" -querytype="protocol-valve" +querymode="1" +querytype="" ## Console type consoleverbose="yes" From 6726772bb161d3d62f6ac0e375f0d98cf9012000 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 5 Jul 2023 11:18:33 +0100 Subject: [PATCH 202/374] refactor: update log directory configuration The log directory configuration has been updated for multiple game servers. The LGSM_LOGDIR environment variable is now checked and used if available, otherwise the default root directory is used. This change ensures that the correct log directories are set for each server. --- .../config-lgsm/acserver/_default.cfg | 2 +- .../config-lgsm/ahl2server/_default.cfg | 2 +- .../config-lgsm/ahlserver/_default.cfg | 2 +- .../config-lgsm/arkserver/_default.cfg | 2 +- .../config-lgsm/arma3server/_default.cfg | 2 +- .../config-lgsm/armarserver/_default.cfg | 2 +- .../config-lgsm/atsserver/_default.cfg | 2 +- .../config-lgsm/avserver/_default.cfg | 2 +- .../config-lgsm/bb2server/_default.cfg | 2 +- .../config-lgsm/bbserver/_default.cfg | 2 +- .../config-lgsm/bdserver/_default.cfg | 2 +- .../config-lgsm/bf1942server/_default.cfg | 2 +- .../config-lgsm/bfvserver/_default.cfg | 2 +- .../config-lgsm/bmdmserver/_default.cfg | 2 +- .../config-lgsm/boserver/_default.cfg | 2 +- .../config-lgsm/bsserver/_default.cfg | 2 +- .../config-lgsm/btlserver/_default.cfg | 2 +- .../config-lgsm/btserver/_default.cfg | 2 +- .../config-lgsm/ccserver/_default.cfg | 2 +- .../config-lgsm/cdserver/_default.cfg | 2 +- .../config-lgsm/ckserver/_default.cfg | 2 +- .../config-lgsm/cmwserver/_default.cfg | 2 +- .../config-lgsm/cod2server/_default.cfg | 2 +- .../config-lgsm/cod4server/_default.cfg | 2 +- .../config-lgsm/codserver/_default.cfg | 2 +- .../config-lgsm/coduoserver/_default.cfg | 2 +- .../config-lgsm/codwawserver/_default.cfg | 2 +- .../config-lgsm/colserver/_default.cfg | 2 +- .../config-lgsm/csczserver/_default.cfg | 2 +- .../config-lgsm/csgoserver/_default.cfg | 2 +- .../config-lgsm/csserver/_default.cfg | 2 +- .../config-lgsm/cssserver/_default.cfg | 2 +- .../config-lgsm/ctserver/_default.cfg | 2 +- .../config-lgsm/dabserver/_default.cfg | 2 +- .../config-lgsm/dayzserver/_default.cfg | 2 +- .../config-lgsm/dmcserver/_default.cfg | 2 +- .../config-lgsm/dodrserver/_default.cfg | 2 +- .../config-lgsm/dodserver/_default.cfg | 2 +- .../config-lgsm/dodsserver/_default.cfg | 2 +- .../config-lgsm/doiserver/_default.cfg | 2 +- .../config-lgsm/dstserver/_default.cfg | 2 +- .../config-lgsm/dysserver/_default.cfg | 2 +- .../config-lgsm/ecoserver/_default.cfg | 2 +- .../config-lgsm/emserver/_default.cfg | 2 +- .../config-lgsm/etlserver/_default.cfg | 2 +- .../config-lgsm/ets2server/_default.cfg | 2 +- .../config-lgsm/fctrserver/_default.cfg | 2 +- .../config-lgsm/fofserver/_default.cfg | 2 +- .../config-lgsm/gmodserver/_default.cfg | 2 +- .../config-lgsm/hcuserver/_default.cfg | 2 +- .../config-lgsm/hl2dmserver/_default.cfg | 2 +- .../config-lgsm/hldmserver/_default.cfg | 2 +- .../config-lgsm/hldmsserver/_default.cfg | 2 +- .../config-lgsm/hwserver/_default.cfg | 2 +- .../config-lgsm/insserver/_default.cfg | 2 +- .../config-lgsm/inssserver/_default.cfg | 2 +- .../config-lgsm/iosserver/_default.cfg | 2 +- .../config-lgsm/jc2server/_default.cfg | 2 +- .../config-lgsm/jc3server/_default.cfg | 2 +- .../config-lgsm/jk2server/_default.cfg | 2 +- .../config-lgsm/kf2server/_default.cfg | 2 +- .../config-lgsm/kfserver/_default.cfg | 2 +- .../config-lgsm/l4d2server/_default.cfg | 2 +- .../config-lgsm/l4dserver/_default.cfg | 2 +- .../config-lgsm/loserver/_default.cfg | 2 +- .../config-lgsm/mcbserver/_default.cfg | 2 +- .../config-lgsm/mcserver/_default.cfg | 2 +- .../config-lgsm/mhserver/_default.cfg | 2 +- .../config-lgsm/mohaaserver/_default.cfg | 2 +- .../config-lgsm/momserver/_default.cfg | 2 +- .../config-lgsm/mtaserver/_default.cfg | 2 +- .../config-lgsm/ndserver/_default.cfg | 2 +- .../config-lgsm/necserver/_default.cfg | 2 +- .../config-lgsm/nmrihserver/_default.cfg | 2 +- .../config-lgsm/ns2cserver/_default.cfg | 2 +- .../config-lgsm/ns2server/_default.cfg | 2 +- .../config-lgsm/nsserver/_default.cfg | 2 +- .../config-lgsm/ohdserver/_default.cfg | 2 +- .../config-lgsm/onsetserver/_default.cfg | 2 +- .../config-lgsm/opforserver/_default.cfg | 2 +- .../config-lgsm/pc2server/_default.cfg | 2 +- .../config-lgsm/pcserver/_default.cfg | 2 +- .../config-lgsm/pmcserver/_default.cfg | 2 +- .../config-lgsm/pstbsserver/_default.cfg | 2 +- .../config-lgsm/pvkiiserver/_default.cfg | 2 +- .../config-lgsm/pvrserver/_default.cfg | 2 +- .../config-lgsm/pzserver/_default.cfg | 2 +- .../config-lgsm/q2server/_default.cfg | 2 +- .../config-lgsm/q3server/_default.cfg | 2 +- .../config-lgsm/qlserver/_default.cfg | 2 +- .../config-lgsm/qwserver/_default.cfg | 2 +- .../config-lgsm/ricochetserver/_default.cfg | 2 +- .../config-lgsm/roserver/_default.cfg | 2 +- .../config-lgsm/rtcwserver/_default.cfg | 2 +- .../config-lgsm/rustserver/_default.cfg | 2 +- .../config-lgsm/rwserver/_default.cfg | 2 +- .../config-lgsm/sampserver/_default.cfg | 2 +- .../config-lgsm/sbotsserver/_default.cfg | 2 +- .../config-lgsm/sbserver/_default.cfg | 2 +- .../config-lgsm/scpslserver/_default.cfg | 2 +- .../config-lgsm/scpslsmserver/_default.cfg | 2 +- .../config-lgsm/sdtdserver/_default.cfg | 2 +- .../config-lgsm/sfcserver/_default.cfg | 2 +- .../config-lgsm/sfserver/_default.cfg | 2 +- .../config-lgsm/sof2server/_default.cfg | 2 +- .../config-lgsm/solserver/_default.cfg | 2 +- .../config-lgsm/squadserver/_default.cfg | 2 +- .../config-lgsm/stnserver/_default.cfg | 2 +- .../config-lgsm/stserver/_default.cfg | 2 +- .../config-lgsm/svenserver/_default.cfg | 2 +- .../config-lgsm/terrariaserver/_default.cfg | 2 +- .../config-lgsm/tf2server/_default.cfg | 2 +- .../config-lgsm/tfcserver/_default.cfg | 2 +- .../config-lgsm/tiserver/_default.cfg | 2 +- .../config-lgsm/ts3server/_default.cfg | 2 +- .../config-lgsm/tsserver/_default.cfg | 2 +- .../config-lgsm/tuserver/_default.cfg | 2 +- .../config-lgsm/twserver/_default.cfg | 2 +- .../config-lgsm/untserver/_default.cfg | 2 +- .../config-lgsm/ut2k4server/_default.cfg | 2 +- .../config-lgsm/ut3server/_default.cfg | 2 +- .../config-lgsm/ut99server/_default.cfg | 2 +- .../config-lgsm/utserver/_default.cfg | 2 +- .../config-lgsm/vhserver/_default.cfg | 2 +- .../config-lgsm/vintsserver/_default.cfg | 2 +- .../config-lgsm/vpmcserver/_default.cfg | 2 +- .../config-lgsm/vsserver/_default.cfg | 2 +- .../config-lgsm/wetserver/_default.cfg | 2 +- .../config-lgsm/wfserver/_default.cfg | 2 +- .../config-lgsm/wmcserver/_default.cfg | 2 +- .../config-lgsm/wurmserver/_default.cfg | 2 +- .../config-lgsm/zmrserver/_default.cfg | 2 +- .../config-lgsm/zpsserver/_default.cfg | 2 +- lgsm/functions/core_legacy.sh | 2 +- lgsm/modules/core_legacy.sh | 2 +- lgsm/modules/info_game.sh | 74 +++++++++---------- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 140 files changed, 176 insertions(+), 176 deletions(-) diff --git a/lgsm/config-default/config-lgsm/acserver/_default.cfg b/lgsm/config-default/config-lgsm/acserver/_default.cfg index 80595da51..3dbc9cbeb 100644 --- a/lgsm/config-default/config-lgsm/acserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/acserver/_default.cfg @@ -170,7 +170,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/ahl2server/_default.cfg b/lgsm/config-default/config-lgsm/ahl2server/_default.cfg index 3283f54e8..91bfdd25c 100644 --- a/lgsm/config-default/config-lgsm/ahl2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ahl2server/_default.cfg @@ -178,7 +178,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/ahlserver/_default.cfg b/lgsm/config-default/config-lgsm/ahlserver/_default.cfg index 9d4c0ed4b..78a3059f9 100644 --- a/lgsm/config-default/config-lgsm/ahlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ahlserver/_default.cfg @@ -174,7 +174,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/arkserver/_default.cfg b/lgsm/config-default/config-lgsm/arkserver/_default.cfg index cc3de9082..f391bb9b5 100644 --- a/lgsm/config-default/config-lgsm/arkserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/arkserver/_default.cfg @@ -176,7 +176,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/Saved/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/arma3server/_default.cfg b/lgsm/config-default/config-lgsm/arma3server/_default.cfg index c92e843fd..60662bed2 100644 --- a/lgsm/config-default/config-lgsm/arma3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/arma3server/_default.cfg @@ -193,7 +193,7 @@ networkcfgfullpath="${networkcfgdir}/${networkcfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${selfname}-script.log" diff --git a/lgsm/config-default/config-lgsm/armarserver/_default.cfg b/lgsm/config-default/config-lgsm/armarserver/_default.cfg index 3cee2f43f..faf64c559 100644 --- a/lgsm/config-default/config-lgsm/armarserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/armarserver/_default.cfg @@ -174,7 +174,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${selfname}-script.log" diff --git a/lgsm/config-default/config-lgsm/atsserver/_default.cfg b/lgsm/config-default/config-lgsm/atsserver/_default.cfg index a77e230ce..3274e757e 100644 --- a/lgsm/config-default/config-lgsm/atsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/atsserver/_default.cfg @@ -166,7 +166,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${selfname}-script.log" diff --git a/lgsm/config-default/config-lgsm/avserver/_default.cfg b/lgsm/config-default/config-lgsm/avserver/_default.cfg index e22333aac..991b13c02 100644 --- a/lgsm/config-default/config-lgsm/avserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/avserver/_default.cfg @@ -168,7 +168,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/ServerLogs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/bb2server/_default.cfg b/lgsm/config-default/config-lgsm/bb2server/_default.cfg index 6557890a1..396893061 100644 --- a/lgsm/config-default/config-lgsm/bb2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bb2server/_default.cfg @@ -179,7 +179,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/bbserver/_default.cfg b/lgsm/config-default/config-lgsm/bbserver/_default.cfg index ad283e5aa..32621c7be 100644 --- a/lgsm/config-default/config-lgsm/bbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bbserver/_default.cfg @@ -174,7 +174,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/bdserver/_default.cfg b/lgsm/config-default/config-lgsm/bdserver/_default.cfg index 07d5465d0..23bf71196 100644 --- a/lgsm/config-default/config-lgsm/bdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bdserver/_default.cfg @@ -173,7 +173,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg index 4d2651a9a..8cbcd35a1 100644 --- a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg @@ -156,7 +156,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/bfvserver/_default.cfg b/lgsm/config-default/config-lgsm/bfvserver/_default.cfg index 1b3b70c58..2c5672106 100644 --- a/lgsm/config-default/config-lgsm/bfvserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bfvserver/_default.cfg @@ -156,7 +156,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${serverfiles}/mods/bfvietnam/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg index 5d13c758c..659e1abd7 100644 --- a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg @@ -179,7 +179,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/boserver/_default.cfg b/lgsm/config-default/config-lgsm/boserver/_default.cfg index 0cea5eb30..a56292a3a 100644 --- a/lgsm/config-default/config-lgsm/boserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/boserver/_default.cfg @@ -171,7 +171,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/bsserver/_default.cfg b/lgsm/config-default/config-lgsm/bsserver/_default.cfg index 45f931aa4..503cde7b5 100644 --- a/lgsm/config-default/config-lgsm/bsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bsserver/_default.cfg @@ -183,7 +183,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/btlserver/_default.cfg b/lgsm/config-default/config-lgsm/btlserver/_default.cfg index 867beba4b..f1e744972 100644 --- a/lgsm/config-default/config-lgsm/btlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/btlserver/_default.cfg @@ -171,7 +171,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/Saved/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/btserver/_default.cfg b/lgsm/config-default/config-lgsm/btserver/_default.cfg index 37c257154..8c32ee2d4 100644 --- a/lgsm/config-default/config-lgsm/btserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/btserver/_default.cfg @@ -166,7 +166,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/ServerLogs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/ccserver/_default.cfg b/lgsm/config-default/config-lgsm/ccserver/_default.cfg index 5a80c2ca5..3aaa47dca 100644 --- a/lgsm/config-default/config-lgsm/ccserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ccserver/_default.cfg @@ -174,7 +174,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/cdserver/_default.cfg b/lgsm/config-default/config-lgsm/cdserver/_default.cfg index bf490c78a..419eb5e3d 100644 --- a/lgsm/config-default/config-lgsm/cdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/cdserver/_default.cfg @@ -166,7 +166,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/ckserver/_default.cfg b/lgsm/config-default/config-lgsm/ckserver/_default.cfg index 3659bae6c..ed81e4113 100644 --- a/lgsm/config-default/config-lgsm/ckserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ckserver/_default.cfg @@ -170,7 +170,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${serverfiles}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/cmwserver/_default.cfg b/lgsm/config-default/config-lgsm/cmwserver/_default.cfg index 964185444..a03f04dd2 100644 --- a/lgsm/config-default/config-lgsm/cmwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/cmwserver/_default.cfg @@ -172,7 +172,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/Saved/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/cod2server/_default.cfg b/lgsm/config-default/config-lgsm/cod2server/_default.cfg index 64990c12e..e27276e2f 100644 --- a/lgsm/config-default/config-lgsm/cod2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod2server/_default.cfg @@ -159,7 +159,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/cod4server/_default.cfg b/lgsm/config-default/config-lgsm/cod4server/_default.cfg index f73a2a1e3..fb46bcec6 100644 --- a/lgsm/config-default/config-lgsm/cod4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod4server/_default.cfg @@ -159,7 +159,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/codserver/_default.cfg b/lgsm/config-default/config-lgsm/codserver/_default.cfg index 4650e35ad..89631a67d 100644 --- a/lgsm/config-default/config-lgsm/codserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codserver/_default.cfg @@ -159,7 +159,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg index 47304668f..2c26a36bb 100644 --- a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg @@ -159,7 +159,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg index bd0ed995a..2943f832d 100644 --- a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg @@ -159,7 +159,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/colserver/_default.cfg b/lgsm/config-default/config-lgsm/colserver/_default.cfg index a1cffc5c9..14a0c93b2 100644 --- a/lgsm/config-default/config-lgsm/colserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/colserver/_default.cfg @@ -167,7 +167,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${serverfiles}/gamedata/logs/server/" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/csczserver/_default.cfg b/lgsm/config-default/config-lgsm/csczserver/_default.cfg index 7104cf096..c8996acd7 100644 --- a/lgsm/config-default/config-lgsm/csczserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csczserver/_default.cfg @@ -174,7 +174,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg index dd83b4996..e030a9896 100644 --- a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg @@ -210,7 +210,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/csserver/_default.cfg b/lgsm/config-default/config-lgsm/csserver/_default.cfg index a1f47e974..d81af84dc 100644 --- a/lgsm/config-default/config-lgsm/csserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csserver/_default.cfg @@ -174,7 +174,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/cssserver/_default.cfg b/lgsm/config-default/config-lgsm/cssserver/_default.cfg index b84ed1d3c..018842405 100644 --- a/lgsm/config-default/config-lgsm/cssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/cssserver/_default.cfg @@ -179,7 +179,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/ctserver/_default.cfg b/lgsm/config-default/config-lgsm/ctserver/_default.cfg index 9bef1f2ec..205c4e8c2 100644 --- a/lgsm/config-default/config-lgsm/ctserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ctserver/_default.cfg @@ -166,7 +166,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" #gamelogdir="${serverfiles}" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/dabserver/_default.cfg b/lgsm/config-default/config-lgsm/dabserver/_default.cfg index 450c2e7e0..002ed2033 100644 --- a/lgsm/config-default/config-lgsm/dabserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dabserver/_default.cfg @@ -174,7 +174,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/dayzserver/_default.cfg b/lgsm/config-default/config-lgsm/dayzserver/_default.cfg index 57ee4fb4d..8ec58f069 100644 --- a/lgsm/config-default/config-lgsm/dayzserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dayzserver/_default.cfg @@ -185,7 +185,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${selfname}-script.log" diff --git a/lgsm/config-default/config-lgsm/dmcserver/_default.cfg b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg index 8e734fe96..5ea5c1352 100644 --- a/lgsm/config-default/config-lgsm/dmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg @@ -174,7 +174,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/dodrserver/_default.cfg b/lgsm/config-default/config-lgsm/dodrserver/_default.cfg index b176fc637..cae228a0c 100644 --- a/lgsm/config-default/config-lgsm/dodrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodrserver/_default.cfg @@ -172,7 +172,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/Saved/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/dodserver/_default.cfg b/lgsm/config-default/config-lgsm/dodserver/_default.cfg index 45e6b8449..7bd86724b 100644 --- a/lgsm/config-default/config-lgsm/dodserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodserver/_default.cfg @@ -174,7 +174,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/dodsserver/_default.cfg b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg index 83be0acb8..af4a32dc2 100644 --- a/lgsm/config-default/config-lgsm/dodsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg @@ -174,7 +174,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/doiserver/_default.cfg b/lgsm/config-default/config-lgsm/doiserver/_default.cfg index 2a1ce62bc..1c99abaa7 100644 --- a/lgsm/config-default/config-lgsm/doiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/doiserver/_default.cfg @@ -175,7 +175,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/dstserver/_default.cfg b/lgsm/config-default/config-lgsm/dstserver/_default.cfg index b5b2f50c9..706327460 100644 --- a/lgsm/config-default/config-lgsm/dstserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dstserver/_default.cfg @@ -181,7 +181,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/dysserver/_default.cfg b/lgsm/config-default/config-lgsm/dysserver/_default.cfg index f567dab6e..96d12d677 100644 --- a/lgsm/config-default/config-lgsm/dysserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dysserver/_default.cfg @@ -179,7 +179,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg index 174ef357c..475edb4ba 100644 --- a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg @@ -166,7 +166,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${logdir}/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/emserver/_default.cfg b/lgsm/config-default/config-lgsm/emserver/_default.cfg index 8181f7f1e..8f935152f 100644 --- a/lgsm/config-default/config-lgsm/emserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/emserver/_default.cfg @@ -179,7 +179,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/etlserver/_default.cfg b/lgsm/config-default/config-lgsm/etlserver/_default.cfg index e36ab3581..c0c97cd2a 100644 --- a/lgsm/config-default/config-lgsm/etlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/etlserver/_default.cfg @@ -153,7 +153,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/ets2server/_default.cfg b/lgsm/config-default/config-lgsm/ets2server/_default.cfg index 4edca5194..a18d6ca79 100644 --- a/lgsm/config-default/config-lgsm/ets2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ets2server/_default.cfg @@ -166,7 +166,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${selfname}-script.log" diff --git a/lgsm/config-default/config-lgsm/fctrserver/_default.cfg b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg index c58ee2789..9fe1b36ce 100644 --- a/lgsm/config-default/config-lgsm/fctrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg @@ -164,7 +164,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${serverfiles}" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/fofserver/_default.cfg b/lgsm/config-default/config-lgsm/fofserver/_default.cfg index 623900384..f85822d30 100644 --- a/lgsm/config-default/config-lgsm/fofserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/fofserver/_default.cfg @@ -174,7 +174,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg index aad52e802..31a6ceedf 100644 --- a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg @@ -187,7 +187,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/hcuserver/_default.cfg b/lgsm/config-default/config-lgsm/hcuserver/_default.cfg index 7ab893f52..b53af15d3 100644 --- a/lgsm/config-default/config-lgsm/hcuserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hcuserver/_default.cfg @@ -181,7 +181,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/Saved/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg index 4763fc423..74a75fc21 100644 --- a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg @@ -174,7 +174,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/hldmserver/_default.cfg b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg index f8d3887ae..c94297f1f 100644 --- a/lgsm/config-default/config-lgsm/hldmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg @@ -173,7 +173,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg index 2e4f061e4..32d5fe791 100644 --- a/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg @@ -174,7 +174,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/hwserver/_default.cfg b/lgsm/config-default/config-lgsm/hwserver/_default.cfg index fddcfebfa..3bf524f16 100644 --- a/lgsm/config-default/config-lgsm/hwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hwserver/_default.cfg @@ -180,7 +180,7 @@ executable="./Hurtworld.x86_64" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${logdir}/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/insserver/_default.cfg b/lgsm/config-default/config-lgsm/insserver/_default.cfg index d6d65d863..8b6b599f3 100644 --- a/lgsm/config-default/config-lgsm/insserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/insserver/_default.cfg @@ -180,7 +180,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/inssserver/_default.cfg b/lgsm/config-default/config-lgsm/inssserver/_default.cfg index eb26d9211..b08460b29 100644 --- a/lgsm/config-default/config-lgsm/inssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/inssserver/_default.cfg @@ -177,7 +177,7 @@ servercfgdefault="Game.ini" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/Saved/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/iosserver/_default.cfg b/lgsm/config-default/config-lgsm/iosserver/_default.cfg index d587e3719..48c5511c7 100644 --- a/lgsm/config-default/config-lgsm/iosserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/iosserver/_default.cfg @@ -174,7 +174,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/jc2server/_default.cfg b/lgsm/config-default/config-lgsm/jc2server/_default.cfg index 6c36a7f69..0610507d6 100644 --- a/lgsm/config-default/config-lgsm/jc2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc2server/_default.cfg @@ -166,7 +166,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" #gamelogdir="" # No server logs available lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/jc3server/_default.cfg b/lgsm/config-default/config-lgsm/jc3server/_default.cfg index 98ff2a09f..c2cac1cfe 100644 --- a/lgsm/config-default/config-lgsm/jc3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc3server/_default.cfg @@ -166,7 +166,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${selfname}-script.log" diff --git a/lgsm/config-default/config-lgsm/jk2server/_default.cfg b/lgsm/config-default/config-lgsm/jk2server/_default.cfg index 0675729e4..5b7f6b893 100644 --- a/lgsm/config-default/config-lgsm/jk2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jk2server/_default.cfg @@ -175,7 +175,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backups" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/kf2server/_default.cfg b/lgsm/config-default/config-lgsm/kf2server/_default.cfg index a52dcfb1d..6d71d6351 100644 --- a/lgsm/config-default/config-lgsm/kf2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/kf2server/_default.cfg @@ -172,7 +172,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/Saved/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/kfserver/_default.cfg b/lgsm/config-default/config-lgsm/kfserver/_default.cfg index f03d7da05..362dfa54f 100644 --- a/lgsm/config-default/config-lgsm/kfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/kfserver/_default.cfg @@ -179,7 +179,7 @@ compressedmapsdir="${rootdir}/Maps-Compressed" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${logdir}/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/l4d2server/_default.cfg b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg index 3ef547c22..4a04cac2c 100644 --- a/lgsm/config-default/config-lgsm/l4d2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg @@ -173,7 +173,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/l4dserver/_default.cfg b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg index c0cbd2452..9447b2823 100644 --- a/lgsm/config-default/config-lgsm/l4dserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg @@ -173,7 +173,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/loserver/_default.cfg b/lgsm/config-default/config-lgsm/loserver/_default.cfg index d4056faf9..7df8a8f3d 100644 --- a/lgsm/config-default/config-lgsm/loserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/loserver/_default.cfg @@ -177,7 +177,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/Saved/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/mcbserver/_default.cfg b/lgsm/config-default/config-lgsm/mcbserver/_default.cfg index f8fddf0c0..8ffc45667 100644 --- a/lgsm/config-default/config-lgsm/mcbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mcbserver/_default.cfg @@ -159,7 +159,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/mcserver/_default.cfg b/lgsm/config-default/config-lgsm/mcserver/_default.cfg index c12265f9f..269e96f8b 100644 --- a/lgsm/config-default/config-lgsm/mcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mcserver/_default.cfg @@ -166,7 +166,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/mhserver/_default.cfg b/lgsm/config-default/config-lgsm/mhserver/_default.cfg index 04fa3e060..8a9b2331e 100644 --- a/lgsm/config-default/config-lgsm/mhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mhserver/_default.cfg @@ -174,7 +174,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/Saved/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg index ad4717e9f..490767e4a 100644 --- a/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg @@ -158,7 +158,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/momserver/_default.cfg b/lgsm/config-default/config-lgsm/momserver/_default.cfg index 05787a4bd..3219ae662 100644 --- a/lgsm/config-default/config-lgsm/momserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/momserver/_default.cfg @@ -171,7 +171,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${serverfiles}/Game/Saved/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg index c001c7bf1..5ab7c3283 100644 --- a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg @@ -158,7 +158,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${serverfiles}/mods/deathmatch/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/ndserver/_default.cfg b/lgsm/config-default/config-lgsm/ndserver/_default.cfg index 935659c83..30ee62109 100644 --- a/lgsm/config-default/config-lgsm/ndserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ndserver/_default.cfg @@ -174,7 +174,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/necserver/_default.cfg b/lgsm/config-default/config-lgsm/necserver/_default.cfg index a64c8792c..30290acb5 100644 --- a/lgsm/config-default/config-lgsm/necserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/necserver/_default.cfg @@ -169,7 +169,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg index 241e535f4..d3dfa30d3 100644 --- a/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg @@ -179,7 +179,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg index c1a6251b3..ce44d932d 100644 --- a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg @@ -179,7 +179,7 @@ modstoragedir="${servercfgdir}/Workshop" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/ns2server/_default.cfg b/lgsm/config-default/config-lgsm/ns2server/_default.cfg index e41efe7d2..fdb0252f1 100644 --- a/lgsm/config-default/config-lgsm/ns2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2server/_default.cfg @@ -179,7 +179,7 @@ modstoragedir="${servercfgdir}/Workshop" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/nsserver/_default.cfg b/lgsm/config-default/config-lgsm/nsserver/_default.cfg index 5a63b2edf..44faa5b95 100644 --- a/lgsm/config-default/config-lgsm/nsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/nsserver/_default.cfg @@ -174,7 +174,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/ohdserver/_default.cfg b/lgsm/config-default/config-lgsm/ohdserver/_default.cfg index 4e855eb81..651ad4f4c 100644 --- a/lgsm/config-default/config-lgsm/ohdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ohdserver/_default.cfg @@ -176,7 +176,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/Saved/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/onsetserver/_default.cfg b/lgsm/config-default/config-lgsm/onsetserver/_default.cfg index 2c270bfc5..ffbcabdc3 100644 --- a/lgsm/config-default/config-lgsm/onsetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/onsetserver/_default.cfg @@ -166,7 +166,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/opforserver/_default.cfg b/lgsm/config-default/config-lgsm/opforserver/_default.cfg index 691c69b3a..c04666dfd 100644 --- a/lgsm/config-default/config-lgsm/opforserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/opforserver/_default.cfg @@ -174,7 +174,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/pc2server/_default.cfg b/lgsm/config-default/config-lgsm/pc2server/_default.cfg index 0bf55aa53..37efdd824 100644 --- a/lgsm/config-default/config-lgsm/pc2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/pc2server/_default.cfg @@ -170,7 +170,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/pcserver/_default.cfg b/lgsm/config-default/config-lgsm/pcserver/_default.cfg index 53d9fc210..e70ce6d26 100644 --- a/lgsm/config-default/config-lgsm/pcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pcserver/_default.cfg @@ -166,7 +166,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/pmcserver/_default.cfg b/lgsm/config-default/config-lgsm/pmcserver/_default.cfg index e8f69161e..984ebb470 100644 --- a/lgsm/config-default/config-lgsm/pmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pmcserver/_default.cfg @@ -164,7 +164,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg index 426574aa6..513f9e089 100644 --- a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg @@ -175,7 +175,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/Saved/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg index 6cb271de0..e3e96a8ff 100644 --- a/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg @@ -174,7 +174,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/pvrserver/_default.cfg b/lgsm/config-default/config-lgsm/pvrserver/_default.cfg index 8d27cf08c..53f0bdd03 100644 --- a/lgsm/config-default/config-lgsm/pvrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pvrserver/_default.cfg @@ -173,7 +173,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/Saved/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/pzserver/_default.cfg b/lgsm/config-default/config-lgsm/pzserver/_default.cfg index 55c3f587b..b103eb772 100644 --- a/lgsm/config-default/config-lgsm/pzserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pzserver/_default.cfg @@ -171,7 +171,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${HOME}/Zomboid/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/q2server/_default.cfg b/lgsm/config-default/config-lgsm/q2server/_default.cfg index 526e27854..aa07f21b7 100644 --- a/lgsm/config-default/config-lgsm/q2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/q2server/_default.cfg @@ -158,7 +158,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/q3server/_default.cfg b/lgsm/config-default/config-lgsm/q3server/_default.cfg index d8fda33d7..eacb87049 100644 --- a/lgsm/config-default/config-lgsm/q3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/q3server/_default.cfg @@ -158,7 +158,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/qlserver/_default.cfg b/lgsm/config-default/config-lgsm/qlserver/_default.cfg index 5b1444ed9..f6b5342e0 100644 --- a/lgsm/config-default/config-lgsm/qlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/qlserver/_default.cfg @@ -166,7 +166,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${logdir}/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/qwserver/_default.cfg b/lgsm/config-default/config-lgsm/qwserver/_default.cfg index 1e9482c8c..5f6288879 100644 --- a/lgsm/config-default/config-lgsm/qwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/qwserver/_default.cfg @@ -157,7 +157,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg index 231ab423a..b1bb3e794 100644 --- a/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg @@ -174,7 +174,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/roserver/_default.cfg b/lgsm/config-default/config-lgsm/roserver/_default.cfg index 9ee90f5d4..8e4fe21a6 100644 --- a/lgsm/config-default/config-lgsm/roserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/roserver/_default.cfg @@ -175,7 +175,7 @@ compressedmapsdir="${rootdir}/Maps-Compressed" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${logdir}/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg b/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg index 3c134592a..d99061bdb 100644 --- a/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg @@ -158,7 +158,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/rustserver/_default.cfg b/lgsm/config-default/config-lgsm/rustserver/_default.cfg index 6a679f168..c40551619 100644 --- a/lgsm/config-default/config-lgsm/rustserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rustserver/_default.cfg @@ -186,7 +186,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${logdir}/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/rwserver/_default.cfg b/lgsm/config-default/config-lgsm/rwserver/_default.cfg index a31449a05..3f526c110 100644 --- a/lgsm/config-default/config-lgsm/rwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rwserver/_default.cfg @@ -170,7 +170,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/sampserver/_default.cfg b/lgsm/config-default/config-lgsm/sampserver/_default.cfg index eecc9cce2..709c9922c 100644 --- a/lgsm/config-default/config-lgsm/sampserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sampserver/_default.cfg @@ -157,7 +157,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${serverfiles}/samp03" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg index f48afd3f0..50c2a4e76 100644 --- a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg @@ -172,7 +172,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/sbserver/_default.cfg b/lgsm/config-default/config-lgsm/sbserver/_default.cfg index 521500591..733267b4b 100644 --- a/lgsm/config-default/config-lgsm/sbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbserver/_default.cfg @@ -173,7 +173,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${serverfiles}/storage" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/scpslserver/_default.cfg b/lgsm/config-default/config-lgsm/scpslserver/_default.cfg index 3409fe994..100de02a8 100644 --- a/lgsm/config-default/config-lgsm/scpslserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/scpslserver/_default.cfg @@ -171,7 +171,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${HOME}/.config/SCP Secret Laboratory/LocalAdminLogs/${port}" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg b/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg index 73d0605c6..1e041e93b 100644 --- a/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg @@ -171,7 +171,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${HOME}/.config/SCP Secret Laboratory/LocalAdminLogs/${port}" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg index 270e8f84e..7775f16ab 100644 --- a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg @@ -170,7 +170,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${logdir}/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/sfcserver/_default.cfg b/lgsm/config-default/config-lgsm/sfcserver/_default.cfg index 579790be7..f64261993 100644 --- a/lgsm/config-default/config-lgsm/sfcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sfcserver/_default.cfg @@ -174,7 +174,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/sfserver/_default.cfg b/lgsm/config-default/config-lgsm/sfserver/_default.cfg index dfe3857c0..bc25dccfa 100644 --- a/lgsm/config-default/config-lgsm/sfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sfserver/_default.cfg @@ -172,7 +172,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/Saved/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/sof2server/_default.cfg b/lgsm/config-default/config-lgsm/sof2server/_default.cfg index a0f878e45..282c8166d 100644 --- a/lgsm/config-default/config-lgsm/sof2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/sof2server/_default.cfg @@ -158,7 +158,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/solserver/_default.cfg b/lgsm/config-default/config-lgsm/solserver/_default.cfg index e6d641b63..aa8d02d5a 100644 --- a/lgsm/config-default/config-lgsm/solserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/solserver/_default.cfg @@ -170,7 +170,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${serverfiles}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/squadserver/_default.cfg b/lgsm/config-default/config-lgsm/squadserver/_default.cfg index 79240e2bf..432b5a402 100644 --- a/lgsm/config-default/config-lgsm/squadserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/squadserver/_default.cfg @@ -171,7 +171,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/Saved/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/stnserver/_default.cfg b/lgsm/config-default/config-lgsm/stnserver/_default.cfg index d26cef127..463e808ed 100644 --- a/lgsm/config-default/config-lgsm/stnserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/stnserver/_default.cfg @@ -170,7 +170,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${serverfiles}" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/stserver/_default.cfg b/lgsm/config-default/config-lgsm/stserver/_default.cfg index c06d22a8d..eef67827f 100644 --- a/lgsm/config-default/config-lgsm/stserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/stserver/_default.cfg @@ -171,7 +171,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${HOME}/.config/unity3d/Rocketwerkz/Stationeers" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/svenserver/_default.cfg b/lgsm/config-default/config-lgsm/svenserver/_default.cfg index ec164b90b..309e73d04 100644 --- a/lgsm/config-default/config-lgsm/svenserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/svenserver/_default.cfg @@ -173,7 +173,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg index a286b0571..ea0d549be 100644 --- a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg @@ -173,7 +173,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" #gamelogdir="" # No server logs available lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/tf2server/_default.cfg b/lgsm/config-default/config-lgsm/tf2server/_default.cfg index 824b6e7e3..851e80386 100644 --- a/lgsm/config-default/config-lgsm/tf2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/tf2server/_default.cfg @@ -179,7 +179,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg index 968350fd8..c0c09ec66 100644 --- a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg @@ -174,7 +174,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/tiserver/_default.cfg b/lgsm/config-default/config-lgsm/tiserver/_default.cfg index 652c9430e..f7a3b6944 100644 --- a/lgsm/config-default/config-lgsm/tiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tiserver/_default.cfg @@ -176,7 +176,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/Saved/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/ts3server/_default.cfg b/lgsm/config-default/config-lgsm/ts3server/_default.cfg index 963920a6c..8dff8f7f8 100644 --- a/lgsm/config-default/config-lgsm/ts3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ts3server/_default.cfg @@ -157,7 +157,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${serverfiles}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/tsserver/_default.cfg b/lgsm/config-default/config-lgsm/tsserver/_default.cfg index 1b4ac5bfc..8eb00e73a 100644 --- a/lgsm/config-default/config-lgsm/tsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tsserver/_default.cfg @@ -174,7 +174,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/tuserver/_default.cfg b/lgsm/config-default/config-lgsm/tuserver/_default.cfg index 816310062..f62740818 100644 --- a/lgsm/config-default/config-lgsm/tuserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tuserver/_default.cfg @@ -176,7 +176,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/Saved/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/twserver/_default.cfg b/lgsm/config-default/config-lgsm/twserver/_default.cfg index 8c4b32683..13edffe2f 100644 --- a/lgsm/config-default/config-lgsm/twserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/twserver/_default.cfg @@ -173,7 +173,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${logdir}/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/untserver/_default.cfg b/lgsm/config-default/config-lgsm/untserver/_default.cfg index c3c5b7e14..a7de22b4d 100644 --- a/lgsm/config-default/config-lgsm/untserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/untserver/_default.cfg @@ -177,7 +177,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${logdir}/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg index 0df674dc6..5b0fc6a2b 100644 --- a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg @@ -158,7 +158,7 @@ compressedmapsdir="${rootdir}/Maps-Compressed" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${logdir}/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/ut3server/_default.cfg b/lgsm/config-default/config-lgsm/ut3server/_default.cfg index 62d4833ed..b52bcbfb0 100644 --- a/lgsm/config-default/config-lgsm/ut3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut3server/_default.cfg @@ -173,7 +173,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${logdir}/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/ut99server/_default.cfg b/lgsm/config-default/config-lgsm/ut99server/_default.cfg index dede89687..21db8e024 100644 --- a/lgsm/config-default/config-lgsm/ut99server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut99server/_default.cfg @@ -158,7 +158,7 @@ compressedmapsdir="${rootdir}/Maps-Compressed" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/utserver/_default.cfg b/lgsm/config-default/config-lgsm/utserver/_default.cfg index 392598840..82b47bf9a 100644 --- a/lgsm/config-default/config-lgsm/utserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/utserver/_default.cfg @@ -161,7 +161,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/vhserver/_default.cfg b/lgsm/config-default/config-lgsm/vhserver/_default.cfg index 93aaa83e6..5fd29f6a7 100644 --- a/lgsm/config-default/config-lgsm/vhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vhserver/_default.cfg @@ -179,7 +179,7 @@ executable="./valheim_server.x86_64" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/Saved/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/vintsserver/_default.cfg b/lgsm/config-default/config-lgsm/vintsserver/_default.cfg index a207ecdb7..b6bd76831 100644 --- a/lgsm/config-default/config-lgsm/vintsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vintsserver/_default.cfg @@ -161,7 +161,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${servercfgdir}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/vpmcserver/_default.cfg b/lgsm/config-default/config-lgsm/vpmcserver/_default.cfg index 20b587f32..8a47f056e 100644 --- a/lgsm/config-default/config-lgsm/vpmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vpmcserver/_default.cfg @@ -165,7 +165,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/vsserver/_default.cfg b/lgsm/config-default/config-lgsm/vsserver/_default.cfg index 94510c334..e99f063e8 100644 --- a/lgsm/config-default/config-lgsm/vsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vsserver/_default.cfg @@ -174,7 +174,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/wetserver/_default.cfg b/lgsm/config-default/config-lgsm/wetserver/_default.cfg index 994abb5c0..045afb9e0 100644 --- a/lgsm/config-default/config-lgsm/wetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wetserver/_default.cfg @@ -153,7 +153,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/wfserver/_default.cfg b/lgsm/config-default/config-lgsm/wfserver/_default.cfg index fc53e641c..5924cd8af 100644 --- a/lgsm/config-default/config-lgsm/wfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wfserver/_default.cfg @@ -172,7 +172,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/wmcserver/_default.cfg b/lgsm/config-default/config-lgsm/wmcserver/_default.cfg index cdf56e71e..007e5542d 100644 --- a/lgsm/config-default/config-lgsm/wmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wmcserver/_default.cfg @@ -164,7 +164,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg index 3743e899f..754fc5922 100644 --- a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg @@ -169,7 +169,7 @@ source "${servercfgfullpath}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/zmrserver/_default.cfg b/lgsm/config-default/config-lgsm/zmrserver/_default.cfg index c2621b48a..ad5619dae 100644 --- a/lgsm/config-default/config-lgsm/zmrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/zmrserver/_default.cfg @@ -174,7 +174,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/config-default/config-lgsm/zpsserver/_default.cfg b/lgsm/config-default/config-lgsm/zpsserver/_default.cfg index 777403dfd..33ad128cb 100644 --- a/lgsm/config-default/config-lgsm/zpsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/zpsserver/_default.cfg @@ -179,7 +179,7 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" diff --git a/lgsm/functions/core_legacy.sh b/lgsm/functions/core_legacy.sh index f9aa51455..1cb77258b 100644 --- a/lgsm/functions/core_legacy.sh +++ b/lgsm/functions/core_legacy.sh @@ -20,7 +20,7 @@ if [ -z "${serverfiles}" ]; then fi if [ -z "${logdir}" ]; then - logdir="${rootdir}/log" + [ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" fi if [ -z "${lgsmlogdir}" ]; then diff --git a/lgsm/modules/core_legacy.sh b/lgsm/modules/core_legacy.sh index e9e5c9206..173c893d2 100644 --- a/lgsm/modules/core_legacy.sh +++ b/lgsm/modules/core_legacy.sh @@ -44,7 +44,7 @@ if [ -z "${serverfiles}" ]; then fi if [ -z "${logdir}" ]; then - logdir="${rootdir}/log" + [ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" fi if [ -z "${lgsmlogdir}" ]; then diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index dfddd52df..5c948d47c 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -891,11 +891,11 @@ fn_info_game_armar() { # Filetype: con fn_info_game_bf1942() { if [ -f "${servercfgfullpath}" ]; then - fn_info_game_con "configip" "game.serverIp" - fn_info_game_con "maxplayers" "game.serverMaxPlayers" - fn_info_game_con "port" "game.serverPort" - fn_info_game_con "servername" "game.serverName" - fn_info_game_con "serverpassword" "game.serverPassword" + fn_info_game_keyvalue_pairs "configip" "game.serverIp" + fn_info_game_keyvalue_pairs "maxplayers" "game.serverMaxPlayers" + fn_info_game_keyvalue_pairs "port" "game.serverPort" + fn_info_game_keyvalue_pairs "servername" "game.serverName" + fn_info_game_keyvalue_pairs "serverpassword" "game.serverPassword" fi configip="${configip:-"0.0.0.0"}" maxplayers="${maxplayers:-"0"}" @@ -905,32 +905,6 @@ fn_info_game_bf1942() { serverpassword="${serverpassword:-"NOT SET"}" } -# Config Type: ini -# Parameters: true -# Comment: ; or # -# Example: ServerName=SERVERNAME -# Filetype: ini -fn_info_game_ct() { - if [ -f "${servercfgfullpath}" ]; then - fn_info_game_ini "configip" "bindAddress" - fn_info_game_ini "gamemode" "gameMode" - fn_info_game_ini "maxplayers" "maxPlayerNumber" - fn_info_game_ini "port" "port" - fn_info_game_ini "saveinterval" "autoSaveSec" - fn_info_game_ini "servername" "name" - fn_info_game_ini "serverpassword" "serverPassword" - fn_info_game_ini "serverpasswordenabled" "usePassword" - fi - configip="${configip:-"0.0.0.0"}" - gamemode="${gamemode:-"NOT SET"}" - maxplayers="${maxplayers:-"0"}" - port="${port:-"0"}" - saveinterval="${saveinterval:-"0"}" - servername="${servername:-"NOT SET"}" - serverpassword="${serverpassword:-"NOT SET"}" - serverpasswordenabled="${serverpasswordenabled:-"NOT SET"}" -} - # Config Type: con # Parameters: true # Comment: # or // @@ -938,11 +912,11 @@ fn_info_game_ct() { # Filetype: con fn_info_game_bfv() { if [ -f "${servercfgfullpath}" ]; then - fn_info_game_con "configip" "game.serverIp" - fn_info_game_con "maxplayers" "game.serverMaxPlayers" - fn_info_game_con "port" "game.serverPort" - fn_info_game_con "servername" "game.serverName" - fn_info_game_con "serverpassword" "game.serverPassword" + fn_info_game_keyvalue_pairs "configip" "game.serverIp" + fn_info_game_keyvalue_pairs "maxplayers" "game.serverMaxPlayers" + fn_info_game_keyvalue_pairs "port" "game.serverPort" + fn_info_game_keyvalue_pairs "servername" "game.serverName" + fn_info_game_keyvalue_pairs "serverpassword" "game.serverPassword" fi configip="${configip:-"0.0.0.0"}" maxplayers="${maxplayers:-"0"}" @@ -1129,6 +1103,32 @@ fn_info_game_col() { steamport="${steamport:-"0"}" } +# Config Type: ini +# Parameters: true +# Comment: ; or # +# Example: ServerName=SERVERNAME +# Filetype: ini +fn_info_game_ct() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_ini "configip" "bindAddress" + fn_info_game_ini "gamemode" "gameMode" + fn_info_game_ini "maxplayers" "maxPlayerNumber" + fn_info_game_ini "port" "port" + fn_info_game_ini "saveinterval" "autoSaveSec" + fn_info_game_ini "servername" "name" + fn_info_game_ini "serverpassword" "serverPassword" + fn_info_game_ini "serverpasswordenabled" "usePassword" + fi + configip="${configip:-"0.0.0.0"}" + gamemode="${gamemode:-"NOT SET"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + saveinterval="${saveinterval:-"0"}" + servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + serverpasswordenabled="${serverpasswordenabled:-"NOT SET"}" +} + # Config Type: SQF # Parameters: true # Comment: // or /* */ @@ -1964,7 +1964,7 @@ fn_info_game_sol() { maxplayers="${maxplayers:-"0"}" port="${port:-"0"}" filesport="$((port + 10))" - queryport="${port}" + queryport="${filesport}" servername="${servername:-"NOT SET"}" serverpassword="${serverpassword:-"NOT SET"}" } diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index 29c449b26..10d5999e3 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -28,7 +28,7 @@ rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") sessionname=$(echo "${selfname}" | cut -f1 -d".") lgsmdir="${rootdir}/lgsm" -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" lgsmlogdir="${logdir}/lgsm" steamcmddir="${HOME}/.steam/steamcmd" serverfiles="${rootdir}/serverfiles" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 064185bc0..cbd366f30 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -28,7 +28,7 @@ rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") sessionname=$(echo "${selfname}" | cut -f1 -d".") lgsmdir="${rootdir}/lgsm" -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" lgsmlogdir="${logdir}/lgsm" steamcmddir="${HOME}/.steam/steamcmd" serverfiles="${rootdir}/serverfiles" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index c1e775f06..5b5070787 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -28,7 +28,7 @@ rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") sessionname=$(echo "${selfname}" | cut -f1 -d".") lgsmdir="${rootdir}/lgsm" -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" lgsmlogdir="${logdir}/lgsm" steamcmddir="${HOME}/.steam/steamcmd" serverfiles="${rootdir}/serverfiles" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 652ee8f8d..10484899f 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -28,7 +28,7 @@ rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") sessionname=$(echo "${selfname}" | cut -f1 -d".") lgsmdir="${rootdir}/lgsm" -logdir="${rootdir}/log" +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" lgsmlogdir="${logdir}/lgsm" steamcmddir="${HOME}/.steam/steamcmd" serverfiles="${rootdir}/serverfiles" From 5cb6c9e3a10c2cb73cb478e067ac09b6af8149c4 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 5 Jul 2023 16:52:39 +0100 Subject: [PATCH 203/374] Release v23.3.6 --- lgsm/modules/core_functions.sh | 2 +- lgsm/modules/core_modules.sh | 2 +- linuxgsm.sh | 2 +- tests/tests_fctrserver.sh | 4 ++-- tests/tests_jc2server.sh | 4 ++-- tests/tests_mcserver.sh | 4 ++-- tests/tests_ts3server.sh | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lgsm/modules/core_functions.sh b/lgsm/modules/core_functions.sh index ac5d847f7..e4b34b41d 100644 --- a/lgsm/modules/core_functions.sh +++ b/lgsm/modules/core_functions.sh @@ -8,7 +8,7 @@ module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.3.5" +modulesversion="v23.3.6" # Core diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index 7c8c1096c..c1baab40e 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.3.5" +modulesversion="v23.3.6" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index 72b96dbc7..5746dfe8c 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.5" +version="v23.3.6" shortname="core" gameservername="core" commandname="CORE" diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index 10d5999e3..b06e8c646 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.5" +version="v23.3.6" shortname="fctr" gameservername="fctrserver" commandname="CORE" @@ -28,7 +28,7 @@ rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") sessionname=$(echo "${selfname}" | cut -f1 -d".") lgsmdir="${rootdir}/lgsm" -[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" +logdir="${rootdir}/log" lgsmlogdir="${logdir}/lgsm" steamcmddir="${HOME}/.steam/steamcmd" serverfiles="${rootdir}/serverfiles" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index cbd366f30..30051114c 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.5" +version="v23.3.6" shortname="jc2" gameservername="jc2server" commandname="CORE" @@ -28,7 +28,7 @@ rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") sessionname=$(echo "${selfname}" | cut -f1 -d".") lgsmdir="${rootdir}/lgsm" -[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" +logdir="${rootdir}/log" lgsmlogdir="${logdir}/lgsm" steamcmddir="${HOME}/.steam/steamcmd" serverfiles="${rootdir}/serverfiles" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 5b5070787..587a8a9b1 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.5" +version="v23.3.6" shortname="mc" gameservername="mcserver" commandname="CORE" @@ -28,7 +28,7 @@ rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") sessionname=$(echo "${selfname}" | cut -f1 -d".") lgsmdir="${rootdir}/lgsm" -[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" +logdir="${rootdir}/log" lgsmlogdir="${logdir}/lgsm" steamcmddir="${HOME}/.steam/steamcmd" serverfiles="${rootdir}/serverfiles" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 10484899f..45647cda7 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.5" +version="v23.3.6" shortname="ts3" gameservername="ts3server" commandname="CORE" @@ -28,7 +28,7 @@ rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") sessionname=$(echo "${selfname}" | cut -f1 -d".") lgsmdir="${rootdir}/lgsm" -[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" +logdir="${rootdir}/log" lgsmlogdir="${logdir}/lgsm" steamcmddir="${HOME}/.steam/steamcmd" serverfiles="${rootdir}/serverfiles" From 7f4111d167d10bae9643a03b1af9794a8b655c30 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 10 Jul 2023 10:13:59 +0100 Subject: [PATCH 204/374] fix(mta): update xml parsing The `fn_info_game_mta` function in the `info_game.sh` file has been refactored to update the parameters passed to the `fn_info_game_xml` function. The parameter names have been changed from "port" to "serverport", "httpport" to "httpport", "servername" to "servername", "maxplayers" to "maxplayers", and "ase" to "ase". This change improves code readability and consistency. --- lgsm/modules/info_game.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 5c948d47c..39d433d9d 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -1441,11 +1441,11 @@ fn_info_game_mom() { # Filetype: conf fn_info_game_mta() { if [ -f "${servercfgfullpath}" ]; then - fn_info_game_xml "port" "/config/@port" - fn_info_game_xml "httpport" "/config/@httpport" - fn_info_game_xml "servername" "/config/@servername" - fn_info_game_xml "maxplayers" "/config/@maxplayers" - fn_info_game_xml "ase" "/config/@ase" + fn_info_game_xml "port" "/config/serverport" + fn_info_game_xml "httpport" "/config/httpport" + fn_info_game_xml "servername" "/config/servername" + fn_info_game_xml "maxplayers" "/config/maxplayers" + fn_info_game_xml "ase" "/config/ase" fi if [ "${ase}" == "1" ]; then ase="Enabled" From 953efca700f1c53a58862ff445a99eff6a3172f5 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 10 Jul 2023 13:35:06 +0100 Subject: [PATCH 205/374] fix: add missing Query port information to GoldSrc info message This commit adds the functionality to display the Query port information in the GoldSrc info message. The Query port is now shown alongside the Game and Client ports. --- lgsm/modules/info_messages.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index 8d356f959..23559993e 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -1033,6 +1033,7 @@ fn_info_message_goldsrc() { { fn_port "header" fn_port "Game" port udp + fn_port "Query" queryport tcp fn_port "Client" clientport udp } | column -s $'\t' -t } From c13a7d003f022a23e709135d82525294b2ebd396 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 10 Jul 2023 16:42:16 +0100 Subject: [PATCH 206/374] fix(monitor): improve logging messages - Refactored the `fn_monitor_check_lockfile`, `fn_monitor_check_backup`, and `fn_monitor_check_install` functions in the `command_monitor.sh` file. - Updated the logging messages to provide more concise and informative output. - Replaced `fn_print_info_nl` with `fn_print_info` for consistency. - Removed unnecessary line breaks in the logging messages. --- lgsm/modules/command_monitor.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/modules/command_monitor.sh b/lgsm/modules/command_monitor.sh index 97f86d996..5edd7298e 100644 --- a/lgsm/modules/command_monitor.sh +++ b/lgsm/modules/command_monitor.sh @@ -38,7 +38,7 @@ fn_monitor_check_lockfile() { fn_monitor_check_backup() { # Monitor will check if backup is running. if [ "$(pgrep "${selfname} backup" | wc -l)" != "0" ] || [ "$(pgrep "${selfname} b" | wc -l)" != "0" ]; then - fn_print_info_nl "Checking lockfile: LinuxGSM is currently running a backup: " + fn_print_info "Checking lockfile: LinuxGSM is currently running a backup: " fn_print_info_eol fn_script_log_info "Checking lockfile: LinuxGSM is currently running a backup" core_exit.sh @@ -48,7 +48,7 @@ fn_monitor_check_backup() { fn_monitor_check_debug() { # Monitor will check if backup is running. if [ "$(pgrep -fc "${selfname} backup")" != "0" ] || [ "$(pgrep -fc "${selfname} b")" != "0" ]; then - fn_print_info_nl "Checking lockfile: LinuxGSM is currently in debug mode: " + fn_print_info "Checking lockfile: LinuxGSM is currently in debug mode: " fn_print_info_eol fn_script_log_pass "Checking lockfile: LinuxGSM is currently in debug mode" core_exit.sh @@ -61,7 +61,7 @@ fn_monitor_check_install() { fn_print_dots "Checking for installer: " fn_print_checking_eol fn_script_log_info "Checking for installer: CHECKING" - fn_print_info_nl "Checking for installer: LinuxGSM is currently installing: " + fn_print_info "Checking for installer: LinuxGSM is currently installing: " fn_print_info_eol fn_script_log_pass "Checking for installer: LinuxGSM is currently installing" core_exit.sh From ce9f864f248e5a46497bcef93aae6e9f61db2f5a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 11 Jul 2023 17:27:34 +0100 Subject: [PATCH 207/374] feat(rw): migrate rising world to unity engine (#4261) * refactor: update default executable name for Rising World server The default executable name for the Rising World server has been updated from "server.jar" to "RisingWorldServer.x64". This change ensures that the correct executable is used when launching the game server. * refactor(rw): no longer java The code in `info_messages.sh` has been refactored to simplify the port command for multiple game servers. This change improves readability and maintainability. * refactor: simplify info_game_rw function The info_game_rw function has been refactored to remove redundant code and improve readability. The configuration values are now retrieved using the fn_info_game_keyvalue_pairs function, which reduces duplication and improves maintainability. Additionally, the default values for configip, gamemode, maxplayers, port, queryport, rconport, seed, servername, and worldname have been set to appropriate fallback values if they are not found in the server configuration file. * refactor: remove unnecessary game ports and query HTTP port The code changes in this commit refactor the `info_messages.sh` file by removing unnecessary game ports and the query HTTP port. This simplifies the code and improves readability. * refactor: update queryport calculation in info_game.sh The code change updates the calculation of the queryport variable in the info_game.sh script. Instead of assigning it the same value as port, it now subtracts 1 from the port value. This ensures that queryport is set correctly for further use in the script. * feat: add branch configuration option for rwserver This commit adds a new configuration option `branch` to the `_default.cfg` file in the `rwserver` directory. The default value is set to "unity". This allows users to specify a specific branch for SteamCMD when installing or updating the server. * refactor: update default game server configuration The default game server configuration file has been updated to reflect the following changes: - Removed the predefined parameter `javaram` - Updated the value of `consoleinteract` to "yes" - Updated the values of `engine` and `glibc` These changes ensure that the default configuration is more up-to-date and aligned with the desired behavior for a Rising World game server. * refactor: remove unnecessary code for game+1, game+2, and game+3 The code changes in this commit involve removing unnecessary code related to the variables port2, port3, and port4. These variables were used to display information about additional games (game+1, game+2, and game+3) in the output. However, since these variables are not being used elsewhere in the script, they have been removed along with the corresponding echo statements. This refactor simplifies the code by eliminating redundant logic. --- .../config-lgsm/rwserver/_default.cfg | 14 ++-- lgsm/modules/command_dev_query_raw.sh | 19 ------ lgsm/modules/info_game.sh | 64 ++++++------------- lgsm/modules/info_messages.sh | 9 +-- 4 files changed, 25 insertions(+), 81 deletions(-) diff --git a/lgsm/config-default/config-lgsm/rwserver/_default.cfg b/lgsm/config-default/config-lgsm/rwserver/_default.cfg index 3f526c110..74288a4f8 100644 --- a/lgsm/config-default/config-lgsm/rwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rwserver/_default.cfg @@ -8,9 +8,6 @@ #### Game Server Settings #### -## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters -javaram="2048" # -Xmx$2048M - ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters startparameters="" @@ -115,7 +112,7 @@ sleeptime="0.5" appid="339010" steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch -branch="" +branch="unity" betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" @@ -145,13 +142,13 @@ querytype="protocol-valve" ## Console type consoleverbose="yes" -consoleinteract="no" +consoleinteract="yes" ## Game Server Details # Do not edit gamename="Rising World" -engine="risingworld" -glibc="null" +engine="unity3d" +glibc="2.17" #### Directories #### # Edit with care @@ -159,8 +156,7 @@ glibc="null" ## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}" -preexecutable="java -Xmx${javaram}M -jar" -executable="./server.jar" +executable="./RisingWorldServer.x64" servercfgdir="${systemdir}" servercfg="server.properties" servercfgdefault="server.properties" diff --git a/lgsm/modules/command_dev_query_raw.sh b/lgsm/modules/command_dev_query_raw.sh index a2cfa1f68..25b174e6b 100644 --- a/lgsm/modules/command_dev_query_raw.sh +++ b/lgsm/modules/command_dev_query_raw.sh @@ -32,25 +32,6 @@ echo -e "==================================================================" else echo -e "Game:" fi - if [ "${shortname}" == "rw" ]; then - if [ -v port2 ]; then - echo -e "Game+1: \t${port2} \t$(ss -tupl | grep -c "${port}") \t$(ss -tupl | grep "${port2}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${port2}" | grep udp | awk '{ print $2 }')" - else - echo -e "Game+1:" - fi - - if [ -v port3 ]; then - echo -e "Game+2: \t${port3} \t$(ss -tupl | grep -c "${port}") \t$(ss -tupl | grep "${port3}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${port3}" | grep udp | awk '{ print $2 }')" - else - echo -e "Game+2:" - fi - - if [ -v port4 ]; then - echo -e "Game+3: \t${port4} \t$(ss -tupl | grep -c "${port}") \t$(ss -tupl | grep "${port4}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${port4}" | grep udp | awk '{ print $2 }')" - else - echo -e "Game+3:" - fi - fi if [ "${shortname}" == "pvr" ]; then if [ -v port401 ]; then echo -e "Game+400: \t${port401} \t$(ss -tupl | grep -c "${port401}") \t$(ss -tupl | grep "${port401}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${port401}" | grep udp | awk '{ print $2 }')" diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 39d433d9d..aa6b223be 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -1744,52 +1744,26 @@ fn_info_game_rust() { } fn_info_game_rw() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - rconpassword="${unavailable}" - rconport="${zero}" - maxplayers="${zero}" - port="${zero}" - port2="${zero}" - port3="${zero}" - port4="${zero}" - queryport="${zero}" - gamemode="${unavailable}" - worldname="${unavailable}" - else - servername=$(grep "server_name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/server_name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "server_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/server_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconport=$(grep "rcon_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - maxplayers=$(grep "settings_max_players" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - port=$(grep "server_port" "${servercfgfullpath}" | grep -v "database_mysql_server_port" | grep -v "#" | tr -cd '[:digit:]') - port2=$((port + 1)) - port3=$((port + 2)) - port4=$((port + 3)) - queryport="${port}" - httpqueryport=$((port - 1)) - gamemode=$(grep "settings_default_gamemode=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/settings_default_gamemode//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - worldname=$(grep "server_world_name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/server_world_name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - configip=$(grep "server_ip" "${servercfgfullpath}" | grep -v "database_mysql_server_ip" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/server_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - servername="${servername:-"NOT SET"}" - serverpassword="${serverpassword:-"NOT SET"}" - rconpassword="${rconpassword:-"NOT SET"}" - rconport="${rconport:-"0"}" - maxplayers="${maxplayers:-"0"}" - port="${port:-"0"}" - port2="${port2:-"0"}" - port3="${port3:-"0"}" - port4="${port4:-"0"}" - queryport="${queryport:-"0"}" - httpqueryport="${httpport:-"0"}" - gamemode="${gamemode:-"NOT SET"}" - worldname="${worldname:-"NOT SET"}" - configip="${configip:-"0.0.0.0"}" + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_keyvalue_pairs "configip" "Server_IP" + fn_info_game_keyvalue_pairs "gamemode" "World_GameMode" + fn_info_game_keyvalue_pairs "maxplayers" "Server_MaxPlayers" + fn_info_game_keyvalue_pairs "port" "Server_Port" + fn_info_game_keyvalue_pairs "rconport" "RCON_Port" + fn_info_game_keyvalue_pairs "seed" "World_Seed" + fn_info_game_keyvalue_pairs "servername" "Server_Name" + fn_info_game_keyvalue_pairs "worldname" "World_Name" fi + configip="${configip:-"0.0.0.0"}" + gamemode="${gamemode:-"NOT SET"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="$((port - 1))" + rconport="${rconport:-"0"}" + seed="${seed:-"0"}" + servername="${servername:-"NOT SET"}" + worldname="${worldname:-"NOT SET"}" + } # Config Type: custom diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index 23559993e..948787e4b 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -698,7 +698,7 @@ fn_info_message_ports() { portcommand="ss -tuplwn | grep AvorionServer" elif [ "${shortname}" == "bf1942" ]; then portcommand="ss -tuplwn | grep bf1942_lnxded" - elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "nec" ] || [ "${shortname}" == "pmc" ] || [ "${shortname}" == "rw" ] || [ "${shortname}" == "vpmc" ] || [ "${shortname}" == "wmc" ]; then + elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "nec" ] || [ "${shortname}" == "pmc" ] || [ "${shortname}" == "vpmc" ] || [ "${shortname}" == "wmc" ]; then portcommand="ss -tuplwn | grep java" elif [ "${shortname}" == "terraria" ]; then portcommand="ss -tuplwn | grep Main" @@ -1352,14 +1352,7 @@ fn_info_message_rw() { { fn_port "header" fn_port "Game" port udp - fn_port "Game+1" port2 udp - fn_port "Game+2" port3 udp - fn_port "Game+3" port4 udp - fn_port "Game+1" port2 tcp - fn_port "Game+2" port3 tcp - fn_port "Game+3" port4 tcp fn_port "Query" queryport tcp - fn_port "Query HTTP" httpqueryport tcp fn_port "RCON" rconport tcp } | column -s $'\t' -t } From d34bc29db6e17cdd295b084edcf51a9536ef30d4 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 12 Jul 2023 12:17:31 +0100 Subject: [PATCH 208/374] feat: game server config migration (#4262) * refactor: simplify game directory names in install_config.sh The commit simplifies the game directory names in the install_config.sh file. It replaces specific game directory names with a generic variable, shortname, to improve code readability and maintainability. * fix: handle invalid directory paths The code now checks if the server files or system directory exist before proceeding. If either directory does not exist, an error message is printed and the script exits. --- lgsm/modules/check_system_dir.sh | 16 +++-- lgsm/modules/install_config.sh | 117 +------------------------------ 2 files changed, 12 insertions(+), 121 deletions(-) diff --git a/lgsm/modules/check_system_dir.sh b/lgsm/modules/check_system_dir.sh index 9f0f5f092..162037861 100644 --- a/lgsm/modules/check_system_dir.sh +++ b/lgsm/modules/check_system_dir.sh @@ -7,16 +7,18 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -if [ "${commandname}" != "VALIDATE" ]; then - checkdir="${serverfiles}" -else - checkdir="${systemdir}" +if [ ! -d "${serverfiles}" ]; then + fn_print_fail_nl "Cannot access ${serverfiles}: No such directory" + if [ -d "${lgsmlogdir}" ]; then + fn_script_log_fatal "Cannot access ${serverfiles}: No such directory." + fi + core_exit.sh fi -if [ ! -d "${checkdir}" ]; then - fn_print_fail_nl "Cannot access ${checkdir}: No such directory" +if [ ! -d "${systemdir}" ]; then + fn_print_fail_nl "Cannot access ${systemdir}: No such directory" if [ -d "${lgsmlogdir}" ]; then - fn_script_log_fatal "Cannot access ${checkdir}: No such directory." + fn_script_log_fatal "Cannot access ${systemdir}: No such directory." fi core_exit.sh fi diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index b39ed298c..e868e9bf7 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -24,9 +24,9 @@ fn_fetch_default_config() { echo -e "default configs from https://github.com/GameServerManagers/Game-Server-Configs" fn_sleep_time mkdir -p "${lgsmdir}/config-default/config-game" - githuburl="https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/master" + githuburl="https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/main" for config in "${array_configs[@]}"; do - fn_fetch_file "${githuburl}/${gamedirname}/${config}" "${remote_fileurl_backup}" "GitHub" "Bitbucket" "${lgsmdir}/config-default/config-game" "${config}" "nochmodx" "norun" "forcedl" "nohash" + fn_fetch_file "${githuburl}/${shortname}/${config}" "${remote_fileurl_backup}" "GitHub" "Bitbucket" "${lgsmdir}/config-default/config-game" "${config}" "nochmodx" "norun" "forcedl" "nohash" done } @@ -162,32 +162,27 @@ fn_list_config_locations() { } if [ "${shortname}" == "sdtd" ]; then - gamedirname="7DaysToDie" fn_default_config_local fn_list_config_locations elif [ "${shortname}" == "ac" ]; then - gamedirname="AssettoCorsa" array_configs+=(server_cfg.ini) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ahl" ]; then - gamedirname="ActionHalfLife" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ahl2" ]; then - gamedirname="ActionSource" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ark" ]; then - gamedirname="ARKSurvivalEvolved" fn_check_cfgdir array_configs+=(GameUserSettings.ini) fn_fetch_default_config @@ -195,7 +190,6 @@ elif [ "${shortname}" == "ark" ]; then fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "arma3" ]; then - gamedirname="Arma3" fn_check_cfgdir array_configs+=(server.cfg network.cfg) fn_fetch_default_config @@ -203,7 +197,6 @@ elif [ "${shortname}" == "arma3" ]; then fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "armar" ]; then - gamedirname="ArmaReforger" fn_check_cfgdir array_configs+=(server.json) fn_fetch_default_config @@ -211,7 +204,6 @@ elif [ "${shortname}" == "armar" ]; then fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ats" ]; then - gamedirname="AmericanTruckSimulator" fn_check_cfgdir array_configs+=(server_config.sii) fn_fetch_default_config @@ -219,21 +211,18 @@ elif [ "${shortname}" == "ats" ]; then fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "bo" ]; then - gamedirname="BallisticOverkill" array_configs+=(config.txt) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "bd" ]; then - gamedirname="BaseDefense" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "bt" ]; then - gamedirname="Barotrauma" fn_check_cfgdir array_configs+=(serversettings.xml) fn_fetch_default_config @@ -241,7 +230,6 @@ elif [ "${shortname}" == "bt" ]; then fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "btl" ]; then - gamedirname="BattalionLegacy" fn_check_cfgdir array_configs+=(DefaultGame.ini) fn_fetch_default_config @@ -249,147 +237,126 @@ elif [ "${shortname}" == "btl" ]; then fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "bf1942" ]; then - gamedirname="Battlefield1942" array_configs+=(serversettings.con) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "bfv" ]; then - gamedirname="BattlefieldVietnam" array_configs+=(serversettings.con) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "bs" ]; then - gamedirname="BladeSymphony" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "bb" ]; then - gamedirname="BrainBread" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "bb2" ]; then - gamedirname="BrainBread2" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "bmdm" ]; then - gamedirname="BlackMesa" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "cd" ]; then - gamedirname="CraftingDead" array_configs+=(properties.json) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ck" ]; then - gamedirname="CoreKeeper" array_configs+=(ServerConfig.json) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "cod" ]; then - gamedirname="CallOfDuty" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "coduo" ]; then - gamedirname="CallOfDutyUnitedOffensive" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "cod2" ]; then - gamedirname="CallOfDuty2" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "cod4" ]; then - gamedirname="CallOfDuty4" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "codwaw" ]; then - gamedirname="CallOfDutyWorldAtWar" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "cc" ]; then - gamedirname="CodenameCURE" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "col" ]; then - gamedirname="ColonySurvival" array_configs+=(colserver.json) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "cs" ]; then - gamedirname="CounterStrike" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "cscz" ]; then - gamedirname="CounterStrikeConditionZero" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "csgo" ]; then - gamedirname="CounterStrikeGlobalOffensive" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "css" ]; then - gamedirname="CounterStrikeSource" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ct" ]; then - gamedirname="Craftopia" array_configs+=(ServerSetting.ini) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "dayz" ]; then - gamedirname="DayZ" fn_check_cfgdir array_configs+=(server.cfg) fn_fetch_default_config @@ -397,41 +364,35 @@ elif [ "${shortname}" == "dayz" ]; then fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "dod" ]; then - gamedirname="DayOfDefeat" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "dodr" ]; then - gamedirname="DayOfDragons" array_configs+=(Game.ini) fn_fetch_default_config fn_default_config_remote fn_list_config_locations elif [ "${shortname}" == "dods" ]; then - gamedirname="DayOfDefeatSource" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "doi" ]; then - gamedirname="DayOfInfamy" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "dmc" ]; then - gamedirname="DeathmatchClassic" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "dst" ]; then - gamedirname="DontStarveTogether" fn_check_cfgdir array_configs+=(cluster.ini server.ini) fn_fetch_default_config @@ -439,21 +400,18 @@ elif [ "${shortname}" == "dst" ]; then fn_set_dst_config_vars fn_list_config_locations elif [ "${shortname}" == "dab" ]; then - gamedirname="DoubleActionBoogaloo" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "dys" ]; then - gamedirname="Dystopia" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "eco" ]; then - gamedirname="Eco" array_configs+=(Network.eco) fn_fetch_default_config fn_default_config_remote @@ -463,14 +421,12 @@ elif [ "${shortname}" == "em" ]; then fn_default_config_local fn_list_config_locations elif [ "${shortname}" == "etl" ]; then - gamedirname="ETLegacy" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ets2" ]; then - gamedirname="EuroTruckSimulator2" fn_check_cfgdir array_configs+=(server_config.sii) fn_fetch_default_config @@ -478,133 +434,114 @@ elif [ "${shortname}" == "ets2" ]; then fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "fctr" ]; then - gamedirname="Factorio" array_configs+=(server-settings.json) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "fof" ]; then - gamedirname="FistfulofFrags" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "gmod" ]; then - gamedirname="GarrysMod" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "hldm" ]; then - gamedirname="HalfLifeDeathmatch" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "hldms" ]; then - gamedirname="HalfLifeDeathmatchSource" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ohd" ]; then - gamedirname="OperationHarshDoorstop" array_configs+=(Game.ini) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "opfor" ]; then - gamedirname="OpposingForce" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "hl2dm" ]; then - gamedirname="HalfLife2Deathmatch" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ins" ]; then - gamedirname="Insurgency" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ios" ]; then - gamedirname="IOSoccer" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "jc2" ]; then - gamedirname="JustCause2" array_configs+=(config.lua) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "jc3" ]; then - gamedirname="JustCause3" array_configs+=(config.json) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "kf" ]; then - gamedirname="KillingFloor" array_configs+=(Default.ini) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "l4d" ]; then - gamedirname="Left4Dead" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "l4d2" ]; then - gamedirname="Left4Dead2" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ]; then - gamedirname="Minecraft" array_configs+=(server.properties) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "mcb" ]; then - gamedirname="MinecraftBedrock" array_configs+=(server.properties) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "mohaa" ]; then - gamedirname="MedalOfHonorAlliedAssault" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "mh" ]; then - gamedirname="Mordhau" fn_check_cfgdir array_configs+=(Game.ini) fn_fetch_default_config @@ -612,56 +549,48 @@ elif [ "${shortname}" == "mh" ]; then fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ns" ]; then - gamedirname="NaturalSelection" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "nmrih" ]; then - gamedirname="NoMoreRoominHell" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "nd" ]; then - gamedirname="NuclearDawn" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "mta" ]; then - gamedirname="MultiTheftAuto" fn_check_cfgdir array_configs+=(acl.xml mtaserver.conf vehiclecolors.conf) fn_fetch_default_config fn_default_config_remote fn_list_config_locations elif [ "${shotname}" == "mom" ]; then - gamedirname="MemoriesofMars" array_configs+=(DedicatedServerConfig.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "pvr" ]; then - gamedirname="PavlovVR" fn_check_cfgdir array_configs+=(Game.ini) fn_fetch_default_config fn_default_config_remote fn_set_config_vars elif [ "${shortname}" == "pvkii" ]; then - gamedirname="PiratesVikingandKnightsII" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "pz" ]; then - gamedirname="ProjectZomboid" fn_check_cfgdir array_configs+=(server.ini) fn_fetch_default_config @@ -669,7 +598,6 @@ elif [ "${shortname}" == "pz" ]; then fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "nec" ]; then - gamedirname="Necesse" fn_check_cfgdir array_configs+=(server.cfg) fn_fetch_default_config @@ -677,184 +605,157 @@ elif [ "${shortname}" == "nec" ]; then fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "pc" ]; then - gamedirname="ProjectCars" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "pc2" ]; then - gamedirname="ProjectCars2" fn_default_config_local fn_list_config_locations elif [ "${shortname}" == "q2" ]; then - gamedirname="Quake2" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "q3" ]; then - gamedirname="Quake3Arena" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ql" ]; then - gamedirname="QuakeLive" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "jk2" ]; then - gamedirname="JediKnightIIJediOutcast" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars elif [ "${shortname}" == "qw" ]; then - gamedirname="QuakeWorld" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ricochet" ]; then - gamedirname="Ricochet" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "rtcw" ]; then - gamedirname="ReturnToCastleWolfenstein" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "rust" ]; then - gamedirname="Rust" fn_check_cfgdir array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_list_config_locations elif [ "${shortname}" == "scpsl" ] || [ "${shortname}" == "scpslsm" ]; then - gamedirname="SCPSecretLaboratory" array_configs+=(config_gameplay.txt config_localadmin.txt) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "sf" ]; then - gamedirname="Satisfactory" array_configs+=(GameUserSettings.ini) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "sol" ]; then - gamedirname="Soldat" array_configs+=(soldat.ini) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "sof2" ]; then - gamedirname="SoldierOfFortune2Gold" array_configs+=(server.cfg mapcycle.txt) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "sfc" ]; then - gamedirname="SourceFortsClassic" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "squad" ]; then - gamedirname="Squad" array_configs+=(Admins.cfg Bans.cfg License.cfg Server.cfg Rcon.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "sb" ]; then - gamedirname="Starbound" array_configs+=(starbound_server.config) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "stn" ]; then - gamedirname="SurvivetheNights" array_configs+=(ServerConfig.txt ServerUsers.txt TpPresets.json UserPermissions.json) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "sven" ]; then - gamedirname="SvenCoop" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "tf2" ]; then - gamedirname="TeamFortress2" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "tfc" ]; then - gamedirname="TeamFortressClassic" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ti" ]; then - gamedirname="TheIsle" - array_configs+=(Game.ini) + array_configs+=(Game.ini Engine.ini) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ts" ]; then - gamedirname="TheSpecialists" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ts3" ]; then - gamedirname="TeamSpeak3" array_configs+=(ts3server.ini) fn_fetch_default_config fn_default_config_remote fn_list_config_locations elif [ "${shortname}" == "tw" ]; then - gamedirname="Teeworlds" array_configs+=(server.cfg ctf.cfg dm.cfg duel.cfg tdm.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "terraria" ]; then - gamedirname="Terraria" array_configs+=(serverconfig.txt) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "tu" ]; then - gamedirname="TowerUnite" fn_check_cfgdir array_configs+=(TowerServer.ini) fn_fetch_default_config @@ -862,83 +763,71 @@ elif [ "${shortname}" == "tu" ]; then fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ut" ]; then - gamedirname="UnrealTournament" array_configs+=(Game.ini Engine.ini) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ut2k4" ]; then - gamedirname="UnrealTournament2004" array_configs+=(UT2004.ini) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ut99" ]; then - gamedirname="UnrealTournament99" array_configs+=(Default.ini) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "unt" ]; then - gamedirname="Unturned" array_configs+=(Config.json) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "vints" ]; then - gamedirname="VintageStory" array_configs+=(serverconfig.json) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "vs" ]; then - gamedirname="VampireSlayer" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "wet" ]; then - gamedirname="WolfensteinEnemyTerritory" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "wf" ]; then - gamedirname="Warfork" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "wmc" ]; then - gamedirname="Waterfall" array_configs+=(config.yml) fn_fetch_default_config fn_default_config_remote fn_set_config_vars elif [ "${shortname}" == "wurm" ]; then - gamedirname="WurmUnlimited" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "zmr" ]; then - gamedirname="ZombieMasterReborn" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "zps" ]; then - gamedirname="ZombiePanicSource" array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote From db692b2610fc7bbffcf7f9884885025fcff0968a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 12 Jul 2023 14:03:50 +0100 Subject: [PATCH 209/374] fix(ti): Update config using evrima branch (#4263) * refactor: simplify start parameters in tiserver config The start parameters in the tiserver config file have been simplified to only include the default map and port. The unnecessary queryport and eaclaunch parameters have been removed. * refactor: update default configuration and game info handling - Set `steammaster` to false in the default configuration file. - Refactor the game info script to handle changes in the game's ini file structure: - Update the key for `queueenabled` to `bQueueEnabled`. - Update the key for `rconenabled` to `bRconEnabled`. - Add support for retrieving `rconpassword`, `serverpassword`, and `serverpasswordenabled`. - Modify the message formatting in the info messages script to display queue, RCON, and query ports correctly. --- .../config-lgsm/tiserver/_default.cfg | 15 +++++---------- lgsm/modules/info_game.sh | 10 ++++++++-- lgsm/modules/info_messages.sh | 3 ++- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/lgsm/config-default/config-lgsm/tiserver/_default.cfg b/lgsm/config-default/config-lgsm/tiserver/_default.cfg index f7a3b6944..6e04a4d32 100644 --- a/lgsm/config-default/config-lgsm/tiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tiserver/_default.cfg @@ -11,15 +11,10 @@ ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" port="7777" -queryport="27015" -# Possible maps, see: https://isle.fandom.com/wiki/The_Isle_Server_Settings_and_Configuration#Optional_Maps -map="" - -# EAC start parameters -eaclaunch="-ini:Engine:[EpicOnlineServices]:DedicatedServerClientId=xyza7891gk5PRo3J7G9puCJGFJjmEguW -ini:Engine:[EpicOnlineServices]:DedicatedServerClientSecret=pKWl6t5i9NJK8gTpVlAxzENZ65P8hYzodV8Dqe5Rlc8" +defaultmap="/Game/TheIsle/Maps/Game/Isla_Spiro/Isla_Spiro" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="${map} -MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -log ${eaclaunch}" +startparameters="${defaultmap} -Port=${port} -log" #### LinuxGSM Settings #### @@ -125,7 +120,7 @@ steamcmdforcewindows="no" branch="evrima" betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server -steammaster="true" +steammaster="false" ## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill @@ -147,8 +142,8 @@ stopmode="2" # 3: gamedig # 4: gsquery # 5: tcp -querymode="2" -querytype="protocol-valve" +querymode="1" +querytype="" ## Console type consoleverbose="yes" diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index aa6b223be..fea995d27 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -666,18 +666,24 @@ fn_info_game_stn() { fn_info_game_ti() { if [ -f "${servercfgfullpath}" ]; then fn_info_game_ini "maxplayers" "MaxPlayerCount" - fn_info_game_ini "queueenabled" "QueueEnabled" + fn_info_game_ini "queueenabled" "bQueueEnabled" fn_info_game_ini "queueport" "QueuePort" - fn_info_game_ini "rconenabled" "RconEnabled" + fn_info_game_ini "rconenabled" "bRconEnabled" + fn_info_game_ini "rconpassword" "RconPassword" fn_info_game_ini "rconport" "RconPort" fn_info_game_ini "servername" "ServerName" + fn_info_game_ini "serverpassword" "ServerPassword" + fn_info_game_ini "serverpasswordenabled" "bServerPassword" fi maxplayers="${maxplayers:-"0"}" queueenabled="${queueenabled:-"NOT SET"}" queueport="${queueport:-"0"}" rconenabled="${rconenabled:-"NOT SET"}" + rconpassword="${rconpassword:-"NOT SET"}" rconport="${rconport:-"0"}" servername="${servername:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" + serverpasswordenabled="${serverpasswordenabled:-"NOT SET"}" } # Config Type: ini diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index 948787e4b..302f54a38 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -1505,7 +1505,8 @@ fn_info_message_ti() { { fn_port "header" fn_port "Game" port udp - fn_port "Query" queryport udp + fn_port "Queue" queueport tcp + fn_port "RCON" rconport tcp } | column -s $'\t' -t } From bbc5a98b4802ebe2c5ac94cfb3855631643c03bd Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 12 Jul 2023 14:04:34 +0100 Subject: [PATCH 210/374] feat: download appmanifest files for goldsrc games (#4260) * add appmanifest files to data * refactor: improve appmanifest check and force update logic The code changes refactor the `fn_appmanifest_check` function in the `core_steamcmd.sh` file. The improvements include: - Checking if `BytesDownloaded` and `BytesToDownload` match, and forcing an update if they don't. - Checking if `BytesStaged` and `BytesToStage` match, and forcing an update if they don't. - For GoldSrc engine, checking if `SharedDepots` exists in the appmanifest file, and forcing an update if it doesn't. - Fetching missing appmanifest files from GitHub for specific game shortnames. These changes enhance the reliability of the appmanifest check process and ensure that updates are forced when necessary. * a * refactor: improve removal of appinfo.vdf file The code has been refactored to improve the removal of the appinfo.vdf file. The find command now redirects error output to /dev/null for a cleaner execution. * a * fn_check_steamcmd_appmanifest is now a full check * a * a * feat: add support for fetching appmanifest files This commit adds support for fetching appmanifest files from the GitHub repository. The code now fetches the appropriate appmanifest files based on the game's shortname and updates them in the serverfiles/steamapps directory. This change ensures that the correct appmanifest files are used, fixing an issue related to updating certain games. * more appmanifest files * feat: add appmanifest_10.acf for Counter-Strike Added the appmanifest_10.acf file for Counter-Strike to resolve an issue with missing SharedDepots. This commit fetches the necessary files from GitHub and forces an update to correct the issue. --- lgsm/data/appmanifest/ahl/appmanifest_10.acf | 36 ++++++ lgsm/data/appmanifest/ahl/appmanifest_70.acf | 41 +++++++ lgsm/data/appmanifest/ahl/appmanifest_90.acf | 49 ++++++++ lgsm/data/appmanifest/bb/appmanifest_10.acf | 36 ++++++ lgsm/data/appmanifest/bb/appmanifest_70.acf | 41 +++++++ lgsm/data/appmanifest/bb/appmanifest_90.acf | 49 ++++++++ lgsm/data/appmanifest/cscz/appmanifest_10.acf | 36 ++++++ lgsm/data/appmanifest/cscz/appmanifest_70.acf | 41 +++++++ lgsm/data/appmanifest/cscz/appmanifest_80.acf | 36 ++++++ lgsm/data/appmanifest/cscz/appmanifest_90.acf | 50 +++++++++ lgsm/data/appmanifest/css/appmanifest_10.acf | 36 ++++++ lgsm/data/appmanifest/css/appmanifest_70.acf | 41 +++++++ lgsm/data/appmanifest/css/appmanifest_90.acf | 49 ++++++++ lgsm/data/appmanifest/dmc/appmanifest_10.acf | 36 ++++++ lgsm/data/appmanifest/dmc/appmanifest_40.acf | 36 ++++++ lgsm/data/appmanifest/dmc/appmanifest_70.acf | 41 +++++++ lgsm/data/appmanifest/dmc/appmanifest_90.acf | 50 +++++++++ lgsm/data/appmanifest/dod/appmanifest_10.acf | 36 ++++++ lgsm/data/appmanifest/dod/appmanifest_30.acf | 36 ++++++ lgsm/data/appmanifest/dod/appmanifest_70.acf | 41 +++++++ lgsm/data/appmanifest/dod/appmanifest_90.acf | 50 +++++++++ lgsm/data/appmanifest/hldm/appmanifest_10.acf | 36 ++++++ lgsm/data/appmanifest/hldm/appmanifest_70.acf | 41 +++++++ lgsm/data/appmanifest/hldm/appmanifest_90.acf | 47 ++++++++ lgsm/data/appmanifest/ns/appmanifest_10.acf | 36 ++++++ lgsm/data/appmanifest/ns/appmanifest_70.acf | 41 +++++++ lgsm/data/appmanifest/ns/appmanifest_90.acf | 49 ++++++++ .../data/appmanifest/opfor/appmanifest_10.acf | 36 ++++++ .../data/appmanifest/opfor/appmanifest_50.acf | 36 ++++++ .../data/appmanifest/opfor/appmanifest_70.acf | 41 +++++++ .../data/appmanifest/opfor/appmanifest_90.acf | 50 +++++++++ .../appmanifest/ricochet/appmanifest_10.acf | 36 ++++++ .../appmanifest/ricochet/appmanifest_60.acf | 36 ++++++ .../appmanifest/ricochet/appmanifest_70.acf | 41 +++++++ .../appmanifest/ricochet/appmanifest_90.acf | 50 +++++++++ lgsm/data/appmanifest/tfc/appmanifest_10.acf | 36 ++++++ lgsm/data/appmanifest/tfc/appmanifest_20.acf | 36 ++++++ lgsm/data/appmanifest/tfc/appmanifest_70.acf | 41 +++++++ lgsm/data/appmanifest/tfc/appmanifest_90.acf | 50 +++++++++ lgsm/data/appmanifest/ts/appmanifest_10.acf | 36 ++++++ lgsm/data/appmanifest/ts/appmanifest_70.acf | 41 +++++++ lgsm/data/appmanifest/ts/appmanifest_90.acf | 49 ++++++++ lgsm/data/appmanifest/vs/appmanifest_10.acf | 36 ++++++ lgsm/data/appmanifest/vs/appmanifest_70.acf | 41 +++++++ lgsm/data/appmanifest/vs/appmanifest_90.acf | 49 ++++++++ lgsm/modules/core_steamcmd.sh | 105 ++++++++++++++++-- lgsm/modules/install_server_files.sh | 1 + 47 files changed, 1957 insertions(+), 7 deletions(-) create mode 100644 lgsm/data/appmanifest/ahl/appmanifest_10.acf create mode 100644 lgsm/data/appmanifest/ahl/appmanifest_70.acf create mode 100644 lgsm/data/appmanifest/ahl/appmanifest_90.acf create mode 100644 lgsm/data/appmanifest/bb/appmanifest_10.acf create mode 100644 lgsm/data/appmanifest/bb/appmanifest_70.acf create mode 100644 lgsm/data/appmanifest/bb/appmanifest_90.acf create mode 100644 lgsm/data/appmanifest/cscz/appmanifest_10.acf create mode 100644 lgsm/data/appmanifest/cscz/appmanifest_70.acf create mode 100644 lgsm/data/appmanifest/cscz/appmanifest_80.acf create mode 100644 lgsm/data/appmanifest/cscz/appmanifest_90.acf create mode 100644 lgsm/data/appmanifest/css/appmanifest_10.acf create mode 100644 lgsm/data/appmanifest/css/appmanifest_70.acf create mode 100644 lgsm/data/appmanifest/css/appmanifest_90.acf create mode 100644 lgsm/data/appmanifest/dmc/appmanifest_10.acf create mode 100644 lgsm/data/appmanifest/dmc/appmanifest_40.acf create mode 100644 lgsm/data/appmanifest/dmc/appmanifest_70.acf create mode 100644 lgsm/data/appmanifest/dmc/appmanifest_90.acf create mode 100644 lgsm/data/appmanifest/dod/appmanifest_10.acf create mode 100644 lgsm/data/appmanifest/dod/appmanifest_30.acf create mode 100644 lgsm/data/appmanifest/dod/appmanifest_70.acf create mode 100644 lgsm/data/appmanifest/dod/appmanifest_90.acf create mode 100644 lgsm/data/appmanifest/hldm/appmanifest_10.acf create mode 100644 lgsm/data/appmanifest/hldm/appmanifest_70.acf create mode 100644 lgsm/data/appmanifest/hldm/appmanifest_90.acf create mode 100644 lgsm/data/appmanifest/ns/appmanifest_10.acf create mode 100644 lgsm/data/appmanifest/ns/appmanifest_70.acf create mode 100644 lgsm/data/appmanifest/ns/appmanifest_90.acf create mode 100644 lgsm/data/appmanifest/opfor/appmanifest_10.acf create mode 100644 lgsm/data/appmanifest/opfor/appmanifest_50.acf create mode 100644 lgsm/data/appmanifest/opfor/appmanifest_70.acf create mode 100644 lgsm/data/appmanifest/opfor/appmanifest_90.acf create mode 100644 lgsm/data/appmanifest/ricochet/appmanifest_10.acf create mode 100644 lgsm/data/appmanifest/ricochet/appmanifest_60.acf create mode 100644 lgsm/data/appmanifest/ricochet/appmanifest_70.acf create mode 100644 lgsm/data/appmanifest/ricochet/appmanifest_90.acf create mode 100644 lgsm/data/appmanifest/tfc/appmanifest_10.acf create mode 100644 lgsm/data/appmanifest/tfc/appmanifest_20.acf create mode 100644 lgsm/data/appmanifest/tfc/appmanifest_70.acf create mode 100644 lgsm/data/appmanifest/tfc/appmanifest_90.acf create mode 100644 lgsm/data/appmanifest/ts/appmanifest_10.acf create mode 100644 lgsm/data/appmanifest/ts/appmanifest_70.acf create mode 100644 lgsm/data/appmanifest/ts/appmanifest_90.acf create mode 100644 lgsm/data/appmanifest/vs/appmanifest_10.acf create mode 100644 lgsm/data/appmanifest/vs/appmanifest_70.acf create mode 100644 lgsm/data/appmanifest/vs/appmanifest_90.acf diff --git a/lgsm/data/appmanifest/ahl/appmanifest_10.acf b/lgsm/data/appmanifest/ahl/appmanifest_10.acf new file mode 100644 index 000000000..0c9023856 --- /dev/null +++ b/lgsm/data/appmanifest/ahl/appmanifest_10.acf @@ -0,0 +1,36 @@ +"AppState" +{ + "appid" "10" + "Universe" "1" + "name" "Counter-Strike" + "StateFlags" "68" + "installdir" "Half-Life" + "LastUpdated" "1688984402" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "0" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "11" + { + "manifest" "4720911300072406946" + "size" "292616113" + } + } + "UserConfig" + { + } + "MountedConfig" + { + } +} diff --git a/lgsm/data/appmanifest/ahl/appmanifest_70.acf b/lgsm/data/appmanifest/ahl/appmanifest_70.acf new file mode 100644 index 000000000..9eb708ddd --- /dev/null +++ b/lgsm/data/appmanifest/ahl/appmanifest_70.acf @@ -0,0 +1,41 @@ +"AppState" +{ + "appid" "70" + "Universe" "1" + "name" "Half-Life" + "StateFlags" "68" + "installdir" "Half-Life" + "LastUpdated" "1688984404" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "0" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "1" + { + "manifest" "5928322771446233610" + "size" "429833890" + } + "71" + { + "manifest" "9183617604528345869" + "size" "15302314" + } + } + "UserConfig" + { + } + "MountedConfig" + { + } +} diff --git a/lgsm/data/appmanifest/ahl/appmanifest_90.acf b/lgsm/data/appmanifest/ahl/appmanifest_90.acf new file mode 100644 index 000000000..421982e7d --- /dev/null +++ b/lgsm/data/appmanifest/ahl/appmanifest_90.acf @@ -0,0 +1,49 @@ +"AppState" +{ + "appid" "90" + "Universe" "1" + "name" "Half-Life Dedicated Server" + "StateFlags" "4" + "installdir" "Half-Life" + "LastUpdated" "1688984267" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "76561200949853436" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "4" + { + "manifest" "8690279432129063737" + "size" "25737094" + } + "1006" + { + "manifest" "6912453647411644579" + "size" "72573740" + } + } + "SharedDepots" + { + "1" "70" + "11" "10" + "71" "70" + } + "UserConfig" + { + "mod" "cstrike" + } + "MountedConfig" + { + "mod" "cstrike" + } +} diff --git a/lgsm/data/appmanifest/bb/appmanifest_10.acf b/lgsm/data/appmanifest/bb/appmanifest_10.acf new file mode 100644 index 000000000..604394744 --- /dev/null +++ b/lgsm/data/appmanifest/bb/appmanifest_10.acf @@ -0,0 +1,36 @@ +"AppState" +{ + "appid" "10" + "Universe" "1" + "name" "Counter-Strike" + "StateFlags" "68" + "installdir" "Half-Life" + "LastUpdated" "1688984405" + "SizeOnDisk" "03" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "0" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "11" + { + "manifest" "4720911300072406946" + "size" "292616113" + } + } + "UserConfig" + { + } + "MountedConfig" + { + } +} diff --git a/lgsm/data/appmanifest/bb/appmanifest_70.acf b/lgsm/data/appmanifest/bb/appmanifest_70.acf new file mode 100644 index 000000000..36f34d2ce --- /dev/null +++ b/lgsm/data/appmanifest/bb/appmanifest_70.acf @@ -0,0 +1,41 @@ +"AppState" +{ + "appid" "70" + "Universe" "1" + "name" "Half-Life" + "StateFlags" "68" + "installdir" "Half-Life" + "LastUpdated" "1688984407" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "0" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "1" + { + "manifest" "5928322771446233610" + "size" "429833890" + } + "71" + { + "manifest" "9183617604528345869" + "size" "15302314" + } + } + "UserConfig" + { + } + "MountedConfig" + { + } +} diff --git a/lgsm/data/appmanifest/bb/appmanifest_90.acf b/lgsm/data/appmanifest/bb/appmanifest_90.acf new file mode 100644 index 000000000..c56dda551 --- /dev/null +++ b/lgsm/data/appmanifest/bb/appmanifest_90.acf @@ -0,0 +1,49 @@ +"AppState" +{ + "appid" "90" + "Universe" "1" + "name" "Half-Life Dedicated Server" + "StateFlags" "4" + "installdir" "Half-Life" + "LastUpdated" "1688984269" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "76561200402315446" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "4" + { + "manifest" "8690279432129063737" + "size" "25737094" + } + "1006" + { + "manifest" "6912453647411644579" + "size" "72573740" + } + } + "SharedDepots" + { + "1" "70" + "11" "10" + "71" "70" + } + "UserConfig" + { + "mod" "cstrike" + } + "MountedConfig" + { + "mod" "cstrike" + } +} diff --git a/lgsm/data/appmanifest/cscz/appmanifest_10.acf b/lgsm/data/appmanifest/cscz/appmanifest_10.acf new file mode 100644 index 000000000..c5afe8bc0 --- /dev/null +++ b/lgsm/data/appmanifest/cscz/appmanifest_10.acf @@ -0,0 +1,36 @@ +"AppState" +{ + "appid" "10" + "Universe" "1" + "name" "Counter-Strike" + "StateFlags" "68" + "installdir" "Half-Life" + "LastUpdated" "1666731530" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "0" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "11" + { + "manifest" "4720911300072406946" + "size" "292616113" + } + } + "UserConfig" + { + } + "MountedConfig" + { + } +} diff --git a/lgsm/data/appmanifest/cscz/appmanifest_70.acf b/lgsm/data/appmanifest/cscz/appmanifest_70.acf new file mode 100644 index 000000000..a4157d7e0 --- /dev/null +++ b/lgsm/data/appmanifest/cscz/appmanifest_70.acf @@ -0,0 +1,41 @@ +"AppState" +{ + "appid" "70" + "Universe" "1" + "name" "Half-Life" + "StateFlags" "68" + "installdir" "Half-Life" + "LastUpdated" "1666731530" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "0" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "1" + { + "manifest" "5928322771446233610" + "size" "429833890" + } + "71" + { + "manifest" "9183617604528345869" + "size" "15302314" + } + } + "UserConfig" + { + } + "MountedConfig" + { + } +} diff --git a/lgsm/data/appmanifest/cscz/appmanifest_80.acf b/lgsm/data/appmanifest/cscz/appmanifest_80.acf new file mode 100644 index 000000000..ec35c446d --- /dev/null +++ b/lgsm/data/appmanifest/cscz/appmanifest_80.acf @@ -0,0 +1,36 @@ +"AppState" +{ + "appid" "80" + "Universe" "1" + "name" "Counter-Strike: Condition Zero" + "StateFlags" "68" + "installdir" "Half-Life" + "LastUpdated" "1666731530" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "0" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "81" + { + "manifest" "3601230779843470737" + "size" "415387682" + } + } + "UserConfig" + { + } + "MountedConfig" + { + } +} diff --git a/lgsm/data/appmanifest/cscz/appmanifest_90.acf b/lgsm/data/appmanifest/cscz/appmanifest_90.acf new file mode 100644 index 000000000..184a92b96 --- /dev/null +++ b/lgsm/data/appmanifest/cscz/appmanifest_90.acf @@ -0,0 +1,50 @@ +"AppState" +{ + "appid" "90" + "Universe" "1" + "name" "Half-Life Dedicated Server" + "StateFlags" "4" + "installdir" "Half-Life" + "LastUpdated" "1666731360" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "76561201630089482" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "4" + { + "manifest" "8690279432129063737" + "size" "25737094" + } + "1006" + { + "manifest" "6912453647411644579" + "size" "72573740" + } + } + "SharedDepots" + { + "1" "70" + "11" "10" + "71" "70" + "81" "80" + } + "UserConfig" + { + "mod" "czero" + } + "MountedConfig" + { + "mod" "czero" + } +} diff --git a/lgsm/data/appmanifest/css/appmanifest_10.acf b/lgsm/data/appmanifest/css/appmanifest_10.acf new file mode 100644 index 000000000..0c9b528dc --- /dev/null +++ b/lgsm/data/appmanifest/css/appmanifest_10.acf @@ -0,0 +1,36 @@ +"AppState" +{ + "appid" "10" + "Universe" "1" + "name" "Counter-Strike" + "StateFlags" "68" + "installdir" "Half-Life" + "LastUpdated" "1688984302" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "0" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "11" + { + "manifest" "4720911300072406946" + "size" "292616113" + } + } + "UserConfig" + { + } + "MountedConfig" + { + } +} diff --git a/lgsm/data/appmanifest/css/appmanifest_70.acf b/lgsm/data/appmanifest/css/appmanifest_70.acf new file mode 100644 index 000000000..0a417f8db --- /dev/null +++ b/lgsm/data/appmanifest/css/appmanifest_70.acf @@ -0,0 +1,41 @@ +"AppState" +{ + "appid" "70" + "Universe" "1" + "name" "Half-Life" + "StateFlags" "68" + "installdir" "Half-Life" + "LastUpdated" "1688984304" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "0" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "1" + { + "manifest" "5928322771446233610" + "size" "429833890" + } + "71" + { + "manifest" "9183617604528345869" + "size" "15302314" + } + } + "UserConfig" + { + } + "MountedConfig" + { + } +} diff --git a/lgsm/data/appmanifest/css/appmanifest_90.acf b/lgsm/data/appmanifest/css/appmanifest_90.acf new file mode 100644 index 000000000..3710f9794 --- /dev/null +++ b/lgsm/data/appmanifest/css/appmanifest_90.acf @@ -0,0 +1,49 @@ +"AppState" +{ + "appid" "90" + "Universe" "1" + "name" "Half-Life Dedicated Server" + "StateFlags" "4" + "installdir" "Half-Life" + "LastUpdated" "1688984230" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "76561201379539094" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" 0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "4" + { + "manifest" "8690279432129063737" + "size" "25737094" + } + "1006" + { + "manifest" "6912453647411644579" + "size" "72573740" + } + } + "SharedDepots" + { + "1" "70" + "11" "10" + "71" "70" + } + "UserConfig" + { + "mod" "cstrike" + } + "MountedConfig" + { + "mod" "cstrike" + } +} diff --git a/lgsm/data/appmanifest/dmc/appmanifest_10.acf b/lgsm/data/appmanifest/dmc/appmanifest_10.acf new file mode 100644 index 000000000..2ce041bb6 --- /dev/null +++ b/lgsm/data/appmanifest/dmc/appmanifest_10.acf @@ -0,0 +1,36 @@ +"AppState" +{ + "appid" "10" + "Universe" "1" + "name" "Counter-Strike" + "StateFlags" "68" + "installdir" "Half-Life" + "LastUpdated" "1688984403" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "0" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "11" + { + "manifest" "4720911300072406946" + "size" "292616113" + } + } + "UserConfig" + { + } + "MountedConfig" + { + } +} diff --git a/lgsm/data/appmanifest/dmc/appmanifest_40.acf b/lgsm/data/appmanifest/dmc/appmanifest_40.acf new file mode 100644 index 000000000..11cf69421 --- /dev/null +++ b/lgsm/data/appmanifest/dmc/appmanifest_40.acf @@ -0,0 +1,36 @@ +"AppState" +{ + "appid" "40" + "Universe" "1" + "name" "Deathmatch Classic" + "StateFlags" "68" + "installdir" "Half-Life" + "LastUpdated" "1688984402" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "0" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "41" + { + "manifest" "2010889186716175170" + "size" "48239254" + } + } + "UserConfig" + { + } + "MountedConfig" + { + } +} diff --git a/lgsm/data/appmanifest/dmc/appmanifest_70.acf b/lgsm/data/appmanifest/dmc/appmanifest_70.acf new file mode 100644 index 000000000..1b33e8442 --- /dev/null +++ b/lgsm/data/appmanifest/dmc/appmanifest_70.acf @@ -0,0 +1,41 @@ +"AppState" +{ + "appid" "70" + "Universe" "1" + "name" "Half-Life" + "StateFlags" "68" + "installdir" "Half-Life" + "LastUpdated" "1688984405" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "0" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "1" + { + "manifest" "5928322771446233610" + "size" "429833890" + } + "71" + { + "manifest" "9183617604528345869" + "size" "15302314" + } + } + "UserConfig" + { + } + "MountedConfig" + { + } +} diff --git a/lgsm/data/appmanifest/dmc/appmanifest_90.acf b/lgsm/data/appmanifest/dmc/appmanifest_90.acf new file mode 100644 index 000000000..3fe759c2d --- /dev/null +++ b/lgsm/data/appmanifest/dmc/appmanifest_90.acf @@ -0,0 +1,50 @@ +"AppState" +{ + "appid" "90" + "Universe" "1" + "name" "Half-Life Dedicated Server" + "StateFlags" "4" + "installdir" "Half-Life" + "LastUpdated" "1688984269" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "76561201891266584" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "4" + { + "manifest" "8690279432129063737" + "size" "25737094" + } + "1006" + { + "manifest" "6912453647411644579" + "size" "72573740" + } + } + "SharedDepots" + { + "1" "70" + "11" "10" + "71" "70" + "41" "40" + } + "UserConfig" + { + "mod" "dmc" + } + "MountedConfig" + { + "mod" "dmc" + } +} diff --git a/lgsm/data/appmanifest/dod/appmanifest_10.acf b/lgsm/data/appmanifest/dod/appmanifest_10.acf new file mode 100644 index 000000000..afe7cb85a --- /dev/null +++ b/lgsm/data/appmanifest/dod/appmanifest_10.acf @@ -0,0 +1,36 @@ +"AppState" +{ + "appid" "10" + "Universe" "1" + "name" "Counter-Strike" + "StateFlags" "68" + "installdir" "Half-Life" + "LastUpdated" "1688988451" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "0" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "11" + { + "manifest" "4720911300072406946" + "size" "292616113" + } + } + "UserConfig" + { + } + "MountedConfig" + { + } +} diff --git a/lgsm/data/appmanifest/dod/appmanifest_30.acf b/lgsm/data/appmanifest/dod/appmanifest_30.acf new file mode 100644 index 000000000..c4acdb3bd --- /dev/null +++ b/lgsm/data/appmanifest/dod/appmanifest_30.acf @@ -0,0 +1,36 @@ +"AppState" +{ + "appid" "30" + "Universe" "1" + "name" "Day of Defeat" + "StateFlags" "68" + "installdir" "Half-Life" + "LastUpdated" "1688988451" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "0" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "31" + { + "manifest" "3826716661969602728" + "size" "391387184" + } + } + "UserConfig" + { + } + "MountedConfig" + { + } +} diff --git a/lgsm/data/appmanifest/dod/appmanifest_70.acf b/lgsm/data/appmanifest/dod/appmanifest_70.acf new file mode 100644 index 000000000..fb91ddb35 --- /dev/null +++ b/lgsm/data/appmanifest/dod/appmanifest_70.acf @@ -0,0 +1,41 @@ +"AppState" +{ + "appid" "70" + "Universe" "1" + "name" "Half-Life" + "StateFlags" "68" + "installdir" "Half-Life" + "LastUpdated" "1688988452" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "0" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "1" + { + "manifest" "5928322771446233610" + "size" "429833890" + } + "71" + { + "manifest" "9183617604528345869" + "size" "15302314" + } + } + "UserConfig" + { + } + "MountedConfig" + { + } +} diff --git a/lgsm/data/appmanifest/dod/appmanifest_90.acf b/lgsm/data/appmanifest/dod/appmanifest_90.acf new file mode 100644 index 000000000..c57a3f67f --- /dev/null +++ b/lgsm/data/appmanifest/dod/appmanifest_90.acf @@ -0,0 +1,50 @@ +"AppState" +{ + "appid" "90" + "Universe" "1" + "name" "Half-Life Dedicated Server" + "StateFlags" "4" + "installdir" "Half-Life" + "LastUpdated" "1688988429" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "76561201442771088" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "4" + { + "manifest" "8690279432129063737" + "size" "25737094" + } + "1006" + { + "manifest" "6912453647411644579" + "size" "72573740" + } + } + "SharedDepots" + { + "1" "70" + "11" "10" + "71" "70" + "31" "30" + } + "UserConfig" + { + "mod" "dod" + } + "MountedConfig" + { + "mod" "dod" + } +} diff --git a/lgsm/data/appmanifest/hldm/appmanifest_10.acf b/lgsm/data/appmanifest/hldm/appmanifest_10.acf new file mode 100644 index 000000000..de7355ea0 --- /dev/null +++ b/lgsm/data/appmanifest/hldm/appmanifest_10.acf @@ -0,0 +1,36 @@ +"AppState" +{ + "appid" "10" + "Universe" "1" + "name" "Counter-Strike" + "StateFlags" "68" + "installdir" "Half-Life" + "LastUpdated" "1688984411" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "0" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "11" + { + "manifest" "4720911300072406946" + "size" "292616113" + } + } + "UserConfig" + { + } + "MountedConfig" + { + } +} diff --git a/lgsm/data/appmanifest/hldm/appmanifest_70.acf b/lgsm/data/appmanifest/hldm/appmanifest_70.acf new file mode 100644 index 000000000..0f4b4157f --- /dev/null +++ b/lgsm/data/appmanifest/hldm/appmanifest_70.acf @@ -0,0 +1,41 @@ +"AppState" +{ + "appid" "70" + "Universe" "1" + "name" "Half-Life" + "StateFlags" "68" + "installdir" "Half-Life" + "LastUpdated" "1688984413" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "0" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "1" + { + "manifest" "5928322771446233610" + "size" "429833890" + } + "71" + { + "manifest" "9183617604528345869" + "size" "15302314" + } + } + "UserConfig" + { + } + "MountedConfig" + { + } +} diff --git a/lgsm/data/appmanifest/hldm/appmanifest_90.acf b/lgsm/data/appmanifest/hldm/appmanifest_90.acf new file mode 100644 index 000000000..d9bfbaa7e --- /dev/null +++ b/lgsm/data/appmanifest/hldm/appmanifest_90.acf @@ -0,0 +1,47 @@ +"AppState" +{ + "appid" "90" + "Universe" "1" + "name" "Half-Life Dedicated Server" + "StateFlags" "4" + "installdir" "Half-Life" + "LastUpdated" "1688984301" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "76561199593999446" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "4" + { + "manifest" "8690279432129063737" + "size" "25737094" + } + "1006" + { + "manifest" "6912453647411644579" + "size" "72573740" + } + } + "SharedDepots" + { + "1" "70" + "11" "10" + "71" "70" + } + "UserConfig" + { + } + "MountedConfig" + { + } +} diff --git a/lgsm/data/appmanifest/ns/appmanifest_10.acf b/lgsm/data/appmanifest/ns/appmanifest_10.acf new file mode 100644 index 000000000..edffb84fa --- /dev/null +++ b/lgsm/data/appmanifest/ns/appmanifest_10.acf @@ -0,0 +1,36 @@ +"AppState" +{ + "appid" "10" + "Universe" "1" + "name" "Counter-Strike" + "StateFlags" "68" + "installdir" "Half-Life" + "LastUpdated" "1688984412" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "0" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "11" + { + "manifest" "4720911300072406946" + "size" "292616113" + } + } + "UserConfig" + { + } + "MountedConfig" + { + } +} diff --git a/lgsm/data/appmanifest/ns/appmanifest_70.acf b/lgsm/data/appmanifest/ns/appmanifest_70.acf new file mode 100644 index 000000000..f1866815d --- /dev/null +++ b/lgsm/data/appmanifest/ns/appmanifest_70.acf @@ -0,0 +1,41 @@ +"AppState" +{ + "appid" "70" + "Universe" "1" + "name" "Half-Life" + "StateFlags" "68" + "installdir" "Half-Life" + "LastUpdated" "1688984414" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "0" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "1" + { + "manifest" "5928322771446233610" + "size" "429833890" + } + "71" + { + "manifest" "9183617604528345869" + "size" "15302314" + } + } + "UserConfig" + { + } + "MountedConfig" + { + } +} diff --git a/lgsm/data/appmanifest/ns/appmanifest_90.acf b/lgsm/data/appmanifest/ns/appmanifest_90.acf new file mode 100644 index 000000000..f709c9b5e --- /dev/null +++ b/lgsm/data/appmanifest/ns/appmanifest_90.acf @@ -0,0 +1,49 @@ +"AppState" +{ + "appid" "90" + "Universe" "1" + "name" "Half-Life Dedicated Server" + "StateFlags" "4" + "installdir" "Half-Life" + "LastUpdated" "1688984290" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "76561199772965246" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "4" + { + "manifest" "8690279432129063737" + "size" "25737094" + } + "1006" + { + "manifest" "6912453647411644579" + "size" "72573740" + } + } + "SharedDepots" + { + "1" "70" + "11" "10" + "71" "70" + } + "UserConfig" + { + "mod" "cstrike" + } + "MountedConfig" + { + "mod" "cstrike" + } +} diff --git a/lgsm/data/appmanifest/opfor/appmanifest_10.acf b/lgsm/data/appmanifest/opfor/appmanifest_10.acf new file mode 100644 index 000000000..8a3a4fbf4 --- /dev/null +++ b/lgsm/data/appmanifest/opfor/appmanifest_10.acf @@ -0,0 +1,36 @@ +"AppState" +{ + "appid" "10" + "Universe" "1" + "name" "Counter-Strike" + "StateFlags" "68" + "installdir" "Half-Life" + "LastUpdated" "1688984434" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "0" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "11" + { + "manifest" "4720911300072406946" + "size" "292616113" + } + } + "UserConfig" + { + } + "MountedConfig" + { + } +} diff --git a/lgsm/data/appmanifest/opfor/appmanifest_50.acf b/lgsm/data/appmanifest/opfor/appmanifest_50.acf new file mode 100644 index 000000000..83b939a0c --- /dev/null +++ b/lgsm/data/appmanifest/opfor/appmanifest_50.acf @@ -0,0 +1,36 @@ +"AppState" +{ + "appid" "50" + "Universe" "1" + "name" "Half-Life: Opposing Force" + "StateFlags" "68" + "installdir" "Half-Life" + "LastUpdated" "1688984434" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "0" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "51" + { + "manifest" "789184054796507140" + "size" "286265390" + } + } + "UserConfig" + { + } + "MountedConfig" + { + } +} diff --git a/lgsm/data/appmanifest/opfor/appmanifest_70.acf b/lgsm/data/appmanifest/opfor/appmanifest_70.acf new file mode 100644 index 000000000..da3db240e --- /dev/null +++ b/lgsm/data/appmanifest/opfor/appmanifest_70.acf @@ -0,0 +1,41 @@ +"AppState" +{ + "appid" "70" + "Universe" "1" + "name" "Half-Life" + "StateFlags" "68" + "installdir" "Half-Life" + "LastUpdated" "1688984437" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "0" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "1" + { + "manifest" "5928322771446233610" + "size" "429833890" + } + "71" + { + "manifest" "9183617604528345869" + "size" "15302314" + } + } + "UserConfig" + { + } + "MountedConfig" + { + } +} diff --git a/lgsm/data/appmanifest/opfor/appmanifest_90.acf b/lgsm/data/appmanifest/opfor/appmanifest_90.acf new file mode 100644 index 000000000..1ae893bee --- /dev/null +++ b/lgsm/data/appmanifest/opfor/appmanifest_90.acf @@ -0,0 +1,50 @@ +"AppState" +{ + "appid" "90" + "Universe" "1" + "name" "Half-Life Dedicated Server" + "StateFlags" "4" + "installdir" "Half-Life" + "LastUpdated" "1688984298" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "76561198622612838" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "4" + { + "manifest" "8690279432129063737" + "size" "25737094" + } + "1006" + { + "manifest" "6912453647411644579" + "size" "72573740" + } + } + "SharedDepots" + { + "1" "70" + "11" "10" + "71" "70" + "51" "50" + } + "UserConfig" + { + "mod" "gearbox" + } + "MountedConfig" + { + "mod" "gearbox" + } +} diff --git a/lgsm/data/appmanifest/ricochet/appmanifest_10.acf b/lgsm/data/appmanifest/ricochet/appmanifest_10.acf new file mode 100644 index 000000000..8eb50b265 --- /dev/null +++ b/lgsm/data/appmanifest/ricochet/appmanifest_10.acf @@ -0,0 +1,36 @@ +"AppState" +{ + "appid" "10" + "Universe" "1" + "name" "appid_10" + "StateFlags" "68" + "installdir" "Half-Life" + "LastUpdated" "1688999004" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "0" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "11" + { + "manifest" "4720911300072406946" + "size" "292616113" + } + } + "UserConfig" + { + } + "MountedConfig" + { + } +} diff --git a/lgsm/data/appmanifest/ricochet/appmanifest_60.acf b/lgsm/data/appmanifest/ricochet/appmanifest_60.acf new file mode 100644 index 000000000..9fcb75c05 --- /dev/null +++ b/lgsm/data/appmanifest/ricochet/appmanifest_60.acf @@ -0,0 +1,36 @@ +"AppState" +{ + "appid" "60" + "Universe" "1" + "name" "appid_60" + "StateFlags" "68" + "installdir" "Half-Life" + "LastUpdated" "1688999004" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "0" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "61" + { + "manifest" "4560730344969588055" + "size" "17605146" + } + } + "UserConfig" + { + } + "MountedConfig" + { + } +} diff --git a/lgsm/data/appmanifest/ricochet/appmanifest_70.acf b/lgsm/data/appmanifest/ricochet/appmanifest_70.acf new file mode 100644 index 000000000..a9173d995 --- /dev/null +++ b/lgsm/data/appmanifest/ricochet/appmanifest_70.acf @@ -0,0 +1,41 @@ +"AppState" +{ + "appid" "70" + "Universe" "1" + "name" "appid_70" + "StateFlags" "68" + "installdir" "Half-Life" + "LastUpdated" "1688999004" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "0" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "1" + { + "manifest" "5928322771446233610" + "size" "429833890" + } + "71" + { + "manifest" "9183617604528345869" + "size" "15302314" + } + } + "UserConfig" + { + } + "MountedConfig" + { + } +} diff --git a/lgsm/data/appmanifest/ricochet/appmanifest_90.acf b/lgsm/data/appmanifest/ricochet/appmanifest_90.acf new file mode 100644 index 000000000..cb48442e5 --- /dev/null +++ b/lgsm/data/appmanifest/ricochet/appmanifest_90.acf @@ -0,0 +1,50 @@ +"AppState" +{ + "appid" "90" + "Universe" "1" + "name" "Half-Life Dedicated Server" + "StateFlags" "4" + "installdir" "Half-Life" + "LastUpdated" "1688999004" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "76561198882404437" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "4" + { + "manifest" "8690279432129063737" + "size" "25737094" + } + "1006" + { + "manifest" "6912453647411644579" + "size" "72573740" + } + } + "SharedDepots" + { + "1" "70" + "11" "10" + "71" "70" + "61" "60" + } + "UserConfig" + { + "mod" "ricochet" + } + "MountedConfig" + { + "mod" "ricochet" + } +} diff --git a/lgsm/data/appmanifest/tfc/appmanifest_10.acf b/lgsm/data/appmanifest/tfc/appmanifest_10.acf new file mode 100644 index 000000000..71c7c40ff --- /dev/null +++ b/lgsm/data/appmanifest/tfc/appmanifest_10.acf @@ -0,0 +1,36 @@ +"AppState" +{ + "appid" "10" + "Universe" "1" + "name" "Counter-Strike" + "StateFlags" "68" + "installdir" "Half-Life" + "LastUpdated" "1688998186" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "0" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "11" + { + "manifest" "4720911300072406946" + "size" "292616113" + } + } + "UserConfig" + { + } + "MountedConfig" + { + } +} diff --git a/lgsm/data/appmanifest/tfc/appmanifest_20.acf b/lgsm/data/appmanifest/tfc/appmanifest_20.acf new file mode 100644 index 000000000..07594e934 --- /dev/null +++ b/lgsm/data/appmanifest/tfc/appmanifest_20.acf @@ -0,0 +1,36 @@ +"AppState" +{ + "appid" "20" + "Universe" "1" + "name" "Team Fortress Classic" + "StateFlags" "68" + "installdir" "Half-Life" + "LastUpdated" "1688998186" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "0" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "21" + { + "manifest" "7841127166138118042" + "size" "124989202" + } + } + "UserConfig" + { + } + "MountedConfig" + { + } +} diff --git a/lgsm/data/appmanifest/tfc/appmanifest_70.acf b/lgsm/data/appmanifest/tfc/appmanifest_70.acf new file mode 100644 index 000000000..0ed30ae60 --- /dev/null +++ b/lgsm/data/appmanifest/tfc/appmanifest_70.acf @@ -0,0 +1,41 @@ +"AppState" +{ + "appid" "70" + "Universe" "1" + "name" "Half-Life" + "StateFlags" "68" + "installdir" "Half-Life" + "LastUpdated" "1688998186" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "0" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "1" + { + "manifest" "5928322771446233610" + "size" "429833890" + } + "71" + { + "manifest" "9183617604528345869" + "size" "15302314" + } + } + "UserConfig" + { + } + "MountedConfig" + { + } +} diff --git a/lgsm/data/appmanifest/tfc/appmanifest_90.acf b/lgsm/data/appmanifest/tfc/appmanifest_90.acf new file mode 100644 index 000000000..0bb518bd5 --- /dev/null +++ b/lgsm/data/appmanifest/tfc/appmanifest_90.acf @@ -0,0 +1,50 @@ +"AppState" +{ + "appid" "90" + "Universe" "1" + "name" "Half-Life Dedicated Server" + "StateFlags" "4" + "installdir" "Half-Life" + "LastUpdated" "1688998186" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "76561201883029803" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "4" + { + "manifest" "8690279432129063737" + "size" "25737094" + } + "1006" + { + "manifest" "6912453647411644579" + "size" "72573740" + } + } + "SharedDepots" + { + "1" "70" + "11" "10" + "71" "70" + "21" "20" + } + "UserConfig" + { + "mod" "tfc" + } + "MountedConfig" + { + "mod" "tfc" + } +} diff --git a/lgsm/data/appmanifest/ts/appmanifest_10.acf b/lgsm/data/appmanifest/ts/appmanifest_10.acf new file mode 100644 index 000000000..e04a2f26f --- /dev/null +++ b/lgsm/data/appmanifest/ts/appmanifest_10.acf @@ -0,0 +1,36 @@ +"AppState" +{ + "appid" "10" + "Universe" "1" + "name" "Counter-Strike" + "StateFlags" "68" + "installdir" "Half-Life" + "LastUpdated" "1688983936" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "0" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "11" + { + "manifest" "4720911300072406946" + "size" "292616113" + } + } + "UserConfig" + { + } + "MountedConfig" + { + } +} diff --git a/lgsm/data/appmanifest/ts/appmanifest_70.acf b/lgsm/data/appmanifest/ts/appmanifest_70.acf new file mode 100644 index 000000000..d7d0228e2 --- /dev/null +++ b/lgsm/data/appmanifest/ts/appmanifest_70.acf @@ -0,0 +1,41 @@ +"AppState" +{ + "appid" "70" + "Universe" "1" + "name" "Half-Life" + "StateFlags" "68" + "installdir" "Half-Life" + "LastUpdated" "1688983937" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "0" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "1" + { + "manifest" "5928322771446233610" + "size" "429833890" + } + "71" + { + "manifest" "9183617604528345869" + "size" "15302314" + } + } + "UserConfig" + { + } + "MountedConfig" + { + } +} diff --git a/lgsm/data/appmanifest/ts/appmanifest_90.acf b/lgsm/data/appmanifest/ts/appmanifest_90.acf new file mode 100644 index 000000000..b560cb4be --- /dev/null +++ b/lgsm/data/appmanifest/ts/appmanifest_90.acf @@ -0,0 +1,49 @@ +"AppState" +{ + "appid" "90" + "Universe" "1" + "name" "Half-Life Dedicated Server" + "StateFlags" "4" + "installdir" "Half-Life" + "LastUpdated" "1688983870" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "76561202249148738" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "4" + { + "manifest" "8690279432129063737" + "size" "25737094" + } + "1006" + { + "manifest" "6912453647411644579" + "size" "72573740" + } + } + "SharedDepots" + { + "1" "70" + "11" "10" + "71" "70" + } + "UserConfig" + { + "mod" "cstrike" + } + "MountedConfig" + { + "mod" "cstrike" + } +} diff --git a/lgsm/data/appmanifest/vs/appmanifest_10.acf b/lgsm/data/appmanifest/vs/appmanifest_10.acf new file mode 100644 index 000000000..71c7c40ff --- /dev/null +++ b/lgsm/data/appmanifest/vs/appmanifest_10.acf @@ -0,0 +1,36 @@ +"AppState" +{ + "appid" "10" + "Universe" "1" + "name" "Counter-Strike" + "StateFlags" "68" + "installdir" "Half-Life" + "LastUpdated" "1688998186" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "0" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "11" + { + "manifest" "4720911300072406946" + "size" "292616113" + } + } + "UserConfig" + { + } + "MountedConfig" + { + } +} diff --git a/lgsm/data/appmanifest/vs/appmanifest_70.acf b/lgsm/data/appmanifest/vs/appmanifest_70.acf new file mode 100644 index 000000000..a470329f1 --- /dev/null +++ b/lgsm/data/appmanifest/vs/appmanifest_70.acf @@ -0,0 +1,41 @@ +"AppState" +{ + "appid" "70" + "Universe" "1" + "name" "Half-Life" + "StateFlags" "68" + "installdir" "Half-Life" + "LastUpdated" "1688983882" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "0" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "1" + { + "manifest" "5928322771446233610" + "size" "429833890" + } + "71" + { + "manifest" "9183617604528345869" + "size" "15302314" + } + } + "UserConfig" + { + } + "MountedConfig" + { + } +} diff --git a/lgsm/data/appmanifest/vs/appmanifest_90.acf b/lgsm/data/appmanifest/vs/appmanifest_90.acf new file mode 100644 index 000000000..ae333872f --- /dev/null +++ b/lgsm/data/appmanifest/vs/appmanifest_90.acf @@ -0,0 +1,49 @@ +"AppState" +{ + "appid" "90" + "Universe" "1" + "name" "Half-Life Dedicated Server" + "StateFlags" "4" + "installdir" "Half-Life" + "LastUpdated" "1688983843" + "SizeOnDisk" "0" + "StagingSize" "0" + "buildid" "0" + "LastOwner" "76561200857512115" + "UpdateResult" "0" + "BytesToDownload" "0" + "BytesDownloaded" "0" + "BytesToStage" "0" + "BytesStaged" "0" + "TargetBuildID" "0" + "AutoUpdateBehavior" "0" + "AllowOtherDownloadsWhileRunning" "0" + "ScheduledAutoUpdate" "0" + "InstalledDepots" + { + "4" + { + "manifest" "8690279432129063737" + "size" "25737094" + } + "1006" + { + "manifest" "6912453647411644579" + "size" "72573740" + } + } + "SharedDepots" + { + "1" "70" + "11" "10" + "71" "70" + } + "UserConfig" + { + "mod" "cstrike" + } + "MountedConfig" + { + "mod" "cstrike" + } +} diff --git a/lgsm/modules/core_steamcmd.sh b/lgsm/modules/core_steamcmd.sh index 78c30f60a..02074620d 100644 --- a/lgsm/modules/core_steamcmd.sh +++ b/lgsm/modules/core_steamcmd.sh @@ -147,7 +147,7 @@ fn_check_steamcmd_exec() { fn_update_steamcmd_localbuild() { # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" - fn_appmanifest_check + fn_check_steamcmd_appmanifest # Uses appmanifest to find local build. localbuild=$(grep buildid "${appmanifestfile}" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\ -f3) @@ -174,8 +174,8 @@ fn_update_steamcmd_remotebuild() { fi # Removes appinfo.vdf as a fix for not always getting up to date version info from SteamCMD. - if [ "$(find "${HOME}" -type f -name "appinfo.vdf" | wc -l)" -ne "0" ]; then - find "${HOME}" -type f -name "appinfo.vdf" -exec rm -f {} \; + if [ "$(find "${HOME}" -type f -name "appinfo.vdf" 2> /dev/null | wc -l)" -ne "0" ]; then + find "${HOME}" -type f -name "appinfo.vdf" -exec rm -f {} \; 2> /dev/null fi # password for branch not needed to check the buildid @@ -281,14 +281,13 @@ fn_update_steamcmd_compare() { } fn_appmanifest_info() { - appmanifestfile=$(find -L "${serverfiles}" -type f -name "appmanifest_${appid}.acf") - appmanifestfilewc=$(find -L "${serverfiles}" -type f -name "appmanifest_${appid}.acf" | wc -l) + appmanifestfile=$(find -L "${serverfiles}/steamapps" -type f -name "appmanifest_${appid}.acf") + appmanifestfilewc=$(find -L "${serverfiles}/steamapps" -type f -name "appmanifest_${appid}.acf" | wc -l) } -fn_appmanifest_check() { +fn_check_steamcmd_appmanifest() { fn_appmanifest_info # Multiple or no matching appmanifest files may sometimes be present. - # This error is corrected if required. if [ "${appmanifestfilewc}" -ge "2" ]; then fn_print_error "Multiple appmanifest_${appid}.acf files found" fn_script_log_error "Multiple appmanifest_${appid}.acf files found" @@ -327,4 +326,96 @@ fn_appmanifest_check() { core_exit.sh fi fi + + # Checking for half completed updates. + bytesdownloaded=$(grep BytesDownloaded "${appmanifestfile}" | tr -cd '[:digit:]') + bytestodownload=$(grep BytesToDownload "${appmanifestfile}" | tr -cd '[:digit:]') + if [ "${bytesdownloaded}" != "${bytestodownload}" ]; then + fn_print_error_nl "BytesDownloaded and BytesToDownload do not match" + fn_script_log_error "BytesDownloaded and BytesToDownload do not match" + fn_print_info_nl "Forcing update to correct issue" + fn_script_log_info "Forcing update to correct issue" + fn_dl_steamcmd + fi + + bytesstaged=$(grep BytesStaged "${appmanifestfile}" | tr -cd '[:digit:]') + bytestostage=$(grep BytesToStage "${appmanifestfile}" | tr -cd '[:digit:]') + if [ "${bytesstaged}" != "${bytestostage}" ]; then + fn_print_error_nl "BytesStaged and BytesToStage do not match" + fn_script_log_error "BytesStaged and BytesToStage do not match" + fn_print_info_nl "Forcing update to correct issue" + fn_script_log_info "Forcing update to correct issue" + fn_dl_steamcmd + fi + + # if engine is GoldSrc check SharedDepots exists in appmanifest_90.acf + if [ "${engine}" == "goldsrc" ]; then + shareddepotsexists=$(grep -c SharedDepots "${serverfiles}/steamapps/appmanifest_90.acf") + if [ ! -f "${serverfiles}/steamapps/appmanifest_90.acf" ] || [ "${shareddepotsexists}" == "0" ]; then + fn_print_error_nl "SharedDepots missing from appmanifest_${appid}.acf" + fn_script_log_error "SharedDepots missing from appmanifest_${appid}.acf" + fn_print_info_nl "Forcing update to correct issue" + fn_script_log_info "Forcing update to correct issue" + if [ "${shortname}" == "ahl" ]; then + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + elif [ "${shortname}" == "bb" ]; then + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + elif [ "${shortname}" == "cscz" ]; then + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_80.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + elif [ "${shortname}" == "css" ]; then + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + elif [ "${shortname}" == "dmc" ]; then + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_40.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + elif [ "${shortname}" == "dod" ]; then + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_30.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + elif [ "${shortname}" == "hldm" ]; then + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + elif [ "${shortname}" == "ns" ]; then + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + elif [ "${shortname}" == "opfor" ]; then + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_50.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + elif [ "${shortname}" == "ricochet" ]; then + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_60.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + elif [ "${shortname}" == "tfc" ]; then + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_20.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + elif [ "${shortname}" == "ts" ]; then + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + elif [ "${shortname}" == "vs" ]; then + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fi + fn_dl_steamcmd + fi + fi } diff --git a/lgsm/modules/install_server_files.sh b/lgsm/modules/install_server_files.sh index 717030df4..6db904992 100644 --- a/lgsm/modules/install_server_files.sh +++ b/lgsm/modules/install_server_files.sh @@ -214,6 +214,7 @@ if [ "${appid}" ]; then remotelocation="SteamCMD" forceupdate=1 update_steamcmd.sh + fn_check_steamcmd_appmanifest fi if [ "${shortname}" == "ts3" ]; then From c3d51d2d235d792a095cdf46d98d6162f2742b5b Mon Sep 17 00:00:00 2001 From: Marcin Jakubowski Date: Wed, 12 Jul 2023 15:05:21 +0200 Subject: [PATCH 211/374] fix(armar): adapts game info to the new specification of server config (#4240) * fix(armar): adapts game info to the new specification of server config * fix(armar): back to legacy a2s settings --- lgsm/functions/info_game.sh | 8 ++++---- lgsm/modules/info_game.sh | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index 8c9ca310a..2cba64c4a 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -102,11 +102,11 @@ fn_info_game_armar() { servername="${unavailable}" serverpassword="${unavailable}" else - adminpassword=$(jq -r '.adminPassword' "${servercfgfullpath}") + adminpassword=$(jq -r '.game.passwordAdmin' "${servercfgfullpath}") battleeyeport=1376 - configip=$(jq -r '.gameHostBindAddress' "${servercfgfullpath}") - maxplayers=$(jq -r '.game.playerCountLimit' "${servercfgfullpath}") - port=$(jq -r '.gameHostBindPort' "${servercfgfullpath}") + configip=$(jq -r '.bindAddress' "${servercfgfullpath}") + maxplayers=$(jq -r '.game.maxPlayers' "${servercfgfullpath}") + port=$(jq -r '.bindPort' "${servercfgfullpath}") queryport=$(jq -r '.steamQueryPort' "${servercfgfullpath}") servername=$(jq -r '.game.name' "${servercfgfullpath}") serverpassword=$(jq -r '.game.password' "${servercfgfullpath}") diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index fea995d27..0231abd9a 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -872,10 +872,10 @@ fn_info_game_ut2k4() { # Filetype: json fn_info_game_armar() { if [ -f "${servercfgfullpath}" ]; then - fn_info_game_json "adminpassword" ".adminPassword" - fn_info_game_json "configip" ".gameHostBindAddress" - fn_info_game_json "maxplayers" ".game.playerCountLimit" - fn_info_game_json "port" ".gameHostBindPort" + fn_info_game_json "adminpassword" ".game.passwordAdmin" + fn_info_game_json "configip" ".bindAddress" + fn_info_game_json "maxplayers" ".game.maxPlayers" + fn_info_game_json "port" ".bindPort" fn_info_game_json "queryport" ".steamQueryPort" fn_info_game_json "servername" ".game.name" fn_info_game_json "serverpassword" ".game.password" From ba7500901e511fd098b9157d8d107a0f4da0e701 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Jul 2023 14:07:57 +0100 Subject: [PATCH 212/374] build(deps): bump github/issue-labeler from 3.1 to 3.2 (#4258) Bumps [github/issue-labeler](https://github.com/github/issue-labeler) from 3.1 to 3.2. - [Release notes](https://github.com/github/issue-labeler/releases) - [Commits](https://github.com/github/issue-labeler/compare/v3.1...v3.2) --- updated-dependencies: - dependency-name: github/issue-labeler dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/labeler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index f04630831..44beca03d 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Issue Labeler - uses: github/issue-labeler@v3.1 + uses: github/issue-labeler@v3.2 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" configuration-path: .github/labeler.yml From 1149efd57f2775ba40080ab89eb06bddf0d0f8c2 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 12 Jul 2023 15:17:19 +0100 Subject: [PATCH 213/374] fix(wet): correct queryport assignment --- lgsm/modules/info_game.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 0231abd9a..183110e63 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -2123,7 +2123,7 @@ fn_info_game_wet() { configip="${configip:-"0.0.0.0"}" maxplayers="${maxplayers:-"0"}" port="${port:-"0"}" - queryport="${queryport:-"0"}" + queryport="${port}" rconpassword="${rconpassword:-"NOT SET"}" servername="${servername:-"NOT SET"}" serverpassword="${serverpassword:-"NOT SET"}" From 9be4a094978e14ee4c77818c69a136c9f7c39d6a Mon Sep 17 00:00:00 2001 From: Marcin Jakubowski Date: Thu, 20 Jul 2023 21:46:12 +0200 Subject: [PATCH 214/374] fix(armar): fix parsing new a2s config (#4268) --- lgsm/functions/info_game.sh | 6 +++--- lgsm/modules/info_game.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index 2cba64c4a..b8f94c18a 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -97,8 +97,8 @@ fn_info_game_armar() { if [ ! -f "${servercfgfullpath}" ]; then adminpassword="${unavailable}" maxplayers="${zero}" - port=${port:-"0"} - queryport= + port="${zero}" + queryport="${zero}" servername="${unavailable}" serverpassword="${unavailable}" else @@ -107,7 +107,7 @@ fn_info_game_armar() { configip=$(jq -r '.bindAddress' "${servercfgfullpath}") maxplayers=$(jq -r '.game.maxPlayers' "${servercfgfullpath}") port=$(jq -r '.bindPort' "${servercfgfullpath}") - queryport=$(jq -r '.steamQueryPort' "${servercfgfullpath}") + queryport=$(jq -r '.a2s.port' "${servercfgfullpath}") servername=$(jq -r '.game.name' "${servercfgfullpath}") serverpassword=$(jq -r '.game.password' "${servercfgfullpath}") diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 183110e63..d52810e37 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -876,7 +876,7 @@ fn_info_game_armar() { fn_info_game_json "configip" ".bindAddress" fn_info_game_json "maxplayers" ".game.maxPlayers" fn_info_game_json "port" ".bindPort" - fn_info_game_json "queryport" ".steamQueryPort" + fn_info_game_json "queryport" ".a2s.port" fn_info_game_json "servername" ".game.name" fn_info_game_json "serverpassword" ".game.password" fi From ab09a324102e475d01c7e869b3b7494b291eac54 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 20 Jul 2023 21:13:33 +0100 Subject: [PATCH 215/374] fix: rework wurm server (#4266) * feat: copy missing directories Copy the Creative and Adventure directories if they are missing in the server files. This ensures that the necessary directories are present for proper functioning of the server. * refactor: update default configuration for Wurm server - Updated the default configuration file for Wurm server. - Added predefined parameters for game mode, home kingdom, admin password, epic settings, home server, login server, max players, server name, IP address, and ports. - Modified start parameters to include the new predefined parameters. - Removed unnecessary lines related to glibc version and sourcing the server config file. - Updated backup directory path. * feat: add rmiport and rmiregport to startparameters This commit adds the `rmiport` and `rmiregport` parameters to the `startparameters` configuration in the Wurm server default config file. These parameters are used for remote method invocation (RMI) port configuration. * feat: update Wurm server configuration and information - Updated the default configuration file for the Wurm server. - Added a new parameter for server-to-server communication. - Modified the game information script to display the RMI and RMI Registry ports. This commit improves the configuration and information retrieval for the Wurm server. * refactor: update startparameters in wurmserver config The startparameters variable in the wurmserver config file has been updated to remove unnecessary single quotes around the gamemode parameter. This change improves consistency and readability of the code. * refactor: update startparameters in wurmserver config The startparameters variable in the wurmserver config file has been updated to include additional parameters for the game server. This change ensures that the server starts with the correct settings and configurations. * refactor: remove unnecessary start parameter The commit removes the 'start' parameter from the server's start parameters in the default configuration file. This change simplifies the configuration by removing an unnecessary parameter. * refactor: update default value for adminpassword in fn_info_game_wurm The default value for the adminpassword variable in the fn_info_game_wurm function has been updated to "NOT SET" instead of "0". This change ensures that the admin password is properly initialized when not explicitly set. * feat: add link to Wurm Unlimited server administration documentation Added a link to the Wurm Unlimited server administration documentation in the default configuration file for LGSM's Wurm server. This will provide users with easy access to information on managing their game servers. * refactor: remove unnecessary configs in wurmserver config The commit removes unused lines in the wurmserver configuration file. The removed lines include servercfgdir, servercfg, servercfgdefault, and servercfgfullpath. These lines are no longer needed and have been removed to clean up the code. --- .../config-lgsm/wurmserver/_default.cfg | 51 ++++++++++++++++--- lgsm/modules/fix_wurm.sh | 21 ++++---- lgsm/modules/info_game.sh | 47 +++++++---------- lgsm/modules/info_messages.sh | 2 + 4 files changed, 75 insertions(+), 46 deletions(-) diff --git a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg index 754fc5922..f648abe05 100644 --- a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg @@ -8,9 +8,52 @@ #### Game Server Settings #### +## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters +# https://www.wurmpedia.com/index.php/Server_administration_(Wurm_Unlimited) + +# Game mode (Creative|Adventure) +gamemode="Creative" + +# The kingdom the server belongs to. +# If you're using the Adventure base, use 1, 2, or 3. +# If you're using Creative, use 4. +# Kingdom numbers: +# 0 - No kingdom +# 1 - Jen-Kellon +# 2 - Mol-Rehan +# 3 - Horde of the Summoned +# 4 - Freedom +homekingdom="4" + +# Unlocks the admin commands from within the game, that can be used to change +# the gameplay settings of the server, such as skill gain rate and field growth time. +adminpassword="ADMINPASSWORD" + +# If true the server will follow the rules from the Epic servers in Wurm Online. +# For instance it will use the skill curve. +epicsettings="false" + +# If the server is a home server (belongs to a single kingdom). +homeserver="true" + +# Defaults to true, should only be set to false if the server is intended to be +# connected with another server that is going to act as a loginserver. +loginserver="true" + +# Used for server to server communication. +rmiport="7221" +rmiregport="7220" + +maxplayers="200" +servername="LinuxGSM" +serverpassword="" +ip="0.0.0.0" +port="3724" +queryport="27016" + ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters # Parameters are edited in the game server config file. -startparameters="ADMINPWD=\"$ADMINPWD\" EPICSETTINGS=\"$EPICSETTINGS\" EXTERNALPORT=\"$EXTERNALPORT\" HOMESERVER=\"$HOMESERVER\" HOMEKINGDOM=\"$HOMEKINGDOM\" LOGINSERVER=\"$LOGINSERVER\" MAXPLAYERS=\"$MAXPLAYERS\" QUERYPORT=\"$QUERYPORT\" SERVERNAME=\"$SERVERNAME\" SERVERPASSWORD=\"$SERVERPASSWORD\" START=\"$START\" IP=\"$IP\"" +startparameters="start=${gamemode} adminpwd='${adminpassword}' epicsettings='${epicsettings}' externalport='${port}' homeserver='${homeserver}' homekingdom='${homekingdom}' loginserver='${loginserver}' maxplayers='${maxplayers}' queryport='${queryport}' rmiport='${rmiport}' rmiregport='${rmiregport}' servername='${servername}' serverpassword='${serverpassword}' ip='${ip}'" #### LinuxGSM Settings #### @@ -157,13 +200,7 @@ glibc="2.14" ## Game Server Directories systemdir="${serverfiles}" executabledir="${systemdir}" -preexecutable="xvfb-run" executable="./WurmServerLauncher" -servercfgdir="${systemdir}" -servercfg="${selfname}.cfg" -servercfgdefault="server.cfg" -servercfgfullpath="${servercfgdir}/${servercfg}" -source "${servercfgfullpath}" ## Backup Directory backupdir="${lgsmdir}/backup" diff --git a/lgsm/modules/fix_wurm.sh b/lgsm/modules/fix_wurm.sh index 1536df2e7..73eaac93e 100644 --- a/lgsm/modules/fix_wurm.sh +++ b/lgsm/modules/fix_wurm.sh @@ -10,14 +10,15 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # First run requires start with no parms. # After first run new dirs are created. if [ ! -d "${serverfiles}/Creative" ]; then - parmsbypass=1 - fixbypass=1 - exitbypass=1 - command_start.sh - fn_firstcommand_reset - sleep 10 - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - unset parmsbypass + fixname="Copy Creative directory" + fn_fix_msg_start + cp -R "${serverfiles}/dist/Creative" "${serverfiles}/Creative" + fn_fix_msg_end +fi + +if [ ! -d "${serverfiles}/Adventure" ]; then + fixname="Copy Adventure directory" + fn_fix_msg_start + cp -R "${serverfiles}/dist/Adventure" "${serverfiles}/Adventure" + fn_fix_msg_end fi diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index d52810e37..d5e671205 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -2175,36 +2175,25 @@ fn_info_game_wmc() { fi } -# Config Type: custom (key-value) -# Comment: # -# Example: SERVERNAME=SERVERNAME +# Config Type: parameters +# Parameters: true +# Comment: +# Example: hostname='SERVERNAME' +# Filetype: parameters fn_info_game_wurm() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - port="${zero}" - queryport="${zero}" - rconpassword="${unavailable}" - servername="${unavailable}" - serverpassword="${unavailable}" - adminpassword="${unavailable}" - maxplayers="${zero}" - else - port=$(grep "EXTERNALPORT=" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - queryport=$(grep "QUERYPORT=" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - servername=$(grep "SERVERNAME=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/SERVERNAME//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "SERVERPASSWORD=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/SERVERPASSWORD//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - adminpassword=$(grep "ADMINPWD=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/ADMINPWD//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "MAXPLAYERS=" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - configip=$(grep "IP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/IP//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - port="${port:-"3724"}" - queryport="${queryport:-"27017"}" - servername="${servername:-"NOT SET"}" - serverpassword="${serverpassword:-"NOT SET"}" - adminpassword="${adminpassword:-"NOT SET"}" - maxplayers="${maxplayers:-"0"}" - fi + gamemode="${gamemode:-"NOT SET"}" + homekingdom="${homekingdom:-"0"}" + adminpassword="${adminpassword:-"NOT SET"}" + epicsettings="${epicsettings:-"NOT SET"}" + homeserver="${homeserver:-"NOT SET"}" + loginserver="${loginserver:-"NOT SET"}" + rmiport="${rmiport:-"0"}" + rmiregport="${rmiregport:-"0"}" + maxplayers="${maxplayers:-"0"}" + servername="${servername:-"NOT SET"}" + # serverpassword="${serverpassword:-"NOT SET"}" + port="${port:-"0"}" + queryport="${queryport:-"0"}" } unavailable="${red}UNAVAILABLE${default}" diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index 302f54a38..8c601a654 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -1666,6 +1666,8 @@ fn_info_message_wurm() { fn_port "header" fn_port "Game" port tcp fn_port "Query" queryport udp + fn_port "RMI" rmiport tcp + fn_port "RMI Registry" rmiregport tcp } | column -s $'\t' -t } From e9f2453e48d803ebcf8d3c0a10dfa1902252c09a Mon Sep 17 00:00:00 2001 From: ChaCha <15073640+cclecle@users.noreply.github.com> Date: Thu, 20 Jul 2023 22:54:05 +0100 Subject: [PATCH 216/374] Fix(tmux): better tmux session handling for multiple instance on same server / user session (#3767) * fix(tmux): force tmux to create a new trmux server instance for each game instance to avoid sharing same pid. * refactor: improve tmux command consistency and add session name flag This commit refactors the code to improve consistency in the usage of the `tmux` command. It adds the `-L` flag followed by the session name to all `tmux` commands. This ensures that all commands are executed within the correct session. Additionally, it updates the `check_status.sh`, `command_console.sh`, `command_send.sh`, `command_start.sh`, `command_stop.sh`, and `info_distro.sh` files to include this change. The changes ensure that all relevant commands are executed within the specified session, improving code readability and maintainability. --------- Co-authored-by: cclecle Co-authored-by: Daniel Gibbs --- lgsm/functions/check_status.sh | 2 +- lgsm/functions/command_console.sh | 2 +- lgsm/functions/command_send.sh | 2 +- lgsm/functions/command_start.sh | 10 +++++----- lgsm/functions/command_stop.sh | 12 ++++++------ lgsm/functions/info_distro.sh | 2 +- lgsm/modules/check_status.sh | 2 +- lgsm/modules/command_console.sh | 2 +- lgsm/modules/command_send.sh | 2 +- lgsm/modules/command_start.sh | 14 +++++++------- lgsm/modules/command_stop.sh | 12 ++++++------ lgsm/modules/info_distro.sh | 2 +- 12 files changed, 32 insertions(+), 32 deletions(-) diff --git a/lgsm/functions/check_status.sh b/lgsm/functions/check_status.sh index 28ec38eb2..a454b4eff 100644 --- a/lgsm/functions/check_status.sh +++ b/lgsm/functions/check_status.sh @@ -7,4 +7,4 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -status=$(tmux list-sessions -F "#{session_name}" 2> /dev/null | grep -Ecx "^${sessionname}") +status=$(tmux -L "${sessionname}" list-sessions -F "#{session_name}" 2>/dev/null | grep -Ecx "^${sessionname}") diff --git a/lgsm/functions/command_console.sh b/lgsm/functions/command_console.sh index 5b84789e6..4f09776b8 100644 --- a/lgsm/functions/command_console.sh +++ b/lgsm/functions/command_console.sh @@ -42,7 +42,7 @@ check_status.sh if [ "${status}" != "0" ]; then fn_print_ok_nl "Accessing console" fn_script_log_pass "Console accessed" - tmux attach-session -t "${sessionname}" + tmux -L "${sessionname}" attach-session -t "${sessionname}" fn_print_ok_nl "Closing console" fn_script_log_pass "Console closed" else diff --git a/lgsm/functions/command_send.sh b/lgsm/functions/command_send.sh index c143276f6..d65212571 100644 --- a/lgsm/functions/command_send.sh +++ b/lgsm/functions/command_send.sh @@ -26,7 +26,7 @@ if [ "${status}" != "0" ]; then fi echo "" fn_print_dots "Sending command to console: \"${commandtosend}\"" - tmux send-keys -t "${servicename}" "${commandtosend}" ENTER + tmux -L "${sessionname}" send-keys -t "${servicename}" "${commandtosend}" ENTER fn_print_ok_nl "Sending command to console: \"${commandtosend}\"" fn_script_log_pass "Command \"${commandtosend}\" sent to console" else diff --git a/lgsm/functions/command_start.sh b/lgsm/functions/command_start.sh index 04c6b4e64..699bc8222 100644 --- a/lgsm/functions/command_start.sh +++ b/lgsm/functions/command_start.sh @@ -37,7 +37,7 @@ fn_start_teamspeak3() { # Used to allow update to detect JK2MV server version. fn_start_jk2() { fn_start_tmux - tmux send -t "${sessionname}" version ENTER > /dev/null 2>&1 + tmux -L "${sessionname}" send -t "${sessionname}" version ENTER > /dev/null 2>&1 } fn_start_tmux() { @@ -80,7 +80,7 @@ fn_start_tmux() { cd "${executabledir}" || exit fi - tmux new-session -d -x "${sessionwidth}" -y "${sessionheight}" -s "${sessionname}" "${preexecutable} ${executable} ${startparameters}" 2> "${lgsmlogdir}/.${selfname}-tmux-error.tmp" + tmux -L "${sessionname}" new-session -d -x "${sessionwidth}" -y "${sessionheight}" -s "${sessionname}" "${preexecutable} ${executable} ${startparameters}" 2> "${lgsmlogdir}/.${selfname}-tmux-error.tmp" # Create logfile. touch "${consolelog}" @@ -94,9 +94,9 @@ fn_start_tmux() { echo -e "tmux version: master (user compiled)" >> "${consolelog}" if [ "${consolelogging}" == "on" ] || [ -z "${consolelogging}" ]; then if [ "$logtimestamp" == "on" ]; then - tmux pipe-pane -o -t "${sessionname}" "exec bash -c \"cat | $addtimestamp\" >> '${consolelog}'" + tmux -L "${sessionname}" pipe-pane -o -t "${sessionname}" "exec bash -c \"cat | $addtimestamp\" >> '${consolelog}'" else - tmux pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'" + tmux -L "${sessionname}" pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'" fi fi @@ -143,7 +143,7 @@ fn_start_tmux() { echo -e "" echo -e "Command" echo -e "=================================" - echo -e "tmux new-session -d -s \"${sessionname}\" \"${preexecutable} ${executable} ${startparameters}\"" | tee -a "${lgsmlog}" + echo -e "tmux -L \"${sessionname}\" new-session -d -s \"${sessionname}\" \"${preexecutable} ${executable} ${startparameters}\"" | tee -a "${lgsmlog}" echo -e "" echo -e "Error" echo -e "=================================" diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index d18ef7c23..d2e88fcea 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -15,7 +15,7 @@ fn_stop_graceful_ctrlc() { fn_print_dots "Graceful: CTRL+c" fn_script_log_info "Graceful: CTRL+c" # Sends quit. - tmux send-keys -t "${sessionname}" C-c > /dev/null 2>&1 + tmux -L "${sessionname}" send-keys -t "${sessionname}" C-c > /dev/null 2>&1 # Waits up to 30 seconds giving the server time to shutdown gracefuly. for seconds in {1..30}; do check_status.sh @@ -43,7 +43,7 @@ fn_stop_graceful_cmd() { fn_print_dots "Graceful: sending \"${1}\"" fn_script_log_info "Graceful: sending \"${1}\"" # Sends specific stop command. - tmux send -t "${sessionname}" ENTER "${1}" ENTER > /dev/null 2>&1 + tmux -L "${sessionname}" send -t "${sessionname}" ENTER "${1}" ENTER > /dev/null 2>&1 # Waits up to ${seconds} seconds giving the server time to shutdown gracefully. for ((seconds = 1; seconds <= ${2}; seconds++)); do check_status.sh @@ -71,7 +71,7 @@ fn_stop_graceful_goldsrc() { fn_print_dots "Graceful: sending \"quit\"" fn_script_log_info "Graceful: sending \"quit\"" # sends quit - tmux send -t "${sessionname}" quit ENTER > /dev/null 2>&1 + tmux -L "${sessionname}" send -t "${sessionname}" quit ENTER > /dev/null 2>&1 # Waits 3 seconds as goldsrc servers restart with the quit command. for seconds in {1..3}; do sleep 1 @@ -184,10 +184,10 @@ fn_stop_graceful_avorion() { fn_print_dots "Graceful: /save /stop" fn_script_log_info "Graceful: /save /stop" # Sends /save. - tmux send-keys -t "${sessionname}" /save ENTER > /dev/null 2>&1 + tmux -L "${sessionname}" send-keys -t "${sessionname}" /save ENTER > /dev/null 2>&1 sleep 5 # Sends /quit. - tmux send-keys -t "${sessionname}" /stop ENTER > /dev/null 2>&1 + tmux -L "${sessionname}" send-keys -t "${sessionname}" /stop ENTER > /dev/null 2>&1 # Waits up to 30 seconds giving the server time to shutdown gracefuly. for seconds in {1..30}; do check_status.sh @@ -240,7 +240,7 @@ fn_stop_tmux() { fn_print_dots "${servername}" fn_script_log_info "tmux kill-session: ${sessionname}: ${servername}" # Kill tmux session. - tmux kill-session -t "${sessionname}" > /dev/null 2>&1 + tmux -L "${sessionname}" kill-session -t "${sessionname}" > /dev/null 2>&1 sleep 0.5 check_status.sh if [ "${status}" == "0" ]; then diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh index f29e621d5..8c2a67adf 100644 --- a/lgsm/functions/info_distro.sh +++ b/lgsm/functions/info_distro.sh @@ -10,7 +10,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" ### Game Server pid if [ "${status}" == "1" ]; then - gameserverpid="$(tmux list-sessions -F "#{session_name} #{pane_pid}" | grep "^${sessionname} " | awk '{print $NF}')" + gameserverpid="$(tmux -L "${sessionname}" list-sessions -F "#{session_name} #{pane_pid}" | grep "^${sessionname} " | awk '{print $NF}')" if [ "${engine}" == "source" ]; then srcdslinuxpid="$(ps -ef | grep -v grep | grep "${gameserverpid}" | grep srcds_linux | awk '{print $2}')" elif [ "${engine}" == "goldsrc" ]; then diff --git a/lgsm/modules/check_status.sh b/lgsm/modules/check_status.sh index 2ebfb3055..6edd4151b 100644 --- a/lgsm/modules/check_status.sh +++ b/lgsm/modules/check_status.sh @@ -7,4 +7,4 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -status=$(tmux list-sessions -F "#{session_name}" 2> /dev/null | grep -Ecx "^${sessionname}") +status=$(tmux -L "${sessionname}" list-sessions -F "#{session_name}" 2> /dev/null | grep -Ecx "^${sessionname}") diff --git a/lgsm/modules/command_console.sh b/lgsm/modules/command_console.sh index e95f2d0e5..95945dbe3 100644 --- a/lgsm/modules/command_console.sh +++ b/lgsm/modules/command_console.sh @@ -42,7 +42,7 @@ check_status.sh if [ "${status}" != "0" ]; then fn_print_ok_nl "Accessing console" fn_script_log_pass "Console accessed" - tmux attach-session -t "${sessionname}" + tmux -L "${sessionname}" attach-session -t "${sessionname}" fn_print_ok_nl "Closing console" fn_script_log_pass "Console closed" else diff --git a/lgsm/modules/command_send.sh b/lgsm/modules/command_send.sh index 8ba8f8412..9f7c20dbb 100644 --- a/lgsm/modules/command_send.sh +++ b/lgsm/modules/command_send.sh @@ -26,7 +26,7 @@ if [ "${status}" != "0" ]; then fi echo "" fn_print_dots "Sending command to console: \"${commandtosend}\"" - tmux send-keys -t "${servicename}" "${commandtosend}" ENTER + tmux -L "${sessionname}" send-keys -t "${servicename}" "${commandtosend}" ENTER fn_print_ok_nl "Sending command to console: \"${commandtosend}\"" fn_script_log_pass "Command \"${commandtosend}\" sent to console" else diff --git a/lgsm/modules/command_start.sh b/lgsm/modules/command_start.sh index e5021cde2..b9f8fa51c 100644 --- a/lgsm/modules/command_start.sh +++ b/lgsm/modules/command_start.sh @@ -37,7 +37,7 @@ fn_start_teamspeak3() { # Used to allow update to detect JK2MV server version. fn_start_jk2() { fn_start_tmux - tmux send -t "${sessionname}" version ENTER > /dev/null 2>&1 + tmux -L "${sessionname}" end -t "${sessionname}" version ENTER > /dev/null 2>&1 } fn_start_tmux() { @@ -80,7 +80,7 @@ fn_start_tmux() { cd "${executabledir}" || exit fi - tmux new-session -d -x "${sessionwidth}" -y "${sessionheight}" -s "${sessionname}" "${preexecutable} ${executable} ${startparameters}" 2> "${lgsmlogdir}/.${selfname}-tmux-error.tmp" + tmux -L "${sessionname}" new-session -d -x "${sessionwidth}" -y "${sessionheight}" -s "${sessionname}" "${preexecutable} ${executable} ${startparameters}" 2> "${lgsmlogdir}/.${selfname}-tmux-error.tmp" # Create logfile. touch "${consolelog}" @@ -94,9 +94,9 @@ fn_start_tmux() { echo -e "tmux version: master (user compiled)" >> "${consolelog}" if [ "${consolelogging}" == "on" ] || [ -z "${consolelogging}" ]; then if [ "$logtimestamp" == "on" ]; then - tmux pipe-pane -o -t "${sessionname}" "exec bash -c \"cat | $addtimestamp\" >> '${consolelog}'" + tmux -L "${sessionname}" pipe-pane -o -t "${sessionname}" "exec bash -c \"cat | $addtimestamp\" >> '${consolelog}'" else - tmux pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'" + tmux -L "${sessionname}" pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'" fi fi @@ -115,9 +115,9 @@ fn_start_tmux() { # Console logging enable or not set. elif [ "${consolelogging}" == "on" ] || [ -z "${consolelogging}" ]; then if [ "$logtimestamp" == "on" ]; then - tmux pipe-pane -o -t "${sessionname}" "exec bash -c \"cat | $addtimestamp\" >> '${consolelog}'" + tmux -L "${sessionname}" pipe-pane -o -t "${sessionname}" "exec bash -c \"cat | $addtimestamp\" >> '${consolelog}'" else - tmux pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'" + tmux -L "${sessionname}" pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'" fi fi else @@ -143,7 +143,7 @@ fn_start_tmux() { echo -e "" echo -e "Command" echo -e "=================================" - echo -e "tmux new-session -d -s \"${sessionname}\" \"${preexecutable} ${executable} ${startparameters}\"" | tee -a "${lgsmlog}" + echo -e "tmux -L \"${sessionname}\" new-session -d -s \"${sessionname}\" \"${preexecutable} ${executable} ${startparameters}\"" | tee -a "${lgsmlog}" echo -e "" echo -e "Error" echo -e "=================================" diff --git a/lgsm/modules/command_stop.sh b/lgsm/modules/command_stop.sh index 564f5ed4c..a0cc18076 100644 --- a/lgsm/modules/command_stop.sh +++ b/lgsm/modules/command_stop.sh @@ -15,7 +15,7 @@ fn_stop_graceful_ctrlc() { fn_print_dots "Graceful: CTRL+c" fn_script_log_info "Graceful: CTRL+c" # Sends quit. - tmux send-keys -t "${sessionname}" C-c > /dev/null 2>&1 + tmux -L "${sessionname}" send-keys -t "${sessionname}" C-c > /dev/null 2>&1 # Waits up to 30 seconds giving the server time to shutdown gracefuly. for seconds in {1..30}; do check_status.sh @@ -43,7 +43,7 @@ fn_stop_graceful_cmd() { fn_print_dots "Graceful: sending \"${1}\"" fn_script_log_info "Graceful: sending \"${1}\"" # Sends specific stop command. - tmux send -t "${sessionname}" ENTER "${1}" ENTER > /dev/null 2>&1 + tmux -L "${sessionname}" send -t "${sessionname}" ENTER "${1}" ENTER > /dev/null 2>&1 # Waits up to ${seconds} seconds giving the server time to shutdown gracefully. for ((seconds = 1; seconds <= ${2}; seconds++)); do check_status.sh @@ -71,7 +71,7 @@ fn_stop_graceful_goldsrc() { fn_print_dots "Graceful: sending \"quit\"" fn_script_log_info "Graceful: sending \"quit\"" # sends quit - tmux send -t "${sessionname}" quit ENTER > /dev/null 2>&1 + tmux -L "${sessionname}" send -t "${sessionname}" quit ENTER > /dev/null 2>&1 # Waits 3 seconds as goldsrc servers restart with the quit command. for seconds in {1..3}; do sleep 1 @@ -184,10 +184,10 @@ fn_stop_graceful_avorion() { fn_print_dots "Graceful: /save /stop" fn_script_log_info "Graceful: /save /stop" # Sends /save. - tmux send-keys -t "${sessionname}" /save ENTER > /dev/null 2>&1 + tmux -L "${sessionname}" send-keys -t "${sessionname}" /save ENTER > /dev/null 2>&1 sleep 5 # Sends /quit. - tmux send-keys -t "${sessionname}" /stop ENTER > /dev/null 2>&1 + tmux -L "${sessionname}" send-keys -t "${sessionname}" /stop ENTER > /dev/null 2>&1 # Waits up to 30 seconds giving the server time to shutdown gracefuly. for seconds in {1..30}; do check_status.sh @@ -240,7 +240,7 @@ fn_stop_tmux() { fn_print_dots "${servername}" fn_script_log_info "tmux kill-session: ${sessionname}: ${servername}" # Kill tmux session. - tmux kill-session -t "${sessionname}" > /dev/null 2>&1 + tmux -L "${sessionname}" kill-session -t "${sessionname}" > /dev/null 2>&1 sleep 0.5 check_status.sh if [ "${status}" == "0" ]; then diff --git a/lgsm/modules/info_distro.sh b/lgsm/modules/info_distro.sh index 411a50458..8c29a4ca2 100644 --- a/lgsm/modules/info_distro.sh +++ b/lgsm/modules/info_distro.sh @@ -10,7 +10,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" ### Game Server pid if [ "${status}" == "1" ]; then - gameserverpid="$(tmux list-sessions -F "#{session_name} #{pane_pid}" | grep "^${sessionname} " | awk '{print $NF}')" + gameserverpid="$(tmux -L "${sessionname}" list-sessions -F "#{session_name} #{pane_pid}" | grep "^${sessionname} " | awk '{print $NF}')" if [ "${engine}" == "source" ]; then srcdslinuxpid="$(ps -ef | grep -v grep | grep "${gameserverpid}" | grep srcds_linux | awk '{print $2}')" elif [ "${engine}" == "goldsrc" ]; then From 1ea6ebb4ee1bb4c0441ea6fbd0056c9c288fa8e8 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 21 Jul 2023 00:32:54 +0100 Subject: [PATCH 217/374] refactor(av): update querymode in avserver config The querymode value in the avserver config file has been changed from 5 to 1. TCP query done on rcon port which may not be on --- lgsm/config-default/config-lgsm/avserver/_default.cfg | 2 +- lgsm/modules/info_game.sh | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lgsm/config-default/config-lgsm/avserver/_default.cfg b/lgsm/config-default/config-lgsm/avserver/_default.cfg index 991b13c02..532740d57 100644 --- a/lgsm/config-default/config-lgsm/avserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/avserver/_default.cfg @@ -137,7 +137,7 @@ stopmode="10" # 3: gamedig # 4: gsquery # 5: tcp -querymode="5" +querymode="1" querytype="" ## Console type diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index d5e671205..2bfdc10e7 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -323,9 +323,8 @@ fn_info_game_av() { rconenabled="${rconenabled:-"false"}" rconpassword="${rconpassword:-"NOT SET"}" rconport="${rconport:-"0"}" - # queryport is port + 3 - # this doesnt respond to any queries, using tcp query on rconport instead. - queryport="${rconport:-"0"}" + # queryport doesnt respond to any queries, using session only. + queryport=""$((port + 3))"" servername="${servername:-"NOT SET"}" serverpassword="${serverpassword:-"NOT SET"}" steamport="$((port + 21))" From 6815e3d3e1118a1a5a063512ac276369d950853f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 21 Jul 2023 00:54:39 +0100 Subject: [PATCH 218/374] Release v23.4.0 --- lgsm/modules/core_functions.sh | 2 +- lgsm/modules/core_modules.sh | 2 +- linuxgsm.sh | 2 +- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lgsm/modules/core_functions.sh b/lgsm/modules/core_functions.sh index e4b34b41d..3b42e1f8f 100644 --- a/lgsm/modules/core_functions.sh +++ b/lgsm/modules/core_functions.sh @@ -8,7 +8,7 @@ module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.3.6" +modulesversion="v23.4.0" # Core diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index c1baab40e..b191e793a 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.3.6" +modulesversion="v23.4.0" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index 0383a59d3..52d12faca 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.6" +version="v23.4.0" shortname="core" gameservername="core" commandname="CORE" diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index b06e8c646..463920672 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.6" +version="v23.4.0" shortname="fctr" gameservername="fctrserver" commandname="CORE" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 30051114c..72f3f1a22 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.6" +version="v23.4.0" shortname="jc2" gameservername="jc2server" commandname="CORE" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 587a8a9b1..ab94c5dc9 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.6" +version="v23.4.0" shortname="mc" gameservername="mcserver" commandname="CORE" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 45647cda7..4121bd462 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.3.6" +version="v23.4.0" shortname="ts3" gameservername="ts3server" commandname="CORE" From edcd2b7c8bd1369629bf3a062fad1e38ef97567a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 21 Jul 2023 01:00:41 +0100 Subject: [PATCH 219/374] feat: add serverfiles directory creation step This commit adds a new step to the workflow that creates a "serverfiles" directory. This directory will be used for storing server-related files. --- .github/workflows/details-check.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/details-check.yml b/.github/workflows/details-check.yml index 9d5aabc56..1ce9b373b 100644 --- a/.github/workflows/details-check.yml +++ b/.github/workflows/details-check.yml @@ -42,6 +42,9 @@ jobs: - name: Install dependencies run: sudo apt-get install libxml2-utils jq + - name: Create serverfiles directory + run: mkdir -p serverfiles + - name: Grab server run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./linuxgsm.sh ${{ matrix.shortname }}server From 6dd9709edba395d8373cab3327a9db793986d9a6 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 26 Jul 2023 21:21:35 +0100 Subject: [PATCH 220/374] fix: add new info about steamcmd failures This commit fixes an issue in the core_dl.sh script where disk write failures and missing update files were not being handled correctly. Now, when a disk write failure or missing update files occur during the download process, appropriate error messages are displayed and logged. --- lgsm/modules/core_dl.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lgsm/modules/core_dl.sh b/lgsm/modules/core_dl.sh index 405e9dc6b..f85499890 100644 --- a/lgsm/modules/core_dl.sh +++ b/lgsm/modules/core_dl.sh @@ -119,6 +119,14 @@ fn_dl_steamcmd() { elif [ -n "$(grep "0x402" "${steamcmdlog}" | tail -1)" ] || [ -n "$(grep "0x602" "${steamcmdlog}" | tail -1)" ]; then fn_print_error2_nl "${commandaction} ${selfname}: ${remotelocation}: Update required but not completed - check network" fn_script_log_error "${commandaction} ${selfname}: ${remotelocation}: Update required but not completed - check network" + # Disk write failure. + elif [ -n "$(grep "0x606" "${steamcmdlog}" | tail -1)" ] || [ -n "$(grep "0x602" "${steamcmdlog}" | tail -1)" ]; then + fn_print_error2_nl "${commandaction} ${selfname}: ${remotelocation}: Disk write failure" + fn_script_log_error "${commandaction} ${selfname}: ${remotelocation}: Disk write failure" + # Missing update files. + elif [ -n "$(grep "0x626" "${steamcmdlog}" | tail -1)" ] || [ -n "$(grep "0x626" "${steamcmdlog}" | tail -1)" ]; then + fn_print_error2_nl "${commandaction} ${selfname}: ${remotelocation}: Missing update files" + fn_script_log_error "${commandaction} ${selfname}: ${remotelocation}: Missing update files" else fn_print_error2_nl "${commandaction} ${selfname}: ${remotelocation}: Unknown error occured" echo -en "Please provide content log to LinuxGSM developers https://linuxgsm.com/steamcmd-error" From f68818d62b760affa9ce4c2515207b9c174305b1 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 26 Jul 2023 22:12:20 +0100 Subject: [PATCH 221/374] refactor: rename clear-modules command to cm;clear-modules The commit renames the clear-modules command to cm;clear-modules in the core_getopt.sh file. This change improves clarity and consistency in the codebase. --- lgsm/modules/core_getopt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/modules/core_getopt.sh b/lgsm/modules/core_getopt.sh index b191b3ebc..1003839ea 100644 --- a/lgsm/modules/core_getopt.sh +++ b/lgsm/modules/core_getopt.sh @@ -55,7 +55,7 @@ cmd_dev_detect_deps=("dd;detect-deps" "command_dev_detect_deps.sh" "Detect requi cmd_dev_detect_glibc=("dg;detect-glibc" "command_dev_detect_glibc.sh" "Detect required glibc.") cmd_dev_detect_ldd=("dl;detect-ldd" "command_dev_detect_ldd.sh" "Detect required dynamic dependencies.") cmd_dev_query_raw=("qr;query-raw" "command_dev_query_raw.sh" "The raw output of gamedig and gsquery.") -cmd_dev_clear_modules=("cf;clear-modules" "command_dev_clear_modules.sh" "Delete the contents of the modules dir.") +cmd_dev_clear_modules=("cm;clear-modules" "command_dev_clear_modules.sh" "Delete the contents of the modules dir.") ### Set specific opt here. From d83e9d9c57009f4c245fbd15985b637883fea21c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 27 Aug 2023 21:50:10 +0100 Subject: [PATCH 222/374] feat: Migrate stats to Google GA-4 (#4295) * refactor: simplify Google Analytics event tracking This commit simplifies the code for sending Google Analytics events by using a single POST request instead of multiple cURL commands. The new approach sends all necessary parameters in a JSON payload, reducing redundancy and improving efficiency. Additionally, unnecessary event tracking for summary statistics has been removed. Co-authored-by: AI Assistant * add plausable event api * refactor: remove unnecessary header in info_stats.sh The commit removes an unnecessary header in the info_stats.sh file. This change simplifies the code and improves readability. * feat: add country code of external IP address This commit adds functionality to retrieve the country code of the external IP address. If the country code is not already stored in a file, it uses curl to fetch it from https://ipapi.co/country and saves it in "${tmpdir}/countrycode.txt". If curl fails, an error message is displayed. * feat: add country code to Google Analytics tracking This commit adds the country code parameter to the Google Analytics tracking request in the `info_stats.sh` file. It also includes various server statistics such as CPU usage, memory usage, disk usage, distro name, game name, RAM usage, server CPU details, server disk details, server RAM details, and version information. * refactor: update country code parameter in info_stats.sh The commit updates the country code parameter in the info_stats.sh file. The previous parameter "country" has been changed to "countryId" for better clarity and consistency. * feat: add countryId and version to Google Analytics tracking This commit adds the "countryId" and "version" parameters to the Google Analytics tracking in the info_stats.sh script. Now, when the script sends data to Google Analytics, it includes information about the country and version of LinuxGSM being used. * refactor: remove unused countryId parameter in info_stats.sh The commit removes the unused "countryId" parameter from the info_stats.sh file in the lgsm/modules directory. This change improves code cleanliness and eliminates unnecessary code. * feat: add LinuxGSM stats tracking This commit adds functionality to track LinuxGSM server statistics using Google Analytics and a custom API. The code now sends POST requests to both services, providing information such as CPU usage, memory usage, disk space, server hardware details, and game-specific data. Additionally, the commit includes an alert feature that sends event data to Discord if enabled. Co-authored-by: [Author Name] * refactor: update event name in info_stats.sh The commit updates the event name in the info_stats.sh file from "linuxgsm" to "pageview". This change ensures that the correct event is being tracked when sending data to the stats.linuxgsm.com API. * feat: add virtual environment to info_distro, info_game, and info_stats modules - Added code to retrieve the virtual environment using systemd-detect-virt command. - Updated the condition for RHEL based distros in info_distro module. - Removed code related to country code retrieval from external IP address in info_game module. - Added virtual environment field to the payload sent to Google Analytics and LinuxGSM API in info_stats module. * feat: remove unnecessary header in info_stats.sh The commit removes an unnecessary header in the info_stats.sh file. The header was causing an issue with the API request. * feat: update server stats and enabled alerts - Updated the server stats to include virtual environment, LinuxGSM version, and enabled alerts. - Removed unnecessary code for sending alert statistics. * feat: add alert options to info_stats module This commit adds new alert options to the info_stats module. The added options include discordalert, emailalert, gotifyalert, iftttalert, mailgunalert, pushbulletalert, pushoveralert, rocketchatalert, slackalert, and telegramalert. These options allow users to configure different types of alerts for their game server statistics. * feat: add virtual environment tracking to info_stats module This commit adds the ability to track the virtual environment in the info_stats module. The "virtualenvironment" field is now included in the data sent to Google Analytics. * feat: add dynamic payload generation for Google Analytics This commit adds the ability to dynamically generate the payload for sending events to Google Analytics. The payload now includes properties such as `discordalert`, `emailalert`, `gotifyalert`, and more, based on their respective values. This allows for more flexibility in customizing the payload sent to Google Analytics. The code changes can be found in `info_stats.sh`. * refactor: simplify payload construction The code changes in this commit refactor the payload construction in the `info_stats.sh` file. The changes simplify the process by removing repetitive if statements and consolidating the payload parameters. This improves readability and maintainability of the code. * refactor: refactor alert options in info_stats.sh Refactored the code in info_stats.sh to improve readability and maintainability. Replaced individual alert options with a unified "alert" option, which now accepts values like "discord", "email", "gotify", etc. This change simplifies the code and makes it easier to add or modify alert options in the future. * feat: Send stats to Google Analytics GA4 This commit adds the functionality to send server statistics to Google Analytics GA4. The payload includes metrics such as CPU usage, disk usage, memory usage, and server information. The data is sent using a POST request to the Google Analytics API. The previous code that sent stats to the LinuxGSM stats endpoint has been removed. Note: This commit does not include any specific file changes. * refactor: simplify sending stats to Google Analytics The code changes refactor the logic for sending stats to Google Analytics. The previous implementation had multiple if statements for different alert types, resulting in repetitive code. The refactored code now uses a function to generate the alert payload and reduces duplication. This improves readability and maintainability of the code. Co-authored-by: John Doe --------- Co-authored-by: AI Assistant Co-authored-by: John Doe --- lgsm/modules/info_distro.sh | 7 +- lgsm/modules/info_stats.sh | 163 ++++++++++++++++++------------------ 2 files changed, 87 insertions(+), 83 deletions(-) diff --git a/lgsm/modules/info_distro.sh b/lgsm/modules/info_distro.sh index 8c29a4ca2..ee84d39f2 100644 --- a/lgsm/modules/info_distro.sh +++ b/lgsm/modules/info_distro.sh @@ -73,7 +73,12 @@ for distro_info in "${distro_info_array[@]}"; do fi done -# some RHEL based distros use 8.4 instead of just 8. +# Get virtual environment +if [ "$(command -v systemd-detect-virt 2> /dev/null)" ]; then + virtualenvironment="$(systemd-detect-virt)" +fi + +# Some RHEL based distros use 8.4 instead of just 8. if [[ "${distroidlike}" == *"rhel"* ]] || [ "${distroid}" == "rhel" ]; then distroversioncsv="${distroversionrh}" else diff --git a/lgsm/modules/info_stats.sh b/lgsm/modules/info_stats.sh index 2afe3338d..965e3898e 100644 --- a/lgsm/modules/info_stats.sh +++ b/lgsm/modules/info_stats.sh @@ -56,108 +56,104 @@ cpuusedmhzroundup="$(((cpuusedmhz + 99) / 100 * 100))" # nearest 100MB memusedroundup="$(((memused + 99) / 100 * 100))" -# Spliting the metrics in to 3 propertys allows more accurate metrics on numbers of invidual instances, installs and hardware. -# Instance Property - UA-165287622-1 -# Install Property - UA-165287622-2 -# Hardware Property - UA-165287622-3 +apisecret="A-OzP02TSMWt4_vHi6ZpUw" +measurementid="G-0CR8V7EMT5" + +# Sending stats to Google Analytics GA4 +payload="{ + \"client_id\": \"${uuidinstance}\", + \"events\": [ + { + \"name\": \"LinuxGSM\", + \"params\": { + \"cpuusedmhzroundup\": \"${cpuusedmhzroundup}MHz\", + \"diskused\": \"${serverfilesdu}\", + \"distro\": \"${distroname}\", + \"game\": \"${gamename}\", + \"memusedroundup\": \"${memusedroundup}MB\", + \"ramused\": \"${memusedroundup}MB\", + \"servercpu\": \"${cpumodel} ${cpucores} cores\", + \"servercpufreq\": \"${cpufreqency} x${cpucores}\", + \"serverdisk\": \"${totalspace}\", + \"serverfilesdu\": \"${serverfilesdu}\", + \"serverram\": \"${physmemtotal}\", + \"uuidhardware\": \"${uuidhardware}\", + \"uuidinstall\": \"${uuidinstall}\", + \"uuidinstance\": \"${uuidinstance}\", + \"version\": \"${version}\", + \"virtualenvironment\": \"${virtualenvironment}\" + } + } + ] +}" + +fn_alert_payload(){ +alertpayload="{ + \"client_id\": \"${uuidinstance}\", + \"events\": [ + { + \"name\": \"LinuxGSM\", + \"params\": { + \"alert\": \"${alerttype}\" + } + } + ] +}" +} + +curl -X POST "https://www.google-analytics.com/mp/collect?api_secret=A-OzP02TSMWt4_vHi6ZpUw&measurement_id=G-0CR8V7EMT5" -H "Content-Type: application/json" -d "${payload}" -## Distro. -curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=distro" -d "ea=${distroname}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=distro" -d "ea=${distroname}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=distro" -d "ea=${distroname}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - -## Game Server Name. -curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=game" -d "ea=${gamename}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=game" -d "ea=${gamename}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=game" -d "ea=${gamename}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - -## LinuxGSM Version. -curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=version" -d "ea=${version}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=version" -d "ea=${version}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=version" -d "ea=${version}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - -## CPU usage of a game server. -if [ -n "${cpuusedmhzroundup}" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=cpuused" -d "ea=${cpuusedmhzroundup}MHz" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=cpuused" -d "ea=${cpuusedmhzroundup}MHz" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=cpuused" -d "ea=${cpuusedmhzroundup}MHz" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -fi -## Ram usage of a game server. -if [ -n "${memusedroundup}" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=ramused" -d "ea=${memusedroundup}MB" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=ramused" -d "ea=${memusedroundup}MB" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=ramused" -d "ea=${memusedroundup}MB" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -fi -## Disk usage of a game server. -if [ -n "${serverfilesdu}" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=diskused" -d "ea=${serverfilesdu}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=diskused" -d "ea=${serverfilesdu}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=diskused" -d "ea=${serverfilesdu}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -fi - -## CPU Model. -if [ -n "${cpumodel}" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=servercpu" -d "ea=${cpumodel} ${cpucores} cores" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=servercpu" -d "ea=${cpumodel} ${cpucores} cores" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=servercpu" -d "ea=${cpumodel} ${cpucores} cores" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - -fi - -## CPU Frequency. -if [ -n "${cpufreqency}" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=servercpufreq" -d "ea=${cpufreqency} x${cpucores}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=servercpufreq" -d "ea=${cpufreqency} x${cpucores}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=servercpufreq" -d "ea=${cpufreqency} x${cpucores}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -fi - -## Server RAM. -if [ -n "${physmemtotal}" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=serverram" -d "ea=${physmemtotal}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=serverram" -d "ea=${physmemtotal}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=serverram" -d "ea=${physmemtotal}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -fi - -## Server Disk. -if [ -n "${totalspace}" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=serverdisk" -d "ea=${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=serverdisk" -d "ea=${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=serverdisk" -d "ea=${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -fi - -## Alert Stats. if [ "${discordalert}" == "on" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=Discord" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + alerttype="discord" + fn_alert_payload + curl -X POST "https://www.google-analytics.com/mp/collect?api_secret=${apisecret}&measurement_id=${measurementid}" -H "Content-Type: application/json" -d "${alertpayload}" fi if [ "${emailalert}" == "on" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=Email" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + alerttype="email" + fn_alert_payload + curl -X POST "https://www.google-analytics.com/mp/collect?api_secret=${apisecret}&measurement_id=${measurementid}" -H "Content-Type: application/json" -d "${alertpayload}" +fi +if [ "${gotifyalert}" == "on" ]; then + alerttype="gotify" + fn_alert_payload + curl -X POST "https://www.google-analytics.com/mp/collect?api_secret=${apisecret}&measurement_id=${measurementid}" -H "Content-Type: application/json" -d "${alertpayload}" fi if [ "${iftttalert}" == "on" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=IFTTT" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + alerttype="ifttt" + fn_alert_payload + curl -X POST "https://www.google-analytics.com/mp/collect?api_secret=${apisecret}&measurement_id=${measurementid}" -H "Content-Type: application/json" -d "${alertpayload}" fi if [ "${mailgunalert}" == "on" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=Mailgun" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + alerttype="mailgun" + fn_alert_payload + curl -X POST "https://www.google-analytics.com/mp/collect?api_secret=${apisecret}&measurement_id=${measurementid}" -H "Content-Type: application/json" -d "${alertpayload}" fi if [ "${pushbulletalert}" == "on" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=Pushbullet" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + alerttype="pushbullet" + fn_alert_payload + curl -X POST "https://www.google-analytics.com/mp/collect?api_secret=${apisecret}&measurement_id=${measurementid}" -H "Content-Type: application/json" -d "${alertpayload}" fi if [ "${pushoveralert}" == "on" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=Pushover" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + alerttype="pushover" + fn_alert_payload + curl -X POST "https://www.google-analytics.com/mp/collect?api_secret=${apisecret}&measurement_id=${measurementid}" -H "Content-Type: application/json" -d "${alertpayload}" fi if [ "${rocketchatalert}" == "on" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=Rocket Chat" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + alerttype="rocketchat" + fn_alert_payload + curl -X POST "https://www.google-analytics.com/mp/collect?api_secret=${apisecret}&measurement_id=${measurementid}" -H "Content-Type: application/json" -d "${alertpayload}" fi if [ "${slackalert}" == "on" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=Slack" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + alerttype="slack" + fn_alert_payload + curl -X POST "https://www.google-analytics.com/mp/collect?api_secret=${apisecret}&measurement_id=${measurementid}" -H "Content-Type: application/json" -d "${alertpayload}" fi if [ "${telegramalert}" == "on" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=Telegram" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + alerttype="telegram" + fn_alert_payload + curl -X POST "https://www.google-analytics.com/mp/collect?api_secret=${apisecret}&measurement_id=${measurementid}" -H "Content-Type: application/json" -d "${alertpayload}" fi -## Summary Stats -curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=summary" -d "ea=GAME: ${gamename} | DISTRO: ${distroname} | CPU MODEL: ${cpumodel} ${cpucores} cores | RAM: ${physmemtotal} | DISK: ${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=summary" -d "ea=GAME: ${gamename} | DISTRO: ${distroname} | CPU MODEL: ${cpumodel} ${cpucores} cores | RAM: ${physmemtotal} | DISK: ${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=summary" -d "ea=GAME: ${gamename} | DISTRO: ${distroname} | CPU MODEL: ${cpumodel} ${cpucores} cores | RAM: ${physmemtotal} | DISK: ${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - fn_script_log_info "Send LinuxGSM stats" fn_script_log_info "* uuid-${selfname}: ${uuidinstance}" fn_script_log_info "* uuid-install: ${uuidinstall}" @@ -171,3 +167,6 @@ fn_script_log_info "* Server CPU Model: ${cpumodel}" fn_script_log_info "* Server CPU Frequency: ${cpufreqency}" fn_script_log_info "* Server RAM: ${physmemtotal}" fn_script_log_info "* Server Disk: ${totalspace}" +fn_script_log_info "* Virtual Environment: ${virtualenvironment}" +fn_script_log_info "* LinuxGSM Version: ${version}" +fn_script_log_info "* Enabled Alerts" From 290eb6be3a452b66f9b048fcaeab76d96cb21ad0 Mon Sep 17 00:00:00 2001 From: maximalmax90 <75565218+maximalmax90@users.noreply.github.com> Date: Mon, 28 Aug 2023 05:03:44 +0800 Subject: [PATCH 223/374] Update update_vintagestory.sh (#4286) * build(deps): bump github/issue-labeler from 3.1 to 3.2 (#4258) Bumps [github/issue-labeler](https://github.com/github/issue-labeler) from 3.1 to 3.2. - [Release notes](https://github.com/github/issue-labeler/releases) - [Commits](https://github.com/github/issue-labeler/compare/v3.1...v3.2) --- updated-dependencies: - dependency-name: github/issue-labeler dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update update_vintagestory.sh * Update _default.cfg --------- Signed-off-by: dependabot[bot] Co-authored-by: Daniel Gibbs Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/labeler.yml | 2 +- lgsm/config-default/config-lgsm/vintsserver/_default.cfg | 6 +++--- lgsm/modules/update_vintagestory.sh | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index f04630831..44beca03d 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Issue Labeler - uses: github/issue-labeler@v3.1 + uses: github/issue-labeler@v3.2 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" configuration-path: .github/labeler.yml diff --git a/lgsm/config-default/config-lgsm/vintsserver/_default.cfg b/lgsm/config-default/config-lgsm/vintsserver/_default.cfg index b6bd76831..2db6dbc06 100644 --- a/lgsm/config-default/config-lgsm/vintsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vintsserver/_default.cfg @@ -9,7 +9,7 @@ #### Game Server Settings #### ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="--datapath ${servercfgdir}" +startparameters="--dataPath ${servercfgdir}" ## Release Settings | https://docs.linuxgsm.com/game-servers/vintagestory#release-settings # Branch (stable|unstable) @@ -150,8 +150,8 @@ glibc="2.17" ## Game Server Directories systemdir="${serverfiles}" executabledir="${systemdir}" -preexecutable="mono" -executable="./VintagestoryServer.exe" +preexecutable="" +executable="./VintagestoryServer" servercfgdir="${serverfiles}/data/${selfname}" servercfg="serverconfig.json" servercfgdefault="serverconfig.json" diff --git a/lgsm/modules/update_vintagestory.sh b/lgsm/modules/update_vintagestory.sh index 8fbc49044..d186d19aa 100644 --- a/lgsm/modules/update_vintagestory.sh +++ b/lgsm/modules/update_vintagestory.sh @@ -42,9 +42,9 @@ fn_update_remotebuild() { else remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '[ to_entries[] ] | .[].key' | grep -E "\-rc|\-pre" | sort -r -V | head -1) fi - remotebuildfilename=$(echo "${remotebuildresponse}" | jq --arg remotebuildversion "${remotebuildversion}" -r '.[$remotebuildversion].server.filename') - remotebuildurl=$(echo "${remotebuildresponse}" | jq --arg remotebuildversion "${remotebuildversion}" -r '.[$remotebuildversion].server.urls.cdn') - remotebuildhash=$(echo "${remotebuildresponse}" | jq --arg remotebuildversion "${remotebuildversion}" -r '.[$remotebuildversion].server.md5') + remotebuildfilename=$(echo "${remotebuildresponse}" | jq --arg remotebuildversion "${remotebuildversion}" -r '.[$remotebuildversion].linuxserver.filename') + remotebuildurl=$(echo "${remotebuildresponse}" | jq --arg remotebuildversion "${remotebuildversion}" -r '.[$remotebuildversion].linuxserver.urls.cdn') + remotebuildhash=$(echo "${remotebuildresponse}" | jq --arg remotebuildversion "${remotebuildversion}" -r '.[$remotebuildversion].linuxserver.md5') if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" From 4ddd8ee184301595dbcfe6e61c88706b6be12913 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 28 Aug 2023 01:49:47 +0100 Subject: [PATCH 224/374] feat: tmux uniqueness (#4296) * refactor: refactor tmux session handling - Updated the code to use the variable `socketname` instead of `sessionname` when interacting with tmux sessions. - Added logic to create a unique socket name using a UID if it doesn't already exist. - Refactored multiple functions (`fn_start_jk2`, `fn_start_tmux`, `fn_stop_graceful_ctrlc`, `fn_stop_graceful_cmd`, `fn_stop_graceful_goldsrc`, `fn_stop_graceful_avorion`, and `fn_stop_tmux`) to use the new socket name for tmux commands. This commit improves the readability and maintainability of the code by separating the concept of session names from socket names, allowing for more flexibility in managing tmux sessions. * feat: stop server when generating uid this should prevent issues when migrating to using uid * refactor: lockfile handling - Removed unnecessary function fn_start_jk2() - Removed unused variable startparameters in fn_start_tmux() - Added comments to clarify code functionality - Renamed lockfile from "${lockdir}/${selfname}.lock" to "${lockdir}/${selfname}-start.lock" - Updated log messages and log file names to include timestamp * refactor: improve backup and update monitoring The code in `command_monitor.sh` has been refactored to enhance the monitoring of backups and updates. The conditions for checking if a backup or update is running have been modified to include additional checks using `pgrep`. This change improves the accuracy of the monitoring process. * refactor: improve logging in core_exit.sh - Changed the grep command to include the -a flag to handle non-text files - Updated sed command to remove "modulefile=" from the output and redirect it to dev-debug-module-order.log * refactor: improve code readability and remove redundant code - Refactored the `fn_monitor_check_starting` function to check for stale lockfiles and print appropriate messages. - Refactored the `fn_monitor_check_stopping` function to check for stale lockfiles and print appropriate messages. - Removed redundant code that deletes the update lockfile in `command_update.sh` and `command_validate.sh`. - Improved code readability by removing unnecessary comments. * feat: add exitbypass flag to prevent lingering tmux sessions The code changes in `command_start.sh` include adding an `exitbypass` flag to prevent lingering tmux sessions. This flag is used to stop the running server before creating a unique uid for the tmux socket name. * refactor: Refactor lockfile names for consistency and clarity - Renamed "${lockdir}/${selfname}-laststart.lock" to "${lockdir}/${selfname}-last-started.lock" - Renamed "${lockdir}/backup.lock" to "${lockdir}/stopping.lock" - Renamed "${lockdir}/${selfname}-start.lock" to "${lockdir}/${selfname}-started.lock" - Renamed "${lockdir}/${selfname}-starting.lock" to "${lockdir}/${selfname}-stopping.lock" This commit refactors the lockfile names in the codebase for better consistency and clarity. The changes make it easier to understand the purpose of each lockfile and improve readability. * refactor: refactor check_last_update.sh, command_backup.sh, command_debug.sh, command_mods_remove.sh, command_monitor.sh, command_start.sh, command_stop.sh, command_ts3_server_pass.sh and core_steamcmd.sh - Refactored code to improve readability and maintainability. - Renamed variables for clarity. - Removed unnecessary comments and unused code. - Fixed typos and formatting issues. * refactor: update lock file path in core_steamcmd.sh The lock file path in the core_steamcmd.sh script has been updated to use the correct variable. This change ensures that the lock file is created in the correct directory. * refactor: improve file deletion in command_stop.sh The code change refactors the file deletion process in the command_stop.sh script. Instead of using an empty redirect, it now directly removes the specified lock file. This improves clarity and ensures proper cleanup when stopping a command. * refactor: update lockfile name in command_monitor.sh The lockfile name has been changed from "${selfname}-started.lock" to "${selfname}-monitoring.lock" in the fn_monitor_check_lockfile function. The code has also been refactored to remove unnecessary checks and fixes for the lockfile. * refactor: simplify start and stop command checks The code in `command_start.sh` and `command_stop.sh` has been refactored to simplify the checks for the start and stop commands. Instead of checking if `exitbypass` is empty, it now directly checks if `firstcommandname` matches specific values ("START", "RESTART" for start command, and "STOP" for stop command). This change improves readability and reduces unnecessary conditions. * refactor: simplify lockfile names and remove duplicate code - Renamed lockfiles from "${selfname}-started.lock" to "started.lock", "${selfname}-starting.lock" to "starting.lock", "${selfname}-stopping.lock" to "stopping.lock", and "${selfname}-update.lock" to "update.lock". - Removed duplicate code for removing stale lockfiles in fn_monitor_check_starting(), fn_monitor_check_stopping(), fn_monitor_check_backup(), fn_monitor_check_update(), update_factorio.sh, update_jediknight2.sh, update_minecraft.sh, update_minecraft_bedrock.sh, update_mta.sh, update_papermc.sh, update_ts3.sh, update_ut99.sh, and update_vintagestory.sh. - Updated references to the renamed lockfiles in the respective functions. * fix: corrected commandname * fix: commandname skeleton * refactor: improve file path handling in check_last_update.sh The code changes refactor the file path handling in check_last_update.sh to use the correct lock directory. This ensures that the last update time is correctly retrieved and compared with the last start time. * feat: add update lock file Add functionality to create an update lock file when validating and updating SteamCMD. This prevents potential conflicts with customised files. - Create a lock file with the current timestamp in the "command_validate.sh" script - Create a lock file with the current timestamp in the "update_steamcmd.sh" script * refactor: rename libgcc_s.so.1 backup file The code has been refactored to improve clarity and readability. The variable `libgccc_so` has been renamed to `libgccc_so.bak` for better understanding of its purpose. This change ensures that the backup file for libgcc_s.so.1 is correctly named and easily identifiable. * refactor: improve logging and error handling in command_monitor.sh - Added error handling for PIDs with identical tmux sessions running, killing them and restarting the server. - Added error handling for PIDs with the same tmux session and socket names running, killing them and restarting the server. --- lgsm/modules/check_last_update.sh | 14 +- lgsm/modules/check_status.sh | 2 +- lgsm/modules/command_backup.sh | 28 +++- lgsm/modules/command_console.sh | 2 +- lgsm/modules/command_debug.sh | 12 +- lgsm/modules/command_mods_remove.sh | 2 +- lgsm/modules/command_monitor.sh | 195 +++++++++++++++++------ lgsm/modules/command_restart.sh | 2 +- lgsm/modules/command_send.sh | 2 +- lgsm/modules/command_skeleton.sh | 3 + lgsm/modules/command_start.sh | 99 ++++++------ lgsm/modules/command_stop.sh | 30 ++-- lgsm/modules/command_ts3_server_pass.sh | 4 +- lgsm/modules/command_update.sh | 3 + lgsm/modules/command_validate.sh | 5 +- lgsm/modules/core_exit.sh | 2 +- lgsm/modules/core_steamcmd.sh | 5 +- lgsm/modules/fix_csgo.sh | 2 +- lgsm/modules/fix_ts3.sh | 13 ++ lgsm/modules/info_distro.sh | 2 +- lgsm/modules/update_factorio.sh | 5 +- lgsm/modules/update_jediknight2.sh | 5 +- lgsm/modules/update_minecraft.sh | 5 +- lgsm/modules/update_minecraft_bedrock.sh | 5 +- lgsm/modules/update_mta.sh | 5 +- lgsm/modules/update_papermc.sh | 5 +- lgsm/modules/update_steamcmd.sh | 5 +- lgsm/modules/update_ts3.sh | 5 +- lgsm/modules/update_ut99.sh | 5 +- lgsm/modules/update_vintagestory.sh | 5 +- linuxgsm.sh | 3 +- 31 files changed, 328 insertions(+), 152 deletions(-) diff --git a/lgsm/modules/check_last_update.sh b/lgsm/modules/check_last_update.sh index d4f2d8f89..02d17c975 100644 --- a/lgsm/modules/check_last_update.sh +++ b/lgsm/modules/check_last_update.sh @@ -3,21 +3,21 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Checks lock file to see when last update happened. +# Description: Checks Lockfile to see when last update happened. # Will reboot server if instance not rebooted since update. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -if [ -f "${lockdir}/${selfname}-laststart.lock" ]; then - laststart=$(cat "${lockdir}/${selfname}-laststart.lock") +if [ -f "${lockdir}/${selfname}-last-started.lock" ]; then + laststart=$(cat "${lockdir}/${selfname}-last-started.lock") fi -if [ -f "${lockdir}/lastupdate.lock" ]; then - lastupdate=$(cat "${lockdir}/lastupdate.lock") +if [ -f "${lockdir}/last-updated.lock" ]; then + lastupdate=$(cat "${lockdir}/last-updated.lock") fi check_status.sh -if [ -f "${lockdir}/lastupdate.lock" ] && [ "${status}" != "0" ]; then - if [ ! -f "${lockdir}/${selfname}-laststart.lock" ] || [ "${laststart}" -lt "${lastupdate}" ]; then +if [ -f "${lockdir}/last-updated.lock" ] && [ "${status}" != "0" ]; then + if [ ! -f "${lockdir}/${selfname}-last-started.lock" ] || [ "${laststart}" -lt "${lastupdate}" ]; then fn_print_info "${selfname} has not been restarted since last update" fn_script_log_info "${selfname} has not been restarted since last update" command_restart.sh diff --git a/lgsm/modules/check_status.sh b/lgsm/modules/check_status.sh index 6edd4151b..906675e81 100644 --- a/lgsm/modules/check_status.sh +++ b/lgsm/modules/check_status.sh @@ -7,4 +7,4 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -status=$(tmux -L "${sessionname}" list-sessions -F "#{session_name}" 2> /dev/null | grep -Ecx "^${sessionname}") +status=$(tmux -L "${socketname}" list-sessions -F "#{session_name}" 2> /dev/null | grep -Ecx "^${sessionname}") diff --git a/lgsm/modules/command_backup.sh b/lgsm/modules/command_backup.sh index 1973eb95f..b63c82625 100644 --- a/lgsm/modules/command_backup.sh +++ b/lgsm/modules/command_backup.sh @@ -22,7 +22,7 @@ fn_backup_trap() { echo -en "backup ${backupname}.tar.gz..." fn_print_removed_eol_nl fn_script_log_info "Backup ${backupname}.tar.gz: REMOVED" - # Remove lock file. + # Remove backup lockfile. rm -f "${lockdir:?}/backup.lock" fn_backup_start_server unset exitbypass @@ -31,9 +31,21 @@ fn_backup_trap() { # Check if a backup is pending or has been aborted using backup.lock. fn_backup_check_lockfile() { + # Remove stale lockfile. if [ -f "${lockdir}/backup.lock" ]; then - fn_print_info_nl "Lock file found: Backup is currently running" - fn_script_log_error "Lock file found: Backup is currently running: ${lockdir}/backup.lock" + if [ "$(find "${lockdir}/backup.lock" -mmin +60)" ]; then + fn_print_dots "Lockfile found: " + fn_print_checking_eol + fn_print_warn "Lockfile found: Removing stale lockfile: " + fn_print_warn_eol + fn_script_log_warn "Lockfile found: Removing stale lockfile" + rm -f "${lockdir:?}/backup.lock" + fi + fi + + if [ -f "${lockdir}/backup.lock" ]; then + fn_print_info_nl "Lockfile found: Backup is currently running" + fn_script_log_error "Lockfile found: Backup is currently running: ${lockdir}/backup.lock" core_exit.sh fi } @@ -117,8 +129,8 @@ fn_backup_migrate_olddir() { fn_backup_create_lockfile() { # Create lockfile. - date '+%s' > "${lockdir}/backup.lock" - fn_script_log_info "Lockfile generated" + date '+%s' > "${lockdir:?}/backup.lock" + fn_script_log_info "Backup lockfile generated" fn_script_log_info "${lockdir}/backup.lock" # trap to remove lockfile on quit. trap fn_backup_trap INT @@ -140,7 +152,7 @@ fn_backup_compression() { core_exit.sh fi - tar -czf "${backupdir}/${backupname}.tar.gz" -C "${rootdir}" --exclude "${excludedir}" --exclude "${lockdir}/backup.lock" ./. + tar -czf "${backupdir}/${backupname}.tar.gz" -C "${rootdir}" --exclude "${excludedir}" --exclude "${lockdir}" ./. local exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol @@ -153,8 +165,6 @@ fn_backup_compression() { fn_print_ok_nl "Completed: ${backupname}.tar.gz, 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}')" fi - # Remove lock file - rm -f "${lockdir:?}/backup.lock" } # Clear old backups according to maxbackups and maxbackupdays variables. @@ -265,4 +275,6 @@ fn_backup_compression fn_backup_prune fn_backup_start_server +# Remove backup lockfile. +rm -f "${lockdir:?}/backup.lock" core_exit.sh diff --git a/lgsm/modules/command_console.sh b/lgsm/modules/command_console.sh index 95945dbe3..a5d49d7f2 100644 --- a/lgsm/modules/command_console.sh +++ b/lgsm/modules/command_console.sh @@ -42,7 +42,7 @@ check_status.sh if [ "${status}" != "0" ]; then fn_print_ok_nl "Accessing console" fn_script_log_pass "Console accessed" - tmux -L "${sessionname}" attach-session -t "${sessionname}" + tmux -L "${socketname}" attach-session -t "${sessionname}" fn_print_ok_nl "Closing console" fn_script_log_pass "Console closed" else diff --git a/lgsm/modules/command_debug.sh b/lgsm/modules/command_debug.sh index 52efd04db..c544e3e2a 100644 --- a/lgsm/modules/command_debug.sh +++ b/lgsm/modules/command_debug.sh @@ -13,7 +13,7 @@ fn_firstcommand_set # Trap to remove lockfile on quit. fn_lockfile_trap() { # Remove lockfile. - rm -f "${lockdir:?}/${selfname}.lock" + rm -f "${lockdir:?}/${selfname}-started.lock" # resets terminal. Servers can sometimes mess up the terminal on exit. reset fn_print_dots "Stopping debug" @@ -98,12 +98,12 @@ fn_print_dots "Starting debug" fn_script_log_info "Starting debug" fn_print_ok_nl "Starting debug" -# Create lockfile. -date '+%s' > "${lockdir}/${selfname}.lock" -echo "${version}" >> "${lockdir}/${selfname}.lock" -echo "${port}" >> "${lockdir}/${selfname}.lock" +# Create started lockfile. +date '+%s' > "${lockdir:?}/${selfname}-started.lock" +echo "${version}" >> "${lockdir}/${selfname}-started.lock" +echo "${port}" >> "${lockdir}/${selfname}-started.lock" fn_script_log_info "Lockfile generated" -fn_script_log_info "${lockdir}/${selfname}.lock" +fn_script_log_info "${lockdir}/${selfname}-started.lock" if [ "${shortname}" == "av" ]; then cd "${systemdir}" || exit diff --git a/lgsm/modules/command_mods_remove.sh b/lgsm/modules/command_mods_remove.sh index 08095c8e8..8f9ea3739 100644 --- a/lgsm/modules/command_mods_remove.sh +++ b/lgsm/modules/command_mods_remove.sh @@ -131,7 +131,7 @@ fi if [ "${engine}" == "unity3d" ] && [[ "${modprettyname}" == *"Oxide"* ]]; then fn_print_information_nl "Validating to restore original ${gamename} files replaced by Oxide" fn_script_log "Validating to restore original ${gamename} files replaced by Oxide" - exitbypass="1" + exitbypass=1 command_validate.sh fn_firstcommand_reset unset exitbypass diff --git a/lgsm/modules/command_monitor.sh b/lgsm/modules/command_monitor.sh index 5edd7298e..c64df9fda 100644 --- a/lgsm/modules/command_monitor.sh +++ b/lgsm/modules/command_monitor.sh @@ -11,87 +11,181 @@ commandaction="Monitoring" moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set -fn_monitor_check_lockfile() { +fn_monitor_check_monitoring() { # Monitor does not run if lockfile is not found. - if [ ! -f "${lockdir}/${selfname}.lock" ]; then + if [ ! -f "${lockdir}/${selfname}-monitoring.lock" ]; then fn_print_dots "Checking lockfile: " fn_print_checking_eol fn_script_log_info "Checking lockfile: CHECKING" - fn_monitor_check_update - fn_monitor_check_backup - fn_monitor_check_debug fn_print_error "Checking lockfile: No lockfile found: " fn_print_error_eol_nl fn_script_log_error "Checking lockfile: No lockfile found: ERROR" echo -e "* Start ${selfname} to run monitor." core_exit.sh fi +} - # Fix if lockfile is not unix time or contains letters - if [ -f "${lockdir}/${selfname}.lock" ] && [[ "$(head -n 1 "${lockdir}/${selfname}.lock")" =~ [A-Za-z] ]]; then - date '+%s' > "${lockdir}/${selfname}.lock" - echo "${version}" >> "${lockdir}/${selfname}.lock" - echo "${port}" >> "${lockdir}/${selfname}.lock" +fn_monitor_check_install() { + if [ "$(pgrep -fc -u "${USER}" "${selfname} install")" != "0" ] || [ "$(pgrep -fc -u "${USER}" "${selfname} i")" != "0" ] || [ "$(pgrep -fc -u "${USER}" "${selfname} auto-install")" != "0" ] || [ "$(pgrep -fc -u "${USER}" "${selfname} ai")" != "0" ]; then + fn_print_dots "Checking installer: " + fn_print_checking_eol + fn_script_log_info "Checking installer: CHECKING" + fn_print_info "Checking installer: Installer is : " + fn_print_info_eol + fn_script_log_pass "Checking installer: LinuxGSM is installing" + core_exit.sh fi } -fn_monitor_check_backup() { - # Monitor will check if backup is running. - if [ "$(pgrep "${selfname} backup" | wc -l)" != "0" ] || [ "$(pgrep "${selfname} b" | wc -l)" != "0" ]; then - fn_print_info "Checking lockfile: LinuxGSM is currently running a backup: " +fn_monitor_check_debug() { + if [ "$(pgrep -fc -u "${USER}" "${selfname} debug")" != "0" ] || [ "$(pgrep -fc -u "${USER}" "${selfname} d")" != "0" ]; then + fn_print_dots "Checking debug: " + fn_print_checking_eol + fn_print_info "Checking debug: Debug is running: " fn_print_info_eol - fn_script_log_info "Checking lockfile: LinuxGSM is currently running a backup" + fn_script_log_pass "Checking debug: Debug is running" core_exit.sh fi } -fn_monitor_check_debug() { - # Monitor will check if backup is running. - if [ "$(pgrep -fc "${selfname} backup")" != "0" ] || [ "$(pgrep -fc "${selfname} b")" != "0" ]; then - fn_print_info "Checking lockfile: LinuxGSM is currently in debug mode: " +fn_monitor_check_starting(){ + # Remove stale lockfile. + if [ -f "${lockdir}/${selfname}-starting.lock" ]; then + if [ "$(find "${lockdir}/${selfname}-starting.lock" -mmin +5)" ]; then + fn_print_dots "Checking start: " + fn_print_checking_eol + fn_print_warn "Checking start: Removing stale lockfile: " + fn_print_warn_eol + fn_script_log_warn "Checking start: Removing stale lockfile" + rm -f "${lockdir:?}/${selfname}-starting.lock" + fi + fi + + if [ -f "${lockdir}/${selfname}-starting.lock" ] && [[ "$(pgrep -fc -u "${USER}" "${selfname} start")" != "0" || "$(pgrep -fc -u "${USER}" "${selfname} s")" != "0" ]]; then + fn_print_dots "Checking start: " + fn_print_checking_eol + fn_print_info "Checking start: LinuxGSM is starting: " fn_print_info_eol - fn_script_log_pass "Checking lockfile: LinuxGSM is currently in debug mode" + fn_script_log_info "Checking backup: LinuxGSM is starting" core_exit.sh fi } -fn_monitor_check_install() { - # Monitor will check if update is running. - if [ "$(pgrep -fc "${selfname} install")" != "0" ] || [ "$(pgrep -fc "${selfname} i")" != "0" ] || [ "$(pgrep -fc "${selfname} auto-install")" != "0" ] || [ "$(pgrep -fc "${selfname} ai")" != "0" ]; then - fn_print_dots "Checking for installer: " +fn_monitor_check_stopping(){ + # Remove stale lockfile. + if [ -f "${lockdir}/${selfname}-stopping.lock" ]; then + if [ "$(find "${lockdir}/${selfname}-stopping.lock" -mmin +5)" ]; then + fn_print_dots "Checking stop: " + fn_print_checking_eol + fn_print_warn "Checking stop: Removing stale lockfile: " + fn_print_warn_eol + fn_script_log_warn "Checking stop: Removing stale lockfile" + rm -f "${lockdir:?}/${selfname}-stopping.lock" + fi + fi + + if [ -f "${lockdir}/${selfname}-stopping.lock" ] && [[ "$(pgrep -fc -u "${USER}" "${selfname} stop")" != "0" || "$(pgrep -fc -u "${USER}" "${selfname} s")" != "0" ]]; then + fn_print_dots "Checking stop: " fn_print_checking_eol - fn_script_log_info "Checking for installer: CHECKING" - fn_print_info "Checking for installer: LinuxGSM is currently installing: " + fn_print_info "Checking stop: LinuxGSM is stopping: " fn_print_info_eol - fn_script_log_pass "Checking for installer: LinuxGSM is currently installing" + fn_script_log_info "Checking backup: LinuxGSM is stopping" core_exit.sh fi } -fn_monitor_check_update() { - # Specific check for docker. Will ignore the command watch -n 1800 ./csgoserver update - monitorps=0 - if [ "$(pgrep -fc "n*${selfname} update")" != "0" ]; then - monitorps="$((monitorps - 1))" +fn_monitor_check_backup() { + # Remove stale lockfile. + if [ -f "${lockdir}/backup.lock" ]; then + if [ "$(find "${lockdir}/backup.lock" -mmin +60)" ]; then + fn_print_dots "Checking backup: " + fn_print_checking_eol + fn_print_warn "Checking backup: Removing stale lockfile: " + fn_print_warn_eol + fn_script_log_warn "Checking backup: Removing stale lockfile" + rm -f "${lockdir:?}/backup.lock" + fi + fi + + if [ -f "${lockdir}/backup.lock" ] && [[ "$(pgrep -fc -u "${USER}" "${selfname} backup")" != "0" || "$(pgrep -fc -u "${USER}" "${selfname} b")" != "0" ]]; then + fn_print_dots "Checking backup: " + fn_print_checking_eol + fn_print_info "Checking backup: Backup is running: " + fn_print_info_eol + fn_script_log_info "Checking backup: Backup is running" + core_exit.sh fi - # Monitor will check if an update is running. - if [ "$(pgrep -fc "${selfname} update")" != "0" ] || [ "$(pgrep -fc "${selfname} u")" != "0" ] || [ "$(pgrep -fc "${selfname} validate")" != "0" ] || [ "$(pgrep -fc "${selfname} v")" != "0" ]; then - monitorps="$((monitorps + 2))" - if [ "${monitorps}" != "0" ]; then - fn_print_info_nl "Checking lockfile: LinuxGSM is currently updating: " - fn_print_info_eol - fn_script_log_pass "Checking lockfile: LinuxGSM is currently updating" - core_exit.sh +} + +fn_monitor_check_update() { + # Remove stale lockfile. + if [ -f "${lockdir}/update.lock" ]; then + if [ "$(find "${lockdir}/update.lock" -mmin +15)" ]; then + fn_print_dots "Checking update: " + fn_print_checking_eol + fn_print_warn "Checking update: Removing stale lockfile: " + fn_print_warn_eol + fn_script_log_warn "Checking update: Removing stale lockfile" + rm -f "${lockdir:?}/update.lock" fi fi + + if [ -f "${lockdir}/update.lock" ] && [[ "$(pgrep -fc -u "${USER}" "${selfname} update")" != "0" || "$(pgrep -fc -u "${USER}" "${selfname} validate")" != "0" || "$(pgrep -fc -u "${USER}" "${selfname} v")" != "0" || "$(pgrep -fc force-update "${USER}" "${selfname} fu")" != "0" ]]; then + fn_print_dots "Checking update: " + fn_print_checking_eol + fn_print_info "Checking update: LinuxGSM is updating the game server: " + fn_print_info_eol + fn_script_log_pass "Checking update: LinuxGSM is updating the game server" + core_exit.sh + fi +} + +# Source engine games may display a messages to indicate the server needs restarting. +fn_monitor_check_update_source(){ + if [ -f "${consolelogdir}/${selfname}-console.log" ] && [ "${engine}" == "source" ]; then + if grep -q "Your server needs to be restarted in order to receive the latest update." "${consolelogdir}/${selfname}-console.log"; then + fn_print_dots "Checking update: " + fn_print_checking_eol + fn_script_log_info "Checking update: CHECKING" + fn_print_ok "Checking update: " + fn_print_ok_eol_nl + fn_script_log_info "Checking update: Monitor is restarting ${selfname} to apply update" + alert="restart" + alert.sh + command_restart.sh + core_exit.sh + fi + fi } fn_monitor_check_session() { fn_print_dots "Checking session: " fn_print_checking_eol fn_script_log_info "Checking session: CHECKING" - # uses status var from check_status.sh - if [ "${status}" != "0" ]; then + # Tmux session width and height needs to be reviewed as may no longer be required. + sessionwidth="80" + sessionheight="23" + # Check for PIDS with identical tmux sessions running. + if [ "$(pgrep -fc "tmux -L ${socketname} new-session -d -x ${sessionwidth} -y ${sessionheight} -s ${sessionname}")" -ge "2" ]; then + fn_print_error "Checking session: " + fn_print_error_eol_nl + fn_script_log_error "Checking session: ERROR" + fn_script_log_error "Checking session: There are PIDS with identical tmux sessions running" + fn_script_log_error "Checking session: Killing all tmux sessions with the socketname name ${socketname} and session name ${sessionname}" + pkill -f "tmux -L ${socketname} new-session -d -x ${sessionwidth} -y ${sessionheight} -s ${sessionname}" + command_restart.sh + core_exit.sh + # Check for tmux pids with the same tmux session and socket names. This will reduce issues with migration to release v23.5.0. #4296 + elif [ "$(pgrep -fc -u "${USER}" "tmux -L ${sessionname} new-session -d -x ${sessionwidth} -y ${sessionheight} -s ${sessionname}")" != "0" ]; then + fn_print_error "Checking session: " + fn_print_error_eol_nl + fn_script_log_error "Checking session: ERROR" + fn_script_log_error "Checking session: PIDS with the same tmux session and socket names are running" + fn_script_log_error "Checking session: Killing session with the socketname name ${sessionname} and session name ${sessionname}" + pkill -f "tmux -L ${sessionname} new-session -d -x ${sessionwidth} -y ${sessionheight} -s ${sessionname}" + command_restart.sh + core_exit.sh + elif [ "${status}" != "0" ]; then fn_print_ok "Checking session: " fn_print_ok_eol_nl fn_script_log_pass "Checking session: OK" @@ -107,8 +201,8 @@ fn_monitor_check_session() { fi } +# Monitor will check queryport is set before continuing. fn_monitor_check_queryport() { - # Monitor will check queryport is set before continuing. if [ -z "${queryport}" ] || [ "${queryport}" == "0" ]; then fn_print_dots "Checking port: " fn_print_checking_eol @@ -133,7 +227,7 @@ fn_query_gsquery() { } fn_query_tcp() { - bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${queryport}'' > /dev/null 2>&1 + bash -c "exec 3<> /dev/tcp/'${queryip}'/'${queryport}'" > /dev/null 2>&1 querystatus="$?" } @@ -147,12 +241,12 @@ fn_monitor_query() { fn_print_querying_eol fn_script_log_info "Querying port: ${querymethod}: ${queryip}:${queryport} : ${queryattempt} : QUERYING" # querydelay - if [ "$(head -n 1 "${lockdir}/${selfname}.lock")" -gt "$(date "+%s" -d "${querydelay} mins ago")" ]; then + if [ "$(head -n 1 "${lockdir}/${selfname}-started.lock")" -gt "$(date "+%s" -d "${querydelay} mins ago")" ]; then fn_print_ok "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: " fn_print_delay_eol_nl fn_script_log_info "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt} : DELAY" fn_script_log_info "Query bypassed: ${gameservername} started less than ${querydelay} minutes ago" - fn_script_log_info "Server started: $(date -d @$(head -n 1 "${lockdir}/${selfname}.lock"))" + fn_script_log_info "Server started: $(date -d "@$(head -n 1 "${lockdir}/${selfname}-started.lock")")" fn_script_log_info "Current time: $(date)" monitorpass=1 core_exit.sh @@ -271,8 +365,15 @@ core_logs.sh info_game.sh # query pre-checks -fn_monitor_check_lockfile +fn_monitor_check_update_source +fn_monitor_check_update +fn_monitor_check_backup +fn_monitor_check_debug +fn_monitor_check_monitoring +fn_monitor_check_starting +fn_monitor_check_stopping fn_monitor_check_session + # Monitor will not continue if session only check. if [ "${querymode}" != "1" ]; then fn_monitor_check_queryport diff --git a/lgsm/modules/command_restart.sh b/lgsm/modules/command_restart.sh index b7bb1f3e3..ed60a5555 100644 --- a/lgsm/modules/command_restart.sh +++ b/lgsm/modules/command_restart.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Restarts the server. -commandname="MODS-INSTALL" +commandname="RESTART" commandaction="Restarting" moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set diff --git a/lgsm/modules/command_send.sh b/lgsm/modules/command_send.sh index 9f7c20dbb..e3dafd693 100644 --- a/lgsm/modules/command_send.sh +++ b/lgsm/modules/command_send.sh @@ -26,7 +26,7 @@ if [ "${status}" != "0" ]; then fi echo "" fn_print_dots "Sending command to console: \"${commandtosend}\"" - tmux -L "${sessionname}" send-keys -t "${servicename}" "${commandtosend}" ENTER + tmux -L "${socketname}" send-keys -t "${servicename}" "${commandtosend}" ENTER fn_print_ok_nl "Sending command to console: \"${commandtosend}\"" fn_script_log_pass "Command \"${commandtosend}\" sent to console" else diff --git a/lgsm/modules/command_skeleton.sh b/lgsm/modules/command_skeleton.sh index 01a7f4e7e..9e7c19a6a 100644 --- a/lgsm/modules/command_skeleton.sh +++ b/lgsm/modules/command_skeleton.sh @@ -5,7 +5,10 @@ # Website: https://linuxgsm.com # Description: Creates an copy of a game servers directorys. +commandname="SKELETON" +commandaction="Skeleton" moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set fn_print_dots "Creating skeleton directory" check.sh diff --git a/lgsm/modules/command_start.sh b/lgsm/modules/command_start.sh index b9f8fa51c..1302d0d99 100644 --- a/lgsm/modules/command_start.sh +++ b/lgsm/modules/command_start.sh @@ -11,39 +11,14 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" addtimestamp="gawk '{ print strftime(\\\"[$logtimestampformat]\\\"), \\\$0 }'" fn_firstcommand_set -fn_start_teamspeak3() { - if [ ! -f "${servercfgfullpath}" ]; then - fn_print_warn_nl "${servercfgfullpath} is missing" - fn_script_log_warn "${servercfgfullpath} is missing" - echo " * Creating blank ${servercfg}" - fn_script_log_info "Creating blank ${servercfg}" - fn_sleep_time - echo " * ${servercfg} can remain blank by default." - fn_script_log_info "${servercfgfullpath} can remain blank by default." - fn_sleep_time - echo " * ${servercfg} is located in ${servercfgfullpath}." - fn_script_log_info "${servercfg} is located in ${servercfgfullpath}." - sleep 5 - touch "${servercfgfullpath}" - fi - # Accept license. - if [ ! -f "${executabledir}/.ts3server_license_accepted" ]; then - install_eula.sh - fi - fn_start_tmux -} - # This will allow the Jedi Knight 2 version to be printed in console on start. # Used to allow update to detect JK2MV server version. fn_start_jk2() { fn_start_tmux - tmux -L "${sessionname}" end -t "${sessionname}" version ENTER > /dev/null 2>&1 + tmux -L "${socketname}" end -t "${sessionname}" version ENTER > /dev/null 2>&1 } fn_start_tmux() { - if [ "${parmsbypass}" ]; then - startparameters="" - fi # check for tmux size variables. if [[ "${servercfgtmuxwidth}" =~ ^[0-9]+$ ]]; then sessionwidth="${servercfgtmuxwidth}" @@ -68,35 +43,41 @@ fn_start_tmux() { mv "${consolelog}" "${consolelogdate}" fi - # Create lockfile - date '+%s' > "${lockdir}/${selfname}.lock" - echo "${version}" >> "${lockdir}/${selfname}.lock" - echo "${port}" >> "${lockdir}/${selfname}.lock" + # Create a starting lockfile that only exists while the start command is running. + date '+%s' > "${lockdir:?}/${selfname}-starting.lock" + fn_reload_startparameters + # Create uid to ensure unique tmux socket name. + if [ ! -f "${datadir}/${selfname}.uid" ]; then + # stop running server (if running) to prevent lingering tmux sessions. + exitbypass=1 + command_stop.sh + uid=$(date '+%s' | sha1sum | head -c 8) + echo "${uid}" > "${datadir}/${selfname}.uid" + socketname="${sessionname}-$(cat "${datadir}/${selfname}.uid")" + fi + if [ "${shortname}" == "av" ]; then cd "${systemdir}" || exit else cd "${executabledir}" || exit fi - tmux -L "${sessionname}" new-session -d -x "${sessionwidth}" -y "${sessionheight}" -s "${sessionname}" "${preexecutable} ${executable} ${startparameters}" 2> "${lgsmlogdir}/.${selfname}-tmux-error.tmp" + tmux -L "${socketname}" new-session -d -x "${sessionwidth}" -y "${sessionheight}" -s "${sessionname}" "${preexecutable} ${executable} ${startparameters}" 2> "${lgsmlogdir}/.${selfname}-tmux-error.tmp" # Create logfile. touch "${consolelog}" - # Create last start lock file - date +%s > "${lockdir}/${selfname}-laststart.lock" - # tmux compiled from source will return "master", therefore ignore it. if [ "${tmuxv}" == "master" ]; then fn_script_log "tmux version: master (user compiled)" echo -e "tmux version: master (user compiled)" >> "${consolelog}" if [ "${consolelogging}" == "on" ] || [ -z "${consolelogging}" ]; then - if [ "$logtimestamp" == "on" ]; then - tmux -L "${sessionname}" pipe-pane -o -t "${sessionname}" "exec bash -c \"cat | $addtimestamp\" >> '${consolelog}'" + if [ "${logtimestamp}" == "on" ]; then + tmux -L "${socketname}" pipe-pane -o -t "${sessionname}" "exec bash -c \"cat | $addtimestamp\" >> '${consolelog}'" else - tmux -L "${sessionname}" pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'" + tmux -L "${socketname}" pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'" fi fi @@ -114,10 +95,10 @@ fn_start_tmux() { Currently installed: $(tmux -V)" > "${consolelog}" # Console logging enable or not set. elif [ "${consolelogging}" == "on" ] || [ -z "${consolelogging}" ]; then - if [ "$logtimestamp" == "on" ]; then - tmux -L "${sessionname}" pipe-pane -o -t "${sessionname}" "exec bash -c \"cat | $addtimestamp\" >> '${consolelog}'" + if [ "${logtimestamp}" == "on" ]; then + tmux -L "${socketname}" pipe-pane -o -t "${sessionname}" "exec bash -c \"cat | $addtimestamp\" >> '${consolelog}'" else - tmux -L "${sessionname}" pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'" + tmux -L "${socketname}" pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'" fi fi else @@ -127,7 +108,7 @@ fn_start_tmux() { # Console logging disabled. if [ "${consolelogging}" == "off" ]; then - echo -e "Console logging disabled by user" >> "${consolelog}" + echo -e "Console logging disabled in settings" >> "${consolelog}" fn_script_log_info "Console logging disabled by user" fi fn_sleep_time @@ -176,8 +157,20 @@ fn_start_tmux() { fi fi fi + # Remove starting lockfile when command ends. + rm -f "${lockdir:?}/${selfname}-starting.lock" core_exit.sh else + # Create start lockfile that exists only when the server is running. + date '+%s' > "${lockdir:?}/${selfname}-started.lock" + echo "${version}" >> "${lockdir}/${selfname}-started.lock" + echo "${port}" >> "${lockdir}/${selfname}-started.lock" + fn_print_ok "${servername}" + fn_script_log_pass "Started ${servername}" + + # Create last started Lockfile. + date +%s > "${lockdir}/${selfname}-last-started.lock" + fn_print_ok "${servername}" fn_script_log_pass "Started ${servername}" fi @@ -187,23 +180,28 @@ fn_start_tmux() { check.sh -# Is the server already started. -# $status comes from check_status.sh, which is run by check.sh for this command +# If user ran the start command monitor will become enabled. +if [ "${firstcommandname}" == "START" ]||[ "${firstcommandname}" == "RESTART" ]; then + date '+%s' > "${lockdir:?}/${selfname}-monitoring.lock" +fi + +# If the server already started dont start again. if [ "${status}" != "0" ]; then fn_print_dots "${servername}" fn_print_info_nl "${servername} is already running" fn_script_log_error "${servername} is already running" if [ -z "${exitbypass}" ]; then + # Remove starting lockfile when command ends. + rm -f "${lockdir:?}/${selfname}-starting.lock" core_exit.sh fi fi -if [ -z "${fixbypass}" ]; then - fix.sh -fi + +fix.sh info_game.sh core_logs.sh -# Will check for updates is updateonstart is yes. +# Will check for updates if updateonstart is yes. if [ "${updateonstart}" == "yes" ] || [ "${updateonstart}" == "1" ] || [ "${updateonstart}" == "on" ]; then exitbypass=1 unset updateonstart @@ -212,13 +210,12 @@ if [ "${updateonstart}" == "yes" ] || [ "${updateonstart}" == "1" ] || [ "${upda fi fn_print_dots "${servername}" - -if [ "${shortname}" == "ts3" ]; then - fn_start_teamspeak3 -elif [ "${shortname}" == "jk2" ]; then +if [ "${shortname}" == "jk2" ]; then fn_start_jk2 else fn_start_tmux fi +# Remove starting lockfile when command ends. +rm -f "${lockdir:?}/${selfname}-starting.lock" core_exit.sh diff --git a/lgsm/modules/command_stop.sh b/lgsm/modules/command_stop.sh index a0cc18076..dc716216f 100644 --- a/lgsm/modules/command_stop.sh +++ b/lgsm/modules/command_stop.sh @@ -15,7 +15,7 @@ fn_stop_graceful_ctrlc() { fn_print_dots "Graceful: CTRL+c" fn_script_log_info "Graceful: CTRL+c" # Sends quit. - tmux -L "${sessionname}" send-keys -t "${sessionname}" C-c > /dev/null 2>&1 + 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. for seconds in {1..30}; do check_status.sh @@ -43,7 +43,7 @@ fn_stop_graceful_cmd() { fn_print_dots "Graceful: sending \"${1}\"" fn_script_log_info "Graceful: sending \"${1}\"" # Sends specific stop command. - tmux -L "${sessionname}" send -t "${sessionname}" ENTER "${1}" ENTER > /dev/null 2>&1 + tmux -L "${socketname}" send -t "${sessionname}" ENTER "${1}" ENTER > /dev/null 2>&1 # Waits up to ${seconds} seconds giving the server time to shutdown gracefully. for ((seconds = 1; seconds <= ${2}; seconds++)); do check_status.sh @@ -71,7 +71,7 @@ fn_stop_graceful_goldsrc() { fn_print_dots "Graceful: sending \"quit\"" fn_script_log_info "Graceful: sending \"quit\"" # sends quit - tmux -L "${sessionname}" send -t "${sessionname}" quit ENTER > /dev/null 2>&1 + tmux -L "${socketname}" send -t "${sessionname}" quit ENTER > /dev/null 2>&1 # Waits 3 seconds as goldsrc servers restart with the quit command. for seconds in {1..3}; do sleep 1 @@ -184,10 +184,10 @@ fn_stop_graceful_avorion() { fn_print_dots "Graceful: /save /stop" fn_script_log_info "Graceful: /save /stop" # Sends /save. - tmux -L "${sessionname}" send-keys -t "${sessionname}" /save ENTER > /dev/null 2>&1 + tmux -L "${socketname}" send-keys -t "${sessionname}" /save ENTER > /dev/null 2>&1 sleep 5 # Sends /quit. - tmux -L "${sessionname}" send-keys -t "${sessionname}" /stop ENTER > /dev/null 2>&1 + 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. for seconds in {1..30}; do check_status.sh @@ -240,7 +240,7 @@ fn_stop_tmux() { fn_print_dots "${servername}" fn_script_log_info "tmux kill-session: ${sessionname}: ${servername}" # Kill tmux session. - tmux -L "${sessionname}" kill-session -t "${sessionname}" > /dev/null 2>&1 + tmux -L "${socketname}" kill-session -t "${sessionname}" > /dev/null 2>&1 sleep 0.5 check_status.sh if [ "${status}" == "0" ]; then @@ -269,15 +269,27 @@ fn_stop_pre_check() { } check.sh + +# Create a stopping lockfile that only exists while the stop command is running. +date '+%s' > "${lockdir:?}/${selfname}-stopping.lock" + fn_print_dots "${servername}" info_game.sh fn_stop_pre_check -# Remove lockfile. -if [ -f "${lockdir}/${selfname}.lock" ]; then - rm -f "${lockdir:?}/${selfname}.lock" + +# Remove started lockfile. +rm -f "${lockdir:?}/${selfname}-started.lock" + +# If user ran the stop command monitor will become disabled. +if [ "${firstcommandname}" == "STOP" ];then + rm -f "${lockdir:?}/${selfname}-monitoring.lock" fi + +# Remove stopping lockfile. +rm -f "${lockdir:?}/${selfname}-stopping.lock" + if [ -z "${exitbypass}" ]; then core_exit.sh fi diff --git a/lgsm/modules/command_ts3_server_pass.sh b/lgsm/modules/command_ts3_server_pass.sh index 4814ab142..0223a877c 100644 --- a/lgsm/modules/command_ts3_server_pass.sh +++ b/lgsm/modules/command_ts3_server_pass.sh @@ -28,7 +28,7 @@ fn_serveradmin_password_prompt() { fn_serveradmin_password_set() { # Start server in "new password mode". ts3serverpass="1" - exitbypass="1" + exitbypass=1 command_start.sh fn_firstcommand_reset fn_print_ok_nl "New password applied" @@ -40,7 +40,7 @@ check.sh fn_serveradmin_password_prompt if [ "${status}" != "0" ]; then # Stop any running server. - exitbypass="1" + exitbypass=1 command_stop.sh fn_firstcommand_reset fn_serveradmin_password_set diff --git a/lgsm/modules/command_update.sh b/lgsm/modules/command_update.sh index 5993609c0..62221d5e6 100644 --- a/lgsm/modules/command_update.sh +++ b/lgsm/modules/command_update.sh @@ -37,4 +37,7 @@ else update_steamcmd.sh fi +# remove update lockfile. +rm -f "${lockdir:?}/update.lock" + core_exit.sh diff --git a/lgsm/modules/command_validate.sh b/lgsm/modules/command_validate.sh index 23ee92a26..f4a6250f3 100644 --- a/lgsm/modules/command_validate.sh +++ b/lgsm/modules/command_validate.sh @@ -23,7 +23,7 @@ fn_validate() { fi done fn_print_warn_nl "Validate might overwrite some customised files" - + date '+%s' > "${lockdir:?}/update.lock" fn_dl_steamcmd } @@ -46,4 +46,7 @@ else fn_validate fi +# remove update lockfile +rm -f "${lockdir:?}/update.lock" + core_exit.sh diff --git a/lgsm/modules/core_exit.sh b/lgsm/modules/core_exit.sh index d43f0555a..a66744b19 100644 --- a/lgsm/modules/core_exit.sh +++ b/lgsm/modules/core_exit.sh @@ -12,7 +12,7 @@ fn_exit_dev_debug() { echo -e "" echo -e "${moduleselfname} exiting with code: ${exitcode}" if [ -f "${rootdir}/dev-debug.log" ]; then - grep "modulefile=" "${rootdir}/dev-debug.log" | sed 's/modulefile=//g' > "${rootdir}/dev-debug-module-order.log" + grep -a "modulefile=" "${rootdir}/dev-debug.log" | sed 's/modulefile=//g' > "${rootdir}/dev-debug-module-order.log" fi fi } diff --git a/lgsm/modules/core_steamcmd.sh b/lgsm/modules/core_steamcmd.sh index 02074620d..54de61b7c 100644 --- a/lgsm/modules/core_steamcmd.sh +++ b/lgsm/modules/core_steamcmd.sh @@ -204,7 +204,10 @@ fn_update_steamcmd_remotebuild() { fn_update_steamcmd_compare() { fn_print_dots "Checking for update: ${remotelocation}" + # Update has been found or force update. if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then + # Create update lockfile. + date '+%s' > "${lockdir:?}/update.lock" fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" echo -e "Update available" @@ -248,7 +251,7 @@ fn_update_steamcmd_compare() { fn_firstcommand_reset fi unset exitbypass - date +%s > "${lockdir}/lastupdate.lock" + date +%s > "${lockdir:?}/last-updated.lock" alert="update" elif [ "${commandname}" == "CHECK-UPDATE" ]; then alert="check-update" diff --git a/lgsm/modules/fix_csgo.sh b/lgsm/modules/fix_csgo.sh index eb8cc9560..01b02c4e0 100644 --- a/lgsm/modules/fix_csgo.sh +++ b/lgsm/modules/fix_csgo.sh @@ -37,6 +37,6 @@ libgccc_so="${serverfiles}/bin/libgcc_s.so.1" if [ -f "${libgccc_so}" ]; then fixname="libgcc_s.so.1 move away" fn_fix_msg_start - mv -v "${libgccc_so}" "${libgccc_so}.bck" + mv "${libgccc_so}" "${libgccc_so}.bak" fn_fix_msg_end fi diff --git a/lgsm/modules/fix_ts3.sh b/lgsm/modules/fix_ts3.sh index 9eb728f48..3d0a6760f 100644 --- a/lgsm/modules/fix_ts3.sh +++ b/lgsm/modules/fix_ts3.sh @@ -7,6 +7,19 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +# Creates a blank ts3server.ini if it does not exist. +if [ ! -f "${servercfgfullpath}" ]; then + fixname="create blank ${servercfg}" + fn_fix_msg_start + touch "${servercfgfullpath}" + fn_fix_msg_end +fi + +# Accept license. +if [ ! -f "${executabledir}/.ts3server_license_accepted" ]; then + install_eula.sh +fi + # Fixes: makes libmariadb2 available #1924. if [ ! -f "${serverfiles}/libmariadb.so.2" ]; then fixname="libmariadb.so.2" diff --git a/lgsm/modules/info_distro.sh b/lgsm/modules/info_distro.sh index ee84d39f2..b375f8c02 100644 --- a/lgsm/modules/info_distro.sh +++ b/lgsm/modules/info_distro.sh @@ -10,7 +10,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" ### Game Server pid if [ "${status}" == "1" ]; then - gameserverpid="$(tmux -L "${sessionname}" list-sessions -F "#{session_name} #{pane_pid}" | grep "^${sessionname} " | awk '{print $NF}')" + gameserverpid="$(tmux -L "${socketname}" list-sessions -F "#{session_name} #{pane_pid}" | grep "^${sessionname} " | awk '{print $NF}')" if [ "${engine}" == "source" ]; then srcdslinuxpid="$(ps -ef | grep -v grep | grep "${gameserverpid}" | grep srcds_linux | awk '{print $2}')" elif [ "${engine}" == "goldsrc" ]; then diff --git a/lgsm/modules/update_factorio.sh b/lgsm/modules/update_factorio.sh index 2af9916aa..f7fb06c7d 100644 --- a/lgsm/modules/update_factorio.sh +++ b/lgsm/modules/update_factorio.sh @@ -64,7 +64,10 @@ fn_update_remotebuild() { fn_update_compare() { fn_print_dots "Checking for update: ${remotelocation}" + # Update has been found or force update. if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then + # Create update lockfile. + date '+%s' > "${lockdir:?}/update.lock" fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" echo -e "Update available" @@ -117,7 +120,7 @@ fn_update_compare() { fn_firstcommand_reset fi unset exitbypass - date +%s > "${lockdir}/lastupdate.lock" + date +%s > "${lockdir}/last-updated.lock" alert="update" elif [ "${commandname}" == "CHECK-UPDATE" ]; then alert="check-update" diff --git a/lgsm/modules/update_jediknight2.sh b/lgsm/modules/update_jediknight2.sh index d455a2722..e67b0c02b 100644 --- a/lgsm/modules/update_jediknight2.sh +++ b/lgsm/modules/update_jediknight2.sh @@ -61,7 +61,10 @@ fn_update_remotebuild() { fn_update_compare() { fn_print_dots "Checking for update: ${remotelocation}" + # Update has been found or force update. if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then + # Create update lockfile. + date '+%s' > "${lockdir:?}/update.lock" fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" echo -e "Update available" @@ -114,7 +117,7 @@ fn_update_compare() { fn_firstcommand_reset fi unset exitbypass - date +%s > "${lockdir}/lastupdate.lock" + date +%s > "${lockdir}/last-updated.lock" alert="update" elif [ "${commandname}" == "CHECK-UPDATE" ]; then alert="check-update" diff --git a/lgsm/modules/update_minecraft.sh b/lgsm/modules/update_minecraft.sh index e764e846e..cfdf7e057 100644 --- a/lgsm/modules/update_minecraft.sh +++ b/lgsm/modules/update_minecraft.sh @@ -75,7 +75,10 @@ fn_update_remotebuild() { fn_update_compare() { fn_print_dots "Checking for update: ${remotelocation}" + # Update has been found or force update. if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then + # Create update lockfile. + date '+%s' > "${lockdir:?}/update.lock" fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" echo -e "Update available" @@ -128,7 +131,7 @@ fn_update_compare() { fn_firstcommand_reset fi unset exitbypass - date +%s > "${lockdir}/lastupdate.lock" + date +%s > "${lockdir}/last-updated.lock" alert="update" elif [ "${commandname}" == "CHECK-UPDATE" ]; then alert="check-update" diff --git a/lgsm/modules/update_minecraft_bedrock.sh b/lgsm/modules/update_minecraft_bedrock.sh index 3c3885a9d..92bffca31 100644 --- a/lgsm/modules/update_minecraft_bedrock.sh +++ b/lgsm/modules/update_minecraft_bedrock.sh @@ -80,7 +80,10 @@ fn_update_remotebuild() { fn_update_compare() { fn_print_dots "Checking for update: ${remotelocation}" + # Update has been found or force update. if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then + # Create update lockfile. + date '+%s' > "${lockdir:?}/update.lock" fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" echo -e "Update available" @@ -133,7 +136,7 @@ fn_update_compare() { fn_firstcommand_reset fi unset exitbypass - date +%s > "${lockdir}/lastupdate.lock" + date +%s > "${lockdir}/last-updated.lock" alert="update" elif [ "${commandname}" == "CHECK-UPDATE" ]; then alert="check-update" diff --git a/lgsm/modules/update_mta.sh b/lgsm/modules/update_mta.sh index 16b8278c7..eab77c748 100644 --- a/lgsm/modules/update_mta.sh +++ b/lgsm/modules/update_mta.sh @@ -59,7 +59,10 @@ fn_update_remotebuild() { fn_update_compare() { fn_print_dots "Checking for update: ${remotelocation}" + # Update has been found or force update. if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then + # Create update lockfile. + date '+%s' > "${lockdir:?}/update.lock" if [ "${forceupdate}" == "1" ]; then # forceupdate bypasses checks, useful for small build changes mtaupdatestatus="forced" @@ -118,7 +121,7 @@ fn_update_compare() { fn_firstcommand_reset fi unset exitbypass - date +%s > "${lockdir}/lastupdate.lock" + date +%s > "${lockdir}/last-updated.lock" alert="update" elif [ "${commandname}" == "CHECK-UPDATE" ]; then alert="check-update" diff --git a/lgsm/modules/update_papermc.sh b/lgsm/modules/update_papermc.sh index b70a2d69d..2438c2d86 100644 --- a/lgsm/modules/update_papermc.sh +++ b/lgsm/modules/update_papermc.sh @@ -85,7 +85,10 @@ fn_update_remotebuild() { fn_update_compare() { fn_print_dots "Checking for update: ${remotelocation}" + # Update has been found or force update. if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then + # Create update lockfile. + date '+%s' > "${lockdir:?}/update.lock" fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" echo -e "Update available" @@ -138,7 +141,7 @@ fn_update_compare() { fn_firstcommand_reset fi unset exitbypass - date +%s > "${lockdir}/lastupdate.lock" + date +%s > "${lockdir}/last-updated.lock" alert="update" elif [ "${commandname}" == "CHECK-UPDATE" ]; then alert="check-update" diff --git a/lgsm/modules/update_steamcmd.sh b/lgsm/modules/update_steamcmd.sh index 401da43a8..20a85ab93 100644 --- a/lgsm/modules/update_steamcmd.sh +++ b/lgsm/modules/update_steamcmd.sh @@ -23,14 +23,15 @@ if [ "${forceupdate}" == "1" ]; then exitbypass=1 command_stop.sh fn_firstcommand_reset + date '+%s' > "${lockdir:?}/update.lock" fn_dl_steamcmd - date +%s > "${lockdir}/lastupdate.lock" + date +%s > "${lockdir}/last-updated.lock" exitbypass=1 command_start.sh fn_firstcommand_reset else fn_dl_steamcmd - date +%s > "${lockdir}/lastupdate.lock" + date +%s > "${lockdir}/last-updated.lock" fi else fn_update_steamcmd_localbuild diff --git a/lgsm/modules/update_ts3.sh b/lgsm/modules/update_ts3.sh index 30dc9e513..b031d2b34 100644 --- a/lgsm/modules/update_ts3.sh +++ b/lgsm/modules/update_ts3.sh @@ -68,7 +68,10 @@ fn_update_remotebuild() { fn_update_compare() { fn_print_dots "Checking for update: ${remotelocation}" + # Update has been found or force update. if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then + # Create update lockfile. + date '+%s' > "${lockdir:?}/update.lock" fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" echo -e "Update available" @@ -121,7 +124,7 @@ fn_update_compare() { fn_firstcommand_reset fi unset exitbypass - date +%s > "${lockdir}/lastupdate.lock" + date +%s > "${lockdir}/last-updated.lock" alert="update" elif [ "${commandname}" == "CHECK-UPDATE" ]; then alert="check-update" diff --git a/lgsm/modules/update_ut99.sh b/lgsm/modules/update_ut99.sh index 909286196..1ff84a060 100644 --- a/lgsm/modules/update_ut99.sh +++ b/lgsm/modules/update_ut99.sh @@ -62,7 +62,10 @@ fn_update_remotebuild() { fn_update_compare() { fn_print_dots "Checking for update: ${remotelocation}" + # Update has been found or force update. if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then + # Create update lockfile. + date '+%s' > "${lockdir:?}/update.lock" fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" echo -e "Update available" @@ -115,7 +118,7 @@ fn_update_compare() { fn_firstcommand_reset fi unset exitbypass - date +%s > "${lockdir}/lastupdate.lock" + date +%s > "${lockdir}/last-updated.lock" alert="update" elif [ "${commandname}" == "CHECK-UPDATE" ]; then alert="check-update" diff --git a/lgsm/modules/update_vintagestory.sh b/lgsm/modules/update_vintagestory.sh index d186d19aa..21e2d0e63 100644 --- a/lgsm/modules/update_vintagestory.sh +++ b/lgsm/modules/update_vintagestory.sh @@ -69,7 +69,10 @@ fn_update_remotebuild() { fn_update_compare() { fn_print_dots "Checking for update: ${remotelocation}" + # Update has been found or force update. if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then + # Create update lockfile. + date '+%s' > "${lockdir:?}/update.lock" fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" echo -e "Update available" @@ -122,7 +125,7 @@ fn_update_compare() { fn_firstcommand_reset fi unset exitbypass - date +%s > "${lockdir}/lastupdate.lock" + date +%s > "${lockdir}/last-updated.lock" alert="update" elif [ "${commandname}" == "CHECK-UPDATE" ]; then alert="check-update" diff --git a/linuxgsm.sh b/linuxgsm.sh index 52d12faca..331a61822 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -26,7 +26,6 @@ gameservername="core" commandname="CORE" rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") -sessionname=$(echo "${selfname}" | cut -f1 -d".") lgsmdir="${rootdir}/lgsm" [ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" lgsmlogdir="${logdir}/lgsm" @@ -36,6 +35,8 @@ modulesdir="${lgsmdir}/modules" tmpdir="${lgsmdir}/tmp" datadir="${lgsmdir}/data" lockdir="${lgsmdir}/lock" +sessionname="${selfname}" +[ -f "${datadir}/${selfname}.uid" ] && socketname="${sessionname}-$(cat "${datadir}/${selfname}.uid")" || socketname="${sessionname}" serverlist="${datadir}/serverlist.csv" serverlistmenu="${datadir}/serverlistmenu.csv" [ -n "${LGSM_CONFIG}" ] && configdir="${LGSM_CONFIG}" || configdir="${lgsmdir}/config-lgsm" From 2d6092186c51aef573d9a608e65d2da0a406ae7f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 28 Aug 2023 22:21:18 +0100 Subject: [PATCH 225/374] fix(steamcmd): resolve steamcmd goldsource download issues (#4297) * add appmanifest files to data * refactor: improve appmanifest check and force update logic The code changes refactor the `fn_appmanifest_check` function in the `core_steamcmd.sh` file. The improvements include: - Checking if `BytesDownloaded` and `BytesToDownload` match, and forcing an update if they don't. - Checking if `BytesStaged` and `BytesToStage` match, and forcing an update if they don't. - For GoldSrc engine, checking if `SharedDepots` exists in the appmanifest file, and forcing an update if it doesn't. - Fetching missing appmanifest files from GitHub for specific game shortnames. These changes enhance the reliability of the appmanifest check process and ensure that updates are forced when necessary. * refactor: improve removal of appinfo.vdf file The code has been refactored to improve the removal of the appinfo.vdf file. The find command now redirects error output to /dev/null for a cleaner execution. * fn_check_steamcmd_appmanifest is now a full check * feat: add support for fetching appmanifest files This commit adds support for fetching appmanifest files from the GitHub repository. The code now fetches the appropriate appmanifest files based on the game's shortname and updates them in the serverfiles/steamapps directory. This change ensures that the correct appmanifest files are used, fixing an issue related to updating certain games. * more appmanifest files * feat: add appmanifest_10.acf for Counter-Strike Added the appmanifest_10.acf file for Counter-Strike to resolve an issue with missing SharedDepots. This commit fetches the necessary files from GitHub and forces an update to correct the issue. * fix: fix missing SharedDepots in appmanifest_90.acf The code changes fix a bug where the SharedDepots entry was missing from the appmanifest_90.acf file. The commit updates the error messages and logs to reflect the correct filename. Additionally, it forces an update to resolve the issue. --- lgsm/modules/core_steamcmd.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/core_steamcmd.sh b/lgsm/modules/core_steamcmd.sh index 54de61b7c..6d96a9e6c 100644 --- a/lgsm/modules/core_steamcmd.sh +++ b/lgsm/modules/core_steamcmd.sh @@ -355,8 +355,8 @@ fn_check_steamcmd_appmanifest() { if [ "${engine}" == "goldsrc" ]; then shareddepotsexists=$(grep -c SharedDepots "${serverfiles}/steamapps/appmanifest_90.acf") if [ ! -f "${serverfiles}/steamapps/appmanifest_90.acf" ] || [ "${shareddepotsexists}" == "0" ]; then - fn_print_error_nl "SharedDepots missing from appmanifest_${appid}.acf" - fn_script_log_error "SharedDepots missing from appmanifest_${appid}.acf" + fn_print_error_nl "SharedDepots missing from appmanifest_90.acf" + fn_script_log_error "SharedDepots missing from appmanifest_90.acf" fn_print_info_nl "Forcing update to correct issue" fn_script_log_info "Forcing update to correct issue" if [ "${shortname}" == "ahl" ]; then From 6b9393f949af1f9d4bb8e69b7b175e8251fe799c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 30 Aug 2023 22:58:02 +0100 Subject: [PATCH 226/374] fix: improve sed command in fn_info_game_valve_keyvalues (#4300) The sed command in the fn_info_game_valve_keyvalues function has been modified to improve its functionality. The change ensures that only the value between double quotes is captured, even if there are additional spaces before or after the value. This enhances the accuracy of extracting values from server configuration files. --- lgsm/modules/info_game.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 2bfdc10e7..5eea7dfba 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -157,7 +157,7 @@ fn_info_game_valve_keyvalues() { else servercfgparse="${servercfgfullpath}" fi - eval "${1}=\"$(sed -n '/^\<'"${2}"'\>/ { s/.* *"\?\([^"]*\)"\?/\1/p;q }' "${servercfgparse}" | tr -d '\r')\"" + eval "${1}=\"$(sed -n '/^\<'"${2}"'\>/ { s/.* *"\([^"]*\)".*/\1/p;q }' "${servercfgparse}" | tr -d '\r')\"" configtype="valve_keyvalues" } From 7b374249eae27f0de7a2b564e0663e1d062c4f28 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 1 Sep 2023 22:08:26 +0100 Subject: [PATCH 227/374] feat: change extip to public ip (#4301) also change ark parms for epic to use publicip --- .../config-lgsm/arkserver/_default.cfg | 2 +- .../config-lgsm/btlserver/_default.cfg | 2 +- lgsm/modules/command_debug.sh | 6 ++--- lgsm/modules/command_dev_details.sh | 2 +- lgsm/modules/info_game.sh | 22 +++++++++---------- lgsm/modules/info_messages.sh | 10 ++++----- 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/lgsm/config-default/config-lgsm/arkserver/_default.cfg b/lgsm/config-default/config-lgsm/arkserver/_default.cfg index f391bb9b5..e3fb9654e 100644 --- a/lgsm/config-default/config-lgsm/arkserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/arkserver/_default.cfg @@ -19,7 +19,7 @@ altsavedirectoryname="${defaultmap}" maxplayers="70" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="${defaultmap}?AltSaveDirectoryName=${altsavedirectoryname}?listen?MultiHome=${ip}?MaxPlayers=${maxplayers}?QueryPort=${queryport}?RCONPort=${rconport}?Port=${port} -automanagedmods -crossplay -PublicIPForEpic=${ip}" +startparameters="${defaultmap}?AltSaveDirectoryName=${altsavedirectoryname}?listen?MultiHome=${ip}?MaxPlayers=${maxplayers}?QueryPort=${queryport}?RCONPort=${rconport}?Port=${port} -automanagedmods -crossplay -PublicIPForEpic=${publicip}" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/btlserver/_default.cfg b/lgsm/config-default/config-lgsm/btlserver/_default.cfg index f1e744972..e26ca7e77 100644 --- a/lgsm/config-default/config-lgsm/btlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/btlserver/_default.cfg @@ -14,7 +14,7 @@ port="7777" queryport="7780" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="/Game/Maps/Final_Maps/Derailed?Game=/Script/ShooterGame.WartideGameMode?listen -log -broadcastip=\"${extip}\" -PORT=${port} -QueryPort=${queryport} -defgameini=\"${servercfgfullpath}\"" +startparameters="/Game/Maps/Final_Maps/Derailed?Game=/Script/ShooterGame.WartideGameMode?listen -log -broadcastip=\"${publicip}\" -PORT=${port} -QueryPort=${queryport} -defgameini=\"${servercfgfullpath}\"" #### LinuxGSM Settings #### diff --git a/lgsm/modules/command_debug.sh b/lgsm/modules/command_debug.sh index c544e3e2a..41722e507 100644 --- a/lgsm/modules/command_debug.sh +++ b/lgsm/modules/command_debug.sh @@ -58,9 +58,9 @@ fi echo -e "${lightblue}Game Server IP:\t${default}${ip}:${port}" # External server IP. -if [ "${extip}" ]; then - if [ "${ip}" != "${extip}" ]; then - echo -e "${lightblue}Internet IP:\t${default}${extip}:${port}" +if [ "${publicip}" ]; then + if [ "${ip}" != "${publicip}" ]; then + echo -e "${lightblue}Internet IP:\t${default}${publicip}:${port}" fi fi diff --git a/lgsm/modules/command_dev_details.sh b/lgsm/modules/command_dev_details.sh index 28abb87b1..b95418121 100644 --- a/lgsm/modules/command_dev_details.sh +++ b/lgsm/modules/command_dev_details.sh @@ -44,7 +44,7 @@ declare -A server_details=( ['HTTP Password']="${httppassword}" ['HTTP Port']="${httpport}" ['HTTP User']="${httpuser}" - ['Internet IP']="${extip}" + ['Internet IP']="${publicip}" ['LAN Port']="${lanport}" ['Master Port']="${masterport}" ['Master']="${master}" diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 5eea7dfba..641f5eeb1 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -2378,30 +2378,30 @@ fi # External IP address # Cache external IP address for 24 hours -if [ -f "${tmpdir}/extip.txt" ]; then - if [ "$(find "${tmpdir}/extip.txt" -mmin +1440)" ]; then - rm -f "${tmpdir:?}/extip.txt" +if [ -f "${tmpdir}/publicip.txt" ]; then + if [ "$(find "${tmpdir}/publicip.txt" -mmin +1440)" ]; then + rm -f "${tmpdir:?}/publicip.txt" fi fi -if [ ! -f "${tmpdir}/extip.txt" ]; then - extip="$(curl --connect-timeout 10 -s https://api.ipify.org 2> /dev/null)" +if [ ! -f "${tmpdir}/publicip.txt" ]; then + publicip="$(curl --connect-timeout 10 -s https://api.ipify.org 2> /dev/null)" exitcode=$? - # if curl passes add extip to externalip.txt + # if curl passes add publicip to externalip.txt if [ "${exitcode}" == "0" ]; then - echo "${extip}" > "${tmpdir}/extip.txt" + echo "${publicip}" > "${tmpdir}/publicip.txt" else echo "Unable to get external IP address" fi else - extip="$(cat "${tmpdir}/extip.txt")" + publicip="$(cat "${tmpdir}/publicip.txt")" fi # Alert IP address if [ "${displayip}" ]; then alertip="${displayip}" -elif [ "${extip}" ]; then - alertip="${extip}" +elif [ "${publicip}" ]; then + alertip="${publicip}" else alertip="${ip}" fi @@ -2421,7 +2421,7 @@ if [ -z "${displaymasterserver}" ]; then if [ -n "${ip}" ] && [ -n "${port}" ]; then if [ "${steammaster}" == "true" ] || [ "${commandname}" == "DEV-QUERY-RAW" ]; then # Query external IP first as most liky to succeed. - masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${extip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" --arg port3 "${port3}" 'if .response.servers != null then .response.servers[] | select((.gameport == ($port|tonumber) or .gameport == ($queryport|tonumber) or .gameport == ($port3|tonumber))) | .addr else empty end' | wc -l 2> /dev/null)" + masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${publicip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" --arg port3 "${port3}" 'if .response.servers != null then .response.servers[] | select((.gameport == ($port|tonumber) or .gameport == ($queryport|tonumber) or .gameport == ($port3|tonumber))) | .addr else empty end' | wc -l 2> /dev/null)" if [ "${masterserver}" == "0" ]; then # Loop though server IP addresses if external IP fails. for queryip in "${queryips[@]}"; do diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index 8c601a654..22319cdbd 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -166,8 +166,8 @@ fn_info_message_server_resource() { echo -e "${lightblue}Link Speed:\t${default}${netlink}" fi echo -e "${lightblue}IP:\t${default}${ip}" - if [ "${ip}" != "${extip}" ]; then - echo -e "${lightblue}Internet IP:\t${default}${extip}" + if [ "${ip}" != "${publicip}" ]; then + echo -e "${lightblue}Internet IP:\t${default}${publicip}" fi } | column -s $'\t' -t } @@ -274,9 +274,9 @@ fn_info_message_gameserver() { echo -e "${lightblue}Server IP:\t${default}${ip}:${port}" # Internet ip - if [ -n "${extip}" ]; then - if [ "${ip}" != "${extip}" ]; then - echo -e "${lightblue}Internet IP:\t${default}${extip}:${port}" + if [ -n "${publicip}" ]; then + if [ "${ip}" != "${publicip}" ]; then + echo -e "${lightblue}Internet IP:\t${default}${publicip}:${port}" fi fi From b481ff1989afa38024500c6cf0db19aa56199c9d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 1 Sep 2023 23:12:35 +0100 Subject: [PATCH 228/374] fix: resolve edge case where RHEL servers might have dpkg installed (#4302) For reasons unknown you can install dpkg in RHEL so instead this now looks for apt, yum or dnf --- lgsm/modules/check_deps.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lgsm/modules/check_deps.sh b/lgsm/modules/check_deps.sh index 560490b97..23edd69c6 100644 --- a/lgsm/modules/check_deps.sh +++ b/lgsm/modules/check_deps.sh @@ -93,16 +93,16 @@ fn_deps_email() { array_deps_required+=(exim4) elif [ -d /etc/sendmail ]; then array_deps_required+=(sendmail) - elif [ "$(command -v dpkg-query 2> /dev/null)" ]; then - array_deps_required+=(mailutils postfix) - elif [ "$(command -v rpm 2> /dev/null)" ]; then + elif [ "$(command -v yum 2> /dev/null)" ] || [ "$(command -v dnf 2> /dev/null)" ]; then array_deps_required+=(mailx postfix) + elif [ "$(command -v apt 2> /dev/null)" ]; then + array_deps_required+=(mailutils postfix) fi else - if [ "$(command -v dpkg-query 2> /dev/null)" ]; then - array_deps_required+=(mailutils postfix) - elif [ "$(command -v rpm 2> /dev/null)" ]; then + if [ "$(command -v yum 2> /dev/null)" ] || [ "$(command -v dnf 2> /dev/null)" ]; then array_deps_required+=(mailx postfix) + elif [ "$(command -v apt 2> /dev/null)" ]; then + array_deps_required+=(mailutils postfix) fi fi fi @@ -144,7 +144,7 @@ fn_install_missing_deps() { fi # Add sudo dpkg --add-architecture i386 if using i386 packages. - if [ "$(command -v dpkg-query 2> /dev/null)" ]; then + if [ "$(command -v apt 2> /dev/null)" ]; then if printf '%s\n' "${array_deps_required[@]}" | grep -q -P 'i386'; then i386installcommand="sudo dpkg --add-architecture i386; " fi @@ -161,7 +161,7 @@ fn_install_missing_deps() { echo -en "...\r" sleep 1 echo -en " \r" - if [ "$(command -v dpkg-query 2> /dev/null)" ]; then + if [ "$(command -v apt 2> /dev/null)" ]; then cmd="echo steamcmd steam/question select \"I AGREE\" | sudo debconf-set-selections; echo steamcmd steam/license note '' | sudo debconf-set-selections; ${i386installcommand}sudo apt-get update; sudo apt-get -y install ${array_deps_missing[*]}" eval "${cmd}" elif [ "$(command -v dnf 2> /dev/null)" ]; then @@ -181,7 +181,7 @@ fn_install_missing_deps() { # If automatic dependency install is unavailable. if [ "${autodepinstall}" != "0" ]; then - if [ "$(command -v dpkg-query 2> /dev/null)" ]; then + if [ "$(command -v apt 2> /dev/null)" ]; then echo -e "${i386installcommand}sudo apt update; sudo apt install ${array_deps_missing[*]}" elif [ "$(command -v dnf 2> /dev/null)" ]; then echo -e "sudo dnf install ${array_deps_missing[*]}" @@ -254,7 +254,7 @@ fn_deps_detector() { depstatus=1 monostatus=1 fi - elif [ "$(command -v dpkg-query 2> /dev/null)" ]; then + elif [ "$(command -v apt 2> /dev/null)" ]; then dpkg-query -W -f='${Status}' "${deptocheck}" 2> /dev/null | grep -q -P '^install ok installed' depstatus=$? elif [ "$(command -v dnf 2> /dev/null)" ]; then From a5dbb4ad470d2fc22bacf6f9ab353f5fc0f8ea90 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 1 Sep 2023 23:38:51 +0100 Subject: [PATCH 229/374] fix: add socketname to core_legacy.sh --- lgsm/modules/core_legacy.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lgsm/modules/core_legacy.sh b/lgsm/modules/core_legacy.sh index 173c893d2..7a7e554ed 100644 --- a/lgsm/modules/core_legacy.sh +++ b/lgsm/modules/core_legacy.sh @@ -15,6 +15,10 @@ for legacy_version in "${legacy_versions_array[@]}"; do fi done +if [ -z "${socketname}" ]; then + socketname="${sessionname}" +fi + if [ -n "${webadminuser}" ]; then httpuser="${webadminuser}" fi From aaff7c9bdb693fff9cd45c98afc8a1f4013ff47d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 2 Sep 2023 01:05:06 +0100 Subject: [PATCH 230/374] fix: Steam log symlink points to correct location This commit adds the functionality to create a symbolic link for Steam logs if it is missing. The symlink is created in the specified log directory. --- lgsm/modules/check_logs.sh | 5 +++++ lgsm/modules/install_logs.sh | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lgsm/modules/check_logs.sh b/lgsm/modules/check_logs.sh index 2087ac915..036eea5e4 100644 --- a/lgsm/modules/check_logs.sh +++ b/lgsm/modules/check_logs.sh @@ -24,3 +24,8 @@ fi if [ "${gamelogdir}" ] && [ -d "${gamelogdir}" ] && [ ! -d "${logdir}/server" ]; then fn_check_logs fi + +# Create Steam log symlink if missing +if [ ! -d "${logdir}/steam" ] && [ -n "${appid}" ]; then + fn_check_logs +fi diff --git a/lgsm/modules/install_logs.sh b/lgsm/modules/install_logs.sh index 31a408506..cd26addd3 100644 --- a/lgsm/modules/install_logs.sh +++ b/lgsm/modules/install_logs.sh @@ -86,10 +86,10 @@ if [ "${gamelogdir}" ]; then fi # If server uses SteamCMD create a symbolic link to the Steam logs. -if [ -d "${rootdir}/Steam/logs" ]; then - if [ ! -L "${logdir}/steamcmd" ]; then - echo -en "creating symlink to steam log dir: ${logdir}/steamcmd -> ${rootdir}/Steam/logs..." - if ! ln -nfs "${rootdir}/Steam/logs" "${logdir}/steamcmd"; then +if [ -d "${HOME}/.steam/steam/logs" ]; then + if [ ! -L "${logdir}/steam" ]; then + echo -en "creating symlink to steam log dir: ${logdir}/steam -> ${HOME}/.steam/steam/logs..." + if ! ln -nfs "${HOME}/.steam/steam/logs" "${logdir}/steam"; then fn_print_fail_eol_nl core_exit.sh else From 49be44db239c38db008ebff61e13e8e41644c84f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 3 Sep 2023 21:13:21 +0100 Subject: [PATCH 231/374] feat: add mono support for Ubuntu 22.04 and Debian 12 This commit adds support for Ubuntu 22.04 and Debian 12 in the check_deps.sh script. It includes the necessary commands to install dependencies for Mono repository on these versions of the operating systems. --- lgsm/modules/check_deps.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/check_deps.sh b/lgsm/modules/check_deps.sh index 23edd69c6..41334205e 100644 --- a/lgsm/modules/check_deps.sh +++ b/lgsm/modules/check_deps.sh @@ -19,7 +19,9 @@ fn_install_mono_repo() { sleep 1 echo -en " \r" if [ "${distroid}" == "ubuntu" ]; then - if [ "${distroversion}" == "20.04" ]; then + if [ "${distroversion}" == "22.04" ]; then + cmd="sudo apt install gnupg ca-certificates;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/ubuntu stable-jammy main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" + elif [ "${distroversion}" == "20.04" ]; then cmd="sudo apt install gnupg ca-certificates;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/ubuntu stable-focal main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" elif [ "${distroversion}" == "18.04" ]; then cmd="sudo apt install gnupg ca-certificates;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/ubuntu stable-bionic main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" @@ -29,7 +31,11 @@ fn_install_mono_repo() { monoautoinstall="1" fi elif [ "${distroid}" == "debian" ]; then - if [ "${distroversion}" == "10" ]; then + if [ "${distroversion}" == "12" ]; then + cmd="sudo apt install apt-transport-https dirmngr gnupg ca-certificates;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/debian stable-bookworm main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" + elif [ "${distroversion}" == "11" ]; then + cmd="sudo apt install apt-transport-https dirmngr gnupg ca-certificates;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/debian stable-bullseye main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" + elif [ "${distroversion}" == "10" ]; then cmd="sudo apt install apt-transport-https dirmngr gnupg ca-certificates;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/debian stable-buster main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" elif [ "${distroversion}" == "9" ]; then cmd="sudo apt install apt-transport-https dirmngr gnupg ca-certificates;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/debian stable-stretch main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" From 5f0f12a9b20e3f0fc8df86faac5318be7bacb19a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 4 Sep 2023 21:24:27 +0100 Subject: [PATCH 232/374] feat(vint): migrate to dotnet from mono (#4304) * adde dotnet repo * feat: update package dependencies for Ubuntu 16.04, 18.04, and 20.04 - Updated the package dependency for "vints" from "mono-complete" to "aspnetcore-runtime-7.0" in the Ubuntu 16.04, 18.04, and 20.04 CSV files. - Also updated the package dependency for "vpmc" from "openjdk-8-jre" to "openjdk-11-jre" in the Ubuntu 18.04 and 20.04 CSV files. This commit ensures that the correct package dependencies are specified for these Ubuntu versions, improving compatibility and functionality of the codebase. * refactor: update dependency check for ASP.NET Core runtime The code has been refactored to update the dependency check for the ASP.NET Core runtime. The condition that checks for the presence of "dotnet-runtime-7.0" has been changed to "aspnetcore-runtime-7.0". This ensures that the correct dependency is being checked and improves accuracy in determining if the required runtime is installed. * fix: fix conditional statement in check_deps.sh The commit fixes a bug in the conditional statement of the check_deps.sh script. Previously, it incorrectly checked if dotnetversion was empty instead of checking if it was not empty. This caused an incorrect value to be assigned to depstatus and dotnetinstalled variables. The bug has been fixed by correcting the conditional statement. * refactor: simplify install_config.sh This commit simplifies the `install_config.sh` file by removing unnecessary code for the "vints" configuration. The configuration is now generated on first run, and the list of config locations is still provided. * refactor: improve error handling and display in core_exit.sh and install_config.sh - In core_exit.sh, added a check to set exit code to 4 if it is not already set. - In install_config.sh, improved the display of missing config file by highlighting the file path. These changes aim to enhance the error handling and provide clearer information to users. * feat: add exitcode handling to command_install.sh The commit adds a check for the exitcode variable in command_install.sh. If it is empty, it sets it to 0. This change ensures proper handling of the exitcode in the script. * refactor: improve installation process The code changes in this commit refactor the installation process. The `command_install.sh` file has been modified to remove unnecessary code. Additionally, the `install_complete.sh` file has been updated to provide more informative messages based on the exit code. This improves the overall clarity and user experience during installation. Co-authored-by: AI Assistant * refactor: remove redundant code in install_config.sh The commit removes a redundant function call in the install_config.sh file. The "fn_list_config_locations" function is no longer needed for the "vints" configuration. * a * refactor: improve logging in command_stop.sh - Changed `fn_script_log_error` to `fn_script_log_info` for consistency - Removed unnecessary empty line * refactor: dont try to stop a server that is already stopped * refactor: remove redundant code and improve socket name generation The commit refactors the code in `command_start.sh` and `linuxgsm.sh` to remove redundant code related to generating a unique tmux socket name. The code now creates a uid file if it doesn't exist, stops the running server, generates a uid using the current timestamp, and updates the socketname accordingly. This change improves the efficiency and reliability of socket name generation. * refactor: remove unnecessary command_stop.sh call The code change removes the unnecessary call to `command_stop.sh` in the `linuxgsm.sh` file. This improves efficiency and prevents lingering tmux sessions. * refactor: remove duplicate code for creating unique tmux socket name The code changes in `command_start.sh` and `linuxgsm.sh` refactor the creation of a unique tmux socket name. The duplicate code in `linuxgsm.sh` has been removed, resulting in cleaner and more efficient code. * refactor: improve socketname assignment The code change refactors the socketname assignment in the linuxgsm.sh script. Instead of directly assigning it to "${sessionname}-$(cat "${datadir}/${selfname}.uid")", it now checks if the file "${datadir}/${selfname}.uid" exists before assigning the value. This improves error handling and prevents potential issues when the file doesn't exist. --- lgsm/data/almalinux-8.csv | 2 +- lgsm/data/almalinux-9.csv | 2 +- lgsm/data/centos-7.csv | 2 +- lgsm/data/centos-8.csv | 2 +- lgsm/data/centos-9.csv | 2 +- lgsm/data/debian-10.csv | 2 +- lgsm/data/debian-11.csv | 2 +- lgsm/data/debian-12.csv | 2 +- lgsm/data/debian-9.csv | 2 +- lgsm/data/rhel-7.csv | 2 +- lgsm/data/rhel-8.csv | 2 +- lgsm/data/rhel-9.csv | 2 +- lgsm/data/rocky-8.csv | 2 +- lgsm/data/rocky-9.csv | 2 +- lgsm/data/ubuntu-16.04.csv | 2 +- lgsm/data/ubuntu-18.04.csv | 2 +- lgsm/data/ubuntu-20.04.csv | 2 +- lgsm/data/ubuntu-21.04.csv | 135 ----------------------- lgsm/data/ubuntu-21.10.csv | 135 ----------------------- lgsm/data/ubuntu-22.04.csv | 2 +- lgsm/data/ubuntu-23.04.csv | 2 +- lgsm/modules/check_deps.sh | 47 ++++++-- lgsm/modules/command_dev_detect_glibc.sh | 2 +- lgsm/modules/command_install.sh | 1 + lgsm/modules/command_start.sh | 11 +- lgsm/modules/command_stop.sh | 15 ++- lgsm/modules/core_dl.sh | 2 +- lgsm/modules/core_exit.sh | 2 + lgsm/modules/info_distro.sh | 4 + lgsm/modules/install_complete.sh | 16 ++- lgsm/modules/install_config.sh | 9 +- linuxgsm.sh | 3 +- 32 files changed, 99 insertions(+), 321 deletions(-) delete mode 100644 lgsm/data/ubuntu-21.04.csv delete mode 100644 lgsm/data/ubuntu-21.10.csv diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index ee8301e53..78ee5945d 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -124,7 +124,7 @@ ut2k4 ut3 ut99 vh,glibc-devel -vints,mono-complete +vints,aspnetcore-runtime-7.0 vpmc,java-17-openjdk vs wet diff --git a/lgsm/data/almalinux-9.csv b/lgsm/data/almalinux-9.csv index c7d86c6e3..b341b7282 100644 --- a/lgsm/data/almalinux-9.csv +++ b/lgsm/data/almalinux-9.csv @@ -124,7 +124,7 @@ ut2k4 ut3 ut99 vh,glibc-devel -vints,mono-complete +vints,aspnetcore-runtime-7.0 vpmc,java-17-openjdk vs wet diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index 2bd1ea57a..616e61c32 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -124,7 +124,7 @@ ut2k4 ut3 ut99 vh,glibc-devel -vints,mono-complete +vints,aspnetcore-runtime-7.0 vpmc,java-11-openjdk vs wet diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index ee8301e53..78ee5945d 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -124,7 +124,7 @@ ut2k4 ut3 ut99 vh,glibc-devel -vints,mono-complete +vints,aspnetcore-runtime-7.0 vpmc,java-17-openjdk vs wet diff --git a/lgsm/data/centos-9.csv b/lgsm/data/centos-9.csv index c7d86c6e3..b341b7282 100644 --- a/lgsm/data/centos-9.csv +++ b/lgsm/data/centos-9.csv @@ -124,7 +124,7 @@ ut2k4 ut3 ut99 vh,glibc-devel -vints,mono-complete +vints,aspnetcore-runtime-7.0 vpmc,java-17-openjdk vs wet diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index 646df8b2b..fd29e6da3 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -124,7 +124,7 @@ ut2k4 ut3 ut99 vh,libc6-dev -vints,mono-complete +vints,aspnetcore-runtime-7.0 vpmc,openjdk-11-jre vs wet diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index 8f31ec9c4..6f34e2832 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -124,7 +124,7 @@ ut2k4 ut3 ut99 vh,libc6-dev -vints,mono-complete +vints,aspnetcore-runtime-7.0 vpmc,openjdk-11-jre vs wet diff --git a/lgsm/data/debian-12.csv b/lgsm/data/debian-12.csv index 51b565a00..3738c4749 100644 --- a/lgsm/data/debian-12.csv +++ b/lgsm/data/debian-12.csv @@ -124,7 +124,7 @@ ut2k4 ut3 ut99 vh,libc6-dev -vints,mono-complete +vints,aspnetcore-runtime-7.0 vpmc,openjdk-17-jre vs wet diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index 8ff958ddd..794a54afe 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -124,7 +124,7 @@ ut2k4 ut3 ut99 vh,libc6-dev -vints,mono-complete +vints,aspnetcore-runtime-7.0 vpmc,openjdk-8-jre vs wet diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index 196651a2f..1b0b8c1bd 100644 --- a/lgsm/data/rhel-7.csv +++ b/lgsm/data/rhel-7.csv @@ -124,7 +124,7 @@ ut2k4 ut3 ut99 vh,glibc-devel -vints,mono-complete +vints,aspnetcore-runtime-7.0 vpmc,java-11-openjdk vs wet diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index ee8301e53..78ee5945d 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -124,7 +124,7 @@ ut2k4 ut3 ut99 vh,glibc-devel -vints,mono-complete +vints,aspnetcore-runtime-7.0 vpmc,java-17-openjdk vs wet diff --git a/lgsm/data/rhel-9.csv b/lgsm/data/rhel-9.csv index c7d86c6e3..b341b7282 100644 --- a/lgsm/data/rhel-9.csv +++ b/lgsm/data/rhel-9.csv @@ -124,7 +124,7 @@ ut2k4 ut3 ut99 vh,glibc-devel -vints,mono-complete +vints,aspnetcore-runtime-7.0 vpmc,java-17-openjdk vs wet diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index ee8301e53..78ee5945d 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -124,7 +124,7 @@ ut2k4 ut3 ut99 vh,glibc-devel -vints,mono-complete +vints,aspnetcore-runtime-7.0 vpmc,java-17-openjdk vs wet diff --git a/lgsm/data/rocky-9.csv b/lgsm/data/rocky-9.csv index c7d86c6e3..b341b7282 100644 --- a/lgsm/data/rocky-9.csv +++ b/lgsm/data/rocky-9.csv @@ -124,7 +124,7 @@ ut2k4 ut3 ut99 vh,glibc-devel -vints,mono-complete +vints,aspnetcore-runtime-7.0 vpmc,java-17-openjdk vs wet diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index 3e860cd1f..0fac4905f 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -124,7 +124,7 @@ ut2k4 ut3 ut99 vh,libc6-dev -vints,mono-complete +vints,aspnetcore-runtime-7.0 vpmc,openjdk-8-jre vs wet diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index 646df8b2b..fd29e6da3 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -124,7 +124,7 @@ ut2k4 ut3 ut99 vh,libc6-dev -vints,mono-complete +vints,aspnetcore-runtime-7.0 vpmc,openjdk-11-jre vs wet diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index bb026e94a..a51acccd0 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -124,7 +124,7 @@ ut2k4 ut3 ut99 vh,libc6-dev -vints,mono-complete +vints,aspnetcore-runtime-7.0 vpmc,openjdk-11-jre vs wet diff --git a/lgsm/data/ubuntu-21.04.csv b/lgsm/data/ubuntu-21.04.csv deleted file mode 100644 index 8f31ec9c4..000000000 --- a/lgsm/data/ubuntu-21.04.csv +++ /dev/null @@ -1,135 +0,0 @@ -all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils -steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd -ac -ahl -ahl2 -ark -arma3 -armar,libcurl4 -ats -av -bb -bb2,libcurl4-gnutls-dev:i386 -bd -bf1942,libncurses5:i386,libtinfo5:i386 -bfv,libncurses5:i386,libstdc++5:i386 -bmdm,libncurses5:i386 -bo -bs -bt,libicu-dev,dos2unix,libxml2-utils -btl -cc -cd -ck,xvfb,libxi6 -cmw -cod,libstdc++5:i386 -cod2,libstdc++5:i386 -cod4 -coduo,libstdc++5:i386 -codwaw -col -cs -cscz -csgo -css,libtinfo5:i386 -ct -dab -dayz -dmc -dod -dodr -dods -doi -dst,libcurl4-gnutls-dev:i386 -dys -eco,libgdiplus -em -etl -ets2 -fctr -fof -gmod,libtinfo5:i386 -hcu -hl2dm -hldm -hldms -hw,lib32z1 -ins -inss -ios -jc2 -jc3 -jk2 -kf -kf2 -l4d -l4d2 -lo -mc,openjdk-17-jre -mcb -mh -mohaa,libstdc++5:i386 -mom -mta,libncursesw5,libxml2-utils -nd -nec -nmrih,libtinfo5:i386 -ns -ns2,speex,libtbb2 -ns2c,speex:i386,libtbb2 -ohd -onset,libmariadb-dev -opfor -pc -pc2 -pmc,openjdk-17-jre -pstbs,libgconf-2-4 -pvkii -pvr,libc++1 -pz,openjdk-17-jre,rng-tools -q2 -q3 -ql -qw -ricochet -ro -rtcw -rust,lib32z1 -rw,openjdk-17-jre -samp -sb -sbots -scpsl,mono-complete -scpslsm,mono-complete -sdtd,telnet,expect,libxml2-utils -sf -sfc,libtinfo5:i386 -sof2 -sol -squad -st,libxml2-utils -stn -sven,libssl1.1:i386,zlib1g:i386 -terraria -tf2,libcurl4-gnutls-dev:i386 -tfc -ti -ts -ts3 -tu -tw -unt -ut -ut2k4 -ut3 -ut99 -vh,libc6-dev -vints,mono-complete -vpmc,openjdk-11-jre -vs -wet -wf -wmc,openjdk-17-jre -wurm,xvfb -zmr,libtinfo5:i386 -zps,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-21.10.csv b/lgsm/data/ubuntu-21.10.csv deleted file mode 100644 index 8f31ec9c4..000000000 --- a/lgsm/data/ubuntu-21.10.csv +++ /dev/null @@ -1,135 +0,0 @@ -all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils -steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd -ac -ahl -ahl2 -ark -arma3 -armar,libcurl4 -ats -av -bb -bb2,libcurl4-gnutls-dev:i386 -bd -bf1942,libncurses5:i386,libtinfo5:i386 -bfv,libncurses5:i386,libstdc++5:i386 -bmdm,libncurses5:i386 -bo -bs -bt,libicu-dev,dos2unix,libxml2-utils -btl -cc -cd -ck,xvfb,libxi6 -cmw -cod,libstdc++5:i386 -cod2,libstdc++5:i386 -cod4 -coduo,libstdc++5:i386 -codwaw -col -cs -cscz -csgo -css,libtinfo5:i386 -ct -dab -dayz -dmc -dod -dodr -dods -doi -dst,libcurl4-gnutls-dev:i386 -dys -eco,libgdiplus -em -etl -ets2 -fctr -fof -gmod,libtinfo5:i386 -hcu -hl2dm -hldm -hldms -hw,lib32z1 -ins -inss -ios -jc2 -jc3 -jk2 -kf -kf2 -l4d -l4d2 -lo -mc,openjdk-17-jre -mcb -mh -mohaa,libstdc++5:i386 -mom -mta,libncursesw5,libxml2-utils -nd -nec -nmrih,libtinfo5:i386 -ns -ns2,speex,libtbb2 -ns2c,speex:i386,libtbb2 -ohd -onset,libmariadb-dev -opfor -pc -pc2 -pmc,openjdk-17-jre -pstbs,libgconf-2-4 -pvkii -pvr,libc++1 -pz,openjdk-17-jre,rng-tools -q2 -q3 -ql -qw -ricochet -ro -rtcw -rust,lib32z1 -rw,openjdk-17-jre -samp -sb -sbots -scpsl,mono-complete -scpslsm,mono-complete -sdtd,telnet,expect,libxml2-utils -sf -sfc,libtinfo5:i386 -sof2 -sol -squad -st,libxml2-utils -stn -sven,libssl1.1:i386,zlib1g:i386 -terraria -tf2,libcurl4-gnutls-dev:i386 -tfc -ti -ts -ts3 -tu -tw -unt -ut -ut2k4 -ut3 -ut99 -vh,libc6-dev -vints,mono-complete -vpmc,openjdk-11-jre -vs -wet -wf -wmc,openjdk-17-jre -wurm,xvfb -zmr,libtinfo5:i386 -zps,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index ba801e507..7f417b463 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -124,7 +124,7 @@ ut2k4 ut3 ut99 vh,libc6-dev -vints,mono-complete +vints,aspnetcore-runtime-7.0 vpmc,openjdk-17-jre vs wet diff --git a/lgsm/data/ubuntu-23.04.csv b/lgsm/data/ubuntu-23.04.csv index ba801e507..7f417b463 100644 --- a/lgsm/data/ubuntu-23.04.csv +++ b/lgsm/data/ubuntu-23.04.csv @@ -124,7 +124,7 @@ ut2k4 ut3 ut99 vh,libc6-dev -vints,mono-complete +vints,aspnetcore-runtime-7.0 vpmc,openjdk-17-jre vs wet diff --git a/lgsm/modules/check_deps.sh b/lgsm/modules/check_deps.sh index 41334205e..2818ffc11 100644 --- a/lgsm/modules/check_deps.sh +++ b/lgsm/modules/check_deps.sh @@ -7,6 +7,19 @@ 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 + 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 + elif [ "${distroid}" == "debian" ]; then + fn_fetch_file "https://packages.microsoft.com/config/debian/${distroversion}/packages-microsoft-prod.deb" "" "" "" "/tmp" "packages-microsoft-prod.deb" "" "" "" "" + sudo dpkg -i /tmp/packages-microsoft-prod.deb + fi +} + fn_install_mono_repo() { if [ "${autodepinstall}" == "0" ]; then fn_print_information_nl "Automatically adding Mono repository." @@ -20,11 +33,11 @@ fn_install_mono_repo() { echo -en " \r" if [ "${distroid}" == "ubuntu" ]; then if [ "${distroversion}" == "22.04" ]; then - cmd="sudo apt install gnupg ca-certificates;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/ubuntu stable-jammy main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" + cmd="sudo apt-get install gnupg ca-certificates;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/ubuntu stable-jammy main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" elif [ "${distroversion}" == "20.04" ]; then - cmd="sudo apt install gnupg ca-certificates;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/ubuntu stable-focal main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" + cmd="sudo apt-get install gnupg ca-certificates;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/ubuntu stable-focal main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" elif [ "${distroversion}" == "18.04" ]; then - cmd="sudo apt install gnupg ca-certificates;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/ubuntu stable-bionic main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" + cmd="sudo apt-get install gnupg ca-certificates;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/ubuntu stable-bionic main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" elif [ "${distroversion}" == "16.04" ]; then cmd="sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;sudo apt install apt-transport-https ca-certificates;echo 'deb https://download.mono-project.com/repo/ubuntu stable-xenial main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" else @@ -32,13 +45,13 @@ fn_install_mono_repo() { fi elif [ "${distroid}" == "debian" ]; then if [ "${distroversion}" == "12" ]; then - cmd="sudo apt install apt-transport-https dirmngr gnupg ca-certificates;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/debian stable-bookworm main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" + cmd="sudo apt-get install apt-transport-https dirmngr gnupg ca-certificates;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/debian stable-bookworm main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" elif [ "${distroversion}" == "11" ]; then - cmd="sudo apt install apt-transport-https dirmngr gnupg ca-certificates;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/debian stable-bullseye main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" + cmd="sudo apt-get install apt-transport-https dirmngr gnupg ca-certificates;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/debian stable-bullseye main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" elif [ "${distroversion}" == "10" ]; then - cmd="sudo apt install apt-transport-https dirmngr gnupg ca-certificates;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/debian stable-buster main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" + cmd="sudo apt-get install apt-transport-https dirmngr gnupg ca-certificates;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/debian stable-buster main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" elif [ "${distroversion}" == "9" ]; then - cmd="sudo apt install apt-transport-https dirmngr gnupg ca-certificates;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/debian stable-stretch main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" + cmd="sudo apt-get install apt-transport-https dirmngr gnupg ca-certificates;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/debian stable-stretch main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" else monoautoinstall="1" fi @@ -135,10 +148,14 @@ fn_install_missing_deps() { fi autodepinstall="$?" - if [ "${monostatus}" == "1" ]; then + if [ "${monoinstalled}" == "false" ]; then fn_install_mono_repo fi + if [ "${dotnetinstalled}" == "false" ]; then + fn_install_dotnet_repo + fi + if [ "${commandname}" == "INSTALL" ]; then if [ "${autodepinstall}" == "0" ]; then fn_print_information_nl "$(whoami) has sudo access." @@ -254,11 +271,21 @@ fn_deps_detector() { if [ -n "${monoversion}" ] && [ "${monoversion}" -ge "5" ]; then # Mono >= 5.0.0 already installed. depstatus=0 - monostatus=0 + monoinstalled=true else # Mono not installed or installed Mono < 5.0.0. depstatus=1 - monostatus=1 + monoinstalled=false + fi + # .NET Core: A .NET Core repo needs to be installed. + elif [ "${deptocheck}" == "aspnetcore-runtime-7.0" ]; then + # .NET is not installed. + if [ -n "${dotnetversion}" ]; then + depstatus=0 + dotnetinstalled=true + else + depstatus=1 + dotnetinstalled=false fi elif [ "$(command -v apt 2> /dev/null)" ]; then dpkg-query -W -f='${Status}' "${deptocheck}" 2> /dev/null | grep -q -P '^install ok installed' diff --git a/lgsm/modules/command_dev_detect_glibc.sh b/lgsm/modules/command_dev_detect_glibc.sh index 8ff87d711..ca64ed7cc 100644 --- a/lgsm/modules/command_dev_detect_glibc.sh +++ b/lgsm/modules/command_dev_detect_glibc.sh @@ -15,7 +15,7 @@ echo -e "=================================" echo -e "glibc Requirements Checker" echo -e "=================================" -if [ ! "$(command -v objdump)" ]; then +if [ ! "$(command -v objdump 2> /dev/null)" ]; then fn_print_failure_nl "objdump is missing" fn_script_log_fatal "objdump is missing" core_exit.sh diff --git a/lgsm/modules/command_install.sh b/lgsm/modules/command_install.sh index e8cba7560..b3edd67c8 100644 --- a/lgsm/modules/command_install.sh +++ b/lgsm/modules/command_install.sh @@ -48,5 +48,6 @@ else fix.sh install_stats.sh install_complete.sh + fi core_exit.sh diff --git a/lgsm/modules/command_start.sh b/lgsm/modules/command_start.sh index 1302d0d99..963815b1b 100644 --- a/lgsm/modules/command_start.sh +++ b/lgsm/modules/command_start.sh @@ -50,9 +50,12 @@ fn_start_tmux() { # Create uid to ensure unique tmux socket name. if [ ! -f "${datadir}/${selfname}.uid" ]; then - # stop running server (if running) to prevent lingering tmux sessions. - exitbypass=1 - command_stop.sh + check_status.sh + if [ "${status}" != "0" ]; then + # stop running server (if running) to prevent lingering tmux sessions. + exitbypass=1 + command_stop.sh + fi uid=$(date '+%s' | sha1sum | head -c 8) echo "${uid}" > "${datadir}/${selfname}.uid" socketname="${sessionname}-$(cat "${datadir}/${selfname}.uid")" @@ -181,7 +184,7 @@ fn_start_tmux() { check.sh # If user ran the start command monitor will become enabled. -if [ "${firstcommandname}" == "START" ]||[ "${firstcommandname}" == "RESTART" ]; then +if [ "${firstcommandname}" == "START" ] || [ "${firstcommandname}" == "RESTART" ]; then date '+%s' > "${lockdir:?}/${selfname}-monitoring.lock" fi diff --git a/lgsm/modules/command_stop.sh b/lgsm/modules/command_stop.sh index dc716216f..409e57b14 100644 --- a/lgsm/modules/command_stop.sh +++ b/lgsm/modules/command_stop.sh @@ -256,15 +256,15 @@ fn_stop_tmux() { fn_stop_pre_check() { if [ "${status}" == "0" ]; then fn_print_info_nl "${servername} is already stopped" - fn_script_log_error "${servername} is already stopped" + fn_script_log_info "${servername} is already stopped" else # Select graceful shutdown. fn_stop_graceful_select - fi - # Check status again, a kill tmux session if graceful shutdown failed. - check_status.sh - if [ "${status}" != "0" ]; then - fn_stop_tmux + # Check status again, a kill tmux session if graceful shutdown failed. + check_status.sh + if [ "${status}" != "0" ]; then + fn_stop_tmux + fi fi } @@ -282,11 +282,10 @@ fn_stop_pre_check rm -f "${lockdir:?}/${selfname}-started.lock" # If user ran the stop command monitor will become disabled. -if [ "${firstcommandname}" == "STOP" ];then +if [ "${firstcommandname}" == "STOP" ]; then rm -f "${lockdir:?}/${selfname}-monitoring.lock" fi - # Remove stopping lockfile. rm -f "${lockdir:?}/${selfname}-stopping.lock" diff --git a/lgsm/modules/core_dl.sh b/lgsm/modules/core_dl.sh index f85499890..2a6c7c400 100644 --- a/lgsm/modules/core_dl.sh +++ b/lgsm/modules/core_dl.sh @@ -36,7 +36,7 @@ fn_dl_steamcmd() { # Unbuffer will allow the output of steamcmd not buffer allowing a smooth output. # unbuffer us part of the expect package. - if [ "$(command -v unbuffer)" ]; then + if [ "$(command -v unbuffer 2> /dev/null)" ]; then unbuffer="unbuffer" fi diff --git a/lgsm/modules/core_exit.sh b/lgsm/modules/core_exit.sh index a66744b19..6947a3d4a 100644 --- a/lgsm/modules/core_exit.sh +++ b/lgsm/modules/core_exit.sh @@ -35,7 +35,9 @@ elif [ "${exitcode}" != "0" ]; then elif [ "${exitcode}" == "3" ]; then fn_script_log_warn "${moduleselfname} exiting with code: ${exitcode}" else + # if exit code is not set assume error. fn_script_log_warn "${moduleselfname} exiting with code: ${exitcode}" + exitcode=4 fi fn_exit_dev_debug # remove trap. diff --git a/lgsm/modules/info_distro.sh b/lgsm/modules/info_distro.sh index b375f8c02..aacee2b8f 100644 --- a/lgsm/modules/info_distro.sh +++ b/lgsm/modules/info_distro.sh @@ -127,6 +127,10 @@ if [ "$(command -v mono 2> /dev/null)" ]; then monoversion="$(mono --version 2>&1 | grep -Po '(?<=version )\d')" fi +if [ "$(command -v dotnet 2> /dev/null)" ]; then + dotnetversion="$(dotnet --list-runtimes | grep -E 'Microsoft\.NETCore\.App' | awk '{print $2}')" +fi + ## Uptime uptime="$(< /proc/uptime)" uptime=${uptime/[. ]*/} diff --git a/lgsm/modules/install_complete.sh b/lgsm/modules/install_complete.sh index 58189a4be..013ba7334 100644 --- a/lgsm/modules/install_complete.sh +++ b/lgsm/modules/install_complete.sh @@ -9,7 +9,21 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" echo -e "=================================" -echo -e "Install Complete!" + +if [ "${exitcode}" == "1" ]; then + echo -e "Install Failed!" + fn_script_log_fatal "Install Failed!" +elif [ "${exitcode}" == "2" ]; then + echo -e "Install Completed with Errors!" + fn_script_log_error "Install Completed with Errors!" +elif [ "${exitcode}" == "3" ]; then + echo -e "Install Completed with Warnings!" + fn_script_log_warn "Install Completed with Warnings!" +elif [ -z "${exitcode}" ] || [ "${exitcode}" == "0" ]; then + echo -e "Install Complete!" + fn_script_log_pass "Install Complete!" +fi + fn_script_log_info "Install Complete!" echo -e "" echo -e "To start server type:" diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index e868e9bf7..9a49b821c 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -154,7 +154,7 @@ fn_list_config_locations() { elif [ -d "${servercfgfullpath}" ]; then echo -e "Game Server Config Dir: ${servercfgfullpath}" else - echo -e "Config file: ${red}${servercfgfullpath} (${red}FILE MISSING${default})" + echo -e "Config file: ${red}${servercfgfullpath}${default} (${red}FILE MISSING${default})" fi fi echo -e "LinuxGSM Config: ${lgsmdir}/config-lgsm/${gameservername}" @@ -787,11 +787,8 @@ elif [ "${shortname}" == "unt" ]; then fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "vints" ]; then - array_configs+=(serverconfig.json) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations + # Config is generated on first run + : elif [ "${shortname}" == "vs" ]; then array_configs+=(server.cfg) fn_fetch_default_config diff --git a/linuxgsm.sh b/linuxgsm.sh index 331a61822..d6b526e0e 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -36,7 +36,7 @@ tmpdir="${lgsmdir}/tmp" datadir="${lgsmdir}/data" lockdir="${lgsmdir}/lock" sessionname="${selfname}" -[ -f "${datadir}/${selfname}.uid" ] && socketname="${sessionname}-$(cat "${datadir}/${selfname}.uid")" || socketname="${sessionname}" +[ -f "${datadir}/${selfname}.uid" ] && socketname="${sessionname}-$(cat "${datadir}/${selfname}.uid")" serverlist="${datadir}/serverlist.csv" serverlistmenu="${datadir}/serverlistmenu.csv" [ -n "${LGSM_CONFIG}" ] && configdir="${LGSM_CONFIG}" || configdir="${lgsmdir}/config-lgsm" @@ -413,6 +413,7 @@ else fi fi fi + # Load the IP details before the first config is loaded. check_ip.sh # Configs have to be loaded twice to allow start startparameters to pick up all vars From ac78fc1b8fccc8e5b1d012e5fc666a9cea8b3507 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 4 Sep 2023 22:10:41 +0100 Subject: [PATCH 233/374] fix(pz): correct start parameters (#4305) * refactor: remove unnecessary memory allocation in pzserver config The startparameters variable in the pzserver configuration file was modified to remove the unnecessary memory allocation parameter. This change simplifies the configuration and improves efficiency. * refactor: simplify startparameters in pzserver config The startparameters in the pzserver config file have been simplified to only include the server name. This change removes unnecessary parameters and improves readability. --- lgsm/config-default/config-lgsm/pzserver/_default.cfg | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lgsm/config-default/config-lgsm/pzserver/_default.cfg b/lgsm/config-default/config-lgsm/pzserver/_default.cfg index b103eb772..b82f136ed 100644 --- a/lgsm/config-default/config-lgsm/pzserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pzserver/_default.cfg @@ -10,11 +10,10 @@ ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" -javaram="8192" # -Xmx$8192M adminpassword="CHANGE_ME" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="--ip ${ip} -adminpassword \"${adminpassword}\" -servername ${selfname} -Xmx${javaram}M" +startparameters="-servername ${selfname}" #### LinuxGSM Settings #### From 8a9f34321d57b101d08b2f42c9549cd39812622a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 4 Sep 2023 23:11:56 +0100 Subject: [PATCH 234/374] feat(inss): add optional gslt to start parameters --- lgsm/config-default/config-lgsm/inssserver/_default.cfg | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/inssserver/_default.cfg b/lgsm/config-default/config-lgsm/inssserver/_default.cfg index b08460b29..820058ada 100644 --- a/lgsm/config-default/config-lgsm/inssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/inssserver/_default.cfg @@ -19,9 +19,14 @@ defaultmap="Canyon" defaultscenario="Scenario_Crossing_Push_Security" maxplayers="28" +## Game Server Login Token (GSLT): Optional +# GSLT can be used for running a public server. +# More info: https://docs.linuxgsm.com/steamcmd/gslt +gslt="" + ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters ## Parameter Docs | https://mod.io/g/insurgencysandstorm/r/server-admin-guide -startparameters="${defaultmap}?Scenario=${defaultscenario}?MaxPlayers=${maxplayers} -Port=${port} -QueryPort=${queryport} -hostname='${servername}' -Rcon -RconPassword=${rconpassword} -RconListenPort=${rconport} -log" +startparameters="${defaultmap}?Scenario=${defaultscenario}?MaxPlayers=${maxplayers} -Port=${port} -QueryPort=${queryport} -hostname='${servername}' -Rcon -RconPassword=${rconpassword} -RconListenPort=${rconport} -GSLTToken=${gslt} -log" #### LinuxGSM Settings #### From 65e3a93d0dfb12720079cc77061462e933a6f5d8 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 5 Sep 2023 00:01:07 +0100 Subject: [PATCH 235/374] fix(unt): config is auto generated --- lgsm/config-default/config-lgsm/untserver/_default.cfg | 6 ++++-- lgsm/modules/install_config.sh | 7 ++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lgsm/config-default/config-lgsm/untserver/_default.cfg b/lgsm/config-default/config-lgsm/untserver/_default.cfg index a7de22b4d..f5aa19e5b 100644 --- a/lgsm/config-default/config-lgsm/untserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/untserver/_default.cfg @@ -13,14 +13,16 @@ ip="0.0.0.0" port="27015" maxplayers="20" defaultmap="PEI" - +servername="LinuxGSM" +perspective="first" # Values: first, third, vehicle, Both. +gamemode="normal" # Values: normal, easy, gold. ## Game Server Login Token (GSLT): Required # GSLT is required for running a public server. # More info: https://docs.linuxgsm.com/steamcmd/gslt gslt="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-nographics -batchmode -bind ${ip} -port ${port} -maxplayers ${maxplayers} -map ${defaultmap} -gslt ${gslt} +InternetServer/${selfname}" +startparameters="-nographics -batchmode -bind ${ip} -port ${port} -maxplayers ${maxplayers} -perspective ${perspective} -mode ${gamemode} -name ${servername} -map ${defaultmap} -gslt ${gslt} +InternetServer/${selfname}" #### LinuxGSM Settings #### diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index 9a49b821c..9dc0841d5 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -781,11 +781,8 @@ elif [ "${shortname}" == "ut99" ]; then fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "unt" ]; then - array_configs+=(Config.json) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations + # Config is generated on first run + : elif [ "${shortname}" == "vints" ]; then # Config is generated on first run : From 82e5da4b1d59ac29d8e701846355e5977fbf3e12 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 6 Sep 2023 14:27:10 +0100 Subject: [PATCH 236/374] fix(info_game): refactor key value pairs parsing split out space and equals delimited --- lgsm/modules/info_game.sh | 82 +++++++++++++++++++++++++-------------- 1 file changed, 53 insertions(+), 29 deletions(-) diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 641f5eeb1..dbce9e203 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -34,10 +34,9 @@ fn_info_game_ini() { configtype="ini" } -# Config Type: custom +# Config Type: Key Value Pairs (Equals Delimited) # Comment: ; or # -# Note: this ini filter does not filter by section. Can cause issues with some games that have multiple sections with the same variable name. -fn_info_game_keyvalue_pairs() { +fn_info_game_keyvalue_pairs_equals() { # sed is used to process the file. # -n: Suppresses automatic printing of pattern space. # /^\<'"${2}"'\>/: Matches lines starting with the word provided as the second argument ($2), considering it as a whole word. @@ -60,6 +59,31 @@ fn_info_game_keyvalue_pairs() { configtype="keyvalue_pairs" } +# Config Type: Key Value Pairs (Space Delimited) +# Comment: ; or # +fn_info_game_keyvalue_pairs_space() { + # sed is used to process the file. + # -n: Suppresses automatic printing of pattern space. + # /^\<'"${2}"'\>/: Matches lines starting with the word provided as the second argument ($2), considering it as a whole word. + # { s/.* *"\?\([^"]*\)"\?/\1/p;q }: Command block executed for lines that match the pattern. + # - s/.* *"\?\([^"]*\)"\?/\1/: Matches and captures the value after an space ( ), possibly surrounded by optional double quotes. + # - .*: Matches any characters before the space. + # - = *"\?: Matches the space and any optional spaces before an optional double quote. + # - \([^"]*\): Captures any characters that are not double quotes. + # - "\?: Matches an optional double quote. + # - /1: Replaces the entire matched pattern with the captured value. + # - p: Prints the modified line. + # - q: Quits processing after modifying and printing the line. + + if [ -n "${3}" ]; then + servercfgparse="${3}" + else + servercfgparse="${servercfgfullpath}" + fi + eval "${1}=\"$(sed -n '/^\<'"${2}"'\>/ { s/.* *\"\?\([^"]*\)\"\?/\1/p;q }' "${servercfgparse}" | tr -d '\r')\"" + configtype="keyvalue_pairs" +} + # Config Type: QuakeC # Comment: // or /* */ fn_info_game_quakec() { @@ -896,11 +920,11 @@ fn_info_game_armar() { # Filetype: con fn_info_game_bf1942() { if [ -f "${servercfgfullpath}" ]; then - fn_info_game_keyvalue_pairs "configip" "game.serverIp" - fn_info_game_keyvalue_pairs "maxplayers" "game.serverMaxPlayers" - fn_info_game_keyvalue_pairs "port" "game.serverPort" - fn_info_game_keyvalue_pairs "servername" "game.serverName" - fn_info_game_keyvalue_pairs "serverpassword" "game.serverPassword" + fn_info_game_keyvalue_pairs_space "configip" "game.serverIP" + fn_info_game_keyvalue_pairs_space "maxplayers" "game.serverMaxPlayers" + fn_info_game_keyvalue_pairs_space "port" "game.serverPort" + fn_info_game_keyvalue_pairs_space "servername" "game.serverName" + fn_info_game_keyvalue_pairs_space "serverpassword" "game.serverPassword" fi configip="${configip:-"0.0.0.0"}" maxplayers="${maxplayers:-"0"}" @@ -917,11 +941,11 @@ fn_info_game_bf1942() { # Filetype: con fn_info_game_bfv() { if [ -f "${servercfgfullpath}" ]; then - fn_info_game_keyvalue_pairs "configip" "game.serverIp" - fn_info_game_keyvalue_pairs "maxplayers" "game.serverMaxPlayers" - fn_info_game_keyvalue_pairs "port" "game.serverPort" - fn_info_game_keyvalue_pairs "servername" "game.serverName" - fn_info_game_keyvalue_pairs "serverpassword" "game.serverPassword" + fn_info_game_keyvalue_pairs_space "configip" "game.serverIp" + fn_info_game_keyvalue_pairs_space "maxplayers" "game.serverMaxPlayers" + fn_info_game_keyvalue_pairs_space "port" "game.serverPort" + fn_info_game_keyvalue_pairs_space "servername" "game.serverName" + fn_info_game_keyvalue_pairs_space "serverpassword" "game.serverPassword" fi configip="${configip:-"0.0.0.0"}" maxplayers="${maxplayers:-"0"}" @@ -1750,14 +1774,14 @@ fn_info_game_rust() { fn_info_game_rw() { if [ -f "${servercfgfullpath}" ]; then - fn_info_game_keyvalue_pairs "configip" "Server_IP" - fn_info_game_keyvalue_pairs "gamemode" "World_GameMode" - fn_info_game_keyvalue_pairs "maxplayers" "Server_MaxPlayers" - fn_info_game_keyvalue_pairs "port" "Server_Port" - fn_info_game_keyvalue_pairs "rconport" "RCON_Port" - fn_info_game_keyvalue_pairs "seed" "World_Seed" - fn_info_game_keyvalue_pairs "servername" "Server_Name" - fn_info_game_keyvalue_pairs "worldname" "World_Name" + fn_info_game_keyvalue_pairs_equals "configip" "Server_IP" + fn_info_game_keyvalue_pairs_equals "gamemode" "World_GameMode" + fn_info_game_keyvalue_pairs_equals "maxplayers" "Server_MaxPlayers" + fn_info_game_keyvalue_pairs_equals "port" "Server_Port" + fn_info_game_keyvalue_pairs_equals "rconport" "RCON_Port" + fn_info_game_keyvalue_pairs_equals "seed" "World_Seed" + fn_info_game_keyvalue_pairs_equals "servername" "Server_Name" + fn_info_game_keyvalue_pairs_equals "worldname" "World_Name" fi configip="${configip:-"0.0.0.0"}" gamemode="${gamemode:-"NOT SET"}" @@ -1994,12 +2018,12 @@ fn_info_game_spark() { # Filetype: cfg fn_info_game_squad() { if [ -f "${servercfgfullpath}" ]; then - fn_info_game_keyvalue_pairs "servername" "ServerName" - fn_info_game_keyvalue_pairs "maxplayers" "MaxPlayers" + fn_info_game_keyvalue_pairs_equals "servername" "ServerName" + fn_info_game_keyvalue_pairs_equals "maxplayers" "MaxPlayers" fi if [ -f "${servercfgdir}/Rcon.cfg" ]; then - fn_info_game_keyvalue_pairs "rconport" "Port" "${servercfgdir}/Rcon.cfg" - fn_info_game_keyvalue_pairs "rconpassword" "Password" "${servercfgdir}/Rcon.cfg" + fn_info_game_keyvalue_pairs_equals "rconport" "Port" "${servercfgdir}/Rcon.cfg" + fn_info_game_keyvalue_pairs_equals "rconpassword" "Password" "${servercfgdir}/Rcon.cfg" fi maxplayers="${maxplayers:-"0"}" port="${port:-"0"}" @@ -2017,10 +2041,10 @@ fn_info_game_squad() { # Filetype: cfg fn_info_game_terraria() { if [ -f "${servercfgfullpath}" ]; then - fn_info_game_keyvalue_pairs "maxplayers" "maxplayers" - fn_info_game_keyvalue_pairs "port" "port" - fn_info_game_keyvalue_pairs "servername" "worldname" - fn_info_game_keyvalue_pairs "worldname" "world" + fn_info_game_keyvalue_pairs_equals "maxplayers" "maxplayers" + fn_info_game_keyvalue_pairs_equals "port" "port" + fn_info_game_keyvalue_pairs_equals "servername" "worldname" + fn_info_game_keyvalue_pairs_equals "worldname" "world" fi queryport="${port:-"0"}" servername="${servername:-"NOT SET"}" From a3c5a847e511bfe81f3072f3898d1fba9701ee6e Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 6 Sep 2023 15:20:07 +0100 Subject: [PATCH 237/374] fix(start): lock file created before check Even if check fails a lock file will be generated to allow monitor to run --- lgsm/modules/command_start.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/command_start.sh b/lgsm/modules/command_start.sh index 963815b1b..b2f46855d 100644 --- a/lgsm/modules/command_start.sh +++ b/lgsm/modules/command_start.sh @@ -181,13 +181,13 @@ fn_start_tmux() { echo -en "\n" } -check.sh - # If user ran the start command monitor will become enabled. if [ "${firstcommandname}" == "START" ] || [ "${firstcommandname}" == "RESTART" ]; then date '+%s' > "${lockdir:?}/${selfname}-monitoring.lock" fi +check.sh + # If the server already started dont start again. if [ "${status}" != "0" ]; then fn_print_dots "${servername}" From 559365810774d433f6a60b214443eb3b6ec46f73 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 6 Sep 2023 15:41:39 +0100 Subject: [PATCH 238/374] fix(pvr): update executable details PVR server has changed the name if its executable --- lgsm/config-default/config-lgsm/pvrserver/_default.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/config-default/config-lgsm/pvrserver/_default.cfg b/lgsm/config-default/config-lgsm/pvrserver/_default.cfg index 53f0bdd03..22ef42b6a 100644 --- a/lgsm/config-default/config-lgsm/pvrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pvrserver/_default.cfg @@ -16,7 +16,7 @@ port="7777" defaultmap="datacenter" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="${defaultmap} -log -MultiHome=${ip} -Port=${port}" +startparameters="Pavlov ${defaultmap} -log -MultiHome=${ip} -Port=${port}" #### LinuxGSM Settings #### @@ -163,7 +163,7 @@ glibc="2.17" ## Game Server Directories systemdir="${serverfiles}/Pavlov" executabledir="${systemdir}/Binaries/Linux" -executable="./PavlovServer" +executable="./PavlovServer-Linux-Shipping" servercfgdir="${systemdir}/Saved/Config/LinuxServer" servercfg="Game.ini" servercfgdefault="Game.ini" From 89ec08c8f1f8a4be4f64a8decc28d56db043bb34 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 6 Sep 2023 16:40:34 +0100 Subject: [PATCH 239/374] fix(pvr): add fix for libc --- .../config-lgsm/pvrserver/_default.cfg | 4 +++- .../config-lgsm/untserver/_default.cfg | 1 + lgsm/modules/fix_ark.sh | 2 +- lgsm/modules/fix_arma3.sh | 2 +- lgsm/modules/fix_armar.sh | 2 +- lgsm/modules/fix_av.sh | 2 +- lgsm/modules/fix_bo.sh | 2 +- lgsm/modules/fix_bt.sh | 2 +- lgsm/modules/fix_cmw.sh | 2 +- lgsm/modules/fix_csgo.sh | 2 +- lgsm/modules/fix_dst.sh | 2 +- lgsm/modules/fix_hw.sh | 2 +- lgsm/modules/fix_ins.sh | 2 +- lgsm/modules/fix_kf.sh | 2 +- lgsm/modules/fix_kf2.sh | 2 +- lgsm/modules/fix_lo.sh | 2 +- lgsm/modules/fix_mcb.sh | 2 +- lgsm/modules/fix_mta.sh | 2 +- lgsm/modules/fix_pvr.sh | 14 ++++++++++++++ lgsm/modules/fix_ro.sh | 2 +- lgsm/modules/fix_rust.sh | 2 +- lgsm/modules/fix_rw.sh | 2 +- lgsm/modules/fix_samp.sh | 2 +- lgsm/modules/fix_sdtd.sh | 2 +- lgsm/modules/fix_sfc.sh | 2 +- lgsm/modules/fix_sof2.sh | 2 +- lgsm/modules/fix_squad.sh | 2 +- lgsm/modules/fix_st.sh | 2 +- lgsm/modules/fix_steamcmd.sh | 2 +- lgsm/modules/fix_terraria.sh | 2 +- lgsm/modules/fix_tf2.sh | 2 +- lgsm/modules/fix_ts3.sh | 2 +- lgsm/modules/fix_unt.sh | 2 +- lgsm/modules/fix_ut.sh | 2 +- lgsm/modules/fix_ut2k4.sh | 2 +- lgsm/modules/fix_ut3.sh | 2 +- lgsm/modules/fix_vh.sh | 2 +- lgsm/modules/fix_wurm.sh | 2 +- lgsm/modules/fix_zmr.sh | 2 +- 39 files changed, 54 insertions(+), 37 deletions(-) create mode 100644 lgsm/modules/fix_pvr.sh diff --git a/lgsm/config-default/config-lgsm/pvrserver/_default.cfg b/lgsm/config-default/config-lgsm/pvrserver/_default.cfg index 22ef42b6a..0a0bf8b52 100644 --- a/lgsm/config-default/config-lgsm/pvrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pvrserver/_default.cfg @@ -14,9 +14,11 @@ port="7777" # Maps: bridge, datacenter, sand defaultmap="datacenter" +# Get an API key from https://pavlov-ms.vankrupt.com/servers/v1/key +apikey="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="Pavlov ${defaultmap} -log -MultiHome=${ip} -Port=${port}" +startparameters="Pavlov ${defaultmap} -log -MultiHome=${ip} -Port=${port} ApiKey=${apikey}" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/untserver/_default.cfg b/lgsm/config-default/config-lgsm/untserver/_default.cfg index f5aa19e5b..8fc651294 100644 --- a/lgsm/config-default/config-lgsm/untserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/untserver/_default.cfg @@ -16,6 +16,7 @@ defaultmap="PEI" servername="LinuxGSM" perspective="first" # Values: first, third, vehicle, Both. gamemode="normal" # Values: normal, easy, gold. + ## Game Server Login Token (GSLT): Required # GSLT is required for running a public server. # More info: https://docs.linuxgsm.com/steamcmd/gslt diff --git a/lgsm/modules/fix_ark.sh b/lgsm/modules/fix_ark.sh index 7ca0e60f8..03e53380f 100644 --- a/lgsm/modules/fix_ark.sh +++ b/lgsm/modules/fix_ark.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Resolves various issues with ARK: Survival Evolved. +# Description: Resolves issues with ARK: Survival Evolved. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_arma3.sh b/lgsm/modules/fix_arma3.sh index d41738377..b415b81d6 100644 --- a/lgsm/modules/fix_arma3.sh +++ b/lgsm/modules/fix_arma3.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Resolves an issue with ARMA3. +# Description: Resolves issues with ARMA3. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_armar.sh b/lgsm/modules/fix_armar.sh index 2a56daf41..6b68c2a63 100755 --- a/lgsm/modules/fix_armar.sh +++ b/lgsm/modules/fix_armar.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Resolves an issue with Arma Reforger. +# Description: Resolves issues with Arma Reforger. module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_av.sh b/lgsm/modules/fix_av.sh index c8fcdcfc5..fbb259900 100644 --- a/lgsm/modules/fix_av.sh +++ b/lgsm/modules/fix_av.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Resolves startup issue with Avorion +# Description: Resolves issues with Avorion. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_bo.sh b/lgsm/modules/fix_bo.sh index 3e09a880f..24e76874e 100644 --- a/lgsm/modules/fix_bo.sh +++ b/lgsm/modules/fix_bo.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Resolves various issues with Ballistic Overkill. +# Description: Resolves issues with Ballistic Overkill. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_bt.sh b/lgsm/modules/fix_bt.sh index bb26155d8..4d837a1ba 100755 --- a/lgsm/modules/fix_bt.sh +++ b/lgsm/modules/fix_bt.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Resolves an issue with Barotrauma. +# Description: Resolves issues with Barotrauma. module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_cmw.sh b/lgsm/modules/fix_cmw.sh index 2a98d9e53..a57c6c8cb 100644 --- a/lgsm/modules/fix_cmw.sh +++ b/lgsm/modules/fix_cmw.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Resolves the issue of the not starting server on linux +# Description: Resolves issues with Chivalry: Medieval Warfare. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_csgo.sh b/lgsm/modules/fix_csgo.sh index 01b02c4e0..ea858ee3c 100644 --- a/lgsm/modules/fix_csgo.sh +++ b/lgsm/modules/fix_csgo.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Resolves various issues with CS:GO. +# Description: Resolves issues with Counter-Strike: Global Offensive. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_dst.sh b/lgsm/modules/fix_dst.sh index e1f07dcb6..ff963d342 100644 --- a/lgsm/modules/fix_dst.sh +++ b/lgsm/modules/fix_dst.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Resolves various issues with Don't Starve Together. +# Description: Resolves issues with Don't Starve Together. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_hw.sh b/lgsm/modules/fix_hw.sh index 6a92a5c04..0e70b7195 100644 --- a/lgsm/modules/fix_hw.sh +++ b/lgsm/modules/fix_hw.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Resolves various issues with Hurtworld. +# Description: Resolves issues with Hurtworld. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_ins.sh b/lgsm/modules/fix_ins.sh index 21bea123a..cc79e3685 100644 --- a/lgsm/modules/fix_ins.sh +++ b/lgsm/modules/fix_ins.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Resolves various issues with Insurgency. +# Description: Resolves issues with Insurgency. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_kf.sh b/lgsm/modules/fix_kf.sh index 3cfb8fd84..fe8b574aa 100644 --- a/lgsm/modules/fix_kf.sh +++ b/lgsm/modules/fix_kf.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Resolves various issues with Killing Floor. +# Description: Resolves issues with Killing Floor. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_kf2.sh b/lgsm/modules/fix_kf2.sh index 7be311b4f..46850bd64 100644 --- a/lgsm/modules/fix_kf2.sh +++ b/lgsm/modules/fix_kf2.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Resolves various issues with Killing Floor 2. +# Description: Resolves issues with Killing Floor 2. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_lo.sh b/lgsm/modules/fix_lo.sh index a04248867..4c3758b01 100644 --- a/lgsm/modules/fix_lo.sh +++ b/lgsm/modules/fix_lo.sh @@ -2,7 +2,7 @@ # LinuxGSM fix_lo.sh module # Author: Daniel Gibbs # Website: https://linuxgsm.com -# Description: Resolves installation issue with Last Oasis +# Description: Resolves various issues with Last Oasis. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_mcb.sh b/lgsm/modules/fix_mcb.sh index 828225e72..1e95bb4a8 100644 --- a/lgsm/modules/fix_mcb.sh +++ b/lgsm/modules/fix_mcb.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Resolves possible startup issue with Minecraft Bedrock. +# Description: Resolves various issues with Minecraft Bedrock. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_mta.sh b/lgsm/modules/fix_mta.sh index 21292d7f3..65488f2a1 100644 --- a/lgsm/modules/fix_mta.sh +++ b/lgsm/modules/fix_mta.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Installs the libmysqlclient for database functions on the server. +# Description: Resolves various issues with Multi Theft Auto. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_pvr.sh b/lgsm/modules/fix_pvr.sh new file mode 100644 index 000000000..6d8727e33 --- /dev/null +++ b/lgsm/modules/fix_pvr.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# LinuxGSM fix_pvr.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves various issues with Pavlov VR. + +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +if [ ! -f "${serverfiles}/linux64/libc++.so" ] && [ -f "/usr/lib/x86_64-linux-gnu/libc++.so.1" ]; then + cp "/usr/lib/x86_64-linux-gnu/libc++.so.1" "${serverfiles}/linux64/libc++.so" +fi + +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/linux64" diff --git a/lgsm/modules/fix_ro.sh b/lgsm/modules/fix_ro.sh index f094c6b38..6ae485dbe 100644 --- a/lgsm/modules/fix_ro.sh +++ b/lgsm/modules/fix_ro.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Resolves various issues with Red Orchestra. +# Description: Resolves issues with Red Orchestra. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_rust.sh b/lgsm/modules/fix_rust.sh index 0699a8f00..6d4cebc01 100644 --- a/lgsm/modules/fix_rust.sh +++ b/lgsm/modules/fix_rust.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Resolves startup issue with Rust. +# Description: Resolves issues with Rust. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_rw.sh b/lgsm/modules/fix_rw.sh index 2cc631122..17acf4def 100644 --- a/lgsm/modules/fix_rw.sh +++ b/lgsm/modules/fix_rw.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Resolves various issues with Rising World. +# Description: Resolves issues with Rising World. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_samp.sh b/lgsm/modules/fix_samp.sh index 146fc37af..461d92aee 100644 --- a/lgsm/modules/fix_samp.sh +++ b/lgsm/modules/fix_samp.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Resolves issue that the default rcon password is not changed +# Description: Resolves issue that the default rcon password is not changed. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_sdtd.sh b/lgsm/modules/fix_sdtd.sh index e46f7db8c..7988b0d67 100644 --- a/lgsm/modules/fix_sdtd.sh +++ b/lgsm/modules/fix_sdtd.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Resolves various issues with 7 Days to Die. +# Description: Resolves issues with 7 Days to Die. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_sfc.sh b/lgsm/modules/fix_sfc.sh index 891b71803..308f74b24 100644 --- a/lgsm/modules/fix_sfc.sh +++ b/lgsm/modules/fix_sfc.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Resolves various issues with Source Forts Classic. +# Description: Resolves issues with Source Forts Classic. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_sof2.sh b/lgsm/modules/fix_sof2.sh index 43d943cb1..4e5b13624 100644 --- a/lgsm/modules/fix_sof2.sh +++ b/lgsm/modules/fix_sof2.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Resolves various issues with Soldier of Fortune 2. +# Description: Resolves issues with Soldier of Fortune 2. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_squad.sh b/lgsm/modules/fix_squad.sh index e7162d310..2fec57f0e 100644 --- a/lgsm/modules/fix_squad.sh +++ b/lgsm/modules/fix_squad.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Resolves various issues with Squad. +# Description: Resolves issues with Squad. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_st.sh b/lgsm/modules/fix_st.sh index 44066bb37..4d100c6fc 100644 --- a/lgsm/modules/fix_st.sh +++ b/lgsm/modules/fix_st.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Resolves startup issue with Stationeers. +# Description: Resolves issues with Stationeers. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_steamcmd.sh b/lgsm/modules/fix_steamcmd.sh index 44980ab32..2a2076072 100644 --- a/lgsm/modules/fix_steamcmd.sh +++ b/lgsm/modules/fix_steamcmd.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Resolves various issues related to SteamCMD. +# Description: Resolves issues with SteamCMD. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_terraria.sh b/lgsm/modules/fix_terraria.sh index 7e5aa67e2..dc734b6fd 100644 --- a/lgsm/modules/fix_terraria.sh +++ b/lgsm/modules/fix_terraria.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Resolves an issue with Terraria. +# Description: Resolves issues with Terraria. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_tf2.sh b/lgsm/modules/fix_tf2.sh index 085542eed..fe7de8278 100644 --- a/lgsm/modules/fix_tf2.sh +++ b/lgsm/modules/fix_tf2.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Resolves various issues with Team Fortress 2. +# Description: Resolves issues with Team Fortress 2. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_ts3.sh b/lgsm/modules/fix_ts3.sh index 3d0a6760f..c655a4322 100644 --- a/lgsm/modules/fix_ts3.sh +++ b/lgsm/modules/fix_ts3.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Resolves various issues with Teamspeak 3. +# Description: Resolves issues with Teamspeak 3. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_unt.sh b/lgsm/modules/fix_unt.sh index 77253bd85..9afdce337 100644 --- a/lgsm/modules/fix_unt.sh +++ b/lgsm/modules/fix_unt.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Resolves startup issue with Unturned. +# Description: Resolves issues with Unturned. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_ut.sh b/lgsm/modules/fix_ut.sh index aa958e86d..ded65ddad 100644 --- a/lgsm/modules/fix_ut.sh +++ b/lgsm/modules/fix_ut.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Resolves various issues with Unreal Tournament. +# Description: Resolves issues with Unreal Tournament. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_ut2k4.sh b/lgsm/modules/fix_ut2k4.sh index 0a3b89b33..2f7fc0d4d 100644 --- a/lgsm/modules/fix_ut2k4.sh +++ b/lgsm/modules/fix_ut2k4.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Resolves various issues with Unreal Tournament 2004. +# Description: Resolves issues with Unreal Tournament 2004. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_ut3.sh b/lgsm/modules/fix_ut3.sh index 4958537f2..97326c786 100644 --- a/lgsm/modules/fix_ut3.sh +++ b/lgsm/modules/fix_ut3.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Resolves various issues with Unreal Tournament 3. +# Description: Resolves issues with Unreal Tournament 3. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_vh.sh b/lgsm/modules/fix_vh.sh index 984907747..831335c3c 100644 --- a/lgsm/modules/fix_vh.sh +++ b/lgsm/modules/fix_vh.sh @@ -2,7 +2,7 @@ # LinuxGSM fix_rust.sh module # Author: Alasdair Haig # Website: https://linuxgsm.com -# Description: Resolves startup issue with Valheim +# Description: Resolves issues with Valheim, moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_wurm.sh b/lgsm/modules/fix_wurm.sh index 73eaac93e..b6f5762f5 100644 --- a/lgsm/modules/fix_wurm.sh +++ b/lgsm/modules/fix_wurm.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Resolves various issues with Wurm Unlimited. +# Description: Resolves issues with Wurm Unlimited. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/fix_zmr.sh b/lgsm/modules/fix_zmr.sh index 56f055fc3..a88d82f34 100644 --- a/lgsm/modules/fix_zmr.sh +++ b/lgsm/modules/fix_zmr.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Resolves various issues with Zombie Master: Reborn. +# Description: Resolves issues with Zombie Master: Reborn. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" From 3959fa4bf46d43998fa5e34332846ee1346949d1 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 6 Sep 2023 19:22:23 +0100 Subject: [PATCH 240/374] fix(pstbs): correct gamename --- lgsm/config-default/config-lgsm/pstbsserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg index 513f9e089..d028fad57 100644 --- a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg @@ -155,7 +155,7 @@ consoleinteract="no" ## Game Server Details # Do not edit -gamename="pstbsserver" +gamename="Post Scriptum" engine="unreal4" glibc="2.17" From 20f5e8d5dcaa8cb0d80044fcd80ccf11678063c4 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 6 Sep 2023 19:27:05 +0100 Subject: [PATCH 241/374] feat(ps): Renamed pstbs to ps Post Scriptum changed is name removing "The Bloody Seventh" part. I have updated the naming of this game server. --- lgsm/data/almalinux-8.csv | 2 +- lgsm/data/almalinux-9.csv | 2 +- lgsm/data/centos-7.csv | 2 +- lgsm/data/centos-8.csv | 2 +- lgsm/data/centos-9.csv | 2 +- lgsm/data/debian-10.csv | 2 +- lgsm/data/debian-11.csv | 2 +- lgsm/data/debian-12.csv | 2 +- lgsm/data/debian-9.csv | 2 +- lgsm/data/rhel-7.csv | 2 +- lgsm/data/rhel-8.csv | 2 +- lgsm/data/rhel-9.csv | 2 +- lgsm/data/rocky-8.csv | 2 +- lgsm/data/rocky-9.csv | 2 +- lgsm/data/serverlist.csv | 2 +- lgsm/data/ubuntu-16.04.csv | 2 +- lgsm/data/ubuntu-18.04.csv | 2 +- lgsm/data/ubuntu-20.04.csv | 2 +- lgsm/data/ubuntu-22.04.csv | 2 +- lgsm/data/ubuntu-23.04.csv | 2 +- lgsm/modules/check_system_requirements.sh | 2 +- lgsm/modules/info_game.sh | 6 +++--- lgsm/modules/info_messages.sh | 6 +++--- 23 files changed, 27 insertions(+), 27 deletions(-) diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index 78ee5945d..ac4b7c36f 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -83,7 +83,7 @@ opfor pc pc2 pmc,java-17-openjdk -pstbs,GConf2 +ps,GConf2 pvkii pvr,libcxx pz,java-11-openjdk rng-tools diff --git a/lgsm/data/almalinux-9.csv b/lgsm/data/almalinux-9.csv index b341b7282..124322b62 100644 --- a/lgsm/data/almalinux-9.csv +++ b/lgsm/data/almalinux-9.csv @@ -83,7 +83,7 @@ opfor pc pc2 pmc,java-17-openjdk -pstbs,GConf2 +ps,GConf2 pvkii pvr,libcxx pz,java-11-openjdk rng-tools diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index 616e61c32..4c256491d 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -83,7 +83,7 @@ opfor pc pc2 pmc,java-11-openjdk -pstbs,GConf2 +ps,GConf2 pvkii pvr,libcxx pz,java-11-openjdk rng-tools diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index 78ee5945d..ac4b7c36f 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -83,7 +83,7 @@ opfor pc pc2 pmc,java-17-openjdk -pstbs,GConf2 +ps,GConf2 pvkii pvr,libcxx pz,java-11-openjdk rng-tools diff --git a/lgsm/data/centos-9.csv b/lgsm/data/centos-9.csv index b341b7282..124322b62 100644 --- a/lgsm/data/centos-9.csv +++ b/lgsm/data/centos-9.csv @@ -83,7 +83,7 @@ opfor pc pc2 pmc,java-17-openjdk -pstbs,GConf2 +ps,GConf2 pvkii pvr,libcxx pz,java-11-openjdk rng-tools diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index fd29e6da3..d2602643f 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -83,7 +83,7 @@ opfor pc pc2 pmc,openjdk-11-jre -pstbs,libgconf-2-4 +ps,libgconf-2-4 pvkii pvr,libc++1 pz,openjdk-11-jre,rng-tools diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index 6f34e2832..16c6e6b81 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -83,7 +83,7 @@ opfor pc pc2 pmc,openjdk-17-jre -pstbs,libgconf-2-4 +ps,libgconf-2-4 pvkii pvr,libc++1 pz,openjdk-17-jre,rng-tools diff --git a/lgsm/data/debian-12.csv b/lgsm/data/debian-12.csv index 3738c4749..04ff25b7a 100644 --- a/lgsm/data/debian-12.csv +++ b/lgsm/data/debian-12.csv @@ -83,7 +83,7 @@ opfor pc pc2 pmc,openjdk-17-jre -pstbs,libgconf-2-4 +ps,libgconf-2-4 pvkii pvr,libc++1 pz,openjdk-17-jre,rng-tools5 diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index 794a54afe..e3143955f 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -83,7 +83,7 @@ opfor pc pc2 pmc,openjdk-8-jre -pstbs,libgconf-2-4 +ps,libgconf-2-4 pvkii pvr,libc++1 pz,openjdk-8-jre,rng-tools diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index 1b0b8c1bd..ac272c917 100644 --- a/lgsm/data/rhel-7.csv +++ b/lgsm/data/rhel-7.csv @@ -83,7 +83,7 @@ opfor pc pc2 pmc,java-11-openjdk -pstbs,GConf2 +ps,GConf2 pvkii pvr,libcxx pz,java-11-openjdk rng-tools diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index 78ee5945d..ac4b7c36f 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -83,7 +83,7 @@ opfor pc pc2 pmc,java-17-openjdk -pstbs,GConf2 +ps,GConf2 pvkii pvr,libcxx pz,java-11-openjdk rng-tools diff --git a/lgsm/data/rhel-9.csv b/lgsm/data/rhel-9.csv index b341b7282..124322b62 100644 --- a/lgsm/data/rhel-9.csv +++ b/lgsm/data/rhel-9.csv @@ -83,7 +83,7 @@ opfor pc pc2 pmc,java-17-openjdk -pstbs,GConf2 +ps,GConf2 pvkii pvr,libcxx pz,java-11-openjdk rng-tools diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index 78ee5945d..ac4b7c36f 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -83,7 +83,7 @@ opfor pc pc2 pmc,java-17-openjdk -pstbs,GConf2 +ps,GConf2 pvkii pvr,libcxx pz,java-11-openjdk rng-tools diff --git a/lgsm/data/rocky-9.csv b/lgsm/data/rocky-9.csv index b341b7282..124322b62 100644 --- a/lgsm/data/rocky-9.csv +++ b/lgsm/data/rocky-9.csv @@ -83,7 +83,7 @@ opfor pc pc2 pmc,java-17-openjdk -pstbs,GConf2 +ps,GConf2 pvkii pvr,libcxx pz,java-11-openjdk rng-tools diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 8c3d7cf61..7872048c7 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -82,7 +82,7 @@ opfor,opforserver,Opposing Force,ubuntu-22.04 pc,pcserver,Project Cars,ubuntu-22.04 pc2,pc2server,Project Cars 2,ubuntu-22.04 pmc,pmcserver,PaperMC,ubuntu-22.04 -pstbs,pstbsserver,Post Scriptum: The Bloody Seventh,ubuntu-22.04 +ps,psserver,Post Scriptum,ubuntu-22.04 pvkii,pvkiiserver,Pirates Vikings & Knights II,ubuntu-22.04 pvr,pvrserver,Pavlov VR,ubuntu-22.04 pz,pzserver,Project Zomboid,ubuntu-22.04 diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index 0fac4905f..51b2d929a 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -83,7 +83,7 @@ opfor pc pc2 pmc,openjdk-8-jre -pstbs,libgconf-2-4 +ps,libgconf-2-4 pvkii pvr,libc++1 pz,openjdk-8-jre,rng-tools diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index fd29e6da3..d2602643f 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -83,7 +83,7 @@ opfor pc pc2 pmc,openjdk-11-jre -pstbs,libgconf-2-4 +ps,libgconf-2-4 pvkii pvr,libc++1 pz,openjdk-11-jre,rng-tools diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index a51acccd0..8eadea652 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -83,7 +83,7 @@ opfor pc pc2 pmc,openjdk-17-jre -pstbs,libgconf-2-4 +ps,libgconf-2-4 pvkii pvr,libc++1 pz,openjdk-17-jre,rng-tools diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index 7f417b463..463a819ae 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -83,7 +83,7 @@ opfor pc pc2 pmc,openjdk-17-jre -pstbs,libgconf-2-4 +ps,libgconf-2-4 pvkii pvr,libc++1 pz,openjdk-17-jre,rng-tools5 diff --git a/lgsm/data/ubuntu-23.04.csv b/lgsm/data/ubuntu-23.04.csv index 7f417b463..463a819ae 100644 --- a/lgsm/data/ubuntu-23.04.csv +++ b/lgsm/data/ubuntu-23.04.csv @@ -83,7 +83,7 @@ opfor pc pc2 pmc,openjdk-17-jre -pstbs,libgconf-2-4 +ps,libgconf-2-4 pvkii pvr,libc++1 pz,openjdk-17-jre,rng-tools5 diff --git a/lgsm/modules/check_system_requirements.sh b/lgsm/modules/check_system_requirements.sh index 114292f46..88fb9d15a 100644 --- a/lgsm/modules/check_system_requirements.sh +++ b/lgsm/modules/check_system_requirements.sh @@ -29,7 +29,7 @@ elif [ "${shortname}" == "rust" ]; then elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ] || [ "${shortname}" == "wmc" ]; then ramrequirementmb="1000" ramrequirementgb="1" -elif [ "${shortname}" == "pstbs" ]; then +elif [ "${shortname}" == "ps" ]; then ramrequirementmb="2000" ramrequirementgb="2" elif [ "${shortname}" == "ns2" ] || [ "${shortname}" == "ns2c" ]; then diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index dbce9e203..5c0867029 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -567,7 +567,7 @@ fn_info_game_mh() { # Comment: ; or # # Example: ServerName="SERVERNAME" # Filetype: cfg -fn_info_game_pstbs() { +fn_info_game_ps() { if [ -f "${servercfgfullpath}" ]; then fn_info_game_ini "servername" "ServerName" fn_info_game_ini "maxplayers" "MaxPlayers" @@ -2312,8 +2312,8 @@ elif [ "${shortname}" == "pc" ]; then fn_info_game_pc elif [ "${shortname}" == "pc2" ]; then fn_info_game_pc2 -elif [ "${shortname}" == "pstbs" ]; then - fn_info_game_pstbs +elif [ "${shortname}" == "ps" ]; then + fn_info_game_ps elif [ "${shortname}" == "pvr" ]; then fn_info_game_pvr elif [ "${shortname}" == "pz" ]; then diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index 22319cdbd..6d8b849c5 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -1252,7 +1252,7 @@ fn_info_message_pc2() { } | column -s $'\t' -t } -fn_info_message_pstbs() { +fn_info_message_ps() { { fn_port "header" fn_port "Game" port udp @@ -1777,8 +1777,8 @@ fn_info_message_select_engine() { fn_info_message_pc elif [ "${shortname}" == "pc2" ]; then fn_info_message_pc2 - elif [ "${shortname}" == "pstbs" ]; then - fn_info_message_pstbs + elif [ "${shortname}" == "ps" ]; then + fn_info_message_ps elif [ "${shortname}" == "pvr" ]; then fn_info_message_pvr elif [ "${shortname}" == "pz" ]; then From 8cd16acfd07378791fdb79686c78d95e6d9232d0 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 6 Sep 2023 22:01:09 +0100 Subject: [PATCH 242/374] fix: make pgrep unique - Refactored the code to use `pgrep -fcx` instead of `pgrep -fc` for checking process counts. - Updated print statements to provide more informative messages. - Renamed some variables for clarity. - Added newlines after printing information. --- lgsm/modules/command_monitor.sh | 68 ++++++++++++++++----------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/lgsm/modules/command_monitor.sh b/lgsm/modules/command_monitor.sh index c64df9fda..3c929fb20 100644 --- a/lgsm/modules/command_monitor.sh +++ b/lgsm/modules/command_monitor.sh @@ -26,69 +26,69 @@ fn_monitor_check_monitoring() { } fn_monitor_check_install() { - if [ "$(pgrep -fc -u "${USER}" "${selfname} install")" != "0" ] || [ "$(pgrep -fc -u "${USER}" "${selfname} i")" != "0" ] || [ "$(pgrep -fc -u "${USER}" "${selfname} auto-install")" != "0" ] || [ "$(pgrep -fc -u "${USER}" "${selfname} ai")" != "0" ]; then + if [ "$(pgrep -fc -u "${USER}" "/bin/bash ./${selfname} install")" != "0" ] || [ "$(pgrep -fcx -u "${USER}" "/bin/bash ./${selfname} i")" != "0" ] || [ "$(pgrep -fcx -u "${USER}" "/bin/bash ./${selfname} auto-install")" != "0" ] || [ "$(pgrep -fcx -u "${USER}" "/bin/bash ./${selfname} ai")" != "0" ]; then fn_print_dots "Checking installer: " fn_print_checking_eol fn_script_log_info "Checking installer: CHECKING" - fn_print_info "Checking installer: Installer is : " - fn_print_info_eol + fn_print_info "Checking installer: LinuxGSM is installing: " + fn_print_info_eol_nl fn_script_log_pass "Checking installer: LinuxGSM is installing" core_exit.sh fi } fn_monitor_check_debug() { - if [ "$(pgrep -fc -u "${USER}" "${selfname} debug")" != "0" ] || [ "$(pgrep -fc -u "${USER}" "${selfname} d")" != "0" ]; then + if [ "$(pgrep -fcx -u "${USER}" "/bin/bash ./${selfname} debug")" != "0" ] || [ "$(pgrep -fcx -u "${USER}" "/bin/bash ./${selfname} d")" != "0" ]; then fn_print_dots "Checking debug: " fn_print_checking_eol fn_print_info "Checking debug: Debug is running: " - fn_print_info_eol + fn_print_info_eol_nl fn_script_log_pass "Checking debug: Debug is running" core_exit.sh fi } -fn_monitor_check_starting(){ +fn_monitor_check_starting() { # Remove stale lockfile. if [ -f "${lockdir}/${selfname}-starting.lock" ]; then if [ "$(find "${lockdir}/${selfname}-starting.lock" -mmin +5)" ]; then fn_print_dots "Checking start: " fn_print_checking_eol fn_print_warn "Checking start: Removing stale lockfile: " - fn_print_warn_eol + fn_print_warn_eol_nl fn_script_log_warn "Checking start: Removing stale lockfile" rm -f "${lockdir:?}/${selfname}-starting.lock" fi fi - if [ -f "${lockdir}/${selfname}-starting.lock" ] && [[ "$(pgrep -fc -u "${USER}" "${selfname} start")" != "0" || "$(pgrep -fc -u "${USER}" "${selfname} s")" != "0" ]]; then + if [ -f "${lockdir}/${selfname}-starting.lock" ] && [[ "$(pgrep -fcx -u "${USER}" "/bin/bash ./${selfname} start")" != "0" || "$(pgrep -fcx -u "${USER}" "/bin/bash ./${selfname} s")" != "0" ]]; then fn_print_dots "Checking start: " fn_print_checking_eol fn_print_info "Checking start: LinuxGSM is starting: " - fn_print_info_eol + fn_print_info_eol_nl fn_script_log_info "Checking backup: LinuxGSM is starting" core_exit.sh fi } -fn_monitor_check_stopping(){ +fn_monitor_check_stopping() { # Remove stale lockfile. if [ -f "${lockdir}/${selfname}-stopping.lock" ]; then if [ "$(find "${lockdir}/${selfname}-stopping.lock" -mmin +5)" ]; then fn_print_dots "Checking stop: " fn_print_checking_eol fn_print_warn "Checking stop: Removing stale lockfile: " - fn_print_warn_eol + fn_print_warn_eol_nl fn_script_log_warn "Checking stop: Removing stale lockfile" rm -f "${lockdir:?}/${selfname}-stopping.lock" fi fi - if [ -f "${lockdir}/${selfname}-stopping.lock" ] && [[ "$(pgrep -fc -u "${USER}" "${selfname} stop")" != "0" || "$(pgrep -fc -u "${USER}" "${selfname} s")" != "0" ]]; then + if [ -f "${lockdir}/${selfname}-stopping.lock" ] && [[ "$(pgrep -fcx -u "${USER}" "/bin/bash ./${selfname} stop")" != "0" || "$(pgrep -fcx -u "${USER}" "/bin/bash ./${selfname} s")" != "0" ]]; then fn_print_dots "Checking stop: " fn_print_checking_eol fn_print_info "Checking stop: LinuxGSM is stopping: " - fn_print_info_eol + fn_print_info_eol_nl fn_script_log_info "Checking backup: LinuxGSM is stopping" core_exit.sh fi @@ -107,11 +107,11 @@ fn_monitor_check_backup() { fi fi - if [ -f "${lockdir}/backup.lock" ] && [[ "$(pgrep -fc -u "${USER}" "${selfname} backup")" != "0" || "$(pgrep -fc -u "${USER}" "${selfname} b")" != "0" ]]; then + if [ -f "${lockdir}/backup.lock" ] && [[ "$(pgrep -fcx -u "${USER}" "/bin/bash ./${selfname} backup")" != "0" || "$(pgrep -fcx -u "${USER}" "/bin/bash ./${selfname} b")" != "0" ]]; then fn_print_dots "Checking backup: " fn_print_checking_eol fn_print_info "Checking backup: Backup is running: " - fn_print_info_eol + fn_print_info_eol_nl fn_script_log_info "Checking backup: Backup is running" core_exit.sh fi @@ -124,38 +124,38 @@ fn_monitor_check_update() { fn_print_dots "Checking update: " fn_print_checking_eol fn_print_warn "Checking update: Removing stale lockfile: " - fn_print_warn_eol + fn_print_warn_eol_nl fn_script_log_warn "Checking update: Removing stale lockfile" rm -f "${lockdir:?}/update.lock" fi fi - if [ -f "${lockdir}/update.lock" ] && [[ "$(pgrep -fc -u "${USER}" "${selfname} update")" != "0" || "$(pgrep -fc -u "${USER}" "${selfname} validate")" != "0" || "$(pgrep -fc -u "${USER}" "${selfname} v")" != "0" || "$(pgrep -fc force-update "${USER}" "${selfname} fu")" != "0" ]]; then + if [ -f "${lockdir}/update.lock" ] && [[ "$(pgrep -fcx -u "${USER}" "/bin/bash ./${selfname} update")" != "0" || "$(pgrep -fcx -u "${USER}" "/bin/bash ./${selfname} validate")" != "0" || "$(pgrep -fcx -u "${USER}" "/bin/bash ./${selfname} v")" != "0" || "$(pgrep -fc force-update "${USER}" "/bin/bash ./${selfname} fu")" != "0" ]]; then fn_print_dots "Checking update: " fn_print_checking_eol fn_print_info "Checking update: LinuxGSM is updating the game server: " - fn_print_info_eol + fn_print_info_eol_nl fn_script_log_pass "Checking update: LinuxGSM is updating the game server" core_exit.sh fi } # Source engine games may display a messages to indicate the server needs restarting. -fn_monitor_check_update_source(){ - if [ -f "${consolelogdir}/${selfname}-console.log" ] && [ "${engine}" == "source" ]; then - if grep -q "Your server needs to be restarted in order to receive the latest update." "${consolelogdir}/${selfname}-console.log"; then - fn_print_dots "Checking update: " - fn_print_checking_eol - fn_script_log_info "Checking update: CHECKING" - fn_print_ok "Checking update: " - fn_print_ok_eol_nl - fn_script_log_info "Checking update: Monitor is restarting ${selfname} to apply update" - alert="restart" - alert.sh - command_restart.sh - core_exit.sh - fi - fi +fn_monitor_check_update_source() { + if [ -f "${consolelogdir}/${selfname}-console.log" ] && [ "${engine}" == "source" ]; then + if grep -q "Your server needs to be restarted in order to receive the latest update." "${consolelogdir}/${selfname}-console.log"; then + fn_print_dots "Checking update: " + fn_print_checking_eol + fn_script_log_info "Checking update: CHECKING" + fn_print_ok "Checking update: " + fn_print_ok_eol_nl + fn_script_log_info "Checking update: Monitor is restarting ${selfname} to apply update" + alert="restart" + alert.sh + command_restart.sh + core_exit.sh + fi + fi } fn_monitor_check_session() { @@ -166,7 +166,7 @@ fn_monitor_check_session() { sessionwidth="80" sessionheight="23" # Check for PIDS with identical tmux sessions running. - if [ "$(pgrep -fc "tmux -L ${socketname} new-session -d -x ${sessionwidth} -y ${sessionheight} -s ${sessionname}")" -ge "2" ]; then + if [ "$(pgrep -fcx "tmux -L ${socketname} new-session -d -x ${sessionwidth} -y ${sessionheight} -s ${sessionname}")" -ge "2" ]; then fn_print_error "Checking session: " fn_print_error_eol_nl fn_script_log_error "Checking session: ERROR" From ca184e32e3e0ddffae40da6bbf48637ac9a39c2d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 7 Sep 2023 21:23:31 +0100 Subject: [PATCH 243/374] fix(monitor): migration code --- lgsm/modules/command_monitor.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lgsm/modules/command_monitor.sh b/lgsm/modules/command_monitor.sh index 3c929fb20..192897bfd 100644 --- a/lgsm/modules/command_monitor.sh +++ b/lgsm/modules/command_monitor.sh @@ -12,8 +12,12 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set fn_monitor_check_monitoring() { - # Monitor does not run if lockfile is not found. - if [ ! -f "${lockdir}/${selfname}-monitoring.lock" ]; then + if [ -f "${lockdir}/${selfname}.lock" ]; then + # Part of migration to v23.5.0. #4296 + rm -f "${lockdir:?}/${selfname}.lock" + date '+%s' > "${lockdir:?}/${selfname}-monitoring.lock" + elif [ ! -f "${lockdir}/${selfname}-monitoring.lock" ]; then + # Monitor does not run if lockfile is not found. fn_print_dots "Checking lockfile: " fn_print_checking_eol fn_script_log_info "Checking lockfile: CHECKING" @@ -167,7 +171,7 @@ fn_monitor_check_session() { sessionheight="23" # Check for PIDS with identical tmux sessions running. if [ "$(pgrep -fcx "tmux -L ${socketname} new-session -d -x ${sessionwidth} -y ${sessionheight} -s ${sessionname}")" -ge "2" ]; then - fn_print_error "Checking session: " + fn_print_error "Checking session: There are PIDS with identical tmux sessions running: " fn_print_error_eol_nl fn_script_log_error "Checking session: ERROR" fn_script_log_error "Checking session: There are PIDS with identical tmux sessions running" @@ -177,7 +181,7 @@ fn_monitor_check_session() { core_exit.sh # Check for tmux pids with the same tmux session and socket names. This will reduce issues with migration to release v23.5.0. #4296 elif [ "$(pgrep -fc -u "${USER}" "tmux -L ${sessionname} new-session -d -x ${sessionwidth} -y ${sessionheight} -s ${sessionname}")" != "0" ]; then - fn_print_error "Checking session: " + fn_print_error "Checking session: PIDS with the same tmux session and socket names are running: " fn_print_error_eol_nl fn_script_log_error "Checking session: ERROR" fn_script_log_error "Checking session: PIDS with the same tmux session and socket names are running" From fe610f3ec96a17dce287129a34add47851ae04c8 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 7 Sep 2023 21:25:20 +0100 Subject: [PATCH 244/374] feat(inss): enable master server checking --- lgsm/config-default/config-lgsm/inssserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/inssserver/_default.cfg b/lgsm/config-default/config-lgsm/inssserver/_default.cfg index 820058ada..076b61ecb 100644 --- a/lgsm/config-default/config-lgsm/inssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/inssserver/_default.cfg @@ -132,7 +132,7 @@ steamcmdforcewindows="no" branch="" betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server -steammaster="false" +steammaster="true" ## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill From 16c4493d1d63817ad12dd9f7741b80dca8e975a7 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 7 Sep 2023 22:43:59 +0100 Subject: [PATCH 245/374] fix(monitor): migration code --- lgsm/modules/alert.sh | 11 +++++++++++ lgsm/modules/command_monitor.sh | 13 ++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/lgsm/modules/alert.sh b/lgsm/modules/alert.sh index c7ed897f9..03d672a66 100644 --- a/lgsm/modules/alert.sh +++ b/lgsm/modules/alert.sh @@ -72,6 +72,15 @@ fn_alert_check_update() { alertbody="${gamename} update available: ${remotebuildversion}" } +fn_alert_update_restart() { + fn_script_log_info "Sending alert: Restarted" + alertsubject="Alert - ${selfname} - Restarted" + alertemoji="🎮" + alertsound="1" + alerturl="not enabled" + alertbody="${gamename} received update: ${remotebuildversion} and required restarting" +} + fn_alert_permissions() { fn_script_log_info "Sending alert: Permissions error" alertsubject="Alert - ${selfname}: Permissions error" @@ -102,6 +111,8 @@ elif [ "${alert}" == "update" ]; then fn_alert_update elif [ "${alert}" == "check-update" ]; then fn_alert_check_update +elif [ "${alert}" == "update-restart" ]; then + fn_alert_update_restart elif [ "${alert}" == "config" ]; then fn_alert_config fi diff --git a/lgsm/modules/command_monitor.sh b/lgsm/modules/command_monitor.sh index 192897bfd..b1d9b5f6d 100644 --- a/lgsm/modules/command_monitor.sh +++ b/lgsm/modules/command_monitor.sh @@ -154,7 +154,7 @@ fn_monitor_check_update_source() { fn_print_ok "Checking update: " fn_print_ok_eol_nl fn_script_log_info "Checking update: Monitor is restarting ${selfname} to apply update" - alert="restart" + alert="update-restart" alert.sh command_restart.sh core_exit.sh @@ -177,7 +177,6 @@ fn_monitor_check_session() { fn_script_log_error "Checking session: There are PIDS with identical tmux sessions running" fn_script_log_error "Checking session: Killing all tmux sessions with the socketname name ${socketname} and session name ${sessionname}" pkill -f "tmux -L ${socketname} new-session -d -x ${sessionwidth} -y ${sessionheight} -s ${sessionname}" - command_restart.sh core_exit.sh # Check for tmux pids with the same tmux session and socket names. This will reduce issues with migration to release v23.5.0. #4296 elif [ "$(pgrep -fc -u "${USER}" "tmux -L ${sessionname} new-session -d -x ${sessionwidth} -y ${sessionheight} -s ${sessionname}")" != "0" ]; then @@ -187,7 +186,15 @@ fn_monitor_check_session() { fn_script_log_error "Checking session: PIDS with the same tmux session and socket names are running" fn_script_log_error "Checking session: Killing session with the socketname name ${sessionname} and session name ${sessionname}" pkill -f "tmux -L ${sessionname} new-session -d -x ${sessionwidth} -y ${sessionheight} -s ${sessionname}" - command_restart.sh + core_exit.sh + # Check for tmux pids that are using the old type of tmux session. This will reduce issues with migration to release v23.5.0. #4296 + elif [ "$(pgrep -fc -u "${USER}" "tmux new-session -d -x ${sessionwidth} -y ${sessionheight} -s ${sessionname}")" != "0" ]; then + fn_print_error "Checking session: PIDS with old type tmux session are running: " + fn_print_error_eol_nl + fn_script_log_error "Checking session: ERROR" + fn_script_log_error "Checking session: PIDS with old type tmux session are running" + fn_script_log_error "Checking session: Killing session with the session name ${sessionname}" + pkill -f "tmux new-session -d -x ${sessionwidth} -y ${sessionheight} -s ${sessionname}" core_exit.sh elif [ "${status}" != "0" ]; then fn_print_ok "Checking session: " From 8f714822fecdbff9907482612eec7238be73a26d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 7 Sep 2023 23:12:53 +0100 Subject: [PATCH 246/374] feat(ci): game server update checker (#4298) * refactor: shorten module update function names The commit renames the update functions for several game modules to shorter names. The new names are more concise and easier to remember, which should improve code readability and maintainability. * feat: Add Update Check workflow This commit adds a new GitHub Actions workflow that checks if LinuxGSM is picking up game server config and parameter variables. The workflow runs on push and manual triggers, with concurrency settings to cancel in-progress jobs. It downloads linuxgsm.sh, installs dependencies, grabs the server, enables developer mode, installs the server, and updates it. * feat: Add concurrency group names to workflows The `details-check.yml` and `update-check.yml` workflows now have a concurrency group name that includes the branch or tag name. This will allow for better management of concurrent workflow runs. * refactor: Update script names for Minecraft, Factorio, Jedi Knight 2 and Vintage Story This commit updates the script names for Minecraft, Factorio, Jedi Knight 2 and Vintage Story. The update includes changes to command_check_update.sh, command_update.sh, core_functions.sh and install_server_files.sh. The new script names are update_mc.sh (formerly update_minecraft.sh), update_fctr.sh (formerly update_factorio.sh), update_jk2.sh (formerly update_jediknight2.sh) and update_vints.sh (formerly update_vintagestory.sh). * feat: Add support for 32-bit architecture This commit adds support for 32-bit architecture by running the command "sudo dpkg --add-architecture i386" instead of installing libxml2-utils and jq. * feat: Add i386 architecture and install libstdc++6 This commit adds the installation of libstdc++6:i386 package to support 32-bit applications. It also includes adding the i386 architecture to dpkg. * feat: Update dependencies for LinuxGSM Changed the dependency from libstdc++6:i386 to libgcc-s1:i386 in the update-check.yml file. This change was made to ensure compatibility with newer versions of LinuxGSM. * feat: Add update and force-update server functionality This commit adds the ability to check for updates and force updates on a server. The update-check.yml file has been modified to include new jobs that run the LGSM_GITHUBBRANCH command with specific arguments. * feat: Add dependencies for server installation This commit adds the necessary dependencies to install a game server. The `update-check.yml` file has been updated to include the installation of `bsdmainutils`, `libsdl2-2.0-0:i386`, `libtinfo5:i386`, and `steamcmd`. * steamcmd only * steamcmd * test * test * refactor: improve random password generation in install_config.sh The code change refactors the random password generation in the `install_config.sh` file. Instead of using `tr -dc A-Za-z0-9_ < /dev/urandom | head -c 8 | xargs`, it now uses `tr -dc 'A-Za-z0-9_' < /dev/urandom 2>/dev/null | head -c 8 | xargs`. This change improves the reliability and security of generating random passwords. * refactor: remove redundant code and set default branch The commit refactors the code by removing redundant code that sets the branch to "public" if no custom branch is specified. This change simplifies the logic and improves readability. * test * fix: fix steamcmd build version retrieval The code changes in this commit fix an issue with retrieving the build version from SteamCMD. The previous implementation was not correctly capturing the buildid. This has been resolved by adding additional echo statements for debugging purposes. * test fix: remove unnecessary app_info_print command The commit removes the unnecessary `app_info_print` command from the code. This command was not needed to check the buildid. * fix: GitHub Actions test failure The code change fixes a failing GitHub Actions test by running SteamCMD twice. The first run is to update the app info, and the second run retrieves the build ID for the specified branch. * Add steam user and password secret for jk2 * refactor: update steamuser and steampass paths in jk2server config The code changes refactor the paths for `steamuser` and `steampass` in the configuration file of the `jk2server`. The previous paths were incorrect, so they have been updated to point to the correct location. * refactor: update steamuser and steampass insertion in LGSM configuration The code changes refactor the way steamuser and steampass are inserted into the LGSM configuration file. Instead of hardcoding the values, they are now dynamically inserted using environment variables. This improves flexibility and security when setting up the server. * refactor: simplify steamuser and steampass insertion in update-check.yml The code changes remove unnecessary sed commands and replace them with a single echo command to insert the values of STEAMCMD_USER and STEAMCMD_PASS into the common.cfg file. This simplifies the code and improves readability. * feat: update steamuser and steampass in common.cfg The commit updates the code to properly insert the `steamuser` and `steampass` values in the `common.cfg` file. The previous code was not correctly formatting the values, which caused issues with server installation. This change ensures that the values are properly formatted using double quotes for `steamuser` and single quotes for `steampass`. --- .github/workflows/details-check.yml | 2 +- .github/workflows/update-check.yml | 48 +++++++++++++++++++ lgsm/modules/command_check_update.sh | 12 ++--- lgsm/modules/command_update.sh | 12 ++--- lgsm/modules/core_functions.sh | 12 ++--- lgsm/modules/core_modules.sh | 12 ++--- lgsm/modules/core_steamcmd.sh | 12 +++-- lgsm/modules/install_config.sh | 2 +- lgsm/modules/install_server_files.sh | 14 +++--- .../{update_factorio.sh => update_fctr.sh} | 2 +- .../{update_jediknight2.sh => update_jk2.sh} | 0 .../{update_minecraft.sh => update_mc.sh} | 2 +- ...ate_minecraft_bedrock.sh => update_mcb.sh} | 2 +- .../{update_papermc.sh => update_pmc.sh} | 2 +- ...update_vintagestory.sh => update_vints.sh} | 2 +- 15 files changed, 93 insertions(+), 43 deletions(-) create mode 100644 .github/workflows/update-check.yml rename lgsm/modules/{update_factorio.sh => update_fctr.sh} (99%) rename lgsm/modules/{update_jediknight2.sh => update_jk2.sh} (100%) rename lgsm/modules/{update_minecraft.sh => update_mc.sh} (99%) rename lgsm/modules/{update_minecraft_bedrock.sh => update_mcb.sh} (99%) rename lgsm/modules/{update_papermc.sh => update_pmc.sh} (99%) rename lgsm/modules/{update_vintagestory.sh => update_vints.sh} (99%) diff --git a/.github/workflows/details-check.yml b/.github/workflows/details-check.yml index 1ce9b373b..c2e60ddf6 100644 --- a/.github/workflows/details-check.yml +++ b/.github/workflows/details-check.yml @@ -5,7 +5,7 @@ on: push: concurrency: - group: ${{ github.ref_name }} + group: details-check-${{ github.ref_name }} cancel-in-progress: true jobs: diff --git a/.github/workflows/update-check.yml b/.github/workflows/update-check.yml new file mode 100644 index 000000000..dfbc7dd58 --- /dev/null +++ b/.github/workflows/update-check.yml @@ -0,0 +1,48 @@ +name: Update Check +# This action will check that LinuxGSM is picking up game server config and parameter variables. +on: + workflow_dispatch: + push: + +concurrency: + group: update-check-${{ github.ref_name }} + cancel-in-progress: true + +jobs: + update-check: + continue-on-error: true + runs-on: ubuntu-latest + + strategy: + matrix: + shortname: [css, fctr, jk2, mc, mcb, mta, pmc, ts3, ut99, vints] + + steps: + - name: Download 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; + + - name: Grab server + run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./linuxgsm.sh ${{ matrix.shortname }}server + + - name: Enable developer mode + run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server developer + + - name: Insert steamuser + if: matrix.shortname == 'jk2' + run: echo -e "steamuser=\"${{ secrets.STEAMCMD_USER }}\"\nsteampass='${{ secrets.STEAMCMD_PASS }}'" > lgsm/config-lgsm/${{ matrix.shortname }}server/common.cfg + + - name: Install server + run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server auto-install + + - name: Check Update server + run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server check-update + + - name: Update server + run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server update + + - name: Force Update server + if: matrix.shortname == 'css' + run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server force-update diff --git a/lgsm/modules/command_check_update.sh b/lgsm/modules/command_check_update.sh index c7780c355..2e6855f7c 100644 --- a/lgsm/modules/command_check_update.sh +++ b/lgsm/modules/command_check_update.sh @@ -17,19 +17,19 @@ core_logs.sh if [ "${shortname}" == "ts3" ]; then update_ts3.sh elif [ "${shortname}" == "mc" ]; then - update_minecraft.sh + update_mc.sh elif [ "${shortname}" == "mcb" ]; then - update_minecraft_bedrock.sh + update_mcb.sh elif [ "${shortname}" == "pmc" ] || [ "${shortname}" == "vpmc" ] || [ "${shortname}" == "wmc" ]; then - update_papermc.sh + update_pmc.sh elif [ "${shortname}" == "fctr" ]; then - update_factorio.sh + update_fctr.sh elif [ "${shortname}" == "mta" ]; then update_mta.sh elif [ "${shortname}" == "jk2" ]; then - update_jediknight2.sh + update_jk2.sh elif [ "${shortname}" == "vints" ]; then - update_vintagestory.sh + update_vints.sh elif [ "${shortname}" == "ut99" ]; then update_ut99.sh else diff --git a/lgsm/modules/command_update.sh b/lgsm/modules/command_update.sh index 62221d5e6..e1fcec97f 100644 --- a/lgsm/modules/command_update.sh +++ b/lgsm/modules/command_update.sh @@ -18,19 +18,19 @@ check_last_update.sh if [ "${shortname}" == "ts3" ]; then update_ts3.sh elif [ "${shortname}" == "mc" ]; then - update_minecraft.sh + update_mc.sh elif [ "${shortname}" == "mcb" ]; then - update_minecraft_bedrock.sh + update_mcb.sh elif [ "${shortname}" == "pmc" ] || [ "${shortname}" == "vpmc" ] || [ "${shortname}" == "wmc" ]; then - update_papermc.sh + update_pmc.sh elif [ "${shortname}" == "fctr" ]; then - update_factorio.sh + update_fctr.sh elif [ "${shortname}" == "mta" ]; then update_mta.sh elif [ "${shortname}" == "jk2" ]; then - update_jediknight2.sh + update_jk2.sh elif [ "${shortname}" == "vints" ]; then - update_vintagestory.sh + update_vints.sh elif [ "${shortname}" == "ut99" ]; then update_ut99.sh else diff --git a/lgsm/modules/core_functions.sh b/lgsm/modules/core_functions.sh index 3b42e1f8f..356aa4d93 100644 --- a/lgsm/modules/core_functions.sh +++ b/lgsm/modules/core_functions.sh @@ -640,17 +640,17 @@ update_ts3.sh() { fn_fetch_function } -update_minecraft.sh() { +update_mc.sh() { functionfile="${FUNCNAME[0]}" fn_fetch_function } -update_minecraft_bedrock.sh() { +update_mcb.sh() { functionfile="${FUNCNAME[0]}" fn_fetch_function } -update_papermc.sh() { +update_pmc.sh() { functionfile="${FUNCNAME[0]}" fn_fetch_function } @@ -660,12 +660,12 @@ update_mta.sh() { fn_fetch_function } -update_factorio.sh() { +update_fctr.sh() { functionfile="${FUNCNAME[0]}" fn_fetch_function } -update_jediknight2.sh() { +update_jk2.sh() { functionfile="${FUNCNAME[0]}" fn_fetch_function } @@ -675,7 +675,7 @@ update_steamcmd.sh() { fn_fetch_function } -update_vintagestory.sh() { +update_vints.sh() { functionfile="${FUNCNAME[0]}" fn_fetch_function } diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index b191e793a..80b3463e3 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -645,17 +645,17 @@ update_ts3.sh() { fn_fetch_module } -update_minecraft.sh() { +update_mc.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -update_minecraft_bedrock.sh() { +update_mcb.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -update_papermc.sh() { +update_pmc.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } @@ -665,12 +665,12 @@ update_mta.sh() { fn_fetch_module } -update_factorio.sh() { +update_fctr.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } -update_jediknight2.sh() { +update_jk2.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } @@ -680,7 +680,7 @@ update_steamcmd.sh() { fn_fetch_module } -update_vintagestory.sh() { +update_vints.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } diff --git a/lgsm/modules/core_steamcmd.sh b/lgsm/modules/core_steamcmd.sh index 6d96a9e6c..83fc6f5c3 100644 --- a/lgsm/modules/core_steamcmd.sh +++ b/lgsm/modules/core_steamcmd.sh @@ -151,11 +151,6 @@ fn_update_steamcmd_localbuild() { # Uses appmanifest to find local build. localbuild=$(grep buildid "${appmanifestfile}" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\ -f3) - # Set branch to public if no custom branch. - if [ -z "${branch}" ]; then - branch="public" - fi - # Checks if localbuild variable has been set. if [ -z "${localbuild}" ]; then fn_print_fail "Checking local build: ${remotelocation}: missing local build info" @@ -178,6 +173,13 @@ fn_update_steamcmd_remotebuild() { find "${HOME}" -type f -name "appinfo.vdf" -exec rm -f {} \; 2> /dev/null fi + # Set branch to public if no custom branch. + if [ -z "${branch}" ]; then + branch="public" + fi + + # added as was failing GitHub Actions test. Running SteamCMD twice seems to fix it. + ${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +quit 2> /dev/null # password for branch not needed to check the buildid remotebuildversion=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed -e '/"branches"/,/^}/!d' | sed -n "/\"${branch}\"/,/}/p" | grep -m 1 buildid | tr -cd '[:digit:]') diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index 9dc0841d5..54f819aaf 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -64,7 +64,7 @@ fn_default_config_local() { # PASSWORD to random password fn_set_config_vars() { if [ -f "${servercfgfullpath}" ]; then - random=$(tr -dc A-Za-z0-9_ < /dev/urandom | head -c 8 | xargs) + random=$(tr -dc 'A-Za-z0-9_' < /dev/urandom 2>/dev/null | head -c 8 | xargs) servername="LinuxGSM" rconpass="admin${random}" echo -e "changing hostname." diff --git a/lgsm/modules/install_server_files.sh b/lgsm/modules/install_server_files.sh index 6db904992..70eb808b0 100644 --- a/lgsm/modules/install_server_files.sh +++ b/lgsm/modules/install_server_files.sh @@ -221,23 +221,23 @@ if [ "${shortname}" == "ts3" ]; then update_ts3.sh elif [ "${shortname}" == "mc" ]; then install_eula.sh - update_minecraft.sh + update_mc.sh elif [ "${shortname}" == "mcb" ]; then - update_minecraft_bedrock.sh + update_mcb.sh elif [ "${shortname}" == "pmc" ]; then install_eula.sh - update_papermc.sh + update_pmc.sh elif [ "${shortname}" == "wmc" ] || [ "${shortname}" == "vpmc" ]; then - update_papermc.sh + update_pmc.sh elif [ "${shortname}" == "mta" ]; then update_mta.sh elif [ "${shortname}" == "fctr" ]; then - update_factorio.sh + update_fctr.sh install_factorio_save.sh elif [ "${shortname}" == "jk2" ]; then - update_jediknight2.sh + update_jk2.sh elif [ "${shortname}" == "vints" ]; then - update_vintagestory.sh + update_vints.sh elif [ "${shortname}" == "ut99" ]; then fn_install_server_files update_ut99.sh diff --git a/lgsm/modules/update_factorio.sh b/lgsm/modules/update_fctr.sh similarity index 99% rename from lgsm/modules/update_factorio.sh rename to lgsm/modules/update_fctr.sh index f7fb06c7d..4cbcdbefc 100644 --- a/lgsm/modules/update_factorio.sh +++ b/lgsm/modules/update_fctr.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LinuxGSM update_factorio.sh module +# LinuxGSM update_fctr.sh module # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com diff --git a/lgsm/modules/update_jediknight2.sh b/lgsm/modules/update_jk2.sh similarity index 100% rename from lgsm/modules/update_jediknight2.sh rename to lgsm/modules/update_jk2.sh diff --git a/lgsm/modules/update_minecraft.sh b/lgsm/modules/update_mc.sh similarity index 99% rename from lgsm/modules/update_minecraft.sh rename to lgsm/modules/update_mc.sh index cfdf7e057..85e903577 100644 --- a/lgsm/modules/update_minecraft.sh +++ b/lgsm/modules/update_mc.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LinuxGSM update_minecraft.sh module +# LinuxGSM update_mc.sh module # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com diff --git a/lgsm/modules/update_minecraft_bedrock.sh b/lgsm/modules/update_mcb.sh similarity index 99% rename from lgsm/modules/update_minecraft_bedrock.sh rename to lgsm/modules/update_mcb.sh index 92bffca31..b125a3c49 100644 --- a/lgsm/modules/update_minecraft_bedrock.sh +++ b/lgsm/modules/update_mcb.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LinuxGSM update_minecraft_bedrock.sh module +# LinuxGSM update_mcb.sh module # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com diff --git a/lgsm/modules/update_papermc.sh b/lgsm/modules/update_pmc.sh similarity index 99% rename from lgsm/modules/update_papermc.sh rename to lgsm/modules/update_pmc.sh index 2438c2d86..5154bfeb9 100644 --- a/lgsm/modules/update_papermc.sh +++ b/lgsm/modules/update_pmc.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LinuxGSM update_papermc.sh module +# LinuxGSM update_pmc.sh module # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com diff --git a/lgsm/modules/update_vintagestory.sh b/lgsm/modules/update_vints.sh similarity index 99% rename from lgsm/modules/update_vintagestory.sh rename to lgsm/modules/update_vints.sh index 21e2d0e63..75755248c 100644 --- a/lgsm/modules/update_vintagestory.sh +++ b/lgsm/modules/update_vints.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LinuxGSM update_vintagestory.sh module +# LinuxGSM update_vints.sh module # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com From 22e812f75c334447679cf45fa7dab278ba6b403a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 7 Sep 2023 23:39:43 +0100 Subject: [PATCH 247/374] fix(ts3): update now works in docker --- lgsm/modules/update_ts3.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/modules/update_ts3.sh b/lgsm/modules/update_ts3.sh index b031d2b34..40b299336 100644 --- a/lgsm/modules/update_ts3.sh +++ b/lgsm/modules/update_ts3.sh @@ -18,7 +18,7 @@ fn_update_localbuild() { # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" # Uses log file to get local build. - localbuild=$(grep -Eo "TeamSpeak 3 Server ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}" "$(find ./* -name "ts3server*_0.log" 2> /dev/null | sort | tail -1)" | grep -Eo "((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}" | tail -1) + localbuild=$(grep -Eo "TeamSpeak 3 Server ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}" "$(find "${serverfiles}"/* -name "ts3server*_0.log" 2> /dev/null | sort | tail -1)" | grep -Eo "((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}" | tail -1) if [ -z "${localbuild}" ]; then fn_print_error "Checking local build: ${remotelocation}: missing local build info" fn_script_log_error "Missing local build info" From 6921851da6ef6beae05de5987d3fa1f32bd270e5 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 8 Sep 2023 08:49:25 +0100 Subject: [PATCH 248/374] feat(pvr): add fix_pvr.sh module --- lgsm/modules/command_monitor.sh | 3 +++ lgsm/modules/core_modules.sh | 5 +++++ lgsm/modules/fix.sh | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lgsm/modules/command_monitor.sh b/lgsm/modules/command_monitor.sh index b1d9b5f6d..5ce104a95 100644 --- a/lgsm/modules/command_monitor.sh +++ b/lgsm/modules/command_monitor.sh @@ -177,6 +177,7 @@ fn_monitor_check_session() { fn_script_log_error "Checking session: There are PIDS with identical tmux sessions running" fn_script_log_error "Checking session: Killing all tmux sessions with the socketname name ${socketname} and session name ${sessionname}" pkill -f "tmux -L ${socketname} new-session -d -x ${sessionwidth} -y ${sessionheight} -s ${sessionname}" + command_restart.sh core_exit.sh # Check for tmux pids with the same tmux session and socket names. This will reduce issues with migration to release v23.5.0. #4296 elif [ "$(pgrep -fc -u "${USER}" "tmux -L ${sessionname} new-session -d -x ${sessionwidth} -y ${sessionheight} -s ${sessionname}")" != "0" ]; then @@ -186,6 +187,7 @@ fn_monitor_check_session() { fn_script_log_error "Checking session: PIDS with the same tmux session and socket names are running" fn_script_log_error "Checking session: Killing session with the socketname name ${sessionname} and session name ${sessionname}" pkill -f "tmux -L ${sessionname} new-session -d -x ${sessionwidth} -y ${sessionheight} -s ${sessionname}" + command_restart.sh core_exit.sh # Check for tmux pids that are using the old type of tmux session. This will reduce issues with migration to release v23.5.0. #4296 elif [ "$(pgrep -fc -u "${USER}" "tmux new-session -d -x ${sessionwidth} -y ${sessionheight} -s ${sessionname}")" != "0" ]; then @@ -195,6 +197,7 @@ fn_monitor_check_session() { fn_script_log_error "Checking session: PIDS with old type tmux session are running" fn_script_log_error "Checking session: Killing session with the session name ${sessionname}" pkill -f "tmux new-session -d -x ${sessionwidth} -y ${sessionheight} -s ${sessionname}" + command_restart.sh core_exit.sh elif [ "${status}" != "0" ]; then fn_print_ok "Checking session: " diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index 80b3463e3..4b004dbc1 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -421,6 +421,11 @@ fix_onset.sh() { fn_fetch_module } +fix_pvr.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + fix_ro.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module diff --git a/lgsm/modules/fix.sh b/lgsm/modules/fix.sh index 322091f5a..a7f5f7378 100644 --- a/lgsm/modules/fix.sh +++ b/lgsm/modules/fix.sh @@ -52,7 +52,7 @@ fn_apply_fix() { fi } -apply_pre_start_fix=(arma3 armar ark av bt bo csgo cmw dst hw ins nmrih onset rust rw sdtd sfc sof2 squad st tf2 terraria ts3 mcb mta unt vh wurm zmr) +apply_pre_start_fix=(arma3 armar ark av bt bo csgo cmw dst hw ins nmrih onset pvr rust rw sdtd sfc sof2 squad st tf2 terraria ts3 mcb mta unt vh wurm zmr) apply_post_install_fix=(av kf kf2 lo ro samp ut2k4 ut ut3) # validate registered fixes for safe development From 9326d48684f3c679ed0ee2ecd03e3a7cfca3e0d1 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 8 Sep 2023 23:45:59 +0100 Subject: [PATCH 249/374] fix(mta): change updater to use builds (#4310) https://github.com/multitheftauto/mtasa-blue/issues/3176 --- lgsm/modules/update_mc.sh | 1 + lgsm/modules/update_mcb.sh | 2 ++ lgsm/modules/update_mta.sh | 16 ++++++++++------ lgsm/modules/update_pmc.sh | 1 + lgsm/modules/update_vints.sh | 2 +- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/lgsm/modules/update_mc.sh b/lgsm/modules/update_mc.sh index 85e903577..d65ee7563 100644 --- a/lgsm/modules/update_mc.sh +++ b/lgsm/modules/update_mc.sh @@ -11,6 +11,7 @@ fn_update_dl() { # Download and extract files to serverfiles. fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "chmodx" "norun" "noforce" "nohash" cp -f "${tmpdir}/${remotebuildfilename}" "${serverfiles}/${executable#./}" + fn_clear_tmp } fn_update_localbuild() { diff --git a/lgsm/modules/update_mcb.sh b/lgsm/modules/update_mcb.sh index b125a3c49..ceb284b39 100644 --- a/lgsm/modules/update_mcb.sh +++ b/lgsm/modules/update_mcb.sh @@ -23,10 +23,12 @@ fn_update_dl() { echo -e "${extractcmd}" >> "${lgsmlog}" fi echo -e "${extractcmd}" + fn_clear_tmp core_exit.sh else fn_print_ok_eol_nl fn_script_log_pass "Extracting ${local_filename}" + fn_clear_tmp fi } diff --git a/lgsm/modules/update_mta.sh b/lgsm/modules/update_mta.sh index eab77c748..fd728b22d 100644 --- a/lgsm/modules/update_mta.sh +++ b/lgsm/modules/update_mta.sh @@ -11,13 +11,17 @@ fn_update_dl() { # Download and extract files to tmpdir. fn_fetch_file "http://linux.mtasa.com/dl/multitheftauto_linux_x64.tar.gz" "" "" "" "${tmpdir}" "multitheftauto_linux_x64.tar.gz" "nochmodx" "norun" "force" "nohash" fn_dl_extract "${tmpdir}" "multitheftauto_linux_x64.tar.gz" "${serverfiles}" "multitheftauto_linux_x64" + fn_clear_tmp } fn_update_localbuild() { # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" - # Uses log file to get local build. - localbuild=$(grep "= Multi Theft Auto: San Andreas v" "${serverfiles}/mods/deathmatch/logs/server.log" | awk '{ print $7 }' | sed -r 's/^.{1}//' | tail -1) + # Uses executable to get local build. + if [ -d "${executabledir}" ]; then + cd "${executabledir}" || exit + localbuild=$(${executable} -v 2> /dev/null) + fi if [ -z "${localbuild}" ]; then fn_print_error "Checking local build: ${remotelocation}: missing local build info" fn_script_log_error "Missing local build info" @@ -31,11 +35,11 @@ fn_update_localbuild() { fn_update_remotebuild() { # Get remote build info. - apiurl="https://api.github.com/repos/multitheftauto/mtasa-blue/releases/latest" + apiurl="https://linux.multitheftauto.com/revision/latest.txt" remotebuildresponse=$(curl -s "${apiurl}") - remotebuildfilename=$(echo "${remotebuildresponse}" | jq -r '.assets[]|select(.browser_download_url | contains("Linux-amd64")) | .name') - remotebuildurl=$(echo "${remotebuildresponse}" | jq -r '.assets[]|select(.browser_download_url | contains("Linux-amd64")) | .browser_download_url') - remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '.tag_name') + remotebuildfilename="multitheftauto_linux_x64.tar.gz" + remotebuildurl="http://linux.mtasa.com/dl/multitheftauto_linux_x64.tar.gz" + remotebuildversion=$(echo "${remotebuildresponse}") if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" # Checks if remotebuildversion variable has been set. diff --git a/lgsm/modules/update_pmc.sh b/lgsm/modules/update_pmc.sh index 5154bfeb9..56d36a09b 100644 --- a/lgsm/modules/update_pmc.sh +++ b/lgsm/modules/update_pmc.sh @@ -12,6 +12,7 @@ fn_update_dl() { fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "chmodx" "norun" "force" "${remotebuildhash}" cp -f "${tmpdir}/${remotebuildfilename}" "${serverfiles}/${executable#./}" echo "${remotebuildversion}" > "${serverfiles}/build.txt" + fn_clear_tmp } fn_update_localbuild() { diff --git a/lgsm/modules/update_vints.sh b/lgsm/modules/update_vints.sh index 75755248c..d545a9c83 100644 --- a/lgsm/modules/update_vints.sh +++ b/lgsm/modules/update_vints.sh @@ -20,7 +20,7 @@ fn_update_localbuild() { # Uses executable to get local build. if [ -d "${executabledir}" ]; then cd "${executabledir}" || exit - localbuild="$(${preexecutable} ${executable} --version | sed '/^[[:space:]]*$/d')" + localbuild="$(${preexecutable} ${executable} --version 2> /dev/null | sed '/^[[:space:]]*$/d')" fi if [ -z "${localbuild}" ]; then fn_print_error "Checking local build: ${remotelocation}: missing local build info" From 272b5008069736972a38c9b997d7eb6021465a20 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 8 Sep 2023 23:52:03 +0100 Subject: [PATCH 250/374] Update README.md --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f710ff66d..db89b8548 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@

LinuxGSM Codacy grade - GitHub Workflow Status + GitHub Workflow Status Discord SteamCMD MIT License @@ -11,7 +11,7 @@ ## Hassle-Free Dedicated Game Servers -Traditionally game servers are not easy to manage yourself. Admins often have to spend hours messing around trying to get their server working. LinuxGSM is a command-line tool designed to be as simple as possible, allowing admins to spend less time on management and more time gaming. +Traditionally game servers are not easy to manage yourself. Admins often have to spend hours messing around trying to get their servers working. LinuxGSM is a command-line tool designed to be as simple as possible, allowing admins to spend less time on management and more time gaming. ## Main features @@ -45,12 +45,12 @@ Documentation is found at [linuxgsm.com](https://linuxgsm.com) and [docs.linuxgs ## :question: Support -There are various ways to get support, check out the [support](https://linuxgsm.com/support/) page to the right support. +There are various ways to get support, check out the [support](https://linuxgsm.com/support/) page for the right support. ## :heart: Sponsor -If you would like to [sponsor](https://linuxgsm.com/sponsor) to the project there are several ways you can, via [GitHub Sponsors](https://github.com/sponsors/dgibbs64) and [PayPal](https://www.paypal.me/dgibbs64). I would like to thank everyone who sponsors me. Since 2012 LinuxGSM has been steadily growing with new servers, features and improvements added regularly. +If you would like to [sponsor](https://linuxgsm.com/sponsor) to the project there are several ways you can, via [GitHub Sponsors](https://github.com/sponsors/dgibbs64) and [PayPal](https://www.paypal.me/dgibbs64). I would like to thank everyone who sponsors me. Since 2012 LinuxGSM has been steadily growing with new servers, features, and improvements added regularly. -## Contributors +## 🧙‍♂️ Contributors -A big thank you goes to all the wonderful people who contribute ideas, code, docs and support to this project. +A big thank you goes to all the wonderful people who contribute ideas, code, docs, and support to this project. From a4a85cfd0a481678cbbddde6f65d70f6df9d7454 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 10 Sep 2023 20:10:30 +0100 Subject: [PATCH 251/374] minor rewording --- lgsm/modules/command_install.sh | 1 - lgsm/modules/fix_vh.sh | 2 +- lgsm/modules/info_distro.sh | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lgsm/modules/command_install.sh b/lgsm/modules/command_install.sh index b3edd67c8..e8cba7560 100644 --- a/lgsm/modules/command_install.sh +++ b/lgsm/modules/command_install.sh @@ -48,6 +48,5 @@ else fix.sh install_stats.sh install_complete.sh - fi core_exit.sh diff --git a/lgsm/modules/fix_vh.sh b/lgsm/modules/fix_vh.sh index 831335c3c..c642a1a57 100644 --- a/lgsm/modules/fix_vh.sh +++ b/lgsm/modules/fix_vh.sh @@ -2,7 +2,7 @@ # LinuxGSM fix_rust.sh module # Author: Alasdair Haig # Website: https://linuxgsm.com -# Description: Resolves issues with Valheim, +# Description: Resolves issues with Valheim. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/info_distro.sh b/lgsm/modules/info_distro.sh index aacee2b8f..a5607ef45 100644 --- a/lgsm/modules/info_distro.sh +++ b/lgsm/modules/info_distro.sh @@ -73,7 +73,7 @@ for distro_info in "${distro_info_array[@]}"; do fi done -# Get virtual environment +# Get virtual environment type. if [ "$(command -v systemd-detect-virt 2> /dev/null)" ]; then virtualenvironment="$(systemd-detect-virt)" fi From 178c2163476005147f1a65ca60dcf8f7748d6a69 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 10 Sep 2023 20:11:29 +0100 Subject: [PATCH 252/374] Release v23.5.0 --- lgsm/modules/core_functions.sh | 2 +- lgsm/modules/core_modules.sh | 2 +- linuxgsm.sh | 2 +- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lgsm/modules/core_functions.sh b/lgsm/modules/core_functions.sh index 356aa4d93..e70775c34 100644 --- a/lgsm/modules/core_functions.sh +++ b/lgsm/modules/core_functions.sh @@ -8,7 +8,7 @@ module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.4.0" +modulesversion="v23.5.0" # Core diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index 4b004dbc1..29b2d39e3 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.4.0" +modulesversion="v23.5.0" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index d6b526e0e..5fce5d1c9 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.4.0" +version="v23.5.0" shortname="core" gameservername="core" commandname="CORE" diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index 463920672..50bb6b4b2 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.4.0" +version="v23.5.0" shortname="fctr" gameservername="fctrserver" commandname="CORE" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 72f3f1a22..f7b674f3d 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.4.0" +version="v23.5.0" shortname="jc2" gameservername="jc2server" commandname="CORE" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index ab94c5dc9..4f28fbb58 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.4.0" +version="v23.5.0" shortname="mc" gameservername="mcserver" commandname="CORE" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 4121bd462..5a41bf216 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.4.0" +version="v23.5.0" shortname="ts3" gameservername="ts3server" commandname="CORE" From 928de3b36f8df603afaee93dc4e3321812df7705 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 10 Sep 2023 20:17:10 +0100 Subject: [PATCH 253/374] build(deps): bump actions/checkout from 3 to 4 (#4306) Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/details-check.yml | 2 +- .github/workflows/serverlist-validate.yml | 2 +- .github/workflows/update-copyright-years-in-license-file.yml | 2 +- .github/workflows/version-check.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/details-check.yml b/.github/workflows/details-check.yml index c2e60ddf6..ca27ba5a3 100644 --- a/.github/workflows/details-check.yml +++ b/.github/workflows/details-check.yml @@ -15,7 +15,7 @@ jobs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Generate matrix with generate-matrix.sh run: chmod +x .github/workflows/detals-check-generate-matrix.sh; .github/workflows/detals-check-generate-matrix.sh diff --git a/.github/workflows/serverlist-validate.yml b/.github/workflows/serverlist-validate.yml index 39f37e1df..13f7376a1 100644 --- a/.github/workflows/serverlist-validate.yml +++ b/.github/workflows/serverlist-validate.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Compare Versions run: chmod +x .github/workflows/serverlist-validate.sh; .github/workflows/serverlist-validate.sh diff --git a/.github/workflows/update-copyright-years-in-license-file.yml b/.github/workflows/update-copyright-years-in-license-file.yml index d90ba4a5d..2d6d3eeeb 100644 --- a/.github/workflows/update-copyright-years-in-license-file.yml +++ b/.github/workflows/update-copyright-years-in-license-file.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Action Update License Year diff --git a/.github/workflows/version-check.yml b/.github/workflows/version-check.yml index cb51d4b2f..a66eaca14 100644 --- a/.github/workflows/version-check.yml +++ b/.github/workflows/version-check.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Version Check run: chmod +x .github/workflows/version-check.sh; .github/workflows/version-check.sh From 622e2869b16a4977ac3ea01767b5e98644168013 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 10 Sep 2023 21:57:32 +0100 Subject: [PATCH 254/374] fix(tw): correct game info --- lgsm/modules/info_game.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 5c0867029..77251784c 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -2060,11 +2060,11 @@ fn_info_game_terraria() { # Filetype: cfg fn_info_game_tw() { if [ -f "${servercfgfullpath}" ]; then - fn_info_game_quakec "servername" "sv_name" - fn_info_game_quakec "serverpassword" "password" - fn_info_game_quakec "rconpassword" "sv_rcon_password" - fn_info_game_quakec "port" "sv_port" - fn_info_game_quakec "maxplayers" "sv_max_clients" + fn_info_game_keyvalue_pairs_space "servername" "sv_name" + fn_info_game_keyvalue_pairs_space "serverpassword" "password" + fn_info_game_keyvalue_pairs_space "rconpassword" "sv_rcon_password" + fn_info_game_keyvalue_pairs_space "port" "sv_port" + fn_info_game_keyvalue_pairs_space "maxplayers" "sv_max_clients" fi queryport="${port}" servername="${servername:-"NOT SET"}" From a05c6a5c18b3e56aecd9deb816877e115b8bc764 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 10 Sep 2023 21:58:02 +0100 Subject: [PATCH 255/374] fix(ps): move _default.cfg to new name --- .../config-lgsm/{pstbsserver => psserver}/_default.cfg | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename lgsm/config-default/config-lgsm/{pstbsserver => psserver}/_default.cfg (100%) diff --git a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg b/lgsm/config-default/config-lgsm/psserver/_default.cfg similarity index 100% rename from lgsm/config-default/config-lgsm/pstbsserver/_default.cfg rename to lgsm/config-default/config-lgsm/psserver/_default.cfg From db3c3844845ca07a0d1d62f5d5ed7349109d07d2 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 10 Sep 2023 21:59:16 +0100 Subject: [PATCH 256/374] Release v23.5.1 --- lgsm/modules/core_functions.sh | 2 +- lgsm/modules/core_modules.sh | 2 +- linuxgsm.sh | 2 +- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lgsm/modules/core_functions.sh b/lgsm/modules/core_functions.sh index e70775c34..d77fb44d1 100644 --- a/lgsm/modules/core_functions.sh +++ b/lgsm/modules/core_functions.sh @@ -8,7 +8,7 @@ module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.5.0" +modulesversion="v23.5.1" # Core diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index 29b2d39e3..55ba617b3 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.5.0" +modulesversion="v23.5.1" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index 5fce5d1c9..30da38567 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.5.0" +version="v23.5.1" shortname="core" gameservername="core" commandname="CORE" diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index 50bb6b4b2..d5b3490ac 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.5.0" +version="v23.5.1" shortname="fctr" gameservername="fctrserver" commandname="CORE" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index f7b674f3d..c3b2523b1 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.5.0" +version="v23.5.1" shortname="jc2" gameservername="jc2server" commandname="CORE" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 4f28fbb58..6b7f0c87f 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.5.0" +version="v23.5.1" shortname="mc" gameservername="mcserver" commandname="CORE" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 5a41bf216..81ae65303 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.5.0" +version="v23.5.1" shortname="ts3" gameservername="ts3server" commandname="CORE" From 1892288a73220feb51b9e7b96afbfb199976c1a5 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 11 Sep 2023 21:42:04 +0100 Subject: [PATCH 257/374] feat: add uuid-runtime to Debian and Ubuntu CSV files This commit adds the `uuid-runtime` package to the Debian and Ubuntu CSV files. This package is required for stats. --- lgsm/data/debian-10.csv | 2 +- lgsm/data/debian-11.csv | 2 +- lgsm/data/debian-12.csv | 2 +- lgsm/data/ubuntu-16.04.csv | 2 +- lgsm/data/ubuntu-18.04.csv | 2 +- lgsm/data/ubuntu-20.04.csv | 2 +- lgsm/data/ubuntu-22.04.csv | 2 +- lgsm/data/ubuntu-23.04.csv | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index d2602643f..4b1c94518 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd ac ahl diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index 16c6e6b81..9ab997eaa 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd ac ahl diff --git a/lgsm/data/debian-12.csv b/lgsm/data/debian-12.csv index 04ff25b7a..3a5c24fbf 100644 --- a/lgsm/data/debian-12.csv +++ b/lgsm/data/debian-12.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat-traditional,python3,tar,tmux,unzip,util-linux,wget,xz-utils +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat-traditional,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd ac ahl diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index 51b2d929a..fd1cd8460 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd ac ahl diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index d2602643f..4b1c94518 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd ac ahl diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index 8eadea652..f50fb4c83 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd ac ahl diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index 463a819ae..8526a176b 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd ac ahl diff --git a/lgsm/data/ubuntu-23.04.csv b/lgsm/data/ubuntu-23.04.csv index 463a819ae..8526a176b 100644 --- a/lgsm/data/ubuntu-23.04.csv +++ b/lgsm/data/ubuntu-23.04.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd ac ahl From e4e1d72330e006e635a0f9fdf93c71420d189b28 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 11 Sep 2023 22:42:26 +0100 Subject: [PATCH 258/374] feat(docker): update datadir variable assignment The code change updates the assignment of the `datadir` variable in the `linuxgsm.sh` script. The new assignment checks if the environment variable `LGSM_DATADIR` is set and uses its value, otherwise it falls back to using `${lgsmdir}/data`. --- linuxgsm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index 30da38567..1b6b6f35a 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -33,7 +33,7 @@ steamcmddir="${HOME}/.steam/steamcmd" [ -n "${LGSM_SERVERFILES}" ] && serverfiles="${LGSM_SERVERFILES}" || serverfiles="${rootdir}/serverfiles" modulesdir="${lgsmdir}/modules" tmpdir="${lgsmdir}/tmp" -datadir="${lgsmdir}/data" +[ -n "${LGSM_DATADIR}" ] && datadir="${LGSM_DATADIR}" || datadir="${lgsmdir}/data" lockdir="${lgsmdir}/lock" sessionname="${selfname}" [ -f "${datadir}/${selfname}.uid" ] && socketname="${sessionname}-$(cat "${datadir}/${selfname}.uid")" From 1728fd943ca3560000243a7b39f7b1473fbed579 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 12 Sep 2023 21:42:42 +0100 Subject: [PATCH 259/374] Release v23.5.2 --- lgsm/modules/core_functions.sh | 2 +- lgsm/modules/core_modules.sh | 2 +- linuxgsm.sh | 2 +- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lgsm/modules/core_functions.sh b/lgsm/modules/core_functions.sh index d77fb44d1..525c45d87 100644 --- a/lgsm/modules/core_functions.sh +++ b/lgsm/modules/core_functions.sh @@ -8,7 +8,7 @@ module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.5.1" +modulesversion="v23.5.2" # Core diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index 55ba617b3..825a0a0ab 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.5.1" +modulesversion="v23.5.2" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index 1b6b6f35a..a72f6ca93 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.5.1" +version="v23.5.2" shortname="core" gameservername="core" commandname="CORE" diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index d5b3490ac..9b77dbed9 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.5.1" +version="v23.5.2" shortname="fctr" gameservername="fctrserver" commandname="CORE" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index c3b2523b1..70e23aaf7 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.5.1" +version="v23.5.2" shortname="jc2" gameservername="jc2server" commandname="CORE" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 6b7f0c87f..a49190e03 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.5.1" +version="v23.5.2" shortname="mc" gameservername="mcserver" commandname="CORE" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 81ae65303..f79fa5a5f 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.5.1" +version="v23.5.2" shortname="ts3" gameservername="ts3server" commandname="CORE" From 4f2acdd12a439e832b9f5cca47a5c3a1f0388f75 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 19 Sep 2023 16:55:16 +0100 Subject: [PATCH 260/374] refactor: minor _default.cfg changes - Updated the IP and port settings for ckserver, colserver, fctrserver, hwserver, ohdserver, rustserver, and untserver. - Added a link to the documentation for predefined parameters in ckserver and hwserver. - Modified the startparameters value in colserver to include additional parameters. - Changed the branch value in fctrserver to "stable". - Updated the servername value in hwserver and ohdserver to "LinuxGSM". - Modified the defaultmap value in hwserver to "nullius". - Removed optional comments from hwerver regarding defaultmap and creativemode values. - Updated gamemode values in rusterver and untserer with their respective options. --- lgsm/config-default/config-lgsm/ckserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/colserver/_default.cfg | 2 +- lgsm/config-default/config-lgsm/fctrserver/_default.cfg | 3 +-- lgsm/config-default/config-lgsm/hwserver/_default.cfg | 6 +++--- lgsm/config-default/config-lgsm/ohdserver/_default.cfg | 2 +- lgsm/config-default/config-lgsm/rustserver/_default.cfg | 6 +++--- lgsm/config-default/config-lgsm/untserver/_default.cfg | 4 ++-- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lgsm/config-default/config-lgsm/ckserver/_default.cfg b/lgsm/config-default/config-lgsm/ckserver/_default.cfg index ed81e4113..164fd85f9 100644 --- a/lgsm/config-default/config-lgsm/ckserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ckserver/_default.cfg @@ -8,6 +8,7 @@ #### Game Server Settings #### +## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" port="1234" diff --git a/lgsm/config-default/config-lgsm/colserver/_default.cfg b/lgsm/config-default/config-lgsm/colserver/_default.cfg index 14a0c93b2..9a88956f7 100644 --- a/lgsm/config-default/config-lgsm/colserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/colserver/_default.cfg @@ -9,7 +9,7 @@ #### Game Server Settings #### ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -# Edit with care | https://colonysurvival.gamepedia.com/Dedicated_Server#Installation_.28Linux.29 +## https://colonysurvival.gamepedia.com/Dedicated_Server#Installation_.28Linux.29 startparameters="-batchmode -nographics +server.config ${servercfgfullpath}" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/fctrserver/_default.cfg b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg index 9fe1b36ce..d35c36050 100644 --- a/lgsm/config-default/config-lgsm/fctrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg @@ -13,8 +13,7 @@ ip="0.0.0.0" port="34197" rconport="34198" rconpassword="CHANGE_ME" -# (stable|experimental) -branch="stable" +branch="stable" # values: stable, experimental ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters startparameters="--bind ${ip} --start-server ${serverfiles}/save1.zip --server-settings ${servercfgfullpath} --port ${port} --rcon-port ${rconport} --rcon-password ${rconpassword}" diff --git a/lgsm/config-default/config-lgsm/hwserver/_default.cfg b/lgsm/config-default/config-lgsm/hwserver/_default.cfg index 3bf524f16..923865478 100644 --- a/lgsm/config-default/config-lgsm/hwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hwserver/_default.cfg @@ -9,13 +9,13 @@ #### Game Server Settings #### ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters -servername="LinuxGSM Server" +servername="LinuxGSM" ip="0.0.0.0" port="12871" queryport="12881" maxplayers="20" -defaultmap="" # Optional -creativemode="0" # Free Build: creativemode="1" +defaultmap="nullius" +creativemode="0" # values: Free Build = 1, Survival = 0 ## Add admins using STEAMID64 # Example : addadmin 012345678901234567; addadmin 987654321098765432 diff --git a/lgsm/config-default/config-lgsm/ohdserver/_default.cfg b/lgsm/config-default/config-lgsm/ohdserver/_default.cfg index 651ad4f4c..afc11d09f 100644 --- a/lgsm/config-default/config-lgsm/ohdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ohdserver/_default.cfg @@ -12,7 +12,7 @@ ip="0.0.0.0" port="7777" queryport="27005" -servername="LinuxGSM Server" +servername="LinuxGSM" serverpassword="" # Maps: risala, khafji_p, lamdong, montecassino, argonne defaultmap="AAS-TestMap" diff --git a/lgsm/config-default/config-lgsm/rustserver/_default.cfg b/lgsm/config-default/config-lgsm/rustserver/_default.cfg index c40551619..a07838143 100644 --- a/lgsm/config-default/config-lgsm/rustserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rustserver/_default.cfg @@ -15,10 +15,10 @@ rconport="28016" appport="28082" queryport="28017" rconpassword="CHANGE_ME" -rconweb="1" # Value is: 1 for the Facepunch web panel, Rustadmin desktop and Rustadmin Online; 0 for RCON tools like Rusty. +rconweb="1" # values: Facepunch web panel, Rustadmin desktop and Rustadmin Online = 1, Rusty = 0. servername="Rust" -gamemode="vanilla" # Values: vanilla, softcore ( Doc: https://wiki.facepunch.com/rust/server-gamemodes ) -serverlevel="Procedural Map" # Values: Procedural Map, Barren, HapisIsland, SavasIsland +gamemode="vanilla" # values: vanilla, softcore ( Doc: https://wiki.facepunch.com/rust/server-gamemodes ) +serverlevel="Procedural Map" # values: Procedural Map, Barren, HapisIsland, SavasIsland customlevelurl="" # Custom level url. +server.levelurl \"${customlevelurl}\" seed="" # range: 1-2147483647, used to reproduce a procedural map. salt="" # range: unknown, used to recover a known setting from an existing map. diff --git a/lgsm/config-default/config-lgsm/untserver/_default.cfg b/lgsm/config-default/config-lgsm/untserver/_default.cfg index 8fc651294..fc1718967 100644 --- a/lgsm/config-default/config-lgsm/untserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/untserver/_default.cfg @@ -14,8 +14,8 @@ port="27015" maxplayers="20" defaultmap="PEI" servername="LinuxGSM" -perspective="first" # Values: first, third, vehicle, Both. -gamemode="normal" # Values: normal, easy, gold. +perspective="first" # values: first, third, vehicle, Both. +gamemode="normal" # values: normal, easy, gold. ## Game Server Login Token (GSLT): Required # GSLT is required for running a public server. From 5c33eb33c4a135fb0492918089bf930ca3c64938 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 19 Sep 2023 16:57:09 +0100 Subject: [PATCH 261/374] feat: add curl command to query Steam Master Server Add a curl command to query the Steam Master Server for server addresses. This allows retrieving server information using the GetServersAtAddress API endpoint provided by Steam. --- lgsm/modules/command_dev_query_raw.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lgsm/modules/command_dev_query_raw.sh b/lgsm/modules/command_dev_query_raw.sh index 25b174e6b..1abd6cdf3 100644 --- a/lgsm/modules/command_dev_query_raw.sh +++ b/lgsm/modules/command_dev_query_raw.sh @@ -260,6 +260,8 @@ echo -e "" echo -e "${lightgreen}Steam Master Server Response${default}" echo -e "==================================================================" echo -e "" +echo -e "curl -m 3 -s https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${publicip}" +echo -e "" echo -e "Response: ${displaymasterserver}" echo -e "" From 79dc5f7a1349eb7171885cd6463aa8c1de40eaad Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 19 Sep 2023 16:57:39 +0100 Subject: [PATCH 262/374] fix(steamcmd): hide steamcmd output --- lgsm/modules/core_steamcmd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/modules/core_steamcmd.sh b/lgsm/modules/core_steamcmd.sh index 83fc6f5c3..6a7b25c11 100644 --- a/lgsm/modules/core_steamcmd.sh +++ b/lgsm/modules/core_steamcmd.sh @@ -179,7 +179,7 @@ fn_update_steamcmd_remotebuild() { fi # added as was failing GitHub Actions test. Running SteamCMD twice seems to fix it. - ${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +quit 2> /dev/null + ${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +quit > /dev/null 2>&1 # password for branch not needed to check the buildid remotebuildversion=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed -e '/"branches"/,/^}/!d' | sed -n "/\"${branch}\"/,/}/p" | grep -m 1 buildid | tr -cd '[:digit:]') From 753eb2a99a68fb4561f544c9017315498626cdcd Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 25 Sep 2023 19:03:36 +0100 Subject: [PATCH 263/374] feat: moved last-updated.lock file moved last-updated.lock to ensure it doesn't force a reboot on monitor --- lgsm/modules/update_fctr.sh | 2 +- lgsm/modules/update_mc.sh | 2 +- lgsm/modules/update_mcb.sh | 2 +- lgsm/modules/update_pmc.sh | 2 +- lgsm/modules/update_ut99.sh | 2 +- lgsm/modules/update_vints.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lgsm/modules/update_fctr.sh b/lgsm/modules/update_fctr.sh index 4cbcdbefc..9b88fcd17 100644 --- a/lgsm/modules/update_fctr.sh +++ b/lgsm/modules/update_fctr.sh @@ -93,6 +93,7 @@ fn_update_compare() { fn_script_log_info "${localbuild} > ${remotebuildversion}" if [ "${commandname}" == "UPDATE" ]; then + date +%s > "${lockdir}/last-updated.lock" unset updateonstart check_status.sh # If server stopped. @@ -120,7 +121,6 @@ fn_update_compare() { fn_firstcommand_reset fi unset exitbypass - date +%s > "${lockdir}/last-updated.lock" alert="update" elif [ "${commandname}" == "CHECK-UPDATE" ]; then alert="check-update" diff --git a/lgsm/modules/update_mc.sh b/lgsm/modules/update_mc.sh index d65ee7563..2f7381da7 100644 --- a/lgsm/modules/update_mc.sh +++ b/lgsm/modules/update_mc.sh @@ -105,6 +105,7 @@ fn_update_compare() { fn_script_log_info "${localbuild} > ${remotebuildversion}" if [ "${commandname}" == "UPDATE" ]; then + date +%s > "${lockdir}/last-updated.lock" unset updateonstart check_status.sh # If server stopped. @@ -132,7 +133,6 @@ fn_update_compare() { fn_firstcommand_reset fi unset exitbypass - date +%s > "${lockdir}/last-updated.lock" alert="update" elif [ "${commandname}" == "CHECK-UPDATE" ]; then alert="check-update" diff --git a/lgsm/modules/update_mcb.sh b/lgsm/modules/update_mcb.sh index ceb284b39..f3a802e9e 100644 --- a/lgsm/modules/update_mcb.sh +++ b/lgsm/modules/update_mcb.sh @@ -111,6 +111,7 @@ fn_update_compare() { fn_script_log_info "${localbuild} > ${remotebuildversion}" if [ "${commandname}" == "UPDATE" ]; then + date +%s > "${lockdir}/last-updated.lock" unset updateonstart check_status.sh # If server stopped. @@ -138,7 +139,6 @@ fn_update_compare() { fn_firstcommand_reset fi unset exitbypass - date +%s > "${lockdir}/last-updated.lock" alert="update" elif [ "${commandname}" == "CHECK-UPDATE" ]; then alert="check-update" diff --git a/lgsm/modules/update_pmc.sh b/lgsm/modules/update_pmc.sh index 56d36a09b..2ad6b91ab 100644 --- a/lgsm/modules/update_pmc.sh +++ b/lgsm/modules/update_pmc.sh @@ -115,6 +115,7 @@ fn_update_compare() { fn_script_log_info "${localbuild} > ${remotebuildversion}" if [ "${commandname}" == "UPDATE" ]; then + date +%s > "${lockdir}/last-updated.lock" unset updateonstart check_status.sh # If server stopped. @@ -142,7 +143,6 @@ fn_update_compare() { fn_firstcommand_reset fi unset exitbypass - date +%s > "${lockdir}/last-updated.lock" alert="update" elif [ "${commandname}" == "CHECK-UPDATE" ]; then alert="check-update" diff --git a/lgsm/modules/update_ut99.sh b/lgsm/modules/update_ut99.sh index 1ff84a060..c1dc1dade 100644 --- a/lgsm/modules/update_ut99.sh +++ b/lgsm/modules/update_ut99.sh @@ -91,6 +91,7 @@ fn_update_compare() { fn_script_log_info "${localbuild} > ${remotebuildversion}" if [ "${commandname}" == "UPDATE" ]; then + date +%s > "${lockdir}/last-updated.lock" unset updateonstart check_status.sh # If server stopped. @@ -118,7 +119,6 @@ fn_update_compare() { fn_firstcommand_reset fi unset exitbypass - date +%s > "${lockdir}/last-updated.lock" alert="update" elif [ "${commandname}" == "CHECK-UPDATE" ]; then alert="check-update" diff --git a/lgsm/modules/update_vints.sh b/lgsm/modules/update_vints.sh index d545a9c83..47195b9b2 100644 --- a/lgsm/modules/update_vints.sh +++ b/lgsm/modules/update_vints.sh @@ -98,6 +98,7 @@ fn_update_compare() { fn_script_log_info "${localbuild} > ${remotebuildversion}" if [ "${commandname}" == "UPDATE" ]; then + date +%s > "${lockdir}/last-updated.lock" unset updateonstart check_status.sh # If server stopped. @@ -125,7 +126,6 @@ fn_update_compare() { fn_firstcommand_reset fi unset exitbypass - date +%s > "${lockdir}/last-updated.lock" alert="update" elif [ "${commandname}" == "CHECK-UPDATE" ]; then alert="check-update" From 4a02dfd382fba689e6a01fa78e33f35d278022ae Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 25 Sep 2023 20:30:40 +0100 Subject: [PATCH 264/374] fix: set $USER if missing $USER is not available in sh which is used by cron. --- lgsm/modules/core_modules.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index 825a0a0ab..c860d3eae 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -816,6 +816,11 @@ if [ ! -d "${lockdir}" ]; then mkdir -p "${lockdir}" fi +# if $USER id missing set to whoami +if [ -z "${USER}" ]; then + USER="$(whoami)" +fi + # Calls on-screen messages (bootstrap) core_messages.sh From 13c62431d01ae72eef060baabf631d27799329f4 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 26 Sep 2023 00:30:54 +0100 Subject: [PATCH 265/374] refactor: improve log file display in info_messages.sh The code change modifies the tail command in the fn_info_logs function to exclude lines containing "==>". This improves the display of log files by filtering out unnecessary information. --- lgsm/config-default/config-lgsm/pvrserver/_default.cfg | 1 - lgsm/modules/info_messages.sh | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lgsm/config-default/config-lgsm/pvrserver/_default.cfg b/lgsm/config-default/config-lgsm/pvrserver/_default.cfg index 0a0bf8b52..5063868b0 100644 --- a/lgsm/config-default/config-lgsm/pvrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pvrserver/_default.cfg @@ -11,7 +11,6 @@ ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" port="7777" - # Maps: bridge, datacenter, sand defaultmap="datacenter" # Get an API key from https://pavlov-ms.vankrupt.com/servers/v1/key diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index 6d8b849c5..a05da414f 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -762,7 +762,7 @@ fn_info_logs() { else echo -e "${gamelogdir}" # dos2unix sed 's/\r//' - tail "${gamelogdir}"/* 2> /dev/null | grep -v "==>" | sed '/^$/d' | sed 's/\r//' | tail -25 + tail "${gamelogdir}"/* 2> /dev/null | grep -av "==>" | sed '/^$/d' | sed 's/\r//' | tail -25 fi echo -e "" fi From 2297d362a3754556975d87444df7c586074198fd Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 26 Sep 2023 00:35:22 +0100 Subject: [PATCH 266/374] feat: moved last-updated.lock file --- lgsm/modules/update_ts3.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/modules/update_ts3.sh b/lgsm/modules/update_ts3.sh index 40b299336..bb137a0b3 100644 --- a/lgsm/modules/update_ts3.sh +++ b/lgsm/modules/update_ts3.sh @@ -97,6 +97,7 @@ fn_update_compare() { fn_script_log_info "${localbuild} > ${remotebuildversion}" if [ "${commandname}" == "UPDATE" ]; then + date +%s > "${lockdir}/last-updated.lock" unset updateonstart check_status.sh # If server stopped. @@ -124,7 +125,6 @@ fn_update_compare() { fn_firstcommand_reset fi unset exitbypass - date +%s > "${lockdir}/last-updated.lock" alert="update" elif [ "${commandname}" == "CHECK-UPDATE" ]; then alert="check-update" From 107d48ee01c18ceee12784d36e4772c38d4dbb41 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 26 Sep 2023 09:56:01 +0100 Subject: [PATCH 267/374] Release v23.5.3 --- lgsm/modules/core_functions.sh | 2 +- lgsm/modules/core_modules.sh | 2 +- linuxgsm.sh | 2 +- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lgsm/modules/core_functions.sh b/lgsm/modules/core_functions.sh index 525c45d87..c0195b249 100644 --- a/lgsm/modules/core_functions.sh +++ b/lgsm/modules/core_functions.sh @@ -8,7 +8,7 @@ module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.5.2" +modulesversion="v23.5.3" # Core diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index c860d3eae..d03102ef5 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.5.2" +modulesversion="v23.5.3" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index a72f6ca93..6da7de664 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.5.2" +version="v23.5.3" shortname="core" gameservername="core" commandname="CORE" diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index 9b77dbed9..a63023dc8 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.5.2" +version="v23.5.3" shortname="fctr" gameservername="fctrserver" commandname="CORE" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 70e23aaf7..b921de274 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.5.2" +version="v23.5.3" shortname="jc2" gameservername="jc2server" commandname="CORE" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index a49190e03..d173c7d68 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.5.2" +version="v23.5.3" shortname="mc" gameservername="mcserver" commandname="CORE" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index f79fa5a5f..7363a1025 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.5.2" +version="v23.5.3" shortname="ts3" gameservername="ts3server" commandname="CORE" From 099412730c923b55046c045c7a961354a1c9e604 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 1 Oct 2023 23:20:55 +0100 Subject: [PATCH 268/374] feat(alerts): deprecate mailgun (#4324) mailgun is no longer free and stats suggest it is not used at all. Removing support --- .../config-lgsm/acserver/_default.cfg | 8 ----- .../config-lgsm/ahl2server/_default.cfg | 8 ----- .../config-lgsm/ahlserver/_default.cfg | 8 ----- .../config-lgsm/arkserver/_default.cfg | 8 ----- .../config-lgsm/arma3server/_default.cfg | 8 ----- .../config-lgsm/armarserver/_default.cfg | 8 ----- .../config-lgsm/atsserver/_default.cfg | 8 ----- .../config-lgsm/avserver/_default.cfg | 8 ----- .../config-lgsm/bb2server/_default.cfg | 8 ----- .../config-lgsm/bbserver/_default.cfg | 8 ----- .../config-lgsm/bdserver/_default.cfg | 8 ----- .../config-lgsm/bf1942server/_default.cfg | 8 ----- .../config-lgsm/bfvserver/_default.cfg | 8 ----- .../config-lgsm/bmdmserver/_default.cfg | 8 ----- .../config-lgsm/boserver/_default.cfg | 8 ----- .../config-lgsm/bsserver/_default.cfg | 8 ----- .../config-lgsm/btlserver/_default.cfg | 8 ----- .../config-lgsm/btserver/_default.cfg | 8 ----- .../config-lgsm/ccserver/_default.cfg | 8 ----- .../config-lgsm/cdserver/_default.cfg | 8 ----- .../config-lgsm/ckserver/_default.cfg | 8 ----- .../config-lgsm/cmwserver/_default.cfg | 8 ----- .../config-lgsm/cod2server/_default.cfg | 8 ----- .../config-lgsm/cod4server/_default.cfg | 8 ----- .../config-lgsm/codserver/_default.cfg | 8 ----- .../config-lgsm/coduoserver/_default.cfg | 8 ----- .../config-lgsm/codwawserver/_default.cfg | 8 ----- .../config-lgsm/colserver/_default.cfg | 8 ----- .../config-lgsm/csczserver/_default.cfg | 8 ----- .../config-lgsm/csgoserver/_default.cfg | 8 ----- .../config-lgsm/csserver/_default.cfg | 8 ----- .../config-lgsm/cssserver/_default.cfg | 8 ----- .../config-lgsm/ctserver/_default.cfg | 8 ----- .../config-lgsm/dabserver/_default.cfg | 8 ----- .../config-lgsm/dayzserver/_default.cfg | 8 ----- .../config-lgsm/dmcserver/_default.cfg | 8 ----- .../config-lgsm/dodrserver/_default.cfg | 8 ----- .../config-lgsm/dodserver/_default.cfg | 8 ----- .../config-lgsm/dodsserver/_default.cfg | 8 ----- .../config-lgsm/doiserver/_default.cfg | 8 ----- .../config-lgsm/dstserver/_default.cfg | 8 ----- .../config-lgsm/dysserver/_default.cfg | 8 ----- .../config-lgsm/ecoserver/_default.cfg | 8 ----- .../config-lgsm/emserver/_default.cfg | 8 ----- .../config-lgsm/etlserver/_default.cfg | 8 ----- .../config-lgsm/ets2server/_default.cfg | 8 ----- .../config-lgsm/fctrserver/_default.cfg | 8 ----- .../config-lgsm/fofserver/_default.cfg | 8 ----- .../config-lgsm/gmodserver/_default.cfg | 8 ----- .../config-lgsm/hcuserver/_default.cfg | 8 ----- .../config-lgsm/hl2dmserver/_default.cfg | 8 ----- .../config-lgsm/hldmserver/_default.cfg | 8 ----- .../config-lgsm/hldmsserver/_default.cfg | 8 ----- .../config-lgsm/hwserver/_default.cfg | 8 ----- .../config-lgsm/insserver/_default.cfg | 8 ----- .../config-lgsm/inssserver/_default.cfg | 8 ----- .../config-lgsm/iosserver/_default.cfg | 8 ----- .../config-lgsm/jc2server/_default.cfg | 8 ----- .../config-lgsm/jc3server/_default.cfg | 8 ----- .../config-lgsm/jk2server/_default.cfg | 8 ----- .../config-lgsm/kf2server/_default.cfg | 8 ----- .../config-lgsm/kfserver/_default.cfg | 8 ----- .../config-lgsm/l4d2server/_default.cfg | 8 ----- .../config-lgsm/l4dserver/_default.cfg | 8 ----- .../config-lgsm/loserver/_default.cfg | 8 ----- .../config-lgsm/mcbserver/_default.cfg | 8 ----- .../config-lgsm/mcserver/_default.cfg | 8 ----- .../config-lgsm/mhserver/_default.cfg | 8 ----- .../config-lgsm/mohaaserver/_default.cfg | 8 ----- .../config-lgsm/momserver/_default.cfg | 8 ----- .../config-lgsm/mtaserver/_default.cfg | 8 ----- .../config-lgsm/ndserver/_default.cfg | 8 ----- .../config-lgsm/necserver/_default.cfg | 8 ----- .../config-lgsm/nmrihserver/_default.cfg | 8 ----- .../config-lgsm/ns2cserver/_default.cfg | 8 ----- .../config-lgsm/ns2server/_default.cfg | 8 ----- .../config-lgsm/nsserver/_default.cfg | 8 ----- .../config-lgsm/ohdserver/_default.cfg | 8 ----- .../config-lgsm/onsetserver/_default.cfg | 8 ----- .../config-lgsm/opforserver/_default.cfg | 8 ----- .../config-lgsm/pc2server/_default.cfg | 8 ----- .../config-lgsm/pcserver/_default.cfg | 8 ----- .../config-lgsm/pmcserver/_default.cfg | 8 ----- .../config-lgsm/psserver/_default.cfg | 8 ----- .../config-lgsm/pvkiiserver/_default.cfg | 8 ----- .../config-lgsm/pvrserver/_default.cfg | 8 ----- .../config-lgsm/pzserver/_default.cfg | 8 ----- .../config-lgsm/q2server/_default.cfg | 8 ----- .../config-lgsm/q3server/_default.cfg | 8 ----- .../config-lgsm/qlserver/_default.cfg | 8 ----- .../config-lgsm/qwserver/_default.cfg | 8 ----- .../config-lgsm/ricochetserver/_default.cfg | 8 ----- .../config-lgsm/roserver/_default.cfg | 8 ----- .../config-lgsm/rtcwserver/_default.cfg | 8 ----- .../config-lgsm/rustserver/_default.cfg | 8 ----- .../config-lgsm/rwserver/_default.cfg | 8 ----- .../config-lgsm/sampserver/_default.cfg | 8 ----- .../config-lgsm/sbotsserver/_default.cfg | 8 ----- .../config-lgsm/sbserver/_default.cfg | 8 ----- .../config-lgsm/scpslserver/_default.cfg | 8 ----- .../config-lgsm/scpslsmserver/_default.cfg | 8 ----- .../config-lgsm/sdtdserver/_default.cfg | 8 ----- .../config-lgsm/sfcserver/_default.cfg | 8 ----- .../config-lgsm/sfserver/_default.cfg | 8 ----- .../config-lgsm/sof2server/_default.cfg | 8 ----- .../config-lgsm/solserver/_default.cfg | 8 ----- .../config-lgsm/squadserver/_default.cfg | 8 ----- .../config-lgsm/stnserver/_default.cfg | 8 ----- .../config-lgsm/stserver/_default.cfg | 8 ----- .../config-lgsm/svenserver/_default.cfg | 8 ----- .../config-lgsm/terrariaserver/_default.cfg | 8 ----- .../config-lgsm/tf2server/_default.cfg | 8 ----- .../config-lgsm/tfcserver/_default.cfg | 8 ----- .../config-lgsm/tiserver/_default.cfg | 8 ----- .../config-lgsm/ts3server/_default.cfg | 8 ----- .../config-lgsm/tsserver/_default.cfg | 8 ----- .../config-lgsm/tuserver/_default.cfg | 8 ----- .../config-lgsm/twserver/_default.cfg | 8 ----- .../config-lgsm/untserver/_default.cfg | 8 ----- .../config-lgsm/ut2k4server/_default.cfg | 8 ----- .../config-lgsm/ut3server/_default.cfg | 8 ----- .../config-lgsm/ut99server/_default.cfg | 8 ----- .../config-lgsm/utserver/_default.cfg | 8 ----- .../config-lgsm/vhserver/_default.cfg | 8 ----- .../config-lgsm/vintsserver/_default.cfg | 8 ----- .../config-lgsm/vpmcserver/_default.cfg | 8 ----- .../config-lgsm/vsserver/_default.cfg | 8 ----- .../config-lgsm/wetserver/_default.cfg | 8 ----- .../config-lgsm/wfserver/_default.cfg | 8 ----- .../config-lgsm/wmcserver/_default.cfg | 8 ----- .../config-lgsm/wurmserver/_default.cfg | 8 ----- .../config-lgsm/zmrserver/_default.cfg | 8 ----- .../config-lgsm/zpsserver/_default.cfg | 8 ----- lgsm/modules/alert.sh | 11 ------- lgsm/modules/alert_mailgun.sh | 32 ------------------- lgsm/modules/core_functions.sh | 5 --- lgsm/modules/core_modules.sh | 5 --- lgsm/modules/info_stats.sh | 9 ++---- tests/tests_defaultcfg/defaultcfg_1.txt | 1 - 139 files changed, 2 insertions(+), 1125 deletions(-) delete mode 100644 lgsm/modules/alert_mailgun.sh diff --git a/lgsm/config-default/config-lgsm/acserver/_default.cfg b/lgsm/config-default/config-lgsm/acserver/_default.cfg index 3dbc9cbeb..c6aeb7b63 100644 --- a/lgsm/config-default/config-lgsm/acserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/acserver/_default.cfg @@ -51,14 +51,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ahl2server/_default.cfg b/lgsm/config-default/config-lgsm/ahl2server/_default.cfg index 91bfdd25c..fa8f9fa90 100644 --- a/lgsm/config-default/config-lgsm/ahl2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ahl2server/_default.cfg @@ -59,14 +59,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ahlserver/_default.cfg b/lgsm/config-default/config-lgsm/ahlserver/_default.cfg index 78a3059f9..6b8012b36 100644 --- a/lgsm/config-default/config-lgsm/ahlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ahlserver/_default.cfg @@ -54,14 +54,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/arkserver/_default.cfg b/lgsm/config-default/config-lgsm/arkserver/_default.cfg index e3fb9654e..6e3b466fd 100644 --- a/lgsm/config-default/config-lgsm/arkserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/arkserver/_default.cfg @@ -57,14 +57,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/arma3server/_default.cfg b/lgsm/config-default/config-lgsm/arma3server/_default.cfg index 60662bed2..8a59a6fb1 100644 --- a/lgsm/config-default/config-lgsm/arma3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/arma3server/_default.cfg @@ -70,14 +70,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/armarserver/_default.cfg b/lgsm/config-default/config-lgsm/armarserver/_default.cfg index faf64c559..913447e47 100644 --- a/lgsm/config-default/config-lgsm/armarserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/armarserver/_default.cfg @@ -55,14 +55,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/atsserver/_default.cfg b/lgsm/config-default/config-lgsm/atsserver/_default.cfg index 3274e757e..04b795dc5 100644 --- a/lgsm/config-default/config-lgsm/atsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/atsserver/_default.cfg @@ -47,14 +47,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/avserver/_default.cfg b/lgsm/config-default/config-lgsm/avserver/_default.cfg index 532740d57..45cd149b2 100644 --- a/lgsm/config-default/config-lgsm/avserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/avserver/_default.cfg @@ -47,14 +47,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/bb2server/_default.cfg b/lgsm/config-default/config-lgsm/bb2server/_default.cfg index 396893061..4076878d4 100644 --- a/lgsm/config-default/config-lgsm/bb2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bb2server/_default.cfg @@ -60,14 +60,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/bbserver/_default.cfg b/lgsm/config-default/config-lgsm/bbserver/_default.cfg index 32621c7be..9932d4ffe 100644 --- a/lgsm/config-default/config-lgsm/bbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bbserver/_default.cfg @@ -54,14 +54,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/bdserver/_default.cfg b/lgsm/config-default/config-lgsm/bdserver/_default.cfg index 23bf71196..7fcdb4e1d 100644 --- a/lgsm/config-default/config-lgsm/bdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bdserver/_default.cfg @@ -54,14 +54,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg index 8cbcd35a1..d99068522 100644 --- a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg @@ -47,14 +47,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/bfvserver/_default.cfg b/lgsm/config-default/config-lgsm/bfvserver/_default.cfg index 2c5672106..c6e4b8bb7 100644 --- a/lgsm/config-default/config-lgsm/bfvserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bfvserver/_default.cfg @@ -47,14 +47,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg index 659e1abd7..b17a16f4d 100644 --- a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg @@ -60,14 +60,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/boserver/_default.cfg b/lgsm/config-default/config-lgsm/boserver/_default.cfg index a56292a3a..1ede22c39 100644 --- a/lgsm/config-default/config-lgsm/boserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/boserver/_default.cfg @@ -52,14 +52,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/bsserver/_default.cfg b/lgsm/config-default/config-lgsm/bsserver/_default.cfg index 503cde7b5..d01696170 100644 --- a/lgsm/config-default/config-lgsm/bsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bsserver/_default.cfg @@ -64,14 +64,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/btlserver/_default.cfg b/lgsm/config-default/config-lgsm/btlserver/_default.cfg index e26ca7e77..aeaadea9b 100644 --- a/lgsm/config-default/config-lgsm/btlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/btlserver/_default.cfg @@ -52,14 +52,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/btserver/_default.cfg b/lgsm/config-default/config-lgsm/btserver/_default.cfg index 8c32ee2d4..636136580 100644 --- a/lgsm/config-default/config-lgsm/btserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/btserver/_default.cfg @@ -47,14 +47,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ccserver/_default.cfg b/lgsm/config-default/config-lgsm/ccserver/_default.cfg index 3aaa47dca..1b8617e11 100644 --- a/lgsm/config-default/config-lgsm/ccserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ccserver/_default.cfg @@ -55,14 +55,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/cdserver/_default.cfg b/lgsm/config-default/config-lgsm/cdserver/_default.cfg index 419eb5e3d..69e4ee51e 100644 --- a/lgsm/config-default/config-lgsm/cdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/cdserver/_default.cfg @@ -47,14 +47,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ckserver/_default.cfg b/lgsm/config-default/config-lgsm/ckserver/_default.cfg index 164fd85f9..fe3d56f44 100644 --- a/lgsm/config-default/config-lgsm/ckserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ckserver/_default.cfg @@ -51,14 +51,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/cmwserver/_default.cfg b/lgsm/config-default/config-lgsm/cmwserver/_default.cfg index a03f04dd2..d0fe00b0d 100644 --- a/lgsm/config-default/config-lgsm/cmwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/cmwserver/_default.cfg @@ -53,14 +53,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/cod2server/_default.cfg b/lgsm/config-default/config-lgsm/cod2server/_default.cfg index e27276e2f..8f0d889d0 100644 --- a/lgsm/config-default/config-lgsm/cod2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod2server/_default.cfg @@ -53,14 +53,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/cod4server/_default.cfg b/lgsm/config-default/config-lgsm/cod4server/_default.cfg index fb46bcec6..6fce7fea3 100644 --- a/lgsm/config-default/config-lgsm/cod4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod4server/_default.cfg @@ -53,14 +53,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/codserver/_default.cfg b/lgsm/config-default/config-lgsm/codserver/_default.cfg index 89631a67d..9929f2626 100644 --- a/lgsm/config-default/config-lgsm/codserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codserver/_default.cfg @@ -53,14 +53,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg index 2c26a36bb..1719eb8f7 100644 --- a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg @@ -53,14 +53,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg index 2943f832d..c7169f170 100644 --- a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg @@ -53,14 +53,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/colserver/_default.cfg b/lgsm/config-default/config-lgsm/colserver/_default.cfg index 9a88956f7..4d2f04cd2 100644 --- a/lgsm/config-default/config-lgsm/colserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/colserver/_default.cfg @@ -48,14 +48,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/csczserver/_default.cfg b/lgsm/config-default/config-lgsm/csczserver/_default.cfg index c8996acd7..a3f49922b 100644 --- a/lgsm/config-default/config-lgsm/csczserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csczserver/_default.cfg @@ -54,14 +54,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg index e030a9896..f9d0acf1a 100644 --- a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg @@ -91,14 +91,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/csserver/_default.cfg b/lgsm/config-default/config-lgsm/csserver/_default.cfg index d81af84dc..87a132f3d 100644 --- a/lgsm/config-default/config-lgsm/csserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csserver/_default.cfg @@ -54,14 +54,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/cssserver/_default.cfg b/lgsm/config-default/config-lgsm/cssserver/_default.cfg index 018842405..612aeb0f1 100644 --- a/lgsm/config-default/config-lgsm/cssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/cssserver/_default.cfg @@ -60,14 +60,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ctserver/_default.cfg b/lgsm/config-default/config-lgsm/ctserver/_default.cfg index 205c4e8c2..2c31d5cc6 100644 --- a/lgsm/config-default/config-lgsm/ctserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ctserver/_default.cfg @@ -47,14 +47,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/dabserver/_default.cfg b/lgsm/config-default/config-lgsm/dabserver/_default.cfg index 002ed2033..84ea667e4 100644 --- a/lgsm/config-default/config-lgsm/dabserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dabserver/_default.cfg @@ -55,14 +55,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/dayzserver/_default.cfg b/lgsm/config-default/config-lgsm/dayzserver/_default.cfg index 8ec58f069..01eb4509e 100644 --- a/lgsm/config-default/config-lgsm/dayzserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dayzserver/_default.cfg @@ -66,14 +66,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/dmcserver/_default.cfg b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg index 5ea5c1352..f46fe5025 100644 --- a/lgsm/config-default/config-lgsm/dmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg @@ -54,14 +54,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/dodrserver/_default.cfg b/lgsm/config-default/config-lgsm/dodrserver/_default.cfg index cae228a0c..d692fdfa7 100644 --- a/lgsm/config-default/config-lgsm/dodrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodrserver/_default.cfg @@ -53,14 +53,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/dodserver/_default.cfg b/lgsm/config-default/config-lgsm/dodserver/_default.cfg index 7bd86724b..b2940a658 100644 --- a/lgsm/config-default/config-lgsm/dodserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodserver/_default.cfg @@ -54,14 +54,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/dodsserver/_default.cfg b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg index af4a32dc2..9ff0cfa96 100644 --- a/lgsm/config-default/config-lgsm/dodsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg @@ -55,14 +55,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/doiserver/_default.cfg b/lgsm/config-default/config-lgsm/doiserver/_default.cfg index 1c99abaa7..1580d58b2 100644 --- a/lgsm/config-default/config-lgsm/doiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/doiserver/_default.cfg @@ -56,14 +56,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/dstserver/_default.cfg b/lgsm/config-default/config-lgsm/dstserver/_default.cfg index 706327460..8b404391d 100644 --- a/lgsm/config-default/config-lgsm/dstserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dstserver/_default.cfg @@ -58,14 +58,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/dysserver/_default.cfg b/lgsm/config-default/config-lgsm/dysserver/_default.cfg index 96d12d677..907482a36 100644 --- a/lgsm/config-default/config-lgsm/dysserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dysserver/_default.cfg @@ -60,14 +60,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg index 475edb4ba..ae4bfa681 100644 --- a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg @@ -47,14 +47,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/emserver/_default.cfg b/lgsm/config-default/config-lgsm/emserver/_default.cfg index 8f935152f..33fb4f849 100644 --- a/lgsm/config-default/config-lgsm/emserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/emserver/_default.cfg @@ -60,14 +60,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/etlserver/_default.cfg b/lgsm/config-default/config-lgsm/etlserver/_default.cfg index c0c97cd2a..034f29c5d 100644 --- a/lgsm/config-default/config-lgsm/etlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/etlserver/_default.cfg @@ -47,14 +47,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ets2server/_default.cfg b/lgsm/config-default/config-lgsm/ets2server/_default.cfg index a18d6ca79..215ab2b41 100644 --- a/lgsm/config-default/config-lgsm/ets2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ets2server/_default.cfg @@ -47,14 +47,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/fctrserver/_default.cfg b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg index d35c36050..6b03f9a30 100644 --- a/lgsm/config-default/config-lgsm/fctrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg @@ -54,14 +54,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/fofserver/_default.cfg b/lgsm/config-default/config-lgsm/fofserver/_default.cfg index f85822d30..41dae637a 100644 --- a/lgsm/config-default/config-lgsm/fofserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/fofserver/_default.cfg @@ -55,14 +55,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg index 31a6ceedf..b170c3436 100644 --- a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg @@ -67,14 +67,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/hcuserver/_default.cfg b/lgsm/config-default/config-lgsm/hcuserver/_default.cfg index b53af15d3..00b0b30c7 100644 --- a/lgsm/config-default/config-lgsm/hcuserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hcuserver/_default.cfg @@ -62,14 +62,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg index 74a75fc21..8bbf8fdec 100644 --- a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg @@ -55,14 +55,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/hldmserver/_default.cfg b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg index c94297f1f..f78e1542b 100644 --- a/lgsm/config-default/config-lgsm/hldmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg @@ -54,14 +54,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg index 32d5fe791..fd854b0c2 100644 --- a/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg @@ -55,14 +55,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/hwserver/_default.cfg b/lgsm/config-default/config-lgsm/hwserver/_default.cfg index 923865478..99b08e358 100644 --- a/lgsm/config-default/config-lgsm/hwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hwserver/_default.cfg @@ -65,14 +65,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/insserver/_default.cfg b/lgsm/config-default/config-lgsm/insserver/_default.cfg index 8b6b599f3..69d095881 100644 --- a/lgsm/config-default/config-lgsm/insserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/insserver/_default.cfg @@ -61,14 +61,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/inssserver/_default.cfg b/lgsm/config-default/config-lgsm/inssserver/_default.cfg index 076b61ecb..6a7313c7b 100644 --- a/lgsm/config-default/config-lgsm/inssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/inssserver/_default.cfg @@ -64,14 +64,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/iosserver/_default.cfg b/lgsm/config-default/config-lgsm/iosserver/_default.cfg index 48c5511c7..365a3dee2 100644 --- a/lgsm/config-default/config-lgsm/iosserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/iosserver/_default.cfg @@ -55,14 +55,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/jc2server/_default.cfg b/lgsm/config-default/config-lgsm/jc2server/_default.cfg index 0610507d6..69bc8018b 100644 --- a/lgsm/config-default/config-lgsm/jc2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc2server/_default.cfg @@ -47,14 +47,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/jc3server/_default.cfg b/lgsm/config-default/config-lgsm/jc3server/_default.cfg index c2cac1cfe..872541961 100644 --- a/lgsm/config-default/config-lgsm/jc3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc3server/_default.cfg @@ -47,14 +47,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/jk2server/_default.cfg b/lgsm/config-default/config-lgsm/jk2server/_default.cfg index 5b7f6b893..4313daa58 100644 --- a/lgsm/config-default/config-lgsm/jk2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jk2server/_default.cfg @@ -56,14 +56,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/kf2server/_default.cfg b/lgsm/config-default/config-lgsm/kf2server/_default.cfg index 6d71d6351..88fe360be 100644 --- a/lgsm/config-default/config-lgsm/kf2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/kf2server/_default.cfg @@ -53,14 +53,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/kfserver/_default.cfg b/lgsm/config-default/config-lgsm/kfserver/_default.cfg index 362dfa54f..92cfd258c 100644 --- a/lgsm/config-default/config-lgsm/kfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/kfserver/_default.cfg @@ -59,14 +59,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/l4d2server/_default.cfg b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg index 4a04cac2c..96c2cc5bc 100644 --- a/lgsm/config-default/config-lgsm/l4d2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg @@ -54,14 +54,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/l4dserver/_default.cfg b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg index 9447b2823..2b5a64be6 100644 --- a/lgsm/config-default/config-lgsm/l4dserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg @@ -54,14 +54,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/loserver/_default.cfg b/lgsm/config-default/config-lgsm/loserver/_default.cfg index 7df8a8f3d..5a205d88f 100644 --- a/lgsm/config-default/config-lgsm/loserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/loserver/_default.cfg @@ -58,14 +58,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/mcbserver/_default.cfg b/lgsm/config-default/config-lgsm/mcbserver/_default.cfg index 8ffc45667..c4d9d5455 100644 --- a/lgsm/config-default/config-lgsm/mcbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mcbserver/_default.cfg @@ -50,14 +50,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/mcserver/_default.cfg b/lgsm/config-default/config-lgsm/mcserver/_default.cfg index 269e96f8b..cd2a80849 100644 --- a/lgsm/config-default/config-lgsm/mcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mcserver/_default.cfg @@ -56,14 +56,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/mhserver/_default.cfg b/lgsm/config-default/config-lgsm/mhserver/_default.cfg index 8a9b2331e..4be0fab64 100644 --- a/lgsm/config-default/config-lgsm/mhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mhserver/_default.cfg @@ -55,14 +55,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg index 490767e4a..cbfbcfb92 100644 --- a/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg @@ -52,14 +52,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/momserver/_default.cfg b/lgsm/config-default/config-lgsm/momserver/_default.cfg index 3219ae662..670e7b3a7 100644 --- a/lgsm/config-default/config-lgsm/momserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/momserver/_default.cfg @@ -52,14 +52,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg index 5ab7c3283..8397146b8 100644 --- a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg @@ -51,14 +51,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ndserver/_default.cfg b/lgsm/config-default/config-lgsm/ndserver/_default.cfg index 30ee62109..de3a3aaec 100644 --- a/lgsm/config-default/config-lgsm/ndserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ndserver/_default.cfg @@ -55,14 +55,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/necserver/_default.cfg b/lgsm/config-default/config-lgsm/necserver/_default.cfg index 30290acb5..4857107c8 100644 --- a/lgsm/config-default/config-lgsm/necserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/necserver/_default.cfg @@ -50,14 +50,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg index d3dfa30d3..e3b56f545 100644 --- a/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg @@ -60,14 +60,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg index ce44d932d..4579d3bb0 100644 --- a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg @@ -62,14 +62,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ns2server/_default.cfg b/lgsm/config-default/config-lgsm/ns2server/_default.cfg index fdb0252f1..9f09491cf 100644 --- a/lgsm/config-default/config-lgsm/ns2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2server/_default.cfg @@ -62,14 +62,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/nsserver/_default.cfg b/lgsm/config-default/config-lgsm/nsserver/_default.cfg index 44faa5b95..7880222fa 100644 --- a/lgsm/config-default/config-lgsm/nsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/nsserver/_default.cfg @@ -54,14 +54,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ohdserver/_default.cfg b/lgsm/config-default/config-lgsm/ohdserver/_default.cfg index afc11d09f..25a418edc 100644 --- a/lgsm/config-default/config-lgsm/ohdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ohdserver/_default.cfg @@ -57,14 +57,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/onsetserver/_default.cfg b/lgsm/config-default/config-lgsm/onsetserver/_default.cfg index ffbcabdc3..b25cfb60c 100644 --- a/lgsm/config-default/config-lgsm/onsetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/onsetserver/_default.cfg @@ -47,14 +47,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/opforserver/_default.cfg b/lgsm/config-default/config-lgsm/opforserver/_default.cfg index c04666dfd..a0785a4b6 100644 --- a/lgsm/config-default/config-lgsm/opforserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/opforserver/_default.cfg @@ -54,14 +54,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/pc2server/_default.cfg b/lgsm/config-default/config-lgsm/pc2server/_default.cfg index 37efdd824..1b9a6e6f1 100644 --- a/lgsm/config-default/config-lgsm/pc2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/pc2server/_default.cfg @@ -51,14 +51,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/pcserver/_default.cfg b/lgsm/config-default/config-lgsm/pcserver/_default.cfg index e70ce6d26..1d4b15394 100644 --- a/lgsm/config-default/config-lgsm/pcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pcserver/_default.cfg @@ -47,14 +47,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/pmcserver/_default.cfg b/lgsm/config-default/config-lgsm/pmcserver/_default.cfg index 984ebb470..430daefbe 100644 --- a/lgsm/config-default/config-lgsm/pmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pmcserver/_default.cfg @@ -54,14 +54,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/psserver/_default.cfg b/lgsm/config-default/config-lgsm/psserver/_default.cfg index d028fad57..9d8fa9383 100644 --- a/lgsm/config-default/config-lgsm/psserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/psserver/_default.cfg @@ -56,14 +56,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg index e3e96a8ff..7f8adbf5f 100644 --- a/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg @@ -55,14 +55,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/pvrserver/_default.cfg b/lgsm/config-default/config-lgsm/pvrserver/_default.cfg index 5063868b0..12e089fe0 100644 --- a/lgsm/config-default/config-lgsm/pvrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pvrserver/_default.cfg @@ -55,14 +55,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/pzserver/_default.cfg b/lgsm/config-default/config-lgsm/pzserver/_default.cfg index b82f136ed..a3a5ac340 100644 --- a/lgsm/config-default/config-lgsm/pzserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pzserver/_default.cfg @@ -51,14 +51,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/q2server/_default.cfg b/lgsm/config-default/config-lgsm/q2server/_default.cfg index aa07f21b7..0d899df65 100644 --- a/lgsm/config-default/config-lgsm/q2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/q2server/_default.cfg @@ -52,14 +52,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/q3server/_default.cfg b/lgsm/config-default/config-lgsm/q3server/_default.cfg index eacb87049..e53fb4285 100644 --- a/lgsm/config-default/config-lgsm/q3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/q3server/_default.cfg @@ -52,14 +52,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/qlserver/_default.cfg b/lgsm/config-default/config-lgsm/qlserver/_default.cfg index f6b5342e0..3f28329ac 100644 --- a/lgsm/config-default/config-lgsm/qlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/qlserver/_default.cfg @@ -47,14 +47,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/qwserver/_default.cfg b/lgsm/config-default/config-lgsm/qwserver/_default.cfg index 5f6288879..95dea75f8 100644 --- a/lgsm/config-default/config-lgsm/qwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/qwserver/_default.cfg @@ -51,14 +51,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg index b1bb3e794..419825ec1 100644 --- a/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg @@ -54,14 +54,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/roserver/_default.cfg b/lgsm/config-default/config-lgsm/roserver/_default.cfg index 8e4fe21a6..4617289fd 100644 --- a/lgsm/config-default/config-lgsm/roserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/roserver/_default.cfg @@ -55,14 +55,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg b/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg index d99061bdb..159b8dfd4 100644 --- a/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg @@ -52,14 +52,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/rustserver/_default.cfg b/lgsm/config-default/config-lgsm/rustserver/_default.cfg index a07838143..fc955a94a 100644 --- a/lgsm/config-default/config-lgsm/rustserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rustserver/_default.cfg @@ -66,14 +66,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/rwserver/_default.cfg b/lgsm/config-default/config-lgsm/rwserver/_default.cfg index 74288a4f8..c714045ca 100644 --- a/lgsm/config-default/config-lgsm/rwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rwserver/_default.cfg @@ -47,14 +47,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/sampserver/_default.cfg b/lgsm/config-default/config-lgsm/sampserver/_default.cfg index 709c9922c..448f8c20f 100644 --- a/lgsm/config-default/config-lgsm/sampserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sampserver/_default.cfg @@ -51,14 +51,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg index 50c2a4e76..0107c39d5 100644 --- a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg @@ -53,14 +53,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/sbserver/_default.cfg b/lgsm/config-default/config-lgsm/sbserver/_default.cfg index 733267b4b..79e447454 100644 --- a/lgsm/config-default/config-lgsm/sbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbserver/_default.cfg @@ -54,14 +54,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/scpslserver/_default.cfg b/lgsm/config-default/config-lgsm/scpslserver/_default.cfg index 100de02a8..ad2e2f9d5 100644 --- a/lgsm/config-default/config-lgsm/scpslserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/scpslserver/_default.cfg @@ -52,14 +52,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg b/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg index 1e041e93b..6c7a7b3ca 100644 --- a/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg @@ -52,14 +52,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg index 7775f16ab..b2c8e00f0 100644 --- a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg @@ -50,14 +50,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/sfcserver/_default.cfg b/lgsm/config-default/config-lgsm/sfcserver/_default.cfg index f64261993..b566de690 100644 --- a/lgsm/config-default/config-lgsm/sfcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sfcserver/_default.cfg @@ -55,14 +55,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/sfserver/_default.cfg b/lgsm/config-default/config-lgsm/sfserver/_default.cfg index bc25dccfa..46d0ebf88 100644 --- a/lgsm/config-default/config-lgsm/sfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sfserver/_default.cfg @@ -53,14 +53,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/sof2server/_default.cfg b/lgsm/config-default/config-lgsm/sof2server/_default.cfg index 282c8166d..6169950c0 100644 --- a/lgsm/config-default/config-lgsm/sof2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/sof2server/_default.cfg @@ -52,14 +52,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/solserver/_default.cfg b/lgsm/config-default/config-lgsm/solserver/_default.cfg index aa8d02d5a..671dcd429 100644 --- a/lgsm/config-default/config-lgsm/solserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/solserver/_default.cfg @@ -51,14 +51,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/squadserver/_default.cfg b/lgsm/config-default/config-lgsm/squadserver/_default.cfg index 432b5a402..dbaa3c736 100644 --- a/lgsm/config-default/config-lgsm/squadserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/squadserver/_default.cfg @@ -52,14 +52,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/stnserver/_default.cfg b/lgsm/config-default/config-lgsm/stnserver/_default.cfg index 463e808ed..8531c111b 100644 --- a/lgsm/config-default/config-lgsm/stnserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/stnserver/_default.cfg @@ -51,14 +51,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/stserver/_default.cfg b/lgsm/config-default/config-lgsm/stserver/_default.cfg index eef67827f..0d8f9317f 100644 --- a/lgsm/config-default/config-lgsm/stserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/stserver/_default.cfg @@ -52,14 +52,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/svenserver/_default.cfg b/lgsm/config-default/config-lgsm/svenserver/_default.cfg index 309e73d04..7f47091e4 100644 --- a/lgsm/config-default/config-lgsm/svenserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/svenserver/_default.cfg @@ -54,14 +54,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg index ea0d549be..562b0fd9b 100644 --- a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg @@ -54,14 +54,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/tf2server/_default.cfg b/lgsm/config-default/config-lgsm/tf2server/_default.cfg index 851e80386..d7d53928b 100644 --- a/lgsm/config-default/config-lgsm/tf2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/tf2server/_default.cfg @@ -60,14 +60,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg index c0c09ec66..6709767a9 100644 --- a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg @@ -54,14 +54,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/tiserver/_default.cfg b/lgsm/config-default/config-lgsm/tiserver/_default.cfg index 6e04a4d32..994a2574a 100644 --- a/lgsm/config-default/config-lgsm/tiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tiserver/_default.cfg @@ -52,14 +52,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ts3server/_default.cfg b/lgsm/config-default/config-lgsm/ts3server/_default.cfg index 8dff8f7f8..dc3e7a3fa 100644 --- a/lgsm/config-default/config-lgsm/ts3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ts3server/_default.cfg @@ -47,14 +47,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/tsserver/_default.cfg b/lgsm/config-default/config-lgsm/tsserver/_default.cfg index 8eb00e73a..c9ea3b381 100644 --- a/lgsm/config-default/config-lgsm/tsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tsserver/_default.cfg @@ -54,14 +54,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/tuserver/_default.cfg b/lgsm/config-default/config-lgsm/tuserver/_default.cfg index f62740818..551ce95f4 100644 --- a/lgsm/config-default/config-lgsm/tuserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tuserver/_default.cfg @@ -57,14 +57,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/twserver/_default.cfg b/lgsm/config-default/config-lgsm/twserver/_default.cfg index 13edffe2f..d7e84704a 100644 --- a/lgsm/config-default/config-lgsm/twserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/twserver/_default.cfg @@ -54,14 +54,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/untserver/_default.cfg b/lgsm/config-default/config-lgsm/untserver/_default.cfg index fc1718967..b250d3284 100644 --- a/lgsm/config-default/config-lgsm/untserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/untserver/_default.cfg @@ -61,14 +61,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg index 5b0fc6a2b..dc5d39fd7 100644 --- a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg @@ -51,14 +51,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ut3server/_default.cfg b/lgsm/config-default/config-lgsm/ut3server/_default.cfg index b52bcbfb0..412422257 100644 --- a/lgsm/config-default/config-lgsm/ut3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut3server/_default.cfg @@ -67,14 +67,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ut99server/_default.cfg b/lgsm/config-default/config-lgsm/ut99server/_default.cfg index 21db8e024..6df4ea539 100644 --- a/lgsm/config-default/config-lgsm/ut99server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut99server/_default.cfg @@ -51,14 +51,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/utserver/_default.cfg b/lgsm/config-default/config-lgsm/utserver/_default.cfg index 82b47bf9a..1ae90d9bb 100644 --- a/lgsm/config-default/config-lgsm/utserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/utserver/_default.cfg @@ -55,14 +55,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/vhserver/_default.cfg b/lgsm/config-default/config-lgsm/vhserver/_default.cfg index 5fd29f6a7..f0eb4cf8e 100644 --- a/lgsm/config-default/config-lgsm/vhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vhserver/_default.cfg @@ -64,14 +64,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/vintsserver/_default.cfg b/lgsm/config-default/config-lgsm/vintsserver/_default.cfg index 2db6dbc06..75288012e 100644 --- a/lgsm/config-default/config-lgsm/vintsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vintsserver/_default.cfg @@ -51,14 +51,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/vpmcserver/_default.cfg b/lgsm/config-default/config-lgsm/vpmcserver/_default.cfg index 8a47f056e..636f23d9a 100644 --- a/lgsm/config-default/config-lgsm/vpmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vpmcserver/_default.cfg @@ -54,14 +54,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/vsserver/_default.cfg b/lgsm/config-default/config-lgsm/vsserver/_default.cfg index e99f063e8..257c98963 100644 --- a/lgsm/config-default/config-lgsm/vsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vsserver/_default.cfg @@ -54,14 +54,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/wetserver/_default.cfg b/lgsm/config-default/config-lgsm/wetserver/_default.cfg index 045afb9e0..153a2b1c5 100644 --- a/lgsm/config-default/config-lgsm/wetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wetserver/_default.cfg @@ -47,14 +47,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/wfserver/_default.cfg b/lgsm/config-default/config-lgsm/wfserver/_default.cfg index 5924cd8af..80fbe2037 100644 --- a/lgsm/config-default/config-lgsm/wfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wfserver/_default.cfg @@ -52,14 +52,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/wmcserver/_default.cfg b/lgsm/config-default/config-lgsm/wmcserver/_default.cfg index 007e5542d..82a398363 100644 --- a/lgsm/config-default/config-lgsm/wmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wmcserver/_default.cfg @@ -54,14 +54,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg index f648abe05..e4ef942d5 100644 --- a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg @@ -91,14 +91,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/zmrserver/_default.cfg b/lgsm/config-default/config-lgsm/zmrserver/_default.cfg index ad5619dae..4de16fd16 100644 --- a/lgsm/config-default/config-lgsm/zmrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/zmrserver/_default.cfg @@ -55,14 +55,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/zpsserver/_default.cfg b/lgsm/config-default/config-lgsm/zpsserver/_default.cfg index 33ad128cb..0cb900501 100644 --- a/lgsm/config-default/config-lgsm/zpsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/zpsserver/_default.cfg @@ -60,14 +60,6 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/modules/alert.sh b/lgsm/modules/alert.sh index 03d672a66..b8b668ef4 100644 --- a/lgsm/modules/alert.sh +++ b/lgsm/modules/alert.sh @@ -178,17 +178,6 @@ elif [ -z "${ifttttoken}" ] && [ "${commandname}" == "TEST-ALERT" ]; then fn_script_error "IFTTT token not set" fi -if [ "${mailgunalert}" == "on" ] && [ -n "${mailgunalert}" ]; then - alert_mailgun.sh -elif [ "${mailgunalert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then - fn_print_warn_nl "Mailgun alerts not enabled" - fn_script_log_warn "Mailgun alerts not enabled" -elif [ -z "${mailguntoken}" ] && [ "${commandname}" == "TEST-ALERT" ]; then - fn_print_error_nl "Mailgun token not set" - echo -e "* https://docs.linuxgsm.com/alerts/mailgun" - fn_script_error "Mailgun token not set" -fi - if [ "${pushbulletalert}" == "on" ] && [ -n "${pushbullettoken}" ]; then alert_pushbullet.sh elif [ "${pushbulletalert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then diff --git a/lgsm/modules/alert_mailgun.sh b/lgsm/modules/alert_mailgun.sh deleted file mode 100644 index a25c82648..000000000 --- a/lgsm/modules/alert_mailgun.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -# LinuxGSM alert_mailgun.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Sends Mailgun Email alert. - -moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -if [ "${mailgunapiregion}" == "eu" ]; then - mailgunapiurl="https://api.eu.mailgun.net" -else - mailgunapiurl="https://api.mailgun.net" -fi - -fn_print_dots "Sending Email alert: Mailgun: ${mailgunemail}" - -mailgunsend=$(curl --connect-timeout 10 -s --user "api:${mailguntoken}" \ - -F from="LinuxGSM <${mailgunemailfrom}>" \ - -F to="LinuxGSM Admin <${mailgunemail}>" \ - -F subject="${alertemoji} ${alertsubject} ${alertemoji}" \ - -F o:tag='alert' \ - -F o:tag='LinuxGSM' \ - -F text="$(cat "${alertlog}")" "${mailgunapiurl}/v3/${mailgundomain}/messages") - -if [ -z "${mailgunsend}" ]; then - fn_print_fail_nl "Sending Email alert: Mailgun: ${mailgunemail}" - fn_script_log_fatal "Sending Email alert: Mailgun: ${mailgunemail}" -else - fn_print_ok_nl "Sending Email alert: Mailgun: ${mailgunemail}" - fn_script_log_pass "Sending Email alert: Mailgun: ${mailgunemail}" -fi diff --git a/lgsm/modules/core_functions.sh b/lgsm/modules/core_functions.sh index c0195b249..09eedeb7b 100644 --- a/lgsm/modules/core_functions.sh +++ b/lgsm/modules/core_functions.sh @@ -565,11 +565,6 @@ alert_ifttt.sh() { fn_fetch_function } -alert_mailgun.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - alert_pushbullet.sh() { functionfile="${FUNCNAME[0]}" fn_fetch_function diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index d03102ef5..c2b529741 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -575,11 +575,6 @@ alert_ifttt.sh() { fn_fetch_module } -alert_mailgun.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - alert_pushbullet.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module diff --git a/lgsm/modules/info_stats.sh b/lgsm/modules/info_stats.sh index 965e3898e..8f0119532 100644 --- a/lgsm/modules/info_stats.sh +++ b/lgsm/modules/info_stats.sh @@ -87,8 +87,8 @@ payload="{ ] }" -fn_alert_payload(){ -alertpayload="{ +fn_alert_payload() { + alertpayload="{ \"client_id\": \"${uuidinstance}\", \"events\": [ { @@ -123,11 +123,6 @@ if [ "${iftttalert}" == "on" ]; then fn_alert_payload curl -X POST "https://www.google-analytics.com/mp/collect?api_secret=${apisecret}&measurement_id=${measurementid}" -H "Content-Type: application/json" -d "${alertpayload}" fi -if [ "${mailgunalert}" == "on" ]; then - alerttype="mailgun" - fn_alert_payload - curl -X POST "https://www.google-analytics.com/mp/collect?api_secret=${apisecret}&measurement_id=${measurementid}" -H "Content-Type: application/json" -d "${alertpayload}" -fi if [ "${pushbulletalert}" == "on" ]; then alerttype="pushbullet" fn_alert_payload diff --git a/tests/tests_defaultcfg/defaultcfg_1.txt b/tests/tests_defaultcfg/defaultcfg_1.txt index aa5b8a207..63b888f9d 100644 --- a/tests/tests_defaultcfg/defaultcfg_1.txt +++ b/tests/tests_defaultcfg/defaultcfg_1.txt @@ -15,7 +15,6 @@ # Discord Alerts | https://docs.linuxgsm.com/alerts/discord # Email Alerts | https://docs.linuxgsm.com/alerts/email # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet # Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover # Slack Alerts | https://docs.linuxgsm.com/alerts/slack From e0b77391bc9c11c779d2ccca874fb6e967b6650e Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 7 Oct 2023 23:06:09 +0100 Subject: [PATCH 269/374] feat: various UI changes (#4326) * refactor: remove unnecessary comments in default server configurations The commit removes unnecessary comments from the default server configurations. The comments were providing instructions to edit the configuration files with care, but they are not needed and can be safely removed. * refactor: update server names in default configuration files - Updated the servername value in multiple default configuration files to "LinuxGSM" for consistency. - Refactored the code to reflect the changes made. * refactor: rename fn_script_log_fatal to fn_script_log_faail to create more consistency with naming * feat: improve console output formatting - Added separator function to improve readability of console output. - Replaced multiple instances of manual separators with the new function. - Updated commit message to follow conventional commit standard. * refactor: remove unnecessary fn_sleep_time calls This commit removes the fn_sleep_time function calls that are no longer needed in multiple modules. The fn_sleep_time function was used to introduce a delay, but it is no longer necessary for the current implementation. * better standardise random * removed bold where not required --- .../config-lgsm/dstserver/_default.cfg | 1 - .../config-lgsm/hwserver/_default.cfg | 2 +- .../config-lgsm/inssserver/_default.cfg | 2 +- .../config-lgsm/loserver/_default.cfg | 2 +- .../config-lgsm/mtaserver/_default.cfg | 1 - .../config-lgsm/ns2cserver/_default.cfg | 2 +- .../config-lgsm/ns2server/_default.cfg | 2 +- .../config-lgsm/rustserver/_default.cfg | 2 +- .../config-lgsm/sbotsserver/_default.cfg | 2 +- .../config-lgsm/stnserver/_default.cfg | 2 +- .../config-lgsm/stserver/_default.cfg | 1 - .../config-lgsm/vhserver/_default.cfg | 2 +- lgsm/modules/alert_discord.sh | 2 +- lgsm/modules/alert_email.sh | 3 +- lgsm/modules/alert_gotify.sh | 2 +- lgsm/modules/alert_ifttt.sh | 2 +- lgsm/modules/alert_pushbullet.sh | 2 +- lgsm/modules/alert_pushover.sh | 2 +- lgsm/modules/alert_rocketchat.sh | 2 +- lgsm/modules/alert_slack.sh | 2 +- lgsm/modules/alert_telegram.sh | 2 +- lgsm/modules/check_config.sh | 4 +- lgsm/modules/check_deps.sh | 14 +++-- lgsm/modules/check_executable.sh | 2 +- lgsm/modules/check_permissions.sh | 8 +-- lgsm/modules/check_root.sh | 2 +- lgsm/modules/check_system_dir.sh | 4 +- lgsm/modules/check_tmuxception.sh | 4 +- lgsm/modules/command_backup.sh | 10 ++-- lgsm/modules/command_debug.sh | 2 +- lgsm/modules/command_dev_clear_modules.sh | 6 +-- lgsm/modules/command_dev_details.sh | 10 ++-- lgsm/modules/command_dev_detect_deps.sh | 20 ++++---- lgsm/modules/command_dev_detect_glibc.sh | 10 ++-- lgsm/modules/command_dev_detect_ldd.sh | 8 +-- lgsm/modules/command_dev_query_raw.sh | 20 ++++---- lgsm/modules/command_fastdl.sh | 30 +++++------ lgsm/modules/command_install_resources_mta.sh | 2 +- lgsm/modules/command_mods_install.sh | 6 +-- lgsm/modules/command_mods_remove.sh | 8 +-- lgsm/modules/command_mods_update.sh | 2 +- lgsm/modules/command_monitor.sh | 2 +- lgsm/modules/command_skeleton.sh | 2 +- lgsm/modules/command_sponsor.sh | 2 +- lgsm/modules/command_start.sh | 10 ++-- lgsm/modules/command_stop.sh | 2 +- lgsm/modules/command_update_linuxgsm.sh | 20 ++++---- lgsm/modules/core_dl.sh | 33 ++++++------ lgsm/modules/core_exit.sh | 2 +- lgsm/modules/core_github.sh | 6 +-- lgsm/modules/core_logs.sh | 1 - lgsm/modules/core_messages.sh | 16 ++++-- lgsm/modules/core_steamcmd.sh | 14 ++--- lgsm/modules/fix.sh | 3 +- lgsm/modules/fix_av.sh | 1 - lgsm/modules/fix_kf2.sh | 1 - lgsm/modules/fix_lo.sh | 2 - lgsm/modules/fix_mta.sh | 1 - lgsm/modules/fix_samp.sh | 4 +- lgsm/modules/fix_ts3.sh | 2 +- lgsm/modules/fix_ut3.sh | 1 - lgsm/modules/info_messages.sh | 51 ++++++++----------- lgsm/modules/install_complete.sh | 10 ++-- lgsm/modules/install_config.sh | 38 +++++++++----- lgsm/modules/install_dst_token.sh | 5 +- lgsm/modules/install_eula.sh | 5 +- lgsm/modules/install_factorio_save.sh | 5 +- lgsm/modules/install_gslt.sh | 4 +- lgsm/modules/install_header.sh | 10 ++-- lgsm/modules/install_logs.sh | 5 +- lgsm/modules/install_server_dir.sh | 4 +- lgsm/modules/install_server_files.sh | 9 ++-- lgsm/modules/install_squad_license.sh | 5 +- lgsm/modules/install_stats.sh | 9 ++-- lgsm/modules/install_steamcmd.sh | 5 +- lgsm/modules/install_ts3db.sh | 17 +++---- lgsm/modules/install_ut2k4_key.sh | 5 +- lgsm/modules/mods_core.sh | 42 +++++++-------- lgsm/modules/update_fctr.sh | 4 +- lgsm/modules/update_jk2.sh | 4 +- lgsm/modules/update_mc.sh | 4 +- lgsm/modules/update_mcb.sh | 10 ++-- lgsm/modules/update_mta.sh | 4 +- lgsm/modules/update_pmc.sh | 4 +- lgsm/modules/update_ts3.sh | 6 +-- lgsm/modules/update_ut99.sh | 4 +- lgsm/modules/update_vints.sh | 4 +- linuxgsm.sh | 4 +- tests/tests_fctrserver.sh | 4 +- tests/tests_jc2server.sh | 4 +- tests/tests_mcserver.sh | 4 +- tests/tests_ts3server.sh | 4 +- 92 files changed, 310 insertions(+), 320 deletions(-) diff --git a/lgsm/config-default/config-lgsm/dstserver/_default.cfg b/lgsm/config-default/config-lgsm/dstserver/_default.cfg index 8b404391d..4677162c3 100644 --- a/lgsm/config-default/config-lgsm/dstserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dstserver/_default.cfg @@ -15,7 +15,6 @@ shard="Master" cluster="Cluster_1" cave="false" -# Edit with care persistentstorageroot="${HOME}/.klei" confdir="DoNotStarveTogether" diff --git a/lgsm/config-default/config-lgsm/hwserver/_default.cfg b/lgsm/config-default/config-lgsm/hwserver/_default.cfg index 99b08e358..853a52078 100644 --- a/lgsm/config-default/config-lgsm/hwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hwserver/_default.cfg @@ -26,7 +26,7 @@ admins="" loadsave="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -# Edit with care | http://hurtworld.wikia.com/wiki/Hosting_A_Server +# http://hurtworld.wikia.com/wiki/Hosting_A_Server startparameters="-batchmode -nographics -logfile ${gamelog} -exec \"host ${port} ${defaultmap} ${loadsave};queryport ${queryport};maxplayers ${maxplayers};servername ${servername};creativemode ${creativemode};${admins}\"" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/inssserver/_default.cfg b/lgsm/config-default/config-lgsm/inssserver/_default.cfg index 6a7313c7b..117ddbff8 100644 --- a/lgsm/config-default/config-lgsm/inssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/inssserver/_default.cfg @@ -14,7 +14,7 @@ port="27102" queryport="27131" rconport="27015" rconpassword="" -servername="LinuxGSM Server" +servername="LinuxGSM" defaultmap="Canyon" defaultscenario="Scenario_Crossing_Push_Security" maxplayers="28" diff --git a/lgsm/config-default/config-lgsm/loserver/_default.cfg b/lgsm/config-default/config-lgsm/loserver/_default.cfg index 5a205d88f..cc2f7b89a 100644 --- a/lgsm/config-default/config-lgsm/loserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/loserver/_default.cfg @@ -10,7 +10,7 @@ ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters ## https://docs.linuxgsm.com/game-servers/last-oasis -servername="${selfname}" +servername="LinuxGSM" ip="0.0.0.0" port="7777" queryport="27015" diff --git a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg index 8397146b8..3af42ea2b 100644 --- a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg @@ -12,7 +12,6 @@ ip="0.0.0.0" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -# Edit with care startparameters="" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg index 4579d3bb0..2ca53a335 100644 --- a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg @@ -13,7 +13,7 @@ ip="0.0.0.0" port="27015" defaultmap="co_core" maxplayers="24" -servername="LinuxGSM Server" +servername="LinuxGSM" httpuser="admin" httppassword="admin" httpport="8080" diff --git a/lgsm/config-default/config-lgsm/ns2server/_default.cfg b/lgsm/config-default/config-lgsm/ns2server/_default.cfg index 9f09491cf..3ee3a0514 100644 --- a/lgsm/config-default/config-lgsm/ns2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2server/_default.cfg @@ -13,7 +13,7 @@ ip="0.0.0.0" port="27015" defaultmap="ns2_summit" maxplayers="24" -servername="LinuxGSM Server" +servername="LinuxGSM" httpuser="admin" httppassword="admin" httpport="8080" diff --git a/lgsm/config-default/config-lgsm/rustserver/_default.cfg b/lgsm/config-default/config-lgsm/rustserver/_default.cfg index fc955a94a..9a4bfe147 100644 --- a/lgsm/config-default/config-lgsm/rustserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rustserver/_default.cfg @@ -16,7 +16,7 @@ appport="28082" queryport="28017" rconpassword="CHANGE_ME" rconweb="1" # values: Facepunch web panel, Rustadmin desktop and Rustadmin Online = 1, Rusty = 0. -servername="Rust" +servername="LinuxGSM" gamemode="vanilla" # values: vanilla, softcore ( Doc: https://wiki.facepunch.com/rust/server-gamemodes ) serverlevel="Procedural Map" # values: Procedural Map, Barren, HapisIsland, SavasIsland customlevelurl="" # Custom level url. +server.levelurl \"${customlevelurl}\" diff --git a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg index 0107c39d5..e5fe5b5d8 100644 --- a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg @@ -12,7 +12,7 @@ port="7777" queryport="27015" defaultmap="StationKappa" -servername="LinuxGSM Server" +servername="LinuxGSM" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters startparameters="Port=${port}?QueryPort=${queryport} -startup_map ${defaultmap} -server_name \"${servername}\"" diff --git a/lgsm/config-default/config-lgsm/stnserver/_default.cfg b/lgsm/config-default/config-lgsm/stnserver/_default.cfg index 8531c111b..3e5f97c7b 100644 --- a/lgsm/config-default/config-lgsm/stnserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/stnserver/_default.cfg @@ -12,7 +12,7 @@ maxplayers="20" region="0" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -# Edit with care | https://colonysurvival.gamepedia.com/Dedicated_Server#Installation_.28Linux.29 +# https://colonysurvival.gamepedia.com/Dedicated_Server#Installation_.28Linux.29 startparameters="-mc ${maxplayers} -r ${region}" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/stserver/_default.cfg b/lgsm/config-default/config-lgsm/stserver/_default.cfg index 0d8f9317f..980c4e045 100644 --- a/lgsm/config-default/config-lgsm/stserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/stserver/_default.cfg @@ -13,7 +13,6 @@ worldname="moon_save" worldtype="Moon" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -# Edit with care startparameters="-LOADLATEST ${worldname} ${worldtype}" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/vhserver/_default.cfg b/lgsm/config-default/config-lgsm/vhserver/_default.cfg index f0eb4cf8e..ce90a2b07 100644 --- a/lgsm/config-default/config-lgsm/vhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vhserver/_default.cfg @@ -9,7 +9,7 @@ #### Game Server Settings #### ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters -servername="Valheim Server" +servername="LinuxGSM" # Minimum password length is 5. serverpassword="" port="2456" diff --git a/lgsm/modules/alert_discord.sh b/lgsm/modules/alert_discord.sh index a384de3db..f3a79416a 100644 --- a/lgsm/modules/alert_discord.sh +++ b/lgsm/modules/alert_discord.sh @@ -52,7 +52,7 @@ discordsend=$(curl --connect-timeout 10 -sSL -H "Content-Type: application/json" if [ -n "${discordsend}" ]; then fn_print_fail_nl "Sending Discord alert: ${discordsend}" - fn_script_log_fatal "Sending Discord alert: ${discordsend}" + fn_script_log_fail "Sending Discord alert: ${discordsend}" else fn_print_ok_nl "Sending Discord alert" fn_script_log_pass "Sending Discord alert" diff --git a/lgsm/modules/alert_email.sh b/lgsm/modules/alert_email.sh index e2cf5f123..0aca09fef 100644 --- a/lgsm/modules/alert_email.sh +++ b/lgsm/modules/alert_email.sh @@ -8,7 +8,6 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_print_dots "Sending Email alert: ${email}" -fn_sleep_time if [ -n "${emailfrom}" ]; then mail -s "${alertsubject}" -r "${emailfrom}" "${email}" < "${alertlog}" @@ -21,5 +20,5 @@ if [ "${exitcode}" == "0" ]; then fn_script_log_pass "Sending Email alert: ${email}" else fn_print_fail_nl "Sending Email alert: ${email}" - fn_script_log_fatal "Sending Email alert: ${email}" + fn_script_log_fail "Sending Email alert: ${email}" fi diff --git a/lgsm/modules/alert_gotify.sh b/lgsm/modules/alert_gotify.sh index ef833ba75..27e4d3439 100644 --- a/lgsm/modules/alert_gotify.sh +++ b/lgsm/modules/alert_gotify.sh @@ -26,5 +26,5 @@ if [ -n "${gotifysend}" ]; then fn_script_log_pass "Sending Gotify alert" else fn_print_fail_nl "Sending Gotify alert: ${gotifysend}" - fn_script_log_fatal "Sending Gotify alert: ${gotifysend}" + fn_script_log_fail "Sending Gotify alert: ${gotifysend}" fi diff --git a/lgsm/modules/alert_ifttt.sh b/lgsm/modules/alert_ifttt.sh index ae0de8ed6..c1ccfc9cb 100644 --- a/lgsm/modules/alert_ifttt.sh +++ b/lgsm/modules/alert_ifttt.sh @@ -22,7 +22,7 @@ iftttsend=$(curl --connect-timeout 10 -sSL -H "Content-Type: application/json" - if [ -n "${iftttsend}" ]; then fn_print_fail_nl "Sending IFTTT alert: ${pushbulletsend}" - fn_script_log_fatal "Sending IFTTT alert: ${pushbulletsend}" + fn_script_log_fail "Sending IFTTT alert: ${pushbulletsend}" else fn_print_ok_nl "Sending IFTTT alert" fn_script_log_pass "Sent IFTTT alert" diff --git a/lgsm/modules/alert_pushbullet.sh b/lgsm/modules/alert_pushbullet.sh index eec141611..3bcd6141b 100644 --- a/lgsm/modules/alert_pushbullet.sh +++ b/lgsm/modules/alert_pushbullet.sh @@ -23,7 +23,7 @@ pushbulletsend=$(curl --connect-timeout 10 -sSL -u """${pushbullettoken}"":" -H if [ -n "${pushbulletsend}" ]; then fn_print_fail_nl "Sending Pushbullet alert: ${pushbulletsend}" - fn_script_log_fatal "Sending Pushbullet alert: ${pushbulletsend}" + fn_script_log_fail "Sending Pushbullet alert: ${pushbulletsend}" else fn_print_ok_nl "Sending Pushbullet alert" fn_script_log_pass "Sent Pushbullet alert" diff --git a/lgsm/modules/alert_pushover.sh b/lgsm/modules/alert_pushover.sh index 608e73c30..35229094a 100644 --- a/lgsm/modules/alert_pushover.sh +++ b/lgsm/modules/alert_pushover.sh @@ -26,7 +26,7 @@ pushoversend=$(curl --connect-timeout 10 -sS -F token="${pushovertoken}" -F user if [ -n "${pushoversend}" ]; then fn_print_fail_nl "Sending Pushover alert: ${pushoversend}" - fn_script_log_fatal "Sending Pushover alert: ${pushoversend}" + fn_script_log_fail "Sending Pushover alert: ${pushoversend}" else fn_print_ok_nl "Sending Pushover alert" fn_script_log_pass "Sent Pushover alert" diff --git a/lgsm/modules/alert_rocketchat.sh b/lgsm/modules/alert_rocketchat.sh index 875a6ff5d..f6e410ef8 100644 --- a/lgsm/modules/alert_rocketchat.sh +++ b/lgsm/modules/alert_rocketchat.sh @@ -46,5 +46,5 @@ if [ -n "${rocketchatsend}" ]; then fn_script_log_pass "Sending Rocketchat alert" else fn_print_fail_nl "Sending Rocketchat alert: ${rocketchatsend}" - fn_script_log_fatal "Sending Rocketchat alert: ${rocketchatsend}" + fn_script_log_fail "Sending Rocketchat alert: ${rocketchatsend}" fi diff --git a/lgsm/modules/alert_slack.sh b/lgsm/modules/alert_slack.sh index 3bb148828..f83df9510 100644 --- a/lgsm/modules/alert_slack.sh +++ b/lgsm/modules/alert_slack.sh @@ -71,5 +71,5 @@ if [ "${slacksend}" == "ok" ]; then fn_script_log_pass "Sending Slack alert" else fn_print_fail_nl "Sending Slack alert: ${slacksend}" - fn_script_log_fatal "Sending Slack alert: ${slacksend}" + fn_script_log_fail "Sending Slack alert: ${slacksend}" fi diff --git a/lgsm/modules/alert_telegram.sh b/lgsm/modules/alert_telegram.sh index 77b89560c..d2e72346a 100644 --- a/lgsm/modules/alert_telegram.sh +++ b/lgsm/modules/alert_telegram.sh @@ -23,7 +23,7 @@ telegramsend=$(curl --connect-timeout 10 -sSL -H "Content-Type: application/json if [ -n "${telegramsend}" ]; then fn_print_fail_nl "Sending Telegram alert: ${telegramsend}" - fn_script_log_fatal "Sending Telegram alert: ${telegramsend}" + fn_script_log_fail "Sending Telegram alert: ${telegramsend}" else fn_print_ok_nl "Sending Telegram alert" fn_script_log_pass "Sent Telegram alert" diff --git a/lgsm/modules/check_config.sh b/lgsm/modules/check_config.sh index 4f96a8db4..436740afa 100644 --- a/lgsm/modules/check_config.sh +++ b/lgsm/modules/check_config.sh @@ -28,8 +28,8 @@ fi if [ "${shortname}" == "vh" ] && [ -z "${serverpassword}" ]; then fn_print_fail_nl "serverpassword is not set" - fn_script_log_fatal "serverpassword is not set" + fn_script_log_fail "serverpassword is not set" elif [ "${shortname}" == "vh" ] && [ "${#serverpassword}" -le "4" ]; then fn_print_fail_nl "serverpassword is to short (min 5 chars)" - fn_script_log_fatal "serverpassword is to short (min 5 chars)" + fn_script_log_fail "serverpassword is to short (min 5 chars)" fi diff --git a/lgsm/modules/check_deps.sh b/lgsm/modules/check_deps.sh index 2818ffc11..d10948ca5 100644 --- a/lgsm/modules/check_deps.sh +++ b/lgsm/modules/check_deps.sh @@ -80,7 +80,7 @@ fn_install_mono_repo() { if [ "${monoautoinstall}" != "1" ]; then if [ $? != 0 ]; then fn_print_failure_nl "Unable to install Mono repository." - fn_script_log_fatal "Unable to install Mono repository." + fn_script_log_fail "Unable to install Mono repository." else fn_print_complete_nl "Installing Mono repository completed." fn_script_log_pass "Installing Mono repository completed." @@ -138,7 +138,6 @@ fn_install_missing_deps() { fn_print_warn "Missing dependencies: ${red}${array_deps_missing[*]}${default}" fn_script_log_warn "Missing dependencies: ${array_deps_missing[*]}" fi - fn_sleep_time # Attempt automatic dependency installation if [ "${autoinstall}" == "1" ]; then @@ -216,7 +215,7 @@ fn_install_missing_deps() { if [ "${steamcmdfail}" ]; then if [ "${commandname}" == "INSTALL" ]; then fn_print_failure_nl "Missing dependencies required to run SteamCMD." - fn_script_log_fatal "Missing dependencies required to run SteamCMD." + fn_script_log_fail "Missing dependencies required to run SteamCMD." core_exit.sh else fn_print_error_nl "Missing dependencies required to run SteamCMD." @@ -336,15 +335,14 @@ fn_deps_detector() { if [ "${commandname}" == "INSTALL" ]; then if [ "$(whoami)" == "root" ]; then echo -e "" - echo -e "${lightyellow}Checking Dependencies as root${default}" - echo -e "=================================" + echo -e "${bold}${lightyellow}Checking ${gamename} Dependencies as root${default}" + fn_messages_separator fn_print_information_nl "Checking any missing dependencies for ${gamename} server only." fn_print_information_nl "This will NOT install a ${gamename} server." - fn_sleep_time else echo -e "" - echo -e "${lightyellow}Checking Dependencies${default}" - echo -e "=================================" + echo -e "${bold}${lightyellow}Checking ${gamename} Dependencies${default}" + fn_messages_separator fi fi diff --git a/lgsm/modules/check_executable.sh b/lgsm/modules/check_executable.sh index 6c8feab2a..91db68f1a 100644 --- a/lgsm/modules/check_executable.sh +++ b/lgsm/modules/check_executable.sh @@ -20,7 +20,7 @@ if [ ! -f "${executabledir}/${execname}" ]; then fn_print_fail_nl "executable was not found" echo -e "* ${executabledir}/${execname}" if [ -d "${lgsmlogdir}" ]; then - fn_script_log_fatal "Executable was not found: ${executabledir}/${execname}" + fn_script_log_fail "Executable was not found: ${executabledir}/${execname}" fi unset exitbypass core_exit.sh diff --git a/lgsm/modules/check_permissions.sh b/lgsm/modules/check_permissions.sh index d582e5f24..a6a37ce5c 100644 --- a/lgsm/modules/check_permissions.sh +++ b/lgsm/modules/check_permissions.sh @@ -25,7 +25,7 @@ fn_check_ownership() { fi if [ "${selfownissue}" == "1" ] || [ "${funcownissue}" == "1" ] || [ "${filesownissue}" == "1" ]; then fn_print_fail_nl "Ownership issues found" - fn_script_log_fatal "Ownership issues found" + fn_script_log_fail "Ownership issues found" fn_print_information_nl "The current user ($(whoami)) does not have ownership of the following files:" fn_script_log_info "The current user ($(whoami)) does not have ownership of the following files:" { @@ -56,7 +56,7 @@ fn_check_permissions() { if [ -d "${modulesdir}" ]; then if [ "$(find "${modulesdir}" -type f -not -executable | wc -l)" -ne "0" ]; then fn_print_fail_nl "Permissions issues found" - fn_script_log_fatal "Permissions issues found" + fn_script_log_fail "Permissions issues found" fn_print_information_nl "The following files are not executable:" fn_script_log_info "The following files are not executable:" { @@ -80,7 +80,7 @@ fn_check_permissions() { grouprootdirperm="${rootdirperm:1:1}" if [ "${userrootdirperm}" != "7" ] && [ "${grouprootdirperm}" != "7" ]; then fn_print_fail_nl "Permissions issues found" - fn_script_log_fatal "Permissions issues found" + fn_script_log_fail "Permissions issues found" fn_print_information_nl "The following directory does not have the correct permissions:" fn_script_log_info "The following directory does not have the correct permissions:" fn_script_log_info "${rootdir}" @@ -198,7 +198,7 @@ fn_sys_perm_errors_fix() { if [ "${sysdirpermerror}" == "1" ] || [ "${classdirpermerror}" == "1" ] || [ "${netdirpermerror}" == "1" ]; then fn_print_error "Could not fix /sys permissions" fn_script_log_error "Could not fix /sys permissions." - fn_sleep_time + # Show the user how to fix. fn_sys_perm_fix_manually_msg else diff --git a/lgsm/modules/check_root.sh b/lgsm/modules/check_root.sh index 063a2b0d3..81115394a 100644 --- a/lgsm/modules/check_root.sh +++ b/lgsm/modules/check_root.sh @@ -11,7 +11,7 @@ if [ "$(whoami)" == "root" ]; then if [ "${commandname}" != "INSTALL" ]; then fn_print_fail_nl "Do NOT run this script as root!" if [ -d "${lgsmlogdir}" ]; then - fn_script_log_fatal "${selfname} attempted to run as root." + fn_script_log_fail "${selfname} attempted to run as root." else # Forces exit code is log does not yet exist. exitcode=1 diff --git a/lgsm/modules/check_system_dir.sh b/lgsm/modules/check_system_dir.sh index 162037861..01c643748 100644 --- a/lgsm/modules/check_system_dir.sh +++ b/lgsm/modules/check_system_dir.sh @@ -10,7 +10,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ ! -d "${serverfiles}" ]; then fn_print_fail_nl "Cannot access ${serverfiles}: No such directory" if [ -d "${lgsmlogdir}" ]; then - fn_script_log_fatal "Cannot access ${serverfiles}: No such directory." + fn_script_log_fail "Cannot access ${serverfiles}: No such directory." fi core_exit.sh fi @@ -18,7 +18,7 @@ fi if [ ! -d "${systemdir}" ]; then fn_print_fail_nl "Cannot access ${systemdir}: No such directory" if [ -d "${lgsmlogdir}" ]; then - fn_script_log_fatal "Cannot access ${systemdir}: No such directory." + fn_script_log_fail "Cannot access ${systemdir}: No such directory." fi core_exit.sh fi diff --git a/lgsm/modules/check_tmuxception.sh b/lgsm/modules/check_tmuxception.sh index aded5cb2d..8f1f94c73 100644 --- a/lgsm/modules/check_tmuxception.sh +++ b/lgsm/modules/check_tmuxception.sh @@ -10,7 +10,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_check_is_in_tmux() { if [ "${TMUX}" ]; then fn_print_fail_nl "tmuxception error: Sorry Cobb you cannot start a tmux session inside of a tmux session." - fn_script_log_fatal "Tmuxception error: Attempted to start a tmux session inside of a tmux session." + fn_script_log_fail "Tmuxception error: Attempted to start a tmux session inside of a tmux session." fn_print_information_nl "LinuxGSM creates a tmux session when starting the server." echo -e "It is not possible to run a tmux session inside another tmux session" echo -e "https://docs.linuxgsm.com/requirements/tmux#tmuxception" @@ -21,7 +21,7 @@ fn_check_is_in_tmux() { fn_check_is_in_screen() { if [ "${STY}" ]; then fn_print_fail_nl "tmuxception error: Sorry Cobb you cannot start a tmux session inside of a screen session." - fn_script_log_fatal "Tmuxception error: Attempted to start a tmux session inside of a screen session." + fn_script_log_fail "Tmuxception error: Attempted to start a tmux session inside of a screen session." fn_print_information_nl "LinuxGSM creates a tmux session when starting the server." echo -e "It is not possible to run a tmux session inside screen session" echo -e "https://docs.linuxgsm.com/requirements/tmux#tmuxception" diff --git a/lgsm/modules/command_backup.sh b/lgsm/modules/command_backup.sh index b63c82625..16223c914 100644 --- a/lgsm/modules/command_backup.sh +++ b/lgsm/modules/command_backup.sh @@ -148,7 +148,7 @@ fn_backup_compression() { # 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_fatal "Problem identifying the previous backup directory for exclusion" + fn_script_log_fail "Problem identifying the previous backup directory for exclusion" core_exit.sh fi @@ -156,10 +156,10 @@ fn_backup_compression() { local exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol - fn_script_log_fatal "Backup in progress: FAIL" + fn_script_log_fail "Backup in progress: FAIL" echo -e "${extractcmd}" | tee -a "${lgsmlog}" fn_print_fail_nl "Starting backup" - fn_script_log_fatal "Starting backup" + fn_script_log_fail "Starting backup" else fn_print_ok_eol fn_print_ok_nl "Completed: ${backupname}.tar.gz, total size $(du -sh "${backupdir}/${backupname}.tar.gz" | awk '{print $1}')" @@ -217,7 +217,7 @@ fn_backup_relpath() { declare -a rdirtoks=($(readlink -f "${rootdir}" | sed "s/\// /g")) if [ ${#rdirtoks[@]} -eq 0 ]; then fn_print_fail_nl "Problem assessing rootdir during relative path assessment" - fn_script_log_fatal "Problem assessing rootdir during relative path assessment: ${rootdir}" + fn_script_log_fail "Problem assessing rootdir during relative path assessment: ${rootdir}" core_exit.sh fi @@ -225,7 +225,7 @@ fn_backup_relpath() { declare -a bdirtoks=($(readlink -f "${backupdir}" | sed "s/\// /g")) if [ ${#bdirtoks[@]} -eq 0 ]; then fn_print_fail_nl "Problem assessing backupdir during relative path assessment" - fn_script_log_fatal "Problem assessing backupdir during relative path assessment: ${rootdir}" + fn_script_log_fail "Problem assessing backupdir during relative path assessment: ${rootdir}" core_exit.sh fi diff --git a/lgsm/modules/command_debug.sh b/lgsm/modules/command_debug.sh index 41722e507..495417c16 100644 --- a/lgsm/modules/command_debug.sh +++ b/lgsm/modules/command_debug.sh @@ -82,7 +82,7 @@ echo -e "" echo -e "Use debug for identifying server issues only!" echo -e "Press CTRL+c to drop out of debug mode." fn_print_warning_nl "If ${selfname} is already running it will be stopped." -echo -e "" + if ! fn_prompt_yn "Continue?" Y; then exitcode=0 core_exit.sh diff --git a/lgsm/modules/command_dev_clear_modules.sh b/lgsm/modules/command_dev_clear_modules.sh index 52d07ee1a..bf19b2578 100644 --- a/lgsm/modules/command_dev_clear_modules.sh +++ b/lgsm/modules/command_dev_clear_modules.sh @@ -10,9 +10,9 @@ commandaction="Clearing modules" moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set -echo -e "=================================" -echo -e "Clear Modules" -echo -e "=================================" +echo -e "" +echo -e "${bold}${lightyellow}Clear Modules${default}" +fn_messages_separator echo -e "" if fn_prompt_yn "Do you want to delete all modules?" Y; then rm -rfv "${modulesdir:?}/"* diff --git a/lgsm/modules/command_dev_details.sh b/lgsm/modules/command_dev_details.sh index b95418121..2659465d3 100644 --- a/lgsm/modules/command_dev_details.sh +++ b/lgsm/modules/command_dev_details.sh @@ -17,8 +17,8 @@ info_game.sh carriagereturn=$(file -b "${servercfgfullpath}" | grep -q CRLF && echo "${red}CRLF${default}" || echo "${lightgreen}LF${default}") echo -e "" -echo -e "${lightgreen}Server Details${default}" -echo -e "==================================================================" +echo -e "${bold}${lightgreen}Server Details${default}" +fn_messages_separator echo -e "" echo -e "Game: ${gamename}" @@ -76,8 +76,8 @@ missing_details="" # Loop through the server details and output them. echo -e "" -echo -e "${lightgreen}Available Server Details${default}" -echo -e "=================================" +echo -e "${bold}${lightgreen}Available Server Details${default}" +fn_messages_separator for key in "${!server_details[@]}"; do value=${server_details[$key]} if [ -z "$value" ]; then @@ -91,7 +91,7 @@ done if [ -n "$missing_details" ]; then echo -e "" echo -e "${lightgreen}Missing Server Details${default}" - echo -e "=================================" + fn_messages_separator echo -e "${missing_details}" fi diff --git a/lgsm/modules/command_dev_detect_deps.sh b/lgsm/modules/command_dev_detect_deps.sh index 763ab5554..6215fb897 100644 --- a/lgsm/modules/command_dev_detect_deps.sh +++ b/lgsm/modules/command_dev_detect_deps.sh @@ -10,9 +10,9 @@ commandaction="Developer detect deps" moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set -echo -e "=================================" -echo -e "Dependencies Checker" -echo -e "=================================" +echo -e "" +echo -e "${bold}Dependencies Checker${default}" +fn_messages_separator echo -e "Checking directory: " echo -e "${serverfiles}" if [ "$(command -v eu-readelf 2> /dev/null)" ]; then @@ -182,33 +182,33 @@ awk -vORS='' '{ print $1,$2 }' "${tmpdir}/.depdetect_ubuntu_list_uniq" > "${tmpd awk -vORS='' '{ print $1,$2 }' "${tmpdir}/.depdetect_debian_list_uniq" > "${tmpdir}/.depdetect_debian_line" echo -e "" echo -e "" -echo -e "Required Dependencies" -echo -e "=================================" +echo -e "${bold}Required Dependencies${default}" +fn_messages_separator echo -e "${executable}" echo -e "" echo -e "CentOS" -echo -e "=================================" +fn_messages_separator cat "${tmpdir}/.depdetect_centos_line" echo -e "" echo -e "" echo -e "Ubuntu" -echo -e "=================================" +fn_messages_separator cat "${tmpdir}/.depdetect_ubuntu_line" echo -e "" echo -e "" echo -e "Debian" -echo -e "=================================" +fn_messages_separator cat "${tmpdir}/.depdetect_debian_line" echo -e "" if [ "${unknownlib}" == "1" ]; then echo -e "" echo -e "Unknown shared Library" - echo -e "=================================" + fn_messages_separator cat "${tmpdir}/.depdetect_unknown" fi echo -e "" echo -e "Required Librarys" -echo -e "=================================" +fn_messages_separator sort "${tmpdir}/.depdetect_readelf" | uniq echo -en "\n" rm -f "${tmpdir:?}/.depdetect_centos_line" diff --git a/lgsm/modules/command_dev_detect_glibc.sh b/lgsm/modules/command_dev_detect_glibc.sh index ca64ed7cc..214adc88e 100644 --- a/lgsm/modules/command_dev_detect_glibc.sh +++ b/lgsm/modules/command_dev_detect_glibc.sh @@ -11,13 +11,13 @@ commandaction="Developer detect glibc" moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set -echo -e "=================================" +fn_messages_separator echo -e "glibc Requirements Checker" -echo -e "=================================" +fn_messages_separator if [ ! "$(command -v objdump 2> /dev/null)" ]; then fn_print_failure_nl "objdump is missing" - fn_script_log_fatal "objdump is missing" + fn_script_log_fail "objdump is missing" core_exit.sh fi @@ -59,7 +59,7 @@ for glibc_check_var in "${glibc_check_dir_array[@]}"; do echo -e "" echo -e "" echo -e "${glibc_check_name} glibc Requirements" - echo -e "=================================" + fn_messages_separator if [ -f "${tmpdir}/detect_glibc_files_${glibc_check_var}.tmp" ]; then echo -e "Required glibc" cat "${tmpdir}/detect_glibc_${glibc_check_var}.tmp" | sort | uniq | sort -r --version-sort | head -1 | tee -a "${tmpdir}/detect_glibc_highest.tmp" @@ -81,7 +81,7 @@ for glibc_check_var in "${glibc_check_dir_array[@]}"; do done echo -e "" echo -e "Final glibc Requirement" -echo -e "=================================" +fn_messages_separator if [ -f "${tmpdir}/detect_glibc_highest.tmp" ]; then cat "${tmpdir}/detect_glibc_highest.tmp" | sort | uniq | sort -r --version-sort | head -1 rm -f "${tmpdir:?}/detect_glibc_highest.tmp" diff --git a/lgsm/modules/command_dev_detect_ldd.sh b/lgsm/modules/command_dev_detect_ldd.sh index 877c8d95b..af41bb522 100644 --- a/lgsm/modules/command_dev_detect_ldd.sh +++ b/lgsm/modules/command_dev_detect_ldd.sh @@ -11,9 +11,9 @@ commandaction="Developer detect ldd" moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set -echo -e "=================================" +fn_messages_separator echo -e "Shared Object dependencies Checker" -echo -e "=================================" +fn_messages_separator if [ -z "${serverfiles}" ]; then dir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") @@ -47,12 +47,12 @@ find "${serverfiles}" -type f -print0 \ echo -e "" echo -e "" echo -e "All" -echo -e "=================================" +fn_messages_separator cat "${tmpdir}/detect_ldd.tmp" echo -e "" echo -e "Not Found" -echo -e "=================================" +fn_messages_separator cat "${tmpdir}/detect_ldd_not_found.tmp" rm -f "${tmpdir:?}/detect_ldd.tmp" diff --git a/lgsm/modules/command_dev_query_raw.sh b/lgsm/modules/command_dev_query_raw.sh index 1abd6cdf3..cf9e14858 100644 --- a/lgsm/modules/command_dev_query_raw.sh +++ b/lgsm/modules/command_dev_query_raw.sh @@ -17,14 +17,14 @@ info_messages.sh echo -e "" echo -e "${lightgreen}Query IP Addresses${default}" -echo -e "==================================================================" +fn_messages_separator echo -e "" for queryip in "${queryips[@]}"; do echo -e "${queryip}" done echo -e "" echo -e "${lightgreen}Game Server Ports${default}" -echo -e "==================================================================" +fn_messages_separator { echo -e "${lightblue}Port Name \tPort Number \tStatus \tTCP \tUDP${default}" if [ -v port ]; then @@ -184,18 +184,18 @@ echo -e "==================================================================" | column -s $'\t' -t echo -e "" echo -e "${lightgreen}SS Output${default}" -echo -e "=================================" +fn_messages_separator fn_info_message_ports eval "${portcommand}" echo -e "" echo -e "${lightgreen}Query Port - Raw Output${default}" -echo -e "==================================================================" +fn_messages_separator echo -e "" echo -e "PORT: ${port}" echo -e "QUERY PORT: ${queryport}" echo -e "" echo -e "${lightgreen}Gamedig Raw Output${default}" -echo -e "=================================" +fn_messages_separator echo -e "" if [ ! "$(command -v gamedig 2> /dev/null)" ]; then fn_print_failure_nl "gamedig not installed" @@ -211,7 +211,7 @@ for queryip in "${queryips[@]}"; do done echo -e "" echo -e "${lightgreen}gsquery Raw Output${default}" -echo -e "=================================" +fn_messages_separator echo -e "" for queryip in "${queryips[@]}"; do echo -e "./query_gsquery.py -a \"${queryip}\" -p \"${queryport}\" -e \"${querytype}\"" @@ -223,7 +223,7 @@ for queryip in "${queryips[@]}"; do done echo -e "" echo -e "${lightgreen}TCP Raw Output${default}" -echo -e "=================================" +fn_messages_separator echo -e "" for queryip in "${queryips[@]}"; do echo -e "bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${queryport}''" @@ -239,10 +239,10 @@ for queryip in "${queryips[@]}"; do done echo -e "" echo -e "${lightgreen}Game Port - Raw Output${default}" -echo -e "==================================================================" +fn_messages_separator echo -e "" echo -e "${lightgreen}TCP Raw Output${default}" -echo -e "=================================" +fn_messages_separator echo -e "" for queryip in "${queryips[@]}"; do echo -e "bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${port}''" @@ -258,7 +258,7 @@ for queryip in "${queryips[@]}"; do done echo -e "" echo -e "${lightgreen}Steam Master Server Response${default}" -echo -e "==================================================================" +fn_messages_separator echo -e "" echo -e "curl -m 3 -s https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${publicip}" echo -e "" diff --git a/lgsm/modules/command_fastdl.sh b/lgsm/modules/command_fastdl.sh index 4aff9994d..acc3a1ba4 100644 --- a/lgsm/modules/command_fastdl.sh +++ b/lgsm/modules/command_fastdl.sh @@ -26,7 +26,7 @@ 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_fatal "bzip2 is not installed" + fn_script_log_fail "bzip2 is not installed" core_exit.sh fi @@ -37,7 +37,7 @@ echo -e "" # Prompts user for FastDL creation settings. echo -e "${commandaction} setup" -echo -e "=================================" +fn_messages_separator # Prompt for clearing old files if directory was already here. if [ -d "${fastdldir}" ]; then @@ -72,7 +72,7 @@ fn_clear_old_fastdl() { exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Clearing existing FastDL directory ${fastdldir}" + fn_script_log_fail "Clearing existing FastDL directory ${fastdldir}" core_exit.sh else fn_print_ok_eol_nl @@ -89,7 +89,7 @@ fn_fastdl_dirs() { exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Creating web directory ${webdir}" + fn_script_log_fail "Creating web directory ${webdir}" core_exit.sh else fn_print_ok_eol_nl @@ -102,7 +102,7 @@ fn_fastdl_dirs() { exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Creating fastdl directory ${fastdldir}" + fn_script_log_fail "Creating fastdl directory ${fastdldir}" core_exit.sh else fn_print_ok_eol_nl @@ -218,13 +218,13 @@ fn_fastdl_preview() { exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Calculating total file size." + fn_script_log_fail "Calculating total file size." core_exit.sh fi done < "${tmpdir}/fastdl_files_to_compress.txt" else fn_print_fail_eol_nl "generating file list" - fn_script_log_fatal "Generating file list." + fn_script_log_fail "Generating file list." core_exit.sh fi echo -e "about to compress ${totalfiles} files, total size $(fn_human_readable_file_size ${filesizetotal} 0)" @@ -251,7 +251,7 @@ fn_fastdl_gmod() { exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Copying ${fastdlfile} > ${fastdldir}" + fn_script_log_fail "Copying ${fastdlfile} > ${fastdldir}" core_exit.sh else fn_script_log_pass "Copying ${fastdlfile} > ${fastdldir}" @@ -268,7 +268,7 @@ fn_fastdl_gmod() { exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Updating addons file structure" + fn_script_log_fail "Updating addons file structure" core_exit.sh else fn_print_ok_eol_nl @@ -281,7 +281,7 @@ fn_fastdl_gmod() { exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Clearing addons dir from fastdl dir" + fn_script_log_fail "Clearing addons dir from fastdl dir" core_exit.sh else fn_print_ok_eol_nl @@ -296,7 +296,7 @@ fn_fastdl_gmod() { exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Correcting DarkRP files" + fn_script_log_fail "Correcting DarkRP files" core_exit.sh else fn_print_ok_eol_nl @@ -347,7 +347,7 @@ fn_fastdl_source() { exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Copying ${fastdlfile} > ${fastdldir}/${copytodir}" + fn_script_log_fail "Copying ${fastdlfile} > ${fastdldir}/${copytodir}" core_exit.sh else fn_script_log_pass "Copying ${fastdlfile} > ${fastdldir}/${copytodir}" @@ -383,7 +383,7 @@ fn_fastdl_gmod_dl_enforcer() { exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Removing existing download enforcer ${luafastdlfullpath}" + fn_script_log_fail "Removing existing download enforcer ${luafastdlfullpath}" core_exit.sh else fn_print_ok_eol_nl @@ -401,7 +401,7 @@ fn_fastdl_gmod_dl_enforcer() { exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Creating new download enforcer ${luafastdlfullpath}" + fn_script_log_fail "Creating new download enforcer ${luafastdlfullpath}" core_exit.sh else fn_print_ok_eol_nl @@ -418,7 +418,7 @@ fn_fastdl_bzip2() { exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Compressing ${filetocompress}" + fn_script_log_fail "Compressing ${filetocompress}" core_exit.sh else fn_script_log_pass "Compressing ${filetocompress}" diff --git a/lgsm/modules/command_install_resources_mta.sh b/lgsm/modules/command_install_resources_mta.sh index c3d745a30..31a9165fd 100644 --- a/lgsm/modules/command_install_resources_mta.sh +++ b/lgsm/modules/command_install_resources_mta.sh @@ -13,7 +13,7 @@ fn_firstcommand_set fn_install_resources() { echo -e "" echo -e "${lightyellow}Installing Default Resources${default}" - echo -e "=================================" + fn_messages_separator fn_fetch_file "http://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip" "" "" "" "${tmpdir}" "mtasa-resources-latest.zip" "nochmodx" "norun" "noforce" "nohash" fn_dl_extract "${tmpdir}" "mtasa-resources-latest.zip" "${resourcesdir}" echo -e "Default Resources Installed." diff --git a/lgsm/modules/command_mods_install.sh b/lgsm/modules/command_mods_install.sh index d602be2cd..19de72ab0 100644 --- a/lgsm/modules/command_mods_install.sh +++ b/lgsm/modules/command_mods_install.sh @@ -19,7 +19,7 @@ fn_print_header fn_mods_installed_list if [ "${installedmodscount}" -gt "0" ]; then echo -e "Installed addons/mods" - echo -e "=================================" + fn_messages_separator # Go through all available commands, get details and display them to the user. for ((llindex = 0; llindex < ${#installedmodslist[@]}; llindex++)); do # Current mod is the "llindex" value of the array we're going through. @@ -32,7 +32,7 @@ if [ "${installedmodscount}" -gt "0" ]; then fi echo -e "Available addons/mods" -echo -e "=================================" +fn_messages_separator # Display available mods from mods_list.sh. # Set and reset vars compatiblemodslistindex=0 @@ -78,7 +78,7 @@ fn_mod_get_info echo -e "" echo -e "Installing ${modprettyname}" -echo -e "=================================" +fn_messages_separator fn_script_log_info "${modprettyname} selected for install" # Check if the mod is already installed and warn the user. diff --git a/lgsm/modules/command_mods_remove.sh b/lgsm/modules/command_mods_remove.sh index 8f9ea3739..db7763cd8 100644 --- a/lgsm/modules/command_mods_remove.sh +++ b/lgsm/modules/command_mods_remove.sh @@ -16,7 +16,7 @@ fn_mods_check_installed fn_print_header echo -e "Remove addons/mods" -echo -e "=================================" +fn_messages_separator # Displays list of installed mods. # Generates list to display to user. @@ -72,7 +72,7 @@ while [ "${modfileline}" -le "${modsfilelistsize}" ]; do rm -rf "${modinstalldir:?}/${currentfileremove:?}" ((exitcode = $?)) if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "Removing ${modinstalldir}/${currentfileremove}" + fn_script_log_fail "Removing ${modinstalldir}/${currentfileremove}" break else fn_script_log_pass "Removing ${modinstalldir}/${currentfileremove}" @@ -103,7 +103,7 @@ fn_sleep_time rm -rf "${modsdir:?}/${modcommand}-files.txt" exitcode=$? if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "Removing ${modsdir}/${modcommand}-files.txt" + fn_script_log_fail "Removing ${modsdir}/${modcommand}-files.txt" fn_print_fail_eol_nl core_exit.sh else @@ -118,7 +118,7 @@ fn_sleep_time sed -i "/^${modcommand}$/d" "${modsinstalledlistfullpath}" exitcode=$? if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "Removing ${modcommand} from ${modsinstalledlist}" + fn_script_log_fail "Removing ${modcommand} from ${modsinstalledlist}" fn_print_fail_eol_nl core_exit.sh else diff --git a/lgsm/modules/command_mods_update.sh b/lgsm/modules/command_mods_update.sh index b917f191f..cfbafc80c 100644 --- a/lgsm/modules/command_mods_update.sh +++ b/lgsm/modules/command_mods_update.sh @@ -97,7 +97,7 @@ while [ "${installedmodsline}" -le "${installedmodscount}" ]; do ((installedmodsline++)) else fn_print_fail "No mod was selected" - fn_script_log_fatal "No mod was selected" + fn_script_log_fail "No mod was selected" exitcode="1" core_exit.sh fi diff --git a/lgsm/modules/command_monitor.sh b/lgsm/modules/command_monitor.sh index 5ce104a95..079ad334d 100644 --- a/lgsm/modules/command_monitor.sh +++ b/lgsm/modules/command_monitor.sh @@ -206,7 +206,7 @@ fn_monitor_check_session() { else fn_print_error "Checking session: " fn_print_fail_eol_nl - fn_script_log_fatal "Checking session: FAIL" + fn_script_log_fail "Checking session: FAIL" alert="restart" alert.sh fn_script_log_info "Checking session: Monitor is restarting ${selfname}" diff --git a/lgsm/modules/command_skeleton.sh b/lgsm/modules/command_skeleton.sh index 9e7c19a6a..48a6bd187 100644 --- a/lgsm/modules/command_skeleton.sh +++ b/lgsm/modules/command_skeleton.sh @@ -18,7 +18,7 @@ find "${rootdir}" -type d -not \( -path ./skel -prune \) | cpio -pdvm skel 2> /d exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_nl "Creating skeleton directory" - fn_script_log_fatal "Creating skeleton directory" + fn_script_log_fail "Creating skeleton directory" else fn_print_ok_nl "Creating skeleton directory: ./skel" fn_script_log_pass "Creating skeleton directory: ./skel" diff --git a/lgsm/modules/command_sponsor.sh b/lgsm/modules/command_sponsor.sh index 336f20f0a..ea49a3099 100755 --- a/lgsm/modules/command_sponsor.sh +++ b/lgsm/modules/command_sponsor.sh @@ -12,7 +12,7 @@ fn_firstcommand_set fn_print_ascii_logo echo -e "${lightyellow}Support LinuxGSM${default}" -echo -e "=================================" +fn_messages_separator echo -e "" echo -e "Been using LinuxGSM?" echo -e "Consider sponsoring to support development." diff --git a/lgsm/modules/command_start.sh b/lgsm/modules/command_start.sh index b2f46855d..4b45f0bc3 100644 --- a/lgsm/modules/command_start.sh +++ b/lgsm/modules/command_start.sh @@ -120,24 +120,24 @@ fn_start_tmux() { check_status.sh if [ "${status}" == "0" ]; then fn_print_fail_nl "Unable to start ${servername}" - fn_script_log_fatal "Unable to start ${servername}" + fn_script_log_fail "Unable to start ${servername}" if [ -s "${lgsmlogdir}/.${selfname}-tmux-error.tmp" ]; then fn_print_fail_nl "Unable to start ${servername}: tmux error:" - fn_script_log_fatal "Unable to start ${servername}: tmux error:" + fn_script_log_fail "Unable to start ${servername}: tmux error:" echo -e "" echo -e "Command" - echo -e "=================================" + fn_messages_separator echo -e "tmux -L \"${sessionname}\" new-session -d -s \"${sessionname}\" \"${preexecutable} ${executable} ${startparameters}\"" | tee -a "${lgsmlog}" echo -e "" echo -e "Error" - echo -e "=================================" + fn_messages_separator tee -a "${lgsmlog}" < "${lgsmlogdir}/.${selfname}-tmux-error.tmp" # Detected error https://linuxgsm.com/support if grep -c "Operation not permitted" "${lgsmlogdir}/.${selfname}-tmux-error.tmp"; then echo -e "" echo -e "Fix" - echo -e "=================================" + fn_messages_separator if ! grep "tty:" /etc/group | grep "$(whoami)"; then echo -e "$(whoami) is not part of the tty group." fn_script_log_info "$(whoami) is not part of the tty group." diff --git a/lgsm/modules/command_stop.sh b/lgsm/modules/command_stop.sh index 409e57b14..ee9152862 100644 --- a/lgsm/modules/command_stop.sh +++ b/lgsm/modules/command_stop.sh @@ -248,7 +248,7 @@ fn_stop_tmux() { fn_script_log_pass "Stopped ${servername}" else fn_print_fail_nl "Unable to stop ${servername}" - fn_script_log_fatal "Unable to stop ${servername}" + fn_script_log_fail "Unable to stop ${servername}" fi } diff --git a/lgsm/modules/command_update_linuxgsm.sh b/lgsm/modules/command_update_linuxgsm.sh index 3c4e6d080..65b72bcbb 100644 --- a/lgsm/modules/command_update_linuxgsm.sh +++ b/lgsm/modules/command_update_linuxgsm.sh @@ -24,7 +24,7 @@ if [ $? != "0" ]; then curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh" 1> /dev/null if [ $? != "0" ]; then fn_print_fail_nl "Selecting repo: Unable to to access GitHub or Bitbucket repositories" - fn_script_log_fatal "Selecting repo: Unable to to access GitHub or Bitbucket repositories" + fn_script_log_fail "Selecting repo: Unable to to access GitHub or Bitbucket repositories" core_exit.sh else remotereponame="Bitbucket" @@ -44,8 +44,8 @@ else fi if [ $? != "0" ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Checking ${remotereponame} linuxgsm.sh" - fn_script_log_fatal "Curl returned error: $?" + fn_script_log_fail "Checking ${remotereponame} linuxgsm.sh" + fn_script_log_fail "Curl returned error: $?" core_exit.sh fi @@ -82,7 +82,7 @@ if [ "${script_diff}" != "" ]; then cp "${rootdir}/${selfname}" "${backupdir}/script/${selfname}-$(date +"%m_%d_%Y_%M").bak" if [ $? != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Backup ${selfname}" + fn_script_log_fail "Backup ${selfname}" core_exit.sh else fn_print_ok_eol_nl @@ -103,7 +103,7 @@ if [ "${script_diff}" != "" ]; then if [ $? != "0" ]; then fn_print_fail_eol_nl - fn_script_log_fatal "copying ${selfname}" + fn_script_log_fail "copying ${selfname}" core_exit.sh else fn_print_ok_eol_nl @@ -124,8 +124,8 @@ else fi if [ $? != "0" ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Checking ${remotereponame} config _default.cfg" - fn_script_log_fatal "Curl returned error: $?" + fn_script_log_fail "Checking ${remotereponame} config _default.cfg" + fn_script_log_fail "Curl returned error: $?" core_exit.sh fi @@ -158,8 +158,8 @@ if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then fi if [ $? != "0" ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Checking ${remotereponame} ${distroid}-${distroversioncsv}.csv" - fn_script_log_fatal "Curl returned error: $?" + fn_script_log_fail "Checking ${remotereponame} ${distroid}-${distroversioncsv}.csv" + fn_script_log_fail "Curl returned error: $?" core_exit.sh fi @@ -200,7 +200,7 @@ if [ -n "${modulesdir}" ]; then echo -en "removing module ${modulefile}...\c" if ! rm -f "${modulefile:?}"; then fn_print_fail_eol_nl - fn_script_log_fatal "Removing module ${modulefile}" + fn_script_log_fail "Removing module ${modulefile}" core_exit.sh else fn_print_ok_eol_nl diff --git a/lgsm/modules/core_dl.sh b/lgsm/modules/core_dl.sh index 2a6c7c400..3b2e7f117 100644 --- a/lgsm/modules/core_dl.sh +++ b/lgsm/modules/core_dl.sh @@ -93,27 +93,27 @@ fn_dl_steamcmd() { # Not enough space. if [ -n "$(grep "0x202" "${steamcmdlog}" | tail -1)" ]; then fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files" - fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files" + fn_script_log_fail "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files" core_exit.sh # Not enough space. elif [ -n "$(grep "0x212" "${steamcmdlog}" | tail -1)" ]; then fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files" - fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files" + fn_script_log_fail "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files" core_exit.sh # Need tp purchase game. elif [ -n "$(grep "No subscription" "${steamcmdlog}" | tail -1)" ]; then fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Steam account does not have a license for the required game" - fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Steam account does not have a license for the required game" + fn_script_log_fail "${commandaction} ${selfname}: ${remotelocation}: Steam account does not have a license for the required game" core_exit.sh # Two-factor authentication failure elif [ -n "$(grep "Two-factor code mismatch" "${steamcmdlog}" | tail -1)" ]; then fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Two-factor authentication failure" - fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Two-factor authentication failure" + fn_script_log_fail "${commandaction} ${selfname}: ${remotelocation}: Two-factor authentication failure" core_exit.sh # Incorrect Branch password elif [ -n "$(grep "Password check for AppId" "${steamcmdlog}" | tail -1)" ]; then fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: betapassword is incorrect" - fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: betapassword is incorrect" + fn_script_log_fail "${commandaction} ${selfname}: ${remotelocation}: betapassword is incorrect" core_exit.sh # Update did not finish. elif [ -n "$(grep "0x402" "${steamcmdlog}" | tail -1)" ] || [ -n "$(grep "0x602" "${steamcmdlog}" | tail -1)" ]; then @@ -142,7 +142,7 @@ fn_dl_steamcmd() { if [ "${counter}" -gt "10" ]; then fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Did not complete the download, too many retrys" - fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Did not complete the download, too many retrys" + fn_script_log_fail "${commandaction} ${selfname}: ${remotelocation}: Did not complete the download, too many retrys" core_exit.sh fi done @@ -195,7 +195,7 @@ fn_dl_hash() { fn_print_fail_eol_nl echo -e "${local_filename} returned ${hashtype} checksum: ${hashsumcmd}" echo -e "expected ${hashtype} checksum: ${hash}" - fn_script_log_fatal "Verifying ${local_filename} with ${hashtype}" + fn_script_log_fail "Verifying ${local_filename} with ${hashtype}" fn_script_log_info "${local_filename} returned ${hashtype} checksum: ${hashsumcmd}" fn_script_log_info "Expected ${hashtype} checksum: ${hash}" core_exit.sh @@ -226,8 +226,8 @@ fn_dl_extract() { if [ ! -f "${local_filedir}/${local_filename}" ]; then fn_print_fail_eol_nl echo -en "file ${local_filedir}/${local_filename} not found" - fn_script_log_fatal "Extracting ${local_filename}" - fn_script_log_fatal "File ${local_filedir}/${local_filename} not found" + fn_script_log_fail "Extracting ${local_filename}" + fn_script_log_fail "File ${local_filedir}/${local_filename} not found" core_exit.sh fi mime=$(file -b --mime-type "${local_filedir}/${local_filename}") @@ -259,7 +259,7 @@ fn_dl_extract() { local exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Extracting ${local_filename}" + fn_script_log_fail "Extracting ${local_filename}" if [ -f "${lgsmlog}" ]; then echo -e "${extractcmd}" >> "${lgsmlog}" fi @@ -277,7 +277,6 @@ fn_fetch_trap() { echo -en "downloading ${local_filename}..." fn_print_canceled_eol_nl fn_script_log_info "Downloading ${local_filename}...CANCELED" - fn_sleep_time rm -f "${local_filedir:?}/${local_filename}" echo -en "downloading ${local_filename}..." fn_print_removed_eol_nl @@ -320,8 +319,8 @@ fn_check_file() { if [ ${counter} -ge 2 ]; then fn_print_fail_eol_nl if [ -f "${lgsmlog}" ]; then - fn_script_log_fatal "Checking ${remote_filename}" - fn_script_log_fatal "${fileurl}" + fn_script_log_fail "Checking ${remote_filename}" + fn_script_log_fail "${fileurl}" checkflag=1 fi else @@ -421,8 +420,8 @@ fn_fetch_file() { if [ ${counter} -ge 2 ]; then fn_print_fail_eol_nl if [ -f "${lgsmlog}" ]; then - fn_script_log_fatal "Downloading ${local_filename}..." - fn_script_log_fatal "${fileurl}" + fn_script_log_fail "Downloading ${local_filename}..." + fn_script_log_fail "${fileurl}" fi core_exit.sh else @@ -617,7 +616,7 @@ fn_dl_latest_release_github() { # Check how many releases we got from the api and exit if we have more then one. if [ "$(echo -e "${githubreleaseassets}" | jq '. | length')" -gt 1 ]; then fn_print_fatal_nl "Found more than one release to download - Please report this to the LinuxGSM issue tracker" - fn_script_log_fatal "Found more than one release to download - Please report this to the LinuxGSM issue tracker" + fn_script_log_fail "Found more than one release to download - Please report this to the LinuxGSM issue tracker" else # Set variables for download via fn_fetch_file. githubreleasefilename=$(echo -e "${githubreleaseassets}" | jq -r '.[]name') @@ -626,7 +625,7 @@ fn_dl_latest_release_github() { # Error if no version is there. if [ -z "${githubreleasefilename}" ]; then fn_print_fail_nl "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" - fn_script_log_fatal "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" + fn_script_log_fail "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" else # Fetch file from the remote location from the existing module to the ${tmpdir} for now. fn_fetch_file "${githubreleasedownloadlink}" "" "${githubreleasefilename}" "" "${githubreleasedownloadpath}" "${githubreleasefilename}" diff --git a/lgsm/modules/core_exit.sh b/lgsm/modules/core_exit.sh index 6947a3d4a..496cde422 100644 --- a/lgsm/modules/core_exit.sh +++ b/lgsm/modules/core_exit.sh @@ -29,7 +29,7 @@ elif [ "${exitcode}" != "0" ]; then # List LinuxGSM version in logs fn_script_log_info "LinuxGSM version: ${version}" if [ "${exitcode}" == "1" ]; then - fn_script_log_fatal "${moduleselfname} exiting with code: ${exitcode}" + fn_script_log_fail "${moduleselfname} exiting with code: ${exitcode}" elif [ "${exitcode}" == "2" ]; then fn_script_log_error "${moduleselfname} exiting with code: ${exitcode}" elif [ "${exitcode}" == "3" ]; then diff --git a/lgsm/modules/core_github.sh b/lgsm/modules/core_github.sh index 228fe1078..7290f9bdf 100644 --- a/lgsm/modules/core_github.sh +++ b/lgsm/modules/core_github.sh @@ -28,7 +28,7 @@ fn_github_get_latest_release_version() { # error if no version is there if [ -z "${githubreleaseversion}" ]; then fn_print_fail_nl "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" - fn_script_log_fatal "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" + fn_script_log_fail "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" fi } @@ -46,7 +46,7 @@ fn_github_set_latest_release_version() { # error if no version is there if [ -z "${githubreleaseversion}" ]; then fn_print_fail_nl "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" - fn_script_log_fatal "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" + fn_script_log_fail "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" else echo "${githubreleaseversion}" > "${githublocalversionfile}" fi @@ -81,7 +81,7 @@ fn_github_compare_version() { # error if no version is there if [ -z "${githubreleaseversion}" ]; then fn_print_fail_nl "Can not get version from Github Api for ${githubreleaseuser}/${githubreleaserepo}" - fn_script_log_fatal "Can not get version from Github Api for ${githubreleaseuser}/${githubreleaserepo}" + fn_script_log_fail "Can not get version from Github Api for ${githubreleaseuser}/${githubreleaserepo}" else if [ "${githublocalversion}" == "${githubreleaseversion}" ]; then echo -en "\n" diff --git a/lgsm/modules/core_logs.sh b/lgsm/modules/core_logs.sh index 8057f30f7..3166041ae 100644 --- a/lgsm/modules/core_logs.sh +++ b/lgsm/modules/core_logs.sh @@ -46,7 +46,6 @@ if [ "$(find "${lgsmlogdir}"/ -type f -mtime +"${logdays}" | wc -l)" -ne "0" ]; ulxcount="0" darkrpcount="0" legacycount="0" - fn_sleep_time fn_print_info "Removing logs older than ${logdays} days" fn_script_log_info "Removing logs older than ${logdays} days" # Logging logfiles to be removed according to "${logdays}", counting and removing them. diff --git a/lgsm/modules/core_messages.sh b/lgsm/modules/core_messages.sh index 6d3ca9a25..5af4c5639 100644 --- a/lgsm/modules/core_messages.sh +++ b/lgsm/modules/core_messages.sh @@ -70,7 +70,7 @@ fn_script_log_pass() { } ## Feb 28 14:56:58 ut99-server: Monitor: FATAL: -fn_script_log_fatal() { +fn_script_log_fail() { if [ -d "${lgsmlogdir}" ]; then if [ -n "${commandname}" ]; then echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: FATAL: ${1}" >> "${lgsmlog}" @@ -273,12 +273,22 @@ fn_print_start_nl() { # On-Screen - Interactive messages ################################## +# Separator is different for details. +fn_messages_separator() { + if [ "${commandname}" == "DETAILS" ]; then + printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = + else + echo -e "${bold}=================================${default}" + fn_sleep_time + fi +} + # No More Room in Hell Debug # ================================= fn_print_header() { echo -e "" - echo -e "${lightyellow}${gamename} ${commandaction}${default}" - echo -e "=================================${default}" + echo -e "${bold}${lightyellow}${gamename} ${commandaction}${default}" + fn_messages_separator } # Complete! diff --git a/lgsm/modules/core_steamcmd.sh b/lgsm/modules/core_steamcmd.sh index 6a7b25c11..e628e44b9 100644 --- a/lgsm/modules/core_steamcmd.sh +++ b/lgsm/modules/core_steamcmd.sh @@ -25,7 +25,7 @@ fn_check_steamcmd_user() { fn_print_fail_nl "Steam login not set. Update steamuser in ${configdirserver}" echo -e " * Change steamuser=\"username\" to a valid steam login." if [ -d "${lgsmlogdir}" ]; then - fn_script_log_fatal "Steam login not set. Update steamuser in ${configdirserver}" + fn_script_log_fail "Steam login not set. Update steamuser in ${configdirserver}" fi core_exit.sh fi @@ -129,7 +129,7 @@ fn_check_steamcmd_clear() { rm -rf "${steamcmddir:?}" exitcode=$? if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "Removing ${rootdir}/steamcmd" + fn_script_log_fail "Removing ${rootdir}/steamcmd" else fn_script_log_pass "Removing ${rootdir}/steamcmd" fi @@ -154,7 +154,7 @@ fn_update_steamcmd_localbuild() { # Checks if localbuild variable has been set. if [ -z "${localbuild}" ]; then fn_print_fail "Checking local build: ${remotelocation}: missing local build info" - fn_script_log_fatal "Missing local build info" + fn_script_log_fail "Missing local build info" core_exit.sh else fn_print_ok "Checking local build: ${remotelocation}" @@ -188,7 +188,7 @@ fn_update_steamcmd_remotebuild() { # Checks if remotebuildversion variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" - fn_script_log_fatal "Checking remote build" + fn_script_log_fail "Checking remote build" core_exit.sh else fn_print_ok "Checking remote build: ${remotelocation}" @@ -198,7 +198,7 @@ fn_update_steamcmd_remotebuild() { # Checks if remotebuild variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_failure "Unable to get remote build" - fn_script_log_fatal "Unable to get remote build" + fn_script_log_fail "Unable to get remote build" core_exit.sh fi fi @@ -305,7 +305,7 @@ fn_check_steamcmd_appmanifest() { # if error can not be resolved. if [ "${appmanifestfilewc}" -ge "2" ]; then fn_print_fail "Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files" - fn_script_log_fatal "Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files" + fn_script_log_fail "Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files" echo -e "* Check user permissions" for appfile in ${appmanifestfile}; do echo -e " ${appfile}" @@ -327,7 +327,7 @@ fn_check_steamcmd_appmanifest() { fn_appmanifest_info if [ "${appmanifestfilewc}" -eq "0" ]; then fn_print_fail_nl "Still no appmanifest_${appid}.acf found" - fn_script_log_fatal "Still no appmanifest_${appid}.acf found" + fn_script_log_fail "Still no appmanifest_${appid}.acf found" core_exit.sh fi fi diff --git a/lgsm/modules/fix.sh b/lgsm/modules/fix.sh index a7f5f7378..9a4f5b779 100644 --- a/lgsm/modules/fix.sh +++ b/lgsm/modules/fix.sh @@ -80,8 +80,7 @@ if [ "${commandname}" == "INSTALL" ]; then if grep -qEe "(^|\s)${shortname}(\s|$)" <<< "${apply_post_install_fix[@]}"; then echo -e "" echo -e "${lightyellow}Applying Post-Install Fixes${default}" - echo -e "=================================" - fn_sleep_time + fn_messages_separator postinstall=1 fn_apply_fix "post install" "${shortname}" fi diff --git a/lgsm/modules/fix_av.sh b/lgsm/modules/fix_av.sh index fbb259900..bfff59af6 100644 --- a/lgsm/modules/fix_av.sh +++ b/lgsm/modules/fix_av.sh @@ -13,7 +13,6 @@ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/linux64" if [ ! -f "${servercfgfullpath}" ]; then startparameters="--datapath ${avdatapath} --galaxy-name ${selfname} --init-folders-only" fn_print_information "starting ${gamename} server to generate configs." - fn_sleep_time cd "${systemdir}" || exit eval "${executable} ${startparameters}" fi diff --git a/lgsm/modules/fix_kf2.sh b/lgsm/modules/fix_kf2.sh index 46850bd64..13176d448 100644 --- a/lgsm/modules/fix_kf2.sh +++ b/lgsm/modules/fix_kf2.sh @@ -10,7 +10,6 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" startparameters="\"${defaultmap}?Game=KFGameContent.KFGameInfo_VersusSurvival\"" fn_print_information "starting ${gamename} server to generate configs." -fn_sleep_time exitbypass=1 command_start.sh fn_firstcommand_reset diff --git a/lgsm/modules/fix_lo.sh b/lgsm/modules/fix_lo.sh index 4c3758b01..4966afd57 100644 --- a/lgsm/modules/fix_lo.sh +++ b/lgsm/modules/fix_lo.sh @@ -9,9 +9,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" appidfile=${executabledir}/steam_appid.txt if [ ! -f "${appidfile}" ]; then fn_print_information "adding ${appidfile} to ${gamename} server." - fn_sleep_time echo "903950" > "${appidfile}" else fn_print_information "${appidfile} already exists. No action to be taken." - fn_sleep_time fi diff --git a/lgsm/modules/fix_mta.sh b/lgsm/modules/fix_mta.sh index 65488f2a1..4e533eb51 100644 --- a/lgsm/modules/fix_mta.sh +++ b/lgsm/modules/fix_mta.sh @@ -10,7 +10,6 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ ! -f "${lgsmdir}/lib/libmysqlclient.so.16" ]; then fixname="libmysqlclient16" fn_fix_msg_start_nl - fn_sleep_time fn_fetch_file "https://nightly.mtasa.com/files/modules/64/libmysqlclient.so.16" "" "" "" "${lgsmdir}/lib" "libmysqlclient.so.16" "chmodx" "norun" "noforce" "6c188e0f8fb5d7a29f4bc413b9fed6c2" fn_fix_msg_end fi diff --git a/lgsm/modules/fix_samp.sh b/lgsm/modules/fix_samp.sh index 461d92aee..24882f915 100644 --- a/lgsm/modules/fix_samp.sh +++ b/lgsm/modules/fix_samp.sh @@ -16,8 +16,8 @@ if [ -f "${servercfgfullpath}" ]; then fixname="change default rcon password" fn_fix_msg_start fn_script_log_info "changing rcon/admin password." - random=$(tr -dc A-Za-z0-9_ < /dev/urandom | head -c 8 | xargs) - rconpass="admin${random}" + randomstring=$(tr -dc 'A-Za-z0-9_' < /dev/urandom 2> /dev/null | head -c 8 | xargs) + rconpass="admin${randomstring}" sed -i "s/rcon_password changeme/rcon_password ${rconpass}/g" "${servercfgfullpath}" fn_fix_msg_end fi diff --git a/lgsm/modules/fix_ts3.sh b/lgsm/modules/fix_ts3.sh index c655a4322..5c80aa15e 100644 --- a/lgsm/modules/fix_ts3.sh +++ b/lgsm/modules/fix_ts3.sh @@ -40,7 +40,7 @@ if [ -f "${accountingfile}" ] && [ "${status}" == "0" ]; then # file is not owned by the current user and needs to be deleted manually. else fn_print_error_nl "File ${accountingfile} is not owned by $(whoami) and needs to be deleted manually" - fn_script_log_fatal "File ${accountingfile} is not owned by $(whoami) and needs to be deleted manually" + fn_script_log_fail "File ${accountingfile} is not owned by $(whoami) and needs to be deleted manually" core_exit.sh fi fi diff --git a/lgsm/modules/fix_ut3.sh b/lgsm/modules/fix_ut3.sh index 97326c786..d725de4a2 100644 --- a/lgsm/modules/fix_ut3.sh +++ b/lgsm/modules/fix_ut3.sh @@ -10,7 +10,6 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" startparameters="server VCTF-Suspense?Game=UTGameContent.UTVehicleCTFGame_Content?bIsDedicated=true?bIsLanMatch=false?bUsesStats=false?bShouldAdvertise=false?PureServer=1?bAllowJoinInProgress=true?ConfigSubDir=${selfname} -port=${port} -queryport=${queryport} -multihome=${ip} -nohomedir -unattended -log=${gamelog}" fn_print_information "starting ${gamename} server to generate configs." -fn_sleep_time exitbypass=1 command_start.sh fn_firstcommand_reset diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index a05da414f..340e11f6b 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -7,15 +7,6 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -# Separator is different for details. -fn_messages_separator() { - if [ "${commandname}" == "DETAILS" ]; then - printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = - else - echo -e "=================================" - fi -} - # Removes the passwords form all but details. fn_info_message_password_strip() { if [ "${commandname}" != "DETAILS" ]; then @@ -57,7 +48,7 @@ fn_info_message_password_strip() { # used with alertlog fn_info_message_head() { echo -e "" - echo -e "${lightyellow}Alert Summary${default}" + echo -e "${bold}${lightyellow}Alert Summary${default}" fn_messages_separator echo -e "Message" echo -e "${alertbody}" @@ -89,7 +80,7 @@ fn_info_message_distro() { # glibc: 2.31 echo -e "" - echo -e "${lightyellow}Distro Details${default}" + echo -e "${bold}${lightyellow}Distro Details${default}" fn_messages_separator { echo -e "${lightblue}Date:\t${default}$(date)" @@ -132,7 +123,7 @@ fn_info_message_server_resource() { # Internet IP: 176.58.124.96 echo -e "" - echo -e "${lightyellow}Server Resource${default}" + echo -e "${bold}${lightyellow}Server Resource${default}" fn_messages_separator { echo -e "${lightyellow}CPU\t${default}" @@ -185,7 +176,7 @@ fn_info_message_gameserver_resource() { # Backups: 24K echo -e "" - echo -e "${lightyellow}Game Server Resource Usage${default}" + echo -e "${bold}${lightgreen}${gamename} Resource Usage${default}" fn_messages_separator { if [ "${status}" != "0" ] && [ -v status ]; then @@ -234,7 +225,7 @@ fn_info_message_gameserver() { # Status: STARTED echo -e "" - echo -e "${lightgreen}${gamename} Server Details${default}" + echo -e "${bold}${lightgreen}${gamename} Server Details${default}" fn_info_message_password_strip fn_messages_separator { @@ -526,7 +517,7 @@ fn_info_message_script() { # Location: /home/lgsm/csgoserver # Config file: /home/lgsm/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg - echo -e "${lightgreen}${selfname} Script Details${default}" + echo -e "${bold}${lightgreen}${selfname} Script Details${default}" fn_messages_separator { # Script name @@ -618,7 +609,7 @@ fn_info_message_backup() { # size: 945M echo -e "" - echo -e "${lightgreen}Backups${default}" + echo -e "${bold}${lightgreen}Backups${default}" fn_messages_separator if [ ! -d "${backupdir}" ] || [ "${backupcount}" == "0" ]; then echo -e "No Backups created" @@ -646,7 +637,7 @@ fn_info_message_commandlineparms() { # ./run_server_x86.sh +set net_strict 1 echo -e "" - echo -e "${lightgreen}Command-line Parameters${default}" + echo -e "${bold}${lightgreen}Command-line Parameters${default}" fn_info_message_password_strip fn_messages_separator if [ "${serverpassword}" == "NOT SET" ]; then @@ -663,7 +654,7 @@ fn_info_message_ports_edit() { # Change ports by editing the parameters in: # /home/lgsm/qlserver/serverfiles/baseq3/ql-server.cfg echo -e "" - echo -e "${lightgreen}Ports${default}" + echo -e "${bold}${lightgreen}Ports${default}" fn_messages_separator echo -e "${lightblue}Change ports by editing the parameters in:${default}" @@ -726,8 +717,8 @@ fn_info_message_statusbottom() { fn_info_logs() { echo -e "" - echo -e "${selfname} Logs" - echo -e "=================================" + echo -e "${bold}${selfname} Logs" + fn_messages_separator if [ -n "${lgsmlog}" ]; then echo -e "\nScript log\n===================" @@ -1111,7 +1102,7 @@ fn_info_message_kf() { fn_port "Steam" steamport udp } | column -s $'\t' -t echo -e "" - echo -e "${lightgreen}${servername} Web Interface${default}" + echo -e "${bold}${lightgreen}${servername} Web Interface${default}" fn_messages_separator { echo -e "${lightblue}Web Interface enabled:\t${default}${httpenabled}" @@ -1130,7 +1121,7 @@ fn_info_message_kf2() { fn_port "Web Interface" httpport tcp } | column -s $'\t' -t echo -e "" - echo -e "${lightgreen}${servername} Web Interface${default}" + echo -e "${bold}${lightgreen}${servername} Web Interface${default}" fn_messages_separator { echo -e "${lightblue}Web Interface enabled:\t${default}${httpenabled}" @@ -1235,7 +1226,7 @@ fn_info_message_pc() { fn_port "API" apiport tcp } | column -s $'\t' -t echo -e "" - echo -e "${lightgreen}${gamename} Web Interface${default}" + echo -e "${bold}${lightgreen}${gamename} Web Interface${default}" fn_messages_separator { echo -e "${lightblue}Web Interface enabled:\t${default}${httpenabled}" @@ -1321,7 +1312,7 @@ fn_info_message_ro() { fn_port "Steam" steamport udp } | column -s $'\t' -t echo -e "" - echo -e "${lightgreen}${servername} Web Interface${default}" + echo -e "${bold}${lightgreen}${servername} Web Interface${default}" fn_messages_separator { echo -e "${lightblue}Web Interface enabled:\t${default}${httpenabled}" @@ -1400,7 +1391,7 @@ fn_info_message_sdtd() { fn_port "Telnet" telnetport tcp } | column -s $'\t' -t echo -e "" - echo -e "${lightgreen}${gamename} Web Interface${default}" + echo -e "${bold}${lightgreen}${gamename} Web Interface${default}" fn_messages_separator { echo -e "${lightblue}Web Interface enabled:\t${default}${httpenabled}" @@ -1408,7 +1399,7 @@ fn_info_message_sdtd() { echo -e "${lightblue}Web Interface password:\t${default}${httppassword}" } | column -s $'\t' -t echo -e "" - echo -e "${lightgreen}${gamename} Telnet${default}" + echo -e "${bold}${lightgreen}${gamename} Telnet${default}" fn_messages_separator { echo -e "${lightblue}Telnet enabled:\t${default}${telnetenabled}" @@ -1475,7 +1466,7 @@ fn_info_message_spark() { fn_port "Web Interface" httpport tcp } | column -s $'\t' -t echo -e "" - echo -e "${lightgreen}${gamename} Web Interface${default}" + echo -e "${bold}${lightgreen}${gamename} Web Interface${default}" fn_messages_separator { echo -e "${lightblue}Web Interface url:\t${default}http://${httpip}:${httpport}/index.html" @@ -1558,7 +1549,7 @@ fn_info_message_ut2k4() { fn_port "LAN" lanport udp } | column -s $'\t' -t echo -e "" - echo -e "${lightgreen}${servername} Web Interface${default}" + echo -e "${bold}${lightgreen}${gamename} Web Interface${default}" fn_messages_separator { echo -e "${lightblue}Web Interface enabled:\t${default}${httpenabled}" @@ -1577,7 +1568,7 @@ fn_info_message_unreal() { fn_port "Web Interface" httpport tcp } | column -s $'\t' -t echo -e "" - echo -e "${lightgreen}${servername} Web Interface${default}" + echo -e "${bold}${lightgreen}${gamename} Web Interface${default}" fn_messages_separator { echo -e "${lightblue}Web Interface enabled:\t${default}${httpenabled}" @@ -1613,7 +1604,7 @@ fn_info_message_ut3() { fn_port "Web Interface" httpport tcp } | column -s $'\t' -t echo -e "" - echo -e "${lightgreen}${servername} Web Interface${default}" + echo -e "${bold}${lightgreen}${gamename} Web Interface${default}" fn_messages_separator { echo -e "${lightblue}Web Interface enabled:\t${default}${httpenabled}" diff --git a/lgsm/modules/install_complete.sh b/lgsm/modules/install_complete.sh index 013ba7334..2c3cb2493 100644 --- a/lgsm/modules/install_complete.sh +++ b/lgsm/modules/install_complete.sh @@ -8,19 +8,19 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" -echo -e "=================================" +fn_messages_separator if [ "${exitcode}" == "1" ]; then - echo -e "Install Failed!" + echo -e "${bold}${red}Install Failed!${default}" fn_script_log_fatal "Install Failed!" elif [ "${exitcode}" == "2" ]; then - echo -e "Install Completed with Errors!" + echo -e "${bold}${red}Install Completed with Errors!${default}}" fn_script_log_error "Install Completed with Errors!" elif [ "${exitcode}" == "3" ]; then - echo -e "Install Completed with Warnings!" + echo -e "${bold}${lightyellow}Install Completed with Warnings!${default}}" fn_script_log_warn "Install Completed with Warnings!" elif [ -z "${exitcode}" ] || [ "${exitcode}" == "0" ]; then - echo -e "Install Complete!" + echo -e "${bold}${green}Install Complete!${default}" fn_script_log_pass "Install Complete!" fi diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index 54f819aaf..1e3c243ab 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -19,9 +19,12 @@ fn_check_cfgdir() { # Downloads default configs from Game-Server-Configs repo to lgsm/config-default. fn_fetch_default_config() { echo -e "" - echo -e "${lightyellow}Downloading ${gamename} Configs${default}" - echo -e "=================================" - echo -e "default configs from https://github.com/GameServerManagers/Game-Server-Configs" + echo -e "${bold}${lightyellow}Downloading ${gamename} Configs${default}" + fn_messages_separator + echo -e "Downloading default configs from:" + echo -e "" + echo -e "${italic}https://github.com/GameServerManagers/Game-Server-Configs${default}" + echo -e "" fn_sleep_time mkdir -p "${lgsmdir}/config-default/config-game" githuburl="https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/main" @@ -54,9 +57,20 @@ fn_default_config_remote() { # Copys local default config to server config location. fn_default_config_local() { - echo -e "copying ${servercfgdefault} config file." - cp -nv "${servercfgdir}/${servercfgdefault}" "${servercfgfullpath}" - fn_sleep_time + echo -e "" + echo -e "${bold}${lightyellow}Copying ${gamename} Configs${default}" + fn_messages_separator + echo -e "Copying default configs." + fn_check_cfgdir + echo -en "copying config file [ ${italic}${servercfgdefault}${default} ]" + cp -n "${servercfgdir}/${servercfgdefault}" "${servercfgfullpath}" + if [ "${exitcode}" != 0 ]; then + fn_print_fail_eol + fn_script_log_fatal "copying config file [ ${servercfgdefault} ]" + else + fn_print_ok_eol + fn_script_log_pass "copying config file [ ${servercfgdefault} ]" + fi } # Changes some variables within the default configs. @@ -64,9 +78,9 @@ fn_default_config_local() { # PASSWORD to random password fn_set_config_vars() { if [ -f "${servercfgfullpath}" ]; then - random=$(tr -dc 'A-Za-z0-9_' < /dev/urandom 2>/dev/null | head -c 8 | xargs) + randomstring=$(tr -dc 'A-Za-z0-9_' < /dev/urandom 2> /dev/null | head -c 8 | xargs) servername="LinuxGSM" - rconpass="admin${random}" + rconpass="admin${randomstring}" echo -e "changing hostname." fn_script_log_info "changing hostname." fn_sleep_time @@ -107,8 +121,8 @@ fn_set_dst_config_vars() { fn_sleep_time echo -e "randomizing cluster key." fn_script_log_info "randomizing cluster key." - randomkey=$(tr -dc A-Za-z0-9_ < /dev/urandom | head -c 8 | xargs) - sed -i "s/CLUSTERKEY/${randomkey}/g" "${clustercfgfullpath}" + randomstring=$(tr -dc 'A-Za-z0-9_' < /dev/urandom 2> /dev/null | head -c 8 | xargs) + sed -i "s/CLUSTERKEY/${randomstring}/g" "${clustercfgfullpath}" fn_sleep_time else echo -e "${clustercfg} is already configured." @@ -146,8 +160,8 @@ fn_set_dst_config_vars() { # Lists local config file locations fn_list_config_locations() { echo -e "" - echo -e "${lightyellow}Config File Locations${default}" - echo -e "=================================" + echo -e "${bold}${lightyellow}Config Locations${default}" + fn_messages_separator if [ -n "${servercfgfullpath}" ]; then if [ -f "${servercfgfullpath}" ]; then echo -e "Game Server Config File: ${servercfgfullpath}" diff --git a/lgsm/modules/install_dst_token.sh b/lgsm/modules/install_dst_token.sh index 43db58fab..89ec00a90 100644 --- a/lgsm/modules/install_dst_token.sh +++ b/lgsm/modules/install_dst_token.sh @@ -8,9 +8,8 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" -echo -e "${lightyellow}Enter ${gamename} Cluster Token${default}" -echo -e "=================================" -fn_sleep_time +echo -e "${bold}${lightyellow}Enter ${gamename} Cluster Token${default}" +fn_messages_separator echo -e "A cluster token is required to run this server!" echo -e "Follow the instructions in this link to obtain this key:" echo -e "https://linuxgsm.com/dst-auth-token" diff --git a/lgsm/modules/install_eula.sh b/lgsm/modules/install_eula.sh index d70ca7d31..7f0229bfa 100644 --- a/lgsm/modules/install_eula.sh +++ b/lgsm/modules/install_eula.sh @@ -16,9 +16,8 @@ elif [ "${shortname}" == "ut" ]; then fi echo -e "" -echo -e "${lightyellow}Accept ${gamename} EULA${default}" -echo -e "=================================" -fn_sleep_time +echo -e "${bold}${lightyellow}Accept ${gamename} EULA${default}" +fn_messages_separator echo -e "You are required to accept the EULA:" echo -e "${eulaurl}" echo -e "" diff --git a/lgsm/modules/install_factorio_save.sh b/lgsm/modules/install_factorio_save.sh index c86ee2f37..589a9d8ed 100644 --- a/lgsm/modules/install_factorio_save.sh +++ b/lgsm/modules/install_factorio_save.sh @@ -8,8 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" -echo -e "${lightyellow}Creating initial Factorio savefile${default}" -echo -e "=================================" -fn_sleep_time +echo -e "${bold}${lightyellow}Creating initial Factorio savefile${default}" +fn_messages_separator check_glibc.sh "${executabledir}"/factorio --create "${serverfiles}/save1" diff --git a/lgsm/modules/install_gslt.sh b/lgsm/modules/install_gslt.sh index e2224276f..772885d64 100644 --- a/lgsm/modules/install_gslt.sh +++ b/lgsm/modules/install_gslt.sh @@ -8,8 +8,8 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" -echo -e "${lightyellow}Game Server Login Token${default}" -echo -e "=================================" +echo -e "${bold}${lightyellow}Game Server Login Token${default}" +fn_messages_separator fn_sleep_time if [ "${shortname}" == "csgo" ] || [ "${shortname}" == "css" ] || [ "${shortname}" == "nmrih" ] || [ "${shortname}" == "bs" ]; then echo -e "GSLT is required to run a public ${gamename} server" diff --git a/lgsm/modules/install_header.sh b/lgsm/modules/install_header.sh index b52e116e7..a7f1f9ddb 100644 --- a/lgsm/modules/install_header.sh +++ b/lgsm/modules/install_header.sh @@ -9,14 +9,12 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" clear fn_print_ascii_logo -fn_sleep_time -echo -e "=================================" -echo -e "${lightyellow}Linux${default}GSM_" -echo -e "by Daniel Gibbs" +fn_messages_separator +echo -e "${bold}${lightyellow}Linux${default}${bold}GSM_${default}" +echo -e "${italic}by Daniel Gibbs${default}" echo -e "${lightblue}Version:${default} ${version}" echo -e "${lightblue}Game:${default} ${gamename}" echo -e "${lightblue}Website:${default} https://linuxgsm.com" echo -e "${lightblue}Contributors:${default} https://linuxgsm.com/contrib" echo -e "${lightblue}Sponsor:${default} https://linuxgsm.com/sponsor" -echo -e "=================================" -fn_sleep_time +fn_messages_separator diff --git a/lgsm/modules/install_logs.sh b/lgsm/modules/install_logs.sh index cd26addd3..5b12dd3e1 100644 --- a/lgsm/modules/install_logs.sh +++ b/lgsm/modules/install_logs.sh @@ -9,8 +9,9 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ "${checklogs}" != "1" ]; then echo -e "" - echo -e "${lightyellow}Creating log directories${default}" - echo -e "=================================" + echo -e "${bold}${lightyellow}Creating Log Directories${default}" + fn_messages_separator + fn_sleep_time fi fn_sleep_time # Create LinuxGSM logs. diff --git a/lgsm/modules/install_server_dir.sh b/lgsm/modules/install_server_dir.sh index 08e83dce6..0136e52fc 100644 --- a/lgsm/modules/install_server_dir.sh +++ b/lgsm/modules/install_server_dir.sh @@ -8,8 +8,8 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" -echo -e "${lightyellow}Server Directory${default}" -echo -e "=================================" +echo -e "${bold}${lightyellow}Server Directory${default}" +fn_messages_separator fn_sleep_time if [ -d "${serverfiles}" ]; then fn_print_warning_nl "A server is already installed here." diff --git a/lgsm/modules/install_server_files.sh b/lgsm/modules/install_server_files.sh index 70eb808b0..2763f470b 100644 --- a/lgsm/modules/install_server_files.sh +++ b/lgsm/modules/install_server_files.sh @@ -199,16 +199,15 @@ fn_install_server_files() { md5="0188ae86dbc9376f11ae3032dba2d665" else fn_print_fail_nl "Installing ${gamename} Server failed, missing default configuration" - fn_script_log_fatal "Installing ${gamename} Server failed, missing default configuration" + fn_script_log_fail "Installing ${gamename} Server failed, missing default configuration" fi fn_fetch_file "${remote_fileurl}" "" "" "" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" fn_dl_extract "${local_filedir}" "${local_filename}" "${serverfiles}" } echo -e "" -echo -e "${lightyellow}Installing ${gamename} Server${default}" -echo -e "=================================" -fn_sleep_time +echo -e "${bold}${lightyellow}Installing ${gamename} Server${default}" +fn_messages_separator if [ "${appid}" ]; then remotelocation="SteamCMD" @@ -250,7 +249,7 @@ fi if [ -z "${autoinstall}" ]; then echo -e "" - echo -e "=================================" + fn_messages_separator if ! fn_prompt_yn "Was the install successful?" Y; then install_retry.sh fi diff --git a/lgsm/modules/install_squad_license.sh b/lgsm/modules/install_squad_license.sh index 75499f4a0..604b3bcad 100644 --- a/lgsm/modules/install_squad_license.sh +++ b/lgsm/modules/install_squad_license.sh @@ -8,9 +8,8 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" -echo -e "${lightyellow}Squad Server License${default}" -echo -e "=================================" -fn_sleep_time +echo -e "${bold}${lightyellow}${gamename} Server License${default}" +fn_messages_separator echo -e "Server license is an optional feature for ${gamename} server" fn_script_log_info "Server license is an optional feature for ${gamename} server" diff --git a/lgsm/modules/install_stats.sh b/lgsm/modules/install_stats.sh index 8c65c007c..c3e92323d 100644 --- a/lgsm/modules/install_stats.sh +++ b/lgsm/modules/install_stats.sh @@ -8,12 +8,13 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" -echo -e "${lightyellow}LinuxGSM Stats${default}" -echo -e "=================================" +echo -e "${bold}${lightyellow}LinuxGSM Stats${default}" +fn_messages_separator fn_sleep_time echo -e "Assist LinuxGSM development by sending anonymous stats to developers." -echo -e "More info: https://docs.linuxgsm.com/configuration/linuxgsm-stats" -echo -e "The following info will be sent:" +echo -e "Collected data is publicly available: ${italic}https://linuxgsm.com/data/usage${default}" +echo -e "More info: ${italic}https://docs.linuxgsm.com/configuration/linuxgsm-stats${default}" +echo -e "The following info will be sent: " echo -e "* game server" echo -e "* distro" echo -e "* game server resource usage" diff --git a/lgsm/modules/install_steamcmd.sh b/lgsm/modules/install_steamcmd.sh index 8eeb2de53..50599ebd5 100644 --- a/lgsm/modules/install_steamcmd.sh +++ b/lgsm/modules/install_steamcmd.sh @@ -8,7 +8,6 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" -echo -e "${lightyellow}Installing SteamCMD${default}" -echo -e "=================================" -fn_sleep_time +echo -e "${bold}${lightyellow}Installing SteamCMD${default}" +fn_messages_separator check_steamcmd.sh diff --git a/lgsm/modules/install_ts3db.sh b/lgsm/modules/install_ts3db.sh index 703f9b645..e5776c30f 100644 --- a/lgsm/modules/install_ts3db.sh +++ b/lgsm/modules/install_ts3db.sh @@ -14,7 +14,7 @@ fn_install_ts3db_mariadb() { local exitcode=$? if [ "${exitcode}" != "0" ]; then fn_print_fail_eol_nl - fn_script_log_fatal "copying libmariadb.so.2" + fn_script_log_fail "copying libmariadb.so.2" core_exit.sh else fn_print_ok_eol_nl @@ -23,9 +23,8 @@ fn_install_ts3db_mariadb() { fi echo -e "" - echo -e "${lightyellow}Configure ${gamename} Server for MariaDB${default}" - echo -e "=================================" - fn_sleep_time + echo -e "${bold}${lightyellow}Configure ${gamename} Server for MariaDB${default}" + fn_messages_separator read -rp "Enter MariaDB hostname: " mariahostname read -rp "Enter MariaDB port: " mariaport read -rp "Enter MariaDB username: " mariausername @@ -50,9 +49,8 @@ fn_install_ts3db_mariadb() { } echo -e "" -echo -e "${lightyellow}Select Database${default}" -echo -e "=================================" -fn_sleep_time +echo -e "${bold}${lightyellow}Select Database${default}" +fn_messages_separator if [ -z "${autoinstall}" ]; then if fn_prompt_yn "Do you want to use MariaDB instead of sqlite? (MariaDB must be pre-configured)" N; then fn_install_ts3db_mariadb @@ -64,9 +62,8 @@ fi install_eula.sh echo -e "" -echo -e "${lightyellow}Getting Privilege Key${default}" -echo -e "=================================" -fn_sleep_time +echo -e "${bold}${lightyellow}Getting Privilege Key${default}" +fn_messages_separator fn_print_information_nl "Save these details for later." fn_print_information_nl "Key also saved in:" echo -e "${serverfiles}/privilege_key.txt" diff --git a/lgsm/modules/install_ut2k4_key.sh b/lgsm/modules/install_ut2k4_key.sh index c09c4590c..6fbd2a838 100644 --- a/lgsm/modules/install_ut2k4_key.sh +++ b/lgsm/modules/install_ut2k4_key.sh @@ -8,9 +8,8 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" -echo -e "${lightyellow}Enter ${gamename} CD Key${default}" -echo -e "=================================" -fn_sleep_time +echo -e "${bold}${lightyellow}Enter ${gamename} CD Key${default}" +fn_messages_separator echo -e "To get your server listed on the Master Server list" echo -e "you must get a free CD key. Get a key here:" echo -e "https://www.epicgames.com/unrealtournament/forums/cdkey.php?2004" diff --git a/lgsm/modules/mods_core.sh b/lgsm/modules/mods_core.sh index 2078ae167..1b85a95b3 100644 --- a/lgsm/modules/mods_core.sh +++ b/lgsm/modules/mods_core.sh @@ -22,7 +22,7 @@ fn_mod_install_files() { # Check if variable is valid checking if file has been downloaded and exists. if [ ! -f "${modstmpdir}/${modfilename}" ]; then fn_print_failure "An issue occurred downloading ${modprettyname}" - fn_script_log_fatal "An issue occurred downloading ${modprettyname}" + fn_script_log_fail "An issue occurred downloading ${modprettyname}" core_exit.sh fi if [ ! -d "${extractdest}" ]; then @@ -77,7 +77,7 @@ fn_mod_create_filelist() { local exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Building ${modsdir}/${modcommand}-files.txt" + fn_script_log_fail "Building ${modsdir}/${modcommand}-files.txt" core_exit.sh else fn_print_ok_eol_nl @@ -97,7 +97,7 @@ fn_mod_copy_destination() { local exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Copying ${modprettyname} to ${modinstalldir}" + fn_script_log_fail "Copying ${modprettyname} to ${modinstalldir}" else fn_print_ok_eol_nl fn_script_log_pass "Copying ${modprettyname} to ${modinstalldir}" @@ -135,7 +135,7 @@ fn_mod_tidy_files_list() { local exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Error while tidying line: ${removefilevar} from: ${modsdir}/${modcommand}-files.txt" + fn_script_log_fail "Error while tidying line: ${removefilevar} from: ${modsdir}/${modcommand}-files.txt" core_exit.sh break fi @@ -228,7 +228,7 @@ fn_mod_get_info() { # Define all variables for a mod at once when index is set to a separator. fn_mods_define() { if [ -z "$index" ]; then - fn_script_log_fatal "index variable not set. Please report an issue." + fn_script_log_fail "index variable not set. Please report an issue." fn_print_error "index variable not set. Please report an issue." echo -e "* https://github.com/GameServerManagers/LinuxGSM/issues" core_exit.sh @@ -390,7 +390,7 @@ fn_create_mods_dir() { exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Creating mod download dir ${modsdir}" + fn_script_log_fail "Creating mod download dir ${modsdir}" core_exit.sh else fn_print_ok_eol_nl @@ -404,7 +404,7 @@ fn_create_mods_dir() { exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Creating mod install directory ${modinstalldir}" + fn_script_log_fail "Creating mod install directory ${modinstalldir}" core_exit.sh else fn_print_ok_eol_nl @@ -427,7 +427,7 @@ fn_mods_create_tmp_dir() { echo -en "creating mod download directory ${modstmpdir}..." if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Creating mod download directory ${modstmpdir}" + fn_script_log_fail "Creating mod download directory ${modstmpdir}" core_exit.sh else fn_print_ok_eol_nl @@ -444,7 +444,7 @@ fn_mods_clear_tmp_dir() { exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Clearing mod download directory ${modstmpdir}" + fn_script_log_fail "Clearing mod download directory ${modstmpdir}" core_exit.sh else fn_print_ok_eol_nl @@ -491,12 +491,12 @@ fn_check_mod_files_list() { if [ "${modsfilelistsize}" -eq 0 ]; then fn_print_failure "${modcommand}-files.txt is empty" echo -e "* Unable to remove ${modprettyname}" - fn_script_log_fatal "${modcommand}-files.txt is empty: Unable to remove ${modprettyname}." + fn_script_log_fail "${modcommand}-files.txt is empty: Unable to remove ${modprettyname}." core_exit.sh fi else fn_print_failure "${modsdir}/${modcommand}-files.txt does not exist" - fn_script_log_fatal "${modsdir}/${modcommand}-files.txt does not exist: Unable to remove ${modprettyname}." + fn_script_log_fail "${modsdir}/${modcommand}-files.txt does not exist: Unable to remove ${modprettyname}." core_exit.sh fi } @@ -519,7 +519,7 @@ fn_mod_exist() { fn_mod_required_fail_exist() { modreq=$1 # requires one parameter, the mod - fn_script_log_fatal "${modreq}-files.txt is empty: unable to find ${modreq} installed" + fn_script_log_fail "${modreq}-files.txt is empty: unable to find ${modreq} installed" echo -en "* Unable to find '${modreq}' which is required prior to installing this mod..." fn_print_fail_eol_nl core_exit.sh @@ -581,7 +581,7 @@ fn_mod_install_liblist_gam_file() { exitcode=$? # if replacement back didn't happen, error out. if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "${logentry}" + fn_script_log_fail "${logentry}" fn_print_fail_eol_nl else fn_script_log_pass "${logentry}" @@ -597,7 +597,7 @@ fn_mod_install_liblist_gam_file() { exitcode=$? # if replacement back didn't happen, error out if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "${logentry}" + fn_script_log_fail "${logentry}" fn_print_fail_eol_nl else fn_script_log_pass "${logentry}" @@ -615,7 +615,7 @@ fn_mod_install_liblist_gam_file() { exitcode=$? # if replacement back didn't happen, error out. if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "${logentry}" + fn_script_log_fail "${logentry}" fn_print_fail_eol_nl else fn_script_log_pass ${logentry} @@ -639,7 +639,7 @@ fn_mod_remove_liblist_gam_file() { exitcode=$? # if replacement back didn't happen, error out. if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "${logentry}" + fn_script_log_fail "${logentry}" fn_print_fail_eol_nl else fn_script_log_pass ${logentry} @@ -655,7 +655,7 @@ fn_mod_remove_liblist_gam_file() { exitcode=$? # if replacement back didn't happen, error out if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "${logentry}" + fn_script_log_fail "${logentry}" fn_print_fail_eol_nl else fn_script_log_pass ${logentry} @@ -673,7 +673,7 @@ fn_mod_remove_liblist_gam_file() { # if replacement back didn't happen, error out. exitcode=$? if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "${logentry}" + fn_script_log_fail "${logentry}" fn_print_fail_eol_nl else fn_script_log_pass ${logentry} @@ -696,7 +696,7 @@ fn_mod_install_amxmodx_file() { echo "linux addons/amxmodx/dlls/amxmodx_mm_i386.so" >> "${modinstalldir}/addons/metamod/plugins.ini" exitcode=$? if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "${logentry}" + fn_script_log_fail "${logentry}" fn_print_fail_eol_nl else fn_script_log_pass ${logentry} @@ -708,7 +708,7 @@ fn_mod_install_amxmodx_file() { echo "linux addons/amxmodx/dlls/amxmodx_mm_i386.so" > "${modinstalldir}/addons/metamod/plugins.ini" exitcode=$? if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "${logentry}" + fn_script_log_fail "${logentry}" fn_print_fail_eol_nl core_exit.sh else @@ -733,7 +733,7 @@ fn_mod_remove_amxmodx_file() { sed -i '/^$/d' "${modinstalldir}/addons/metamod/plugins.ini" exitcode=$? if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "${logentry}" + fn_script_log_fail "${logentry}" fn_print_fail_eol_nl else fn_script_log_pass ${logentry} diff --git a/lgsm/modules/update_fctr.sh b/lgsm/modules/update_fctr.sh index 9b88fcd17..2eef0d4cd 100644 --- a/lgsm/modules/update_fctr.sh +++ b/lgsm/modules/update_fctr.sh @@ -46,7 +46,7 @@ fn_update_remotebuild() { # Checks if remotebuildversion variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" - fn_script_log_fatal "Checking remote build" + fn_script_log_fail "Checking remote build" core_exit.sh else fn_print_ok "Checking remote build: ${remotelocation}" @@ -56,7 +56,7 @@ fn_update_remotebuild() { # Checks if remotebuild variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_failure "Unable to get remote build" - fn_script_log_fatal "Unable to get remote build" + fn_script_log_fail "Unable to get remote build" core_exit.sh fi fi diff --git a/lgsm/modules/update_jk2.sh b/lgsm/modules/update_jk2.sh index e67b0c02b..f685fd4cb 100644 --- a/lgsm/modules/update_jk2.sh +++ b/lgsm/modules/update_jk2.sh @@ -43,7 +43,7 @@ fn_update_remotebuild() { # Checks if remotebuildversion variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" - fn_script_log_fatal "Checking remote build" + fn_script_log_fail "Checking remote build" core_exit.sh else fn_print_ok "Checking remote build: ${remotelocation}" @@ -53,7 +53,7 @@ fn_update_remotebuild() { # Checks if remotebuild variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_failure "Unable to get remote build" - fn_script_log_fatal "Unable to get remote build" + fn_script_log_fail "Unable to get remote build" core_exit.sh fi fi diff --git a/lgsm/modules/update_mc.sh b/lgsm/modules/update_mc.sh index 2f7381da7..c4aa1b425 100644 --- a/lgsm/modules/update_mc.sh +++ b/lgsm/modules/update_mc.sh @@ -58,7 +58,7 @@ fn_update_remotebuild() { # Checks if remotebuildversion variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" - fn_script_log_fatal "Checking remote build" + fn_script_log_fail "Checking remote build" core_exit.sh else fn_print_ok "Checking remote build: ${remotelocation}" @@ -68,7 +68,7 @@ fn_update_remotebuild() { # Checks if remotebuild variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_failure "Unable to get remote build" - fn_script_log_fatal "Unable to get remote build" + fn_script_log_fail "Unable to get remote build" core_exit.sh fi fi diff --git a/lgsm/modules/update_mcb.sh b/lgsm/modules/update_mcb.sh index f3a802e9e..eb8adfd12 100644 --- a/lgsm/modules/update_mcb.sh +++ b/lgsm/modules/update_mcb.sh @@ -18,7 +18,7 @@ fn_update_dl() { local exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Extracting ${local_filename}" + fn_script_log_fail "Extracting ${local_filename}" if [ -f "${lgsmlog}" ]; then echo -e "${extractcmd}" >> "${lgsmlog}" fi @@ -50,10 +50,10 @@ fn_update_localbuild() { fn_update_remotebuild() { # Random number for userAgent - randnum=$((1 + RANDOM % 5000)) + 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.${randnum}.212 Safari/537.36" "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*' | sed 's/.*\///' | grep -Eo "[.0-9]+[0-9]") + 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://minecraft.azureedge.net/bin-linux/[^"]*' | sed 's/.*\///' | grep -Eo "[.0-9]+[0-9]") else remotebuildversion="${mcversion}" fi @@ -64,7 +64,7 @@ fn_update_remotebuild() { # Checks if remotebuildversion variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" - fn_script_log_fatal "Checking remote build" + fn_script_log_fail "Checking remote build" core_exit.sh else fn_print_ok "Checking remote build: ${remotelocation}" @@ -74,7 +74,7 @@ fn_update_remotebuild() { # Checks if remotebuild variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_failure "Unable to get remote build" - fn_script_log_fatal "Unable to get remote build" + fn_script_log_fail "Unable to get remote build" core_exit.sh fi fi diff --git a/lgsm/modules/update_mta.sh b/lgsm/modules/update_mta.sh index fd728b22d..cd1195563 100644 --- a/lgsm/modules/update_mta.sh +++ b/lgsm/modules/update_mta.sh @@ -45,7 +45,7 @@ fn_update_remotebuild() { # Checks if remotebuildversion variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" - fn_script_log_fatal "Checking remote build" + fn_script_log_fail "Checking remote build" core_exit.sh else fn_print_ok "Checking remote build: ${remotelocation}" @@ -55,7 +55,7 @@ fn_update_remotebuild() { # Checks if remotebuild variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_failure "Unable to get remote build" - fn_script_log_fatal "Unable to get remote build" + fn_script_log_fail "Unable to get remote build" core_exit.sh fi fi diff --git a/lgsm/modules/update_pmc.sh b/lgsm/modules/update_pmc.sh index 2ad6b91ab..9bfa82101 100644 --- a/lgsm/modules/update_pmc.sh +++ b/lgsm/modules/update_pmc.sh @@ -68,7 +68,7 @@ fn_update_remotebuild() { # Checks if remotebuildversion variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" - fn_script_log_fatal "Checking remote build" + fn_script_log_fail "Checking remote build" core_exit.sh else fn_print_ok "Checking remote build: ${remotelocation}" @@ -78,7 +78,7 @@ fn_update_remotebuild() { # Checks if remotebuild variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_failure "Unable to get remote build" - fn_script_log_fatal "Unable to get remote build" + fn_script_log_fail "Unable to get remote build" core_exit.sh fi fi diff --git a/lgsm/modules/update_ts3.sh b/lgsm/modules/update_ts3.sh index bb137a0b3..c00ae75cb 100644 --- a/lgsm/modules/update_ts3.sh +++ b/lgsm/modules/update_ts3.sh @@ -50,7 +50,7 @@ fn_update_remotebuild() { # Checks if remotebuildversion variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" - fn_script_log_fatal "Checking remote build" + fn_script_log_fail "Checking remote build" core_exit.sh else fn_print_ok "Checking remote build: ${remotelocation}" @@ -60,7 +60,7 @@ fn_update_remotebuild() { # Checks if remotebuild variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_failure "Unable to get remote build" - fn_script_log_fatal "Unable to get remote build" + fn_script_log_fail "Unable to get remote build" core_exit.sh fi fi @@ -164,7 +164,7 @@ elif [ "${arch}" == "i386" ] || [ "${arch}" == "i686" ]; then ts3arch="x86" else fn_print_failure "Unknown or unsupported architecture: ${arch}" - fn_script_log_fatal "Unknown or unsupported architecture: ${arch}" + fn_script_log_fail "Unknown or unsupported architecture: ${arch}" core_exit.sh fi diff --git a/lgsm/modules/update_ut99.sh b/lgsm/modules/update_ut99.sh index c1dc1dade..bdd3631f3 100644 --- a/lgsm/modules/update_ut99.sh +++ b/lgsm/modules/update_ut99.sh @@ -44,7 +44,7 @@ fn_update_remotebuild() { # Checks if remotebuildversion variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" - fn_script_log_fatal "Checking remote build" + fn_script_log_fail "Checking remote build" core_exit.sh else fn_print_ok "Checking remote build: ${remotelocation}" @@ -54,7 +54,7 @@ fn_update_remotebuild() { # Checks if remotebuild variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_failure "Unable to get remote build" - fn_script_log_fatal "Unable to get remote build" + fn_script_log_fail "Unable to get remote build" core_exit.sh fi fi diff --git a/lgsm/modules/update_vints.sh b/lgsm/modules/update_vints.sh index 47195b9b2..b38372058 100644 --- a/lgsm/modules/update_vints.sh +++ b/lgsm/modules/update_vints.sh @@ -51,7 +51,7 @@ fn_update_remotebuild() { # Checks if remotebuildversion variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" - fn_script_log_fatal "Checking remote build" + fn_script_log_fail "Checking remote build" core_exit.sh else fn_print_ok "Checking remote build: ${remotelocation}" @@ -61,7 +61,7 @@ fn_update_remotebuild() { # Checks if remotebuild variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_failure "Unable to get remote build" - fn_script_log_fatal "Unable to get remote build" + fn_script_log_fail "Unable to get remote build" core_exit.sh fi fi diff --git a/linuxgsm.sh b/linuxgsm.sh index 6da7de664..520373d48 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -124,8 +124,8 @@ fn_bootstrap_fetch_file() { if [ ${counter} -ge 2 ]; then echo -e "FAIL" if [ -f "${lgsmlog}" ]; then - fn_script_log_fatal "Downloading ${local_filename}" - fn_script_log_fatal "${fileurl}" + fn_script_log_fail "Downloading ${local_filename}" + fn_script_log_fail "${fileurl}" fi core_exit.sh else diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index a63023dc8..0b4530d87 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -122,8 +122,8 @@ fn_bootstrap_fetch_file() { if [ ${counter} -ge 2 ]; then echo -e "FAIL" if [ -f "${lgsmlog}" ]; then - fn_script_log_fatal "Downloading ${local_filename}" - fn_script_log_fatal "${fileurl}" + fn_script_log_fail "Downloading ${local_filename}" + fn_script_log_fail "${fileurl}" fi core_exit.sh else diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index b921de274..adf59ab92 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -123,8 +123,8 @@ fn_bootstrap_fetch_file() { if [ ${counter} -ge 2 ]; then echo -e "FAIL" if [ -f "${lgsmlog}" ]; then - fn_script_log_fatal "Downloading ${local_filename}" - fn_script_log_fatal "${fileurl}" + fn_script_log_fail "Downloading ${local_filename}" + fn_script_log_fail "${fileurl}" fi core_exit.sh else diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index d173c7d68..3a40e9aa5 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -123,8 +123,8 @@ fn_bootstrap_fetch_file() { if [ ${counter} -ge 2 ]; then echo -e "FAIL" if [ -f "${lgsmlog}" ]; then - fn_script_log_fatal "Downloading ${local_filename}" - fn_script_log_fatal "${fileurl}" + fn_script_log_fail "Downloading ${local_filename}" + fn_script_log_fail "${fileurl}" fi core_exit.sh else diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 7363a1025..3fcb8ae24 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -123,8 +123,8 @@ fn_bootstrap_fetch_file() { if [ ${counter} -ge 2 ]; then echo -e "FAIL" if [ -f "${lgsmlog}" ]; then - fn_script_log_fatal "Downloading ${local_filename}" - fn_script_log_fatal "${fileurl}" + fn_script_log_fail "Downloading ${local_filename}" + fn_script_log_fail "${fileurl}" fi core_exit.sh else From 08a8da26ff6fb8c25079ab52ae371ce8e625866d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 8 Oct 2023 20:08:44 +0100 Subject: [PATCH 270/374] feat: convert public ip to json (#4332) * refactor: improve retrieval and handling of public IP address The code in `info_game.sh` has been refactored to enhance the process of retrieving and handling the public IP address. The changes include: - Using the API endpoint `http://ip-api.com/json/` instead of `https://api.ipify.org` - Storing the retrieved data in `publicip.txt` - Extracting additional information such as country and country code using `jq` These improvements aim to provide more accurate and detailed information about the public IP address. * refactor: update API URL and set default values for public IP, country, and country code The commit refactors the code by updating the API URL to remove a trailing slash. Additionally, it sets default values for the variables `publicip`, `country`, and `countrycode` when the file `${tmpdir}/publicip.txt` is not found. * feat: cache and retrieve public IP address This commit adds functionality to cache the public IP address for 24 hours. If the cached IP address is older than 24 hours or doesn't exist, a new request is made to retrieve the public IP address. The retrieved IP address is then stored in a file for future use. Additionally, if there are any errors during the retrieval process, appropriate warning messages are logged and default values are set for the IP address, country, and country code. Co-authored-by: AI Assistant * feat: cache and retrieve public IP address This commit adds functionality to cache the public IP address for 24 hours. If the cached IP address is older than 24 hours or doesn't exist, a new request is made to retrieve the public IP address. The retrieved IP address is then stored in a file for future use. Additionally, if there are any errors during the retrieval process, appropriate warning messages are logged and default values are set for the IP address, country, and country code. * refactor: improve caching and logging of public IP address The code has been refactored to use a JSON file instead of a text file for caching the public IP address. The log messages have also been updated to provide more informative output. * refactor(info_messages): Remove Mailgun alert This commit refactors the `info_messages.sh` module by removing the Mailgun (email) alert functionality. The code changes remove the corresponding section that displays the Mailgun alert status in the info message script. This change simplifies and streamlines the code by eliminating unused functionality. --------- Co-authored-by: AI Assistant --- lgsm/modules/info_game.sh | 32 ++++++++++++++++++-------------- lgsm/modules/info_messages.sh | 3 --- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 77251784c..2d172cdd5 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -2400,25 +2400,29 @@ elif [ "${engine}" == "unreal2" ]; then fn_info_game_unreal2 fi -# External IP address -# Cache external IP address for 24 hours -if [ -f "${tmpdir}/publicip.txt" ]; then - if [ "$(find "${tmpdir}/publicip.txt" -mmin +1440)" ]; then - rm -f "${tmpdir:?}/publicip.txt" - fi -fi - -if [ ! -f "${tmpdir}/publicip.txt" ]; then - publicip="$(curl --connect-timeout 10 -s https://api.ipify.org 2> /dev/null)" +# Public IP address +# Cache public IP address for 24 hours +if [ ! -f "${tmpdir}/publicip.json" ] || [ "$(find "${tmpdir}/publicip.json" -mmin +1440)" ]; then + apiurl="http://ip-api.com/json" + publicipresponse=$(curl -s "${apiurl}") exitcode=$? - # if curl passes add publicip to externalip.txt + # if curl passes add publicip to publicip.json if [ "${exitcode}" == "0" ]; then - echo "${publicip}" > "${tmpdir}/publicip.txt" + fn_script_log_pass "Getting public IP address" + echo "${publicipresponse}" > "${tmpdir}/publicip.json" + publicip="$(jq -r '.query' "${tmpdir}/publicip.json")" + country="$(jq -r '.country' "${tmpdir}/publicip.json")" + countrycode="$(jq -r '.countryCode' "${tmpdir}/publicip.json")" else - echo "Unable to get external IP address" + fn_script_log_warn "Unable to get public IP address" + publicip="NOT SET" + country="NOT SET" + countrycode="NOT SET" fi else - publicip="$(cat "${tmpdir}/publicip.txt")" + publicip="$(jq -r '.query' "${tmpdir}/publicip.json")" + country="$(jq -r '.country' "${tmpdir}/publicip.json")" + countrycode="$(jq -r '.countryCode' "${tmpdir}/publicip.json")" fi # Alert IP address diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index 340e11f6b..3f0c6d235 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -506,7 +506,6 @@ fn_info_message_script() { # Email alert: off # Gotify alert: off # IFTTT alert: off - # Mailgun (email) alert: off # Pushbullet alert: off # Pushover alert: off # Rocketchat alert: off @@ -550,8 +549,6 @@ fn_info_message_script() { echo -e "${lightblue}Gotify alert:\t${default}${gotifyalert}" # IFTTT alert echo -e "${lightblue}IFTTT alert:\t${default}${iftttalert}" - # Mailgun alert - echo -e "${lightblue}Mailgun (email) alert:\t${default}${mailgunalert}" # Pushbullet alert echo -e "${lightblue}Pushbullet alert:\t${default}${pushbulletalert}" # Pushover alert From f5496c72f65bc11f0a961300511f51efe536a0da Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 8 Oct 2023 23:33:20 +0100 Subject: [PATCH 271/374] update package.json --- .prettierrc | 2 +- package-lock.json | 246 ++++------------------------------------------ package.json | 4 +- 3 files changed, 24 insertions(+), 228 deletions(-) diff --git a/.prettierrc b/.prettierrc index 02d542d50..1902f8021 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,3 +1,3 @@ { - "plugins": ["prettier-plugin-sh"] + "plugins": ["prettier-plugin-sh"] } diff --git a/package-lock.json b/package-lock.json index 8532248e0..669e4f59d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,274 +7,70 @@ "name": "linuxgsm", "license": "MIT", "devDependencies": { - "prettier": "^2.8.8", - "prettier-plugin-sh": "^0.12.8" + "prettier": "^3.0.3", + "prettier-plugin-sh": "^0.13.1" } }, - "node_modules/@pkgr/utils": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.3.1.tgz", - "integrity": "sha512-wfzX8kc1PMyUILA+1Z/EqoE4UCXGy0iRGMhPwdfae1+f0OXlLqCk+By+aMzgJBzR9AzS4CDizioG6Ss1gvAFJw==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.3", - "is-glob": "^4.0.3", - "open": "^8.4.0", - "picocolors": "^1.0.0", - "tiny-glob": "^0.2.9", - "tslib": "^2.4.0" - }, - "engines": { - "node": "^12.20.0 || ^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/unts" - } - }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/define-lazy-prop": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", - "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/globalyzer": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz", - "integrity": "sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==", - "dev": true - }, - "node_modules/globrex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz", - "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==", - "dev": true - }, - "node_modules/is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "dev": true, - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dev": true, - "dependencies": { - "is-docker": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, "node_modules/mvdan-sh": { "version": "0.10.1", "resolved": "https://registry.npmjs.org/mvdan-sh/-/mvdan-sh-0.10.1.tgz", "integrity": "sha512-kMbrH0EObaKmK3nVRKUIIya1dpASHIEusM13S4V1ViHFuxuNxCo+arxoa6j/dbV22YBGjl7UKJm9QQKJ2Crzhg==", "dev": true }, - "node_modules/open": { - "version": "8.4.2", - "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", - "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", - "dev": true, - "dependencies": { - "define-lazy-prop": "^2.0.0", - "is-docker": "^2.1.1", - "is-wsl": "^2.2.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - }, "node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", + "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", "dev": true, "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=10.13.0" + "node": ">=14" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" } }, "node_modules/prettier-plugin-sh": { - "version": "0.12.8", - "resolved": "https://registry.npmjs.org/prettier-plugin-sh/-/prettier-plugin-sh-0.12.8.tgz", - "integrity": "sha512-VOq8h2Gn5UzrCIKm4p/nAScXJbN09HdyFDknAcxt6Qu/tv/juu9bahxSrcnM9XWYA+Spz1F1ANJ4LhfwB7+Q1Q==", + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/prettier-plugin-sh/-/prettier-plugin-sh-0.13.1.tgz", + "integrity": "sha512-ytMcl1qK4s4BOFGvsc9b0+k9dYECal7U29bL/ke08FEUsF/JLN0j6Peo0wUkFDG4y2UHLMhvpyd6Sd3zDXe/eg==", "dev": true, "dependencies": { "mvdan-sh": "^0.10.1", - "sh-syntax": "^0.3.6", - "synckit": "^0.8.1" + "sh-syntax": "^0.4.1" }, "engines": { - "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + "node": ">=16.0.0" }, "funding": { "url": "https://opencollective.com/unts" }, "peerDependencies": { - "prettier": "^2.0.0" + "prettier": "^3.0.0" } }, "node_modules/sh-syntax": { - "version": "0.3.7", - "resolved": "https://registry.npmjs.org/sh-syntax/-/sh-syntax-0.3.7.tgz", - "integrity": "sha512-xIB/uRniZ9urxAuXp1Ouh/BKSI1VK8RSqfwGj7cV57HvGrFo3vHdJfv8Tdp/cVcxJgXQTkmHr5mG5rqJW8r4wQ==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/sh-syntax/-/sh-syntax-0.4.1.tgz", + "integrity": "sha512-MW/ZsCYTu11EIYYTSZcfAgMFszAodCmQVB27XssHoIN6L4EG0KSA3h32x8whaSOKuYBX5wz9EybfnPBUFQMCKA==", "dev": true, "dependencies": { - "tslib": "^2.4.0" + "tslib": "^2.6.0" }, "engines": { - "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + "node": ">=16.0.0" }, "funding": { "url": "https://opencollective.com/unts" } }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/synckit": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.5.tgz", - "integrity": "sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==", - "dev": true, - "dependencies": { - "@pkgr/utils": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/unts" - } - }, - "node_modules/tiny-glob": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.9.tgz", - "integrity": "sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==", - "dev": true, - "dependencies": { - "globalyzer": "0.1.0", - "globrex": "^0.1.2" - } - }, "node_modules/tslib": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", - "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "dev": true - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } } } } diff --git a/package.json b/package.json index f3d3df0fd..89bb70244 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,8 @@ "test": "tests" }, "devDependencies": { - "prettier": "^2.8.8", - "prettier-plugin-sh": "^0.12.8" + "prettier": "^3.0.3", + "prettier-plugin-sh": "^0.13.1" }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" From 3259981e616353216fff2c8caa18c299ac052400 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 10 Oct 2023 20:19:53 +0100 Subject: [PATCH 272/374] refactor: remove unused tests - Removed the following files: - `tests/tests_defaultcfg/defaultcfg_0.txt` - `tests/tests_defaultcfg/defaultcfg_1.txt` - `tests/tests_defaultcfg/tests_defaultcfg.sh` - `tests/tests_fctrserver.sh` These files were no longer needed and have been deleted. refactor: remove unused code - Removed the following files: - `tests/tests_defaultcfg/defaultcfg_0.txt` - `tests/tests_defaultcfg/defaultcfg_1.txt` - `tests/tests_defaultcfg/tests_defaultcfg.sh` - `tests/tests_fctrserver.sh` These files were no longer needed and have been deleted. --- tests/tests_defaultcfg/defaultcfg_0.txt | 63 - tests/tests_defaultcfg/defaultcfg_1.txt | 53 - tests/tests_defaultcfg/tests_defaultcfg.sh | 65 - tests/tests_fctrserver.sh | 1186 ----------------- tests/tests_jc2server.sh | 1352 -------------------- tests/tests_mcserver.sh | 1231 ------------------ tests/tests_ts3server.sh | 1184 ----------------- 7 files changed, 5134 deletions(-) delete mode 100644 tests/tests_defaultcfg/defaultcfg_0.txt delete mode 100644 tests/tests_defaultcfg/defaultcfg_1.txt delete mode 100644 tests/tests_defaultcfg/tests_defaultcfg.sh delete mode 100644 tests/tests_fctrserver.sh delete mode 100644 tests/tests_jc2server.sh delete mode 100644 tests/tests_mcserver.sh delete mode 100644 tests/tests_ts3server.sh diff --git a/tests/tests_defaultcfg/defaultcfg_0.txt b/tests/tests_defaultcfg/defaultcfg_0.txt deleted file mode 100644 index bcaa9f1dd..000000000 --- a/tests/tests_defaultcfg/defaultcfg_0.txt +++ /dev/null @@ -1,63 +0,0 @@ -stats -displayip -postalert -discordalert -discordwebhook -emailalert -email -emailfrom -iftttalert -ifttttoken -iftttevent -mailgunalert -mailguntoken -mailgundomain -mailgunemailfrom -mailgunemail -pushbulletalert -pushbullettoken -channeltag -rocketchatalert -rocketchatwebhook -rocketchattoken -slackalert -slackwebhook -pushoveralert -pushovertoken -telegramalert -telegramtoken -telegramchatid -curlcustomstring -maxbackups -maxbackupdays -stoponbackup -consolelogging -logdays -querydelay -ansi -sleeptime -stopmode -querymode -querytype -consoleverbose -consoleinteract -gamename -engine -glibc -systemdir -executabledir -executable -servercfgdir -servercfg -servercfgdefault -servercfgfullpath -backupdir -logdir -lgsmlogdir -consolelogdir -lgsmlog -consolelog -alertlog -postdetailslog -lgsmlogdate -consolelogdate diff --git a/tests/tests_defaultcfg/defaultcfg_1.txt b/tests/tests_defaultcfg/defaultcfg_1.txt deleted file mode 100644 index 63b888f9d..000000000 --- a/tests/tests_defaultcfg/defaultcfg_1.txt +++ /dev/null @@ -1,53 +0,0 @@ -################################## -######## Default Settings ######## -################################## -# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! -# Copy settings from here and use them in either: -# common.cfg - applies settings to every instance. -# [instance].cfg - applies settings to a specific instance. -#### Game Server Settings #### -## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -#### LinuxGSM Settings #### -## Notification Alerts -# (on|off) -# Display IP | https://docs.linuxgsm.com/alerts#display-ip -# More info | https://docs.linuxgsm.com/alerts#more-info -# Discord Alerts | https://docs.linuxgsm.com/alerts/discord -# Email Alerts | https://docs.linuxgsm.com/alerts/email -# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt -# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet -# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram -# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". -## Backup | https://docs.linuxgsm.com/commands/backup -## Logging | https://docs.linuxgsm.com/features/logging -## Monitor | https://docs.linuxgsm.com/commands/monitor -# Query delay time -## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors -#### Advanced Settings #### -## Message Display Time | https://docs.linuxgsm.com/features/message-display-time -## Stop Mode | https://docs.linuxgsm.com/features/stop-mode -# 1: tmux kill -# 2: CTRL+c -# 3: quit -# 4: quit 120s -# 5: stop -# 6: q -# 7: exit -# 8: 7 Days to Die -# 9: GoldSrc -# 10: Avorion -# 11: end -## Console type -consoleverbose="" -consoleinteract="" -## Game Server Details -# Do not edit -#### Directories #### -# Edit with care -## Game Server Directories -## Backup Directory -## Logging Directories -## Logs Naming diff --git a/tests/tests_defaultcfg/tests_defaultcfg.sh b/tests/tests_defaultcfg/tests_defaultcfg.sh deleted file mode 100644 index 5f97f9a33..000000000 --- a/tests/tests_defaultcfg/tests_defaultcfg.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash -echo -e "" -echo -e "0.1 - Full comparison Output" -echo -e "==================================================================" -echo -e "Description:" -echo -e "test checks that vars present in ALL _default.cfg files are correct." -echo -e "" -echo -e "In master config < | > In game config" -find "lgsm/config-default/config-lgsm/" ! -name '*template.cfg' -name "*.cfg" -type f -print0 \ - | while IFS= read -r -d $'\0' line; do - grep "=" "${line}" | cut -f1 -d"=" > defaultcfgtemp.txt - diffoutput=$(diff tests/tests_defaultcfg/defaultcfg_0.txt defaultcfgtemp.txt) - if [ "${diffoutput}" ]; then - echo "File with errors:" - echo "${line}" - echo -e "=================================" - echo -e "In master config < | > In game config" - echo "${diffoutput}" - echo "" - fi - rm -f defaultcfgtemp.txt - done - -echo -e "" -echo -e "1.0 - Master Comparison" -echo -e "==================================================================" -echo -e "Description:" -echo -e "test checks that vars present in ALL _default.cfg files are correct." -echo -e "" -echo -e "In master config < | > In game config" -find lgsm/config-default/config-lgsm/ ! -name '*template.cfg' -name "*.cfg" -type f -print0 \ - | while IFS= read -r -d $'\0' line; do - grep "=" "${line}" | cut -f1 -d"=" > defaultcfgtemp.txt - diffoutput=$(diff tests/tests_defaultcfg/defaultcfg_0.txt defaultcfgtemp.txt | grep '^<') - if [ "${diffoutput}" ]; then - echo "File with errors:" - echo "${line}" - echo -e "=================================" - echo -e "In master config < | > In game config" - echo "${diffoutput}" - echo "" - fi - rm -f defaultcfgtemp.txt - done - -echo -e "" -echo -e "2.0 - Check Comment" -echo -e "==================================================================" -echo -e "Description:" -echo -e "test checks that comments in ALL _default.cfg files are correct." -echo -e "" -echo -e "In master config < | > In game config" -find lgsm/config-default/config-lgsm/ ! -name '*template.cfg' -name "*.cfg" -type f -print0 \ - | while IFS= read -r -d $'\0' line; do - grep "#" "${line}" > defaultcfgtemp.txt - diffoutput=$(diff tests/tests_defaultcfg/defaultcfg_1.txt defaultcfgtemp.txt | grep '^<') - if [ "${diffoutput}" ]; then - echo "File with errors:" - echo "${line}" - echo -e "=================================" - echo "${diffoutput}" - echo "" - fi - rm -f defaultcfgtemp.txt - done diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh deleted file mode 100644 index 0b4530d87..000000000 --- a/tests/tests_fctrserver.sh +++ /dev/null @@ -1,1186 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2020 Daniel Gibbs -# Purpose: Travis CI Tests: Factorio | Linux Game Server Management Script -# Contributors: https://linuxgsm.com/contrib -# Documentation: https://docs.linuxgsm.com -# Website: https://linuxgsm.com - -# DO NOT EDIT THIS FILE -# LinuxGSM configuration is no longer edited here -# To update your LinuxGSM config go to: -# lgsm/config-lgsm -# https://docs.linuxgsm.com/configuration/linuxgsm-config - -# Debugging -if [ -f ".dev-debug" ]; then - exec 5> dev-debug.log - BASH_XTRACEFD="5" - set -x -fi - -version="v23.5.3" -shortname="fctr" -gameservername="fctrserver" -commandname="CORE" -rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") -selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") -sessionname=$(echo "${selfname}" | cut -f1 -d".") -lgsmdir="${rootdir}/lgsm" -logdir="${rootdir}/log" -lgsmlogdir="${logdir}/lgsm" -steamcmddir="${HOME}/.steam/steamcmd" -serverfiles="${rootdir}/serverfiles" -modulesdir="${lgsmdir}/modules" -tmpdir="${lgsmdir}/tmp" -datadir="${lgsmdir}/data" -lockdir="${lgsmdir}/lock" -serverlist="${datadir}/serverlist.csv" -serverlistmenu="${datadir}/serverlistmenu.csv" -configdir="${lgsmdir}/config-lgsm" -configdirserver="${configdir}/${gameservername}" -configdirdefault="${lgsmdir}/config-default" -userinput="${1}" - -# Allows for testing not on Travis CI. -# if using travis for tests -if [ -z "${TRAVIS}" ]; then - TRAVIS_BRANCH="develop" - TRAVIS_BUILD_DIR="${rootdir}" -fi -travistest="1" -## GitHub Branch Select -# Allows for the use of different module files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="${TRAVIS_BRANCH}" - -# Core module that is required first. -core_modules.sh() { - modulefile="${FUNCNAME[0]}" - fn_bootstrap_fetch_file_github "lgsm/modules" "core_modules.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" -} - -# Bootstrap -# Fetches the core modules required before passed off to core_dl.sh. -fn_bootstrap_fetch_file() { - remote_fileurl="${1}" - remote_fileurl_backup="${2}" - remote_fileurl_name="${3}" - remote_fileurl_backup_name="${4}" - local_filedir="${5}" - local_filename="${6}" - chmodx="${7:-0}" - run="${8:-0}" - forcedl="${9:-0}" - md5="${10:-0}" - # Download file if missing or download forced. - if [ ! -f "${local_filedir}/${local_filename}" ] || [ "${forcedl}" == "forcedl" ]; then - # If backup fileurl exists include it. - if [ -n "${remote_fileurl_backup}" ]; then - # counter set to 0 to allow second try - counter=0 - remote_fileurls_array=(remote_fileurl remote_fileurl_backup) - else - # counter set to 1 to not allow second try - counter=1 - remote_fileurls_array=(remote_fileurl) - fi - - for remote_fileurl_array in "${remote_fileurls_array[@]}"; do - if [ "${remote_fileurl_array}" == "remote_fileurl" ]; then - fileurl="${remote_fileurl}" - fileurl_name="${remote_fileurl_name}" - elif [ "${remote_fileurl_array}" == "remote_fileurl_backup" ]; then - fileurl="${remote_fileurl_backup}" - fileurl_name="${remote_fileurl_backup_name}" - fi - counter=$((counter + 1)) - if [ ! -d "${local_filedir}" ]; then - mkdir -p "${local_filedir}" - fi - # Trap will remove part downloaded files if canceled. - trap fn_fetch_trap INT - # Larger files show a progress bar. - - echo -en "fetching ${fileurl_name} ${local_filename}...\c" - curlcmd=$(curl -s --fail -L -o "${local_filedir}/${local_filename}" "${fileurl}" 2>&1) - - local exitcode=$? - # Download will fail if downloads a html file. - if [ -f "${local_filedir}/${local_filename}" ]; then - if [ -n "$(head "${local_filedir}/${local_filename}" | grep "DOCTYPE")" ]; then - rm -f "${local_filedir:?}/${local_filename:?}" - local exitcode=2 - fi - fi - - # On first try will error. On second try will fail. - if [ "${exitcode}" != 0 ]; then - if [ ${counter} -ge 2 ]; then - echo -e "FAIL" - if [ -f "${lgsmlog}" ]; then - fn_script_log_fail "Downloading ${local_filename}" - fn_script_log_fail "${fileurl}" - fi - core_exit.sh - else - echo -e "ERROR" - if [ -f "${lgsmlog}" ]; then - fn_script_log_error "Downloading ${local_filename}" - fn_script_log_error "${fileurl}" - fi - fi - - else - echo -en "OK" - sleep 0.3 - echo -en "\033[2K\\r" - if [ -f "${lgsmlog}" ]; then - fn_script_log_pass "Downloading ${local_filename}" - fi - - # Make file executable if chmodx is set. - if [ "${chmodx}" == "chmodx" ]; then - chmod +x "${local_filedir}/${local_filename}" - fi - - # Remove trap. - trap - INT - - break - fi - done - fi - - if [ -f "${local_filedir}/${local_filename}" ]; then - # Execute file if run is set. - if [ "${run}" == "run" ]; then - # shellcheck source=/dev/null - source "${local_filedir}/${local_filename}" - fi - fi -} - -fn_bootstrap_fetch_file_github() { - github_file_url_dir="${1}" - github_file_url_name="${2}" - # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. - if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" - else - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - fi - remote_fileurl_name="GitHub" - remote_fileurl_backup_name="Bitbucket" - local_filedir="${3}" - local_filename="${github_file_url_name}" - chmodx="${4:-0}" - run="${5:-0}" - forcedl="${6:-0}" - md5="${7:-0}" - # Passes vars to the file download module. - fn_bootstrap_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" -} - -# Installer menu. - -fn_print_center() { - columns=$(tput cols) - line="$*" - printf "%*s\n" $(((${#line} + columns) / 2)) "${line}" -} - -fn_print_horizontal() { - printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' "=" -} - -# Bash menu. -fn_install_menu_bash() { - local resultvar=$1 - title=$2 - caption=$3 - options=$4 - fn_print_horizontal - fn_print_center "${title}" - fn_print_center "${caption}" - fn_print_horizontal - menu_options=() - while read -r line || [[ -n "${line}" ]]; do - var=$(echo -e "${line}" | awk -F "," '{print $2 " - " $3}') - menu_options+=("${var}") - done < "${options}" - menu_options+=("Cancel") - select option in "${menu_options[@]}"; do - if [ "${option}" ] && [ "${option}" != "Cancel" ]; then - eval "$resultvar=\"${option/%\ */}\"" - fi - break - done -} - -# Whiptail/Dialog menu. -fn_install_menu_whiptail() { - local menucmd=$1 - local resultvar=$2 - title=$3 - caption=$4 - options=$5 - height=${6:-40} - width=${7:-80} - menuheight=${8:-30} - IFS="," - menu_options=() - while read -r line; do - key=$(echo -e "${line}" | awk -F "," '{print $3}') - val=$(echo -e "${line}" | awk -F "," '{print $2}') - menu_options+=("${val//\"/}" "${key//\"/}") - done < "${options}" - OPTION=$(${menucmd} --title "${title}" --menu "${caption}" "${height}" "${width}" "${menuheight}" "${menu_options[@]}" 3>&1 1>&2 2>&3) - if [ $? == 0 ]; then - eval "$resultvar=\"${OPTION}\"" - else - eval "$resultvar=" - fi -} - -# Menu selector. -fn_install_menu() { - local resultvar=$1 - local selection="" - title=$2 - caption=$3 - options=$4 - # Get menu command. - for menucmd in whiptail dialog bash; do - if [ "$(command -v "${menucmd}")" ]; then - menucmd=$(command -v "${menucmd}") - break - fi - done - case "$(basename "${menucmd}")" in - whiptail | dialog) - fn_install_menu_whiptail "${menucmd}" selection "${title}" "${caption}" "${options}" 40 80 30 - ;; - *) - fn_install_menu_bash selection "${title}" "${caption}" "${options}" - ;; - esac - eval "$resultvar=\"${selection}\"" -} - -# Gets server info from serverlist.csv and puts in to array. -fn_server_info() { - IFS="," - server_info_array=($(grep -aw "${userinput}" "${serverlist}")) - shortname="${server_info_array[0]}" # csgo - gameservername="${server_info_array[1]}" # csgoserver - gamename="${server_info_array[2]}" # Counter Strike: Global Offensive -} - -fn_install_getopt() { - userinput="empty" - echo -e "Usage: $0 [option]" - echo -e "" - echo -e "Installer - Linux Game Server Managers - Version ${version}" - echo -e "https://linuxgsm.com" - echo -e "" - echo -e "Commands" - echo -e "install\t\t| Select server to install." - echo -e "servername\t| Enter name of game server to install. e.g $0 csgoserver." - echo -e "list\t\t| List all servers available for install." - exit -} - -fn_install_file() { - local_filename="${gameservername}" - if [ -e "${local_filename}" ]; then - i=2 - while [ -e "${local_filename}-${i}" ]; do - ((i++)) - done - local_filename="${local_filename}-${i}" - fi - cp -R "${selfname}" "${local_filename}" - sed -i -e "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${local_filename}" - sed -i -e "s/gameservername=\"core\"/gameservername=\"${gameservername}\"/g" "${local_filename}" - echo -e "Installed ${gamename} server as ${local_filename}" - echo -e "" - if [ ! -d "${serverfiles}" ]; then - echo -e "./${local_filename} install" - else - echo -e "Remember to check server ports" - echo -e "./${local_filename} details" - fi - echo -e "" - exit -} - -# Prevent LinuxGSM from running as root. Except if doing a dependency install. -if [ "$(whoami)" == "root" ]; then - if [ "${userinput}" == "install" ] || [ "${userinput}" == "auto-install" ] || [ "${userinput}" == "i" ] || [ "${userinput}" == "ai" ]; then - if [ "${shortname}" == "core" ]; then - echo -e "[ FAIL ] Do NOT run this script as root!" - exit 1 - fi - elif [ ! -f "${modulesdir}/core_modules.sh" ] || [ ! -f "${modulesdir}/check_root.sh" ] || [ ! -f "${modulesdir}/core_messages.sh" ]; then - echo -e "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_modules.sh - check_root.sh - fi -fi - -# LinuxGSM installer mode. -if [ "${shortname}" == "core" ]; then - # Download the latest serverlist. This is the complete list of all supported servers. - fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nohash" - if [ ! -f "${serverlist}" ]; then - echo -e "[ FAIL ] serverlist.csv could not be loaded." - exit 1 - fi - - if [ "${userinput}" == "list" ] || [ "${userinput}" == "l" ]; then - { - tail -n +2 "${serverlist}" | awk -F "," '{print $2 "\t" $3}' - } | column -s $'\t' -t | more - exit - elif [ "${userinput}" == "install" ] || [ "${userinput}" == "i" ]; then - tail -n +2 "${serverlist}" | awk -F "," '{print $1 "," $2 "," $3}' > "${serverlistmenu}" - fn_install_menu result "LinuxGSM" "Select game server to install." "${serverlistmenu}" - userinput="${result}" - fn_server_info - if [ "${result}" == "${gameservername}" ]; then - fn_install_file - elif [ "${result}" == "" ]; then - echo -e "Install canceled" - else - echo -e "[ FAIL ] menu result does not match gameservername" - echo -e "result: ${result}" - echo -e "gameservername: ${gameservername}" - fi - elif [ "${userinput}" ]; then - fn_server_info - if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then - fn_install_file - else - echo -e "[ FAIL ] Unknown game server" - fi - else - fn_install_getopt - fi - -# LinuxGSM server mode. -else - core_modules.sh - if [ "${shortname}" != "core-dep" ]; then - # Load LinuxGSM configs. - # These are required to get all the default variables for the specific server. - # Load the default config. If missing download it. If changed reload it. - if [ ! -f "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" ]; then - mkdir -p "${configdirdefault}/config-lgsm/${gameservername}" - fn_fetch_config "lgsm/config-default/config-lgsm/${gameservername}" "_default.cfg" "${configdirdefault}/config-lgsm/${gameservername}" "_default.cfg" "nochmodx" "norun" "noforcedl" "nohash" - fi - if [ ! -f "${configdirserver}/_default.cfg" ]; then - mkdir -p "${configdirserver}" - echo -en "copying _default.cfg...\c" - cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" - exitcode=$? - if [ "${exitcode}" != 0 ]; then - echo -e "FAIL" - exit 1 - else - echo -e "OK" - fi - else - module_file_diff=$(diff -q "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg") - if [ "${module_file_diff}" != "" ]; then - fn_print_warn_nl "_default.cfg has been altered. reloading config." - echo -en "copying _default.cfg...\c" - cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" - exitcode=$? - if [ "${exitcode}" != 0 ]; then - echo -e "FAIL" - exit 1 - else - echo -e "OK" - fi - fi - fi - # shellcheck source=/dev/null - source "${configdirserver}/_default.cfg" - # Load the common.cfg config. If missing download it. - if [ ! -f "${configdirserver}/common.cfg" ]; then - fn_fetch_config "lgsm/config-default/config-lgsm" "common-template.cfg" "${configdirserver}" "common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nohash" - # shellcheck source=/dev/null - source "${configdirserver}/common.cfg" - else - # shellcheck source=/dev/null - source "${configdirserver}/common.cfg" - fi - # Load the secrets-common.cfg config. If missing download it. - if [ ! -f "${configdirserver}/secrets-common.cfg" ]; then - fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-common-template.cfg" "${configdirserver}" "secrets-common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nohash" - # shellcheck source=/dev/null - source "${configdirserver}/secrets-common.cfg" - else - # shellcheck source=/dev/null - source "${configdirserver}/secrets-common.cfg" - fi - # Load the instance.cfg config. If missing download it. - if [ ! -f "${configdirserver}/${selfname}.cfg" ]; then - fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nohash" - # shellcheck source=/dev/null - source "${configdirserver}/${selfname}.cfg" - else - # shellcheck source=/dev/null - source "${configdirserver}/${selfname}.cfg" - fi - # Load the secrets-instance.cfg config. If missing download it. - if [ ! -f "${configdirserver}/secrets-${selfname}.cfg" ]; then - fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-instance-template.cfg" "${configdirserver}" "secrets-${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nohash" - # shellcheck source=/dev/null - source "${configdirserver}/secrets-${selfname}.cfg" - else - # shellcheck source=/dev/null - source "${configdirserver}/secrets-${selfname}.cfg" - fi - - # Load the linuxgsm.sh in to tmpdir. If missing download it. - if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then - fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "chmodx" "norun" "noforcedl" "nohash" - fi - fi - # Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off. - fn_ansi_loader - # Prevents running of core_exit.sh for Travis-CI. - if [ "${travistest}" != "1" ]; then - getopt=$1 - core_getopt.sh - fi -fi - -fn_currentstatus_tmux() { - check_status.sh - if [ "${status}" != "0" ]; then - currentstatus="STARTED" - else - currentstatus="STOPPED" - fi -} - -fn_setstatus() { - fn_currentstatus_tmux - echo"" - echo -e "Required status: ${requiredstatus}" - counter=0 - echo -e "Current status: ${currentstatus}" - while [ "${requiredstatus}" != "${currentstatus}" ]; do - counter=$((counter + 1)) - fn_currentstatus_tmux - echo -en "New status: ${currentstatus}\\r" - - if [ "${requiredstatus}" == "STARTED" ]; then - (command_start.sh > /dev/null 2>&1) - else - (command_stop.sh > /dev/null 2>&1) - fi - if [ "${counter}" -gt "5" ]; then - currentstatus="FAIL" - echo -e "Current status: ${currentstatus}" - echo -e "" - echo -e "Unable to start or stop server." - exit 1 - fi - done - echo -en "New status: ${currentstatus}\\r" - echo -e "\n" - echo -e "Test starting:" - echo -e "" -} - -# End of every test will expect the result to either pass or fail -# If the script does not do as intended the whole test will fail -# if expecting a pass -fn_test_result_pass() { - if [ $? != 0 ]; then - echo -e "=================================" - echo -e "Expected result: PASS" - echo -e "Actual result: FAIL" - fn_print_fail_nl "TEST FAILED" - exitcode=1 - core_exit.sh - else - echo -e "=================================" - echo -e "Expected result: PASS" - echo -e "Actual result: PASS" - fn_print_ok_nl "TEST PASSED" - echo -e "" - fi -} - -# if expecting a fail -fn_test_result_fail() { - if [ $? == 0 ]; then - echo -e "=================================" - echo -e "Expected result: FAIL" - echo -e "Actual result: PASS" - fn_print_fail_nl "TEST FAILED" - exitcode=1 - core_exit.sh - else - echo -e "=================================" - echo -e "Expected result: FAIL" - echo -e "Actual result: FAIL" - fn_print_ok_nl "TEST PASSED" - echo -e "" - fi -} - -# test result n/a -fn_test_result_na() { - echo -e "=================================" - echo -e "Expected result: N/A" - echo -e "Actual result: N/A" - fn_print_fail_nl "TEST N/A" -} - -sleeptime="0" - -echo -e "=================================" -echo -e "Travis CI Tests" -echo -e "Linux Game Server Manager" -echo -e "by Daniel Gibbs" -echo -e "Contributors: http://goo.gl/qLmitD" -echo -e "https://linuxgsm.com" -echo -e "=================================" -echo -e "" -echo -e "=================================" -echo -e "Server Tests" -echo -e "Using: ${gamename}" -echo -e "Testing Branch: ${TRAVIS_BRANCH}" -echo -e "=================================" - -echo -e "" -echo -e "Tests Summary" -echo -e "=================================" -echo -e "0.0 - Pre-test Tasks" -echo -e "0.1 - Create log dir's" -echo -e "0.2 - Enable dev-debug" -echo -e "" -echo -e "1.0 - Pre-install tests" -echo -e "1.1 - start - no files" -echo -e "1.2 - getopt" -echo -e "1.3 - getopt with incorrect args" -echo -e "" -echo -e "2.0 - Installation" -echo -e "2.1 - install" -echo -e "" -echo -e "3.0 - Start/Stop/Restart Tests" -echo -e "3.1 - start" -echo -e "3.2 - start - online" -echo -e "3.3 - start - updateonstart" -echo -e "3.4 - stop" -echo -e "3.5 - stop - offline" -echo -e "3.6 - restart" -echo -e "3.7 - restart - offline" -echo -e "" -echo -e "4.0 - Update Tests" -echo -e "4.1 - update" -echo -e "4.2 - update-lgsm" -echo -e "" -echo -e "5.0 - Monitor Tests" -echo -e "5.1 - monitor - online" -echo -e "5.2 - monitor - offline - with lockfile" -echo -e "5.3 - monitor - offline - no lockfile" -echo -e "5.4 - test-alert" -echo -e "" -echo -e "6.0 - Details Tests" -echo -e "6.1 - details" -echo -e "6.2 - postdetails" -echo -e "" -echo -e "7.0 - Backup Tests" -echo -e "7.1 - backup" -echo -e "" -echo -e "8.0 - Development Tools Tests" -echo -e "8.1 - dev - detect glibc" -echo -e "8.2 - dev - detect ldd" -echo -e "8.3 - dev - detect deps" -echo -e "8.4 - dev - query-raw" - -echo -e "" -echo -e "9.0 - Sponsor" -echo -e "9.1 - sponsor" -echo -e "" - -echo -e "0.0 - Pre-test Tasks" -echo -e "==================================================================" -echo -e "Description:" -echo -e "Create log dir's" -echo -e "" - -echo -e "" -echo -e "0.1 - Create log dir's" -echo -e "=================================" -echo -e "" -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - install_logs.sh -) -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "0.2 - Enable dev-debug" -echo -e "=================================" -echo -e "Description:" -echo -e "Enable dev-debug" -echo -e "" -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_dev_debug.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "1.0 - Pre-install tests" -echo -e "==================================================================" -echo -e "" - -echo -e "1.1 - start - no files" -echo -e "=================================" -echo -e "Description:" -echo -e "test script reaction to missing server files." -echo -e "Command: ./${gameservername} start" -echo -e "" -# Allows for testing not on Travis CI -if [ -z "${TRAVIS}" ]; then - ( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_start.sh - ) - fn_test_result_fail -else - echo -e "Test bypassed" -fi - -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "1.2 - getopt" -echo -e "=================================" -echo -e "Description:" -echo -e "displaying options messages." -echo -e "Command: ./${gameservername}" -echo -e "" -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - core_getopt.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "1.3 - getopt with incorrect args" -echo -e "=================================" -echo -e "Description:" -echo -e "displaying options messages." -echo -e "Command: ./${gameservername} abc123" -echo -e "" -getopt="abc123" -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - core_getopt.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "2.0 - Installation" -echo -e "==================================================================" - -echo -e "" -echo -e "2.1 - install" -echo -e "=================================" -echo -e "Description:" -echo -e "install ${gamename} server." -echo -e "Command: ./${gameservername} auto-install" -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - fn_autoinstall -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "3.0 - Start/Stop/Restart Tests" -echo -e "==================================================================" - -echo -e "" -echo -e "3.1 - start" -echo -e "=================================" -echo -e "Description:" -echo -e "start ${gamename} server." -echo -e "Command: ./${gameservername} start" -requiredstatus="STOPPED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_start.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "3.2 - start - online" -echo -e "=================================" -echo -e "Description:" -echo -e "start ${gamename} server while already running." -echo -e "Command: ./${gameservername} start" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_start.sh -) -fn_test_result_fail -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "3.3 - start - updateonstart" -echo -e "=================================" -echo -e "Description:" -echo -e "will update server on start." -echo -e "Command: ./${gameservername} start" -requiredstatus="STOPPED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - updateonstart="on" - command_start.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "3.4 - stop" -echo -e "=================================" -echo -e "Description:" -echo -e "stop ${gamename} server." -echo -e "Command: ./${gameservername} stop" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_stop.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "3.5 - stop - offline" -echo -e "=================================" -echo -e "Description:" -echo -e "stop ${gamename} server while already stopped." -echo -e "Command: ./${gameservername} stop" -requiredstatus="STOPPED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_stop.sh -) -fn_test_result_fail -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "3.6 - restart" -echo -e "=================================" -echo -e "Description:" -echo -e "restart ${gamename}." -echo -e "Command: ./${gameservername} restart" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_restart.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "3.7 - restart - offline" -echo -e "=================================" -echo -e "Description:" -echo -e "restart ${gamename} while already stopped." -echo -e "Command: ./${gameservername} restart" -requiredstatus="STOPPED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_restart.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "4.0 - Update Tests" -echo -e "==================================================================" - -echo -e "" -echo -e "4.1 - update" -echo -e "=================================" -echo -e "Description:" -echo -e "check for updates." -echo -e "Command: ./${gameservername} update" -requiredstatus="STOPPED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_update.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "4.2 - update-lgsm" -echo -e "=================================" -echo -e "Description:" -echo -e "update LinuxGSM." -echo -e "" -echo -e "Command: ./jc2server update-lgam" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_update_linuxgsm.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "5.0 - Monitor Tests" -echo -e "==================================================================" -echo -e "" -info_game.sh -echo -e "Server IP - Port: ${ip}:${port}" -echo -e "Server IP - Query Port: ${ip}:${queryport}" - -echo -e "" -echo -e "5.1 - monitor - online" -echo -e "=================================" -echo -e "Description:" -echo -e "run monitor server while already running." -echo -e "Command: ./${gameservername} monitor" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_monitor.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "5.2 - monitor - offline - with lockfile" -echo -e "=================================" -echo -e "Description:" -echo -e "run monitor while server is offline with lockfile." -echo -e "Command: ./${gameservername} monitor" -requiredstatus="STOPPED" -fn_setstatus -fn_print_info_nl "creating lockfile." -date '+%s' > "${lockdir}/${selfname}.lock" -echo "${version}" >> "${lockdir}/${selfname}.lock" -echo "${port}" >> "${lockdir}/${selfname}.lock" -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_monitor.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "5.3 - monitor - offline - no lockfile" -echo -e "=================================" -echo -e "Description:" -echo -e "run monitor while server is offline with no lockfile." -echo -e "Command: ./${gameservername} monitor" -requiredstatus="STOPPED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_monitor.sh -) -fn_test_result_fail -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "5.4 - test-alert" -echo -e "=================================" -echo -e "Description:" -echo -e "run monitor while server is offline with no lockfile." -echo -e "Command: ./${gameservername} test-alert" -requiredstatus="STOPPED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_test_alert.sh -) -fn_test_result_fail -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "6.0 - Details Tests" -echo -e "==================================================================" - -echo -e "" -echo -e "6.1 - details" -echo -e "=================================" -echo -e "Description:" -echo -e "display details." -echo -e "Command: ./${gameservername} details" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_details.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "6.2 - postdetails" -echo -e "=================================" -echo -e "Description:" -echo -e "post details." -echo -e "Command: ./${gameservername} postdetails" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_postdetails.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "7.0 - Backup Tests" -echo -e "==================================================================" - -echo -e "" -echo -e "7.1 - backup" -echo -e "=================================" -echo -e "Description:" -echo -e "run a backup." -echo -e "Command: ./${gameservername} backup" -requiredstatus="STARTED" -fn_setstatus -echo -e "test de-activated until issue #1839 fixed" -#(command_backup.sh) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "8.0 - Development Tools Tests" -echo -e "==================================================================" - -echo -e "" -echo -e "8.1 - dev - detect glibc" -echo -e "=================================" -echo -e "Description:" -echo -e "detect glibc." -echo -e "Command: ./${gameservername} detect-glibc" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_dev_detect_glibc.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "8.2 - dev - detect ldd" -echo -e "=================================" -echo -e "Description:" -echo -e "detect ldd." -echo -e "Command: ./${gameservername} detect-ldd" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_dev_detect_ldd.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "8.3 - dev - detect deps" -echo -e "=================================" -echo -e "Description:" -echo -e "detect dependencies." -echo -e "Command: ./${gameservername} detect-deps" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_dev_detect_deps.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "8.4 - dev - query-raw" -echo -e "=================================" -echo -e "Description:" -echo -e "raw query output." -echo -e "Command: ./${gameservername} query-raw" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_dev_query_raw.sh -) -fn_test_result_na -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" - -echo -e "9.0 - Sponsor" -echo -e "==================================================================" - -echo -e "" -echo -e "9.1 - sponsor" -echo -e "=================================" -echo -e "Description:" -echo -e "sponsor." -echo -e "Command: ./${gameservername} sponsor" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_sponsor.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "=================================" -echo -e "Server Tests - Complete!" -echo -e "Using: ${gamename}" -echo -e "=================================" -requiredstatus="STOPPED" -fn_setstatus - -core_exit.sh diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh deleted file mode 100644 index adf59ab92..000000000 --- a/tests/tests_jc2server.sh +++ /dev/null @@ -1,1352 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2020 Daniel Gibbs -# Purpose: Travis CI Tests: Just Cause 2 | Linux Game Server Management Script -# Contributors: https://linuxgsm.com/contrib -# Documentation: https://docs.linuxgsm.com -# Website: https://linuxgsm.com - -# DO NOT EDIT THIS FILE -# LinuxGSM configuration is no longer edited here -# To update your LinuxGSM config go to: -# lgsm/config-lgsm -# https://docs.linuxgsm.com/configuration/linuxgsm-config - -# Debugging -if [ -f ".dev-debug" ]; then - exec 5> dev-debug.log - BASH_XTRACEFD="5" - set -x -fi - -version="v23.5.3" -shortname="jc2" -gameservername="jc2server" -commandname="CORE" -rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") -selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") -sessionname=$(echo "${selfname}" | cut -f1 -d".") -lgsmdir="${rootdir}/lgsm" -logdir="${rootdir}/log" -lgsmlogdir="${logdir}/lgsm" -steamcmddir="${HOME}/.steam/steamcmd" -serverfiles="${rootdir}/serverfiles" -modulesdir="${lgsmdir}/modules" -tmpdir="${lgsmdir}/tmp" -datadir="${lgsmdir}/data" -lockdir="${lgsmdir}/lock" -serverlist="${datadir}/serverlist.csv" -serverlistmenu="${datadir}/serverlistmenu.csv" -configdir="${lgsmdir}/config-lgsm" -configdirserver="${configdir}/${gameservername}" -configdirdefault="${lgsmdir}/config-default" -userinput="${1}" - -# Allows for testing not on Travis CI. -# if using travis for tests -if [ -z "${TRAVIS}" ]; then - TRAVIS_BRANCH="develop" - TRAVIS_BUILD_DIR="${rootdir}" -fi -travistest="1" - -## GitHub Branch Select -# Allows for the use of different module files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="${TRAVIS_BRANCH}" - -# Core module that is required first. -core_modules.sh() { - modulefile="${FUNCNAME[0]}" - fn_bootstrap_fetch_file_github "lgsm/modules" "core_modules.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" -} - -# Bootstrap -# Fetches the core modules required before passed off to core_dl.sh. -fn_bootstrap_fetch_file() { - remote_fileurl="${1}" - remote_fileurl_backup="${2}" - remote_fileurl_name="${3}" - remote_fileurl_backup_name="${4}" - local_filedir="${5}" - local_filename="${6}" - chmodx="${7:-0}" - run="${8:-0}" - forcedl="${9:-0}" - md5="${10:-0}" - # Download file if missing or download forced. - if [ ! -f "${local_filedir}/${local_filename}" ] || [ "${forcedl}" == "forcedl" ]; then - # If backup fileurl exists include it. - if [ -n "${remote_fileurl_backup}" ]; then - # counter set to 0 to allow second try - counter=0 - remote_fileurls_array=(remote_fileurl remote_fileurl_backup) - else - # counter set to 1 to not allow second try - counter=1 - remote_fileurls_array=(remote_fileurl) - fi - - for remote_fileurl_array in "${remote_fileurls_array[@]}"; do - if [ "${remote_fileurl_array}" == "remote_fileurl" ]; then - fileurl="${remote_fileurl}" - fileurl_name="${remote_fileurl_name}" - elif [ "${remote_fileurl_array}" == "remote_fileurl_backup" ]; then - fileurl="${remote_fileurl_backup}" - fileurl_name="${remote_fileurl_backup_name}" - fi - counter=$((counter + 1)) - if [ ! -d "${local_filedir}" ]; then - mkdir -p "${local_filedir}" - fi - # Trap will remove part downloaded files if canceled. - trap fn_fetch_trap INT - # Larger files show a progress bar. - - echo -en "fetching ${fileurl_name} ${local_filename}...\c" - curlcmd=$(curl -s --fail -L -o "${local_filedir}/${local_filename}" "${fileurl}" 2>&1) - - local exitcode=$? - # Download will fail if downloads a html file. - if [ -f "${local_filedir}/${local_filename}" ]; then - if [ -n "$(head "${local_filedir}/${local_filename}" | grep "DOCTYPE")" ]; then - rm -f "${local_filedir:?}/${local_filename:?}" - local exitcode=2 - fi - fi - - # On first try will error. On second try will fail. - if [ "${exitcode}" != 0 ]; then - if [ ${counter} -ge 2 ]; then - echo -e "FAIL" - if [ -f "${lgsmlog}" ]; then - fn_script_log_fail "Downloading ${local_filename}" - fn_script_log_fail "${fileurl}" - fi - core_exit.sh - else - echo -e "ERROR" - if [ -f "${lgsmlog}" ]; then - fn_script_log_error "Downloading ${local_filename}" - fn_script_log_error "${fileurl}" - fi - fi - - else - echo -en "OK" - sleep 0.3 - echo -en "\033[2K\\r" - if [ -f "${lgsmlog}" ]; then - fn_script_log_pass "Downloading ${local_filename}" - fi - - # Make file executable if chmodx is set. - if [ "${chmodx}" == "chmodx" ]; then - chmod +x "${local_filedir}/${local_filename}" - fi - - # Remove trap. - trap - INT - - break - fi - done - fi - - if [ -f "${local_filedir}/${local_filename}" ]; then - # Execute file if run is set. - if [ "${run}" == "run" ]; then - # shellcheck source=/dev/null - source "${local_filedir}/${local_filename}" - fi - fi -} - -fn_bootstrap_fetch_file_github() { - github_file_url_dir="${1}" - github_file_url_name="${2}" - # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. - if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" - else - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - fi - remote_fileurl_name="GitHub" - remote_fileurl_backup_name="Bitbucket" - local_filedir="${3}" - local_filename="${github_file_url_name}" - chmodx="${4:-0}" - run="${5:-0}" - forcedl="${6:-0}" - md5="${7:-0}" - # Passes vars to the file download module. - fn_bootstrap_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" -} - -# Installer menu. - -fn_print_center() { - columns=$(tput cols) - line="$*" - printf "%*s\n" $(((${#line} + columns) / 2)) "${line}" -} - -fn_print_horizontal() { - printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' "=" -} - -# Bash menu. -fn_install_menu_bash() { - local resultvar=$1 - title=$2 - caption=$3 - options=$4 - fn_print_horizontal - fn_print_center "${title}" - fn_print_center "${caption}" - fn_print_horizontal - menu_options=() - while read -r line || [[ -n "${line}" ]]; do - var=$(echo -e "${line}" | awk -F "," '{print $2 " - " $3}') - menu_options+=("${var}") - done < "${options}" - menu_options+=("Cancel") - select option in "${menu_options[@]}"; do - if [ "${option}" ] && [ "${option}" != "Cancel" ]; then - eval "$resultvar=\"${option/%\ */}\"" - fi - break - done -} - -# Whiptail/Dialog menu. -fn_install_menu_whiptail() { - local menucmd=$1 - local resultvar=$2 - title=$3 - caption=$4 - options=$5 - height=${6:-40} - width=${7:-80} - menuheight=${8:-30} - IFS="," - menu_options=() - while read -r line; do - key=$(echo -e "${line}" | awk -F "," '{print $3}') - val=$(echo -e "${line}" | awk -F "," '{print $2}') - menu_options+=("${val//\"/}" "${key//\"/}") - done < "${options}" - OPTION=$(${menucmd} --title "${title}" --menu "${caption}" "${height}" "${width}" "${menuheight}" "${menu_options[@]}" 3>&1 1>&2 2>&3) - if [ $? == 0 ]; then - eval "$resultvar=\"${OPTION}\"" - else - eval "$resultvar=" - fi -} - -# Menu selector. -fn_install_menu() { - local resultvar=$1 - local selection="" - title=$2 - caption=$3 - options=$4 - # Get menu command. - for menucmd in whiptail dialog bash; do - if [ "$(command -v "${menucmd}")" ]; then - menucmd=$(command -v "${menucmd}") - break - fi - done - case "$(basename "${menucmd}")" in - whiptail | dialog) - fn_install_menu_whiptail "${menucmd}" selection "${title}" "${caption}" "${options}" 40 80 30 - ;; - *) - fn_install_menu_bash selection "${title}" "${caption}" "${options}" - ;; - esac - eval "$resultvar=\"${selection}\"" -} - -# Gets server info from serverlist.csv and puts in to array. -fn_server_info() { - IFS="," - server_info_array=($(grep -aw "${userinput}" "${serverlist}")) - shortname="${server_info_array[0]}" # csgo - gameservername="${server_info_array[1]}" # csgoserver - gamename="${server_info_array[2]}" # Counter Strike: Global Offensive -} - -fn_install_getopt() { - userinput="empty" - echo -e "Usage: $0 [option]" - echo -e "" - echo -e "Installer - Linux Game Server Managers - Version ${version}" - echo -e "https://linuxgsm.com" - echo -e "" - echo -e "Commands" - echo -e "install\t\t| Select server to install." - echo -e "servername\t| Enter name of game server to install. e.g $0 csgoserver." - echo -e "list\t\t| List all servers available for install." - exit -} - -fn_install_file() { - local_filename="${gameservername}" - if [ -e "${local_filename}" ]; then - i=2 - while [ -e "${local_filename}-${i}" ]; do - ((i++)) - done - local_filename="${local_filename}-${i}" - fi - cp -R "${selfname}" "${local_filename}" - sed -i -e "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${local_filename}" - sed -i -e "s/gameservername=\"core\"/gameservername=\"${gameservername}\"/g" "${local_filename}" - echo -e "Installed ${gamename} server as ${local_filename}" - echo -e "" - if [ ! -d "${serverfiles}" ]; then - echo -e "./${local_filename} install" - else - echo -e "Remember to check server ports" - echo -e "./${local_filename} details" - fi - echo -e "" - exit -} - -# Prevent LinuxGSM from running as root. Except if doing a dependency install. -if [ "$(whoami)" == "root" ]; then - if [ "${userinput}" == "install" ] || [ "${userinput}" == "auto-install" ] || [ "${userinput}" == "i" ] || [ "${userinput}" == "ai" ]; then - if [ "${shortname}" == "core" ]; then - echo -e "[ FAIL ] Do NOT run this script as root!" - exit 1 - fi - elif [ ! -f "${modulesdir}/core_modules.sh" ] || [ ! -f "${modulesdir}/check_root.sh" ] || [ ! -f "${modulesdir}/core_messages.sh" ]; then - echo -e "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_modules.sh - check_root.sh - fi -fi - -# LinuxGSM installer mode. -if [ "${shortname}" == "core" ]; then - # Download the latest serverlist. This is the complete list of all supported servers. - fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nohash" - if [ ! -f "${serverlist}" ]; then - echo -e "[ FAIL ] serverlist.csv could not be loaded." - exit 1 - fi - - if [ "${userinput}" == "list" ] || [ "${userinput}" == "l" ]; then - { - tail -n +2 "${serverlist}" | awk -F "," '{print $2 "\t" $3}' - } | column -s $'\t' -t | more - exit - elif [ "${userinput}" == "install" ] || [ "${userinput}" == "i" ]; then - tail -n +2 "${serverlist}" | awk -F "," '{print $1 "," $2 "," $3}' > "${serverlistmenu}" - fn_install_menu result "LinuxGSM" "Select game server to install." "${serverlistmenu}" - userinput="${result}" - fn_server_info - if [ "${result}" == "${gameservername}" ]; then - fn_install_file - elif [ "${result}" == "" ]; then - echo -e "Install canceled" - else - echo -e "[ FAIL ] menu result does not match gameservername" - echo -e "result: ${result}" - echo -e "gameservername: ${gameservername}" - fi - elif [ "${userinput}" ]; then - fn_server_info - if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then - fn_install_file - else - echo -e "[ FAIL ] Unknown game server" - fi - else - fn_install_getopt - fi - -# LinuxGSM server mode. -else - core_modules.sh - if [ "${shortname}" != "core-dep" ]; then - # Load LinuxGSM configs. - # These are required to get all the default variables for the specific server. - # Load the default config. If missing download it. If changed reload it. - if [ ! -f "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" ]; then - mkdir -p "${configdirdefault}/config-lgsm/${gameservername}" - fn_fetch_config "lgsm/config-default/config-lgsm/${gameservername}" "_default.cfg" "${configdirdefault}/config-lgsm/${gameservername}" "_default.cfg" "nochmodx" "norun" "noforcedl" "nohash" - fi - if [ ! -f "${configdirserver}/_default.cfg" ]; then - mkdir -p "${configdirserver}" - echo -en "copying _default.cfg...\c" - cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" - exitcode=$? - if [ "${exitcode}" != 0 ]; then - echo -e "FAIL" - exit 1 - else - echo -e "OK" - fi - else - module_file_diff=$(diff -q "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg") - if [ "${module_file_diff}" != "" ]; then - fn_print_warn_nl "_default.cfg has been altered. reloading config." - echo -en "copying _default.cfg...\c" - cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" - exitcode=$? - if [ "${exitcode}" != 0 ]; then - echo -e "FAIL" - exit 1 - else - echo -e "OK" - fi - fi - fi - # shellcheck source=/dev/null - source "${configdirserver}/_default.cfg" - # Load the common.cfg config. If missing download it. - if [ ! -f "${configdirserver}/common.cfg" ]; then - fn_fetch_config "lgsm/config-default/config-lgsm" "common-template.cfg" "${configdirserver}" "common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nohash" - # shellcheck source=/dev/null - source "${configdirserver}/common.cfg" - else - # shellcheck source=/dev/null - source "${configdirserver}/common.cfg" - fi - # Load the secrets-common.cfg config. If missing download it. - if [ ! -f "${configdirserver}/secrets-common.cfg" ]; then - fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-common-template.cfg" "${configdirserver}" "secrets-common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nohash" - # shellcheck source=/dev/null - source "${configdirserver}/secrets-common.cfg" - else - # shellcheck source=/dev/null - source "${configdirserver}/secrets-common.cfg" - fi - # Load the instance.cfg config. If missing download it. - if [ ! -f "${configdirserver}/${selfname}.cfg" ]; then - fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nohash" - # shellcheck source=/dev/null - source "${configdirserver}/${selfname}.cfg" - else - # shellcheck source=/dev/null - source "${configdirserver}/${selfname}.cfg" - fi - # Load the secrets-instance.cfg config. If missing download it. - if [ ! -f "${configdirserver}/secrets-${selfname}.cfg" ]; then - fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-instance-template.cfg" "${configdirserver}" "secrets-${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nohash" - # shellcheck source=/dev/null - source "${configdirserver}/secrets-${selfname}.cfg" - else - # shellcheck source=/dev/null - source "${configdirserver}/secrets-${selfname}.cfg" - fi - - # Load the linuxgsm.sh in to tmpdir. If missing download it. - if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then - fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "chmodx" "norun" "noforcedl" "nohash" - fi - fi - # Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off. - fn_ansi_loader - # Prevents running of core_exit.sh for Travis-CI. - if [ "${travistest}" != "1" ]; then - getopt=$1 - core_getopt.sh - fi -fi - -fn_currentstatus_tmux() { - check_status.sh - if [ "${status}" != "0" ]; then - currentstatus="STARTED" - else - currentstatus="STOPPED" - fi -} - -fn_setstatus() { - fn_currentstatus_tmux - echo"" - echo -e "Required status: ${requiredstatus}" - counter=0 - echo -e "Current status: ${currentstatus}" - while [ "${requiredstatus}" != "${currentstatus}" ]; do - counter=$((counter + 1)) - fn_currentstatus_tmux - echo -en "New status: ${currentstatus}\\r" - - if [ "${requiredstatus}" == "STARTED" ]; then - (command_start.sh > /dev/null 2>&1) - else - (command_stop.sh > /dev/null 2>&1) - fi - if [ "${counter}" -gt "5" ]; then - currentstatus="FAIL" - echo -e "Current status: ${currentstatus}" - echo -e "" - echo -e "Unable to start or stop server." - exit 1 - fi - done - echo -en "New status: ${currentstatus}\\r" - echo -e "\n" - echo -e "Test starting:" - echo -e "" -} - -# End of every test will expect the result to either pass or fail -# If the script does not do as intended the whole test will fail -# if expecting a pass -fn_test_result_pass() { - if [ $? != 0 ]; then - echo -e "=================================" - echo -e "Expected result: PASS" - echo -e "Actual result: FAIL" - fn_print_fail_nl "TEST FAILED" - exitcode=1 - core_exit.sh - else - echo -e "=================================" - echo -e "Expected result: PASS" - echo -e "Actual result: PASS" - fn_print_ok_nl "TEST PASSED" - echo -e "" - fi -} - -# if expecting a fail -fn_test_result_fail() { - if [ $? == 0 ]; then - echo -e "=================================" - echo -e "Expected result: FAIL" - echo -e "Actual result: PASS" - fn_print_fail_nl "TEST FAILED" - exitcode=1 - core_exit.sh - else - echo -e "=================================" - echo -e "Expected result: FAIL" - echo -e "Actual result: FAIL" - fn_print_ok_nl "TEST PASSED" - echo -e "" - fi -} - -# test result n/a -fn_test_result_na() { - echo -e "=================================" - echo -e "Expected result: N/A" - echo -e "Actual result: N/A" - fn_print_fail_nl "TEST N/A" -} - -sleeptime="0" - -echo -e "=================================" -echo -e "Travis CI Tests" -echo -e "Linux Game Server Manager" -echo -e "by Daniel Gibbs" -echo -e "Contributors: http://goo.gl/qLmitD" -echo -e "https://linuxgsm.com" -echo -e "=================================" -echo -e "" -echo -e "=================================" -echo -e "Server Tests" -echo -e "Using: ${gamename}" -echo -e "Testing Branch: ${TRAVIS_BRANCH}" -echo -e "=================================" -echo -e "" -echo -e "Tests Summary" -echo -e "=================================" -echo -e "0.0 - Pre-test Tasks" -echo -e "0.1 - Create log dir's" -echo -e "0.2 - Enable dev-debug" -echo -e "" -echo -e "1.0 - Pre-install tests" -echo -e "1.1 - start - no files" -echo -e "1.2 - getopt" -echo -e "1.3 - getopt with incorrect args" -echo -e "" -echo -e "2.0 - Installation" -echo -e "2.1 - install" -echo -e "" -echo -e "3.0 - Start/Stop/Restart Tests" -echo -e "3.1 - start" -echo -e "3.2 - start - online" -echo -e "3.3 - start - updateonstart" -echo -e "3.4 - stop" -echo -e "3.5 - stop - offline" -echo -e "3.6 - restart" -echo -e "3.7 - restart - offline" -echo -e "" -echo -e "4.0 - Update Tests" -echo -e "4.1 - update" -echo -e "4.2 - update - change buildid" -echo -e "4.3 - update - change buildid - online" -echo -e "4.4 - update - remove appmanifest file" -echo -e "4.5 - force-update" -echo -e "4.6 - force-update - online" -echo -e "4.7 - validate" -echo -e "4.8 - validate - online" -echo -e "4.9 - update-lgsm" -echo -e "" -echo -e "5.0 - Monitor Tests" -echo -e "5.1 - monitor - online" -echo -e "5.2 - monitor - offline - with lockfile" -echo -e "5.3 - monitor - offline - no lockfile" -echo -e "5.4 - test-alert" -echo -e "" -echo -e "6.0 - Details Tests" -echo -e "6.1 - details" -echo -e "6.2 - postdetails" -echo -e "" -echo -e "7.0 - Backup Tests" -echo -e "7.1 - backup" -echo -e "" -echo -e "8.0 - Development Tools Tests" -echo -e "8.1 - dev - detect glibc" -echo -e "8.2 - dev - detect ldd" -echo -e "8.3 - dev - detect deps" -echo -e "8.4 - dev - query-raw" -echo -e "" -echo -e "9.0 - Sponsor" -echo -e "9.1 - sponsor" -echo -e "" -echo -e "0.0 - Pre-test Tasks" -echo -e "==================================================================" -echo -e "Description:" -echo -e "Create log dir's" -echo -e "" - -echo -e "" -echo -e "0.1 - Create log dir's" -echo -e "=================================" -echo -e "" -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - install_logs.sh -) -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "0.2 - Enable dev-debug" -echo -e "=================================" -echo -e "Description:" -echo -e "Enable dev-debug" -echo -e "" -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_dev_debug.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "1.0 - Pre-install tests" -echo -e "==================================================================" -echo -e "" - -echo -e "1.1 - start - no files" -echo -e "=================================" -echo -e "Description:" -echo -e "test script reaction to missing server files." -echo -e "Command: ./${gameservername} start" -echo -e "" -# Allows for testing not on Travis CI -if [ -z "${TRAVIS}" ]; then - ( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_start.sh - ) - fn_test_result_fail -else - echo -e "Test bypassed" -fi - -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "1.2 - getopt" -echo -e "=================================" -echo -e "Description:" -echo -e "displaying options messages." -echo -e "Command: ./${gameservername}" -echo -e "" -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - core_getopt.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "1.3 - getopt with incorrect args" -echo -e "=================================" -echo -e "Description:" -echo -e "displaying options messages." -echo -e "Command: ./${gameservername} abc123" -echo -e "" -getopt="abc123" -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - core_getopt.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "2.0 - Installation" -echo -e "==================================================================" - -echo -e "" -echo -e "2.1 - install" -echo -e "=================================" -echo -e "Description:" -echo -e "install ${gamename} server." -echo -e "Command: ./${gameservername} auto-install" -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - fn_autoinstall -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "3.0 - Start/Stop/Restart Tests" -echo -e "==================================================================" - -echo -e "" -echo -e "3.1 - start" -echo -e "=================================" -echo -e "Description:" -echo -e "start ${gamename} server." -echo -e "Command: ./${gameservername} start" -requiredstatus="STOPPED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_start.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "3.2 - start - online" -echo -e "=================================" -echo -e "Description:" -echo -e "start ${gamename} server while already running." -echo -e "Command: ./${gameservername} start" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_start.sh -) -fn_test_result_fail -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "3.3 - start - updateonstart" -echo -e "=================================" -echo -e "Description:" -echo -e "will update server on start." -echo -e "Command: ./${gameservername} start" -requiredstatus="STOPPED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - updateonstart="on" - command_start.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "3.4 - stop" -echo -e "=================================" -echo -e "Description:" -echo -e "stop ${gamename} server." -echo -e "Command: ./${gameservername} stop" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_stop.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "3.5 - stop - offline" -echo -e "=================================" -echo -e "Description:" -echo -e "stop ${gamename} server while already stopped." -echo -e "Command: ./${gameservername} stop" -requiredstatus="STOPPED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_stop.sh -) -fn_test_result_fail -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "3.6 - restart" -echo -e "=================================" -echo -e "Description:" -echo -e "restart ${gamename}." -echo -e "Command: ./${gameservername} restart" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_restart.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "3.7 - restart - offline" -echo -e "=================================" -echo -e "Description:" -echo -e "restart ${gamename} while already stopped." -echo -e "Command: ./${gameservername} restart" -requiredstatus="STOPPED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_restart.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "4.0 - Update Tests" -echo -e "==================================================================" - -echo -e "" -echo -e "4.1 - update" -echo -e "=================================" -echo -e "Description:" -echo -e "check for updates." -echo -e "Command: ./${gameservername} update" -requiredstatus="STOPPED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_update.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "4.2 - update - change buildid" -echo -e "=================================" -echo -e "Description:" -echo -e "change the buildid tricking SteamCMD to update." -echo -e "Command: ./jc2server update" -requiredstatus="STOPPED" -fn_setstatus -fn_print_info_nl "changed buildid to 0." -sed -i 's/[0-9]\+/0/' "${serverfiles}/steamapps/appmanifest_${appid}.acf" -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_update.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "4.3 - update - change buildid - online" -echo -e "=================================" -echo -e "Description:" -echo -e "change the buildid tricking SteamCMD to update server while already running." -echo -e "Command: ./jc2server update" -requiredstatus="STARTED" -fn_setstatus -fn_print_info_nl "changed buildid to 0." -sed -i 's/[0-9]\+/0/' "${serverfiles}/steamapps/appmanifest_${appid}.acf" -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_update.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "4.4 - update - remove appmanifest file" -echo -e "=================================" -echo -e "Description:" -echo -e "removing appmanifest file will cause script to repair." -echo -e "Command: ./jc2server update" -requiredstatus="STOPPED" -fn_setstatus -fn_print_info_nl "removed appmanifest_${appid}.acf." -rm --verbose "${serverfiles:?}/steamapps/appmanifest_${appid}.acf" -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_update.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "4.5 - force-update" -echo -e "=================================" -echo -e "Description:" -echo -e "force-update bypassing update check." -echo -e "Command: ./jc2server force-update" -requiredstatus="STOPPED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - forceupdate=1 - command_update.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "4.6 - force-update - online" -echo -e "=================================" -echo -e "Description:" -echo -e "force-update bypassing update check server while already running." -echo -e "Command: ./jc2server force-update" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - forceupdate=1 - command_update.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "4.7 - validate" -echo -e "=================================" -echo -e "Description:" -echo -e "validate server files." -echo -e "Command: ./jc2server validate" -requiredstatus="STOPPED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_validate.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "4.8 - validate - online" -echo -e "=================================" -echo -e "Description:" -echo -e "validate server files while server already running." -echo -e "" -echo -e "Command: ./jc2server validate" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_validate.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "4.9 - update-lgsm" -echo -e "=================================" -echo -e "Description:" -echo -e "update LinuxGSM." -echo -e "" -echo -e "Command: ./jc2server update-lgam" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_update_linuxgsm.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "Inserting IP address" -echo -e "=================================" -echo -e "Description:" -echo -e "Inserting Travis IP in to config." -echo -e "Allows monitor to work" -if [ "$(${ipcommand}-o -4 addr | grep eth0)" ]; then - travisip=$(${ipcommand}-o -4 addr | grep eth0 | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | grep -v 127.0.0) -else - travisip=$(${ipcommand}-o -4 addr | grep ens | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | sort -u | grep -v 127.0.0) -fi -sed -i "/BindIP/c\BindIP = \"${travisip}\"," "${serverfiles}/config.lua" -echo -e "IP: ${travisip}" - -echo -e "" -echo -e "5.0 - Monitor Tests" -echo -e "==================================================================" -echo -e "" -info_game.sh -echo -e "Server IP - Port: ${ip}:${port}" -echo -e "Server IP - Query Port: ${ip}:${queryport}" - -echo -e "" -echo -e "5.1 - monitor - online" -echo -e "=================================" -echo -e "Description:" -echo -e "run monitor server while already running." -echo -e "Command: ./${gameservername} monitor" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_monitor.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "5.2 - monitor - offline - with lockfile" -echo -e "=================================" -echo -e "Description:" -echo -e "run monitor while server is offline with lockfile." -echo -e "Command: ./${gameservername} monitor" -requiredstatus="STOPPED" -fn_setstatus -fn_print_info_nl "creating lockfile." -date '+%s' > "${lockdir}/${selfname}.lock" -echo "${version}" >> "${lockdir}/${selfname}.lock" -echo "${port}" >> "${lockdir}/${selfname}.lock" -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_monitor.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "5.3 - monitor - offline - no lockfile" -echo -e "=================================" -echo -e "Description:" -echo -e "run monitor while server is offline with no lockfile." -echo -e "Command: ./${gameservername} monitor" -requiredstatus="STOPPED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_monitor.sh -) -fn_test_result_fail -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "5.4 - test-alert" -echo -e "=================================" -echo -e "Description:" -echo -e "run monitor while server is offline with no lockfile." -echo -e "Command: ./${gameservername} test-alert" -requiredstatus="STOPPED" -fn_setstatus -cp "${servercfgfullpath}" "config.lua" -sed -i 's/[0-9]\+/0/' "${servercfgfullpath}" -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_test_alert.sh -) -fn_test_result_fail -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -fn_print_info_nl "Re-generating ${servercfg}." -cp -v "config.lua" "${servercfgfullpath}" -echo -e "=================================" - -echo -e "" -echo -e "6.0 - Details Tests" -echo -e "==================================================================" - -echo -e "" -echo -e "6.1 - details" -echo -e "=================================" -echo -e "Description:" -echo -e "display details." -echo -e "Command: ./${gameservername} details" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_details.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "6.2 - postdetails" -echo -e "=================================" -echo -e "Description:" -echo -e "post details." -echo -e "Command: ./${gameservername} postdetails" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_postdetails.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "7.0 - Backup Tests" -echo -e "==================================================================" - -echo -e "" -echo -e "7.1 - backup" -echo -e "=================================" -echo -e "Description:" -echo -e "run a backup." -echo -e "Command: ./${gameservername} backup" -requiredstatus="STARTED" -fn_setstatus -echo -e "test de-activated until issue #1839 fixed" -#(command_backup.sh) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "8.0 - Development Tools Tests" -echo -e "==================================================================" - -echo -e "" -echo -e "8.1 - dev - detect glibc" -echo -e "=================================" -echo -e "Description:" -echo -e "detect glibc." -echo -e "Command: ./${gameservername} detect-glibc" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_dev_detect_glibc.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "8.2 - dev - detect ldd" -echo -e "=================================" -echo -e "Description:" -echo -e "detect ldd." -echo -e "Command: ./${gameservername} detect-ldd" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_dev_detect_ldd.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "8.3 - dev - detect deps" -echo -e "=================================" -echo -e "Description:" -echo -e "detect dependencies." -echo -e "Command: ./${gameservername} detect-deps" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_dev_detect_deps.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "8.4 - dev - query-raw" -echo -e "=================================" -echo -e "Description:" -echo -e "raw query output." -echo -e "Command: ./${gameservername} query-raw" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_dev_query_raw.sh -) -fn_test_result_na -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "9.0 - Sponsor" -echo -e "==================================================================" - -echo -e "" -echo -e "9.1 - sponsor" -echo -e "=================================" -echo -e "Description:" -echo -e "sponsor." -echo -e "Command: ./${gameservername} sponsor" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_sponsor.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "=================================" -echo -e "Server Tests - Complete!" -echo -e "Using: ${gamename}" -echo -e "=================================" -requiredstatus="STOPPED" -fn_setstatus -core_exit.sh diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh deleted file mode 100644 index 3a40e9aa5..000000000 --- a/tests/tests_mcserver.sh +++ /dev/null @@ -1,1231 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2020 Daniel Gibbs -# Purpose: Travis CI Tests: Minecraft | Linux Game Server Management Script -# Contributors: https://linuxgsm.com/contrib -# Documentation: https://docs.linuxgsm.com -# Website: https://linuxgsm.com - -# DO NOT EDIT THIS FILE -# LinuxGSM configuration is no longer edited here -# To update your LinuxGSM config go to: -# lgsm/config-lgsm -# https://docs.linuxgsm.com/configuration/linuxgsm-config - -# Debugging -if [ -f ".dev-debug" ]; then - exec 5> dev-debug.log - BASH_XTRACEFD="5" - set -x -fi - -version="v23.5.3" -shortname="mc" -gameservername="mcserver" -commandname="CORE" -rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") -selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") -sessionname=$(echo "${selfname}" | cut -f1 -d".") -lgsmdir="${rootdir}/lgsm" -logdir="${rootdir}/log" -lgsmlogdir="${logdir}/lgsm" -steamcmddir="${HOME}/.steam/steamcmd" -serverfiles="${rootdir}/serverfiles" -modulesdir="${lgsmdir}/modules" -tmpdir="${lgsmdir}/tmp" -datadir="${lgsmdir}/data" -lockdir="${lgsmdir}/lock" -serverlist="${datadir}/serverlist.csv" -serverlistmenu="${datadir}/serverlistmenu.csv" -configdir="${lgsmdir}/config-lgsm" -configdirserver="${configdir}/${gameservername}" -configdirdefault="${lgsmdir}/config-default" -userinput="${1}" - -# Allows for testing not on Travis CI. -# if using travis for tests -if [ -z "${TRAVIS}" ]; then - TRAVIS_BRANCH="develop" - TRAVIS_BUILD_DIR="${rootdir}" -fi -travistest="1" - -## GitHub Branch Select -# Allows for the use of different module files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="${TRAVIS_BRANCH}" - -# Core module that is required first. -core_modules.sh() { - modulefile="${FUNCNAME[0]}" - fn_bootstrap_fetch_file_github "lgsm/modules" "core_modules.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" -} - -# Bootstrap -# Fetches the core modules required before passed off to core_dl.sh. -fn_bootstrap_fetch_file() { - remote_fileurl="${1}" - remote_fileurl_backup="${2}" - remote_fileurl_name="${3}" - remote_fileurl_backup_name="${4}" - local_filedir="${5}" - local_filename="${6}" - chmodx="${7:-0}" - run="${8:-0}" - forcedl="${9:-0}" - md5="${10:-0}" - # Download file if missing or download forced. - if [ ! -f "${local_filedir}/${local_filename}" ] || [ "${forcedl}" == "forcedl" ]; then - # If backup fileurl exists include it. - if [ -n "${remote_fileurl_backup}" ]; then - # counter set to 0 to allow second try - counter=0 - remote_fileurls_array=(remote_fileurl remote_fileurl_backup) - else - # counter set to 1 to not allow second try - counter=1 - remote_fileurls_array=(remote_fileurl) - fi - - for remote_fileurl_array in "${remote_fileurls_array[@]}"; do - if [ "${remote_fileurl_array}" == "remote_fileurl" ]; then - fileurl="${remote_fileurl}" - fileurl_name="${remote_fileurl_name}" - elif [ "${remote_fileurl_array}" == "remote_fileurl_backup" ]; then - fileurl="${remote_fileurl_backup}" - fileurl_name="${remote_fileurl_backup_name}" - fi - counter=$((counter + 1)) - if [ ! -d "${local_filedir}" ]; then - mkdir -p "${local_filedir}" - fi - # Trap will remove part downloaded files if canceled. - trap fn_fetch_trap INT - # Larger files show a progress bar. - - echo -en "fetching ${fileurl_name} ${local_filename}...\c" - curlcmd=$(curl -s --fail -L -o "${local_filedir}/${local_filename}" "${fileurl}" 2>&1) - - local exitcode=$? - # Download will fail if downloads a html file. - if [ -f "${local_filedir}/${local_filename}" ]; then - if [ -n "$(head "${local_filedir}/${local_filename}" | grep "DOCTYPE")" ]; then - rm -f "${local_filedir:?}/${local_filename:?}" - local exitcode=2 - fi - fi - - # On first try will error. On second try will fail. - if [ "${exitcode}" != 0 ]; then - if [ ${counter} -ge 2 ]; then - echo -e "FAIL" - if [ -f "${lgsmlog}" ]; then - fn_script_log_fail "Downloading ${local_filename}" - fn_script_log_fail "${fileurl}" - fi - core_exit.sh - else - echo -e "ERROR" - if [ -f "${lgsmlog}" ]; then - fn_script_log_error "Downloading ${local_filename}" - fn_script_log_error "${fileurl}" - fi - fi - - else - echo -en "OK" - sleep 0.3 - echo -en "\033[2K\\r" - if [ -f "${lgsmlog}" ]; then - fn_script_log_pass "Downloading ${local_filename}" - fi - - # Make file executable if chmodx is set. - if [ "${chmodx}" == "chmodx" ]; then - chmod +x "${local_filedir}/${local_filename}" - fi - - # Remove trap. - trap - INT - - break - fi - done - fi - - if [ -f "${local_filedir}/${local_filename}" ]; then - # Execute file if run is set. - if [ "${run}" == "run" ]; then - # shellcheck source=/dev/null - source "${local_filedir}/${local_filename}" - fi - fi -} - -fn_bootstrap_fetch_file_github() { - github_file_url_dir="${1}" - github_file_url_name="${2}" - # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. - if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" - else - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - fi - remote_fileurl_name="GitHub" - remote_fileurl_backup_name="Bitbucket" - local_filedir="${3}" - local_filename="${github_file_url_name}" - chmodx="${4:-0}" - run="${5:-0}" - forcedl="${6:-0}" - md5="${7:-0}" - # Passes vars to the file download module. - fn_bootstrap_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" -} - -# Installer menu. - -fn_print_center() { - columns=$(tput cols) - line="$*" - printf "%*s\n" $(((${#line} + columns) / 2)) "${line}" -} - -fn_print_horizontal() { - printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' "=" -} - -# Bash menu. -fn_install_menu_bash() { - local resultvar=$1 - title=$2 - caption=$3 - options=$4 - fn_print_horizontal - fn_print_center "${title}" - fn_print_center "${caption}" - fn_print_horizontal - menu_options=() - while read -r line || [[ -n "${line}" ]]; do - var=$(echo -e "${line}" | awk -F "," '{print $2 " - " $3}') - menu_options+=("${var}") - done < "${options}" - menu_options+=("Cancel") - select option in "${menu_options[@]}"; do - if [ "${option}" ] && [ "${option}" != "Cancel" ]; then - eval "$resultvar=\"${option/%\ */}\"" - fi - break - done -} - -# Whiptail/Dialog menu. -fn_install_menu_whiptail() { - local menucmd=$1 - local resultvar=$2 - title=$3 - caption=$4 - options=$5 - height=${6:-40} - width=${7:-80} - menuheight=${8:-30} - IFS="," - menu_options=() - while read -r line; do - key=$(echo -e "${line}" | awk -F "," '{print $3}') - val=$(echo -e "${line}" | awk -F "," '{print $2}') - menu_options+=("${val//\"/}" "${key//\"/}") - done < "${options}" - OPTION=$(${menucmd} --title "${title}" --menu "${caption}" "${height}" "${width}" "${menuheight}" "${menu_options[@]}" 3>&1 1>&2 2>&3) - if [ $? == 0 ]; then - eval "$resultvar=\"${OPTION}\"" - else - eval "$resultvar=" - fi -} - -# Menu selector. -fn_install_menu() { - local resultvar=$1 - local selection="" - title=$2 - caption=$3 - options=$4 - # Get menu command. - for menucmd in whiptail dialog bash; do - if [ "$(command -v "${menucmd}")" ]; then - menucmd=$(command -v "${menucmd}") - break - fi - done - case "$(basename "${menucmd}")" in - whiptail | dialog) - fn_install_menu_whiptail "${menucmd}" selection "${title}" "${caption}" "${options}" 40 80 30 - ;; - *) - fn_install_menu_bash selection "${title}" "${caption}" "${options}" - ;; - esac - eval "$resultvar=\"${selection}\"" -} - -# Gets server info from serverlist.csv and puts in to array. -fn_server_info() { - IFS="," - server_info_array=($(grep -aw "${userinput}" "${serverlist}")) - shortname="${server_info_array[0]}" # csgo - gameservername="${server_info_array[1]}" # csgoserver - gamename="${server_info_array[2]}" # Counter Strike: Global Offensive -} - -fn_install_getopt() { - userinput="empty" - echo -e "Usage: $0 [option]" - echo -e "" - echo -e "Installer - Linux Game Server Managers - Version ${version}" - echo -e "https://linuxgsm.com" - echo -e "" - echo -e "Commands" - echo -e "install\t\t| Select server to install." - echo -e "servername\t| Enter name of game server to install. e.g $0 csgoserver." - echo -e "list\t\t| List all servers available for install." - exit -} - -fn_install_file() { - local_filename="${gameservername}" - if [ -e "${local_filename}" ]; then - i=2 - while [ -e "${local_filename}-${i}" ]; do - ((i++)) - done - local_filename="${local_filename}-${i}" - fi - cp -R "${selfname}" "${local_filename}" - sed -i -e "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${local_filename}" - sed -i -e "s/gameservername=\"core\"/gameservername=\"${gameservername}\"/g" "${local_filename}" - echo -e "Installed ${gamename} server as ${local_filename}" - echo -e "" - if [ ! -d "${serverfiles}" ]; then - echo -e "./${local_filename} install" - else - echo -e "Remember to check server ports" - echo -e "./${local_filename} details" - fi - echo -e "" - exit -} - -# Prevent LinuxGSM from running as root. Except if doing a dependency install. -if [ "$(whoami)" == "root" ]; then - if [ "${userinput}" == "install" ] || [ "${userinput}" == "auto-install" ] || [ "${userinput}" == "i" ] || [ "${userinput}" == "ai" ]; then - if [ "${shortname}" == "core" ]; then - echo -e "[ FAIL ] Do NOT run this script as root!" - exit 1 - fi - elif [ ! -f "${modulesdir}/core_modules.sh" ] || [ ! -f "${modulesdir}/check_root.sh" ] || [ ! -f "${modulesdir}/core_messages.sh" ]; then - echo -e "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_modules.sh - check_root.sh - fi -fi - -# LinuxGSM installer mode. -if [ "${shortname}" == "core" ]; then - # Download the latest serverlist. This is the complete list of all supported servers. - fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nohash" - if [ ! -f "${serverlist}" ]; then - echo -e "[ FAIL ] serverlist.csv could not be loaded." - exit 1 - fi - - if [ "${userinput}" == "list" ] || [ "${userinput}" == "l" ]; then - { - tail -n +2 "${serverlist}" | awk -F "," '{print $2 "\t" $3}' - } | column -s $'\t' -t | more - exit - elif [ "${userinput}" == "install" ] || [ "${userinput}" == "i" ]; then - tail -n +2 "${serverlist}" | awk -F "," '{print $1 "," $2 "," $3}' > "${serverlistmenu}" - fn_install_menu result "LinuxGSM" "Select game server to install." "${serverlistmenu}" - userinput="${result}" - fn_server_info - if [ "${result}" == "${gameservername}" ]; then - fn_install_file - elif [ "${result}" == "" ]; then - echo -e "Install canceled" - else - echo -e "[ FAIL ] menu result does not match gameservername" - echo -e "result: ${result}" - echo -e "gameservername: ${gameservername}" - fi - elif [ "${userinput}" ]; then - fn_server_info - if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then - fn_install_file - else - echo -e "[ FAIL ] Unknown game server" - fi - else - fn_install_getopt - fi - -# LinuxGSM server mode. -else - core_modules.sh - if [ "${shortname}" != "core-dep" ]; then - # Load LinuxGSM configs. - # These are required to get all the default variables for the specific server. - # Load the default config. If missing download it. If changed reload it. - if [ ! -f "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" ]; then - mkdir -p "${configdirdefault}/config-lgsm/${gameservername}" - fn_fetch_config "lgsm/config-default/config-lgsm/${gameservername}" "_default.cfg" "${configdirdefault}/config-lgsm/${gameservername}" "_default.cfg" "nochmodx" "norun" "noforcedl" "nohash" - fi - if [ ! -f "${configdirserver}/_default.cfg" ]; then - mkdir -p "${configdirserver}" - echo -en "copying _default.cfg...\c" - cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" - exitcode=$? - if [ "${exitcode}" != 0 ]; then - echo -e "FAIL" - exit 1 - else - echo -e "OK" - fi - else - module_file_diff=$(diff -q "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg") - if [ "${module_file_diff}" != "" ]; then - fn_print_warn_nl "_default.cfg has been altered. reloading config." - echo -en "copying _default.cfg...\c" - cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" - exitcode=$? - if [ "${exitcode}" != 0 ]; then - echo -e "FAIL" - exit 1 - else - echo -e "OK" - fi - fi - fi - # shellcheck source=/dev/null - source "${configdirserver}/_default.cfg" - # Load the common.cfg config. If missing download it. - if [ ! -f "${configdirserver}/common.cfg" ]; then - fn_fetch_config "lgsm/config-default/config-lgsm" "common-template.cfg" "${configdirserver}" "common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nohash" - # shellcheck source=/dev/null - source "${configdirserver}/common.cfg" - else - # shellcheck source=/dev/null - source "${configdirserver}/common.cfg" - fi - # Load the secrets-common.cfg config. If missing download it. - if [ ! -f "${configdirserver}/secrets-common.cfg" ]; then - fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-common.cfg" "${configdirserver}" "secrets-common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nohash" - # shellcheck source=/dev/null - source "${configdirserver}/secrets-common.cfg" - else - # shellcheck source=/dev/null - source "${configdirserver}/secrets-common.cfg" - fi - # Load the instance.cfg config. If missing download it. - if [ ! -f "${configdirserver}/${selfname}.cfg" ]; then - fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nohash" - # shellcheck source=/dev/null - source "${configdirserver}/${selfname}.cfg" - else - # shellcheck source=/dev/null - source "${configdirserver}/${selfname}.cfg" - fi - # Load the secrets-instance.cfg config. If missing download it. - if [ ! -f "${configdirserver}/secrets-${selfname}.cfg" ]; then - fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-instance-template.cfg" "${configdirserver}" "secrets-${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nohash" - # shellcheck source=/dev/null - source "${configdirserver}/secrets-${selfname}.cfg" - else - # shellcheck source=/dev/null - source "${configdirserver}/secrets-${selfname}.cfg" - fi - - # Load the linuxgsm.sh in to tmpdir. If missing download it. - if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then - fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "chmodx" "norun" "noforcedl" "nohash" - fi - fi - # Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off. - fn_ansi_loader - # Prevents running of core_exit.sh for Travis-CI. - if [ "${travistest}" != "1" ]; then - getopt=$1 - core_getopt.sh - fi -fi - -fn_currentstatus_tmux() { - check_status.sh - if [ "${status}" != "0" ]; then - currentstatus="STARTED" - else - currentstatus="STOPPED" - fi -} - -fn_setstatus() { - fn_currentstatus_tmux - echo"" - echo -e "Required status: ${requiredstatus}" - counter=0 - echo -e "Current status: ${currentstatus}" - while [ "${requiredstatus}" != "${currentstatus}" ]; do - counter=$((counter + 1)) - fn_currentstatus_tmux - echo -en "New status: ${currentstatus}\\r" - - if [ "${requiredstatus}" == "STARTED" ]; then - (command_start.sh > /dev/null 2>&1) - else - (command_stop.sh > /dev/null 2>&1) - fi - if [ "${counter}" -gt "5" ]; then - currentstatus="FAIL" - echo -e "Current status: ${currentstatus}" - echo -e "" - echo -e "Unable to start or stop server." - exit 1 - fi - done - echo -en "New status: ${currentstatus}\\r" - echo -e "\n" - echo -e "Test starting:" - echo -e "" -} - -# End of every test will expect the result to either pass or fail -# If the script does not do as intended the whole test will fail -# if expecting a pass -fn_test_result_pass() { - if [ $? != 0 ]; then - echo -e "=================================" - echo -e "Expected result: PASS" - echo -e "Actual result: FAIL" - fn_print_fail_nl "TEST FAILED" - exitcode=1 - core_exit.sh - else - echo -e "=================================" - echo -e "Expected result: PASS" - echo -e "Actual result: PASS" - fn_print_ok_nl "TEST PASSED" - echo -e "" - fi -} - -# if expecting a fail -fn_test_result_fail() { - if [ $? == 0 ]; then - echo -e "=================================" - echo -e "Expected result: FAIL" - echo -e "Actual result: PASS" - fn_print_fail_nl "TEST FAILED" - exitcode=1 - core_exit.sh - else - echo -e "=================================" - echo -e "Expected result: FAIL" - echo -e "Actual result: FAIL" - fn_print_ok_nl "TEST PASSED" - echo -e "" - fi -} - -# test result n/a -fn_test_result_na() { - echo -e "=================================" - echo -e "Expected result: N/A" - echo -e "Actual result: N/A" - fn_print_fail_nl "TEST N/A" -} - -sleeptime="0" - -echo -e "=================================" -echo -e "Travis CI Tests" -echo -e "Linux Game Server Manager" -echo -e "by Daniel Gibbs" -echo -e "Contributors: http://goo.gl/qLmitD" -echo -e "https://linuxgsm.com" -echo -e "=================================" -echo -e "" -echo -e "=================================" -echo -e "Server Tests" -echo -e "Using: ${gamename}" -echo -e "Testing Branch: ${TRAVIS_BRANCH}" -echo -e "=================================" -echo -e "" -echo -e "Tests Summary" -echo -e "=================================" -echo -e "0.0 - Pre-test Tasks" -echo -e "0.1 - Create log dir's" -echo -e "0.2 - Enable dev-debug" -echo -e "" -echo -e "1.0 - Pre-install tests" -echo -e "1.1 - start - no files" -echo -e "1.2 - getopt" -echo -e "1.3 - getopt with incorrect args" -echo -e "" -echo -e "2.0 - Installation" -echo -e "2.1 - install" -echo -e "" -echo -e "3.0 - Start/Stop/Restart Tests" -echo -e "3.1 - start" -echo -e "3.2 - start - online" -echo -e "3.3 - start - updateonstart" -echo -e "3.4 - stop" -echo -e "3.5 - stop - offline" -echo -e "3.6 - restart" -echo -e "3.7 - restart - offline" -echo -e "" -echo -e "4.0 - Update Tests" -echo -e "4.1 - update" -echo -e "4.2 - update-lgsm" -echo -e "" -echo -e "5.0 - Monitor Tests" -echo -e "5.1 - monitor - online" -echo -e "5.2 - monitor - offline - with lockfile" -echo -e "5.3 - monitor - offline - no lockfile" -echo -e "5.4 - test-alert" -echo -e "" -echo -e "6.0 - Details Tests" -echo -e "6.1 - details" -echo -e "6.2 - postdetails" -echo -e "" -echo -e "7.0 - Backup Tests" -echo -e "7.1 - backup" -echo -e "" -echo -e "8.0 - Development Tools Tests" -echo -e "8.1 - dev - detect glibc" -echo -e "8.2 - dev - detect ldd" -echo -e "8.3 - dev - detect deps" -echo -e "8.4 - dev - query-raw" -echo -e "" -echo -e "9.0 - Sponsor" -echo -e "9.1 - sponsor" - -echo -e "" -echo -e "0.0 - Pre-test Tasks" -echo -e "==================================================================" -echo -e "Description:" -echo -e "Create log dir's" -echo -e "" - -echo -e "" -echo -e "0.1 - Create log dir's" -echo -e "=================================" -echo -e "" -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - install_logs.sh -) -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "0.2 - Enable dev-debug" -echo -e "=================================" -echo -e "Description:" -echo -e "Enable dev-debug" -echo -e "" -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_dev_debug.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "1.0 - Pre-install tests" -echo -e "==================================================================" -echo -e "" - -echo -e "1.1 - start - no files" -echo -e "=================================" -echo -e "Description:" -echo -e "test script reaction to missing server files." -echo -e "Command: ./${gameservername} start" -echo -e "" -# Allows for testing not on Travis CI -if [ -z "${TRAVIS}" ]; then - ( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_start.sh - ) - fn_test_result_fail -else - echo -e "Test bypassed" -fi - -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "1.2 - getopt" -echo -e "=================================" -echo -e "Description:" -echo -e "displaying options messages." -echo -e "Command: ./${gameservername}" -echo -e "" -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - core_getopt.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "1.3 - getopt with incorrect args" -echo -e "=================================" -echo -e "Description:" -echo -e "displaying options messages." -echo -e "Command: ./${gameservername} abc123" -echo -e "" -getopt="abc123" -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - core_getopt.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "2.0 - Installation" -echo -e "==================================================================" - -echo -e "" -echo -e "2.1 - install" -echo -e "=================================" -echo -e "Description:" -echo -e "install ${gamename} server." -echo -e "Command: ./${gameservername} auto-install" -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - fn_autoinstall -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "3.0 - Start/Stop/Restart Tests" -echo -e "==================================================================" - -echo -e "" -echo -e "3.1 - start" -echo -e "=================================" -echo -e "Description:" -echo -e "start ${gamename} server." -echo -e "Command: ./${gameservername} start" -requiredstatus="STOPPED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_start.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "3.2 - start - online" -echo -e "=================================" -echo -e "Description:" -echo -e "start ${gamename} server while already running." -echo -e "Command: ./${gameservername} start" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_start.sh -) -fn_test_result_fail -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "3.3 - start - updateonstart" -echo -e "=================================" -echo -e "Description:" -echo -e "will update server on start." -echo -e "Command: ./${gameservername} start" -requiredstatus="STOPPED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - updateonstart="on" - command_start.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' -echo -e "" -echo -e "30s Pause" -echo -e "=================================" -echo -e "Description:" -echo -e "give time for server to fully start." -echo -e "Command: sleep 30" -requiredstatus="STARTED" -fn_setstatus -sleep 30 - -echo -e "" -echo -e "3.4 - stop" -echo -e "=================================" -echo -e "Description:" -echo -e "stop ${gamename} server." -echo -e "Command: ./${gameservername} stop" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_stop.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "3.5 - stop - offline" -echo -e "=================================" -echo -e "Description:" -echo -e "stop ${gamename} server while already stopped." -echo -e "Command: ./${gameservername} stop" -requiredstatus="STOPPED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_stop.sh -) -fn_test_result_fail -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "3.6 - restart" -echo -e "=================================" -echo -e "Description:" -echo -e "restart ${gamename}." -echo -e "Command: ./${gameservername} restart" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_restart.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "3.7 - restart - offline" -echo -e "=================================" -echo -e "Description:" -echo -e "restart ${gamename} while already stopped." -echo -e "Command: ./${gameservername} restart" -requiredstatus="STOPPED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_restart.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "4.0 - Update Tests" -echo -e "==================================================================" - -echo -e "" -echo -e "4.1 - update" -echo -e "=================================" -echo -e "Description:" -echo -e "check for updates." -echo -e "Command: ./${gameservername} update" -requiredstatus="STOPPED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_update.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "4.2 - update-lgsm" -echo -e "=================================" -echo -e "Description:" -echo -e "update LinuxGSM." -echo -e "" -echo -e "Command: ./jc2server update-lgam" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_update_linuxgsm.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "Inserting IP address" -echo -e "=================================" -echo -e "Description:" -echo -e "Inserting Travis IP in to config." -echo -e "Allows monitor to work" -if [ "$(${ipcommand}-o -4 addr | grep eth0)" ]; then - travisip=$(${ipcommand}-o -4 addr | grep eth0 | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | grep -v 127.0.0) -else - travisip=$(${ipcommand}-o -4 addr | grep ens | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | sort -u | grep -v 127.0.0) -fi -sed -i "/server-ip=/c\server-ip=${travisip}" "${serverfiles}/server.properties" -echo -e "IP: ${travisip}" - -echo -e "" -echo -e "5.0 - Monitor Tests" -echo -e "==================================================================" -echo -e "" -info_game.sh -echo -e "Server IP - Port: ${ip}:${port}" -echo -e "Server IP - Query Port: ${ip}:${queryport}" - -echo -e "" -echo -e "30s Pause" -echo -e "=================================" -echo -e "Description:" -echo -e "give time for server to fully start." -echo -e "Command: sleep 30" -requiredstatus="STARTED" -fn_setstatus -sleep 30 - -echo -e "" -echo -e "5.1 - monitor - online" -echo -e "=================================" -echo -e "Description:" -echo -e "run monitor server while already running." -echo -e "Command: ./${gameservername} monitor" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_monitor.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "5.2 - monitor - offline - with lockfile" -echo -e "=================================" -echo -e "Description:" -echo -e "run monitor while server is offline with lockfile." -echo -e "Command: ./${gameservername} monitor" -requiredstatus="STOPPED" -fn_setstatus -fn_print_info_nl "creating lockfile." -date '+%s' > "${lockdir}/${selfname}.lock" -echo "${version}" >> "${lockdir}/${selfname}.lock" -echo "${port}" >> "${lockdir}/${selfname}.lock" -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_monitor.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "5.3 - monitor - offline - no lockfile" -echo -e "=================================" -echo -e "Description:" -echo -e "run monitor while server is offline with no lockfile." -echo -e "Command: ./${gameservername} monitor" -requiredstatus="STOPPED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_monitor.sh -) -fn_test_result_fail -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "5.4 - test-alert" -echo -e "=================================" -echo -e "Description:" -echo -e "run monitor while server is offline with no lockfile." -echo -e "Command: ./${gameservername} test-alert" -requiredstatus="STOPPED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_test_alert.sh -) -fn_test_result_fail -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "6.0 - Details Tests" -echo -e "==================================================================" - -echo -e "" -echo -e "6.1 - details" -echo -e "=================================" -echo -e "Description:" -echo -e "display details." -echo -e "Command: ./${gameservername} details" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_details.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "6.2 - postdetails" -echo -e "=================================" -echo -e "Description:" -echo -e "post details." -echo -e "Command: ./${gameservername} postdetails" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_postdetails.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "7.0 - Backup Tests" -echo -e "==================================================================" - -echo -e "" -echo -e "7.1 - backup" -echo -e "=================================" -echo -e "Description:" -echo -e "run a backup." -echo -e "Command: ./${gameservername} backup" -requiredstatus="STARTED" -fn_setstatus -echo -e "test de-activated until issue #1839 fixed" -#(command_backup.sh) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "8.0 - Development Tools Tests" -echo -e "==================================================================" - -echo -e "" -echo -e "8.1 - dev - detect glibc" -echo -e "=================================" -echo -e "Description:" -echo -e "detect glibc." -echo -e "Command: ./${gameservername} detect-glibc" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_dev_detect_glibc.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "8.2 - dev - detect ldd" -echo -e "=================================" -echo -e "Description:" -echo -e "detect ldd." -echo -e "Command: ./${gameservername} detect-ldd" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_dev_detect_ldd.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "8.3 - dev - detect deps" -echo -e "=================================" -echo -e "Description:" -echo -e "detect dependencies." -echo -e "Command: ./${gameservername} detect-deps" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_dev_detect_deps.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "Inserting IP address" -echo -e "=================================" -echo -e "Description:" -echo -e "Inserting Travis IP in to config." -echo -e "Allows monitor to work" -if [ "$(${ipcommand}-o -4 addr | grep eth0)" ]; then - travisip=$(${ipcommand}-o -4 addr | grep eth0 | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | grep -v 127.0.0) -else - travisip=$(${ipcommand}-o -4 addr | grep ens | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | sort -u | grep -v 127.0.0) -fi -sed -i "/server-ip=/c\server-ip=${travisip}" "${serverfiles}/server.properties" -echo -e "IP: ${travisip}" - -echo -e "" -echo -e "8.4 - dev - query-raw" -echo -e "=================================" -echo -e "Description:" -echo -e "raw query output." -echo -e "Command: ./${gameservername} query-raw" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_dev_query_raw.sh -) -fn_test_result_na -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "9.0 - Sponsor" -echo -e "==================================================================" - -echo -e "" -echo -e "9.1 - sponsor" -echo -e "=================================" -echo -e "Description:" -echo -e "sponsor." -echo -e "Command: ./${gameservername} sponsor" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_sponsor.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "=================================" -echo -e "Server Tests - Complete!" -echo -e "Using: ${gamename}" -echo -e "=================================" -requiredstatus="STOPPED" -fn_setstatus - -core_exit.sh diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh deleted file mode 100644 index 3fcb8ae24..000000000 --- a/tests/tests_ts3server.sh +++ /dev/null @@ -1,1184 +0,0 @@ -#!/bin/bash -# Project: Game Server Managers - LinuxGSM -# Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2020 Daniel Gibbs -# Purpose: Travis CI Tests: Teamspeak 3 | Linux Game Server Management Script -# Contributors: https://linuxgsm.com/contrib -# Documentation: https://docs.linuxgsm.com -# Website: https://linuxgsm.com - -# DO NOT EDIT THIS FILE -# LinuxGSM configuration is no longer edited here -# To update your LinuxGSM config go to: -# lgsm/config-lgsm -# https://docs.linuxgsm.com/configuration/linuxgsm-config - -# Debugging -if [ -f ".dev-debug" ]; then - exec 5> dev-debug.log - BASH_XTRACEFD="5" - set -x -fi - -version="v23.5.3" -shortname="ts3" -gameservername="ts3server" -commandname="CORE" -rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") -selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") -sessionname=$(echo "${selfname}" | cut -f1 -d".") -lgsmdir="${rootdir}/lgsm" -logdir="${rootdir}/log" -lgsmlogdir="${logdir}/lgsm" -steamcmddir="${HOME}/.steam/steamcmd" -serverfiles="${rootdir}/serverfiles" -modulesdir="${lgsmdir}/modules" -tmpdir="${lgsmdir}/tmp" -datadir="${lgsmdir}/data" -lockdir="${lgsmdir}/lock" -serverlist="${datadir}/serverlist.csv" -serverlistmenu="${datadir}/serverlistmenu.csv" -configdir="${lgsmdir}/config-lgsm" -configdirserver="${configdir}/${gameservername}" -configdirdefault="${lgsmdir}/config-default" -userinput="${1}" - -# Allows for testing not on Travis CI. -# if using travis for tests -if [ -z "${TRAVIS}" ]; then - TRAVIS_BRANCH="develop" - TRAVIS_BUILD_DIR="${rootdir}" -fi -travistest="1" - -## GitHub Branch Select -# Allows for the use of different module files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="${TRAVIS_BRANCH}" - -# Core module that is required first. -core_modules.sh() { - modulefile="${FUNCNAME[0]}" - fn_bootstrap_fetch_file_github "lgsm/modules" "core_modules.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" -} - -# Bootstrap -# Fetches the core modules required before passed off to core_dl.sh. -fn_bootstrap_fetch_file() { - remote_fileurl="${1}" - remote_fileurl_backup="${2}" - remote_fileurl_name="${3}" - remote_fileurl_backup_name="${4}" - local_filedir="${5}" - local_filename="${6}" - chmodx="${7:-0}" - run="${8:-0}" - forcedl="${9:-0}" - md5="${10:-0}" - # Download file if missing or download forced. - if [ ! -f "${local_filedir}/${local_filename}" ] || [ "${forcedl}" == "forcedl" ]; then - # If backup fileurl exists include it. - if [ -n "${remote_fileurl_backup}" ]; then - # counter set to 0 to allow second try - counter=0 - remote_fileurls_array=(remote_fileurl remote_fileurl_backup) - else - # counter set to 1 to not allow second try - counter=1 - remote_fileurls_array=(remote_fileurl) - fi - - for remote_fileurl_array in "${remote_fileurls_array[@]}"; do - if [ "${remote_fileurl_array}" == "remote_fileurl" ]; then - fileurl="${remote_fileurl}" - fileurl_name="${remote_fileurl_name}" - elif [ "${remote_fileurl_array}" == "remote_fileurl_backup" ]; then - fileurl="${remote_fileurl_backup}" - fileurl_name="${remote_fileurl_backup_name}" - fi - counter=$((counter + 1)) - if [ ! -d "${local_filedir}" ]; then - mkdir -p "${local_filedir}" - fi - # Trap will remove part downloaded files if canceled. - trap fn_fetch_trap INT - # Larger files show a progress bar. - - echo -en "fetching ${fileurl_name} ${local_filename}...\c" - curlcmd=$(curl -s --fail -L -o "${local_filedir}/${local_filename}" "${fileurl}" 2>&1) - - local exitcode=$? - # Download will fail if downloads a html file. - if [ -f "${local_filedir}/${local_filename}" ]; then - if [ -n "$(head "${local_filedir}/${local_filename}" | grep "DOCTYPE")" ]; then - rm -f "${local_filedir:?}/${local_filename:?}" - local exitcode=2 - fi - fi - - # On first try will error. On second try will fail. - if [ "${exitcode}" != 0 ]; then - if [ ${counter} -ge 2 ]; then - echo -e "FAIL" - if [ -f "${lgsmlog}" ]; then - fn_script_log_fail "Downloading ${local_filename}" - fn_script_log_fail "${fileurl}" - fi - core_exit.sh - else - echo -e "ERROR" - if [ -f "${lgsmlog}" ]; then - fn_script_log_error "Downloading ${local_filename}" - fn_script_log_error "${fileurl}" - fi - fi - - else - echo -en "OK" - sleep 0.3 - echo -en "\033[2K\\r" - if [ -f "${lgsmlog}" ]; then - fn_script_log_pass "Downloading ${local_filename}" - fi - - # Make file executable if chmodx is set. - if [ "${chmodx}" == "chmodx" ]; then - chmod +x "${local_filedir}/${local_filename}" - fi - - # Remove trap. - trap - INT - - break - fi - done - fi - - if [ -f "${local_filedir}/${local_filename}" ]; then - # Execute file if run is set. - if [ "${run}" == "run" ]; then - # shellcheck source=/dev/null - source "${local_filedir}/${local_filename}" - fi - fi -} - -fn_bootstrap_fetch_file_github() { - github_file_url_dir="${1}" - github_file_url_name="${2}" - # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. - if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" - else - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - fi - remote_fileurl_name="GitHub" - remote_fileurl_backup_name="Bitbucket" - local_filedir="${3}" - local_filename="${github_file_url_name}" - chmodx="${4:-0}" - run="${5:-0}" - forcedl="${6:-0}" - md5="${7:-0}" - # Passes vars to the file download module. - fn_bootstrap_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" -} - -# Installer menu. - -fn_print_center() { - columns=$(tput cols) - line="$*" - printf "%*s\n" $(((${#line} + columns) / 2)) "${line}" -} - -fn_print_horizontal() { - printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' "=" -} - -# Bash menu. -fn_install_menu_bash() { - local resultvar=$1 - title=$2 - caption=$3 - options=$4 - fn_print_horizontal - fn_print_center "${title}" - fn_print_center "${caption}" - fn_print_horizontal - menu_options=() - while read -r line || [[ -n "${line}" ]]; do - var=$(echo -e "${line}" | awk -F "," '{print $2 " - " $3}') - menu_options+=("${var}") - done < "${options}" - menu_options+=("Cancel") - select option in "${menu_options[@]}"; do - if [ "${option}" ] && [ "${option}" != "Cancel" ]; then - eval "$resultvar=\"${option/%\ */}\"" - fi - break - done -} - -# Whiptail/Dialog menu. -fn_install_menu_whiptail() { - local menucmd=$1 - local resultvar=$2 - title=$3 - caption=$4 - options=$5 - height=${6:-40} - width=${7:-80} - menuheight=${8:-30} - IFS="," - menu_options=() - while read -r line; do - key=$(echo -e "${line}" | awk -F "," '{print $3}') - val=$(echo -e "${line}" | awk -F "," '{print $2}') - menu_options+=("${val//\"/}" "${key//\"/}") - done < "${options}" - OPTION=$(${menucmd} --title "${title}" --menu "${caption}" "${height}" "${width}" "${menuheight}" "${menu_options[@]}" 3>&1 1>&2 2>&3) - if [ $? == 0 ]; then - eval "$resultvar=\"${OPTION}\"" - else - eval "$resultvar=" - fi -} - -# Menu selector. -fn_install_menu() { - local resultvar=$1 - local selection="" - title=$2 - caption=$3 - options=$4 - # Get menu command. - for menucmd in whiptail dialog bash; do - if [ "$(command -v "${menucmd}")" ]; then - menucmd=$(command -v "${menucmd}") - break - fi - done - case "$(basename "${menucmd}")" in - whiptail | dialog) - fn_install_menu_whiptail "${menucmd}" selection "${title}" "${caption}" "${options}" 40 80 30 - ;; - *) - fn_install_menu_bash selection "${title}" "${caption}" "${options}" - ;; - esac - eval "$resultvar=\"${selection}\"" -} - -# Gets server info from serverlist.csv and puts in to array. -fn_server_info() { - IFS="," - server_info_array=($(grep -aw "${userinput}" "${serverlist}")) - shortname="${server_info_array[0]}" # csgo - gameservername="${server_info_array[1]}" # csgoserver - gamename="${server_info_array[2]}" # Counter Strike: Global Offensive -} - -fn_install_getopt() { - userinput="empty" - echo -e "Usage: $0 [option]" - echo -e "" - echo -e "Installer - Linux Game Server Managers - Version ${version}" - echo -e "https://linuxgsm.com" - echo -e "" - echo -e "Commands" - echo -e "install\t\t| Select server to install." - echo -e "servername\t| Enter name of game server to install. e.g $0 csgoserver." - echo -e "list\t\t| List all servers available for install." - exit -} - -fn_install_file() { - local_filename="${gameservername}" - if [ -e "${local_filename}" ]; then - i=2 - while [ -e "${local_filename}-${i}" ]; do - ((i++)) - done - local_filename="${local_filename}-${i}" - fi - cp -R "${selfname}" "${local_filename}" - sed -i -e "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${local_filename}" - sed -i -e "s/gameservername=\"core\"/gameservername=\"${gameservername}\"/g" "${local_filename}" - echo -e "Installed ${gamename} server as ${local_filename}" - echo -e "" - if [ ! -d "${serverfiles}" ]; then - echo -e "./${local_filename} install" - else - echo -e "Remember to check server ports" - echo -e "./${local_filename} details" - fi - echo -e "" - exit -} - -# Prevent LinuxGSM from running as root. Except if doing a dependency install. -if [ "$(whoami)" == "root" ]; then - if [ "${userinput}" == "install" ] || [ "${userinput}" == "auto-install" ] || [ "${userinput}" == "i" ] || [ "${userinput}" == "ai" ]; then - if [ "${shortname}" == "core" ]; then - echo -e "[ FAIL ] Do NOT run this script as root!" - exit 1 - fi - elif [ ! -f "${modulesdir}/core_modules.sh" ] || [ ! -f "${modulesdir}/check_root.sh" ] || [ ! -f "${modulesdir}/core_messages.sh" ]; then - echo -e "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_modules.sh - check_root.sh - fi -fi - -# LinuxGSM installer mode. -if [ "${shortname}" == "core" ]; then - # Download the latest serverlist. This is the complete list of all supported servers. - fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nohash" - if [ ! -f "${serverlist}" ]; then - echo -e "[ FAIL ] serverlist.csv could not be loaded." - exit 1 - fi - - if [ "${userinput}" == "list" ] || [ "${userinput}" == "l" ]; then - { - tail -n +2 "${serverlist}" | awk -F "," '{print $2 "\t" $3}' - } | column -s $'\t' -t | more - exit - elif [ "${userinput}" == "install" ] || [ "${userinput}" == "i" ]; then - tail -n +2 "${serverlist}" | awk -F "," '{print $1 "," $2 "," $3}' > "${serverlistmenu}" - fn_install_menu result "LinuxGSM" "Select game server to install." "${serverlistmenu}" - userinput="${result}" - fn_server_info - if [ "${result}" == "${gameservername}" ]; then - fn_install_file - elif [ "${result}" == "" ]; then - echo -e "Install canceled" - else - echo -e "[ FAIL ] menu result does not match gameservername" - echo -e "result: ${result}" - echo -e "gameservername: ${gameservername}" - fi - elif [ "${userinput}" ]; then - fn_server_info - if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then - fn_install_file - else - echo -e "[ FAIL ] Unknown game server" - fi - else - fn_install_getopt - fi - -# LinuxGSM server mode. -else - core_modules.sh - if [ "${shortname}" != "core-dep" ]; then - # Load LinuxGSM configs. - # These are required to get all the default variables for the specific server. - # Load the default config. If missing download it. If changed reload it. - if [ ! -f "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" ]; then - mkdir -p "${configdirdefault}/config-lgsm/${gameservername}" - fn_fetch_config "lgsm/config-default/config-lgsm/${gameservername}" "_default.cfg" "${configdirdefault}/config-lgsm/${gameservername}" "_default.cfg" "nochmodx" "norun" "noforcedl" "nohash" - fi - if [ ! -f "${configdirserver}/_default.cfg" ]; then - mkdir -p "${configdirserver}" - echo -en "copying _default.cfg...\c" - cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" - exitcode=$? - if [ "${exitcode}" != 0 ]; then - echo -e "FAIL" - exit 1 - else - echo -e "OK" - fi - else - module_file_diff=$(diff -q "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg") - if [ "${module_file_diff}" != "" ]; then - fn_print_warn_nl "_default.cfg has been altered. reloading config." - echo -en "copying _default.cfg...\c" - cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" - exitcode=$? - if [ "${exitcode}" != 0 ]; then - echo -e "FAIL" - exit 1 - else - echo -e "OK" - fi - fi - fi - # shellcheck source=/dev/null - source "${configdirserver}/_default.cfg" - # Load the common.cfg config. If missing download it. - if [ ! -f "${configdirserver}/common.cfg" ]; then - fn_fetch_config "lgsm/config-default/config-lgsm" "common-template.cfg" "${configdirserver}" "common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nohash" - # shellcheck source=/dev/null - source "${configdirserver}/common.cfg" - else - # shellcheck source=/dev/null - source "${configdirserver}/common.cfg" - fi - # Load the secrets-common.cfg config. If missing download it. - if [ ! -f "${configdirserver}/secrets-common.cfg" ]; then - fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-common-template.cfg" "${configdirserver}" "secrets-common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nohash" - # shellcheck source=/dev/null - source "${configdirserver}/secrets-common.cfg" - else - # shellcheck source=/dev/null - source "${configdirserver}/secrets-common.cfg" - fi - # Load the instance.cfg config. If missing download it. - if [ ! -f "${configdirserver}/${selfname}.cfg" ]; then - fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nohash" - # shellcheck source=/dev/null - source "${configdirserver}/${selfname}.cfg" - else - # shellcheck source=/dev/null - source "${configdirserver}/${selfname}.cfg" - fi - # Load the secrets-instance.cfg config. If missing download it. - if [ ! -f "${configdirserver}/secrets-${selfname}.cfg" ]; then - fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-instance-template.cfg" "${configdirserver}" "secrets-${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nohash" - # shellcheck source=/dev/null - source "${configdirserver}/secrets-${selfname}.cfg" - else - # shellcheck source=/dev/null - source "${configdirserver}/secrets-${selfname}.cfg" - fi - - # Load the linuxgsm.sh in to tmpdir. If missing download it. - if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then - fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "chmodx" "norun" "noforcedl" "nohash" - fi - fi - # Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off. - fn_ansi_loader - # Prevents running of core_exit.sh for Travis-CI. - if [ "${travistest}" != "1" ]; then - getopt=$1 - core_getopt.sh - fi -fi - -fn_currentstatus_tmux() { - check_status.sh - if [ "${status}" != "0" ]; then - currentstatus="STARTED" - else - currentstatus="STOPPED" - fi -} - -fn_setstatus() { - fn_currentstatus_tmux - echo"" - echo -e "Required status: ${requiredstatus}" - counter=0 - echo -e "Current status: ${currentstatus}" - while [ "${requiredstatus}" != "${currentstatus}" ]; do - counter=$((counter + 1)) - fn_currentstatus_tmux - echo -en "New status: ${currentstatus}\\r" - - if [ "${requiredstatus}" == "STARTED" ]; then - (command_start.sh > /dev/null 2>&1) - else - (command_stop.sh > /dev/null 2>&1) - fi - if [ "${counter}" -gt "5" ]; then - currentstatus="FAIL" - echo -e "Current status: ${currentstatus}" - echo -e "" - echo -e "Unable to start or stop server." - exit 1 - fi - done - echo -en "New status: ${currentstatus}\\r" - echo -e "\n" - echo -e "Test starting:" - echo -e "" -} - -# End of every test will expect the result to either pass or fail -# If the script does not do as intended the whole test will fail -# if expecting a pass -fn_test_result_pass() { - if [ $? != 0 ]; then - echo -e "=================================" - echo -e "Expected result: PASS" - echo -e "Actual result: FAIL" - fn_print_fail_nl "TEST FAILED" - exitcode=1 - core_exit.sh - else - echo -e "=================================" - echo -e "Expected result: PASS" - echo -e "Actual result: PASS" - fn_print_ok_nl "TEST PASSED" - echo -e "" - fi -} - -# if expecting a fail -fn_test_result_fail() { - if [ $? == 0 ]; then - echo -e "=================================" - echo -e "Expected result: FAIL" - echo -e "Actual result: PASS" - fn_print_fail_nl "TEST FAILED" - exitcode=1 - core_exit.sh - else - echo -e "=================================" - echo -e "Expected result: FAIL" - echo -e "Actual result: FAIL" - fn_print_ok_nl "TEST PASSED" - echo -e "" - fi -} - -# test result n/a -fn_test_result_na() { - echo -e "=================================" - echo -e "Expected result: N/A" - echo -e "Actual result: N/A" - fn_print_fail_nl "TEST N/A" -} - -sleeptime="0" - -echo -e "=================================" -echo -e "Travis CI Tests" -echo -e "Linux Game Server Manager" -echo -e "by Daniel Gibbs" -echo -e "Contributors: http://goo.gl/qLmitD" -echo -e "https://linuxgsm.com" -echo -e "=================================" -echo -e "" -echo -e "=================================" -echo -e "Server Tests" -echo -e "Using: ${gamename}" -echo -e "Testing Branch: ${TRAVIS_BRANCH}" -echo -e "=================================" - -echo -e "" -echo -e "Tests Summary" -echo -e "=================================" -echo -e "0.0 - Pre-test Tasks" -echo -e "0.1 - Create log dir's" -echo -e "0.2 - Enable dev-debug" -echo -e "" -echo -e "1.0 - Pre-install tests" -echo -e "1.1 - start - no files" -echo -e "1.2 - getopt" -echo -e "1.3 - getopt with incorrect args" -echo -e "" -echo -e "2.0 - Installation" -echo -e "2.1 - install" -echo -e "" -echo -e "3.0 - Start/Stop/Restart Tests" -echo -e "3.1 - start" -echo -e "3.2 - start - online" -echo -e "3.3 - start - updateonstart" -echo -e "3.4 - stop" -echo -e "3.5 - stop - offline" -echo -e "3.6 - restart" -echo -e "3.7 - restart - offline" -echo -e "" -echo -e "4.0 - Update Tests" -echo -e "4.1 - update" -echo -e "4.2 - update-lgsm" -echo -e "" -echo -e "5.0 - Monitor Tests" -echo -e "5.1 - monitor - online" -echo -e "5.2 - monitor - offline - with lockfile" -echo -e "5.3 - monitor - offline - no lockfile" -echo -e "5.4 - test-alert" -echo -e "" -echo -e "6.0 - Details Tests" -echo -e "6.1 - details" -echo -e "6.2 - postdetails" -echo -e "" -echo -e "7.0 - Backup Tests" -echo -e "7.1 - backup" -echo -e "" -echo -e "8.0 - Development Tools Tests" -echo -e "8.1 - dev - detect glibc" -echo -e "8.2 - dev - detect ldd" -echo -e "8.3 - dev - detect deps" -echo -e "8.4 - dev - query-raw" -echo -e "" -echo -e "9.0 - Sponsor" -echo -e "9.1 - sponsor" -echo -e "" -echo -e "0.0 - Pre-test Tasks" -echo -e "==================================================================" -echo -e "Description:" -echo -e "Create log dir's" -echo -e "" - -echo -e "" -echo -e "0.1 - Create log dir's" -echo -e "=================================" -echo -e "" -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - install_logs.sh -) -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "0.2 - Enable dev-debug" -echo -e "=================================" -echo -e "Description:" -echo -e "Enable dev-debug" -echo -e "" -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_dev_debug.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "1.0 - Pre-install tests" -echo -e "==================================================================" -echo -e "" - -echo -e "1.1 - start - no files" -echo -e "=================================" -echo -e "Description:" -echo -e "test script reaction to missing server files." -echo -e "Command: ./${gameservername} start" -echo -e "" -# Allows for testing not on Travis CI -if [ -z "${TRAVIS}" ]; then - ( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_start.sh - ) - fn_test_result_fail -else - echo -e "Test bypassed" -fi - -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "1.2 - getopt" -echo -e "=================================" -echo -e "Description:" -echo -e "displaying options messages." -echo -e "Command: ./${gameservername}" -echo -e "" -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - core_getopt.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "1.3 - getopt with incorrect args" -echo -e "=================================" -echo -e "Description:" -echo -e "displaying options messages." -echo -e "Command: ./${gameservername} abc123" -echo -e "" -getopt="abc123" -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - core_getopt.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "2.0 - Installation" -echo -e "==================================================================" - -echo -e "" -echo -e "2.1 - install" -echo -e "=================================" -echo -e "Description:" -echo -e "install ${gamename} server." -echo -e "Command: ./${gameservername} auto-install" -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - fn_autoinstall -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "3.0 - Start/Stop/Restart Tests" -echo -e "==================================================================" - -echo -e "" -echo -e "3.1 - start" -echo -e "=================================" -echo -e "Description:" -echo -e "start ${gamename} server." -echo -e "Command: ./${gameservername} start" -requiredstatus="STOPPED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_start.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "3.2 - start - online" -echo -e "=================================" -echo -e "Description:" -echo -e "start ${gamename} server while already running." -echo -e "Command: ./${gameservername} start" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_start.sh -) -fn_test_result_fail -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "3.3 - start - updateonstart" -echo -e "=================================" -echo -e "Description:" -echo -e "will update server on start." -echo -e "Command: ./${gameservername} start" -requiredstatus="STOPPED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - updateonstart="on" - command_start.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "3.4 - stop" -echo -e "=================================" -echo -e "Description:" -echo -e "stop ${gamename} server." -echo -e "Command: ./${gameservername} stop" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_stop.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "3.5 - stop - offline" -echo -e "=================================" -echo -e "Description:" -echo -e "stop ${gamename} server while already stopped." -echo -e "Command: ./${gameservername} stop" -requiredstatus="STOPPED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_stop.sh -) -fn_test_result_fail -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "3.6 - restart" -echo -e "=================================" -echo -e "Description:" -echo -e "restart ${gamename}." -echo -e "Command: ./${gameservername} restart" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_restart.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "3.7 - restart - offline" -echo -e "=================================" -echo -e "Description:" -echo -e "restart ${gamename} while already stopped." -echo -e "Command: ./${gameservername} restart" -requiredstatus="STOPPED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_restart.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "4.0 - Update Tests" -echo -e "==================================================================" - -echo -e "" -echo -e "4.1 - update" -echo -e "=================================" -echo -e "Description:" -echo -e "check for updates." -echo -e "Command: ./${gameservername} update" -requiredstatus="STOPPED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_update.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "4.2 - update-lgsm" -echo -e "=================================" -echo -e "Description:" -echo -e "update LinuxGSM." -echo -e "" -echo -e "Command: ./jc2server update-lgam" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_update_linuxgsm.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "5.0 - Monitor Tests" -echo -e "==================================================================" -echo -e "" -info_game.sh -echo -e "Server IP - Port: ${ip}:${port}" -echo -e "Server IP - Query Port: ${ip}:${queryport}" - -echo -e "" -echo -e "5.1 - monitor - online" -echo -e "=================================" -echo -e "Description:" -echo -e "run monitor server while already running." -echo -e "Command: ./${gameservername} monitor" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_monitor.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "5.2 - monitor - offline - with lockfile" -echo -e "=================================" -echo -e "Description:" -echo -e "run monitor while server is offline with lockfile." -echo -e "Command: ./${gameservername} monitor" -requiredstatus="STOPPED" -fn_setstatus -fn_print_info_nl "creating lockfile." -date '+%s' > "${lockdir}/${selfname}.lock" -echo "${version}" >> "${lockdir}/${selfname}.lock" -echo "${port}" >> "${lockdir}/${selfname}.lock" -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_monitor.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "5.3 - monitor - offline - no lockfile" -echo -e "=================================" -echo -e "Description:" -echo -e "run monitor while server is offline with no lockfile." -echo -e "Command: ./${gameservername} monitor" -requiredstatus="STOPPED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_monitor.sh -) -fn_test_result_fail -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "5.4 - test-alert" -echo -e "=================================" -echo -e "Description:" -echo -e "run monitor while server is offline with no lockfile." -echo -e "Command: ./${gameservername} test-alert" -requiredstatus="STOPPED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_test_alert.sh -) -fn_test_result_fail -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "6.0 - Details Tests" -echo -e "==================================================================" - -echo -e "" -echo -e "6.1 - details" -echo -e "=================================" -echo -e "Description:" -echo -e "display details." -echo -e "Command: ./${gameservername} details" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_details.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "6.2 - postdetails" -echo -e "=================================" -echo -e "Description:" -echo -e "post details." -echo -e "Command: ./${gameservername} postdetails" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_postdetails.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "7.0 - Backup Tests" -echo -e "==================================================================" - -echo -e "" -echo -e "7.1 - backup" -echo -e "=================================" -echo -e "Description:" -echo -e "run a backup." -echo -e "Command: ./${gameservername} backup" -requiredstatus="STARTED" -fn_setstatus -echo -e "test de-activated until issue #1839 fixed" -#(command_backup.sh) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "8.0 - Development Tools Tests" -echo -e "==================================================================" - -echo -e "" -echo -e "8.1 - dev - detect glibc" -echo -e "=================================" -echo -e "Description:" -echo -e "detect glibc." -echo -e "Command: ./${gameservername} detect-glibc" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_dev_detect_glibc.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "8.2 - dev - detect ldd" -echo -e "=================================" -echo -e "Description:" -echo -e "detect ldd." -echo -e "Command: ./${gameservername} detect-ldd" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_dev_detect_ldd.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "8.3 - dev - detect deps" -echo -e "=================================" -echo -e "Description:" -echo -e "detect dependencies." -echo -e "Command: ./${gameservername} detect-deps" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_dev_detect_deps.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "8.4 - dev - query-raw" -echo -e "=================================" -echo -e "Description:" -echo -e "raw query output." -echo -e "Command: ./${gameservername} query-raw" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_dev_query_raw.sh -) -fn_test_result_na -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "9.0 - Sponsor" -echo -e "==================================================================" - -echo -e "" -echo -e "9.1 - sponsor" -echo -e "=================================" -echo -e "Description:" -echo -e "sponsor." -echo -e "Command: ./${gameservername} sponsor" -requiredstatus="STARTED" -fn_setstatus -( - exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x - command_sponsor.sh -) -fn_test_result_pass -echo -e "run order" -echo -e "=================" -grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g' - -echo -e "" -echo -e "=================================" -echo -e "Server Tests - Complete!" -echo -e "Using: ${gamename}" -echo -e "=================================" -requiredstatus="STOPPED" -fn_setstatus - -core_exit.sh From 9ff3409f4e0fb2f07dd5edca7440db344981591c Mon Sep 17 00:00:00 2001 From: CosminPerRam Date: Sat, 14 Oct 2023 19:32:33 +0300 Subject: [PATCH 273/374] docs: replace gamedig repository links to the actual repository (#4338) --- lgsm/functions/query_gamedig.sh | 2 +- lgsm/modules/query_gamedig.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/query_gamedig.sh b/lgsm/functions/query_gamedig.sh index 265607acd..344874011 100644 --- a/lgsm/functions/query_gamedig.sh +++ b/lgsm/functions/query_gamedig.sh @@ -4,7 +4,7 @@ # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Querys a gameserver using node-gamedig. -# https://github.com/sonicsnes/node-gamedig +# https://github.com/gamedig/node-gamedig functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" querystatus="2" diff --git a/lgsm/modules/query_gamedig.sh b/lgsm/modules/query_gamedig.sh index 138e014a0..28f70a3b7 100644 --- a/lgsm/modules/query_gamedig.sh +++ b/lgsm/modules/query_gamedig.sh @@ -4,7 +4,7 @@ # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Querys a gameserver using node-gamedig. -# https://github.com/sonicsnes/node-gamedig +# https://github.com/gamedig/node-gamedig moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Default query status to failure. Will be changed to 0 if query is successful. From 68ae13c0695f1aaa5a1d6e8f711481e15e144542 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 15 Oct 2023 17:52:03 +0100 Subject: [PATCH 274/374] feat: change sleep timers (#4339) * refactor: simplify sleep time functions The `fn_sleep_time` function has been refactored to remove unnecessary conditions and set a default sleep time of 0.5 seconds. Additionally, four new functions (`fn_sleep_time_1`, `fn_sleep_time_5`, `fn_sleep_time_10`) have been added to provide different sleep times of 1, 5, and 10 seconds respectively. This improves code readability and allows for more flexibility in setting sleep times. * change sleep to fn_sleep_time * refactor: optimize sleep time functions - Refactored the code to optimize the sleep time functions. - Updated the `fn_sleep_time` function calls to `fn_sleep_time_1` in multiple files. - Removed unnecessary sleep time calls in some files. * refactor: simplify sleep time function call The code changes refactor the sleep time function call in the check_deps.sh file. Instead of calling fn_sleep_time_1, it now calls fn_sleep_time. This change simplifies the code and improves readability. * feat: add sleep time before checking session Add a sleep time of 1 second before checking the session in the command_monitor.sh file. This allows for better synchronization and improves the accuracy of the session check. * changes * refactor: optimize sleep time function The code changes refactor the sleep time function in multiple files to improve efficiency. The fn_sleep_time function is replaced with fn_sleep_time_1. This change reduces unnecessary delays during execution. * refactor: update sleep time function names The sleep time functions in the core_messages.sh file have been updated to use more descriptive names. The fn_sleep_time function has been renamed to fn_sleep_time_1 for clarity and consistency. This change improves code readability and maintainability. * refactor: optimize sleep time in core_messages.sh The commit optimizes the sleep time in the core_messages.sh file. The fn_sleep_time and fn_print_dots functions now use a shorter sleep time of 0.5 seconds instead of 1 second, resulting in faster execution. * refactor: improve readability and consistency in code - Refactored the log messages to use consistent capitalization and wording. - Updated log messages in check_glibc.sh, check_permissions.sh, command_backup.sh, command_update_linuxgsm.sh, command_wipe.sh, fix_samp.sh, install_config.sh, and set_dst_config_vars() functions. feat: add more descriptive log messages - Added more descriptive log messages to provide clearer information about the actions being performed. - Updated log messages in check_glibc.sh, check_permissions.sh, command_backup.sh, command_update_linuxgsm.sh, command_wipe.sh, fix_samp.sh, install_config.sh. fix: correct spelling errors in log messages - Corrected spelling errors in some of the log messages for better clarity. - Updated log messages in check_glibc.sh and fix_samp.sh. * refactor: remove unnecessary print statements This commit refactors the code by removing unnecessary print statements in multiple files. The removed print statements were used for displaying dots and warnings, but they are not needed anymore. This improves the readability and cleanliness of the code. * refactor: improve commit messages for code changes - Refactored check_glibc.sh to improve readability and clarity of error messages. - Refactored check_permissions.sh to provide more informative error messages when checking /sys permissions. - Refactored check_system_requirements.sh to provide clearer warning message when checking RAM requirements. - Refactored command_backup.sh to provide more descriptive messages when starting a backup. * remove legacy code * fix: remove \t * fix: run check_root check root was never running because of logic in linuxgsm.sh * fix: update warning message for missing sudo access The warning message for users without sudo access has been updated to provide clearer instructions. Instead of just suggesting manual installation, it now also suggests running the script as root using `./${selfname} install`. This change improves user experience and helps them resolve dependency installation issues more effectively. * tidy --- .github/workflows/serverlist-validate.sh | 2 +- lgsm/functions/check_status.sh | 2 +- lgsm/functions/command_stop.sh | 2 +- lgsm/modules/check_config.sh | 3 -- lgsm/modules/check_deps.sh | 20 ++++----- lgsm/modules/check_glibc.sh | 18 ++++---- lgsm/modules/check_permissions.sh | 13 +++--- lgsm/modules/check_root.sh | 2 +- lgsm/modules/check_system_requirements.sh | 6 +-- lgsm/modules/check_version.sh | 2 +- lgsm/modules/command_backup.sh | 50 ++++++----------------- lgsm/modules/command_dev_debug.sh | 4 ++ lgsm/modules/command_dev_details.sh | 2 +- lgsm/modules/command_fastdl.sh | 11 +++-- lgsm/modules/command_mods_remove.sh | 6 +-- lgsm/modules/command_mods_update.sh | 2 +- lgsm/modules/command_monitor.sh | 3 +- lgsm/modules/command_start.sh | 3 +- lgsm/modules/command_stop.sh | 15 +++---- lgsm/modules/command_update_linuxgsm.sh | 4 +- lgsm/modules/command_validate.sh | 8 ++-- lgsm/modules/command_wipe.sh | 14 +++---- lgsm/modules/core_messages.sh | 49 +++++++++++++--------- lgsm/modules/fix_kf.sh | 8 ++-- lgsm/modules/fix_kf2.sh | 2 +- lgsm/modules/fix_ro.sh | 10 ++--- lgsm/modules/fix_samp.sh | 4 +- lgsm/modules/fix_ut2k4.sh | 4 +- lgsm/modules/fix_ut3.sh | 2 +- lgsm/modules/info_messages.sh | 4 +- lgsm/modules/install_config.sh | 22 +++++----- lgsm/modules/install_eula.sh | 4 +- lgsm/modules/install_gslt.sh | 4 +- lgsm/modules/install_logs.sh | 2 - lgsm/modules/install_server_dir.sh | 1 - lgsm/modules/install_squad_license.sh | 2 +- lgsm/modules/install_stats.sh | 1 - lgsm/modules/install_ts3db.sh | 4 +- lgsm/modules/update_fctr.sh | 2 +- lgsm/modules/update_jk2.sh | 2 +- lgsm/modules/update_mc.sh | 2 +- lgsm/modules/update_mcb.sh | 2 +- lgsm/modules/update_mta.sh | 2 +- lgsm/modules/update_pmc.sh | 2 +- lgsm/modules/update_ts3.sh | 2 +- lgsm/modules/update_ut99.sh | 2 +- lgsm/modules/update_vints.sh | 2 +- linuxgsm.sh | 19 +++++---- 48 files changed, 171 insertions(+), 181 deletions(-) diff --git a/.github/workflows/serverlist-validate.sh b/.github/workflows/serverlist-validate.sh index 50b2da712..bc192ec37 100755 --- a/.github/workflows/serverlist-validate.sh +++ b/.github/workflows/serverlist-validate.sh @@ -10,7 +10,7 @@ csvlist="$(ls -1 | grep -E '^(ubuntu|debian|centos|rhel|almalinux|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 csvcount="$(wc -l < "${csv}")" - csvcount=$((csvcount-2)) + csvcount=$((csvcount - 2)) if [ "$csvcount" -ne "$serverlistcount" ]; then echo "ERROR: $csv ($csvcount) does not match serverlist.csv ($serverlistcount)" exitcode=1 diff --git a/lgsm/functions/check_status.sh b/lgsm/functions/check_status.sh index a454b4eff..429f7c72d 100644 --- a/lgsm/functions/check_status.sh +++ b/lgsm/functions/check_status.sh @@ -7,4 +7,4 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -status=$(tmux -L "${sessionname}" list-sessions -F "#{session_name}" 2>/dev/null | grep -Ecx "^${sessionname}") +status=$(tmux -L "${sessionname}" list-sessions -F "#{session_name}" 2> /dev/null | grep -Ecx "^${sessionname}") diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index d2e88fcea..92785af98 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -15,7 +15,7 @@ fn_stop_graceful_ctrlc() { fn_print_dots "Graceful: CTRL+c" fn_script_log_info "Graceful: CTRL+c" # Sends quit. - tmux -L "${sessionname}" send-keys -t "${sessionname}" C-c > /dev/null 2>&1 + tmux -L "${sessionname}" send-keys -t "${sessionname}" C-c > /dev/null 2>&1 # Waits up to 30 seconds giving the server time to shutdown gracefuly. for seconds in {1..30}; do check_status.sh diff --git a/lgsm/modules/check_config.sh b/lgsm/modules/check_config.sh index 436740afa..42892a191 100644 --- a/lgsm/modules/check_config.sh +++ b/lgsm/modules/check_config.sh @@ -8,7 +8,6 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ -n "${servercfgfullpath}" ] && [ ! -f "${servercfgfullpath}" ]; then - fn_print_dots "" fn_print_warn_nl "Configuration file missing!" echo -e "${servercfgfullpath}" fn_script_log_warn "Configuration file missing!" @@ -17,11 +16,9 @@ if [ -n "${servercfgfullpath}" ] && [ ! -f "${servercfgfullpath}" ]; then fi if [ "${shortname}" == "rust" ] && [ -v rconpassword ] && [ -z "${rconpassword}" ]; then - fn_print_dots "" fn_print_fail_nl "RCON password is not set" fn_script_log_warn "RCON password is not set" elif [ -v rconpassword ] && [ "${rconpassword}" == "CHANGE_ME" ]; then - fn_print_dots "" fn_print_warn_nl "Default RCON Password detected" fn_script_log_warn "Default RCON Password detected" fi diff --git a/lgsm/modules/check_deps.sh b/lgsm/modules/check_deps.sh index d10948ca5..0f8304a18 100644 --- a/lgsm/modules/check_deps.sh +++ b/lgsm/modules/check_deps.sh @@ -25,11 +25,11 @@ fn_install_mono_repo() { fn_print_information_nl "Automatically adding Mono repository." fn_script_log_info "Automatically adding Mono repository." echo -en ".\r" - sleep 1 + fn_sleep_time_1 echo -en "..\r" - sleep 1 + fn_sleep_time_1 echo -en "...\r" - sleep 1 + fn_sleep_time_1 echo -en " \r" if [ "${distroid}" == "ubuntu" ]; then if [ "${distroversion}" == "22.04" ]; then @@ -160,8 +160,8 @@ fn_install_missing_deps() { fn_print_information_nl "$(whoami) has sudo access." fn_script_log_info "$(whoami) has sudo access." else - fn_print_warning_nl "$(whoami) does not have sudo access. Manually install dependencies." - fn_script_log_warn "$(whoami) does not have sudo access. Manually install dependencies." + fn_print_warning_nl "$(whoami) does not have sudo access. Manually install dependencies or run ./${selfname} install as root." + fn_script_log_warn "$(whoami) does not have sudo access. Manually install dependencies or run ./${selfname} install as root." fi fi @@ -177,11 +177,11 @@ fn_install_missing_deps() { fn_print_information_nl "Automatically installing missing dependencies." fn_script_log_info "Automatically installing missing dependencies." echo -en ".\r" - sleep 1 + fn_sleep_time_1 echo -en "..\r" - sleep 1 + fn_sleep_time_1 echo -en "...\r" - sleep 1 + fn_sleep_time_1 echo -en " \r" if [ "$(command -v apt 2> /dev/null)" ]; then cmd="echo steamcmd steam/question select \"I AGREE\" | sudo debconf-set-selections; echo steamcmd steam/license note '' | sudo debconf-set-selections; ${i386installcommand}sudo apt-get update; sudo apt-get -y install ${array_deps_missing[*]}" @@ -306,14 +306,14 @@ fn_deps_detector() { missingdep=0 if [ "${commandname}" == "INSTALL" ]; then echo -e "${green}${deptocheck}${default}" - sleep 0.1 + fn_sleep_time fi elif [ "${depstatus}" != "0" ]; then # If dependency is not found. missingdep=1 if [ "${commandname}" == "INSTALL" ]; then echo -e "${red}${deptocheck}${default}" - sleep 0.1 + fn_sleep_time fi # If SteamCMD requirements are not met install will fail. if [ -n "${appid}" ]; then diff --git a/lgsm/modules/check_glibc.sh b/lgsm/modules/check_glibc.sh index 25357a461..9da491bce 100644 --- a/lgsm/modules/check_glibc.sh +++ b/lgsm/modules/check_glibc.sh @@ -13,17 +13,19 @@ if [ "${glibc}" == "null" ]; then # Glibc is not required. : elif [ -z "${glibc}" ]; then - fn_print_dots "glibc" - fn_print_error_nl "glibc requirement unknown" - fn_script_log_error "glibc requirement unknown" + fn_print_dots "Checking glibc" + 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 - fn_print_dots "glibc" - fn_print_error_nl "glibc requirements not met" - fn_script_log_error "glibc requirements not met" + fn_print_dots "Checking glibc" + fn_print_error_nl "Checking glibc: requirements not met" + fn_script_log_error "Checking glibc: requirements not met" echo -en "\n" echo -e " * glibc required: ${glibc}" echo -e " * glibc installed: ${red}${glibcversion}${default}" echo -en "\n" - fn_print_information_nl "distro upgrade is required" - fn_script_log_info "distro upgrade is required" + fn_print_information_nl "Distro upgrade is required" + fn_script_log_info "Distro upgrade is required" + fn_sleep_time_5 fi diff --git a/lgsm/modules/check_permissions.sh b/lgsm/modules/check_permissions.sh index a6a37ce5c..572b403cc 100644 --- a/lgsm/modules/check_permissions.sh +++ b/lgsm/modules/check_permissions.sh @@ -171,7 +171,7 @@ fn_sys_perm_fix_manually_msg() { fn_script_log_info "To fix this issue, run the following command as root:" echo -e " chmod a+rx /sys /sys/class /sys/class/net" fn_script_log "chmod a+rx /sys /sys/class /sys/class/net" - fn_sleep_time + fn_sleep_time_5 if [ "${monitorflag}" == 1 ]; then alert="permissions" alert.sh @@ -182,8 +182,8 @@ fn_sys_perm_fix_manually_msg() { # Attempt to fix /sys related permission errors if sudo is available, exits otherwise. fn_sys_perm_errors_fix() { if sudo -n true > /dev/null 2>&1; then - fn_print_dots "Automatically fixing /sys permissions" - fn_script_log_info "Automatically fixing /sys permissions." + fn_print_dots "Fixing /sys permissions" + fn_script_log_info "Fixing /sys permissions." if [ "${sysdirpermerror}" == "1" ]; then sudo chmod a+rx "/sys" fi @@ -202,7 +202,7 @@ fn_sys_perm_errors_fix() { # Show the user how to fix. fn_sys_perm_fix_manually_msg else - fn_print_ok_nl "Automatically fixing /sys permissions" + fn_print_ok_nl "Fixing /sys permissions" fn_script_log_pass "Permissions in /sys fixed" fi else @@ -216,8 +216,9 @@ fn_sys_perm_error_process() { fn_sys_perm_errors_detect # If any error was found. if [ "${sysdirpermerror}" == "1" ] || [ "${classdirpermerror}" == "1" ] || [ "${netdirpermerror}" == "1" ]; then - fn_print_error_nl "Permission error(s) found in /sys" - fn_script_log_error "Permission error(s) found in /sys" + fn_print_dots "Checking /sys permissions" + fn_print_error_nl "Checking /sys permissions" + fn_script_log_error "Checking /sys permissions" # Run the fix fn_sys_perm_errors_fix fi diff --git a/lgsm/modules/check_root.sh b/lgsm/modules/check_root.sh index 81115394a..8fe20764c 100644 --- a/lgsm/modules/check_root.sh +++ b/lgsm/modules/check_root.sh @@ -9,7 +9,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ "$(whoami)" == "root" ]; then if [ "${commandname}" != "INSTALL" ]; then - fn_print_fail_nl "Do NOT run this script as root!" + fn_print_fail_nl "Do NOT run as root!" if [ -d "${lgsmlogdir}" ]; then fn_script_log_fail "${selfname} attempted to run as root." else diff --git a/lgsm/modules/check_system_requirements.sh b/lgsm/modules/check_system_requirements.sh index 88fb9d15a..6932de4dc 100644 --- a/lgsm/modules/check_system_requirements.sh +++ b/lgsm/modules/check_system_requirements.sh @@ -46,10 +46,10 @@ fi # If the game or engine has a minimum RAM Requirement, compare it to system's available RAM. if [ "${ramrequirementmb}" ]; then if [ "${physmemtotalmb}" -lt "${ramrequirementmb}" ]; then - fn_print_dots "Check RAM" + fn_print_dots "Checking RAM" # Warn the user. - fn_print_warn_nl "Check RAM: ${ramrequirementgb}G required, ${physmemtotal} available" + fn_print_warn_nl "Checking RAM: ${ramrequirementgb}G required, ${physmemtotal} available" echo "* ${gamename} server may fail to run or experience poor performance." - fn_sleep_time + fn_sleep_time_5 fi fi diff --git a/lgsm/modules/check_version.sh b/lgsm/modules/check_version.sh index 3ca015843..5369fd832 100644 --- a/lgsm/modules/check_version.sh +++ b/lgsm/modules/check_version.sh @@ -16,8 +16,8 @@ if [ -n "${modulesversion}" ] && [ -n "${version}" ] && [ "${version}" != "${mod echo -e "* ${selfname}: ${version}" echo -e "* modules: ${modulesversion}" echo -e "" - fn_sleep_time fn_script_log_error "LinuxGSM Version mismatch: ${selfname}: ${version}: modules: ${modulesversion}" + fn_sleep_time_1 command_update_linuxgsm.sh fn_firstcommand_reset fi diff --git a/lgsm/modules/command_backup.sh b/lgsm/modules/command_backup.sh index 16223c914..fac5dc38b 100644 --- a/lgsm/modules/command_backup.sh +++ b/lgsm/modules/command_backup.sh @@ -10,8 +10,6 @@ commandaction="Backing up" moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set -check.sh - # Trap to remove lockfile on quit. fn_backup_trap() { echo -e "" @@ -56,12 +54,14 @@ fn_backup_init() { backupname="${selfname}-$(date '+%Y-%m-%d-%H%M%S')" info_distro.sh - fn_print_dots "Backup starting" - fn_script_log_info "Backup starting" - fn_print_ok_nl "Backup starting" + fn_print_dots "Starting backup" + fn_script_log_info "Starting backup" if [ ! -d "${backupdir}" ] || [ "${backupcount}" == "0" ]; then - fn_print_info_nl "There are no previous backups" + fn_print_info_nl "Starting backup: No previous backups found" + fn_script_log_info "No previous backups found" else + fn_print_info_nl "Starting backup: Previous backups found" + fn_script_log_info "Previous backups found" if [ "${lastbackupdaysago}" == "0" ]; then daysago="less than 1 day ago" elif [ "${lastbackupdaysago}" == "1" ]; then @@ -101,32 +101,6 @@ fn_backup_dir() { fi } -# Migrate Backups from old dir before refactor -fn_backup_migrate_olddir() { - # Check if old backup dir is there before the refactor and move the backups - if [ -d "${rootdir}/backups" ]; then - if [ "${rootdir}/backups" != "${backupdir}" ]; then - fn_print_dots "Backup directory is being migrated" - fn_script_log_info "Backup directory is being migrated" - fn_script_log_info "${rootdir}/backups > ${backupdir}" - mv "${rootdir}/backups/"* "${backupdir}" 2> /dev/null - exitcode=$? - if [ "${exitcode}" == 0 ]; then - rmdir "${rootdir}/backups" 2> /dev/null - exitcode=$? - fi - if [ "${exitcode}" != 0 ]; then - fn_print_error_nl "Backup directory is being migrated" - fn_script_log_error "Backup directory is being migrated" - else - - fn_print_ok_nl "Backup directory is being migrated" - fn_script_log_pass "Backup directory is being migrated" - fi - fi - fi -} - fn_backup_create_lockfile() { # Create lockfile. date '+%s' > "${lockdir:?}/backup.lock" @@ -142,7 +116,7 @@ fn_backup_compression() { 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 "Backup ${rootdirduexbackup} ${backupname}.tar.gz, in progress" excludedir=$(fn_backup_relpath) # Check that excludedir is a valid path. @@ -187,7 +161,7 @@ fn_backup_prune() { # Display how many backups will be cleared. echo -e "* Pruning: ${backupquotadiff} backup(s) has exceeded the ${maxbackups} backups limit" fn_script_log_info "Pruning: ${backupquotadiff} backup(s) has exceeded the ${maxbackups} backups limit" - fn_sleep_time + fn_sleep_time_1 fn_print_dots "Pruning: Clearing ${backupquotadiff} backup(s)" fn_script_log_info "Pruning: Clearing ${backupquotadiff} backup(s)" # Clear backups over quota. @@ -199,7 +173,7 @@ fn_backup_prune() { # Display how many backups will be cleared. echo -e "* Pruning: ${backupsoudatedcount} backup(s) are older than ${maxbackupdays} days." fn_script_log_info "Pruning: ${backupsoudatedcount} backup(s) older than ${maxbackupdays} days." - fn_sleep_time + fn_sleep_time_1 fn_print_dots "Pruning: Clearing ${backupquotadiff} backup(s)." fn_script_log_info "Pruning: Clearing ${backupquotadiff} backup(s)" # Clear backups over quota @@ -264,12 +238,14 @@ fn_backup_start_server() { fi } -# Run functions. +fn_print_dots "" +check.sh +core_logs.sh + fn_backup_check_lockfile fn_backup_init fn_backup_stop_server fn_backup_dir -fn_backup_migrate_olddir fn_backup_create_lockfile fn_backup_compression fn_backup_prune diff --git a/lgsm/modules/command_dev_debug.sh b/lgsm/modules/command_dev_debug.sh index 081bda611..eb0356985 100644 --- a/lgsm/modules/command_dev_debug.sh +++ b/lgsm/modules/command_dev_debug.sh @@ -10,6 +10,10 @@ commandaction="Developer debug" moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_reset +fn_print_dots "" +check.sh +core_logs.sh + if [ -f "${rootdir}/.dev-debug" ]; then rm -f "${rootdir:?}/.dev-debug" fn_print_ok_nl "Disabled dev-debug" diff --git a/lgsm/modules/command_dev_details.sh b/lgsm/modules/command_dev_details.sh index 2659465d3..93dae77bc 100644 --- a/lgsm/modules/command_dev_details.sh +++ b/lgsm/modules/command_dev_details.sh @@ -19,8 +19,8 @@ carriagereturn=$(file -b "${servercfgfullpath}" | grep -q CRLF && echo "${red}CR echo -e "" echo -e "${bold}${lightgreen}Server Details${default}" fn_messages_separator -echo -e "" +echo -e "" echo -e "Game: ${gamename}" echo -e "Config type: ${configtype}" echo -e "Config file: ${servercfgfullpath}" diff --git a/lgsm/modules/command_fastdl.sh b/lgsm/modules/command_fastdl.sh index acc3a1ba4..c1c667797 100644 --- a/lgsm/modules/command_fastdl.sh +++ b/lgsm/modules/command_fastdl.sh @@ -10,8 +10,6 @@ commandaction="Fastdl" moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set -check.sh - # Directories. if [ -z "${webdir}" ]; then webdir="${rootdir}/public_html" @@ -209,7 +207,7 @@ fn_fastdl_preview() { fi if [ -f "${tmpdir}/fastdl_files_to_compress.txt" ]; then echo -e "calculating total file size..." - fn_sleep_time + fn_sleep_time_1 totalfiles=$(wc -l < "${tmpdir}/fastdl_files_to_compress.txt") # Calculates total file size. while read -r dufile; do @@ -276,7 +274,7 @@ fn_fastdl_gmod() { fi # Clear addons directory in fastdl. echo -en "clearing addons dir from fastdl dir..." - fn_sleep_time + fn_sleep_time_1 rm -rf "${fastdldir:?}/addons" exitcode=$? if [ "${exitcode}" != 0 ]; then @@ -291,7 +289,7 @@ fn_fastdl_gmod() { # Correct content that may be into a lua directory by mistake like some darkrpmodification addons. if [ -d "${fastdldir}/lua" ]; then echo -en "correcting DarkRP files..." - fn_sleep_time + fn_sleep_time_1 cp -Rf "${fastdldir}/lua/"* "${fastdldir}" exitcode=$? if [ "${exitcode}" != 0 ]; then @@ -335,7 +333,7 @@ fn_fastdl_source() { tput rc tput el echo -e "copying ${directory} ${allowed_extention} : ${fileswc}..." - fn_sleep_time + fn_sleep_time_1 # get relative path of file in the dir tmprelfilepath="${fastdlfile#"${systemdir}/"}" copytodir="${tmprelfilepath%/*}" @@ -427,6 +425,7 @@ fn_fastdl_bzip2() { fn_print_ok_eol_nl } +check.sh # Run functions. fn_fastdl_preview fn_clear_old_fastdl diff --git a/lgsm/modules/command_mods_remove.sh b/lgsm/modules/command_mods_remove.sh index db7763cd8..5f70ac389 100644 --- a/lgsm/modules/command_mods_remove.sh +++ b/lgsm/modules/command_mods_remove.sh @@ -59,7 +59,7 @@ fn_script_log_info "Removing ${modsfilelistsize} files from ${modprettyname}" echo -e "removing ${modprettyname}" echo -e "* ${modsfilelistsize} files to be removed" echo -e "* location: ${modinstalldir}" -fn_sleep_time +fn_sleep_time_1 # Go through every file and remove it. modfileline="1" tput sc @@ -99,7 +99,7 @@ fi # Remove file list. echo -en "removing ${modcommand}-files.txt..." -fn_sleep_time +fn_sleep_time_1 rm -rf "${modsdir:?}/${modcommand}-files.txt" exitcode=$? if [ "${exitcode}" != 0 ]; then @@ -113,7 +113,7 @@ fi # Remove mods from installed mods list. echo -en "removing ${modcommand} from ${modsinstalledlist}..." -fn_sleep_time +fn_sleep_time_1 sed -i "/^${modcommand}$/d" "${modsinstalledlistfullpath}" exitcode=$? diff --git a/lgsm/modules/command_mods_update.sh b/lgsm/modules/command_mods_update.sh index cfbafc80c..cd5c3b03f 100644 --- a/lgsm/modules/command_mods_update.sh +++ b/lgsm/modules/command_mods_update.sh @@ -18,7 +18,7 @@ mods_core.sh fn_remove_cfg_files() { if [ "${modkeepfiles}" != "OVERWRITE" ] && [ "${modkeepfiles}" != "NOUPDATE" ]; then echo -e "the following files/directories will be preserved:" - fn_sleep_time + fn_sleep_time_1 # Count how many files there are to remove. filestopreserve=$(echo -e "${modkeepfiles}" | awk -F ';' '{ print NF }') # Test all subvalues of "modkeepfiles" using the ";" separator. diff --git a/lgsm/modules/command_monitor.sh b/lgsm/modules/command_monitor.sh index 079ad334d..d4d88bd56 100644 --- a/lgsm/modules/command_monitor.sh +++ b/lgsm/modules/command_monitor.sh @@ -330,7 +330,7 @@ fn_monitor_query() { # Second counter will wait for 15s before breaking loop. for seconds in {1..15}; do fn_print_fail "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt} : ${cyan}WAIT${default}" - sleep 0.5 + fn_sleep_time_1 totalseconds=$((totalseconds + 1)) if [ "${seconds}" == "15" ]; then break @@ -371,6 +371,7 @@ fn_monitor_loop() { done } +fn_print_dots "" monitorflag=1 # Dont do any monitoring or checks if installer is running. fn_monitor_check_install diff --git a/lgsm/modules/command_start.sh b/lgsm/modules/command_start.sh index 4b45f0bc3..364733ea2 100644 --- a/lgsm/modules/command_start.sh +++ b/lgsm/modules/command_start.sh @@ -114,7 +114,7 @@ fn_start_tmux() { echo -e "Console logging disabled in settings" >> "${consolelog}" fn_script_log_info "Console logging disabled by user" fi - fn_sleep_time + fn_sleep_time_1 # If the server fails to start. check_status.sh @@ -186,6 +186,7 @@ if [ "${firstcommandname}" == "START" ] || [ "${firstcommandname}" == "RESTART" date '+%s' > "${lockdir:?}/${selfname}-monitoring.lock" fi +fn_print_dots "" check.sh # If the server already started dont start again. diff --git a/lgsm/modules/command_stop.sh b/lgsm/modules/command_stop.sh index ee9152862..1567252f9 100644 --- a/lgsm/modules/command_stop.sh +++ b/lgsm/modules/command_stop.sh @@ -25,7 +25,7 @@ fn_stop_graceful_ctrlc() { fn_script_log_pass "Graceful: CTRL+c: OK: ${seconds} seconds" break fi - sleep 1 + fn_sleep_time_1 fn_print_dots "Graceful: CTRL+c: ${seconds}" done check_status.sh @@ -53,7 +53,7 @@ fn_stop_graceful_cmd() { fn_script_log_pass "Graceful: sending \"${1}\": OK: ${seconds} seconds" break fi - sleep 1 + fn_sleep_time_1 fn_print_dots "Graceful: sending \"${1}\": ${seconds}" done check_status.sh @@ -74,7 +74,7 @@ fn_stop_graceful_goldsrc() { tmux -L "${socketname}" send -t "${sessionname}" quit ENTER > /dev/null 2>&1 # Waits 3 seconds as goldsrc servers restart with the quit command. for seconds in {1..3}; do - sleep 1 + fn_sleep_time_1 fn_print_dots "Graceful: sending \"quit\": ${seconds}" done fn_print_ok "Graceful: sending \"quit\": ${seconds}: " @@ -154,7 +154,7 @@ fn_stop_graceful_sdtd() { fn_script_log_pass "Graceful: telnet: ${telnetip}:${telnetport} : ${seconds} seconds" break fi - sleep 1 + fn_sleep_time_1 fn_print_dots "Graceful: telnet: ${seconds}" done # If telnet shutdown fails tmux shutdown will be used, this risks loss of world save. @@ -185,7 +185,7 @@ fn_stop_graceful_avorion() { fn_script_log_info "Graceful: /save /stop" # Sends /save. tmux -L "${socketname}" send-keys -t "${sessionname}" /save ENTER > /dev/null 2>&1 - sleep 5 + 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. @@ -197,7 +197,7 @@ fn_stop_graceful_avorion() { fn_script_log_pass "Graceful: /save /stop: OK: ${seconds} seconds" break fi - sleep 1 + fn_sleep_time_1 fn_print_dots "Graceful: /save /stop: ${seconds}" done check_status.sh @@ -241,7 +241,7 @@ fn_stop_tmux() { fn_script_log_info "tmux kill-session: ${sessionname}: ${servername}" # Kill tmux session. tmux -L "${socketname}" kill-session -t "${sessionname}" > /dev/null 2>&1 - sleep 0.5 + fn_sleep_time_1 check_status.sh if [ "${status}" == "0" ]; then fn_print_ok_nl "${servername}" @@ -268,6 +268,7 @@ fn_stop_pre_check() { fi } +fn_print_dots "" check.sh # Create a stopping lockfile that only exists while the stop command is running. diff --git a/lgsm/modules/command_update_linuxgsm.sh b/lgsm/modules/command_update_linuxgsm.sh index 65b72bcbb..9cd66430c 100644 --- a/lgsm/modules/command_update_linuxgsm.sh +++ b/lgsm/modules/command_update_linuxgsm.sh @@ -10,10 +10,10 @@ commandaction="Updating LinuxGSM" moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set +fn_print_dots "" check.sh info_distro.sh -fn_print_dots "" fn_script_log_info "Updating LinuxGSM" fn_print_dots "Selecting repo" @@ -92,7 +92,7 @@ if [ "${script_diff}" != "" ]; then fi echo -en "copying ${selfname}...\c" - fn_script_log_info "copying ${selfname}" + fn_script_log_info "Copying ${selfname}" cp "${tmpdir}/linuxgsm.sh" "${rootdir}/${selfname}" sed -i "s+shortname=\"core\"+shortname=\"${shortname}\"+g" "${rootdir}/${selfname}" sed -i "s+gameservername=\"core\"+gameservername=\"${gameservername}\"+g" "${rootdir}/${selfname}" diff --git a/lgsm/modules/command_validate.sh b/lgsm/modules/command_validate.sh index f4a6250f3..d3511d7bb 100644 --- a/lgsm/modules/command_validate.sh +++ b/lgsm/modules/command_validate.sh @@ -17,7 +17,7 @@ fn_validate() { for seconds in {3..1}; do fn_print_warn "Validate might overwrite some customised files: ${totalseconds}" totalseconds=$((totalseconds - 1)) - sleep 1 + fn_sleep_time_1 if [ "${seconds}" == "0" ]; then break fi @@ -27,11 +27,11 @@ fn_validate() { fn_dl_steamcmd } -# The location where the builds are checked and downloaded. -remotelocation="SteamCMD" +fn_print_dots "" check.sh +core_logs.sh -fn_print_dots "${remotelocation}" +fn_print_dots "SteamCMD" if [ "${status}" != "0" ]; then fn_print_restart_warning diff --git a/lgsm/modules/command_wipe.sh b/lgsm/modules/command_wipe.sh index 193d2cd2d..d20bd0d3e 100644 --- a/lgsm/modules/command_wipe.sh +++ b/lgsm/modules/command_wipe.sh @@ -30,7 +30,7 @@ fn_wipe_files() { if [ -n "${serverwipe}" ] || [ -n "${mapwipe}" ]; then if [ -n "$(find "${serveridentitydir}" -type f -name "*.map")" ]; then echo -en "removing .map file(s)..." - fn_script_log_info "removing *.map file(s)" + fn_script_log_info "Removing *.map file(s)" fn_sleep_time find "${serveridentitydir:?}" -type f -name "*.map" -printf "%f\n" >> "${lgsmlog}" find "${serveridentitydir:?}" -type f -name "*.map" -delete | tee -a "${lgsmlog}" @@ -45,7 +45,7 @@ fn_wipe_files() { if [ -n "${serverwipe}" ] || [ -n "${mapwipe}" ]; then if [ -n "$(find "${serveridentitydir}" -type f -name "*.sav*")" ]; then echo -en "removing .sav file(s)..." - fn_script_log_info "removing .sav file(s)" + fn_script_log_info "Removing .sav file(s)" fn_sleep_time find "${serveridentitydir:?}" -type f -name "*.sav*" -printf "%f\n" >> "${lgsmlog}" find "${serveridentitydir:?}" -type f -name "*.sav*" -delete @@ -61,7 +61,7 @@ fn_wipe_files() { if [ -n "${serverwipe}" ]; then if [ -n "$(find "${serveridentitydir}" -type f ! -name 'player.tokens.db' -name "*.db")" ]; then echo -en "removing .db file(s)..." - fn_script_log_info "removing .db file(s)" + fn_script_log_info "Removing .db file(s)" fn_sleep_time find "${serveridentitydir:?}" -type f ! -name 'player.tokens.db' -name "*.db" -printf "%f\n" >> "${lgsmlog}" find "${serveridentitydir:?}" -type f ! -name 'player.tokens.db' -name "*.db" -delete @@ -79,9 +79,9 @@ fn_map_wipe_warning() { fn_script_log_warn "Map wipe will reset the map data and keep blueprint data" totalseconds=3 for seconds in {3..1}; do - fn_print_warn "Map wipe will reset the map data and keep blueprint data: ${totalseconds}" + fn_print_warn "map wipe will reset the map data and keep blueprint data: ${totalseconds}" totalseconds=$((totalseconds - 1)) - sleep 1 + fn_sleep_time_1 if [ "${seconds}" == "0" ]; then break fi @@ -94,9 +94,9 @@ fn_full_wipe_warning() { fn_script_log_warn "Server wipe will reset the map data and remove blueprint data" totalseconds=3 for seconds in {3..1}; do - fn_print_warn "Server wipe will reset the map data and remove blueprint data: ${totalseconds}" + fn_print_warn "server wipe will reset the map data and remove blueprint data: ${totalseconds}" totalseconds=$((totalseconds - 1)) - sleep 1 + fn_sleep_time_1 if [ "${seconds}" == "0" ]; then break fi diff --git a/lgsm/modules/core_messages.sh b/lgsm/modules/core_messages.sh index 5af4c5639..929e942be 100644 --- a/lgsm/modules/core_messages.sh +++ b/lgsm/modules/core_messages.sh @@ -35,12 +35,23 @@ fn_ansi_loader() { } fn_sleep_time() { - if [ "${sleeptime}" != "0" ] || [ "${travistest}" != "1" ]; then - if [ -z "${sleeptime}" ]; then - sleeptime=0.5 - fi - sleep "${sleeptime}" - fi + sleep "0.1" +} + +fn_sleep_time_05() { + sleep "0.5" +} + +fn_sleep_time_1() { + sleep "1" +} + +fn_sleep_time_5() { + sleep "5" +} + +fn_sleep_time_10() { + sleep "10" } # Log display @@ -137,7 +148,7 @@ fn_print_dots() { else echo -en "${creeol}[ .... ] $*" fi - fn_sleep_time + fn_sleep_time_05 } fn_print_dots_nl() { @@ -146,7 +157,7 @@ fn_print_dots_nl() { else echo -e "${creeol}[ .... ] $*" fi - fn_sleep_time + fn_sleep_time_05 echo -en "\n" } @@ -476,56 +487,56 @@ fn_print_info_eol_nl() { # QUERYING fn_print_querying_eol() { echo -en "${cyan}QUERYING${default}" - fn_sleep_time + fn_sleep_time_1 } fn_print_querying_eol_nl() { echo -e "${cyan}QUERYING${default}" - fn_sleep_time + fn_sleep_time_1 } # CHECKING fn_print_checking_eol() { echo -en "${cyan}CHECKING${default}" - fn_sleep_time + fn_sleep_time_1 } fn_print_checking_eol_nl() { echo -e "${cyan}CHECKING${default}" - fn_sleep_time + fn_sleep_time_1 } # DELAY fn_print_delay_eol() { echo -en "${green}DELAY${default}" - fn_sleep_time + fn_sleep_time_1 } fn_print_delay_eol_nl() { echo -e "${green}DELAY${default}" - fn_sleep_time + fn_sleep_time_1 } # CANCELED fn_print_canceled_eol() { echo -en "${lightyellow}CANCELED${default}" - fn_sleep_time + fn_sleep_time_1 } fn_print_canceled_eol_nl() { echo -e "${lightyellow}CANCELED${default}" - fn_sleep_time + fn_sleep_time_1 } # REMOVED fn_print_removed_eol() { echo -en "${red}REMOVED${default}" - fn_sleep_time + fn_sleep_time_1 } fn_print_removed_eol_nl() { echo -e "${red}REMOVED${default}" - fn_sleep_time + fn_sleep_time_1 } # UPDATE @@ -582,7 +593,7 @@ fn_print_restart_warning() { for seconds in {3..1}; do fn_print_warn "${selfname} will be restarted: ${totalseconds}" totalseconds=$((totalseconds - 1)) - sleep 1 + fn_sleep_time_1 if [ "${seconds}" == "0" ]; then break fi diff --git a/lgsm/modules/fix_kf.sh b/lgsm/modules/fix_kf.sh index fe8b574aa..1bec47a4b 100644 --- a/lgsm/modules/fix_kf.sh +++ b/lgsm/modules/fix_kf.sh @@ -7,12 +7,12 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -echo -e "Applying WebAdmin ROOst.css fix." +echo -e "applying WebAdmin ROOst.css fix." echo -e "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13" sed -i 's/none}/none;/g' "${serverfiles}/Web/ServerAdmin/ROOst.css" sed -i 's/underline}/underline;/g' "${serverfiles}/Web/ServerAdmin/ROOst.css" fn_sleep_time -echo -e "Applying WebAdmin CharSet fix." +echo -e "applying WebAdmin CharSet fix." echo -e "http://forums.tripwireinteractive.com/showpost.php?p=442340&postcount=1" sed -i 's/CharSet="iso-8859-1"/CharSet="utf-8"/g' "${systemdir}/UWeb.int" fn_sleep_time @@ -23,14 +23,14 @@ fn_sleep_time exitbypass=1 command_start.sh fn_firstcommand_reset -sleep 5 +fn_sleep_time_5 exitbypass=1 command_stop.sh fn_firstcommand_reset exitbypass=1 command_start.sh fn_firstcommand_reset -sleep 5 +fn_sleep_time_5 exitbypass=1 command_stop.sh fn_firstcommand_reset diff --git a/lgsm/modules/fix_kf2.sh b/lgsm/modules/fix_kf2.sh index 13176d448..cb4707414 100644 --- a/lgsm/modules/fix_kf2.sh +++ b/lgsm/modules/fix_kf2.sh @@ -13,7 +13,7 @@ fn_print_information "starting ${gamename} server to generate configs." exitbypass=1 command_start.sh fn_firstcommand_reset -sleep 10 +fn_sleep_time_10 exitbypass=1 command_stop.sh fn_firstcommand_reset diff --git a/lgsm/modules/fix_ro.sh b/lgsm/modules/fix_ro.sh index 6ae485dbe..72864d699 100644 --- a/lgsm/modules/fix_ro.sh +++ b/lgsm/modules/fix_ro.sh @@ -7,16 +7,16 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -echo -e "Applying webinterface ROOst.css fix." +echo -e "applying webinterface ROOst.css fix." echo -e "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13" sed -i 's/none}/none;/g' "${serverfiles}/Web/ServerAdmin/ROOst.css" sed -i 's/underline}/underline;/g' "${serverfiles}/Web/ServerAdmin/ROOst.css" fn_sleep_time -echo -e "Applying webinterface CharSet fix." +echo -e "applying webinterface CharSet fix." echo -e "http://forums.tripwireinteractive.com/showpost.php?p=442340&postcount=1" sed -i 's/CharSet="iso-8859-1"/CharSet="utf-8"/g' "${systemdir}/uweb.int" fn_sleep_time -echo -e "Applying Steam AppID fix." +echo -e "applying Steam AppID fix." sed -i 's/1210/1200/g' "${systemdir}/steam_appid.txt" fn_sleep_time echo -e "applying server name fix." @@ -26,14 +26,14 @@ fn_sleep_time exitbypass=1 command_start.sh fn_firstcommand_reset -sleep 5 +fn_sleep_time_5 exitbypass=1 command_stop.sh fn_firstcommand_reset exitbypass=1 command_start.sh fn_firstcommand_reset -sleep 5 +fn_sleep_time_5 exitbypass=1 command_stop.sh fn_firstcommand_reset diff --git a/lgsm/modules/fix_samp.sh b/lgsm/modules/fix_samp.sh index 24882f915..0b5d0ab22 100644 --- a/lgsm/modules/fix_samp.sh +++ b/lgsm/modules/fix_samp.sh @@ -15,7 +15,7 @@ if [ -f "${servercfgfullpath}" ]; then if [ "${currentpass}" == "${defaultpass}" ]; then fixname="change default rcon password" fn_fix_msg_start - fn_script_log_info "changing rcon/admin password." + fn_script_log_info "Changing rcon/admin password." randomstring=$(tr -dc 'A-Za-z0-9_' < /dev/urandom 2> /dev/null | head -c 8 | xargs) rconpass="admin${randomstring}" sed -i "s/rcon_password changeme/rcon_password ${rconpass}/g" "${servercfgfullpath}" @@ -27,7 +27,7 @@ if [ -f "${servercfgfullpath}" ]; then if [ "${currenthostname}" == "${defaulthostname}" ]; then fixname="change default hostname" fn_fix_msg_start - fn_script_log_info "changing default hostname to LinuxGSM" + fn_script_log_info "Changing default hostname to LinuxGSM" sed -i "s/hostname ${defaulthostname}/hostname LinuxGSM/g" "${servercfgfullpath}" fn_fix_msg_end fi diff --git a/lgsm/modules/fix_ut2k4.sh b/lgsm/modules/fix_ut2k4.sh index 2f7fc0d4d..5da1eee12 100644 --- a/lgsm/modules/fix_ut2k4.sh +++ b/lgsm/modules/fix_ut2k4.sh @@ -23,14 +23,14 @@ fn_sleep_time exitbypass=1 command_start.sh fn_firstcommand_reset -sleep 5 +fn_sleep_time_5 exitbypass=1 command_stop.sh fn_firstcommand_reset exitbypass=1 command_start.sh fn_firstcommand_reset -sleep 5 +fn_sleep_time_5 exitbypass=1 command_stop.sh fn_firstcommand_reset diff --git a/lgsm/modules/fix_ut3.sh b/lgsm/modules/fix_ut3.sh index d725de4a2..386833efc 100644 --- a/lgsm/modules/fix_ut3.sh +++ b/lgsm/modules/fix_ut3.sh @@ -13,7 +13,7 @@ fn_print_information "starting ${gamename} server to generate configs." exitbypass=1 command_start.sh fn_firstcommand_reset -sleep 10 +fn_sleep_time_10 exitbypass=1 command_stop.sh fn_firstcommand_reset diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index 3f0c6d235..c959df307 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -143,8 +143,8 @@ fn_info_message_server_resource() { { echo -e "${lightyellow}Storage${default}" echo -e "${lightblue}Filesystem:\t${default}${filesystem}" - echo -e "${lightblue}Total:\t\t${default}${totalspace}" - echo -e "${lightblue}Used:\t\t${default}${usedspace}" + echo -e "${lightblue}Total:\t${default}${totalspace}" + echo -e "${lightblue}Used:\t${default}${usedspace}" echo -e "${lightblue}Available:\t${default}${availspace}" } | column -s $'\t' -t echo -e "" diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index 1e3c243ab..258a7744a 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -11,7 +11,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_check_cfgdir() { if [ ! -d "${servercfgdir}" ]; then echo -e "creating ${servercfgdir} config directory." - fn_script_log_info "creating ${servercfgdir} config directory." + fn_script_log_info "Creating ${servercfgdir} config directory." mkdir -pv "${servercfgdir}" fi } @@ -25,7 +25,7 @@ fn_fetch_default_config() { echo -e "" echo -e "${italic}https://github.com/GameServerManagers/Game-Server-Configs${default}" echo -e "" - fn_sleep_time + fn_sleep_time_1 mkdir -p "${lgsmdir}/config-default/config-game" githuburl="https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/main" for config in "${array_configs[@]}"; do @@ -38,7 +38,7 @@ fn_default_config_remote() { for config in "${array_configs[@]}"; do # every config is copied echo -e "copying ${config} config file." - fn_script_log_info "copying ${servercfg} config file." + fn_script_log_info "Copying ${servercfg} config file." if [ "${config}" == "${servercfgdefault}" ]; then mkdir -p "${servercfgdir}" cp -nv "${lgsmdir}/config-default/config-game/${config}" "${servercfgfullpath}" @@ -82,7 +82,7 @@ fn_set_config_vars() { servername="LinuxGSM" rconpass="admin${randomstring}" echo -e "changing hostname." - fn_script_log_info "changing hostname." + fn_script_log_info "Changing hostname." fn_sleep_time # prevents var from being overwritten with the servername. if grep -q "SERVERNAME=SERVERNAME" "${lgsmdir}/config-default/config-game/${config}" 2> /dev/null; then @@ -93,7 +93,7 @@ fn_set_config_vars() { sed -i "s/SERVERNAME/${servername}/g" "${servercfgfullpath}" fi echo -e "changing rcon/admin password." - fn_script_log_info "changing rcon/admin password." + fn_script_log_info "Changing rcon/admin password." if [ "${shortname}" == "squad" ]; then sed -i "s/ADMINPASSWORD/${rconpass}/g" "${servercfgdir}/Rcon.cfg" else @@ -112,15 +112,15 @@ fn_set_dst_config_vars() { ## cluster.ini if grep -Fq "SERVERNAME" "${clustercfgfullpath}"; then echo -e "changing server name." - fn_script_log_info "changing server name." + fn_script_log_info "Changing server name." sed -i "s/SERVERNAME/LinuxGSM/g" "${clustercfgfullpath}" fn_sleep_time echo -e "changing shard mode." - fn_script_log_info "changing shard mode." + fn_script_log_info "Changing shard mode." sed -i "s/USESHARDING/${sharding}/g" "${clustercfgfullpath}" fn_sleep_time echo -e "randomizing cluster key." - fn_script_log_info "randomizing cluster key." + fn_script_log_info "Randomizing cluster key." randomstring=$(tr -dc 'A-Za-z0-9_' < /dev/urandom 2> /dev/null | head -c 8 | xargs) sed -i "s/CLUSTERKEY/${randomstring}/g" "${clustercfgfullpath}" fn_sleep_time @@ -139,18 +139,18 @@ fn_set_dst_config_vars() { fi echo -e "changing shard name." - fn_script_log_info "changing shard name." + fn_script_log_info "Changing shard name." sed -i "s/SHARDNAME/${shard}/g" "${servercfgfullpath}" fn_sleep_time echo -e "changing master setting." - fn_script_log_info "changing master setting." + fn_script_log_info "Changing master setting." sed -i "s/ISMASTER/${master}/g" "${servercfgfullpath}" fn_sleep_time ## worldgenoverride.lua if [ "${cave}" == "true" ]; then echo -e "defining ${shard} as cave in ${servercfgdir}/worldgenoverride.lua." - fn_script_log_info "defining ${shard} as cave in ${servercfgdir}/worldgenoverride.lua." + fn_script_log_info "Defining ${shard} as cave in ${servercfgdir}/worldgenoverride.lua." echo 'return { override_enabled = true, preset = "DST_CAVE", }' > "${servercfgdir}/worldgenoverride.lua" fi fn_sleep_time diff --git a/lgsm/modules/install_eula.sh b/lgsm/modules/install_eula.sh index 7f0229bfa..7f7f95f35 100644 --- a/lgsm/modules/install_eula.sh +++ b/lgsm/modules/install_eula.sh @@ -30,10 +30,10 @@ if [ -z "${autoinstall}" ]; then fi elif [ "${commandname}" == "START" ]; then fn_print_info "By continuing you are indicating your agreement to the EULA." - sleep 5 + fn_sleep_time_5 else echo -e "By using auto-install you are indicating your agreement to the EULA." - sleep 5 + fn_sleep_time_5 fi if [ "${shortname}" == "ts3" ]; then diff --git a/lgsm/modules/install_gslt.sh b/lgsm/modules/install_gslt.sh index 772885d64..aa8d89d33 100644 --- a/lgsm/modules/install_gslt.sh +++ b/lgsm/modules/install_gslt.sh @@ -10,7 +10,6 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" echo -e "${bold}${lightyellow}Game Server Login Token${default}" fn_messages_separator -fn_sleep_time if [ "${shortname}" == "csgo" ] || [ "${shortname}" == "css" ] || [ "${shortname}" == "nmrih" ] || [ "${shortname}" == "bs" ]; then echo -e "GSLT is required to run a public ${gamename} server" fn_script_log_info "GSLT is required to run a public ${gamename} server" @@ -36,7 +35,7 @@ if [ -z "${autoinstall}" ]; then fi fi fi -fn_sleep_time + if [ "${shortname}" == "tu" ]; then echo -e "The GSLT can be changed by editing ${servercfgdir}/${servercfg}." fn_script_log_info "The GSLT can be changed by editing ${servercfgdir}/${servercfg}." @@ -44,4 +43,5 @@ else echo -e "The GSLT can be changed by editing ${configdirserver}/${selfname}.cfg." fn_script_log_info "The GSLT can be changed by editing ${configdirserver}/${selfname}.cfg." fi +fn_sleep_time_1 echo -e "" diff --git a/lgsm/modules/install_logs.sh b/lgsm/modules/install_logs.sh index 5b12dd3e1..294bc1e46 100644 --- a/lgsm/modules/install_logs.sh +++ b/lgsm/modules/install_logs.sh @@ -11,9 +11,7 @@ if [ "${checklogs}" != "1" ]; then echo -e "" echo -e "${bold}${lightyellow}Creating Log Directories${default}" fn_messages_separator - fn_sleep_time fi -fn_sleep_time # Create LinuxGSM logs. echo -en "installing log dir: ${logdir}..." mkdir -p "${logdir}" diff --git a/lgsm/modules/install_server_dir.sh b/lgsm/modules/install_server_dir.sh index 0136e52fc..0703e0c54 100644 --- a/lgsm/modules/install_server_dir.sh +++ b/lgsm/modules/install_server_dir.sh @@ -10,7 +10,6 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" echo -e "${bold}${lightyellow}Server Directory${default}" fn_messages_separator -fn_sleep_time if [ -d "${serverfiles}" ]; then fn_print_warning_nl "A server is already installed here." fi diff --git a/lgsm/modules/install_squad_license.sh b/lgsm/modules/install_squad_license.sh index 604b3bcad..28f4456a5 100644 --- a/lgsm/modules/install_squad_license.sh +++ b/lgsm/modules/install_squad_license.sh @@ -18,7 +18,7 @@ echo -e "https://squad.fandom.com/wiki/Server_licensing" fn_script_log_info "Get more info and a server license here:" fn_script_log_info "https://squad.fandom.com/wiki/Server_licensing" echo -e "" -fn_sleep_time +fn_sleep_time_1 echo -e "The Squad server license can be changed by editing ${servercfgdir}/License.cfg." fn_script_log_info "The Squad server license can be changed by editing ${selfname}." echo -e "" diff --git a/lgsm/modules/install_stats.sh b/lgsm/modules/install_stats.sh index c3e92323d..40a13434d 100644 --- a/lgsm/modules/install_stats.sh +++ b/lgsm/modules/install_stats.sh @@ -10,7 +10,6 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" echo -e "${bold}${lightyellow}LinuxGSM Stats${default}" fn_messages_separator -fn_sleep_time echo -e "Assist LinuxGSM development by sending anonymous stats to developers." echo -e "Collected data is publicly available: ${italic}https://linuxgsm.com/data/usage${default}" echo -e "More info: ${italic}https://docs.linuxgsm.com/configuration/linuxgsm-stats${default}" diff --git a/lgsm/modules/install_ts3db.sh b/lgsm/modules/install_ts3db.sh index e5776c30f..464bd686a 100644 --- a/lgsm/modules/install_ts3db.sh +++ b/lgsm/modules/install_ts3db.sh @@ -45,7 +45,7 @@ fn_install_ts3db_mariadb() { sed -i "s/dbpluginparameter=/dbpluginparameter=ts3db_mariadb.ini/g" "${servercfgfullpath}" sed -i "s/dbsqlcreatepath=create_sqlite\//dbsqlcreatepath=create_mariadb\//g" "${servercfgfullpath}" echo -e "updating ts3db_mariadb.ini." - fn_sleep_time + fn_sleep_time_1 } echo -e "" @@ -69,5 +69,5 @@ fn_print_information_nl "Key also saved in:" echo -e "${serverfiles}/privilege_key.txt" cd "${executabledir}" || exit ./ts3server_startscript.sh start inifile=ts3-server.ini 2>&1 | tee "${serverfiles}/privilege_key.txt" -sleep 5 +fn_sleep_time_5 ./ts3server_startscript.sh stop diff --git a/lgsm/modules/update_fctr.sh b/lgsm/modules/update_fctr.sh index 2eef0d4cd..8fb78ede3 100644 --- a/lgsm/modules/update_fctr.sh +++ b/lgsm/modules/update_fctr.sh @@ -104,7 +104,7 @@ fn_update_compare() { command_start.sh fn_firstcommand_reset exitbypass=1 - sleep 5 + fn_sleep_time_5 command_stop.sh fn_firstcommand_reset fi diff --git a/lgsm/modules/update_jk2.sh b/lgsm/modules/update_jk2.sh index f685fd4cb..e2715c01c 100644 --- a/lgsm/modules/update_jk2.sh +++ b/lgsm/modules/update_jk2.sh @@ -100,7 +100,7 @@ fn_update_compare() { command_start.sh fn_firstcommand_reset exitbypass=1 - sleep 5 + fn_sleep_time_5 command_stop.sh fn_firstcommand_reset fi diff --git a/lgsm/modules/update_mc.sh b/lgsm/modules/update_mc.sh index c4aa1b425..4a0bdde37 100644 --- a/lgsm/modules/update_mc.sh +++ b/lgsm/modules/update_mc.sh @@ -116,7 +116,7 @@ fn_update_compare() { command_start.sh fn_firstcommand_reset exitbypass=1 - sleep 5 + fn_sleep_time_5 command_stop.sh fn_firstcommand_reset fi diff --git a/lgsm/modules/update_mcb.sh b/lgsm/modules/update_mcb.sh index eb8adfd12..7bd273d66 100644 --- a/lgsm/modules/update_mcb.sh +++ b/lgsm/modules/update_mcb.sh @@ -122,7 +122,7 @@ fn_update_compare() { command_start.sh fn_firstcommand_reset exitbypass=1 - sleep 5 + fn_sleep_time_5 command_stop.sh fn_firstcommand_reset fi diff --git a/lgsm/modules/update_mta.sh b/lgsm/modules/update_mta.sh index cd1195563..c6f7dfcb0 100644 --- a/lgsm/modules/update_mta.sh +++ b/lgsm/modules/update_mta.sh @@ -108,7 +108,7 @@ fn_update_compare() { command_start.sh fn_firstcommand_reset exitbypass=1 - sleep 5 + fn_sleep_time_5 command_stop.sh fn_firstcommand_reset fi diff --git a/lgsm/modules/update_pmc.sh b/lgsm/modules/update_pmc.sh index 9bfa82101..5d44bee21 100644 --- a/lgsm/modules/update_pmc.sh +++ b/lgsm/modules/update_pmc.sh @@ -126,7 +126,7 @@ fn_update_compare() { command_start.sh fn_firstcommand_reset exitbypass=1 - sleep 5 + fn_sleep_time_5 command_stop.sh fn_firstcommand_reset fi diff --git a/lgsm/modules/update_ts3.sh b/lgsm/modules/update_ts3.sh index c00ae75cb..1fa77f428 100644 --- a/lgsm/modules/update_ts3.sh +++ b/lgsm/modules/update_ts3.sh @@ -108,7 +108,7 @@ fn_update_compare() { command_start.sh fn_firstcommand_reset exitbypass=1 - sleep 5 + fn_sleep_time_5 command_stop.sh fn_firstcommand_reset fi diff --git a/lgsm/modules/update_ut99.sh b/lgsm/modules/update_ut99.sh index bdd3631f3..6d0be1941 100644 --- a/lgsm/modules/update_ut99.sh +++ b/lgsm/modules/update_ut99.sh @@ -102,7 +102,7 @@ fn_update_compare() { command_start.sh fn_firstcommand_reset exitbypass=1 - sleep 5 + fn_sleep_time_5 command_stop.sh fn_firstcommand_reset fi diff --git a/lgsm/modules/update_vints.sh b/lgsm/modules/update_vints.sh index b38372058..403917e0c 100644 --- a/lgsm/modules/update_vints.sh +++ b/lgsm/modules/update_vints.sh @@ -109,7 +109,7 @@ fn_update_compare() { command_start.sh fn_firstcommand_reset exitbypass=1 - sleep 5 + fn_sleep_time_5 command_stop.sh fn_firstcommand_reset fi diff --git a/linuxgsm.sh b/linuxgsm.sh index 520373d48..20adc1db6 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -323,17 +323,18 @@ fn_install_file() { # Prevent LinuxGSM from running as root. Except if doing a dependency install. if [ "$(whoami)" == "root" ]; then - if [ "${userinput}" == "install" ] || [ "${userinput}" == "auto-install" ] || [ "${userinput}" == "i" ] || [ "${userinput}" == "ai" ]; then - if [ "${shortname}" == "core" ]; then - echo -e "[ FAIL ] Do NOT run this script as root!" - exit 1 + if [ -f "${modulesdir}/core_modules.sh" ] || [ -f "${modulesdir}/check_root.sh" ] || [ -f "${modulesdir}/core_messages.sh" ]; then + if [ "${userinput}" != "install" ] && [ "${userinput}" != "auto-install" ] && [ "${userinput}" != "i" ] && [ "${userinput}" != "ai" ]; then + core_modules.sh + core_messages.sh + fn_ansi_loader + check_root.sh fi - elif [ ! -f "${modulesdir}/core_modules.sh" ] || [ ! -f "${modulesdir}/check_root.sh" ] || [ ! -f "${modulesdir}/core_messages.sh" ]; then - echo -e "[ FAIL ] Do NOT run this script as root!" - exit 1 else - core_modules.sh - check_root.sh + if [ "${userinput}" != "install" ] && [ "${userinput}" != "auto-install" ] && [ "${userinput}" != "i" ] && [ "${userinput}" != "ai" ]; then + echo -e "[ FAIL ] Do NOT run as root!" + exit 1 + fi fi fi From 120023dcaefd9a363e16aff09622132fa36157ed Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 22 Oct 2023 21:47:18 +0100 Subject: [PATCH 275/374] feat: alerts refactor (#4345) * feat(alert): add new alert types - Added new alert types for different scenarios such as stopped, started, restarted, monitor session failure, monitor query failure, wipe, and info. - Updated the `alert.sh` script to include functions for each new alert type. - Modified the `command_monitor.sh` script to use the appropriate alert type based on the monitoring results. * feat: remove more info if not enabled * refactor: refactor alert functions and add color codes This commit refactors the alert functions in the `alert.sh` module. It adds color codes for different types of alerts, such as green for started/restarted alerts, red for stopped/monitor session/query/permissions alerts, and blue for update/config/wipe/info alerts. The commit also updates the alert emoji to better represent each type of alert. * feat: add colour to discord alert * refactor: improve Pushbullet alert sending The code in the `alert_pushbullet.sh` file has been refactored to improve the way Pushbullet alerts are sent. The curl command now includes the access token as a header instead of in the URL, resulting in more secure communication with the Pushbullet API. This change enhances the reliability and security of sending Pushbullet alerts. * feat: add alert icon and footer to Discord alerts - Added a new variable `alerticon` to store the URL of the alert icon image. - Included the `alerticon` in the JSON payload for both short info and no info alerts. - Added a footer with text "Sent by LinuxGSM v23.5.3" to the JSON payload for both short info and no info alerts. This commit enhances the appearance of Discord alerts by adding an icon, a footer, and additional information about the sender. * refactor(alert): refactor alert functions - Refactored the alert functions to improve code readability and maintainability. - Renamed variables for better clarity and consistency. - Updated function names to be more descriptive of their purpose. - Reorganized the order of function definitions for better organization. * feat: add first batch of icons * refactor: improve serverlist validation script The commit refactors the serverlist validation script to include a new check. It now compares all game servers listed in `serverlist.csv` to `$shortname-icon.png` files in `lgsm/data/gameicons`. If a game server is listed in `serverlist.csv`, it should have a corresponding `$shortname-icon.png` file. The commit adds a loop that checks for the existence of these files and outputs an error message if any are missing. * another batch of icons * more icons * updated icons a * feat: add serverlist game icon validation This commit adds a new script `serverlist-validate-game-icons.sh` that checks if all the game servers listed in `serverlist.csv` have a corresponding `shortname-icon.png` file. It also verifies that the number of game icons matches the number of servers in `serverlist.csv`. The script is executed as part of the workflow defined in `serverlist-validate.yml`. Co-authored-by: [co-author-name] * refactor: improve game icon validation script The commit refactors the game icon validation script to improve its functionality. It adds a check for unexpected game icons and ensures that the number of game icons matches the number of servers in serverlist.csv. The commit also updates error messages for better clarity and readability. * refactor: remove unused mumble-icon.png game icon The code changes involve removing the unused mumble-icon.png game icon. This change helps to clean up the codebase by removing unnecessary files. * feat: update game icons Updated the game icons for bf1942, pmc, vints, vpmc, and wmc. Changed resolution to 32px * feat(alert): add alert action and information to Discord message - Added a new variable `alertaction` to store the action performed in the alert - Modified the Discord message template to include the alert action and information - Updated the author name in the Discord message template to "LinuxGSM Alert" The changes allow for more informative and descriptive alerts in Discord messages. * feat(alert.sh): add alertaction variable This commit adds the `alertaction` variable to the `fn_alert_*` functions in the `alert.sh` module. The `alertaction` variable is used to specify the action that triggered the alert, such as "Started", "Stopped", "Restarted", etc. This allows for more informative and descriptive alerts. * refactor: rework email alert * feat: add environment detail * refactor: simplify Discord and Pushbullet alert message handling The code changes in this commit refactor the way Discord and Pushbullet alert messages are handled. The previous implementation used separate variables for short information and no information scenarios, but now it uses a single variable for both cases. Additionally, the code now checks if the "alerturl" is empty instead of comparing it to a specific value. These changes improve code readability and maintainability by reducing redundancy and simplifying conditional logic. * title * fix: update Pushover alert message formatting The commit fixes the formatting of the Pushover alert message by removing unnecessary information and adding a conditional check for the presence of an alert URL. * refactor: improve formatting of server IP value in Discord alert The code changes in this commit refactor the formatting of the server IP value in the Discord alert. The value is now enclosed in single quotes for better readability. * refactor: improve alert message formatting and remove unnecessary code The commit refactors the alert message formatting in the `alert_pushbullet.sh`, `alert_slack.sh`, and `alert_telegram.sh` files. It improves the structure and readability of the messages by using proper markdown syntax. Additionally, it removes unnecessary code from the files to simplify their implementation. * more changes * feat: add server name and information fields to Discord alert The code changes in the `alert_discord.sh` file include adding new fields for server name and information to the JSON payload sent in a Discord alert. This allows for more detailed information about the server to be included in the alert message. refactor: improve conditional logic for Gotify alerts In the `alert_gotify.sh` file, the code changes involve improving the conditional logic for determining which JSON payload to use when sending a Gotify alert. The updated logic checks if an alert URL is provided and selects the appropriate JSON payload accordingly. chore: update field names in IFTTT alerts The changes made in `alert_ifttt.sh` involve updating field names in the JSON payloads used for IFTTT alerts. The field names have been modified to match a consistent format across all fields. fix: correct body formatting in Pushbullet alerts The code changes made in `alert_pushbullet.sh` address an issue with incorrect body formatting in Pushbullet alerts. The body of the alert now includes separate lines for each piece of information, such as server name, information, game, server IP, hostname, and more info. refactor: improve attachment structure in RocketChat alerts In `alert_rocketchat.sh`, the code changes involve improving the attachment structure of RocketChat alerts. The updated structure includes separate sections for server name, information, game, server IP, hostname, and more info. feat: add additional sections to Slack alerts The changes made in `alert_slack.sh` include adding additional sections to Slack alerts. These sections provide separate blocks of text for server name and information within each message. feat: add HTML formatting to Telegram alerts In `alert_telegram.sh`, HTML formatting has been added to Telegram alerts. This allows for bold text styling and clickable links within each message sent via Telegram. * bug * bug * refactor: improve alert message formatting - Refactored the code in `alert_pushover.sh` and `alert_telegram.sh` to improve the formatting of the alert messages. - Updated the message structure to include the server name before other information. - Added line breaks for better readability. - Made sure that all variables are properly interpolated within the messages. * bug * remove rocketchattoken * feat: add alert types for server start, stop, restart, and wipe - Added new alert types for server start, stop, restart, and wipe. - Updated the `alert.sh` module to include functions for handling these new alert types. - Modified the `command_start.sh`, `command_stop.sh`, and `command_wipe.sh` modules to trigger the corresponding alerts when appropriate. - Updated the `alert_rocketchat.sh` module to display the relevant information for each alert type in Rocket.Chat notifications. * refactor: update alert messages in lgsm/modules/alert.sh - Updated the alert messages for when the game server is stopped, started, restarted, and when an LinuxGSM update is received. - Changed the wording to use "has been" instead of "has" for consistency. - Added a mention that the server has been restarted after receiving an LinuxGSM update. * bug * refactor: update alert emojis and add server time - Updated the alert emojis in the `alert.sh` module. - Added the server time to the alert messages in various modules (`alert_discord.sh`, `alert_gotify.sh`, `alert_ifttt.sh`, `alert_pushbullet.sh`, `alert_pushover.sh`, `alert_rocketchat.sh`, and `alert_slack.sh`). * refactor: remove date from alert messages The commit refactors the code in `alert_discord.sh` and `alert_slack.sh` to remove the date from the alert messages sent by LinuxGSM. This change simplifies the message content while still indicating that it was sent by LinuxGSM and includes the version number. * feat: add statusalert option to server configs This commit adds the "statusalert" option to the default configuration files for various game servers. The "statusalert" option allows users to enable or disable alerts on server start, stop, and restart events. This feature provides more flexibility in managing server notifications. * feat: add alert for update and restart if necessary The code change adds an alert for updates and restarts the service if necessary. This ensures that the service is restarted after an update to prevent any issues. * feat: add backup alert functionality This commit adds a new function `fn_alert_backup` to the `alert.sh` module. This function sends an alert when the system has been backed up. The alert includes a message, action, emoji, sound, and color. In addition, this commit modifies the `command_backup.sh` module to trigger the backup alert by setting the variable `alert` to "backup" and calling `alert.sh`. The purpose of these changes is to provide notifications when backups are created. Co-authored-by: AI Assistant * refactor: change alert color to green The code in the `alert.sh` file has been refactored to change the alert color from blue to green. This change updates the `alertcolourhex` and `alertcolourdec` variables accordingly. --------- Co-authored-by: AI Assistant --- .../serverlist-validate-game-icons.sh | 40 ++++ .github/workflows/serverlist-validate.sh | 16 ++ .github/workflows/serverlist-validate.yml | 3 + .../config-lgsm/acserver/_default.cfg | 4 +- .../config-lgsm/ahl2server/_default.cfg | 4 +- .../config-lgsm/ahlserver/_default.cfg | 4 +- .../config-lgsm/arkserver/_default.cfg | 4 +- .../config-lgsm/arma3server/_default.cfg | 4 +- .../config-lgsm/armarserver/_default.cfg | 4 +- .../config-lgsm/atsserver/_default.cfg | 4 +- .../config-lgsm/avserver/_default.cfg | 4 +- .../config-lgsm/bb2server/_default.cfg | 4 +- .../config-lgsm/bbserver/_default.cfg | 4 +- .../config-lgsm/bdserver/_default.cfg | 4 +- .../config-lgsm/bf1942server/_default.cfg | 4 +- .../config-lgsm/bfvserver/_default.cfg | 4 +- .../config-lgsm/bmdmserver/_default.cfg | 4 +- .../config-lgsm/boserver/_default.cfg | 4 +- .../config-lgsm/bsserver/_default.cfg | 4 +- .../config-lgsm/btlserver/_default.cfg | 4 +- .../config-lgsm/btserver/_default.cfg | 4 +- .../config-lgsm/ccserver/_default.cfg | 4 +- .../config-lgsm/cdserver/_default.cfg | 4 +- .../config-lgsm/ckserver/_default.cfg | 4 +- .../config-lgsm/cmwserver/_default.cfg | 4 +- .../config-lgsm/cod2server/_default.cfg | 4 +- .../config-lgsm/cod4server/_default.cfg | 4 +- .../config-lgsm/codserver/_default.cfg | 4 +- .../config-lgsm/coduoserver/_default.cfg | 4 +- .../config-lgsm/codwawserver/_default.cfg | 4 +- .../config-lgsm/colserver/_default.cfg | 4 +- .../config-lgsm/csczserver/_default.cfg | 4 +- .../config-lgsm/csgoserver/_default.cfg | 4 +- .../config-lgsm/csserver/_default.cfg | 4 +- .../config-lgsm/cssserver/_default.cfg | 4 +- .../config-lgsm/ctserver/_default.cfg | 4 +- .../config-lgsm/dabserver/_default.cfg | 4 +- .../config-lgsm/dayzserver/_default.cfg | 4 +- .../config-lgsm/dmcserver/_default.cfg | 4 +- .../config-lgsm/dodrserver/_default.cfg | 4 +- .../config-lgsm/dodserver/_default.cfg | 4 +- .../config-lgsm/dodsserver/_default.cfg | 4 +- .../config-lgsm/doiserver/_default.cfg | 4 +- .../config-lgsm/dstserver/_default.cfg | 4 +- .../config-lgsm/dysserver/_default.cfg | 4 +- .../config-lgsm/ecoserver/_default.cfg | 4 +- .../config-lgsm/emserver/_default.cfg | 4 +- .../config-lgsm/etlserver/_default.cfg | 4 +- .../config-lgsm/ets2server/_default.cfg | 4 +- .../config-lgsm/fctrserver/_default.cfg | 4 +- .../config-lgsm/fofserver/_default.cfg | 4 +- .../config-lgsm/gmodserver/_default.cfg | 4 +- .../config-lgsm/hcuserver/_default.cfg | 4 +- .../config-lgsm/hl2dmserver/_default.cfg | 4 +- .../config-lgsm/hldmserver/_default.cfg | 4 +- .../config-lgsm/hldmsserver/_default.cfg | 4 +- .../config-lgsm/hwserver/_default.cfg | 4 +- .../config-lgsm/insserver/_default.cfg | 4 +- .../config-lgsm/inssserver/_default.cfg | 4 +- .../config-lgsm/iosserver/_default.cfg | 4 +- .../config-lgsm/jc2server/_default.cfg | 4 +- .../config-lgsm/jc3server/_default.cfg | 4 +- .../config-lgsm/jk2server/_default.cfg | 4 +- .../config-lgsm/kf2server/_default.cfg | 4 +- .../config-lgsm/kfserver/_default.cfg | 4 +- .../config-lgsm/l4d2server/_default.cfg | 4 +- .../config-lgsm/l4dserver/_default.cfg | 4 +- .../config-lgsm/loserver/_default.cfg | 4 +- .../config-lgsm/mcbserver/_default.cfg | 4 +- .../config-lgsm/mcserver/_default.cfg | 4 +- .../config-lgsm/mhserver/_default.cfg | 4 +- .../config-lgsm/mohaaserver/_default.cfg | 4 +- .../config-lgsm/momserver/_default.cfg | 4 +- .../config-lgsm/mtaserver/_default.cfg | 4 +- .../config-lgsm/ndserver/_default.cfg | 4 +- .../config-lgsm/necserver/_default.cfg | 4 +- .../config-lgsm/nmrihserver/_default.cfg | 4 +- .../config-lgsm/ns2cserver/_default.cfg | 4 +- .../config-lgsm/ns2server/_default.cfg | 4 +- .../config-lgsm/nsserver/_default.cfg | 4 +- .../config-lgsm/ohdserver/_default.cfg | 4 +- .../config-lgsm/onsetserver/_default.cfg | 4 +- .../config-lgsm/opforserver/_default.cfg | 4 +- .../config-lgsm/pc2server/_default.cfg | 4 +- .../config-lgsm/pcserver/_default.cfg | 4 +- .../config-lgsm/pmcserver/_default.cfg | 4 +- .../config-lgsm/psserver/_default.cfg | 4 +- .../config-lgsm/pvkiiserver/_default.cfg | 4 +- .../config-lgsm/pvrserver/_default.cfg | 4 +- .../config-lgsm/pzserver/_default.cfg | 4 +- .../config-lgsm/q2server/_default.cfg | 4 +- .../config-lgsm/q3server/_default.cfg | 4 +- .../config-lgsm/qlserver/_default.cfg | 4 +- .../config-lgsm/qwserver/_default.cfg | 4 +- .../config-lgsm/ricochetserver/_default.cfg | 4 +- .../config-lgsm/roserver/_default.cfg | 4 +- .../config-lgsm/rtcwserver/_default.cfg | 4 +- .../config-lgsm/rustserver/_default.cfg | 4 +- .../config-lgsm/rwserver/_default.cfg | 4 +- .../config-lgsm/sampserver/_default.cfg | 4 +- .../config-lgsm/sbotsserver/_default.cfg | 4 +- .../config-lgsm/sbserver/_default.cfg | 4 +- .../config-lgsm/scpslserver/_default.cfg | 4 +- .../config-lgsm/scpslsmserver/_default.cfg | 4 +- .../config-lgsm/sdtdserver/_default.cfg | 4 +- .../config-lgsm/sfcserver/_default.cfg | 4 +- .../config-lgsm/sfserver/_default.cfg | 4 +- .../config-lgsm/sof2server/_default.cfg | 4 +- .../config-lgsm/solserver/_default.cfg | 4 +- .../config-lgsm/squadserver/_default.cfg | 4 +- .../config-lgsm/stnserver/_default.cfg | 4 +- .../config-lgsm/stserver/_default.cfg | 4 +- .../config-lgsm/svenserver/_default.cfg | 4 +- .../config-lgsm/terrariaserver/_default.cfg | 4 +- .../config-lgsm/tf2server/_default.cfg | 4 +- .../config-lgsm/tfcserver/_default.cfg | 4 +- .../config-lgsm/tiserver/_default.cfg | 4 +- .../config-lgsm/ts3server/_default.cfg | 4 +- .../config-lgsm/tsserver/_default.cfg | 4 +- .../config-lgsm/tuserver/_default.cfg | 4 +- .../config-lgsm/twserver/_default.cfg | 4 +- .../config-lgsm/untserver/_default.cfg | 4 +- .../config-lgsm/ut2k4server/_default.cfg | 4 +- .../config-lgsm/ut3server/_default.cfg | 4 +- .../config-lgsm/ut99server/_default.cfg | 4 +- .../config-lgsm/utserver/_default.cfg | 4 +- .../config-lgsm/vhserver/_default.cfg | 4 +- .../config-lgsm/vintsserver/_default.cfg | 4 +- .../config-lgsm/vpmcserver/_default.cfg | 4 +- .../config-lgsm/vsserver/_default.cfg | 4 +- .../config-lgsm/wetserver/_default.cfg | 4 +- .../config-lgsm/wfserver/_default.cfg | 4 +- .../config-lgsm/wmcserver/_default.cfg | 4 +- .../config-lgsm/wurmserver/_default.cfg | 4 +- .../config-lgsm/zmrserver/_default.cfg | 4 +- .../config-lgsm/zpsserver/_default.cfg | 4 +- lgsm/data/gameicons/ac-icon.png | Bin 0 -> 1801 bytes lgsm/data/gameicons/ahl-icon.png | Bin 0 -> 2983 bytes lgsm/data/gameicons/ahl2-icon.png | Bin 0 -> 2532 bytes lgsm/data/gameicons/ark-icon.png | Bin 0 -> 2006 bytes lgsm/data/gameicons/arma3-icon.png | Bin 0 -> 954 bytes lgsm/data/gameicons/armar-icon.png | Bin 0 -> 722 bytes lgsm/data/gameicons/ats-icon.png | Bin 0 -> 2037 bytes lgsm/data/gameicons/av-icon.png | Bin 0 -> 1983 bytes lgsm/data/gameicons/bb-icon.png | Bin 0 -> 2837 bytes lgsm/data/gameicons/bb2-icon.png | Bin 0 -> 2082 bytes lgsm/data/gameicons/bd-icon.png | Bin 0 -> 2094 bytes lgsm/data/gameicons/bf1942-icon.png | Bin 0 -> 2847 bytes lgsm/data/gameicons/bfv-icon.png | Bin 0 -> 2094 bytes lgsm/data/gameicons/bmdm-icon.png | Bin 0 -> 2082 bytes lgsm/data/gameicons/bo-icon.png | Bin 0 -> 2030 bytes lgsm/data/gameicons/bs-icon.png | Bin 0 -> 1916 bytes lgsm/data/gameicons/bt-icon.png | Bin 0 -> 2091 bytes lgsm/data/gameicons/btl-icon.png | Bin 0 -> 2334 bytes lgsm/data/gameicons/cc-icon.png | Bin 0 -> 2147 bytes lgsm/data/gameicons/cd-icon.png | Bin 0 -> 2819 bytes lgsm/data/gameicons/ck-icon.png | Bin 0 -> 2828 bytes lgsm/data/gameicons/cmw-icon.png | Bin 0 -> 2645 bytes lgsm/data/gameicons/cod-icon.png | Bin 0 -> 2050 bytes lgsm/data/gameicons/cod2-icon.png | Bin 0 -> 2707 bytes lgsm/data/gameicons/cod4-icon.png | Bin 0 -> 2878 bytes lgsm/data/gameicons/coduo-icon.png | Bin 0 -> 2652 bytes lgsm/data/gameicons/codwaw-icon.png | Bin 0 -> 2819 bytes lgsm/data/gameicons/col-icon.png | Bin 0 -> 2411 bytes lgsm/data/gameicons/cs-icon.png | Bin 0 -> 2150 bytes lgsm/data/gameicons/cscz-icon.png | Bin 0 -> 2362 bytes lgsm/data/gameicons/csgo-icon.png | Bin 0 -> 2735 bytes lgsm/data/gameicons/css-icon.png | Bin 0 -> 2791 bytes lgsm/data/gameicons/ct-icon.png | Bin 0 -> 2951 bytes lgsm/data/gameicons/dab-icon.png | Bin 0 -> 2589 bytes lgsm/data/gameicons/dayz-icon.png | Bin 0 -> 2370 bytes lgsm/data/gameicons/dmc-icon.png | Bin 0 -> 2774 bytes lgsm/data/gameicons/dod-icon.png | Bin 0 -> 2489 bytes lgsm/data/gameicons/dodr-icon.png | Bin 0 -> 3083 bytes lgsm/data/gameicons/dods-icon.png | Bin 0 -> 2359 bytes lgsm/data/gameicons/doi-icon.png | Bin 0 -> 2520 bytes lgsm/data/gameicons/dst-icon.png | Bin 0 -> 3125 bytes lgsm/data/gameicons/dys-icon.png | Bin 0 -> 2777 bytes lgsm/data/gameicons/eco-icon.png | Bin 0 -> 2910 bytes lgsm/data/gameicons/em-icon.png | Bin 0 -> 2442 bytes lgsm/data/gameicons/etl-icon.png | Bin 0 -> 1774 bytes lgsm/data/gameicons/ets2-icon.png | Bin 0 -> 2997 bytes lgsm/data/gameicons/fctr-icon.png | Bin 0 -> 2596 bytes lgsm/data/gameicons/fof-icon.png | Bin 0 -> 2491 bytes lgsm/data/gameicons/gmod-icon.png | Bin 0 -> 2429 bytes lgsm/data/gameicons/hcu-icon.png | Bin 0 -> 2241 bytes lgsm/data/gameicons/hl2dm-icon.png | Bin 0 -> 2549 bytes lgsm/data/gameicons/hldm-icon.png | Bin 0 -> 2722 bytes lgsm/data/gameicons/hldms-icon.png | Bin 0 -> 2834 bytes lgsm/data/gameicons/hw-icon.png | Bin 0 -> 2207 bytes lgsm/data/gameicons/ins-icon.png | Bin 0 -> 2738 bytes lgsm/data/gameicons/inss-icon.png | Bin 0 -> 3200 bytes lgsm/data/gameicons/ios-icon.png | Bin 0 -> 2815 bytes lgsm/data/gameicons/jc2-icon.png | Bin 0 -> 2983 bytes lgsm/data/gameicons/jc3-icon.png | Bin 0 -> 2979 bytes lgsm/data/gameicons/jk2-icon.png | Bin 0 -> 2805 bytes lgsm/data/gameicons/kf-icon.png | Bin 0 -> 2687 bytes lgsm/data/gameicons/kf2-icon.png | Bin 0 -> 2706 bytes lgsm/data/gameicons/l4d-icon.png | Bin 0 -> 2487 bytes lgsm/data/gameicons/l4d2-icon.png | Bin 0 -> 2741 bytes lgsm/data/gameicons/lo-icon.png | Bin 0 -> 2747 bytes lgsm/data/gameicons/mc-icon.png | Bin 0 -> 2423 bytes lgsm/data/gameicons/mcb-icon.png | Bin 0 -> 2737 bytes lgsm/data/gameicons/mh-icon.png | Bin 0 -> 2638 bytes lgsm/data/gameicons/mohaa-icon.png | Bin 0 -> 2845 bytes lgsm/data/gameicons/mom-icon.png | Bin 0 -> 3025 bytes lgsm/data/gameicons/mta-icon.png | Bin 0 -> 2147 bytes lgsm/data/gameicons/nd-icon.png | Bin 0 -> 2520 bytes lgsm/data/gameicons/nec-icon.png | Bin 0 -> 2009 bytes lgsm/data/gameicons/nmrih-icon.png | Bin 0 -> 1100 bytes lgsm/data/gameicons/ns-icon.png | Bin 0 -> 3113 bytes lgsm/data/gameicons/ns2-icon.png | Bin 0 -> 2859 bytes lgsm/data/gameicons/ns2c-icon.png | Bin 0 -> 2603 bytes lgsm/data/gameicons/ohd-icon.png | Bin 0 -> 2630 bytes lgsm/data/gameicons/onset-icon.png | Bin 0 -> 2927 bytes lgsm/data/gameicons/opfor-icon.png | Bin 0 -> 2428 bytes lgsm/data/gameicons/pc-icon.png | Bin 0 -> 2605 bytes lgsm/data/gameicons/pc2-icon.png | Bin 0 -> 2504 bytes lgsm/data/gameicons/pmc-icon.png | Bin 0 -> 1312 bytes lgsm/data/gameicons/ps-icon.png | Bin 0 -> 1216 bytes lgsm/data/gameicons/pvkii-icon.png | Bin 0 -> 2938 bytes lgsm/data/gameicons/pvr-icon.png | Bin 0 -> 3021 bytes lgsm/data/gameicons/pz-icon.png | Bin 0 -> 2489 bytes lgsm/data/gameicons/q2-icon.png | Bin 0 -> 2584 bytes lgsm/data/gameicons/q3-icon.png | Bin 0 -> 2734 bytes lgsm/data/gameicons/ql-icon.png | Bin 0 -> 2974 bytes lgsm/data/gameicons/qw-icon.png | Bin 0 -> 2725 bytes lgsm/data/gameicons/ricochet-icon.png | Bin 0 -> 2727 bytes lgsm/data/gameicons/ro-icon.png | Bin 0 -> 2393 bytes lgsm/data/gameicons/rtcw-icon.png | Bin 0 -> 2244 bytes lgsm/data/gameicons/rust-icon.png | Bin 0 -> 2351 bytes lgsm/data/gameicons/rw-icon.png | Bin 0 -> 2644 bytes lgsm/data/gameicons/samp-icon.png | Bin 0 -> 3026 bytes lgsm/data/gameicons/sb-icon.png | Bin 0 -> 2598 bytes lgsm/data/gameicons/sbots-icon.png | Bin 0 -> 2927 bytes lgsm/data/gameicons/scpsl-icon.png | Bin 0 -> 3090 bytes lgsm/data/gameicons/scpslsm-icon.png | Bin 0 -> 3090 bytes lgsm/data/gameicons/sdtd-icon.png | Bin 0 -> 2010 bytes lgsm/data/gameicons/sf-icon.png | Bin 0 -> 1649 bytes lgsm/data/gameicons/sfc-icon.png | Bin 0 -> 2165 bytes lgsm/data/gameicons/sof2-icon.png | Bin 0 -> 1476 bytes lgsm/data/gameicons/sol-icon.png | Bin 0 -> 2978 bytes lgsm/data/gameicons/squad-icon.png | Bin 0 -> 2321 bytes lgsm/data/gameicons/st-icon.png | Bin 0 -> 3083 bytes lgsm/data/gameicons/stn-icon.png | Bin 0 -> 1622 bytes lgsm/data/gameicons/sven-icon.png | Bin 0 -> 2878 bytes lgsm/data/gameicons/terraria-icon.png | Bin 0 -> 2241 bytes lgsm/data/gameicons/tf2-icon.png | Bin 0 -> 2745 bytes lgsm/data/gameicons/tfc-icon.png | Bin 0 -> 2349 bytes lgsm/data/gameicons/ti-icon.png | Bin 0 -> 2163 bytes lgsm/data/gameicons/ts-icon.png | Bin 0 -> 2922 bytes lgsm/data/gameicons/ts3-icon.png | Bin 0 -> 2561 bytes lgsm/data/gameicons/tu-icon.png | Bin 0 -> 2389 bytes lgsm/data/gameicons/tw-icon.png | Bin 0 -> 2644 bytes lgsm/data/gameicons/unt-icon.png | Bin 0 -> 1495 bytes lgsm/data/gameicons/ut-icon.png | Bin 0 -> 1134 bytes lgsm/data/gameicons/ut2k4-icon.png | Bin 0 -> 2814 bytes lgsm/data/gameicons/ut3-icon.png | Bin 0 -> 2749 bytes lgsm/data/gameicons/ut99-icon.png | Bin 0 -> 2797 bytes lgsm/data/gameicons/vh-icon.png | Bin 0 -> 2598 bytes lgsm/data/gameicons/vints-icon.png | Bin 0 -> 9075 bytes lgsm/data/gameicons/vpmc-icon.png | Bin 0 -> 1171 bytes lgsm/data/gameicons/vs-icon.png | Bin 0 -> 500 bytes lgsm/data/gameicons/wet-icon.png | Bin 0 -> 478 bytes lgsm/data/gameicons/wf-icon.png | Bin 0 -> 2494 bytes lgsm/data/gameicons/wmc-icon.png | Bin 0 -> 1017 bytes lgsm/data/gameicons/wurm-icon.png | Bin 0 -> 2643 bytes lgsm/data/gameicons/zmr-icon.png | Bin 0 -> 1696 bytes lgsm/data/gameicons/zps-icon.png | Bin 0 -> 2679 bytes lgsm/modules/alert.sh | 200 ++++++++++++---- lgsm/modules/alert_discord.sh | 160 ++++++++++--- lgsm/modules/alert_email.sh | 4 +- lgsm/modules/alert_gotify.sh | 23 +- lgsm/modules/alert_ifttt.sh | 22 +- lgsm/modules/alert_pushbullet.sh | 25 +- lgsm/modules/alert_pushover.sh | 6 +- lgsm/modules/alert_rocketchat.sh | 102 ++++++++- lgsm/modules/alert_slack.sh | 216 ++++++++++++++---- lgsm/modules/alert_telegram.sh | 21 +- lgsm/modules/check_last_update.sh | 2 + lgsm/modules/command_backup.sh | 2 + lgsm/modules/command_monitor.sh | 6 +- lgsm/modules/command_start.sh | 7 + lgsm/modules/command_stop.sh | 24 ++ lgsm/modules/command_wipe.sh | 4 + lgsm/modules/info_messages.sh | 20 +- 286 files changed, 1139 insertions(+), 296 deletions(-) create mode 100755 .github/workflows/serverlist-validate-game-icons.sh create mode 100644 lgsm/data/gameicons/ac-icon.png create mode 100644 lgsm/data/gameicons/ahl-icon.png create mode 100644 lgsm/data/gameicons/ahl2-icon.png create mode 100644 lgsm/data/gameicons/ark-icon.png create mode 100644 lgsm/data/gameicons/arma3-icon.png create mode 100644 lgsm/data/gameicons/armar-icon.png create mode 100644 lgsm/data/gameicons/ats-icon.png create mode 100644 lgsm/data/gameicons/av-icon.png create mode 100644 lgsm/data/gameicons/bb-icon.png create mode 100644 lgsm/data/gameicons/bb2-icon.png create mode 100644 lgsm/data/gameicons/bd-icon.png create mode 100644 lgsm/data/gameicons/bf1942-icon.png create mode 100644 lgsm/data/gameicons/bfv-icon.png create mode 100644 lgsm/data/gameicons/bmdm-icon.png create mode 100644 lgsm/data/gameicons/bo-icon.png create mode 100644 lgsm/data/gameicons/bs-icon.png create mode 100644 lgsm/data/gameicons/bt-icon.png create mode 100644 lgsm/data/gameicons/btl-icon.png create mode 100644 lgsm/data/gameicons/cc-icon.png create mode 100644 lgsm/data/gameicons/cd-icon.png create mode 100644 lgsm/data/gameicons/ck-icon.png create mode 100644 lgsm/data/gameicons/cmw-icon.png create mode 100644 lgsm/data/gameicons/cod-icon.png create mode 100644 lgsm/data/gameicons/cod2-icon.png create mode 100644 lgsm/data/gameicons/cod4-icon.png create mode 100644 lgsm/data/gameicons/coduo-icon.png create mode 100644 lgsm/data/gameicons/codwaw-icon.png create mode 100644 lgsm/data/gameicons/col-icon.png create mode 100644 lgsm/data/gameicons/cs-icon.png create mode 100644 lgsm/data/gameicons/cscz-icon.png create mode 100644 lgsm/data/gameicons/csgo-icon.png create mode 100644 lgsm/data/gameicons/css-icon.png create mode 100644 lgsm/data/gameicons/ct-icon.png create mode 100644 lgsm/data/gameicons/dab-icon.png create mode 100644 lgsm/data/gameicons/dayz-icon.png create mode 100644 lgsm/data/gameicons/dmc-icon.png create mode 100644 lgsm/data/gameicons/dod-icon.png create mode 100644 lgsm/data/gameicons/dodr-icon.png create mode 100644 lgsm/data/gameicons/dods-icon.png create mode 100644 lgsm/data/gameicons/doi-icon.png create mode 100644 lgsm/data/gameicons/dst-icon.png create mode 100644 lgsm/data/gameicons/dys-icon.png create mode 100644 lgsm/data/gameicons/eco-icon.png create mode 100644 lgsm/data/gameicons/em-icon.png create mode 100644 lgsm/data/gameicons/etl-icon.png create mode 100644 lgsm/data/gameicons/ets2-icon.png create mode 100644 lgsm/data/gameicons/fctr-icon.png create mode 100644 lgsm/data/gameicons/fof-icon.png create mode 100644 lgsm/data/gameicons/gmod-icon.png create mode 100644 lgsm/data/gameicons/hcu-icon.png create mode 100644 lgsm/data/gameicons/hl2dm-icon.png create mode 100644 lgsm/data/gameicons/hldm-icon.png create mode 100644 lgsm/data/gameicons/hldms-icon.png create mode 100644 lgsm/data/gameicons/hw-icon.png create mode 100644 lgsm/data/gameicons/ins-icon.png create mode 100644 lgsm/data/gameicons/inss-icon.png create mode 100644 lgsm/data/gameicons/ios-icon.png create mode 100644 lgsm/data/gameicons/jc2-icon.png create mode 100644 lgsm/data/gameicons/jc3-icon.png create mode 100644 lgsm/data/gameicons/jk2-icon.png create mode 100644 lgsm/data/gameicons/kf-icon.png create mode 100644 lgsm/data/gameicons/kf2-icon.png create mode 100644 lgsm/data/gameicons/l4d-icon.png create mode 100644 lgsm/data/gameicons/l4d2-icon.png create mode 100644 lgsm/data/gameicons/lo-icon.png create mode 100644 lgsm/data/gameicons/mc-icon.png create mode 100644 lgsm/data/gameicons/mcb-icon.png create mode 100644 lgsm/data/gameicons/mh-icon.png create mode 100644 lgsm/data/gameicons/mohaa-icon.png create mode 100644 lgsm/data/gameicons/mom-icon.png create mode 100644 lgsm/data/gameicons/mta-icon.png create mode 100644 lgsm/data/gameicons/nd-icon.png create mode 100644 lgsm/data/gameicons/nec-icon.png create mode 100644 lgsm/data/gameicons/nmrih-icon.png create mode 100644 lgsm/data/gameicons/ns-icon.png create mode 100644 lgsm/data/gameicons/ns2-icon.png create mode 100644 lgsm/data/gameicons/ns2c-icon.png create mode 100644 lgsm/data/gameicons/ohd-icon.png create mode 100644 lgsm/data/gameicons/onset-icon.png create mode 100644 lgsm/data/gameicons/opfor-icon.png create mode 100644 lgsm/data/gameicons/pc-icon.png create mode 100644 lgsm/data/gameicons/pc2-icon.png create mode 100644 lgsm/data/gameicons/pmc-icon.png create mode 100644 lgsm/data/gameicons/ps-icon.png create mode 100644 lgsm/data/gameicons/pvkii-icon.png create mode 100644 lgsm/data/gameicons/pvr-icon.png create mode 100644 lgsm/data/gameicons/pz-icon.png create mode 100644 lgsm/data/gameicons/q2-icon.png create mode 100644 lgsm/data/gameicons/q3-icon.png create mode 100644 lgsm/data/gameicons/ql-icon.png create mode 100644 lgsm/data/gameicons/qw-icon.png create mode 100644 lgsm/data/gameicons/ricochet-icon.png create mode 100644 lgsm/data/gameicons/ro-icon.png create mode 100644 lgsm/data/gameicons/rtcw-icon.png create mode 100644 lgsm/data/gameicons/rust-icon.png create mode 100644 lgsm/data/gameicons/rw-icon.png create mode 100644 lgsm/data/gameicons/samp-icon.png create mode 100644 lgsm/data/gameicons/sb-icon.png create mode 100644 lgsm/data/gameicons/sbots-icon.png create mode 100644 lgsm/data/gameicons/scpsl-icon.png create mode 100644 lgsm/data/gameicons/scpslsm-icon.png create mode 100644 lgsm/data/gameicons/sdtd-icon.png create mode 100644 lgsm/data/gameicons/sf-icon.png create mode 100644 lgsm/data/gameicons/sfc-icon.png create mode 100644 lgsm/data/gameicons/sof2-icon.png create mode 100644 lgsm/data/gameicons/sol-icon.png create mode 100644 lgsm/data/gameicons/squad-icon.png create mode 100644 lgsm/data/gameicons/st-icon.png create mode 100644 lgsm/data/gameicons/stn-icon.png create mode 100644 lgsm/data/gameicons/sven-icon.png create mode 100644 lgsm/data/gameicons/terraria-icon.png create mode 100644 lgsm/data/gameicons/tf2-icon.png create mode 100644 lgsm/data/gameicons/tfc-icon.png create mode 100644 lgsm/data/gameicons/ti-icon.png create mode 100644 lgsm/data/gameicons/ts-icon.png create mode 100644 lgsm/data/gameicons/ts3-icon.png create mode 100644 lgsm/data/gameicons/tu-icon.png create mode 100644 lgsm/data/gameicons/tw-icon.png create mode 100644 lgsm/data/gameicons/unt-icon.png create mode 100644 lgsm/data/gameicons/ut-icon.png create mode 100644 lgsm/data/gameicons/ut2k4-icon.png create mode 100644 lgsm/data/gameicons/ut3-icon.png create mode 100644 lgsm/data/gameicons/ut99-icon.png create mode 100644 lgsm/data/gameicons/vh-icon.png create mode 100644 lgsm/data/gameicons/vints-icon.png create mode 100644 lgsm/data/gameicons/vpmc-icon.png create mode 100644 lgsm/data/gameicons/vs-icon.png create mode 100644 lgsm/data/gameicons/wet-icon.png create mode 100644 lgsm/data/gameicons/wf-icon.png create mode 100644 lgsm/data/gameicons/wmc-icon.png create mode 100644 lgsm/data/gameicons/wurm-icon.png create mode 100644 lgsm/data/gameicons/zmr-icon.png create mode 100644 lgsm/data/gameicons/zps-icon.png diff --git a/.github/workflows/serverlist-validate-game-icons.sh b/.github/workflows/serverlist-validate-game-icons.sh new file mode 100755 index 000000000..ca41892c9 --- /dev/null +++ b/.github/workflows/serverlist-validate-game-icons.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +cd "lgsm/data" || exit + +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 + # check if $shortname-icon.png exists + if [ ! -f "gameicons/${shortname}-icon.png" ]; then + echo "ERROR: gameicons/${shortname}-icon.png does not exist" + exitcode=1 + else + echo "OK: gameicons/${shortname}-icon.png exists" + fi +done + +echo "" +echo "Checking if an unexpected gameicon exists" +for gameicon in $(ls -1 gameicons); do + # check if $gameicon is in serverlist.csv + if ! grep -q "${gameicon%-icon.png}" serverlist.csv; then + echo "ERROR: gameicon ${gameicon} is not in serverlist.csv" + exitcode=1 + else + echo "OK: gameicon ${gameicon} is in serverlist.csv" + fi +done + +echo "" +echo "Checking that the number of gameicons matches the number of servers in serverlist.csv" +gameiconcount="$(ls -1 gameicons | 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)" + exitcode=1 +else + echo "OK: gameiconcount ($gameiconcount) matches serverlistcount ($serverlistcount)" +fi + +exit ${exitcode} diff --git a/.github/workflows/serverlist-validate.sh b/.github/workflows/serverlist-validate.sh index bc192ec37..0c7634018 100755 --- a/.github/workflows/serverlist-validate.sh +++ b/.github/workflows/serverlist-validate.sh @@ -19,4 +19,20 @@ for csv in $csvlist; do fi done +# Compare all game servers listed in serverlist.csv to $shortname-icon.png files in lgsm/data/gameicons +# if the game server is listed in serverlist.csv then it will have a $shortname-icon.png file + +# loop though shortname in serverlist.csv +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 + # check if $shortname-icon.png exists + if [ ! -f "gameicons/${shortname}-icon.png" ]; then + echo "ERROR: gameicons/${shortname}-icon.png does not exist" + exitcode=1 + else + echo "OK: gameicons/${shortname}-icon.png exists" + fi +done + exit ${exitcode} diff --git a/.github/workflows/serverlist-validate.yml b/.github/workflows/serverlist-validate.yml index 13f7376a1..931329571 100644 --- a/.github/workflows/serverlist-validate.yml +++ b/.github/workflows/serverlist-validate.yml @@ -12,3 +12,6 @@ jobs: - name: Compare Versions run: chmod +x .github/workflows/serverlist-validate.sh; .github/workflows/serverlist-validate.sh + + - name: Validate Game Icons + run: chmod +x .github/workflows/serverlist-validate-game-icons.sh; .github/workflows/serverlist-validate-game-icons.sh diff --git a/lgsm/config-default/config-lgsm/acserver/_default.cfg b/lgsm/config-default/config-lgsm/acserver/_default.cfg index c6aeb7b63..b3ad14caf 100644 --- a/lgsm/config-default/config-lgsm/acserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/acserver/_default.cfg @@ -32,6 +32,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -64,7 +67,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/ahl2server/_default.cfg b/lgsm/config-default/config-lgsm/ahl2server/_default.cfg index fa8f9fa90..086047093 100644 --- a/lgsm/config-default/config-lgsm/ahl2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ahl2server/_default.cfg @@ -40,6 +40,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -72,7 +75,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/ahlserver/_default.cfg b/lgsm/config-default/config-lgsm/ahlserver/_default.cfg index 6b8012b36..fb7725e1f 100644 --- a/lgsm/config-default/config-lgsm/ahlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ahlserver/_default.cfg @@ -35,6 +35,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -67,7 +70,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/arkserver/_default.cfg b/lgsm/config-default/config-lgsm/arkserver/_default.cfg index 6e3b466fd..7f38c974f 100644 --- a/lgsm/config-default/config-lgsm/arkserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/arkserver/_default.cfg @@ -38,6 +38,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -70,7 +73,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/arma3server/_default.cfg b/lgsm/config-default/config-lgsm/arma3server/_default.cfg index 8a59a6fb1..f89b751ed 100644 --- a/lgsm/config-default/config-lgsm/arma3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/arma3server/_default.cfg @@ -51,6 +51,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -83,7 +86,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/armarserver/_default.cfg b/lgsm/config-default/config-lgsm/armarserver/_default.cfg index 913447e47..3637f469b 100644 --- a/lgsm/config-default/config-lgsm/armarserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/armarserver/_default.cfg @@ -36,6 +36,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -68,7 +71,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/atsserver/_default.cfg b/lgsm/config-default/config-lgsm/atsserver/_default.cfg index 04b795dc5..9d8125a31 100644 --- a/lgsm/config-default/config-lgsm/atsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/atsserver/_default.cfg @@ -28,6 +28,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -60,7 +63,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/avserver/_default.cfg b/lgsm/config-default/config-lgsm/avserver/_default.cfg index 45cd149b2..5777198c8 100644 --- a/lgsm/config-default/config-lgsm/avserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/avserver/_default.cfg @@ -28,6 +28,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -60,7 +63,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/bb2server/_default.cfg b/lgsm/config-default/config-lgsm/bb2server/_default.cfg index 4076878d4..c52c8c540 100644 --- a/lgsm/config-default/config-lgsm/bb2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bb2server/_default.cfg @@ -41,6 +41,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -73,7 +76,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/bbserver/_default.cfg b/lgsm/config-default/config-lgsm/bbserver/_default.cfg index 9932d4ffe..2cfabab9c 100644 --- a/lgsm/config-default/config-lgsm/bbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bbserver/_default.cfg @@ -35,6 +35,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -67,7 +70,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/bdserver/_default.cfg b/lgsm/config-default/config-lgsm/bdserver/_default.cfg index 7fcdb4e1d..674fabb10 100644 --- a/lgsm/config-default/config-lgsm/bdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bdserver/_default.cfg @@ -35,6 +35,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -67,7 +70,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg index d99068522..5bd576b22 100644 --- a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg @@ -28,6 +28,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -60,7 +63,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/bfvserver/_default.cfg b/lgsm/config-default/config-lgsm/bfvserver/_default.cfg index c6e4b8bb7..66c4ef8fc 100644 --- a/lgsm/config-default/config-lgsm/bfvserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bfvserver/_default.cfg @@ -28,6 +28,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -60,7 +63,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg index b17a16f4d..dfe04bcd8 100644 --- a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg @@ -41,6 +41,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -73,7 +76,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/boserver/_default.cfg b/lgsm/config-default/config-lgsm/boserver/_default.cfg index 1ede22c39..d6e2b4f4f 100644 --- a/lgsm/config-default/config-lgsm/boserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/boserver/_default.cfg @@ -33,6 +33,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -65,7 +68,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/bsserver/_default.cfg b/lgsm/config-default/config-lgsm/bsserver/_default.cfg index d01696170..b5f6017c0 100644 --- a/lgsm/config-default/config-lgsm/bsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bsserver/_default.cfg @@ -45,6 +45,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -77,7 +80,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/btlserver/_default.cfg b/lgsm/config-default/config-lgsm/btlserver/_default.cfg index aeaadea9b..b6cf3da34 100644 --- a/lgsm/config-default/config-lgsm/btlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/btlserver/_default.cfg @@ -33,6 +33,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -65,7 +68,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/btserver/_default.cfg b/lgsm/config-default/config-lgsm/btserver/_default.cfg index 636136580..c02b8c6ca 100644 --- a/lgsm/config-default/config-lgsm/btserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/btserver/_default.cfg @@ -28,6 +28,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -60,7 +63,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/ccserver/_default.cfg b/lgsm/config-default/config-lgsm/ccserver/_default.cfg index 1b8617e11..a8cd9f6d2 100644 --- a/lgsm/config-default/config-lgsm/ccserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ccserver/_default.cfg @@ -36,6 +36,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -68,7 +71,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/cdserver/_default.cfg b/lgsm/config-default/config-lgsm/cdserver/_default.cfg index 69e4ee51e..28deeb6e6 100644 --- a/lgsm/config-default/config-lgsm/cdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/cdserver/_default.cfg @@ -28,6 +28,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -60,7 +63,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/ckserver/_default.cfg b/lgsm/config-default/config-lgsm/ckserver/_default.cfg index fe3d56f44..c662f3b04 100644 --- a/lgsm/config-default/config-lgsm/ckserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ckserver/_default.cfg @@ -32,6 +32,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -64,7 +67,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/cmwserver/_default.cfg b/lgsm/config-default/config-lgsm/cmwserver/_default.cfg index d0fe00b0d..29df71d95 100644 --- a/lgsm/config-default/config-lgsm/cmwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/cmwserver/_default.cfg @@ -34,6 +34,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -66,7 +69,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/cod2server/_default.cfg b/lgsm/config-default/config-lgsm/cod2server/_default.cfg index 8f0d889d0..95b76ae1e 100644 --- a/lgsm/config-default/config-lgsm/cod2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod2server/_default.cfg @@ -34,6 +34,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -66,7 +69,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/cod4server/_default.cfg b/lgsm/config-default/config-lgsm/cod4server/_default.cfg index 6fce7fea3..a93237894 100644 --- a/lgsm/config-default/config-lgsm/cod4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod4server/_default.cfg @@ -34,6 +34,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -66,7 +69,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/codserver/_default.cfg b/lgsm/config-default/config-lgsm/codserver/_default.cfg index 9929f2626..6263d79b6 100644 --- a/lgsm/config-default/config-lgsm/codserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codserver/_default.cfg @@ -34,6 +34,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -66,7 +69,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg index 1719eb8f7..b7c6036b9 100644 --- a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg @@ -34,6 +34,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -66,7 +69,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg index c7169f170..0820475f1 100644 --- a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg @@ -34,6 +34,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -66,7 +69,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/colserver/_default.cfg b/lgsm/config-default/config-lgsm/colserver/_default.cfg index 4d2f04cd2..63182f515 100644 --- a/lgsm/config-default/config-lgsm/colserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/colserver/_default.cfg @@ -29,6 +29,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -61,7 +64,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/csczserver/_default.cfg b/lgsm/config-default/config-lgsm/csczserver/_default.cfg index a3f49922b..11d0da197 100644 --- a/lgsm/config-default/config-lgsm/csczserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csczserver/_default.cfg @@ -35,6 +35,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -67,7 +70,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg index f9d0acf1a..5efdd4942 100644 --- a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg @@ -72,6 +72,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -104,7 +107,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/csserver/_default.cfg b/lgsm/config-default/config-lgsm/csserver/_default.cfg index 87a132f3d..2e53616bd 100644 --- a/lgsm/config-default/config-lgsm/csserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csserver/_default.cfg @@ -35,6 +35,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -67,7 +70,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/cssserver/_default.cfg b/lgsm/config-default/config-lgsm/cssserver/_default.cfg index 612aeb0f1..1af41c5fe 100644 --- a/lgsm/config-default/config-lgsm/cssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/cssserver/_default.cfg @@ -41,6 +41,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -73,7 +76,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/ctserver/_default.cfg b/lgsm/config-default/config-lgsm/ctserver/_default.cfg index 2c31d5cc6..74bd230c7 100644 --- a/lgsm/config-default/config-lgsm/ctserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ctserver/_default.cfg @@ -28,6 +28,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -60,7 +63,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/dabserver/_default.cfg b/lgsm/config-default/config-lgsm/dabserver/_default.cfg index 84ea667e4..62e3acf99 100644 --- a/lgsm/config-default/config-lgsm/dabserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dabserver/_default.cfg @@ -36,6 +36,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -68,7 +71,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/dayzserver/_default.cfg b/lgsm/config-default/config-lgsm/dayzserver/_default.cfg index 01eb4509e..ed9e8783c 100644 --- a/lgsm/config-default/config-lgsm/dayzserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dayzserver/_default.cfg @@ -47,6 +47,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -79,7 +82,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/dmcserver/_default.cfg b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg index f46fe5025..5f56a842c 100644 --- a/lgsm/config-default/config-lgsm/dmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg @@ -35,6 +35,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -67,7 +70,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/dodrserver/_default.cfg b/lgsm/config-default/config-lgsm/dodrserver/_default.cfg index d692fdfa7..555a1a007 100644 --- a/lgsm/config-default/config-lgsm/dodrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodrserver/_default.cfg @@ -34,6 +34,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -66,7 +69,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/dodserver/_default.cfg b/lgsm/config-default/config-lgsm/dodserver/_default.cfg index b2940a658..61700d621 100644 --- a/lgsm/config-default/config-lgsm/dodserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodserver/_default.cfg @@ -35,6 +35,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -67,7 +70,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/dodsserver/_default.cfg b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg index 9ff0cfa96..390f87b70 100644 --- a/lgsm/config-default/config-lgsm/dodsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg @@ -36,6 +36,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -68,7 +71,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/doiserver/_default.cfg b/lgsm/config-default/config-lgsm/doiserver/_default.cfg index 1580d58b2..6aa10ee9b 100644 --- a/lgsm/config-default/config-lgsm/doiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/doiserver/_default.cfg @@ -37,6 +37,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -69,7 +72,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/dstserver/_default.cfg b/lgsm/config-default/config-lgsm/dstserver/_default.cfg index 4677162c3..d757ea732 100644 --- a/lgsm/config-default/config-lgsm/dstserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dstserver/_default.cfg @@ -38,6 +38,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -70,7 +73,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/dysserver/_default.cfg b/lgsm/config-default/config-lgsm/dysserver/_default.cfg index 907482a36..eb1861c7d 100644 --- a/lgsm/config-default/config-lgsm/dysserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dysserver/_default.cfg @@ -41,6 +41,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -73,7 +76,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg index ae4bfa681..470b43d06 100644 --- a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg @@ -28,6 +28,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -60,7 +63,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/emserver/_default.cfg b/lgsm/config-default/config-lgsm/emserver/_default.cfg index 33fb4f849..1610d0816 100644 --- a/lgsm/config-default/config-lgsm/emserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/emserver/_default.cfg @@ -41,6 +41,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -73,7 +76,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/etlserver/_default.cfg b/lgsm/config-default/config-lgsm/etlserver/_default.cfg index 034f29c5d..18d6d302f 100644 --- a/lgsm/config-default/config-lgsm/etlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/etlserver/_default.cfg @@ -28,6 +28,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -60,7 +63,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/ets2server/_default.cfg b/lgsm/config-default/config-lgsm/ets2server/_default.cfg index 215ab2b41..24462bc45 100644 --- a/lgsm/config-default/config-lgsm/ets2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ets2server/_default.cfg @@ -28,6 +28,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -60,7 +63,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/fctrserver/_default.cfg b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg index 6b03f9a30..d77284d5e 100644 --- a/lgsm/config-default/config-lgsm/fctrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg @@ -35,6 +35,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -67,7 +70,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/fofserver/_default.cfg b/lgsm/config-default/config-lgsm/fofserver/_default.cfg index 41dae637a..1f7ef0168 100644 --- a/lgsm/config-default/config-lgsm/fofserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/fofserver/_default.cfg @@ -36,6 +36,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -68,7 +71,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg index b170c3436..869628e8c 100644 --- a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg @@ -48,6 +48,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -80,7 +83,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/hcuserver/_default.cfg b/lgsm/config-default/config-lgsm/hcuserver/_default.cfg index 00b0b30c7..225482c69 100644 --- a/lgsm/config-default/config-lgsm/hcuserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hcuserver/_default.cfg @@ -43,6 +43,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -75,7 +78,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg index 8bbf8fdec..cdbbfb168 100644 --- a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg @@ -36,6 +36,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -68,7 +71,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/hldmserver/_default.cfg b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg index f78e1542b..f69d56c34 100644 --- a/lgsm/config-default/config-lgsm/hldmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg @@ -35,6 +35,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -67,7 +70,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg index fd854b0c2..0baf4f955 100644 --- a/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg @@ -36,6 +36,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -68,7 +71,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/hwserver/_default.cfg b/lgsm/config-default/config-lgsm/hwserver/_default.cfg index 853a52078..ea18f00cf 100644 --- a/lgsm/config-default/config-lgsm/hwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hwserver/_default.cfg @@ -46,6 +46,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -78,7 +81,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/insserver/_default.cfg b/lgsm/config-default/config-lgsm/insserver/_default.cfg index 69d095881..b41fb2491 100644 --- a/lgsm/config-default/config-lgsm/insserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/insserver/_default.cfg @@ -42,6 +42,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -74,7 +77,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/inssserver/_default.cfg b/lgsm/config-default/config-lgsm/inssserver/_default.cfg index 117ddbff8..9c23bffa0 100644 --- a/lgsm/config-default/config-lgsm/inssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/inssserver/_default.cfg @@ -45,6 +45,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -77,7 +80,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/iosserver/_default.cfg b/lgsm/config-default/config-lgsm/iosserver/_default.cfg index 365a3dee2..bcc35e483 100644 --- a/lgsm/config-default/config-lgsm/iosserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/iosserver/_default.cfg @@ -36,6 +36,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -68,7 +71,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/jc2server/_default.cfg b/lgsm/config-default/config-lgsm/jc2server/_default.cfg index 69bc8018b..caa40d93a 100644 --- a/lgsm/config-default/config-lgsm/jc2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc2server/_default.cfg @@ -28,6 +28,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -60,7 +63,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/jc3server/_default.cfg b/lgsm/config-default/config-lgsm/jc3server/_default.cfg index 872541961..9c902f476 100644 --- a/lgsm/config-default/config-lgsm/jc3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc3server/_default.cfg @@ -28,6 +28,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -60,7 +63,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/jk2server/_default.cfg b/lgsm/config-default/config-lgsm/jk2server/_default.cfg index 4313daa58..4d49e4e7e 100644 --- a/lgsm/config-default/config-lgsm/jk2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jk2server/_default.cfg @@ -37,6 +37,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -69,7 +72,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/kf2server/_default.cfg b/lgsm/config-default/config-lgsm/kf2server/_default.cfg index 88fe360be..9ca4a096c 100644 --- a/lgsm/config-default/config-lgsm/kf2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/kf2server/_default.cfg @@ -34,6 +34,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -66,7 +69,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/kfserver/_default.cfg b/lgsm/config-default/config-lgsm/kfserver/_default.cfg index 92cfd258c..4aa128830 100644 --- a/lgsm/config-default/config-lgsm/kfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/kfserver/_default.cfg @@ -40,6 +40,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -72,7 +75,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/l4d2server/_default.cfg b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg index 96c2cc5bc..676a72360 100644 --- a/lgsm/config-default/config-lgsm/l4d2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg @@ -35,6 +35,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -67,7 +70,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/l4dserver/_default.cfg b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg index 2b5a64be6..cf1f641ec 100644 --- a/lgsm/config-default/config-lgsm/l4dserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg @@ -35,6 +35,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -67,7 +70,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/loserver/_default.cfg b/lgsm/config-default/config-lgsm/loserver/_default.cfg index cc2f7b89a..9a2e90a47 100644 --- a/lgsm/config-default/config-lgsm/loserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/loserver/_default.cfg @@ -39,6 +39,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -71,7 +74,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/mcbserver/_default.cfg b/lgsm/config-default/config-lgsm/mcbserver/_default.cfg index c4d9d5455..586575d10 100644 --- a/lgsm/config-default/config-lgsm/mcbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mcbserver/_default.cfg @@ -31,6 +31,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -63,7 +66,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/mcserver/_default.cfg b/lgsm/config-default/config-lgsm/mcserver/_default.cfg index cd2a80849..b6f923ade 100644 --- a/lgsm/config-default/config-lgsm/mcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mcserver/_default.cfg @@ -37,6 +37,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -69,7 +72,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/mhserver/_default.cfg b/lgsm/config-default/config-lgsm/mhserver/_default.cfg index 4be0fab64..846aed06e 100644 --- a/lgsm/config-default/config-lgsm/mhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mhserver/_default.cfg @@ -36,6 +36,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -68,7 +71,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg index cbfbcfb92..a457832cf 100644 --- a/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg @@ -33,6 +33,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -65,7 +68,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/momserver/_default.cfg b/lgsm/config-default/config-lgsm/momserver/_default.cfg index 670e7b3a7..c075067f5 100644 --- a/lgsm/config-default/config-lgsm/momserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/momserver/_default.cfg @@ -33,6 +33,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -65,7 +68,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg index 3af42ea2b..ff40ffa67 100644 --- a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg @@ -31,6 +31,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -63,7 +66,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/ndserver/_default.cfg b/lgsm/config-default/config-lgsm/ndserver/_default.cfg index de3a3aaec..fcf1caffb 100644 --- a/lgsm/config-default/config-lgsm/ndserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ndserver/_default.cfg @@ -36,6 +36,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -68,7 +71,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/necserver/_default.cfg b/lgsm/config-default/config-lgsm/necserver/_default.cfg index 4857107c8..993572b34 100644 --- a/lgsm/config-default/config-lgsm/necserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/necserver/_default.cfg @@ -31,6 +31,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -63,7 +66,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg index e3b56f545..f3b740a3b 100644 --- a/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg @@ -41,6 +41,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -73,7 +76,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg index 2ca53a335..fb4686c1e 100644 --- a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg @@ -43,6 +43,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -75,7 +78,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/ns2server/_default.cfg b/lgsm/config-default/config-lgsm/ns2server/_default.cfg index 3ee3a0514..8cca4da81 100644 --- a/lgsm/config-default/config-lgsm/ns2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2server/_default.cfg @@ -43,6 +43,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -75,7 +78,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/nsserver/_default.cfg b/lgsm/config-default/config-lgsm/nsserver/_default.cfg index 7880222fa..c207a0a10 100644 --- a/lgsm/config-default/config-lgsm/nsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/nsserver/_default.cfg @@ -35,6 +35,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -67,7 +70,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/ohdserver/_default.cfg b/lgsm/config-default/config-lgsm/ohdserver/_default.cfg index 25a418edc..58a42d3b3 100644 --- a/lgsm/config-default/config-lgsm/ohdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ohdserver/_default.cfg @@ -38,6 +38,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -70,7 +73,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/onsetserver/_default.cfg b/lgsm/config-default/config-lgsm/onsetserver/_default.cfg index b25cfb60c..b0f0d00bc 100644 --- a/lgsm/config-default/config-lgsm/onsetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/onsetserver/_default.cfg @@ -28,6 +28,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -60,7 +63,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/opforserver/_default.cfg b/lgsm/config-default/config-lgsm/opforserver/_default.cfg index a0785a4b6..8ba202b14 100644 --- a/lgsm/config-default/config-lgsm/opforserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/opforserver/_default.cfg @@ -35,6 +35,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -67,7 +70,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/pc2server/_default.cfg b/lgsm/config-default/config-lgsm/pc2server/_default.cfg index 1b9a6e6f1..b55447802 100644 --- a/lgsm/config-default/config-lgsm/pc2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/pc2server/_default.cfg @@ -32,6 +32,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -64,7 +67,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/pcserver/_default.cfg b/lgsm/config-default/config-lgsm/pcserver/_default.cfg index 1d4b15394..2c1514488 100644 --- a/lgsm/config-default/config-lgsm/pcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pcserver/_default.cfg @@ -28,6 +28,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -60,7 +63,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/pmcserver/_default.cfg b/lgsm/config-default/config-lgsm/pmcserver/_default.cfg index 430daefbe..57838ad98 100644 --- a/lgsm/config-default/config-lgsm/pmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pmcserver/_default.cfg @@ -35,6 +35,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -67,7 +70,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/psserver/_default.cfg b/lgsm/config-default/config-lgsm/psserver/_default.cfg index 9d8fa9383..143a3349d 100644 --- a/lgsm/config-default/config-lgsm/psserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/psserver/_default.cfg @@ -37,6 +37,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -69,7 +72,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg index 7f8adbf5f..0565f806a 100644 --- a/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg @@ -36,6 +36,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -68,7 +71,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/pvrserver/_default.cfg b/lgsm/config-default/config-lgsm/pvrserver/_default.cfg index 12e089fe0..c84064900 100644 --- a/lgsm/config-default/config-lgsm/pvrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pvrserver/_default.cfg @@ -36,6 +36,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -68,7 +71,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/pzserver/_default.cfg b/lgsm/config-default/config-lgsm/pzserver/_default.cfg index a3a5ac340..5a34c04bc 100644 --- a/lgsm/config-default/config-lgsm/pzserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pzserver/_default.cfg @@ -32,6 +32,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -64,7 +67,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/q2server/_default.cfg b/lgsm/config-default/config-lgsm/q2server/_default.cfg index 0d899df65..b92c36c38 100644 --- a/lgsm/config-default/config-lgsm/q2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/q2server/_default.cfg @@ -33,6 +33,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -65,7 +68,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/q3server/_default.cfg b/lgsm/config-default/config-lgsm/q3server/_default.cfg index e53fb4285..534bf2429 100644 --- a/lgsm/config-default/config-lgsm/q3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/q3server/_default.cfg @@ -33,6 +33,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -65,7 +68,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/qlserver/_default.cfg b/lgsm/config-default/config-lgsm/qlserver/_default.cfg index 3f28329ac..5d5614a02 100644 --- a/lgsm/config-default/config-lgsm/qlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/qlserver/_default.cfg @@ -28,6 +28,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -60,7 +63,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/qwserver/_default.cfg b/lgsm/config-default/config-lgsm/qwserver/_default.cfg index 95dea75f8..63d554f27 100644 --- a/lgsm/config-default/config-lgsm/qwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/qwserver/_default.cfg @@ -32,6 +32,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -64,7 +67,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg index 419825ec1..36845b0a2 100644 --- a/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg @@ -35,6 +35,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -67,7 +70,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/roserver/_default.cfg b/lgsm/config-default/config-lgsm/roserver/_default.cfg index 4617289fd..1a95add2a 100644 --- a/lgsm/config-default/config-lgsm/roserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/roserver/_default.cfg @@ -36,6 +36,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -68,7 +71,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg b/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg index 159b8dfd4..d62dcb048 100644 --- a/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg @@ -33,6 +33,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -65,7 +68,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/rustserver/_default.cfg b/lgsm/config-default/config-lgsm/rustserver/_default.cfg index 9a4bfe147..e04577792 100644 --- a/lgsm/config-default/config-lgsm/rustserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rustserver/_default.cfg @@ -47,6 +47,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -79,7 +82,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/rwserver/_default.cfg b/lgsm/config-default/config-lgsm/rwserver/_default.cfg index c714045ca..9a798c66c 100644 --- a/lgsm/config-default/config-lgsm/rwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rwserver/_default.cfg @@ -28,6 +28,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -60,7 +63,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/sampserver/_default.cfg b/lgsm/config-default/config-lgsm/sampserver/_default.cfg index 448f8c20f..1dbeaaccf 100644 --- a/lgsm/config-default/config-lgsm/sampserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sampserver/_default.cfg @@ -32,6 +32,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -64,7 +67,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg index e5fe5b5d8..a5b1aa9a8 100644 --- a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg @@ -34,6 +34,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -66,7 +69,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/sbserver/_default.cfg b/lgsm/config-default/config-lgsm/sbserver/_default.cfg index 79e447454..6032abe06 100644 --- a/lgsm/config-default/config-lgsm/sbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbserver/_default.cfg @@ -35,6 +35,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -67,7 +70,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/scpslserver/_default.cfg b/lgsm/config-default/config-lgsm/scpslserver/_default.cfg index ad2e2f9d5..f00574bd8 100644 --- a/lgsm/config-default/config-lgsm/scpslserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/scpslserver/_default.cfg @@ -33,6 +33,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -65,7 +68,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg b/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg index 6c7a7b3ca..bb26d6ca6 100644 --- a/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg @@ -33,6 +33,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -65,7 +68,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg index b2c8e00f0..61cd85a8a 100644 --- a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg @@ -31,6 +31,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -63,7 +66,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/sfcserver/_default.cfg b/lgsm/config-default/config-lgsm/sfcserver/_default.cfg index b566de690..40c5a0c18 100644 --- a/lgsm/config-default/config-lgsm/sfcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sfcserver/_default.cfg @@ -36,6 +36,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -68,7 +71,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/sfserver/_default.cfg b/lgsm/config-default/config-lgsm/sfserver/_default.cfg index 46d0ebf88..4beb002f6 100644 --- a/lgsm/config-default/config-lgsm/sfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sfserver/_default.cfg @@ -34,6 +34,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -66,7 +69,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/sof2server/_default.cfg b/lgsm/config-default/config-lgsm/sof2server/_default.cfg index 6169950c0..59fb8373b 100644 --- a/lgsm/config-default/config-lgsm/sof2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/sof2server/_default.cfg @@ -33,6 +33,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -65,7 +68,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/solserver/_default.cfg b/lgsm/config-default/config-lgsm/solserver/_default.cfg index 671dcd429..601018529 100644 --- a/lgsm/config-default/config-lgsm/solserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/solserver/_default.cfg @@ -32,6 +32,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -64,7 +67,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/squadserver/_default.cfg b/lgsm/config-default/config-lgsm/squadserver/_default.cfg index dbaa3c736..424d81f32 100644 --- a/lgsm/config-default/config-lgsm/squadserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/squadserver/_default.cfg @@ -33,6 +33,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -65,7 +68,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/stnserver/_default.cfg b/lgsm/config-default/config-lgsm/stnserver/_default.cfg index 3e5f97c7b..7bf2d7234 100644 --- a/lgsm/config-default/config-lgsm/stnserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/stnserver/_default.cfg @@ -32,6 +32,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -64,7 +67,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/stserver/_default.cfg b/lgsm/config-default/config-lgsm/stserver/_default.cfg index 980c4e045..e245c57c0 100644 --- a/lgsm/config-default/config-lgsm/stserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/stserver/_default.cfg @@ -32,6 +32,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -64,7 +67,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/svenserver/_default.cfg b/lgsm/config-default/config-lgsm/svenserver/_default.cfg index 7f47091e4..11822d1f1 100644 --- a/lgsm/config-default/config-lgsm/svenserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/svenserver/_default.cfg @@ -35,6 +35,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -67,7 +70,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg index 562b0fd9b..0fc6a06b2 100644 --- a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg @@ -35,6 +35,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -67,7 +70,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/tf2server/_default.cfg b/lgsm/config-default/config-lgsm/tf2server/_default.cfg index d7d53928b..7d3164e0e 100644 --- a/lgsm/config-default/config-lgsm/tf2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/tf2server/_default.cfg @@ -41,6 +41,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -73,7 +76,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg index 6709767a9..3334509a1 100644 --- a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg @@ -35,6 +35,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -67,7 +70,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/tiserver/_default.cfg b/lgsm/config-default/config-lgsm/tiserver/_default.cfg index 994a2574a..dd3e1dd90 100644 --- a/lgsm/config-default/config-lgsm/tiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tiserver/_default.cfg @@ -33,6 +33,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -65,7 +68,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/ts3server/_default.cfg b/lgsm/config-default/config-lgsm/ts3server/_default.cfg index dc3e7a3fa..36c0d2bae 100644 --- a/lgsm/config-default/config-lgsm/ts3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ts3server/_default.cfg @@ -28,6 +28,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -60,7 +63,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/tsserver/_default.cfg b/lgsm/config-default/config-lgsm/tsserver/_default.cfg index c9ea3b381..05189f90b 100644 --- a/lgsm/config-default/config-lgsm/tsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tsserver/_default.cfg @@ -35,6 +35,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -67,7 +70,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/tuserver/_default.cfg b/lgsm/config-default/config-lgsm/tuserver/_default.cfg index 551ce95f4..086968e98 100644 --- a/lgsm/config-default/config-lgsm/tuserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tuserver/_default.cfg @@ -38,6 +38,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -70,7 +73,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/twserver/_default.cfg b/lgsm/config-default/config-lgsm/twserver/_default.cfg index d7e84704a..6f9c2adb6 100644 --- a/lgsm/config-default/config-lgsm/twserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/twserver/_default.cfg @@ -35,6 +35,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -67,7 +70,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/untserver/_default.cfg b/lgsm/config-default/config-lgsm/untserver/_default.cfg index b250d3284..e76aefba4 100644 --- a/lgsm/config-default/config-lgsm/untserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/untserver/_default.cfg @@ -42,6 +42,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -74,7 +77,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg index dc5d39fd7..709b9855a 100644 --- a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg @@ -32,6 +32,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -64,7 +67,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/ut3server/_default.cfg b/lgsm/config-default/config-lgsm/ut3server/_default.cfg index 412422257..cdadca663 100644 --- a/lgsm/config-default/config-lgsm/ut3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut3server/_default.cfg @@ -48,6 +48,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -80,7 +83,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/ut99server/_default.cfg b/lgsm/config-default/config-lgsm/ut99server/_default.cfg index 6df4ea539..f4a3d8ecf 100644 --- a/lgsm/config-default/config-lgsm/ut99server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut99server/_default.cfg @@ -32,6 +32,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -64,7 +67,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/utserver/_default.cfg b/lgsm/config-default/config-lgsm/utserver/_default.cfg index 1ae90d9bb..0ffdd821f 100644 --- a/lgsm/config-default/config-lgsm/utserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/utserver/_default.cfg @@ -36,6 +36,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -68,7 +71,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/vhserver/_default.cfg b/lgsm/config-default/config-lgsm/vhserver/_default.cfg index ce90a2b07..084adf50c 100644 --- a/lgsm/config-default/config-lgsm/vhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vhserver/_default.cfg @@ -45,6 +45,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -77,7 +80,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/vintsserver/_default.cfg b/lgsm/config-default/config-lgsm/vintsserver/_default.cfg index 75288012e..1b64ae29d 100644 --- a/lgsm/config-default/config-lgsm/vintsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vintsserver/_default.cfg @@ -32,6 +32,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -64,7 +67,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/vpmcserver/_default.cfg b/lgsm/config-default/config-lgsm/vpmcserver/_default.cfg index 636f23d9a..09d6bf93f 100644 --- a/lgsm/config-default/config-lgsm/vpmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vpmcserver/_default.cfg @@ -35,6 +35,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -67,7 +70,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/vsserver/_default.cfg b/lgsm/config-default/config-lgsm/vsserver/_default.cfg index 257c98963..0195393fd 100644 --- a/lgsm/config-default/config-lgsm/vsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vsserver/_default.cfg @@ -35,6 +35,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -67,7 +70,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/wetserver/_default.cfg b/lgsm/config-default/config-lgsm/wetserver/_default.cfg index 153a2b1c5..4c3738909 100644 --- a/lgsm/config-default/config-lgsm/wetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wetserver/_default.cfg @@ -28,6 +28,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -60,7 +63,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/wfserver/_default.cfg b/lgsm/config-default/config-lgsm/wfserver/_default.cfg index 80fbe2037..80ff4ba96 100644 --- a/lgsm/config-default/config-lgsm/wfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wfserver/_default.cfg @@ -33,6 +33,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -65,7 +68,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/wmcserver/_default.cfg b/lgsm/config-default/config-lgsm/wmcserver/_default.cfg index 82a398363..f38976d6e 100644 --- a/lgsm/config-default/config-lgsm/wmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wmcserver/_default.cfg @@ -35,6 +35,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -67,7 +70,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg index e4ef942d5..5405be85a 100644 --- a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg @@ -72,6 +72,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -104,7 +107,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/zmrserver/_default.cfg b/lgsm/config-default/config-lgsm/zmrserver/_default.cfg index 4de16fd16..1bcd5d4a7 100644 --- a/lgsm/config-default/config-lgsm/zmrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/zmrserver/_default.cfg @@ -36,6 +36,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -68,7 +71,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/config-default/config-lgsm/zpsserver/_default.cfg b/lgsm/config-default/config-lgsm/zpsserver/_default.cfg index 0cb900501..f4497786b 100644 --- a/lgsm/config-default/config-lgsm/zpsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/zpsserver/_default.cfg @@ -41,6 +41,9 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" +# Alert on Start/Stop/Restart +statusalert="off" + # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" discordwebhook="webhook" @@ -73,7 +76,6 @@ pushoveruserkey="userkey" # Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat rocketchatalert="off" rocketchatwebhook="webhook" -rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/data/gameicons/ac-icon.png b/lgsm/data/gameicons/ac-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..fcf39841e5f7b89373652ca2dd8884ff8cdc5a06 GIT binary patch literal 1801 zcmY*ac~H~W7QWejAsd7c!Xj%}0t100>|v3Zu!JSD1Ooxe7O-psgoH&ZL`0ND5s1PA zgi57SK}G}>5P?=f`xHj%gQo(DJfU?#TWY99o_XoKzdGNX`^`D`eD|I|&Y4paAqXO1 zjj;d#0za4+rD2P|Obekoc^7JDG=x0J3FiPX*nrzjLH%`^79150z#&@z6jcE1XhMo# z0FW~Pc%2LYyA=R~{Eo3m9{>;_B1{+{5D1KojS+AJ5`jdakPr$25CVtCK>+ALXbm)Z zdL-ih{rfdf!Qn8VNd<5XG#&(lAQ%!3p#c&JP=G?#$7rD$9?m0IhczXlQD^|c*><+d z+`P6^O&Ayopn;u(bu?OUsJjbVnw(&MKC(FB)HAyh@wt&gy&@eM|gJ@k+yQxbSiS)sn9~2iSND(}V&biifsys{Hg$D2OdgH=G z2ewyR^)U&V&}C-5;GW=(1fu9*Hit9R)t4^KSgvbxrh7+5#vgIEY$syW#{SnrMK){) z2nRvBgw8{UL`3t=pu}vtPcQ)MB%^f)PcAp$U{X{Q)oNat8XOl?s&9G4oT?5??+6Qb zqf?EEx)o*8UYhquL3Ybmh0lm458e04zbwc$Fzz86O>iQ|5@a$_WC~uV&DKSoUpd&Q zv~jRcvbUGRG0VKfj)voWFJ7(PUWJzSO(VN@ZS(8WBSeTKN{k!Ur|lFr-fL;2*iegu z0$OSt!Lmxd;XYTdI$M_B`b0B^CCN%x9V!Y)izyhZ)O;n;sIV#nl+*2 zX=0)$k)%?LD59_kwOSn?f{)eoGAuPTh^OvBZ%u0)w2U7ffc_av)Wuj09iDxxnH7l7 z;|M+P=PKngJq~fkqj*%-PA?n1nXoM$scr&%r+_FQ6e$545WjqDBtE~mnEvkFJE!TD zm6aC-^jyXD=Sf3(<)1dkpFBbNbLYi@eLc-RIK`1erawjEXBjY#kpfDisI3s++SPmA z%hnV1Ll0ZK7p8PL{oKmPs;u6-t>62rCt=l&tOApCYF3!gV`^1Mh0ijBu^FmXnkP>l zymc{pYkct@#%HdTKLaz2K5wrr#3~r%2cCtol)BbfCW7RU{A!YB5l8NiyL~nNIBT{q z2A(VZA)~5jZ3`k_?e~k`)#5sCgX3oy}c%rd067giB;G4VkrWc3Aik1HB z)l}wxXki_$qw)s(=!?@~UChG8w_b%m&x*)hrgv}x>qZpLAUt7Q^6KikLuKWG0r9Pj z%`w#;_e@aT>I($QpM`( z`P)IK%)HG?)?R-1=%C=5S9^<=tz)R6_2WN(E#%H6jg;7blukR?mZ+Yp_ITv2OmHpv z8#ad6@zb}KHlN=5B%eQeydjmlT6=eYr(fCUA7Fzo&qhkf$q$M{-MT()Eo6V#$c5`H zsY*qu%XNPYz97lio`Mfx>CFvuzw(_2_e1uPhkxgNUMq|ydM*1I{1zvnf23CYx9B%- z*$db1<_t{h>Ib9exsBFxb}3}E+FY?a956!2+*TW9_@1DhrV#4uAGNTDZRggAvy2tj zK6X`dH&M_sWBF<@q80kS(4Fmrs$jy^vW|aO- dz+y9*Y*)|!3-0VJY4#KV`~U%OU|(|O{{S{;o_7EM literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/ahl-icon.png b/lgsm/data/gameicons/ahl-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..f4e5cb5350f81161641de88914ba7e229c354d5a GIT binary patch literal 2983 zcmV;Y3t04tP)004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00006 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 literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/ahl2-icon.png b/lgsm/data/gameicons/ahl2-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..04d35d040388534d61e8105973403e2c533cb1c0 GIT binary patch literal 2532 zcmV004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00006 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 literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/arma3-icon.png b/lgsm/data/gameicons/arma3-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..0bb0bc64c7c2f0a43ece0073ff799bf46aebc3ba GIT binary patch literal 954 zcmeAS@N?(olHy`uVBq!ia0vp^3Lwk@BpAX3RW*PVOS+@4BLl<6e(pbstRTr`k04(L zhAK4%hK3dfhF?ITh8GMBr3MTPuM!v-tY$DUh!@P+6=(yLU`q0KcVYP7-hXC4kjGx) z>Fdh=oJ&BEQ+adk*&9IlL!K^-#IJz(^||wE-kAmf4J83*3Un8<{50U(~Bj;MgG#@sJw37d+P$6H!peIOnoJ7YIpKn#o2hKI|FWt}YonvjakVi> z%3QM(*%+xg?b7Kar?743)R-K#TV=D{UmtCm5$>HGJMr3v>?{9yZ~b3+GB07Kk8_PS z&x!BGn)Py_X@5GO{QF?{^Y^!gw7~U`_e}1aVy?^XwD;=Q$uFPPEVsF{>%QKuWsdfy zp4O97cBJ?5MB0D&a=ibr%IVK}{NubpfrReo=o z{&%LCe}6{an$D-i?zBYB!es5w&)4);#qKNL_oz{)OHJ%DpZ?mL%y-W{-nY0la`W$i zy=@Z@i;BhmKe?1WdUgG#*sg7D`p;%+Nh;4tV!L#T^nQ`H@m3x2f{iTy1|Nh09+Vv}!Rem<|deh$<`0`CT zPv+4DM?#(leOFKyudNOII{9MEvSqXX9+h6aTKj9o%g*)ork}&@c5lnI`B=R9c=NT5 zk*j#0O)@{Vb%k}wre6xS@A7!-e_emv=4E|P)O}yOK!O9qFR!n+^Y_$!Y(C~L$Z$-; z@jz{t%?-z()fmf7)K-_uPgd*m!W_sx7s@M8(BCv-)C>0J8vtYKdz^NlIc# zs#S7PDv)9@GB7gMH8jvQGz~E_wlXxdGPTq;Ft9Q(V0yE$8%0BIeoAIqC5i?kkOmVA Wh=wD-ZUZwG1B0ilpUXO@geCw^O`j_O literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/armar-icon.png b/lgsm/data/gameicons/armar-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ea79ba0885fc86e817240157a80e72d5ada7dd1c GIT binary patch literal 722 zcmeAS@N?(olHy`uVBq!ia0vp^3Lwk@BpAX3RW*PVOS+@4BLl<6e(pbstRTr`k04(L zhAK4%hK3dfhF?ITh8GMBr3MTPuM!v-tY$DUh!@P+6=(yLU`q0KcVYP7-hXC4kjGx) z>Fdh=oJ&BEQ+adk*&7TDjJG^p978Nlzn#1{D>P7`b^px0-*=i%*JjzeVbX$#=p|bO z&ip!=`2C~^S3;Ij{;Qi`1GN@=?X22z_3!;? z<2dh0zZ}nd)bC`RAsC^1O6pkP)8lA2a-E<7rz$zoBcDC4`kaxI(Cr_(*2u07|r zPMUBaD|O=1AeG#IQYNn+_l2}QjWwMmzE5;Tg<`ght=a?4p;f*)z0%LrI&_2)yx zs%E`dn>CBSyf_;qrLy+u`t#@cVtt=J~eaBfwCb5IevIp+$Iohr1GQ&-#gY)x=E>n&f$v%r2 zS=hN5nRWaO?=Z|Zv0gco>wzD8i)XM~flia-7lw_hcNMpt-F(g1W{Z2lo}&^!nA=3Z zo!usP@jEc$RZCnWN>UO_QmvAUQh^kMk%5u1uAzahp=pSbv6Z2rm8qq+fq|8Q0n?j} n-6$Gz^HVa@Dp52Tfi##{Kr|frbsL!A7#KWV{an^LB{Ts5ag!e3 literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/ats-icon.png b/lgsm/data/gameicons/ats-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..6495b10737417b00113e735c641e9e5c7a62f2f5 GIT binary patch literal 2037 zcmY*ac{mhm7k_6nW*F{JlPpCjS!#$dElg%)H`Z!OWNd>Xj4U&uMVc5UiHzkYZEm<^ zxyhEOF;tdhOZIg6BzK6!%$=U^ulvV&f6rNd=bYz#&U4OniqlaHS{V%hz}VW5TqUUf zOQd0vmsHGtB>{LK(UAy1MY_!T8N@Fq&BoOcfViCiBwhhvO=3#?0ssRKz^o4dgd702 zgy+?{90UNmL2+;=yVyG5l(xd)FbEPE&5SyAnuxXV+tCw{EWe_@Se(SM_HZ(Vl#foy>A^@BQ$;KuF6ktt>n3Hq;>#Y04-B!4e(ieZOQv8A*K{km(L&VOGVts?fEx2XzTo#*KUSHJS(cL}qadk~B60cmjn*3F` z;supH2LmM#xKL412!V=G(k}sGRkYsG-p*jfp7x-stLpJ`xb)ET>mt!rD6|QHAx&%- zfK8+1d(oKA?`zdHHRLR@o~|KiAk{lR1M_1yUX5&g9*_FJMaEseLX*VP(aXeA0N6E09~P>PngUX zN$GXD#dk3Z_v+g`ju05p7h*%B1J7KI2(|0#xi~2L{>sRx%0$1>`b;17Q~*rMnL_dP zqt!M%6MXw}x2|^O$I83J*!sAO)pNspRM0eS-Jcsv*V)&T;*xsAGxPJavtO5c+66v{ zO=Tg+8>&mHii-Z=rd@%TVZgl?B)0ydV!KgLfsJEv-tLj<)z1)hY<$5Njk00KR z2@Cc-=6NkAWpZjBgTd_Bv19Mvy{sr>nq*cXzV=5+^!kw2Dv5%OvUMaQXVAZ4QJPO# zZw4geylhJ%x|?-qyQ7Y~du(bHCa%Pog?%<$ITX`*CoLAOfmgnD+ejTH7m~Uu&0MJ~ z`QEsvpS2y7YGzgRK8KhhwV6jf*XxV>z54-TerwizQK_u9*SZ{ZRQ8kKgex1gU7N#iw{y9qo`U7tT-DaKllP&hV3O4{2U}7Ol1^?_PlmWl z+gBcB0$aL~5w4UXp(uc>)6}pHR9|UXO<| zFTv|y+~ohGFrdFri2`eX4JRro{h1qZx+BuIz2D0s?UObC zm@e!I%Pr(SYvyLXgSx{3Q`*y`Pj+_^wit~w#|>(&?<>TynMZKk zOw^6tg3jKlQO`#a26e285wH4I=F#i9h=^LnPMwt9S1UUYEZ8*-N4;y9wvRm6aeH)& zp~a_W8xVkf_`4D(((?&_U)ibZ;N@JC6^jfn^NknP@}rB^@rdCMv# z+r26cn;z7hb6fvBX10_wzqn=~%PW$x+Nr4-AIVfvDHs^~tF$6I-i@F6w5XtDWg(_c zp!&)ZlG{@8fg$Jp=51gwkEcQ{I9t6i)Ke2LESMQO(9-E-dn0DojfTzd!dT;NPTuxb zfyXX5^V$464M7WsS&w=%ppVQ5ssh!Y-b0K3Bwa?znY>p!tPtZrT0nn(*}F7hp20C7 z8(PEi8Bt$nmrOZo@xs!^j}Jr~4uoatJs7=iqgCFQ2$s<-9QrO z`+ipQ=*V-Q=>rRIKWKOvcbI>gi*NeCJ(R-}zG#2U^?0}>vV48*`C+Ps@%o}~u_5kC zZ8B5AOZazSVZx%nx2KEPayYTkv`ggC|2Cj-uY7(@!l9^$sVe%(Nz>N-q1$!!enxAV z$GUY7b#Cfh}Y=?ibr3*konVQ1T3=Ih;=6ZNM0gs3Nuj0mk2xr6m=mD|+AsGE47@Pf{(7HA( Qxyb<7lATCpM|>{*3s-`Tg8%>k literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/av-icon.png b/lgsm/data/gameicons/av-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..4bce455adcc406311e72d4ed220da36f7f567079 GIT binary patch literal 1983 zcmY+DX;hQv633tS%?2R^kR{4?;gBF<2?>Y-1q4knxw5ZeF(!}&kPry*#eji?MNJS; z_8xPb`h)gp*Xu~h+=+9PsZDsEV5_1B`lp!*^bl)2UEeVSZ17M)eWKn?m`k2X%iv*z96##W501Jka`V9cv z=>WXt0}$8>04cxyVr&oq@Ryi~1Qu-QFc<_w02l_q5Nv|M;2_8t03$RCK)}cdi$OtX z0Pq;d@UfK%&Kd_|lj~&2g9jC(8ssm%@b5Z4rUOjcej)E`hENAv8*`C&iI~BLJ}4%6QF6(-=>? z^L0CyejaNr66j>9x;%benXI|GxV5&dVV6>xnQV#zWD}G>$%MDgWu#HPJpV{3P827z z%ZqcW%Zn(sR{Fy9CzrYqK4%-3Er@5=?MAffLLwIJV2<;&HD$YzN>ev>X{EJ0GBvWy z%I*1`^;O*PU`rT~OmR-;xFB2e2C1-P*Y*}!=Kcb~eif1{O4d{%^|htVm5So@I7cIl z9TDq9Ky7ecc|cRBRpyi{Bo(B1li_CG(5mSm@=F>F1vv@uAyX}+79`4vBN%XL^ zi2i42jV$?OiL|3sPIt1~k`&XNFFIHtJgSl_lA_jlxb|w~)si%8b3&U^e5p?T?VjR; zs;uwoDhJfa$NN{>w+Yke)G9tV+Rb@+d3j7h$oRVa8JjmTmwp7-;tdH-!HHzyX7T10 z#x7@7lMewvUFI;u68y(A`Fx=;BSR<_h%#rNy?p+9Mlky-b7poXBjY&?hl{cOuo!ET zgg{}=0)Yh-%P5FNc*dOY6Rr33^hm0=hbMI^Ge>5SS3hwp*0NC=UY z=(pW8(u*Q>*b+=sAvQKxPG=AkLV0)SG>7*OXiw^gs=Ay0RntF;$FVVN$b}76pVl3` zRB^OHf3~`(yQ%5G@TeCKXTtVP*MPfdvuJPGKele&n!Mh@!a_wv_E|(YVF(1zB^c6# zU3ESzm?`Z`O0w7=i(go4V>*I3KBNj;hU%c@(UE?ln05u!eO zHDh^u0zYy4=H$4y(OIgeJB{jvn!bwnaXg`}icV#Jf2Duq$l$44-4|VlE}rijb;ftW zZz8ZXY$>vKW+Hs(*z4v8=jWSmwAswo-lny}Sgg2|hgdu7-yM4T*7p7A{F3pjFP7iA zM$%9od=Z}y{(Z%@iMmeo_S`QRUvcV0+vz8=7m_FIa5?4V3bNVo<`lgfllA({0PiBQr7?sJ-96Ag z;_jZI37%V*`}mx4{DJgQ(aYSlvxQUdf(vs~$m*v;(KBJ}eqHmUVcD{#!g)7hA0q#$ zq-Jv9$qz-;ipNHS?38RF_S_#H>4CW*!KBlFiy?*Cx+5w`NN;@SMBD7j8N z2X(1iB1N@ZdLPW`KW%QHbpSG3txJIdpikG#1!H2geN4QZ<~6*T2cDvj`z(^ z+XFg3{;6$&+JzcCIVIqzonP(FrT@H|`*0Isl;65#zpym2I6-jo28nd~=6w7q9`EyS zb5rlvw+%Knu@Z8pKl`T)IsYCigFm!)<~+aSwZ3$5K_xqQ&0a+;LrSsXt|x-%_S|Xo zpzDPD(uWH(hhVxz{_lf@KB%)EB&K7dGG!VqBJiHx()}1e!~fL62eZjZw0^u;jOB+& z8qZrdH@^nE2xhCj8_<@PbQ|Y@7QKEI=-q=o#I3*o)^Obv1&gZ?3KXKiOu5J)z=!VR z>&2jZG5ivId;=MbK)(PFIz5n1hkqTY{u>~b3A4q@zX3j90big013A$(cMJgFu%eiK I8~Ek_1Nwjlr2qf` literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/bb-icon.png b/lgsm/data/gameicons/bb-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..2c6b7ec88310b2fed7a1e0be13ea9758f007ff3e GIT binary patch literal 2837 zcmV+w3+nWVP)004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00006 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 literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/bb2-icon.png b/lgsm/data/gameicons/bb2-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..56716418c160e2be5713b2440d6f2abda66fde1e GIT binary patch literal 2082 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 literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/bo-icon.png b/lgsm/data/gameicons/bo-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..53f5577d8d99b4e01270e07e377ca50788311c2f GIT binary patch literal 2030 zcmY*ac|6p67ykZc{mqP7Ff$DX!(hl@W*Ej?>oB$&B$Y}el_FHva#7uKwU;cRRo$eL z=-Seygk;|ukuGm3GD+DACFPyo_pkfMInP->&-t7`p3gbQeZAd@cuhP2favMr>Ze53 zPlJ(4?|S`2qY_YI&N62JO3n}#L(o5)p&ouR01}M=IG6&!g0gh*9RRUB0N!r~Kzt5> zWxFp`t+E3E34B-jOV@h&Q&~(D21NiE2!%sq@c<1_NGt}0#-ULtG9HJ90UkruW~^E1 zqp!vOxeXFv2oOpc03;qJ0p$NefIvV)1^gI8T|lO>;fITC8{@@XXXQ<^Tj9 zs7SD+c7nw`(z=gi*^T43k$G)uf=;@yi!FT05%rkb_44hOEd9P1$xdsSK^RnkirOef z{2A?#LpNt4F$^rM4H1n9h$)A);hNeiD(C(*`7mNtAdD@&eL zu!hzTu6u`;eI3c%$w4wRGd=qD-Q3)l+S^=sJ; zzaD9*Z_2-Zv+(8}O-=3XRDCjx*9C}bn&`ywlM2NcjKh(LswxDPHEY(r9(Gww}RX#pQQy-@Q%c_o|EhVO6QRZXBKO=eye0M%+jhKcm>1Lztr5 zB{^9a&Ya4$#*$N#5C6VDnaj0c!r&2(KR|SLl}M9db|c2(DAAyk=w<~`GF8l+0bC06 zT5;BLw0$*3*o+q&pm1CW?!Y@d#0r~mwylI;p5Seo2%-+M{SCk=M+hFl)-_mR6qzHF zc`q$3eb}LSRw-m?%L;ebrF`tn6J>&p@svri3Oq#>$1dC7(XZ6`xTmYLzo^ZuCnA8l zhJl?L4mz?aCp^{i!}%AsA63fQwmpAv@oGpxR;rc zut2KZsau{xlc}p4luD`t(l^@>C=KRmXUbY96R!N~aB046$!?NR%Q)a{;UPg$ohj)bhwzCmOX_4)=0{%$L$lf7^uysmTutUHc^ zk#I4GoHEn(ah*)1#xylG=|;~Z^&g$$bUY6 z3v)eoEfu-ljfM;BOk^z&pSy$Ay)()xQ(4Xa+r?ruwXaIv!a!CghYx+7$NMK*cgE;pV(T{;tJA?a@u zL}y1A`O??aRBT`8r{6sjJ$Wzk#p;U6s;V19mm@1GzJ*6bw6@K2YBp-rj60RPMEw>$ zU!O7W=uuc$eAl$FIOJVq*90$(1MfzhOPj3Dyhj?wgAZ54*_`=9Shf2G&W&@+<-u z-RfF`iEQsE9-*U2YhdGseXka3zP(gL_=NqoAb&!j3(-uK5B+;`Me@OC`j09{mZn0J zh8L~`5F!d7%zBf%ggN5w=62+$I|hqAdh~nKQVF$b^%QDIbiz6N*q4a-hSNcN%stY&jo%$4 znWVWg_~T(2e<$R|x9#*$;U`D=!s*Nn6X~yT7@rC{ZOEI4> x7TTKfcw!z8@uB48zX*}hTX$|x_!mL&lVBzKKcQh^K>3UT@RWMH7E3lK{}=Hf9rOSI literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/bs-icon.png b/lgsm/data/gameicons/bs-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..712f8d43012a97b4fbfd720e22a1822046a54f41 GIT binary patch literal 1916 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 bQ6B{{>i-MQzP;u7$pNsM(v173&1(4*av`BP literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/btl-icon.png b/lgsm/data/gameicons/btl-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..615ba7cb9aa4528ef3d2c5351b2e1a170c1e73bc GIT binary patch literal 2334 zcmV+(3E}pMP)004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00006 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 uLgbZ>Oz;TM6rG* zaEEkO%DyT^H#1Cl-k>(r=R8va*IQ&-fAia%jN9Z|Px9~%|n`_V|% zh$h)4E<}mtRfa^D?!l2~O4QtOiLO931JODTB@HSV7TVWc%^)H>iHTBpUz&BI36|+atN8bml8Q}r{!pMCkAZ-pPc-g9Gzp6M2};D&j$DB>N+15< za3Coa9S@D+IYC||vK03$wG{vg-Iu&bB{HCYY&_> zFU+Zugk&{HqmEQue$WCxlb%2J{8Fhf^LeMC`?xras#ye^EgAav!C6tg@T~AaQN0>7lZ0L?-;PI!V2H*)7j_ zkt|vJC&y)sUtMT+o%acc)Cjob6vT19c+CCK7|2OG<(ah!R{u)#>57kfaF8&Tzh|#J zhGBoJm-#YVp{ll4y}5V&tQNKN5pD8|U5h$wC=NW3ofx|k0y~Okv8p405a~EvRZEl^ z6eJvE%A%W8bcoh7;;8og{!PM+#l zYJoxTS?1g&wjI?El;4;p#7=GYaEjVypO&NAVt@B!<<$(|At~X>4ZcIUQZ>offAm|% z3h8}TnJgI5h+8hWh1U%7cMHt0(&-n63Iij5%&ZGHMg%fbjcujq+((}EJ~phEasfIf ztu~MJAk^*~b;VkzJb()s!>y*(hH!(`5L!o}&ijt5L0w(nm$%cd!^q0YU>OjxxYaWP z4*gqF7XrD@RMofkooc(ui0+Wt+e!~`F{?0q$6q>PuBORG#zo9Nbr+s^L7|{ySEtZw zGbQ)}mfnG^6yVMho6Vkb^$UkuF9$cKl1})LnAtrqv3dmM*mTPX+6}5qeAa{Z^I=CApC&mXX=f;MDl>eOuy{phxoPhyFOsF(#kEixHBw z_X4_p+Mqcn3u2J&f15Ettm2)=GPp9JTz!Rt=t8W0F%(Kx@oN7B?Z&HaWrM!8QkdsDR7y|up375Ue9lXqbo8G?TFghV6m(2Q~a zzR$u2>S(odRFrsp@qAZ|fUDw7QtV%aX_)ur%JvOC`P||u8r*c5ADOJrh>-D74Dm&+ zjI3>^aZXlv7}NU=?;i)pL_`nk=NqqWwbwb$*eao|4j>)C$|~My<(Ah2-8VEm2Gc9$Tw1+fbuQf{GCAY33g_>J2Gnf>FtHGQ`DHz zP>DCW*x~|n5a3_8*%f!qOv$PGHiz?mt_wcWs|2AbID$ala2hE17PU+~0PZ%9;?OCS zn!Bj4!07_qowlIv4r)CBd3`g;1VbyxlNC~$hq(=X8T*Dc-VR= z{UH9Q5)5!h+$`C`asZwoA?2K_6y}-LTH5t$y z^OkQv>Q=cj|JYOWum}3Boi_pK^{|VIjQqAfp!H+VFKL8A-HO0Jb_Z8C)W$W`*E{r* z#l`EFb`3xwP-r70!U*}RGt$%oVQzsoIfg)3AP_kJ)-V54pa=P0p+)`wf{Ceu<8A>U M*bs65vG$7pFA`tQga7~l literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/cd-icon.png b/lgsm/data/gameicons/cd-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..dddd49f7c40781aa78c47fbbdb28e6d889e41c2a GIT binary patch literal 2819 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 Tt|?&kn>i?BOJt#uYs7y6+R9E? literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/ck-icon.png b/lgsm/data/gameicons/ck-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..a22d81480c1fcb53f9e432919ce47d9a98a0a56f GIT binary patch literal 2828 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 literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/cod-icon.png b/lgsm/data/gameicons/cod-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..7af55bf2c24d0627de8dfe4b41fc758d0efe028c GIT binary patch literal 2050 zcmY+FXH*l|62~v;g%~&+5NtH*#Xv$81SCixw1g0figa~xeM(thaOwMyvPw;Y$f}6a zbU}&~1tb_s2t*K3K{`l?f{5)cAo${WpZ3GOzjJ5qf6mM~GxuhCd%EB-yD$I%oGX>W zkWu}|LP2Fa<#tw&46u`q9*zLi{vCh~nJIY*fH)!mZ-W7_ zDFR^Uxsr!;TL2(i-tJ6i27{rYp^3#}F=z}Pr+`JvV=(gaI6Ml4l>v=L$>XpXECP*& z$>UHvcE~QGwKUaz7+wfCLJlGag8~Q?3WGo)01Ac3GJwFK2p9~4$KxOnfIz@x2>>|& zg~8x(nGe|8Tg%A+pz`tPu4 zO&$_IX0hlPw5%>LKlQYPleR2*VW6*zLLjjiJQ9g&ZLFRi6BculhX-19bkqzDb)6`7 zP+4IB@CxIHpFT7;RO1w6T3DE1usE4jaR->65lxPDUggFQiJSabP6h^hn7%G5DvBwo zzljC}!^6GPlfyGp12a>-v(w!(6MTt8xFQuB8mo}awet&-`uiSQsbge3%Z&l3nSh9O7TF=fUvr+=dY{0R09KL4lkMI=fHnb!{wx1!Jy{NCP z{Lk-69&S`edk0$^%Y#-HC7jF82l$d1@ygP(Vs661oJhJf;veADEvWD6YIrmIA|%Mq zl6=7F5XFK-HrCe;^zk_2WK~tpo172|dt1`e;!lPjH_+8Yqi}vqkA7kE(9?Fw;@Dr+ zrK&2*NF;o}wmOMq;_v6_$8tS>%q{9v2!lbjwKLAR6n)g6&hKb8G2BlwGeW?zNR%9} zI4QR<#-HgO7{~}b=2BP`bN6mh0E?A%Dfz?+uZrp%=}Lb`*Pq<{y!?U`CW~58eYsau zeK9_g$#g&cbKv6ANbIj69Bz7Lbpc;+XHhypHZ=L!+;+-}mp|Gcv_1Kl(G2=0e$i2D*G?2V|_Phci-wQBXu{H6#qalFb;zmEy>> z5-Itx{h7Xd+KJ}7pDa#XymWB&JX`c3on2eRCM~*egad7Au7K}eq^M{{s3MLKT}8LN z-Do$J>fK4ayn2PoGxU77`az3qi|oesKBIS=@mooWl7o_OVmWn<;oMU#Gl$EBXUGBf zTrI8{TX#o#)Rza2+&e8Ta7f*&DZf`$;HrWeb9bXF_lBWN1uEksDV(yxkEqZc*tVtq zBMOIgHS#GF`TMPL>X#zyOjycf_8S<7J%uTUMVm)h}ymlCyVy6?229^DX#N~bMXl;ECzGf??7vLh_t@vjYk9BF;h=7z>$?{&?`O&wdSf0tFs))gR*IrsQPt~8@A_%nQcCWU6X~H!hXe}#U5jQ;= zkFq%Xwq^7B;I*jciHp;$>s^5Q#d~6GG~qiGf9UfEExQ%-_Ne&RYLj1Iwe>b%sPm6G z>QHaQ-tt<0wZ2eO(SLDq`Mp$cf)w{;Dq(F!DFfpfXMev{<;L`wxp7BBZQTdy=R>~)`2z^3o^Xb_x&ECq&H!ByWj z-+q4A`Ld#?W4&otl@0W;6&;WH$yY^f-{$*RQRgWgJCbx$E%BT5XGewRe}=SvDiS@rpi9~Nr8q29Gvl+8o6fo1#l35;8ImvNYx^ciu`C-B z)jgYDokNx@q2&~Eob%75P|CWCLmN~fd0Tl>ZnB2%gBEe&ht(vsqI!_`^;#?01EC%3 z>>nE*5*uL?79Al2Fe93gj7^EgrshmDl8vdUjk&cUk!V9CLYC{Y{~`G0U*V@C+5Zrj a{Sc6?{x1-0yq0~?0Ju7PQfdwdr~VHLrE2T| literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/cod2-icon.png b/lgsm/data/gameicons/cod2-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..dfd6ee7de82588901d0d4accf5477ffb11b11b50 GIT binary patch literal 2707 zcmV;E3T*X>P)004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00006 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 KMNUMnLSTXo^c5Na literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/codwaw-icon.png b/lgsm/data/gameicons/codwaw-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..10f06601ddff3f5abfb2ac14cf7e68f1cdfb8066 GIT binary patch literal 2819 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 LF$Ps(=o0l`hlM^N literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/col-icon.png b/lgsm/data/gameicons/col-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..fbd91f9ef1e2c703dc445cd4a86526519d83f2af GIT binary patch literal 2411 zcmZ`(X*k9#Y~f; zma#_Bw5nBG%@}K>rLVD#sJ4V^Cu0}1Uj6ufc<+7AJ%2B0noUd|IF*mj~x@My)z>NIxVZmfTkxgo;!;fdr z4oQ}=0qZT2R>snXc@APU9YJy~j?6GHxG9fu`(VExE`Z(sJHETLgK)v2L>}x?n&6(v zEw6ee`+bvJUkW2K`Wikay(kzjiKmmTXZSl6EU7qNeKM_~hNlI5ETcYV6w}8vCqhgY zinYEOd&qDR(GFJgFLld?hKvtnYU*N;8=CmXQY)vTfnhS7t!4*)A925zFvHVb`$&Bp z6Yjx`UKo5*xOs`~74vz%aJ!U0xxN~oLg`$-b7%Xh^s`N-Ua~*$WWf6RNOc`!N#%I2 zIE&Ak&kzp@_;z>&Db_JiIhgIiT$!8u%bGYnS(qF*x2UnXYKs#`xC?4@7g81XRZ_Jb zC2wbH;y;Wg+HO2$F8ylhk?)#nm}$~8=(j7%C;y-dN3#dxYoJzo>vpM5u-n~$%JXcU zGfhFl;>hmjGC$=OUiLs{@1Lw%XX7janOquLPa2UU3}+i6!DWseoCWviKiebf(v;ic z=vr@5@8|8oq_+F&{fN45xH-$^%BJKMI4g5B`t*o@@%9x_n3K(89)MJuPfdYxkaG!+Od$tzz&H2=kLZ=X$Ac_O@vL1D^r8^kYkY~a{Hq`tR?v%vzx}ZYfh3ap5~7O?h8qt%` z>{0#XSUR1KF3diB*z|egKVpivudihu#W}*1x6C|+6uPobvjfoF#}1CS$v*^xw~#U;hJj|Gw*ZPe+#$cqy~@INL+^Yf3QmhTty7Zr`ZTobYMi zi5klz!XEMX9EZEV%oSJM6Sst)I+R11VcsG2QkvJ=Wes$jg``%^7;O>>7u-gZ)TZXx zqDSk;${?Vg?Z6&LjPg0}TvapQDou@Hj2jK;Z!aHJ)k(S!H-$C6T*rYjH88uW2ke@z zvD$rMp33m6=hr{yT={V}tLwtnbX^i#*enou4X@OUvTtOuyno@jh_0^xV(1jwipx=& zL1;c7^vm=dD(1qdEYSgqwhi#_ad=6i#5$?!FA#is7k|iR?Y*ZNK`|`hm6@GyjGkVe zdj#v0%~F1tBc8?D9g=~3sBj30 z^cRLnM9n9#zsW%;%%Np_CB}ifRdq)N5t(Rt7-Rs`CWyi(&$e*;xd~cl@F8JgvqGU7 zG%7?4B-Y)n3uqZTpY^VJ4Yu^UrJDr2k>?|18YgMWg0>UnIcE9 zl65Xz|LUT`>?j(8IptxGCzpjvOB~41fNQ_9O3B*xRu{2fYv=6RTH0e9K}xX{cSQA% zyrbfOg#pyvq1`rGsk;&%eA$MOC*fcR- zy$@Iu=Q*$o4027x15Fj~pH_$4ZWbF_NQ|>h=+yGEToaNrk+NRQY?|1wv9KK}k1M?O z>l@bM%L3c&sRsJERNQ#68{799nzT-wnYL{<3v3gy38&|0IG;#E`7y?2m7&I@w6%}o zbhrqOHb~*CW6WJhxa^o?#$~ypd}er`?zoSSrQ|;a+pkkK0)M0mu1r8ks;%;eRDKmt z9fHvPNc&#<-jf^=9zZ4I>zGZgBFIeMXvy9l>j^cYwl zaCMBNIxv`%AVm7>Z2GBfpsOM;_x+%S7)`t&4C{+JDKW7e*2w;|@lgdhwt*^)a=q(} zx2qgH_Pp<%adUnOJ|nkGv+*^buh&H-&_tscbRu5i*2;>*xchMJq+LgO#C`U~z$*i0 zkJZI~!tBvz-yZ)k=D2$%MT#6Xy@$J3;(BsE~-Tg#RBfx7_Ek697a9 LcYLi~(6#>p?uSyD0Kh>U7K0Zk zVvpiNf_q0{`R3jy5Q}#JfD108GjOK%Q9rz{O0^5Dl=m z#Q?i|Rl}+)7C8HeSg$yN2L0l1)ZQ7vLyUxTuohc_NlL+#m=^D<1(prT+LMI$Pe2f3 zV?xeF1|vvhVlcv=NJQxZuwMd0`~u1Vrmt^gV5nypU}Ow}AWA@e0R=GprLe-J0Kr5t z863va75nUxdsM!!o1AY1J&wCE2#%lAHfUF}lFNa-RC$sHv6Pn4q8^fk3CZ!VL%wB; zO5O~Uad=ry0bE?bG{Uh%)`7@A4}1o63JWc{tSxlo9?fw(adkFfbz(q?sYjD#EWLTb zGL4|!eKY$R-r~b-VKA)o4y|8cxi`KF(??cRAVp8X?zq(J7K)hX0w;Bi(<@vb?c1Lw zyyyqEv^f5m8MXz1_n_iL38JfKWLmKI@iz|0c-;D2WkXYGP0 z7#P?CsOfr$B)Z6oNx;i#w8KiP%hR2Djt+a!_I*J5`mUGeSU0sSM1h_mkosic^XcnV zP@#@5xrOwkl?kaL=!tyG5=Hxv}BE)Rvo zMgBtU9`1~PY}1kSFL2Rda_o<A=s%2@>?xUU2b3;%gnc`5y^^RC(b0zCVj%G zwRC9)JAJkt zZe=fyo6^aDZ-%C_Qyx!hZ&(lzI0gS|?$2Fg&f~(UM$4hW8Hh!Az!x9x^v-oX$9}Qk zL!Q)R?}Y~utrondyRYd9=e7Myty{+gzko~=w*b-<_l#N zqVL6Dr|{all&+o}OJ-jLK2S0dkLLcpJL#c$d`?`s7+w#T2sscESF^tYd&ET;hN0kT zVrk+7RPDF~yqjGM5MqVgXHjzgt%(W*7{N(%u2y5mDh(oljtt_Pz8Td{Q$l=OTWZ?Y zbkA9?Qj<>*>uCu4`>BhuGXU@q(T<3-iw|<9zzuJG1mW)SY`Q zx63b43V12bm{U2WB5KW!6^0+_Bi7e(PYVM!y0^x(UZV&r0C9mC(_-aORK=WR3P2h{l@fxb+8l%NgZYCnr*{K-$+!E;E7bKZiphnl3Y_s7L803c%{BX6NPpJvdZo{v8V3r~+K&V;+ti zK1p(_^>m^ZRU?yF1xX@h{nIR+cxo^Yz7lQa&X6_NV1J}`{St3$hjY_F-I_F{;Dwyso12SlyTW1yfAc>R{N?k!HG6dIl2f$s&bAR3=$&BQU6axv+h{ITk5apXz5V)@ z+imHIOP>;;jY3jZ#mKpvqhX-J7cQI4U6r?%+U9d+SxJh`r@ze;J3baGDv=|n8jrJt zicJSk+nto9>5giQ1Q;B3~uxp<`)|F%e547YoxD`9wW@Y{BBi*M4( zTB+vky0X)ba07ITYglbh0YyEn)U0tsRY>FI66MDR?Re^{DYuz_k+-OLMdcLrQVHI! zK|QyU@TSFgnm8-cDLQ^8@2N>%<>3&oDxm<8;XY(~F3=;zQdYFI$wL07uYrRcjk}E1 zxT-avJIqUAvqOikDJ-Ny(7)#~Gjpce1PfPnZ{Y^{lY&hGV}k_(=z_X>+9*&PW$21B tG69WE^b9mX&;$fA;rDs}6NrilIu}Cz{{aId2`51Sz*#$DTC51^{{Sl$&?o=^ literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/cscz-icon.png b/lgsm/data/gameicons/cscz-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..490174b30705f8feebca4c6d4cc8423c99a83c06 GIT binary patch literal 2362 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 pO{5wej)KDtJe#=xBk=OMxg} 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 literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/dmc-icon.png b/lgsm/data/gameicons/dmc-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..0d3dad7099550acc5267fa6b6e655a92d2252106 GIT binary patch literal 2774 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 G_xgW)bdTHs literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/em-icon.png b/lgsm/data/gameicons/em-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..2c98840b272e90dee3fe5b69e6aa02745b3da947 GIT binary patch literal 2442 zcmZ`*dpy&7A78Gk9OfwfNX-hzJj%vmNZBuQS)?tO%q7PvF_#>-Gv#tz5@wyl$Wt?# zmY2iGsaYtF%QKbRiGw8f_;p$%b`T9`J^wv_JfF|&^L>B6pU><4&*%2~=A1p_^35*& zT`(Bz8#h-ciUJM48eBgco z+Itu*9s`4Y2!_GzN?@>kS2<1OAMS1(i$BU$KqFI$|hT3jM51%S2=MZs5=D{7gs`|!{ z=CmADeoAzGaWU(4S|&Tf5LDTT+HJ&E&A{m~OhA@WA5fuj&_?QVGBB{te+`?blT<=| z+*IAvC*jIUk;#AYZ_nWSe(M2d@hpfzB>%__6$poSq43Z!b#g5WL8W)?Wm|?gKD+VKO zSq$~F1~k$ie*BVBU?c|6#;E(xjZv8h9y@pTJX$sA7olb%@Y+)B_#BQB1MF&_>LW*v z1U|V+p!WijI6LI^Piajc_<5LKu>XxQf?A(t3cr*(W2C$f&5Grns=nm*?f{vV3RdfpF`)0v}1C z=ZVpYi6|kpWznBrXtdt@@zlAqHfpU{@z2>1gH**cHRY44Ha9n~tt~jLzNT5UeCA=r zK!+{Fx!pb2oVb`G>$Mpi9K1P&_W)>=moZuS*eT|Dx;Ds(eHc_dgomhfzSkb&+TvvP ztTfJ!R7I(JEE0`GiTG?Hxu>TGBW@6hT*xZ($NP78JoGXnbczAB?+T$th_RA%0EM%+ z|1#)#(vQw(QzfOPrRLqv722GjI}iTN=0ZDB1GobkY9zEf{6S`jb)P4?2(krlx}j|$ z@aBsbFPtluo*%v?m&^JK3k#(Q{_tNQ1{aErjV&T&QOvx_0-p}d-^aCR9EicEVFO7n&ENqNBg_vja3Tp`z}&waL`hZ+#G;Wj{b0rjpQY_s1kbE!Wq@ z`TNg$tDQ69M+m8+sBx;lzw)p5!(Q5|uX=cT`c@Aq8uqt8UdC|R+S=rDc{VcT^%dL< z{()jZ9|}9B&(Z^r-nOx}Ht70ks}r*?Tk}9TPM=Cg^M$%%o@wr@EAJRw_HR@{5_bft z$)>O*mSX1$G8Z~`?i>cop#WheuwdW15!%gQT11fRbmP9G0VNzxC*W(gm(La^L`Fu2 zhlkVYlGpV#o2a*+<16zKW<{jbB&jeK>J!w}jY#4JD~XfIi68!~s&KibR30_)l(D(7 zVhCSdThqJRL6tNu3=9n9=zPb-GA;dFv+YCsxkPwmM8wmTVSiGUq9nAQnVFg1yEYw| z>nlUP9T+x+douAvFQtD40lM9J`|O&CQuX(jWRyw;yZsMm@X3(-p>!6%kwgO zwzVOt{;wo1yv2&2)SgEF2e2?V|5Iy78}utCypM1Xqf1Ne6HWPCXuV}}aZNpA$EWpo zFABf5hCWS$|M%3Cp<97-MSWvq7}FMyf1l7Sq<&3sY^-doHKn<^dH0_)9INuj*vpZT z(gFTy3W@I}8uKV{qL+5Y+Jq`>d&^yM{fJEm_*%1*87FTH-Zbh(e=bvpMqz% zT1`z}^G+3>EBfK4xg}{ozsUT?W}Ai9)@Ip-hKEF-{ekj^R|k1TSmx5g!qMNAm3Av%5ta_s>xLeXU&T4^qN2hx;|B2 zb}91D?d@RQhz^KnS=rm?A>NFQDI@)g+h*Jc_vjkO8dRF@dSYLE3cQKYkgRM>cVv5V z@b#^&Wkx&8*%Uhi&E(0{xgy_#sq!VoUJVl{o}Z=&T&Q(K3xTr|rx~QH|E%6QAX(ui zua2%wT=PU9)6aKI{V0|0M5P;^SIj+?+LR!DBOMcU>FUwg152PYyuKa|RPQw`K!A#C z{nBV?*-*HUXNre9rZFCa{-UU3cRiRfm4oYBUl#8j&f@`jhyKXXifpRA3)wzVJ$tGV z0oF=%iC71RURxWn3IXQ!djgN$Kow+;Q2I4CgO@K&dN%8>c+v%XG$3cZTX0FteSMc3IU@ws36OP$vdMXGoH{uzmS}-{MACtnCQ~&?~ literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/etl-icon.png b/lgsm/data/gameicons/etl-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..d81c43fb57730c0465e1d3ea6c10f1ef16613de0 GIT binary patch literal 1774 zcmV004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00006 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 AMgRZ+ literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/fof-icon.png b/lgsm/data/gameicons/fof-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..c9e17c4ff444aafb6a4acf4651f94819afca78f6 GIT binary patch literal 2491 zcmV;s2}JgZP)004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00006 zVoOIv0RI600RN!9r;`8x010qNS#tmY3labT3lag+-G2N4000McNliru=L!%J3Lm#W z;+y~g2&zd$K~zY`HI>VcrPo!(*WUY_^L_Wb_tvdfS5?1p`_YMUEF0S~j?w~0;DkYp zctr?-lnDdIh<|_y9%RUn5d)@~BnTNq7??N$V#{`dY`2MVI_~P~s;;X0`X1-8H-if6 zANZ}cv>)=#-+g_xT()gn`QV**B1|kSW$Jea4HX;An%bP-Le(QvkZFMnKGj_N${8t> zuw2MF$IQ%3L|3m~ef8B>X@7tJqclh?L( zzR+xyTn@WV!3Hsy!9?W3*#&@^RkiPX7o5*ItEv$Ilu}>@LSCK0BM=p?vf3gK1RFP7 zmo$p_n$%!Mo|%>4vKCbUL}X?;XA!v|xs(zBBbfa%BZ0j4qy|?gDVH7uFvP)yp|7o2 zOcU2F0U=dGE(~O|3ji~lSt;eBa|eK#iMiy=B9#wih#Dhfgi@67_@wzlm|P-Ml@Va?U|5rC7mTzkKBm$0zDh z>tfOrs=)6aZ#X*Asbv{FC0eJg(U<6+)YU!bNr7XUyAK~;0k7ddjyGEzh~IJU^D zG-;}@?QMU{)#g#vlY5!(AI0zW^LJDK7vFi~&;IhSKALy0{L%0I{cQrBhhiw>NK(>S-m*-pLNk*26tl5d**`M3Y{+28v5wO@ZOjGBYl?nX7f^R+ww z`PN&7@Oaa_cH>5O_Gn^_D7Q2`%y{$kL`YbRIq<$KuU^@|#_n)PKRP}8u#amilZdga z<~pF(-*mHUCujHG{UB^kzIx|3=4Z?Ayz$0AeE+-Fru`glKY8=FuiqSX3yXt5r#^J5 z@3rSrGiNfE^89r6rH$E|>_?}|ch0)CChzd|X8(olgSNujx^M44?iQy>yC44Zzb=pG zue|;{KYi!DfBMJokBUSn7K_Joaj|n7lc5?7prfPKUcBv-9M-yx7cs+(6{N3N*+oI7)`%FFNQT={@J~-cjQ2GDu`*)8| zBY3`8Eq&#T918X;?07#!{bV&iNdveVCw-n9Y0_C-aLK>Ac@VSt?5FDzsG4*9+rR#s zKc3zAlieGK?QlOWhN1?Cn3n7Q+Gyf(ROcQ(I)y?o*sQtYM&0rZ zu7sSo{piF|;;@zK$sYhye%8ja$5ui{(I^_o{*JFNP#Yd{iVYZfD6;#de*s8a5a z^Wq-3vZ@fCg5RPH=gnrtO`a;0+vDu(!@76H?hfngkDM8&N=PtqE)B&<^GrfYJ=1LP z8cb}-sl+<)rJY?i>QjuS$^?KbuPjwW96D!t2&M9_*3w{nuU)M~{odqkRND1&Jm`2j z&d{s{MZrdF35rt0gtO&|ueP^$RW(BmhyobS+V+8($S4NhaQ^&a(Q`Z-hFuGP(A@k+ zeK5-!90hT093mmZU{>hj{22edeYJcqK*FtD(eM*|%@<=6X z>V4jm>Y(zmT|J_~O=_6yPkRB#iDPt@lbJX}2CFz`PTlaZTkopo%aDc~?FHwY4t*@nIaS2bd&A-pr^BxOtXrK1pkU1M zL^I}`=a%nx1EeBNqE;$(1X0-Ge6bd}T#awcwl^@G40ESoErc@e%`CygJcllS4*%WN z!x%cMjymGT?e975m9|TA~5%N^F zx*|LVKmlUc_M6=!V{&Q##ckaIs4nvUwq z`Pr!cpT12_3vg>Zeyj;XgNQ1{p{GytdO6$ZQzo@NZ(o^BUfF2Qz599BeRz7>7J~t5 z%*@V7O%n*K=%5-)V&e()vX>nRIy(JDblo_4S%P z$B$G#SuE~#LvhYapi)3YB2@E6uPZnOp)q&eS5J?_7k4L{bKDL1Nw;1NWf;1X6t!_x zHLizvyzF)-cq&xS*Be{#Ez6mgH;)e=u7^1QADqH+B#?@8xl;7X27ubapQ||;te0nN zza6UQu(1|hjW^CpN-1HTWXyMVuWuW1-@6dx=B-ax>$iUK^9SuP7$AadMU!VD5@IH5 zymcu6g;2BtQLui@cw#1xO?IxkX;m;-YAKSXKv+md%S_`-PuzaQ`Lp@?`ybyu@7j(5 z5TrtmWayz~Qll`w0LKzyLsX2LRpY03dol zzuD&6aRBl(Gd2X+zpuEBkag_*ao@xV4FG4Re(MCcNoLux$sJ~D0q3Uh3JCH_H9_a| z0e~mK)bIwvqz{{gEDzjwBKGYwRnXOMmz&q#MhxlbQPk=AJ;ge&$}}fj)%hE*fTnqg zA~sU84I|u2wl}P;`4SFgvG){tc!d=GkSZfrpUI`Xd_SUYVY#mpLs^?~Mh$6D z*lc$Da0)({uz&^6Y4sKtF?$HEK@t45n|T*_>$L8==uBDa>uf)HR`C=PX)npOnG!03 zwhQOJK8Y>-`gGe-EvGJB$0x@m4^z>Q|MAD5=GeyaCDwRcOdA^VULlLS$5>4R3M)q} zlJ?Y=+aHB8n4_f3!_lDo!!6rU!LL6gFGudmh3i{SZ~CDHQEgy7?fIChf2-eC2hZKR z|M5IiDNbzDY?mo^Cn2rpA^1doSrXk7ma@K5AjSHmSoE&_faVi-FRBWz3w_OA3S$xD z0!Riw@u z-{88iW>JSODjCvyqKXgg-UDU~8zfQl$y~p}CWgW(Z^cZRxOn<7V1};+C}HmXE+=R8VWUTEWB%B{(*LnEXTDL!WRfsv+CRmcqEZ?6^ORT3Hd z=RfdBNFxkKl;Ei7olYg9s3qeBg}cxoi2|P36_4a|mnJ2JG~J>sI_T7-$;3mfvKocf zjjV@89(GIc6kd0Jq>A9meJmPq0i)>CJ=0j=Fz~w6i}^=G{+?Kcycl)My>@ zKK+uK(Sia1fx0ddAkbw1vK0XOIG>|&-6VsZMj{DsavIkj$cV?2jykD;%wKZ?L4?=b z@dmWHP+|e>=_#D^pbMAd?9SZk4~c4p-ZM}h!AxxfwLeJQ_TcZ@xD-3P&J#0zH4e|b zLO6DDV^=*8(Ax17=oa}sQXHGj+4mAQ z`$|av!0#&lfw~#WqdA7#Y1|a%d$qHn8U|;)%F#L1KS8WQl%-P(I*#nu?1lXx;q!}H zQUh_ny6mLG5ZW8siRIka_{#WFX_&-fshlre&Sp%#_M48~%wSP8nLA4(p90)- zd)xTULufOrHEp_8=;&Xwym6}bm2E4&G_MrE3xnD$wX8Y?h2pQ=0 zl(R3~*!~gb%K6{qsY1IRE_i|zww&Fsw@VGn?Jh4^-+i^-iCm?w|5NM>1N-9o5zl~d z7ai$f9Yr<8PFk{)RwTWOE*!VCg=tJgn(u-oY$wGZG)}Js!lMqO`pasD>j`u^{;a2* zZ@0HQjzmIqA%yUGHY6iQep-Cq<@Bp51NAinH;bUGG0J`;$9cE#ziqCLQlG0Z2jY(0 zj`GN#ymJVP(=#o+2`4|zh|AAB{~GjXQ$OvthG9Xr`mRJ)FlqL-4?rFNk_k*kNjK z20?9G%7M1!3mY~2amMY<|J-NGTz6PQevHP3xmbjQsF=dZ*ytY@r78LIQCzo(J%VbY z<+#&)kVMg~x#m@eo+ZsvbW`AL!|En!{kt;)Y={i}SJ{Y{f_SuX5# zt)rrjA~};>gBR>y9~kIO|H5V&!i=>Q{i8!OKXYWZ6(qYh+MH6)>lUM5(2p7_$v^IQ|eD~F;9{i?tzI9uQO;|zK1eg3M|D{)zJ=O#$ zgU+s+WtpjMWz`|i5a{3Cx+sO`J`mmCzuCNRsS#n{Ec{aCMS&|@7IT^}sV>QM2qnT1 zkfmvb4ZbDQTB9TJzIE58MGq?(R^{~Y$?i>EopU<_?5D%AK4i^{D+p(M?LAG2oQce_ zr*8!G_b!v97R7yY0%Ff;`@9BjLo)26_YB6ci{Fl*QAHg!U9+K$sj*nva%Iy}t`>#O zfW_RFR=(NfT1HfjG`jr;dy?5}nn^y->e?Da-3g5SO!0ak5Vzs;Pcka2%PJ*se@k4Y z8ZyM6r@e!91BvcQWlWGkO~`iR9`VooLor|F&ls%QI;?RTg~T-EwXc7-`_?+4Jne43 zakXdph9VfO3kDndH*Wt=Au!nco^RCuFKB3;u{tgQrf^HcYM6V%e*rlJrQHAk literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/hcu-icon.png b/lgsm/data/gameicons/hcu-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..f265a5853349142db415ec9d95ec1101e834546a GIT binary patch literal 2241 zcmZ{lS5%XU7KMLGAX0;hbb&CG2!Rv{Qk0fJ=tY_ofzVNE07X|I1R|kH3so43BM2fO zNT{J#4JZN@q^Oio_1<9wg{Xs%_u;Oy_StKFd+nF=a?%rKymYjMajz*_9yNmVdu@Ku32 z-UZrJYue1RQ8D|&bGQO9Q?mPK17Q^G=0cumaLZb>4u0RE7l2Uc`1Q-C6 z)QwWPFaH5LfuxQ%obQ+@O<9yG+lw4<4XY3Qy00<2VTlo(9XD8~`|ik{aB|i@HSpxJ zGg*=V!jJIFo6zcB;Al#EB=#INsG4j)p9E-{q5MYah?g7KRN5^{3ts_^~i5k(O_ zZaWVhVV^#j3BSY+-gALg@0H`R*p7jp`$}EJi2?YTpSd_b7bd+lNpJMxe+J={<@xTO zwzpAm5p0U20u*|mSkCof(ikhMRglI!2u&8{(MGp0!nwKZjr5ua1#%e$CGp;J&E{ro zCYkG%s2LiK;TGev#0D~^d;I>6iMslRTTuK4(OP?3>1@v<= zmQS%%<#3=7sDG7)pTIDOWQb(3iTOLsfru~Urd97>NG4}%=ef@O@#Tsib2vd6hCP_! zC3yqA-E{r!A)la8-sF-Jsh{n$Vp5er^7SDB0U*5S+E-edRQWrqyBnk0J4!rwL*;27e$r>JgvVIU+ zp}Vt3=v>tqP3Y~3PnuWsbYx|3;iZGRH7(xDFLm(%e9qcRPf_p1-ma1VxJJ3jQveb`?99aPB z>jFi$a-WjyFNDEgU4Nu|Wvf)C`eHp3HPE5H>Nv9!BN>!6uS120i+Vy>oq$e&05&%wHs~Ln5S^)TV^ZsqDVQ zy^?Hs=AJy$Fw&U)6xk{akor}9Sf$p^%WRwvAh5SWlJ<82%}qC{Gg%FmNv+r08(>3MY=hM0?Aru~gAGDKq3*=kn(N`al(>l0u-c71gs-*1{=N?^b!@dp zwk57k0SM$GrHtTAFGSl{qjc>a&hk7nl2#N0VUl7A0(m^ogwC|%kbyE>v=XcM(mY`c zFM`BJew(v4Ywr~`L-5KTIjp?7$k#)+X0_b{qbTlm?p!0i>VylIOBh+xdz-ipQn`mK+1-d-b8&cY|!v#-JkG{(C8r!DV80|zAw{KP)$|! z&M6p$#d=Bb2S4lNy}@W%@~y&q>cMgLx-#OuucKre+Rs69jgg8)c~l1>0E;3zPz(2T z^Ms;aA)78^&%TVk#h~cF8e1PqW3Lq+IDHViCV%MZ)PIuKrH~4+-DJtKt?{n87M3tJ zODK@v4;MnaQ-|FvoR0k-*GJOd?KEXJZYPS&Y=&!y#Ew*jG-%1`qLTw?v>RbCF)76SB}BC#rXTi1nBui z2OJxKLZHxaBm$1aI3acP5W0G3ZFK}f4}rjjGWPzb5EkJd5*Yvg3)(s&cE<(40%wbD IH1VPQ3s4~QUH||9 literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/hl2dm-icon.png b/lgsm/data/gameicons/hl2dm-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..5bf5720ac2623da53e36251b2ec90f7a2a010453 GIT binary patch literal 2549 zcmZ{mX*Amj7l;2ytyQE%sxy`hYA8ajp|v!&T1v()h%MAQwboKn)E>sZyi^ILc1t0>V5b`)bu0}BCH}U{cC-m$ zqcQ9wcY{Vs0>VyPJ1X<)Al|>+o==fg$6XgR=S4lcmB{l)Ta=9OQm*CdGnhaPI8p7f zy71rbMy-=s5vaxRdwtZ%dQI9XyVm}gL65zh;6A;$u--K3x)-@pR&0oai1)>?7wQZ= zisi?IHYE$`%T6mQp_JI`LdFu9aXR>S`q;4j!yd+-ylD(v_-dkWopK!~3Y-j^>4#OfvY$B z#9=V=Slks8-`uN)OsuwiSHh9JOwD?4zmmW=JY|x@t)QNpU`w|nWOO9@rpntkdDN}dU)ZUvl#MqA+MNxmC}Ro-3CA~fR+;PkUPtc`Z$6m630Hh z8E%irv&Arh@pk-Ds~-Be{6AnPOvQtOgI( z@T$~~cRfLm2^5kL9`W1P`y=SsSqw`n#6$v}m9v#8F!I5uPIDuhFu^!Gh!N3zQV?n% zS`TiCw}2;=F?}SN1?&&T?9a?J9EC=5^jh{c8I2THq%?yYbgjcv(9hGRvZPFs<_`zh zb{SKF;SoxjrQsJFqdUVhaRkBj=?axRfQ3VenWO9R_UF;)Zy%_k*kH8kW5(CDRch{V zmW5QIl|)>o);-ebI>FAPTzuFB%soV4V+@kEdRJ378wbb{0lUj1bo!s1AaOX3E$!}X z&rxbAquNpaPSDA8Smexil{EQIZh}~XEBU7^abKsvNCy&p^dfjSJf@)qE1$C$)nc#C zSbDhlp7GDkWN~%GM(bK~rtRFMjvh+{r9S3tRVx_PGlgc*j*h4*cE7&rTOzO}(h&!P z=l)eM{>|#WTA=iwP(mA@F7%o{ztmcPeOPy!)JaS<4fn*Y`)|*T(uaw^IT)K}MzVH1 zI`0ef53utt?B`kRcuPThHDmm{)V5;I-KDWu#n5_cG?$888tJLR;v>gKIaLUOv`3o5 z$9O7fa&K|(B;71DKCbrPs!-V0?qb0gl6R4x3TO&&R62i=m-dU)=L&! zWq;s6F|PG4Iv(%0j0io^KiWtaE((iAeW(mXmZtg196Gf1BwVgEuZ5jizK}X(d1s^kB ztzb_zoT(aT2gDVRIzPuR{V=V<;hy85bGBW{{fd3Zli|^!57=C=r>4eRwvyKv# z?zHc1{XVAB^S#KmnbGd29#8H(ZZs7vv)FC0uAQsS;KiW@r?!dS)p)&Gu zx-Z@fy(a2FKNp+PYaCE5Xn}{2t*mIY+pVIn=Z2E6GYqpRn&qqh}Hz$_R zlj#Oryyb#{mR6Ohx_#`2xD z7Uv>YXmfk#@?HDwA$KEBA0&Pwl0)ArMz3SyW|Dl68I&O@arK|a2TSi=pDC2>%HY3S z%mM;=#dBvd!>1bs-;8weUeNYZ-p zvE5E+o=RmL1~Al|-<2y)=($uwlojJ)w-r;Sp|;E*C+@$#bZ%n{ZL;@{*>-z~lokgv zEZ0SYgPdknV^;fGkA8&jq8{a$PE^d%&qcIOOGi()TAjJiq8y?3wJnn?Flq_P4y{WP zo&*IL1l~ID)zvM%Ff_4ZEEvhw7$C&YY27Tb`fjZiCt~r(@w3Z!0&rGStTF% zJ>v?QM-(%YKtmvj=LJQxfJm977{@El1mCuI%_TPd7`1|Q1AJ(}%J?%$hujS%l}1?) zH;8@dLgdA1#;(Z2Ii-eT{NABzm5PzLwZ;1fpm-)+orE{Rp-fw-E8_LbCPN=e{o1y} zjFV5l~T+J2eyjXPQzQHZyXxTWqd6&ASA@`FUl+P{7l z&MndvFqE(;>3nhHF=txx-?dsP50fF@p1>I z4b$MP0Fn>%Aid5)7LDgPylTb73SyrIARm~SFlstN=FInua0MsO=doZ>xaeRZOi|iR zEVeo+MYPGtQG0AX2TB~H$Z%!+TLvT}aF&4Q1WF0VE{aTM|B3VnG>ecl{wK*aNvtLb zb;HjxU0M`wagdq0eI!>{%Agn!Nl#j!w>ZjP{HiAqk}kvZr>(;;5SbUUUwHWkDmh&X zq{=gkjk6|G6n~4GD?;KeBqe84HS%{CE-n}>u*R(7lGo9tmw%B&u%2zOyGyVK!Y$C_ z5`ZFH@s6wlTvkEFQb82~S4Z4YmVv_&a5&Ptb^m_^zX10~*zo@^D63w3cqsrzdS=K5 IT}bw6H@>)-2vsfmFA>^IrTsr0cvjEZz3}-M5%7GIFt{KL`A+9Y;;yCdgTLZqZbw0RdU-fH zxjLYH{5>5|cAlQfDgf*sV5onktOiq6RaZN6`V3iJ6OBeI?@D!7yLILtVUGjJyA$^k zjc~do!%u3L2oJ5MEGpNiLxC0r)bg^N+?@fAd-->_cmFZPh>j|PLdJ%Y_}DgV7!>kA z*3zC1m58vdI}s+3cO_JkUI^%i@fgy1@6kPRC{%~B*0GNMIp6P`!<6#x9EZK!wqRhK5yL-C;Tkn_$@2hXnobEA)NgZPj;Zj}$HcAC*e=7T3DXzk7R5ci z{rz5G08b}GqscwU&7M5ZR4mRy%9KY0Kfjn4#h-FiTeHwVnK5d9h)w$erO{gS&l!!q zIqYhDSrlPrrF_`VS@LG4SUrHahtvD&;QK7-lK8{Lq?`5kP32@4pA;TINegxj7m>*{ zfmM30yws zSeLl;>50~Z^nG{U+FM(?U-#&G+AtO{{%d4xYG@f_@W}gh&dKHvUxZM(=Rk|?pJxy= zlj`62q8Em1!`D)hIT-oVzqj6JTrHW)ZzA$-${Yt;g`sympABLBhB5RReWg4_x4e8S zXQdTwKe6t88h$d^Ta{~}C8_3dO-KszdT!bGcqUTk7`G)^t>3OORKD75I+!X!vXAK5 zNVt#hpx4Er2&BiY%av6@Y^Ca}#@5%Ee|-ICL~|)S%Y{Mro`u^H2$>wO4-HEhE0H!f zx#1fL6yKd0ZqkjM(qR@Ly49Q2M~gl|&)LFFQj%9swEj98C}09Ui|k(R3U?N>c4r`F zzvOprtxq++E{t+g`)JM*6QMkqdiNfXuH1}7F3xYdKeDZ0h!ehxO zIS_9q)9!CEAKr67|4Pzyg)=2Tu`_=hOsG?W(1imAcCgFYRkhb4^P(vgl(&%S#ruLtv7j;`B z2H`cO#cvAV0#%+&`Dn?O3U9op`-e#REqjjw;F(l5MnuKcQ8GxRjdRo#Dq%RXCt|oi zhQBHn1+oUXi9z?*3~QBYYRBnuG10<0oi_lf{D@Me3y4@I3@n}7stGtc#%Y7GmJ1OQV!2@he7 z3L<=s*tk4<)ht|IPS%3Bb4rTMxm4cOqP<)y&89AC=UF@A_IR7#&>n6_9l5x4yLW0^ z8fyVU;n~eu030p}goj1rj4@50cuTJ90{l6^V&Y*_(8;#39wjy4*5t@&ATmiVR%mx zwkn;(Y91gxYlC-~V7>9=D7EsQfI!pIkimKQ@tOeU1ZSkn@`>dI$cvZRp#Q4V!(iA5 z78F!6_#9k&*~4`|(S-N-z&B0kEnQ)H#F)pzh9Fedle;k9cI|fhw#bd-VsP?9I&17_tgByr)a{LT1A6712Hj+$@3i?QUDea(5&m z<;9Ul0hRGxs~1fn5Ih8D0Rb(2N!Y`?#9u(NtZUe)2jHXvo8Z^oAAjYECGQWdd6Glx zlBy)Ls(iN1wO)KB29L3{E+J;8*sBxQu8rz^|4~tRsLgdF>qu%T z4=Mta5t{~rSnyy05LQoKNNibWu*?ZS9^C^DAO40_B+t!z<nRDY{UKs DwgK*+ literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/hldms-icon.png b/lgsm/data/gameicons/hldms-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..37e2a20b8031ad54ec534ac430a97179267e07a1 GIT binary patch literal 2834 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

3uqR&|} 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 NurRfSHyC>){1>I5JYN6+ literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/jc2-icon.png b/lgsm/data/gameicons/jc2-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..782edabc314ebfd05b6e4ce09c91abe073d132dc GIT binary patch literal 2983 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 DlL1HN literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/kf-icon.png b/lgsm/data/gameicons/kf-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..516bf8d6f1759770e47360c8ecf2f3360108d857 GIT binary patch literal 2687 zcmV-_3V`*AP)004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00006 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 JM$h%}e*qqL2l)U1 literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/l4d-icon.png b/lgsm/data/gameicons/l4d-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..319f644f86f719f32533a42bf19416265779380f GIT binary patch literal 2487 zcmV;o2}t&dP)004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00006 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 literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/lo-icon.png b/lgsm/data/gameicons/lo-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..17aa10b3176c55b836423d2df7a426763b75483d GIT binary patch literal 2747 zcmZ{mX*kpi8^-?)vTJ0`u}n2+WUN`o-pG)>F+|A8klnFQh!G)6WI4%}YO-cuvKE@b zG?}yz6*Bg1vX5mr`uKi$ujjg-`?~J?`F($qtu0M>xx}~t0N^!6A#INx@<$w?<9#5y z^8DCXJq;}k0if<7_kkPRpYj&U)&c1@G%N-B>Lq#hd}0cHUJB~?)BNi_x}msh-@$^r92w?u7t z#IR1UbANbsTVkd*|H_qtv){F-6dnqNVqh+rl#~?D3Z)kYBSQv(GXR8_CBfSMq)i-$ zbz+le%BOpD=dh+vCAh6n{twgl3Jkde1_zW+@E6l{!FX^i5;@Ki3!XY)HD5L{(^BLm zYCa=FL{H%@o6KZu-h_rMGk$RI=MdxaUsf60DV2D-Ux9c~r~47-s34Ba6JSG#8QwPb z<`siX2VscuN*W)`XoOXm*&Q+a>79>&2Xl(p9|rShg|mNKi;Wt5%YyLeLmD7^wAe2Y z&==SspmSztoZc%^{?u%3ly83qm5Zi}SgAp2FP0xj{PZxT*9vVeCbQ z3cXKVn$p6AFm6Sh|IT3+926B`m>;WUmDQ*kW?6ue= z_4FnzZiKjUBZp?wLU>(8+EUZ7G`A9>zR9r9o`2^?IJpJZd>xoLwtn%hR~UngXE5r> z-`C6$*Buom)+F0EeoCnM*;@&vYsBx^J#`=H6>LMiJM1i6(kxPA5DEB@P7 zU6khSD5hd>sbsZ&&?(pb=5C1?40|*o^b2R)uLsXP5H+yPJG<}zwTFCz9$vNSyJ?Zr zX;Qhi>cYZRgu_hwP*;s5@!8A4(WBjxgNcCqoar@tmm6rOY%dUWY^tjp>5S%%D5twq zUk}kSZD!dJyFiJAa!09e9=3iHZHGU&lGR-rRY#*EeZJ2;m*vCk#E_z940W?6cMhfd z>nl!+^%Zh(X?VdmB_nUIPj)px<96X2;fFa)0O|hUjZ-~Z&9t*F@VUyCn z4!=Ixlf`Y44|HM{98&5chyKpx>)B9Hqu17RPel!^jtdp(e2rnEw?6s}VDj~} zojNWxb9)Mr+FZZ2$~k?`O?@<$v6?1%cbn1@Zk3~&9PHgEMN7Dfr9*X?SXkTzl8aV- z)`p+Cqlr}j^nKdH@#^Y!5>NW*T#?vBjOXTi|IPEgTUXlb_CxZG0$;tx$%q@fvlxsz zRX%;yVAGKCBoQ6D+^$y^_lu;ePwFA00X`u%q8!(*PhIqXeE8cXrW@nqckpnhT7O5N z%v&$M=_B~skVML=0aU(^zMmyOF8>;r66LVJSyahoGi zrV#a#c1)Y-nI>-6Hmbk#cwpLy{_gml3HuPyTA?(iYqt4l4q_XA&Qky8cY z`j@An0P@RcePv_ledq77a9GQrWtr8 zR)QzLP+f7kt-#J+0;45zL<=i4;E2u7{V{Z&mSyrtF$x|zw^i3~-?fEWD$4i$d5Tln z7e)`o`oanPCNdvfmLeJB-&jih21VI&!vmHAio<5l%=GN>2 z{>!!PfxbOz*KC}1I=d>J2^XL|2x3x1!Yz&%nLQ_O@LrM|FakeI49aanK z_t(C56~@n>6nh5Db`H2RH!7e4;n<$+95K3Y#_dJpdrjeOfGqlT9azNdPZXwvr%RLt z_2_Qb@MJJ3O_;q}zB;*n8kHu_qEamDXn*EfYWcQ%a-oTl4;+-FcM@C{`khzHP6XcD z3@6eia`X}X`mf*YO?zf5I)B-a9u!3sYuF|_`oN?C$TRSiNaLBOn|2nYwy{UI+yjSI zBEQDh%hf|tqlK_mIuY9+H7?ZQGMxP!p`|D-4{mYOYr$dlsZDh*&Gvl9R^ z`<++OoH+$)BnOMXC2Vw{Z$|l%)+2uK`S_8O4l#BJad!*BYTpXN9vh&dq@oH}R)Q<5 xqm?zZm9(@~)h;S2X)7rqy_+}w2k;AU_wvB~e?U!x&*~TeOpPs()kZht{sWEfB<}zK literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/mc-icon.png b/lgsm/data/gameicons/mc-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ad6904d9cb10e5776dd8c5ba8c85beb2a8a16162 GIT binary patch literal 2423 zcmV--35fQIP)004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00006 zVoOIv0RI600RN!9r;`8x00(qQO+^Ri3J?(qBeQ+Y*Z=?sdr3q=R9M5c*Gr6DN14F! zf7Llv=W!o>`*z#0)9J)9atIJ9VgwQ+q9{>VzzWzQMPdVNvta>(1cBHvMr_zHi-|N6 zlLbLUvzutp3}_e@tUwVW!A@+eZTHiCU+11@y=HOa7MV_zU_q_xobOlP_noR!5%)MQ zeP&&J;ai`0dh4-KcI7t*$M^akaWBt&>Bs-@Oxv|D^m_RdX_~g%gRP%me`Ejhzdrx# zKLO$I1rT5U$)}!?v3NlUp70?^YaId@57(I%^IG`m=Zn4i^1pxo_a7MYzJLplpA}#H z_9vfl!9Jg&o=lY%L4b9RNi`#jQ>M!~GLoceigHn-I`wjSY%c%vH-7oPkoN?9_Un(y z(L>48NvdAZiGI>{R&1_~Ar^F1OJy6*_BU|Ou|GXx(C;zsjkvRzV6CI>nxDcIx8D;~n9o`^G6SmjS6MW#- zY@bL*XfIhGj+r)dih7BZQPY;)&yH>^e)yk1dgB!21n{LFd`hlw^`DY5yb$~7DJ>#e zXDEG5nr7$_<7>-kJff}}_KQPwlJMa8e&%Jtw3;y*t>e9?Z5qnDCOAhDCHN3{VDo$v z+VJv?D+mAd)9?Q8>vtj1+wtY&pL_7te5Aie;KJ7U9BG9K-$^Yx#g%M|)(k=7G)g+&tdJ z7{j^E`$!{AwhPR7K78*AMZ^@!+HP5tP7q zLmF!$DH&!1bfhSnB}KKQm*l8Kv9vWuJ6B0W%GtF|vOJ|QCA~Q3t=${kxlwRKH$^M%~n0``s=sHJrULA{)kxvk{396s%1m7A9(AxQ@YmBbrvDO&n)aaP5~zWbAa5~qN^=SS7UE=g!?21Z_XL6 z4`91w7<*&^S)8ytJ-|6f+jXQW3_OUrc*>K zxc>Sc)7_GX9zILlhgfRnI}2|8@c`*0^^KbNydqT4IYZ-G{8W+4h%}2yRD|>XG~nTL zV}5^im!`A0(s3rFlyyf@Tk5h#dquCGv7DDorZe{T59#%LOm-@S6=<(9!4O=)S02|` zOwqw25GM&9kMja!1&y(%0RiY`nz}J~Js^=5Up5Rf&FqbuV;xzdSRZ6)6>~HzX}i_R>(-nG_z;kh zVCQhkAW!H^kJm9D+S;UP4TrNOwG|*E#wO#=YZYmxSj+<23ATp=W<`UH1yTwwoLi@; zTFS=ISx*S7RZA(z5_JNQe|az@I%cw{m=!g~IuL@J2U7yj&k`OUYjo%k2y_$?2SLvn z5@BeKL+C!O@gypyYz?h-M3JQF3>(9ojnM$1dQ{E3WPkw1dN$X3^is|4@q!QnZRb!b zqUkJa{ggb_80YBcnlo#C_NKc?3D$X3uTM-&RW-E6k|hdj9o`3A2y_-Y=V>}~Is@}% z&Ag}yA<)Y-n`=D=c}g!;Sm)VT%URYft+9jh*n#y^{eL0MqD_fIhYm< z@`TPfb`EEZ`Wc;dEUK1BO5#WmN0Kw69@7SD4^7oz-KsD8nWpY6;V*tkPD-Fu#IkDf zepS!?<5e*0JR(-is~RZt2p$2_ zHYAi~NgyDFM5`F*R}E;Yg2l3=a~^9P&aZl-GnRnBI*$|rA0U!~0JDQh@#6Kv#aA2S zUIF|&G5}CCX7c*YJO8m*Rb%cWP2HK<{-pSqH}_^=n^)bx0q?j)y#sLaNmk}~=VFFS zoBc}{&ySzearEpUPe#^x`foSrwf!kgYuQ}Ou|9A-uVyo+U%Gw!_K$(9-0Q{U-R7Pd zB$qyZ>Hg=&!~9um+{goalO?H&soHL~Hz{7)IVwI-;Clg_JacxKT)K4s=5w9%&l=~s zGh4oNYf}DIf&Ugm=s3D41Q+jdApraz+ep5RoFx^f0000bbVXQnWMOn=I%9HWVRU5x zGB7eTEio`HF*Z~&HaaslIx{ybFfckWFlLHF(*OVfC3HntbYx+4WjbwdWNBu305UK# pGc7SNEipD!F)}(dFgi3jD=;uRFfggHhIs%0002ovPDHLkV1h-Md1L?p literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/mcb-icon.png b/lgsm/data/gameicons/mcb-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..9634220307042b92eab42c05a91ceb2656ef5dfc GIT binary patch literal 2737 zcmV;i3QqNjP)004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00006 zVoOIv0RI600RN!9r;`8x010qNS#tmY3labT3lag+-G2N4000McNliru=L!%J3Lm#W z;+y~g37|YN0aAI+3(W)VLshk?ts;t4rK(&)>jW2aPi<`P&ED(GnREZ$zI;CL z`cE!-*HnX`t@kCTvfJ!sjY_zgb$Rq;#8SuoQLS?mHdATg%+p+u-n~bAoJQfe0qnQQqjeiUrjeC0)hi|yNYx1o?bCSW<$1TohgH6*Ec zYaWy6@%N(`&CTBVoQ2=!A40^Qzj1Af_U)hjH*x04O)rg!r9kb+?^Lb!G)N+CX;_00 zq-~kt-Xq%DlY;3KeF7K}8WoH%6D$q{%ukc{z)`?dO4&m)B>EIkHcQ$?=rt9{Bw~=t zMl4%`A6y>bAQD%=&dexf=#m9KJ4O&E+o+JFtR_%5q#%QQ4e4dNJxTy8NHS zdVln1vaQYdmmx9a?8cB5;r)fvwUsQmgkOwR87pdfV}eoy(rJO$R#2fWDsL3p2J|3w zS@0CFL+Qdcj*dCg`_7drVp7+>&`4uk%EEwGh3|N5g6Z-iBDQF-OJr@}XFvE_5ZR+0 z3p`9#JHp4CYkfxSPyg*>;qyQK(lb>t-#$EHQPNbkmi*q60$kugN$?J-jndVt&*emK z?ftu=>1e8I;(znOF;ZMxj-g`Idk2&-3_Jwojr0{(Gj5AOP->NBnN(a-;_I@b7<08{ ztR$hL!3t`)H`oXnIBQFqoLXX8$AfN-BZM|hlXNuSD@=BHe0n4)Hp{ESDDLjhP8i2? zt9@*8$w}+z&a5hfaMnsj`?djqwaJP#b+4Pu@^a@_|KV9QI@@=yeX{?Uak@1f19dMv zdx06xgK4yu1UOJ_JwI8rAe6VklVULFaV4wTwpERkNX7;AhLHeRatH*xD?Rg+Sw?)s-pi(qLtgFH~q1GyKI1L$NgdWxgX-T%I1(RZ!h1cXoK?W$DTfKfKdZ{QSnM zVsQQQXA|mc1aTWq|9{%goomrWk+c+0cJU%)iasT0y+}8(OOMOx{ z@$yC!$itHd=QpqJogAwEVAuCko`mTa_7|sX>r;Z}_igA(V0!r^&*|pZh~)R0w9d2P z(x|bnjzKT^qPsH79j=W8A;-Q>dy-umBp;sUpZn6EHl49clBaIGl+(`oo3=fljYUTy`yZrl)m?y|9$r6wfU@Aoo*Uq_Vyp9T@^2n7K@^>v@MH`GpqOS-#@c4 zJ)O-2O?on!|NevQc=zs6_SJ8`wi*`0`40T`pIkgxw0ny-Gf>uTAgFcRv{oYH8fsG- z8-T_TFzqN3THvg1e9WS@@mkB)F1$dXb|`xyj-Ou_Jr#a__s|h>Ya`j3bU89HNj)-dfz0)Tl<2?m)Un$?l60umNQglk4(=a-a1;y^~3^<%}5KqaK* z3f}zTEoAcG__QdhUMF@3;h<6#y%@& z2&s^(hRA|c#C3`pq_8a8o@nB+NL`k7v3cBCKdvYZ-9dL`nwdRWmL;uO4FII7WE;5a`4Ceb0&N{%A|$4S(GUm|rAMg(BQ2?eh%1_c zAwh_Sc|Xr87nPbiMFWSxD0rZ%lP-)mTyhWtTU6ip%8jO;KYp_70Rlk?`q6GKvDTqz zF^fXOX&CmC{%CFQ(Y$KO$Dhn%#$W!Z zqiY2+bd@7@3({hUS*sm5?ii0-1C%;XsP};pUt`SZNg|RC)QMoNacw{fPI|_2|h2XqG^>9r18c(VAK;JAdJJtg#eOJ&8s#>=7A9% z>hHb!Gz8p!cm$Nk{o#;C#7W>JzIvDa0~zd03~!qSaf7zbY(hYa%Ew3 zWdJfTGBYhPFfB1QR53R?FgZFiH7hVMIxsLqYPRzL001R)MObuXVRU6WZEs|0W_bWI rFfubOF)%GLHdHY;IxsmpGc_wPFgh?WH8&1V00000NkvXXu0mjfFSIYI literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/mh-icon.png b/lgsm/data/gameicons/mh-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..1f1621f1576c206a38cee743696027f9121ec19d GIT binary patch literal 2638 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 literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/mohaa-icon.png b/lgsm/data/gameicons/mohaa-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..0acd3dcf39d8fbd564eb4078eac8748d412e98d9 GIT binary patch literal 2845 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 literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/mom-icon.png b/lgsm/data/gameicons/mom-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..317b6010a9e19865cb56eb507aef10d03ce9ece6 GIT binary patch literal 3025 zcmV;?3oi7DP)004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00006 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 TH8&1V00000NkvXXu0mjfy342o literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/mta-icon.png b/lgsm/data/gameicons/mta-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..25f89c9d86612df2fdff6167f52686fb8936a1a2 GIT binary patch literal 2147 zcmZ`)dpOe#8~%~Qh|DP_z06stS<0E2dCi<9InHsYy`gBbRo^NV8AYb#P|k0(q?+>~ z@(w9N$m?un4rvq1oZ2^ket&%Tb3M;}UH5a{|2_BhqJ;w|^&8bZ;4s_HqRPq7DF%lL25$AdwdU;1Ub~mO=o);t>ES z#pO48S_u|nVa|>yfWKEyTPhw16p1*rUpxRD)!b{L%Vo9%fheBfKk_5|2s@2)f z0j83G94bLQ1#%BE^dTvcQ3}kE%IEh56pwx{r2k}KK=Sd_|e+%pT)nENTXL)OZ zzn0xb>e^zjl4$pUNbVNHZ2N(^B_BO6a~F zq_j}v%QP{njn6H+a5QMD)&`T6pSirDGa0vrU|>EBelhhIy> zRa~yBo}6&4_td^{M2WG-IP|iu-Y0g}ztKvVB58M*$ipX++VzH4p$QDBe-(OV=I5t& ze{B#5gvK0;+^zz%4X1Ih=iG$MjL<1ba~>~4s)$rk)fP`(H|!5!egud1oYas<>)WAzAI+Lb(jV`Y~m6dYxdxzU*{9BoS67}w0e|!%$3PB>xELB3g*u(J~W{(4EVja9L# z!a=&OUDhAU+rs@?LX6iXG8M$JebD!Sv# zTa@nt@y=AyM&4g6WLa8T?q2&(R8-WrZ_aEfZ3ILJfpC-ngaC!V8|ti)`KM*)#YDL$ zHM*}&dA7! ziHYg^@IgvO22Xo!n8y4-_>SrVjBs$zy2%z(O>bP6S~`SJxKk%-4v>D{&7=ZzKP^qC)tw(xF> zo9$Sz4X`XAR187X)ZB->LB??StLEkj_Qrh^38fe#Q&v`1FxT5dLMTFHEvM&n%(IxfLkX?I~jlg8a#V-1;Hl~1jNo~j*9CjxC)pcm#bBhWHF15SA-=+` zz&{`WPxnu$k4go|#y$}anYhFs6N_A8emqo!n1zFcQ{sQmwBJlmPp=H1mXbo=ddi?d zBY)bzJ9Y*eif#U~FcRXC?#l`Ui$wM1=N1&4H&GGfK*%6eLXHEF5k@b`z77$poX5wq zS3&uw*r_v6dt}OUnQ^Q*Is$KB-ktcDVQ%&CIciC9{#5~tFHBEWhWF+ZabKMuo&>zYIoU9oVNZHW0X{qAK%xoWC}+9m~1+uaEqP; z_Ofoa;1?m$o|bR!tv{`Oq5-EhUJHhQ<{V)T;-S3N9)^4QXYZ1#^>kIR} zc3|(trP+6Ps;a6KQ_0RK1WG+y4wV2P-lor2j~X2=%d_5>>+<&C&FfJ;*9xC*wSQO` zRmnU1xH9B<(G#^?vk5j&@D zes9uQo?pdvRBhk-q`m5ES7fVwz^Fv!OkNq|4{4s8Y@4eY;u5WUUs0)wKnl}WA4f}P z)~np$Klr<{57NRTSjk?py~gJpvz^3Fr9Pd`m=4=sAO~%2nTKQW>#?>&qdtSHJxtx{ z&806j`jMwg2BPWyr@IxAaeW4PJ_C(+TSPoy8f81Pi+UWQp~vyq_Q{+=)x%q36y2z! z@?xBaGHt5^YBoVxALBpThi0i{nm86y-7;}wgM))}b75eSo9*g%HSk6yGgbiN7OF*} zG{t^%d*k+jFp`qJn$8r7bJW~sn;JZ^V`}yCBA!>X$rL9dca*^0Gu4$P%n@n GH~tHF4)IU` literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/nd-icon.png b/lgsm/data/gameicons/nd-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..dbc6a689100adf77227ae5a8cdcfc9b2057dfdd8 GIT binary patch literal 2520 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 literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/nmrih-icon.png b/lgsm/data/gameicons/nmrih-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..02631268fda286ab42ef67094bea2a7093e2ed2c GIT binary patch literal 1100 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 DUH$8a literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/ns2-icon.png b/lgsm/data/gameicons/ns2-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..4894b0fa4997d6ca618cf69404c0ebccfbb17d2d GIT binary patch literal 2859 zcmV+`3)J+9P)004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00006 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 JPDHLkV1fdEQ2YP@ literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/ns2c-icon.png b/lgsm/data/gameicons/ns2c-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..c519b771d1c6e080489554a1d1b58e086c9e5152 GIT binary patch literal 2603 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 literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/onset-icon.png b/lgsm/data/gameicons/onset-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..598455658fd8dc52ca0860ad6dbd9402b86b9e59 GIT binary patch literal 2927 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 literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/pc2-icon.png b/lgsm/data/gameicons/pc2-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..8a20b75c8a80d2266c4726a1b99caca33baea066 GIT binary patch literal 2504 zcmZ`*dpOhkAODgvx|mXDB)Oltwjm5*%WZD4Bu3Jiky|E0h}D^n%O=Mq%q`?nnQOBh zEIE!TmnpQ|HpO95*{P+)sdd($zdwG@=Xrfz&+~deulMtQJ_xjdVWh1210Y%H{T1@QUP^KiNG~J+bllqg^}@~{MVuSP3jk8}0f0yXfNiNnTmyhB zFaTH&1pu2e0QiYe+2d;`E$sTm!_^7+{^Q(XH5Ew}1%g{(0s!or`2iVux8ED3qI@FS z%UNEa2v$}+%5Ye!1ON~N?S%Am8$RKWjtO&BZSChWJ}ouymh;o>s>gKq6_HenJoTZv zL=~AL%`B*!=1zs2!vxgQ$dQ4aGW!X+Ou`b;5v2{%zRqmVjwu?O(Kv=<%qJ!HGF}Q< zbBO6zHpS~N)3!^6i}uWK>qfjw$rfrC$O>BgH0d;P2{+f(jB;X0_k*!H5r_i|O64Iw zPvyMouifB$|~6L?Z+wFd5E<0C&r9M#wUZLnUDQGHY#cI}=A+ul_?$MwIx!Tzj)DAObuh<^a z&b6`B^Bc3Mqh4nppTi^>LMjSyp69|2$XEYMQuAu2P3N)Pe`&l*x$D=V7_PBkQ8O8Z zk^yjJ@JGJ1P8+TiYj^We_xY;-WVR&Q}T?hJQAtv4NXGaG z{M|XT#g=10!P*$tD#ubkH_b6J)*elaVPF)b*0k&TU3Mv=e*b--GH zQd93*eCywTwZBt^!8cn;IG;@pAvE2btTy^5%Lzex6OVc&wcIW@P*8tw$k?DW5kR8XBf- zHzyu_`g3w&h#x2{nXfsqq0}_>CSK5-KnQs7!dl=GdGFvRu`;0yOyJx8MqVi+jAYE% zJSzR?n)1;zW$M$NHHrGz;GV~(Cpsi+^c5?9dhFJp>q8}<=i|Oh+8GVJQkKIY@eC$Bd4e$9hs5Ss`uET=&Y0_gd)1nET{>Ct2W$j>*AVxE2$8 zu>RMK(bcyiqiQ{?{_XPlHXeI?eT7RGXMXj#bN6Lc=riuvHcvvK?A1Bf%wn-l=#+H% zgD$X&u)avB(YPbt!^1-vf9+0*P+8Y$OuYUwl}a{L|PKm3@gZ|2|2E2;M(8ns$q2X%O!03r3D~8fz~w z(<8g*i!%I&-w>u_+nq1P@B22Bt@#Ke;N_=4ba{@;d z_mKOo=rp+i&PE6-MSNR9djbc0I75x%G9E5k8p@k`W070;nhBfesmQ(Z*yCe<*2ScqbVC^gDSXy|OL4ykFolux2 zEG;cn&_ZQTO-(^_)hIW)Ho0|!gD16|x@Ildf5oR?p5`s`aAbs_C0P*v>Qx$38TCFX z2&C-)?CDblK`_Wy#hDf2fI!F)t@Dja+zWMWZEY(>QFLl!B+b9KpMH%iG-vmTm2_a- zv{O~m7&x*ob$3Tk4;5c7w$H7ThSo)^I74uptrWXUW5+Jib{J*XHP6Ou2!+CTLcPeI ztKwFSqMhQKJx_E<&2+A91lb_$`9+Ji5EfN{U^Ah)#-pa^dsQqyhr$42QtvqxXYtxa ztNulym?f5eD%1&6<6}bpq85?P#l9tO4F-nMcHX+t$7C|QyBk{`_!)l7SVS;7J15^H zHsbjXhsiGW1EB=5gcW0>2YSdYo~(mPL)c^pBQdt-V1CHL~}39ZH20J@NL z@27Mbq7P)CmPiMq42BR&Fgab6EOmU9a@a~DZ`wG#H>2{|k5xx6(K#S7>_Q^m26q`R zCBO`3W^Mw9nZPam;8r#;gpK)eBN)sE26Kw)7X6PQHZCkO{ObQV9JktcN@@Vm&fZR~ IsL&h#0sWDtWB>pF literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/pmc-icon.png b/lgsm/data/gameicons/pmc-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..c58cb7aed3ad978f08b9b80a0d4ec962e2cf55fe GIT binary patch literal 1312 zcmV+*1>gFKP)EX>4Tx04R}tkv&MmKpe$iTcuhm9V{rtAwzYti;6gwDi*;)X)CnqU~=gfG-*gu zTpR`0f`cE6RRl68#OK75I$eL`!^A?lhov576MXuEZ1p{A&DiVkcI#W4OCHsi5RUaDF!mMpK$RS{PEs%d^uJiv$2j2M1=>x^`aZU-_6gv72Cmeuzup4oK1pwO zwdfHL+6FGJyPC8IT zOq3~m-R0c_y}kW=rqkaKiqvwjts>H+00006VoOIv0RI600RN!9r;`8x010qNS#tmY z4#NNd4#NS*Z>VGd000McNliru=L!%N8VBi^z()W802y>eSad^gZEa<4bO1wgWnpw> zWFU8GbZ8()Nlj2!fese{00Q_)L_t(o!|j)UXv|?8$6wF)zS!4cF51f2B5OA{J7RWz zgjVLq=0}OmV$P2!g<2v)6fGh{Yb}a@l%y2JQkwkZ3b7@2yRR{Z&ad0W#<{!i;}5#E zsGaU^SMvGu^E{v4ub%Jc`+h!;;8$c?3oHWRkkU9W6jK@r2x)}h386S8()F_Co)16( zWQ@ymsDsS)KtBBw&7nZo=GSeHT_V$3U=c#O-H+lC2q}%Zia z5(7cyic*}F6=aVe7g>Aj^(G#`o@eF2o+@&4bI?*!XmRUgWoDph8m+CK!~g`tVQkr1 zY+Sd7mCKj@%msrq+-xMzmV>5g0DKPw;t!yzDw~|;tY5o|^t2ueIbC;_qB*k|oiPf4 z&tJOm=+EK@U>=-8*|G(clq_V*WP2p<>-2NHrk05|E0gRKBl$oefcO2U_yAZesnk^O zXXcDTRJEt1-Q6@j(PQ_4EgM(Uc>NM{X3y*;?rzoDUbUM* zFihEsWoTMT@4o|yzw2x4Ct%OdV~E+@D|f5$4%Np_fiO{DyNBVaslV0Tf6#;x3V~@r zYyew#?4xk1opr0rn2?*pgNIG*+E>l+p=K^!IK#-1BmP+T{KYF&Q{P4_vT_S$Uz-d= z5(tIKw~pnl_amRXy18)nB-0%Qn3O+@6fZ8vtv^Qy5qlFVia;Bv;%R$@VMrFto6W2l zg%KwNeiM5C$=9cNTrQ)#u6vv~S<6#*kLx{kd+_=E(fLX&;vT(?iVfQUs5^I&()mR! zDJiD2(;vOD{q+0nJI!Z;lyv|H@b~B2Jk~o$#Q~>DXj^_S7i)EPB=jBK)UDdc|P~) z2mgfE4=;dFa0&s!U?*Sz2so$?5(^FxfC&QtlMpG{EAgK;a(CD!C2SGUC=pCVVF~C; z#(r2?arfipR>>a6ar=;|q|+jrCAq0t1kn)rbbpF1I1+c$es5`W1z9y%Z!OwG2Ib5d zQi{oflGLHUdvA`1$483;&t?9+>O{^pD@=7$5|H?ya^{8_-F-c3#-9Dr=!QMpr*eV* z?e~Rg4-+tHQ{FXk@84ntA$>k3^OZiu-pR>W>*+2EN>Cz9>TG?9{bbH=Rc|Mqxc=X#C}`ceeyf-teI&QFUegY>)zXP`>A}ejXn_7Xm7`G>u=vT|nUqIHyqy3$g zZdM)x9o=%iub6S$7e%gwno2t?4P>w__q`6&>bf~r!rB)0H7dE9_ck^L=;DEv z_WB)+Cd0ipDlBWVt>np$`_YXNbe(E?LO77LJ~cTJubC=hZGa{qY`9X_e+0!5Q^{Py zZBvK5$=P*3>?VQPiSj$W!UX)&OBTh|qIo*y)3}L@!hdS6jE%V}2742$t8PQvB!Z7x zQY#`aQG4dq;ZKeSkL`-uedja=XsC-$nCc7;6q3F3 z*Z%st;dbzXGiSLceklh5VUl}$bYJbazwI>;>rTy0b1htJZ}4h%Yr1HW00O|)!1*&b z{v4=U!8kY^-jh?^wWZ3)XWR|~qBNA9G%u|cY5c*zbJCNMo_f8lV_Vs=UnQ7ifQ^Rl z_}`rJ*xy*^$~Fok4@aI%6|KwP_Xh-`oPtFR#+nOMx_?<-%gE6Iee&=PnmUtr8`Na5 zz;y`50BrlQJ$!lev{FsRaLqQ|kDGLB00t5vA18}>p&PR)|6951JC3HntbYx+4WjbSWWnpw>05UK#Gc7SNEipD! zF*iCeIXW{nD=;uRFfc@Fw(|f003~!qSaf7zbY(hiZ)9m^c>ppnGBYhPFfB1QR53R? eFgZFiH7hVMIxsLbHx5q#0000004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00006 zVoOIv0RI600RN!9r;`8x00(qQO+^Ri3J?(rAGbf^oB#j{en~_@R7l4K!3l8H^??WQ z@9+5E@8!Lhn~;PU5+b0)Qa~9&6jUw)SjQ@3y{Dob-O{b2wX)r=wnJ-Mr?xU}?T+m# z)?H5!4=9LQ&dOmLO(FzB4g%zS_xqo}-)}!3qTc%j3Vzf-&Y1?!^WjD&IOm3E6o_`3 zs7XU>oYUrN$|~b-=$X1bHGDA`9If@j7Ef@hfJhLKpHV;RQGb zG!p@VWsmoEg}9hwC8{JAU-I-}B`>%eJD(6HG{|D;i2qXo6Q5@#g9EZOt4) z<;TY1dByR3v6!_J6te9Y+c#l@2MT?hB%#%3M^;Ql)%Xgp^VuRU(xf3*CNQTmQ-{u#?c^5ezUJ zZZyz8eB^j1OdDa){lym_y!UtT6ynpKdhz9aUc|IG_m$yAc1c*Suzbb>LVQJiNr|cJ zx*p|SEs$O&o6hF1zwHh{g9HM>nTe2q$P-5othnh$xFrzr&%+1qzW+Y>9t;ajtx6fC zf~QHsgrFkeGNe*)LAan)>NNC1<%<-FSHP*%4H^VZm(2yWK7HpMgf0T9iUpLWOzJ`w zVbMQ4_w$aGH-NgZ3EU|tp$MbQPy~uZf=3~bBvXojD+AJ?9L&*eCP+|nIh0aDF%8T( zclvZVdI^3&46X0WV=XhM(YSHy$bmU6Emcj82;G;Sd-kQ@{st^^>Z?b*g0F;tQj}26 zBqah0LP97?i0->VpcFBUq7(t8@l*mrR40>~Vh9639{cK8+c)OGE1fuec-bu*Pz;bO z)hEmMeY6Y8z4^JP&oS3CG)67qgDO1|L;>ItG@l{}E!|L@mSiXhF$_!B8C1BaeL?p> zPe4%=i<;rUil6-ZzFSwULO}Mv^TB6(KhX?3mZ*efqdY;XlOa)rQAL=PAc{~zKm?Re z!8E0m8@Wv9PokTp=dgYw1 z{d+Q*sd!cW#jgh`(SG;B?>S?(VP^ZzK`;aaT72&M+it(-{$i;lWdtH1BQ6w^6rdoK zO65zPanp$Wz%O{yorF1fzW=qqA5L5QO4y45$`x#_;6Jts7S9C~*r ziV*}u2*gt*!z}s%l|qByDkM@sl0a|}lM;;!C`PFif)Hhcv^ix5|L0W%K0@C#SX3wg zq^^F($9q1ip4YZy)%CNNUajZT7vJ9r;X!!t-OHD+pv=&yMkxqU8l{v{Npw(~6ABUf z2$i83a7Y*wr#sHr;CRo!Kb2gxaN|99e)#5_*S5`1%$&)ylR^LKug~?(y5{PnEc|8b zQ{ijB@0*-Zggk!h?M$;J)uW&!h0t}KFeV6yNGIL`K;Y{h8yg%5YH`u^sJfAzc0 zy$6=w+<{cp{JZWMh^5dp3&|>&8d7C>Nl$06oSCzp>&d!Bd)mp!3Xlvw~|(&kRyhsCz5@`#M38>me!jAAIEpPw>gH>E(7qd4lCU z8Oj3qNH!hnw5WneqeVgrx|z4je)_>a#8R+rPz9vnPaOZ*Gp&xvezoeld^&e_aHMJR zVh~y3mi~3(^WGCD8#tk5;I?(fwM$V}j#31!BRBc(*8d#- z{J^Spx6JDJ7G|}>*8m0*!pmZ~FW=QUa{T1sy?Y3kv6$7;+Wd`$^ND))v4NAF;(Xd0 zO&g(J=ERG+VqnoTQT9yaO(n}$Ke*|d2Ob6?h+IUj>g^iKRs#Z@+$U z=bPnW(Jo}0>{x+bKRC6$V$K#8w}?;{iDjOq1{+)mr5nwE@Ne}@nT8Wn5LvPt8AQ^o=Okr z($JkCM4cG8XtK2NzA(v1aOPs96STS`1CA zula2Eo~A1nLQlY{IQd0S!*Cq;)Digep&dRUD5h%GYlGVd2uHSY zzHzzliSC1ku3(12d|q$RB>#VpmScBZ;YV8l001R)MObuXVRU6WV{&C-bY%cCFfubO zF)%GLHdHY;IxsmpGc_wPFgh?WL~6G40000bbVXQnWMOn=I&E)cX=Zr004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00006 zVoOIv0RI600RN!9r;`8x010qNS#tmY4%h$y4%h()NRg%h000McNliru=L!%KHZ>hF z?Cbyl3cN`~K~zY`1;J}@T-QMW;B)Ue_qn@w-`dr#*0Ld5(xyyoCnn=pWXpQ2-qP;f z$9?R5KhL>*ANAUw|H+e1=fl?i#*TdY#KMV*W9u7_UF>qHaA**KvLs0W!VHZZ4N!5G zDGOr0Iog_NAjAN7IfWkxF&E@N+5h9-Jt1_So!*YP4!bI^yWEqUF`{x$sM{;Z!XoL<5xk@IR zk@6D9^AW)$0gz=_o`>K1`)?-{I@E_l#~mFR@ojT&Z>u&|ElQ1k&&=gZmhW;r6XO^s zxUY0s0xUDC*T+swRGGLx->eRl9*y`22N*;Yq7jE6!$O1-h!TL{^Cy;uQ6wA2*1;|W zV05Gq$HCTiE6rxko;|z1wG~E@qH6#^+qN5Hbumnr%F^s?4v^J_X$JeMAe1<+CS+ok zN05P-0#QsNLMRF`EDtA(jg9vHa%{9Gz+sA?R?$EK(5-oCA9y=twTk+Q{nwVW@# z^5RQ4aP@%V(h;LVHYj^+87gsvNgfJ45gK?HeT;02LoID}Y^<1?8Q^|e>N_-KF2 zgqUXFVQYINTReVZ`cZ4`m1nOo0{iQmx3Yyg%St@Q40_uP6MW?h7Xym(L#X%k9Lo$f zxj0_#*aIP~0zgB=Ws z;pLIBsgG87+K=v`)PAit(I_u{>C5MzIA1G%;3Q6H&(v6+5%^T^tFQk4 z_;`~?XfE}hBw5rzzh7}S+z!!({bcOEf_;}|p?^bm=H7$b(Sj@Gm3OlRZa(R%*Ijql9N z>7m(T0iDF9VtLH<&CY>R$X7BM{?Xc+;rU)th)|ZJjUe(Mg`6nP70Nzh9z0%uvb#@X zQ!S#n%zE>6aj}uX>hAXA4}Gwh^` zDKiN*)0}$kAOB)n2ZHA=W?oLm{MSwVq z4Rnx{a!agtN|wogeD6&LW(NI%ruRjGgGn+XNq_y-Z%`D{l|BzK@NAZl9Gkgz={I0P zxbfQ2!@Yy9-2ctr`ZUd@?%sP0X>O<_wL&orjD+S4x4;Rrw{Nce_fLQP^>6-Nw?Al1 zG%yt^YNxferVJF3V@C3&2M_MHHa9qqBMHD!oG;|BT)hm7g$YeJF`yC}MVLN)`kC<~ z$1N?$Fb&`7dx5eq$EC`(?|uLMAH4C#!?pJ!ij67I>B~cNkjgNQtqr>Jpx3r6Z+>Bp z7sQJfE=$?m2X{UwmJ3TypN6BgBb>+@zO4>5hG$RC&%1`p0i^Z&+q+LbTHRcH`nMmh zIN$lF@As|tz}bf|YdZd6yQ`{$Fm&RG#6C8L`u*kQTQ_g&x`kNr=FRuJT5o20l7&*m$|QmIr*rzMS|R(H30?T1*L zy7bDYzWi5zBlp)vYj}IVKQS@?*_S`}+_P5~=cgnIKpI40{O&uq)*o;4#mqbJ{A!OJ zK#qzMlFjGJ<$7;mBSW=vQl_)n8OaqcKXY}^vu^zOP1mzLgC0M5{LzluTzIPg>z1wc z6W1Ba{h$2TkM7*O?Rg#{E<|xQlOFU<60$|Z>V2JXm{FyV)OwZ2hmNV#+u@g^QKqOQ$GjZhBuYQ@Aa{6#+nx-tbw>H;xL)mJr zwl+6A-GQdtif%_Zps1J^**Fa3ZdV-)fA-ef@P)I_zwrF^v9Xg~i}tt@tQ?;_d*#^D zb5wzS@#W8+o?A@ON$226R-%eIHpO6f=wTA&%LP82fn1swauP3!JmRx11Ti33V3Gt_ zVw%AiA~p-VJxx}715>elBP7Af`jegQ-Ap>WurLKdYN$GnWgYBoY;LYFh_2Tfq9i%K z>nLkR=NvNXpGJr{%lh$9?Dn4)+D^J8Pv6q}l;R0|wW57fSxl1L(uSU7rQ z`qM9cVzzlYn;uzNzWe^|HyPHgRSNt2`<6{`5+?uvhB6GpcRfkWL_xSG8zaS9tx^+s znu0+TC#s68l^OVZpZm7y;&xy5LK7!J5@Uwu1(v_{-v8QWI5s*y)tn?CSXp~~*zTp% z#mkpoDwak~!v%yY<;&Gl{m9tST6G+<)JU;ZuU4frLsNn8y9WodC~<1p0K{-EEp6Zd&&L{QRw< zrM-Cl`qI)xO$%4o@5$Xg5)U~hFov?Cwk>37?nYtWQ$nzE|(EX(G29@+tp zqk%bW=6QROfg7=tQ0}o;W;|+JzZ4=fdv3#5(+#~`ikR*Qa;CW z=*jZR=H6g-_Nj>@m8oXa($#x+ZkxIm$3W9vj49i21SSnI%_3OHOWB+h1+-(6{|EE; zKDfow4)6c~03~!qSaf7zbY(hYa%Ew3WdJfTGBYhPFfB1QR53U@H8eUjH!CnOIxsML z>0AT=001R)MObuXVRU6WZEs|0W_bWIFfubOF)%GLHdHY004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00006 zVoOIv0RI600RN!9r;`8x010qNS#tmY3labT3lag+-G2N4000McNliru=L!%J3Lm#W z;+y~g2&hR!K~zY`O_o{6=Vx`tzvrB1`ECFI|J^3@W-=zWj$>kCVpKYoDm9L|Ni-0# zcfC-Qrnptil@}GEf|TCmQbi~&6e?ZrqM{Zr43e}aUf9eG9cLi3WagcBnfJf^wrB0d zKQ0ds2M&kldzJ?dA9?1PXBLY^2th=cIp;i?)FF6gt&|o~%)-15GJqyeGIQb##jLqd zR7$CRO$Yuyv<}WTHvagJ&YXGI+0&=*uj{%%ShoG8t5>gI zz5bhDUkJeu@TyR5@Wxs|>8T zHl57Y^C6Pa_pvFai$sg@ni_uf>T554|KEQ4%6}=3;JqjnVI zZ+-LcR;!g(JPbosT7ob!=NuYae(_6xbMGS$9$dY7zcWt z_xrySEO?cHzs=H9)8yUEEqdczXZQPh9h}gT)Q_pB5o5x`qJLB5BT`P-hBLfXa6N8$*X=)BW zYqi>&uZ-x;t@+XXl`9vNPs(^1N^=;8;$ZYVyzScF$8L{r?x^=KR#z>(W;ZWTb$Ctj z6+a1kbsASZ3q_~%vE}+&&Px-y?T?Dt&HCW&uD&;wZDkL_ybj(BgDVt~wYyZFIJvXf z=J(z1Ke?~QnZHDbzm!siq#RSq5iycOa>!{AOnfsWwB>3t@~S>j75=Yp9?kS)-`zU+ z-xJdJ{$wtr$m{c4bg-hLskf7^Hk*mki{;(cM(tz8+^wq4ja?Wc5`(j_&xk2DRK>jP zs~`@OTs3k0Ea=lk{b$y3=G|uNj)W+pj{9EYaQ_elY;H|Tz#3I<%@o^$N`hVQC>D^s zwXq0LAP_UFDT*2J^^+Sn#r_AlC;YeJ)UO`k>j%p( z9rmy6$<5%HltsBfKzBT%v`7z>^+Df`5@U9AqYGz12GE#+AvnwGOo8X1{z270VO%!Y z(^vqRixI^atS+D-4HIBMfaMZeTfi6;z~i&YbJ!vVD>5t!z_gU9C?8WO)Xt>(YPa*j zAiF%4aZDMzY2zplt$-rFZ1O)kuQrR&(Ugr>K#V}hl#t+6@%~x(%yIF(?U4sPWHTZLPJzBc1wFZ?0;-7`ivyGG!CW z*~T~?>iM>}B=8*{D)Y{QpN4;z@K$Pm;QYVu_%@gXSsm?LAB?D8h)}7ClNfv;?Fv=b zQ=4cCJ*L}P3LZ#h$z_(I%Pv)BlCWw?2Oa<1r>CTxD0|tDFWKQ2amz7>LggE8YPi7Y znIW}O4y))gWnd)dJtb9^OBI6C5|!a1P=@cah$_{XJY_sV{CJ8}9#!(oae9Nz6`xV& z+_&Ly^yCIWh!B!St8)H5p5&BV-=~zUwYGV04*QF+?~}K%XJG#%xQA1B!mBrEks~#6 z^EZ|G*NuF^6tj3DtZub!n}hqU7z6Pw#9HSNtwh9opHtGtNab9yInf*MapQ-U2M@Q- z5=JRp&}=6ESE!#Df5~QI9s03f&J}SOdtzRb6;h5dGK1EfvQDb4i7}=a0YLK!m);IR zxxKe_YF^Y;95#pLwdOdJiC(2P=x#J|7~`_bKqBNUN)b_Tek~{>WQXz@IyxXHt6d5)MiGfVtaa9eN~~m!JPTelx0bvsB@Xr#H%7o zk`z^D7Lzq;7dSdaPKcr^y)uxX#RyrWi798SA#-_AOhK zExQPz>`Zp@FxEU%|2=;^pL^c-b?^J0_qpeubN~26=;^4lf+1i409Y{^Xe^D;KRQcK zn~!VR=TDrI(BmwYWfT4d2fdV6uGAL;&X)75yI2?|k2}u*Jr2i5e>up85@oYN= ztzw|jDKw~6nqlMy%v6t>dv8*Gn|tIkV|{PbAOdl15ociB_z5yMo{t^Io8{h8#v(t@ z)RJ52{tc6-dA+iKLX@n08;Vx=ne`%`3luREz&W|yRp*yXttch94N`;^_mlm%i#?`K zXO4$s2QQHmb6-b>@(Wa7bTr$H2H2N)Rmy>9pUfBlG0sa4FF6U`jYI3W(B6&+iti4AeUgQ!Gly%wy`3Wl-wEj=3cqNJ-p=9Du&J0!iYuO^BY3WE7Yz22NC z7==ANaf-Q#vv|H1p?MLl2G3pEFJ_vg_7hlwS6H)yYLiHYx4B5hY5EGA^7gIB;0tjq z?B&%eMY6RXl;9F!Y6odNib=Y`szMY!YNDKmO`UG2YxHmQqs%+ojo0{174PlwPr`NL z(adMSBiQQb69xxgsaV8-St}!Drz4(Jb2BE-C!R9xgF((-#RMuxW;yg0DaneZiN4?z zPu@voS`DC6(G;ZzW1wT^k|N%dNOay+L}U#63n789%T?VO0)7X*@4~f5l0bo=kC5Pg z*GxH#ko}i8C*w$Mb5uy<)SgVzIf_rAX8u>^$}#-vcWIb1ZD2?4|s08cPQ6jeVTFD zS9V>Wj0g{Q+7}#;+kX2|929c4OswAc$_X0H*!Zlgu%qyXPg*Niu7O>TQ``{TQ2?13 z)w9Z6QJvHf6FzQ{PH)H=cKs$UwWiS6iaWkLAgQdB&Rrk_5AwHWt1~Z^F#IK5rYexxyUnC}#OuVy!AI+U;Jd{4@t0Bo~?YyR~oINMJ_0 zB-6YipeymYECt`KJ^I*GQkId60l1R{#bJP*6d#*XZCGrB)5eV@sO+Cc=?`~CLlAXqH=&c`(3l+y8(K(z;3so&Pr zQj`5x+z9@?8%k#oY0xsYwf=bZzSf83(CPoIkt*|ltj>8sll!*KGAKn46(x_%B!)&N z3vNZOet)jx4fQ@^{^>?6l;aOjwMX z_F{!6A-pCHiwqxpXC1C!85cvF3efQK=(TJ-zS#5D-oQX7 z()Zxuhn>{s1NU21Q9WDRO2_*L=cn82j07*d#Xa^TD6uK*+1)a=dOo?^UpC!P8#~3J zLUkGWE+>0bOQoK!1)DS+?bbVoE>&~J$Lm_2#>OUw!xP`{#fjJ@N2v3a;R|Y+D1klq9|4d+0ibL zvDSQ`r)&1%veEkQaix<1CZ+v4clzkO@GEy1;_&sx!qwrLuY+I>oA#ep&bAuH2#HVn zHkUE^pLox%Q)auQ71wR=RY{C&9Y?8;RxrCCQl~S1ulp;WESKKx?4CKc8jTan$3@Fq zL-;gpDneQ0!Gc$zTGk3i?y5dD4SuKpEIsIPy4cH_L!2Amo7tU=N@&{OI2>0xr6vfR zi0%63LyYxXlITTw_NEl*+tR|AELWmH!fRBMTobVz+YmAt2PJxlu8@c~Syl)8l5JNG zvd&SuoI-o3I*((ciT@mN0&!GQEwxD@nX_0Z*r&}{^%m+lN_&Xr=PW)mofze07mQ5gXfMwrcc7$S zVU=0gVG&$};kBX6l!ozV- z-TOH%h`}RoGculW%31or7Btg1VCmGNU6Uv->o5^*pt=7xv%h0@4eU2b%rM(SeX|Gz zec_FZkFOnts7`5xq*%{Gu!dwvm|lLgCfcSeg&Ys<2p^ZtHzAz<%sJ|Ag4phKEpBY9 z^}5x6lhoHA5#=sC%}l^T!s706vs>dBc)z$1vKIsk_fo^rSLp&^w@vj#G)UM>nw}LT zol-)$d(lj;Q$Dt++~7j77XZ(P5Fgs!eoT8vw@vQX*G2c$)WWW54H<+C znke`*YBf)`^@wz@>J~gEJptME0FffbR@(9BBJqaL6IIbjVfEUB*`88-$nfwzU~!bE zi}4G>2t;_$pE_=sK(e?Qo0r(1rA1%xMmUUxJdwjb5BY3SeGxJBRuG~nC+D?0BJo>5 zgyQ e{7>K!(Z;DH(GHklE0Dw``L6_XN2>LJ8d)0&h literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/q3-icon.png b/lgsm/data/gameicons/q3-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..7d111da1e115035b14c2f9e34f74622660048d32 GIT binary patch literal 2734 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 T8cPe_C;(VnIAH5A-l_iuYp(db literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/ql-icon.png b/lgsm/data/gameicons/ql-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..5b0e5ceffccd10b9201b2a5ca7937c4c62df9013 GIT binary patch literal 2974 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�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 IG4T3-0YBcB#Q*>R literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/rtcw-icon.png b/lgsm/data/gameicons/rtcw-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..d0fb797a7a368a3eddd3731240c4a0849f025e50 GIT binary patch literal 2244 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 literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/samp-icon.png b/lgsm/data/gameicons/samp-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..d20d3faf74fc1ef829114dd3836e944b1abf5ed4 GIT binary patch literal 3026 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 N(A6}8y;paL{x9xjx`O}! literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/sb-icon.png b/lgsm/data/gameicons/sb-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3baf0a116c838149b4f331b9bd105a1985d5d313 GIT binary patch literal 2598 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 literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/sf-icon.png b/lgsm/data/gameicons/sf-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..8685b4ad5763607075c2091bcb5ae134180092a5 GIT binary patch literal 1649 zcmV-%29EiOP)004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00006 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 X|6RWS0^Oc-O=bWf5yJ3#93=h+Owouh literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/sol-icon.png b/lgsm/data/gameicons/sol-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..e2589b0edcca248152abf5df25e4818ef3433d33 GIT binary patch literal 2978 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 T0l|Lj3;^`BjL}t^w&DK+&R2Qs literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/squad-icon.png b/lgsm/data/gameicons/squad-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..adc1464f8bc8e517df0fd2b8f50e44bf0523c6b4 GIT binary patch literal 2321 zcmZ`*dpOgJ8~++J3E+YY8 zApihS_W?jLhTiC6E-pw1Ii9rzL_fT^rR-<@Fb~S)Gb5 zHVT&dxz@=(!m;FyjgFyG2lqNg;UexyklCNLd5^e`_QiqW>()Qj>YpogMn})^sBb@>MckHgbWFy5V)Hu+f%BMi(P(HEE`sZ#57cOJ;WZ; zIHN3}p9KJUG&mtIjr9|ADCr~JvZv!F{`1s13DEGUq$s%}Uf5*hY<@#mB!yqHPS$dD zcu%*Sn-oND&WQM04^NYx5rkXc$}FWeKJ=8Q9FziP+Mj=d=frRW8>U;2pU%6veXRp( z&SRc7W$mtKoun-;bx%D3fq(`TS~ROWx!=j@JkXC*w5$GUb}-rMMu@5)=F{1$*l50p zeXQtr{}s(3Mc`Dbgwji>lFCtNeR;hXVi76sXfsiBmSzyTGTCA#w$rCuBSv&r19}T| z?&Y3h>6K_U7(LOU0MA+(=CD2dp7Z)HTKHWmuK9klkuXzOOC_^ z8eU#6otyP9!1mh{l_GE2WKyZ&6`D*Q-?Nfp^1qXw5x$As65|-LZNU4 z8t|8Lf3iIXlk!sYnH2WE{aGLd;ew&$Xu@UH zNRi|9gy7)djg<*7Trf`Tvk(l*zUaqg6)V?UOE0SY^3=w!dsIgyU3Z@2F<0K=w*Ps@ zXRgB&{_+-TTgprj&Mu5zdVS}(1+Txqzbi|z6ah*_+^XdP&d@#h-`ao8OD{%fIKNI? z*jldIUk2}8@bErwQr@~A9DM8JFMddgWi3D%U-;$%)NVL@{nLjRtk&;Zf^pLg;hpJatEPdlVy_cdJ zRxL47Be#EPXwmJ2>a)P{X}hvPnNu7!GJ?6Yvs328P(5_0A%2-ZPviTDT9oBX0z>EKyor`<9M+KXB4h(0~A3QkGI|eZZmGDhbDK687NsA-R=d;^3 zlV`pL4SF7C*EytnlH5H0$)|Nvs@1^e3KeYXTSIJ1p+2WMIwH!ufX7GNifnAmP}Gzu zx@N!oF-mzztL<7=Q#j_k`XWxlOi3MmgC8DJQKgK5Bhas$`h~*U=#K_{=FcuopdxfQ z-#FRISy@@6sUj0X&}`3LeTTctD^Y(XvF=vR+t$M;x4pKv?p`?YA<#Ta{RGDSBh84$ zJ{Ei6H}I3;aB|+_2#aBvGKm`-7^sdKJH<-HJ3IO82s0Gwt)UUG$2oqZvOYFsdUDDAG4zS^5`rjov;$pmwDh)T zTGb&1aEVa_FD^blap3FIJari~qHisnt;N*tt8@6k5xF_cXS_Pus@*F-Ctp{ZRxj~u zGl{xn2>PnG(6ui489C4kx(C-ry5{fCnBu6W6IbS`A%{5c+JvEh@CqRh+1xeroEh`J z2sW;K_)9Slho?Y(?OTg)ilWdMjIxV`t_~Rxt|^ns=5;T!?$6@ebF1Z@!5>0yxfZHt zLOSm}Ag=`enQTkMn6)WBfB0qeM)s0j3beXUJ{l{!RhTc-#gCB-4!(G-5_#dYX?5Y{JB|d~=YKmq+t3c{T^m2XU{+gOYiMj- zMopZ~JiaTJT5*tJ;n!&scEjEwg=i3NbY-8tJzbU^yQK4?~c literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/st-icon.png b/lgsm/data/gameicons/st-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..67ca7ade62ed03f47e5f339664e73d52a7448f80 GIT binary patch literal 3083 zcmV+m4D|DfP)004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00006 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 literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/tfc-icon.png b/lgsm/data/gameicons/tfc-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..f04580e2c3b7158e82b59652f0eb5b53710df0e2 GIT binary patch literal 2349 zcmZ{mdpy(oAIHBk%p#R!bT~8D!(m_MPT9uFV(wCjW|%{YTtYbRCzo6z8X=WSE+hBr z+#-o))KU~ub89HV8Od4w_xt1bem`EH=jZeKJYJ9Yzwaa)t5c#dX&3+iq6Bj@J01}~ z1>MIxzr&Xw{(QKb+Ytfax)K0H#{`nCn6}!-xJ~H@2{x^z|Z*=e8{~tX3E4q0``%rDs=RO zzXTqtP&kuNhLkN*fACE-=DeJZz+oISWkHAd@~JvqG1cCPATxbjcD(TGaDM&x?1!5~ zH;efN&d|B=)hOC7?FH&L`fiDnm4-Sa{A>~CW{(usz61jCLJ;!Kn>CnwnUiFry9KBS z$7FP#?JZ`KYJP1^*Un6j^?hS~OAH1B0Cnf&fK!XBX`>orS4!g!_S*fyz-wIc3I`x* zzRqfQLfR;GvawR}3Z(cL1RTG)Xv$uV45{)1^-gqRFbKhnS$Gkye)38u=NYa2^zoJ6 z@XzY@c`+cIuN%{Fo@m{NN!3ORkb;%L0>-D+cSRCp&wWRa6mw&Pp$#bpMN9=#~5~F+SeDR!dFg!ds9m%>9zD%Ce4o{ z)*4$a<$JSyawVQf`n@pD&`|89=`lh&}`7wO(zZ8UHn|r zV@3G`0RL96ccIR*12l%RQ>7wamR%(CJ2)G(@|?d@gu4ZDjSW-mAf9Bg5L# z!5UTC_8UgwDQuYo6bJ&8|Fau6m-(hy6uB2jBI+3b96W`)d@i~ij$h)x5b z67PWD2PnyM`G1$bX#pggy+gy%M;)6shD0W8$gFzw-gccw`yzDceTUY2o6Qsb ziOo!`qrUGu^tLH+n4?rak?NfA9e9YanlSTm+K&_|9~I%ViNR)Yrx!#Di*qreOyB1m zW{ie&vJ~`Cg&xjfIjS_oTOp<>RvWaVKo823j>>7GGfB5;lXdPQ-6CJ2aU^q=!aCb7NJ4EP~>s66KpYU5n!34Y~1W(5mK@ zuFjXXTUk%V2TE5B+xBYqs1fs=%(BH#2|jsWjJ7U>Z7ghN6wB1MKGxKJeEHExZZShm zmM;|$eS3f!_VHA1zi#UdPHxPL+v@zX@17~ zGg%uKqH68R=hkiI-&603UafVf--5B2R#$ z#Zqf(6k9J~^J5<0v0@Yyl;@o8A8ehN!OWvkH4*Hck6dzol{~Q^_v}$}Q*a-EvA4(* zWu4sHtS&89KbyiOV?XB8LwyY=%i;F?Sx2^xf7xEd8$@3H`x@S&gz>Ohgy!HJNcj62 z5h`!2z5j0Xri7VzV8QXp%+yAcAKb4yQR`dd(-nmmPlqgPbgs>PKZ#a^ka7IPzHhJk zCZ42s(gTaX?L;vw9lkT!MnAMW{26RJi(y1;Qd0kJc(Td%+Fy4rRac#AEFP5_$nJmoH7gKQ#84Bd z(gB}FLh9HuE&B{^SGSS}9E;*^N5@7!2pmC}vs zN2|)@*(*!WC)Sncp#0tk(U+%thPVH5@zgwT@seFqaY}o`bz@wtbHehjR3-_@2!9CB z)NM+!oxAnpZHDX3kyl1K-%q-RhMit3DDEN6B_4rT-Y5IV6(mdrxD}iH*lM8%`-Ck; z2n^%kg5pqMzM}$G6wNP+C?fdGPr0~OvnZ(2@rx$gHOkhzVi_{JJFF_}S(k9E8Jqy}NRx6h3aZf^7y6kN?oe?z%7 zNfthoJ>(hkk*J5Foyk;?K%F=&hMG!Z8Yth)Z)Rn;Z5iChb34SZulC^$Bu8_VERURs z6-P}O+>ul^$UHHRKg}+zHNCONUyEc!PnQ>wd3%H6&%MFJEy&Z*J;0L(Knv7Dt80Sl xnz{~}dWN8ZAzDWb1PwvZ%%^Gne*%~NJiIAk|39Fkcfgt#00?+1vuYeE_CK6_Lwf)K literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/ti-icon.png b/lgsm/data/gameicons/ti-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..0c6e126dd700138fa7a6edb1122ea0167f961eae GIT binary patch literal 2163 zcmZ`)eK^x=AOCru8I7Y_qBc>crEQ4KODxLPS0(K$;h;aPt^e>~s&`rM!E`h2d>b$##qy1w^)mU3X9DcA}O z0Dvhmz>lhB_z!?|wflFNx=Bm=@xEkV0O+VN`A#$VVKM@!WB|zB3IK&{0Qjbr3TFWz z0}TN0V*mhu9st&-)b|E@Y7ImB{(XMH>W_6v(psfej8g(aPXK_~^B>SL3iz!>D;lK} z$^J%4Fw`8pxo7uuy;h+U{d|K1M#v%iljULSy$m2iJC#ahZ3_{Jk=AR_5LdFv5D&8#6i6Z>Ga_rKUIj(0^!V)V{dadnGQh__i!Z-`P5Myv3`s~f zwBO7JBSlLsLk^P$+l&#!${21&ft_)R*?ciyXEV~Cfhx6q)EO5SH|=i7 z+rZ#r;Grbq1_qowgpOGPK53M)n(As8gGypU5q=<@yJd~XT&xC}F@d8wlBneFFv>=E zG}#%l$B<`FwD3141jt=v8tah@b#+_VY}%DMeBtrhxc2cN(o7oe$_Q>BXklqNyoWWG z(7m?_!3I31-OC%#P)XFdO1o2XBJyxZNW?fK@y>FHl=llBlI5ar>E?PfW zHaZ&fXbSYl@svZPj!#JRzj0aC`;Z1v&CJ@^(7e37y1Kg4gh5TeMB+6muBoXpMzlvs zuw>_|2cG#~C~_B}Wf$nv;QWA|uFq)-aI_rbjl%_!T0p{`$|%vuDBA#){tEpGhl>3fo%FXylhR29TIA4i((rGm-dC z6H53)QLs9%g|V(8V}HY_fzVwb1Dk)&y+}=Sv2sG8EWxKEoN6A0wuMtkwtN_e(?KO! z6rJZk?L;XSy<~b1!mH28ltC4hR3|4V@9d9LA3h|qSbxpV&JLBViFr5P7TK2;`>^w0 zte$K9t|SkT?seB=21t87GwO_iZ_3QWwIiu_(VslqquR9-(Jm52N^&z25`L#R+-%F! z4rt=8CWq;I6GWcml}e>*@F+Osxb}$G+H=&>!NwThK+9O{h2dfUlrE7-w7k6hI>p_~ zOYLsf52+N?)}~o+1L=}f@82g_kJJZEipg?rBghIGQSO7}UFCO1I30Fet5`g#kSR63 zP$jE| zLi9YhL5AoZ_i@L2CbhNvOEjpXv(tienOPei9=^L^h5IHuGxN`kmuVB~h1@{PldCK0 z@%HHT>(^gTuib5lN0%|BM{XBVb)$h_5$A*U7ig=|^tU5=R z482yVkX?>%ax3jzzdI$nDuaT2dy>oVzFU;d@#^srL_ zg)deb(CEj$`h-PY{!}?M>EnyV;`Ei@u&0<+m=+$JU!p;t)>#7%tOuL8S2Tj&LOP6& z;L2~@xUuCYV{1AADt*7|e9-FU?cqHeK9Xp4XneEWA`v{GOPYEeA0JQfOSNtdLVZ9< zbcTaS=664C#^Z3tgZhbjnY=crZwj273gZmSZ)v`x_f&rkim}tew9(LSlIO8vuy@2mIOyF-89cq4l|w literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/ts-icon.png b/lgsm/data/gameicons/ts-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..271c5bc70b125dfcfd52e8bb7410ca8a6cf685a6 GIT binary patch literal 2922 zcmZ`*c{J1w7yeNggKU*adYLSl6eeTeGFit`4T&@;j3sNf>=aVQQpVDZNQ^$R%f3b# zg+aEl3|_K~ZK{cp_0yl-sha>p6A?q?z!il`|O5=5g%9-3;+P1iLpNV2qpeH zi2W$;LDut+;JB-vxgG#irts|Dmz7x>`weU#vf5qcW5_rXc3R4NpR~c z%Du~dw7b1&a@#K^Rv;aM74u@`1CEn^g3;-OaSuU(AE>8bPp8=>9}SQJ8ItGgxTjg-k~xkH=B$VFsA*=n{w zr2&nC8V?QEu5X--9A#Ggemi^o~4vxLZ9=Qh1$pCFa#UanqruH*g zCv9JN5U>QSPOd6%{#|*ppC^P9nP56-;Q)&hc!_Q-lZzd2n3DIWplI}qK{AapqHIaq zMjHj0kGxy#%l_y%N!cySxndo8za>z5d#SZvgvA`~Fv@Gqr4V~f2h7;K8Yh4RbwPmQ zk(I6WNs-|GaizUEx$=LuVZB`K* zv*&^5iq>FK5zwBWKi}v*>`@bxuGob};owW$gKjlJo|@JU4i1OS z#a@$W6igag(A3m~KB`8gQm0$O*xCazJyi(v$tstgeb&s(;NZWb<*&Y07VPx)=gMmz z@{|4IFNj{Ew~sfc^=U>f^YKQ`H7w<7{t)LvEzCU&w)han4S?f1UPv0{g#Y@IcH#O7 zets5f*x& zI-QQp8}O)6?1~kD9(Tf_MdSY+9v=Sw-FdP<+aKe!PUhp~oeJ-{11x9hUYHrU+Wq*o zvS|xW?jUiW?vi5tenj>;Z)d_h)lX~)LBiwULx_oB0i+limX1QBDC&T7^|)aK0X}-W z^dIfe-&>Sltr5E&k1q1{CU1m@sFq;1d!kC+%NiGCcDbUG1d%8hOd2?@=Lm_%e?yqV z((!0e9{j7ij|vf2c}mWDZKiFe>eA6l#_IVV?1f;)RDGtyrwKS6l*Zj1$XQR8?-RJ^Ai{g~AoLQIC> za5x09@0@0knVH#t`~r7YXWEwz#>Ri;ONWW~6DpW-Z446xPSCy@o8)5aCFDjJU96t1 z!gzPt5Ce|JG!_;X#xJHeFfuX{WL9e3^yugPlLptd8#l{-3X2qFS(J-K%{e&#M*(y2 zO4I}{>rAvD6gHOC-2@Bafp(Cf8R9D`VJH^uVVi-kin3?Wdl>6>n+wP<71+S6TFVXD zP^C1>)=AknuLGKFYcWZBl|pjh77SpaqF49^rZy8u1P_W zUNUx_%tb=xqP)9j{D*cr6=Md(^J{jOqjuFVcGg^Qhz`uIl-5ZFJH2aZ zmIQPd7`w$6H8JDoGn^|epm z8BCL&^u+eXEi}BM#+~Emm6^>^Z#w+;fI{?%zP3 z%+2H<9fa|0Oz1ZpFFk|5^D9*7OfqdmH>I#7iqi4LFza~ce6Ja&ZK$_}-~xj0Jx%w4 zXM`;2yFV$fV$H0Lr4q%upM#XF;VW<(H@oJyGpftb4LqUKtQEXa%=-MAdX*1vBy8LC zZr-VMx*?OlWkY9kf1JP~SMiJsFz$-|26>T{_Jy`{o^Am)6*>5Inp+XhT7{-H#- zE)Oe=tBe2lP1WfZ)@Zt{wbD&(Emaley1Q^q$j`ElT$+RKZqw*5(kPLPg@ztKUr5aj zKS=Ri`z+LAP{lt|9u+|U?J;p^sJxT-pgVMJ5@XxA^J8$$uKY~pCFifywg5Lry2!Lv z4l2&70Qn-4z7=@5xl$2daiWp+bpKDoDH6R(u(p7!l?bo?>7xL9;fzS=Ff@cbsMA{3 z*%#&)dWr2)jKaPQa*B!?ii-Lkwaot!c=>4tq7;B2U_9cy_M9S_;C|kCY zYndw*W^7mUnz1#OG8oLOKi@yz^F7b^bI$Xe=l|z{tu=<9_Y5xpfZxm%ZGS|GUxIKR z{e6+O@*^AzFtjoRpfQtg|LXByp|7dE6#&uF03;*>uy`+I+39JPM4cNb~wDV=|k;4;i>KX}v;`v|VxLu)t>&WEBn^~D~(|BQUUh!7_g<=38 z>t<*}N7Dh5M=`Z8Zbl5yHrr98tuDq?QvgX(MA3En#shaBPelH`d$kfKl3vK*alWdD zIU**7k2G4`O5Fq#v2M-T>zL*stMba4`>CaM27BD@4&_M?%ZB9S3pz`NSY4#8_F+r5 z76pG;Y`M5q!q`{7OJR2L^V_EL4?~57EuDldss;shJ{0nC>29j?aO!4OY&Q#xHdTL> z>M^n7bOgW_06_qd7nWp%b6erD-9b? zf&zhTFaojslE4AAguw}a+Kx%UOzef7M%>iQus5vmsh7(t9!g5Z^gHy)i*OW8eNYkQ zJbNaK1NOL#Q=)n*bfhF=ujQMP9;M)?rf2+@6{dIG-cXC8QkY$Xj7|Ny*ng?b%()> zyPP5kiIwK1;q-Mr<_z;*L)^i?!Pd%L;4w$HY!3OvyflEp)Ra|)jyvU&$z%+Bxuvyh zS1##Q+pA4#?z`$f1R~@cB@w?rcjGalDy=NTYm{!GC zy3oAv#H`A224=$a=JKlrbK;Ys{ukOIePmD%{5Bo7}p$uI?L*!V=OQk9mpjtMWadY{d~Yy9O{WB zOFQde^`(tMnsmYHR8vsI?ifZq1gpzPk?XZY7pJ7rJXwaAXNyF0o5={CQLkuv59x=@ zr=Ribv!_~z7w=HB{+7Fa`@GiQX=J*P_qOhFE-GwIyxih`G#4AV2-U>CJ z@xafUTJl%QB}?mIl6S*!UAHJktogn*2o_8``>09nxvB~nqlQ+ zsOl&3sW^KvWW_UeHb(hlaI?SqOmhfARhM@Es;PFAC#|+}>lo~lhfIW7b2Bqn&TZ~3Z1(mPF<>T%>$xxE?{~qo zazdPpNgYemL*y1iEb{DT`1-scoy^|duo2LUt$g|pKl6nZtbb9+&(+JTx>`xheV5g) zcdKWJ#5;Q7q@IQifn7BquK(svW9*_cM(+korfG~|s{COv5LHCF!@7vGtopH)CQ#FB zyOE+FyZ!Ddp>Scb@7?Y--R04##$01dgZDd$T$!lIoeAgf?JvTxRd;c1-l95pXeCiN z-7r<(gXse{Z=45II(H2D^kgh{;P#;|j*0TWRknqKhBYnqH-4KD8OjrxP;1Dnl$7t8 zkjio}{fq2l@rg0ncr9pU^V{4(VibWU)>_=|%SvawU3;JZIo()+OBSY+NJXlhXcXVG zpJ>$@(@-h?Evz98Mb=tj>ELp9{+JJ!!fu^#U)qyH_G;DrPj~=?0iy& z((ZnF`+BItn?JN@Vb4l)c7610J&tpDFF!^(qG`QL5X%ZZ$bj_f!O|zU*&0p_7T34G?dgDD6P!G1D0ak)EkCiu0DQe za{0$cLH*myeBS$~+F#`L>%r{caJUf~E!A7XU< zoyG$u4(0-}*4oKeoGJ{))xcdUXSa{N6VDi{(oIZ4Fj0004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00006 zVoOIv0RI600RN!9r;`8x010qNS#tmY4%h$y4%h()NRg%h000McNliru=L!%J3Lm#W z;+y~g2t-LlK~zY`J(9_bZD$q5clR~toO|n5)vJ0hou)Cdi+PYlO&}(AprGJD1f$rD z9qIqzR40Pdj07=6P|QS85EU`R;J|?xj0VNT)T>n8TlchIv$umME`HcPPsSfoLv&->nxG+*LMA(3uX^+BSL;%5gMi2r76NFTx$~3ut&Z+g>0_1Sx(zx*3 zE+eyKfi(Ad?331bvJno4$ZXUhDvB_+WNOGoW!1D`6-x9}eR$|9bJ*m!6b2UVZtuzh2IEN)}Ppp%I25%~ULcb%7 z(F6$*9H@Yv9Bk4uiQ{hNFR#v5D|-KUE zzIuA^X%(2fg=uLmch0q&>BDHGpE%SS?aDs}%wj z0!JWhUPwGKuXf{=)kLK1=;ZWRLFY6nMt~7;MhcxH+jNoZh9R*CrVF_He!+za$P_%3Oty^z(wwc8JbAR#7Cm;Fn zr=I$c)@z%ivb#XuAfu(l^3q8_<#7UNT&b!GW@b=T&1zLu1(SY1h0v9(!9_1YM9;Tp zt2WHL@$pYT^weiQ_~85B{ioOXx#!P6{`8GU?pyiFE*>GzSZ1yPDy2omxF{G95g{6( zAtIv{L}}Z2tDYYn-$+whmO+HuwLJdeM?UxLM>Z!%LZW$uxhwU?FaMZcKTkK`p+_h2 z9=~$9v#B5x0$_qt0RV`|6BaZeMMMG=!{j_n!_~T5cWv12-u%w@zI|}iEpf~>mOZSF z+QurVwkQ6q%&+`o7tiw3_qEPBr-Vih6_=U{C;@>n8DLeb0-CLo2oPx3g}f}o)lM9= z>(Fc*FHIMmVaaKbw#`~0!GXi)24&{2v*WUUpHO%tMd;UI)c zhV|yqfR=ouScds+;oR`1Ox$1f75njW@&KI|SCg1}0Y%CM zYOPQeK^aY;5>^BQ0HT`NN^B5$c9J%&PvhRPKo|n8qO1#a#gbmdmR7^!xHg+wFZ0&e z9fPiLZ0djrGBhvK&Tfj)3FhGtKkdwk;r5 zuwqIg+x^zXFi(55?3{R}JdLK+i_GIV7dI>4vR4>akZ{-KvOMS&0ECW zu%otZmSu9DQ&|+$P}l3VnKi3UYf0lkga}qrLLyLIN1{4K(m?7ccM&|#fc-KJW@g?` zr09Sf2Ir?)Y1mx}K%PeL2&~p+i6L4p}=gcD+OvQZ{teCKS4(YIjm`Fh=bke&&>|wtWLgl7h>Sf|vz#1K z2%N2C&0!Vq80PF(+X`=7ZBySP;T5-Uj$Zma9-JPvP0Ljek2a2J-|tTExG@i7E-Cs5 zsHLRXMrJN02~>^@5FD{t1ta26Yih6G+%8*Ys4bIU_kI8OtNQwm{tM}Q8`=QZC7%EQ z03~!qSaf7zbY(hYa%Ew3WdJfTGBYhPFfB1QR53R?FgZFiH7hVMIxsLqYPRzL001R) zMObuXVRU6WZEs|0W_bWIFfubOF)%GLHdHY;IxsmpGc_wPFgh?WH8&1V00000NkvXX Hu0mjfijhn* literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/tw-icon.png b/lgsm/data/gameicons/tw-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..cd8ccd809cac1682a4b994c748189e9ae3555d70 GIT binary patch literal 2644 zcmV-a3aj;rP)004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00006 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 literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/ut-icon.png b/lgsm/data/gameicons/ut-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..8c81e418a3ae42c78294ae7f652b44e85c6f070c GIT binary patch literal 1134 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 A=>Px# literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/ut3-icon.png b/lgsm/data/gameicons/ut3-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..1713a35319c5b3e86f8eabad2156cdf8a6f722db GIT binary patch literal 2749 zcmZ{mdpy(q`^P^trzK{@NRA8BuqoV=G7Q5|qZ4wNbB>wwh#`_w&cv9Uq7YII-6T16 z&??-{Dl9UG*6kR+y8rwA@q1s7*Y&*KulM8ic>jAPpSLnS0+s>;0C2<%k0TyX?vMDn z5BhHyyZq0^6;HGTfJh|(h)n>1?E@?JI{<{B0ASG>0CWogKq9cX^@85P124(K6bJ18 zDf)}*>;p$25Py|?K)3%SocDV2VBiZjvoz*ofgvJb*=PD+iw`W5VB;&nM3*qRz@PvR zZ(n!0;D|tXIhVjdv?c)l4`8|f4q6L*`m~Og_9<2Rz-rUIbZZiSqdVJ{B?p1O^lxD zLuWkAV~EKAHGl6Gd&9cq3`L)-^W{ra57vQZkCr;9C{xj z0&%}{p(!|okZ?E23-Jlfo8fz+#(8Kq-1hQOZ`x~E6Y{dTBG`-w6%bQ5DiCaR`oY8JemXWc=L@Bm#gWn{dd|+xcx`r_eCIP_pjIbQXk8GIpQ8%m(TFGK zqLslTZ_}RJO#sR%%Y@F+>!7yeo2ucNGW-xghbdI7q-A-quAy3ncsz z>(wM4&YON08i(!fUK#t4uc02bHQr{CQf;6d%NV$X^kmLuR)1c0L!6+hfHLK%{fwT` zMfPMl`z#B?RVhaQ?)F1D<&`%ZLsEyHPgMeE<6x<;)=MbAjjE%J0~}s729dP7r2?;e zepE4=bd(1nYQ!=juy}o4X(8V7Svf0F`8cGhW{X;#D8+E@Xa7yZ`L{CwguQQCgiDCBEo-t z-SgCs`K=ws-3o;p-c^$e1Bch&qm0u!D3^BUN<$r^ zZfw7mNHW`D+b<7fMtxOY8*|=!7GtTBFK6lOLk{r{nVT4ns1)SyO9hDd)$aKDfoa7K zCC`Re%N&c2EfEzw9ym1G5T&=jw9;we#2h+SH!1O!PdyIA!yS}N#@yWHJXV>R-ZSag z@7?x%npZQqpd@A*=Fe?xg0~X=YUHz4SpBt47Apt6y6Ew9O*m{_m>t#-1X-i~ST&Wk zSc!P-J~qd^xu!g*eU9dg=22gC*2ym$NusgCx3YG(V}=a9zsI%*<`ENM6zHecM(f?k zn|tkBdqR$*7rJ@AC3uSZDMA3wKPKZy4-VI%x2zLxkXbxj(gu{+@B*aI>6>^nEm1u( z^f60B!7{CFNCS=olwR&d3xBB$lW^L;w7xcNIruw5TZVEnq|dOeK|WMKK0xA<%zIz# zB9BCF4n)53?s<2$e~0Uaf1Zup_t%zYh#ofdS8JJ$xo~#l>unLpBWB>j&oPOPcFs~h zR#^|NN^KubS?Uqwy#c-Y*&RvvNGFN;Ce+0nxNw1tCSwW9bu=yk8|yE#$(T_B?=GPX z77eN^P8G|jAOoafTDm%Z6xk(J%6;7AKW_5n&p}s!xqIgwCJYkqbyxNs+DwKTaUR(ASDs36n zU^>walkY8Xv*3MN+-aaQ63F&gax)Xk=w{A59_LB4Bd%>1eR427j-{swHh)YNs_ap6 zcgRCm68cOMB4dPmdWR$R3%uR2mAY`YkEw4~+&SAFQ&o+w$2XdSX*r1&(L{yekiV)N z&&WJ%pZfte%VDyY#%#G-R-I#b;bs7MVv73hQ1M0Yolq~SRKWz|b#d*Bh^dZx;aU%e z8hbu9?{ZlyFY<|`)1P`;y%bbdj>qE4GCYTt)n^SJwt5X1QKzc4E23C|y5W3mr0fy5 z)a;6R0&E8W0;joi)9mejya=5OPvnqX8vmX2xe;MJ4+fwKV^oRG*y8(f{}ftAhOKOm z2V@}N$6@zN2NNeTVH?^3(=AChZA_iBr}n-ljkLW$#%+xzePOI%1&sy<#+m^e_+g2W*Bb4n4!YAvFMdLKVu~@1K?}&6 zJ28AaJ7x6E&&sTlT~=hcwC(Wa9-ETE5EiFMU+UW5|LjibAGEdAb; zOlMLgBv?&#Y9XOzQ;Sck%#>@>tL>hD=&#Lhux*$Ey+@I2TS-s!tFTw7-{nVwdW_;o9hl)U@lve_+Rd4b0RRY@73Ij>UNviDM z-Hf=Ys50Gq|_n|%$*pBXCjoQp@Q^R=`ce|eJ3`OPCp5 z02~&mku&ZD`S@+tWgL}_EDhg2JXe3_xP8BjeffOi9!<${Z*HV83DNTlH-<2l4;K3gEqA1f zW+aga^XE;G+#~$+72ODiM>B0H6^&dyJA+Ozp`^_0VJWOiUEwHZ z#Pi|>o0EWAe2b(&F#Y-5IL0L+Z7aP@}HasLCiUGQB1 literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/ut99-icon.png b/lgsm/data/gameicons/ut99-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..5ebe6c09c9ab1b0cb341ed608d253a307c0fd786 GIT binary patch literal 2797 zcmZ{mXE@vI8^?cYM-i)>sv{h2QDReSRbv$~iW*fTNo}H5ty-nDMiF!vC#X@viPWyW zYAd2zB(2mQEwNXQo_GHj|L3{B_vd-O_w~J=SI>3biDqzpcF;u-008WU1~7{=LVkPM# z19vYJBp?Khf;gkma`FJ^KY$?rEjcBSqN0kDvVyXUimI%vtlXIt&-5Fp-xWkwE@e4; z__ZPIrlmozZkBse-h5#EPyals`p=`s1K|o3ytEe+CE}0Ny<|B&ACFD~QH;B$9mQ5$ z3hhgUC0{HvDTjJod&{1D+n{WG4r3!K2@?02kn*-OTMz8Rh-x;{aa-}~GEI0v9WClh z9@)4fdV=HA`HvR%G&O_ zb!MJVA2R4(EG-p_KAGtWNnJbL|5bJ0q1Nk#X|NV&K6s%D%03pGM_(}P*Od|m}BOzWs}6l_T* z3#Vir<*V*yj|lf=4S$IsHe9eBmq9v8qJr5tSlfO1mT$%T1 zr}^QFFZVmq!83JZD7!Ql_A5WHGbLV0opBz#I7YASE!mXOiLYL~8iiR-AT$`Q=Z+nZdjcc4* zjfkVxOOKcFVYIcw9j=#py_BuK)f+yy<=v!}mM!BIHSyk`jA(ufEA_A!fo~_Hla4+S zI`bo428xwD^T_JdCR(6#!-iH+Ph-qy4yhHN{sQ)e?=|!eIr%T^L!n>IiN#a=CotAQ zvX^xV`-kht{V&(iv!TBD#&))&aBX|$SUc{V8Wf^HJS9(ad|t>jK&#$+N!mf3)<5tJ zxj(b~CYLr#e6uPi;k()1ZOrSy+SiU(ZB z4mZee4b9Gg^Q*{sWMkowdyN9#;b!{wjzOB=6E{$2&PxH|*$tSf-fQ@pwEzWS@{$iZbPV`AtuEyg$B{j)v%)Ops z+=L~Ir?T&HKm8l-5$&sen5K)Zk#j_j%vn8CE1q_l@Rgt!M0lE z63mbATOx_GPD@k`l!j~mv?x zDA=dM^^Z_%qX*yVtL{N<8v0GU1??)KDYJxCR;=VKOl42%o(n-jlIM=T_t>F8jJ{$S zq+tDujDrtzj6mnJYfpa+eIFOnr(YEu(4v}ksCo&-sqOETkiyoH&E@6h9`EW~f|fR- z;}Uz*zYtpR!RXb|*APY*_Z8M_MtO{-Gfx)LaU{W0H>ptf+nD~9*ZYK$1Dt;ebiz6! zl3dt&{op}k62^?&8I6x_mSm{rz81n8vD4 z=)s^8vv2w<{@$Ma(9PD!{R|#`(g`Y!|HMeYuCkHRmY7!+aga*e8O3|9Y^jC?qKA<^ zJCj7bYs!74camNK=8i(E3?rh>-7$1CwUiBB1Lr8~>~Dfc%HgYQ!mD&F68JWtBMOW# zr>&ikPc^_@V9So%S4S1(!yk8UwT7)_n5s9TeE8d7QA`H%+GGOtPQ7>UZqg{gbKXFO z_cVY!8%gcPRbXFmtw?W-f3#qnRgIkAzu=)GIJonsV@LV2NdIMw$$3=C~EI|9y34 zH8GeYC#Ut%@U989&TBoC=C%0=qQ97mspWD#JDObX*Au(Fw5gjH}`2MH1w{;yEDkmpv1wZWa`+NhMmh zw}jzda2=1t-MJSH(3Oh3yI831`%c?D@XS!p?COF0!aSyeR!rE9XX lYO=C0k6P;g1iXEb?hiu#e?Uov!}Kfw80x}dl{!u_{{m=9PH+GK literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/vh-icon.png b/lgsm/data/gameicons/vh-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..e74f2604d93d5538d20f95ca9b2f054e01208f45 GIT binary patch literal 2598 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 B*Ma~5 literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/vints-icon.png b/lgsm/data/gameicons/vints-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..f6e6748c0387094221caf896ca964908300b5fc3 GIT binary patch literal 9075 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 literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/vpmc-icon.png b/lgsm/data/gameicons/vpmc-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..95d3e0f8a1d8b046c620f2fa6f3ae9acbafa3485 GIT binary patch literal 1171 zcmV;E1Z?|>P)EX>4Tx04R}tkv&MmKpe$iTcuhm9V{rtAwzYti;6gwDi*;)X)CnqU~=gfG-*gu zTpR`0f`cE6RRl68#OK75I$eL`!^A?lhov576MXuEZ1p{A&DiVkcI#W4OCHsi5RUaDF!mMpK$RS{PEs%d^uJiv$2j2M1=>x^`aZU-_6gv72Cmeuzup4oK1pwO zwdfHL+6FGJyPC8IT zOq3~m-R0c_y}kW=rqkaKiqvwjts>H+00006VoOIv0RI600RN!9r;`8x010qNS#tmY z4#NNd4#NS*Z>VGd000McNliru=L!%N88m%m@{#}m02y>eSad^gZEa<4bO1wgWnpw> zWFU8GbZ8()Nlj2!fese{00L`CL_t(o!|j*POVeQ-$6wF)``w&O)HR*+N0TILl}d!x zU>Cgv5=kl)LV?jiI&?_7btt?=oq~eukU@0te~_etmX_!+RFZydtu|frSNq|2Kb{U& zC!0d*F8iE6&*%N(c|OnQhv2t4oGliCa7mdN6pCtN2TW$t^Fk=S66x{Hj4c8PfaAP&$Z5H8_3*c{raH{VK5 zD7g{`5Q=J3$g$-C@&Gvp(6-`aw^?a*H&b0zMY+w6&+p^Ty+KkLxn9dR3akhU3k?4c zuoBl9x;;Q+;}Hr?Chk8Rq~~lG&I9$>Y-J!fJ{JrI>Fd9-Da57#7dlUJ_^^{glZiKD zh)W$ zUA=;)X_!@&Xf(>|>Q9D8UJ^^hDYcZM>pCmTtJ{|Yu~-~UQ|a#N!tHi5{QL#Sjy8Z0 z6q(H^ib6?AF-D^iyG?)-kNGs z=`?yW2@T{9y%ej{!>-udjDm5 z&UKSmTO+CKd=G~B^u@n%Kp?WX#K5h)TWd(00sMjJY;R*B{DV+9!qn_%QmNFx{S`rh zLEAond@0TY3)Uebz%Sj002ovPDHLkV1kvD5K;gD literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/vs-icon.png b/lgsm/data/gameicons/vs-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..0817c14ebf0e891a5033483e283c1251f84ce1e0 GIT binary patch literal 500 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnF3?v&v(vJfvmUKs7M+SzC{oH>NSwWJ?9znhg z3{`3j3=J&|48MRv4KElNN(~qoUL`OvSj}Ky5HFasE6@fgArasc;tEpG(D48N{{sgO zG%z#(c_0x6hNZ~`=0Fx>NswPKgTu2MX&_FLx4R2d8h1?!ki%Z$>Fdh=oJ&BEQ+adk z*&9HiGoCJvAsXkWPBi2@WWeJZyD;tCdciYGVh$L->UqHA;c>=s>W=?{1sY8%J{4YZ zZ~n{9&ggvT5L#lrZ%X-brX@@Im%vMjU^f&*Nd3wcPh-vzQ z(~|py1ix)Po$l|?U?9KdTdBu;pubd0Tq8 literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/wet-icon.png b/lgsm/data/gameicons/wet-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..e24d585a91d273974abd56e477a81508f7317c53 GIT binary patch literal 478 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnF3?v&v(vJfvmUKs7M+SzC{oH>NSwWJ?9znhg z3{`3j3=J&|48MRv4KElNN(~qoUL`OvSj}Ky5HFasE6@fgAr#;f;tHgJ;J|?c|A7Fg zxS_#4k>e&%h_NKdFPOpM*^M+1C&}C0g;|it=M#{_UgGKN%Kn^7K#)^;bM4t1K%qUJ zE{-7@=UXQ>a<&-oxISjq7Tesa(QeGV?s$dlUfXOc0C+_zh*4k{*NW$DVLk;H_dOiezH{X)zmc}yFbZ#gPM9n zwccqf1~Iv1D`L$z^mWNE2v1Oc@8CL(c?Kg-s%^OBY46~w8-LkjtL)R}E;F85sQE{O1XZhTQy=%(O}@ Y8Vn#B?p(_ThA#tyr>mdKI;Vst00iKl7XSbN literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/wf-icon.png b/lgsm/data/gameicons/wf-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..21b6a98cc48f96ad8298f557b435f145fdb8a68d GIT binary patch literal 2494 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 literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/wurm-icon.png b/lgsm/data/gameicons/wurm-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..248b42618902853cf25f0ed4e370dfe73a133c5f GIT binary patch literal 2643 zcmZ`*dpOe#8~&w*mt;y&z2B?mxXLkxk%`HM<&atq$sEQ)6mpo%F+_5%$!3v54wIO2 zm~#oAQ#93TL>l4U>p0o)>d)_w?|QELxv%Sfp8K!ox}N7rvAbv~C2>pw001d83hA)R zCw@a*WH$@t7mIfZe8}AlGJ*+K}z|QZWG0U=dl|O<|PQd_h;Nx%X5kqB`?uud|XpDszR{|^} zq3{YZRj}J;hDM%uMD?7@VW(2Kp>M~VS%T=Kt;Mba=`8$(>G-$l)#&e68tjYjgRN*v zIi)%G3{H|v>1HS7V&4mf?GCD`Gv_Rx%00!HSySv#C_+IznTWDElFg7ZvXPBCC z%WB5Omu?5<+U2vU54DjA$pB674(wDS^6G~}+^U1u^7KS~nm-Fzcl5-1PBvVY0^pd@ z_Bg9KrD9!0iV`|&#^TC%F4ip59-*)A;6A3sAr{GG_|}O%egF$ixjf?q%HQD{(D^~&Ask@@-LP0 zzv=ez>a`$^!O{^26?r4P>Ig$G=?JhVH~+e;cv=K0XHAfR$Kh@bYgSamEzf@IN-{Ds zDjxBjo+?>f3_!L-tl-^N*ZF+@x`}+@Uk!_^+gnVdFcWdN25R{Fvt{*X0qoDcDfO4x zcVJq|5z^>v*t1dNA%R7vufw0Wi|>SmU5}W_)r?-Ue&XVi{G<1@(Ic2<89dZ_ox;HB=G%^bF%s)c4PIF(_KF}FApSf`fynOzp^(U} zj-oxLqi0o)t`qUNx=YXD#N_*2eR|94m!2kq@j2rcUAZ$I?mk4KLD_{$Td9L(KU@u| z=NRF)!qIK(mCdp~c^V&VMh28_FH%xNRm#ancjxWsx5&hDG}YAuYE+ZLq_-EQ=a})l z>sNfrJfHuK$@(yH+-*Yb3Flk!_4J{OJ6t(wDry4$W?I7!0YjMNDd!%p&K-PAW3Z0N zSb$PcNRKqHkSwLQ@{s%5d8*kHQGDW~S0Pjq4J|-Thr3gr zv%6hP@hs;;$!GtV_g^ClH|lm)4z(GLTNrn+BTTNpxq zH4ky?>%!J|qbEb88#_z2$ux-P{(K}Pv;2P zUu~KH*pu#rZN7c*wI*ssvXD6SYhLn3{g^Q1?!4`{B?R;E_`R>Vw1Z~uq9w94k9|N) za(T`{8N6s`a2NpgT&T)t!;e?}kR}NSH|xeHp3t}7R7;BSc^|V2SEJYUSB2QX1&y6q z1W)#riBohqH{?Drsc6LYNaH%s6m$SGNF>ls~T5@YgC8T;r2i^r1pratt4?@tgoz@$_~_F)l`JL+(QyDNpH z7fZ_*sd8{MDeBdGOCHHiX!4L}%RV5J?N1GnC z#ete@@B0XJ0e)?*$7OoFmGN?u+KWI`3;U)DT%uu^$gro~+Cng{J=$-0*%dcm12blm3*m=o0}*gAMEoVN%ZOJSI%R2kw(C zjDd{7m+v}eLAhXuEG3#OlKZmE3x=POuPi#AyrU}C*0SYJ02#Or zJ))0cE)D$kt6|~iu#=qU^tGfSXzzV_^CE@=DjA&zbu7=A5*d7AQ19n6kQsPy&b93i z3{I8hyYsOr$oQ7z^PZwt!iD~9C=tv0pdD82_u7vl{UBKHg^Fhe>a+#KR7E);Ay(ED z^4;6SiOx7b{_&G`*`%wD@?hU`h_L)-Wum05W)%t9ZPQolcxXJ5*U0c5#TbHc?&8nD z=3dAW**M6N$#*Ca4Vj6~?zVe@al$~XS@RSs74PJrKk%knHDOs-Avb{iskE}cqQajY z((qvSI=0L|CTHm$PM1hQjYiBsz0*Wv-c1$zW~(_uh8xojHU2w<>HqX)+4)o7a$00gfulwDD-+)4<OCWEPH7LMVSwn2$;#RRVb!^!DBxsbkMK_1R;(?k&N0~OC#Ux z_s7zBCs}A2S5IE8NJY`Tc1r@iav{l1Hfn^(Cbz zvskQIRyE>Gu#`hAu7-HwLcHOgx4m}>(9zO4tFEo3t_^e4 v)`x2u!q4iR*3yD&X(4Ykto)B5Akd3|kNE!vJ^cf=y9NMlaS=&3bC3HMcK!fd literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/zmr-icon.png b/lgsm/data/gameicons/zmr-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..d6c61b1d48f7489e4229153b6356bcfefadbf1a0 GIT binary patch literal 1696 zcmZXT2~ZPP7{}ip*@PsU-GqVApaY^Xn2SIAfa_Q_1AW7103f@&KSvQ-hVAlTksVUs|hc&8vf-zJ!~X{tsbn2!G^ z`!-I~)Ad0#4JCgUfsW08Ybi=jQLq?VsnwBD6qM55-sadwn(}!(=tDa#I0p2kP$X#+ zJbl`k_NODVcUhKDxELO1?W!P%QUvj2vx9j&e*hp;6aXHEu>gRYLJR;G00tPBC{%mC6oIwJCTp$SH^Ow+cG)*t!^Mm<(Ikfin3;Fyk4yT;KD8sNr zC|ZEy=`7X~in38EVzH_LSPsB@0C22FivSQ~SOAZgLXy>RRO>-p3==~jH2o2WlZc`Y z1OWj?()1b}cZbs=h%ZUTQB*#IF$(}UHX8zrrKkfe);yy5KB6T zv(oyELb&De){^7~1ew8N1yR%v415@qKcTza|p5>G6z6~<4f6W1&^1?<(`Gm0Pwb6%`5~7Wio@g+!QXi7D3hn z06!9VL9-YPe=helj;kR?f(Rr@M*s)}nVg(F*>k`I0j6tK#H<9kXIf3yz<8P`j>!zY zqochB879)1pXo$_EfW(hfuWt9p;D>QC_;6p+$_fonAiRLUg@LhHC=;)(!F$6{zu9mhoj}(W}Mz4eg7pog8>(4fwt~=xG)B9UR4N<>wrq9OCj_%(n!rmhWZI=aZ z+p0Cy|K#QRqD)!o!miR*mQ_V}+(W!>e|#zAqI%@hp!I~U3<3VR)LzZxv@x^?xr76eNd%#uQJAu)beVlX>fUI7dVJu0EIpihY|k4I|g?ekhi$`yv0) zpZA+wbGHbIc-fb4)?R$slOBeLP3m_KxhU~#Y06%ZBSRoeQ{QTF9e>J4<+`KI{_x}x&09%7evOE(ufT)O=@N+7)_8;#_?-l?6 literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/zps-icon.png b/lgsm/data/gameicons/zps-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..e37f37280fe02567579d2cfeec922ea75e689a74 GIT binary patch literal 2679 zcmV--3W)WIP)004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00006 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 name
${servername}

Message
${alertbody}

Game
${gamename}

Server IP
${alertip}:${port}

Hostname
${HOSTNAME}

More info
${alerturl}" "https://api.pushover.net/1/messages.json" | grep errors) +if [ -z "${alerturl}" ]; then + pushoversend=$(curl --connect-timeout 10 -sS -F token="${pushovertoken}" -F user="${pushoveruserkey}" -F html="1" -F sound="${alertsound}" -F priority="${alertpriority}" -F title="${alerttitle}" -F message=" Server name
${servername}

Information
${alertmessage}

Game
${gamename}

Server IP
${alertip}:${port}

Hostname
${HOSTNAME}

Server Time
$(date)" "https://api.pushover.net/1/messages.json" | grep errors) +else + pushoversend=$(curl --connect-timeout 10 -sS -F token="${pushovertoken}" -F user="${pushoveruserkey}" -F html="1" -F sound="${alertsound}" -F priority="${alertpriority}" -F title="${alerttitle}" -F message=" Server name
${servername}

Information
${alertmessage}

Game
${gamename}

Server IP
${alertip}:${port}

Hostname
${HOSTNAME}

More info
${alerturl}

Server Time
$(date)" "https://api.pushover.net/1/messages.json" | grep errors) +fi if [ -n "${pushoversend}" ]; then fn_print_fail_nl "Sending Pushover alert: ${pushoversend}" diff --git a/lgsm/modules/alert_rocketchat.sh b/lgsm/modules/alert_rocketchat.sh index f6e410ef8..329111494 100644 --- a/lgsm/modules/alert_rocketchat.sh +++ b/lgsm/modules/alert_rocketchat.sh @@ -7,28 +7,55 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -json=$( +jsoninfo=$( cat << EOF { "alias": "LinuxGSM", - "text": "*${alertemoji} ${alertsubject} ${alertemoji}* \n *${servername}* \n ${alertbody} \n More info: ${alerturl}", + "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": true, - "title": "Game:", + "short": false, + "title": "Server Name", + "value": "${servername}" + }, + { + "short": false, + "title": "Information", + "value": "${alertmessage}" + }, + { + "short": false, + "title": "Game", "value": "${gamename}" }, { - "short": true, - "title": "Server IP:", + "short": false, + "title": "Server IP", "value": "${alertip}:${port}" }, { - "short": true, - "title": "Hostname:", + "short": false, + "title": "Hostname", "value": "${HOSTNAME}" + }, + { + "short": false, + "title": "More info", + "value": "${alerturl}" + }, + { + "short": false, + "title": "Server Time", + "value": "$(date)" } ] } @@ -37,8 +64,65 @@ json=$( EOF ) -fn_print_dots "Sending Rocketchat alert" +jsonnoinfo=$( + 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", + "value": "$(date)" + } + ] + } + ] +} +EOF +) +if [ -z "${alerturl}" ]; then + json="${jsonnoinfo}" +else + json="${jsoninfo}" +fi + +fn_print_dots "Sending Rocketchat alert" rocketchatsend=$(curl --connect-timeout 10 -sSL -H "Content-Type: application/json" -X POST -d "$(echo -n "${json}" | jq -c .)" "${rocketchatwebhook}") if [ -n "${rocketchatsend}" ]; then diff --git a/lgsm/modules/alert_slack.sh b/lgsm/modules/alert_slack.sh index f83df9510..728a564e0 100644 --- a/lgsm/modules/alert_slack.sh +++ b/lgsm/modules/alert_slack.sh @@ -7,61 +7,179 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -json=$( +jsonnoinfo=$( cat << EOF { - "attachments": [ - { - "color": "#36a64f", - "blocks": [ - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "*LinuxGSM Alert*" - } - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "*${alertemoji} ${alertsubject}* \n ${alertbody}" - } - }, - { - "type": "divider" - }, - { - "type": "section", - "fields": [ - { - "type": "mrkdwn", - "text": "*Game:* \n ${gamename}" - }, - { - "type": "mrkdwn", - "text": "*Server IP:* \n ${alertip}:${port}" - }, - { - "type": "mrkdwn", - "text": "*Server Name:* \n ${servername}" - } - ] - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "Hostname: ${HOSTNAME} / More info: ${alerturl}" - } - } - ] - } - ] + "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": "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 ) +jsoninfo=$( + 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": [ + { + "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 [ -z "${alerturl}" ]; then + json="${jsonnoinfo}" +else + json="${jsoninfo}" +fi + fn_print_dots "Sending Slack alert" slacksend=$(curl --connect-timeout 10 -sSL -H "Content-Type: application/json" -X POST -d "$(echo -n "${json}" | jq -c .)" "${slackwebhook}") diff --git a/lgsm/modules/alert_telegram.sh b/lgsm/modules/alert_telegram.sh index d2e72346a..3b3ec9912 100644 --- a/lgsm/modules/alert_telegram.sh +++ b/lgsm/modules/alert_telegram.sh @@ -7,17 +7,34 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -json=$( +jsoninfo=$( cat << EOF { "chat_id": "${telegramchatid}", "parse_mode": "HTML", - "text": "${alertemoji} ${alertsubject} ${alertemoji}\n\nServer name\n${servername}\n\nMessage\n${alertbody}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\nMore info\n${alerturl}", + "text": "${alerttitle}\n\nServer name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\nMore info\n${alerturl}\n\nServer Time\n$(date)", "disable_web_page_preview": "yes" } EOF ) +jsonnoinfo=$( + cat << EOF +{ + "chat_id": "${telegramchatid}", + "parse_mode": "HTML", + "text": "${alerttitle}\n\nServer name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\nServer Time\n$(date)", + "disable_web_page_preview": "yes" +} +EOF +) + +if [ -z "${alerturl}" ]; then + json="${jsonnoinfo}" +else + json="${jsoninfo}" +fi + fn_print_dots "Sending Telegram alert" telegramsend=$(curl --connect-timeout 10 -sSL -H "Content-Type: application/json" -X POST -d "$(echo -n "${json}" | jq -c .)" ${curlcustomstring} "https://${telegramapi}/bot${telegramtoken}/sendMessage" | grep "error_code") diff --git a/lgsm/modules/check_last_update.sh b/lgsm/modules/check_last_update.sh index 02d17c975..166d80a17 100644 --- a/lgsm/modules/check_last_update.sh +++ b/lgsm/modules/check_last_update.sh @@ -20,6 +20,8 @@ if [ -f "${lockdir}/last-updated.lock" ] && [ "${status}" != "0" ]; then if [ ! -f "${lockdir}/${selfname}-last-started.lock" ] || [ "${laststart}" -lt "${lastupdate}" ]; then fn_print_info "${selfname} has not been restarted since last update" fn_script_log_info "${selfname} has not been restarted since last update" + alert="update" + alert.sh command_restart.sh fn_firstcommand_reset fi diff --git a/lgsm/modules/command_backup.sh b/lgsm/modules/command_backup.sh index fac5dc38b..55981e19e 100644 --- a/lgsm/modules/command_backup.sh +++ b/lgsm/modules/command_backup.sh @@ -138,6 +138,8 @@ fn_backup_compression() { fn_print_ok_eol fn_print_ok_nl "Completed: ${backupname}.tar.gz, 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}')" + alert="backup" + alert.sh fi } diff --git a/lgsm/modules/command_monitor.sh b/lgsm/modules/command_monitor.sh index d4d88bd56..51a1e99bf 100644 --- a/lgsm/modules/command_monitor.sh +++ b/lgsm/modules/command_monitor.sh @@ -154,7 +154,7 @@ fn_monitor_check_update_source() { fn_print_ok "Checking update: " fn_print_ok_eol_nl fn_script_log_info "Checking update: Monitor is restarting ${selfname} to apply update" - alert="update-restart" + alert="update" alert.sh command_restart.sh core_exit.sh @@ -207,7 +207,7 @@ fn_monitor_check_session() { fn_print_error "Checking session: " fn_print_fail_eol_nl fn_script_log_fail "Checking session: FAIL" - alert="restart" + alert="monitor-session" alert.sh fn_script_log_info "Checking session: Monitor is restarting ${selfname}" command_restart.sh @@ -319,7 +319,7 @@ fn_monitor_query() { fn_print_fail_eol_nl fn_script_log_warn "Querying port: ${querymethod}: ${queryip}:${queryport} : ${queryattempt} : FAIL" # Send alert if enabled. - alert="restartquery" + alert="monitor-query" alert.sh command_restart.sh fn_firstcommand_reset diff --git a/lgsm/modules/command_start.sh b/lgsm/modules/command_start.sh index 364733ea2..345ede786 100644 --- a/lgsm/modules/command_start.sh +++ b/lgsm/modules/command_start.sh @@ -176,6 +176,13 @@ fn_start_tmux() { fn_print_ok "${servername}" fn_script_log_pass "Started ${servername}" + if [ "${statusalert}" == "on" ] && [ "${firstcommandname}" == "START" ]; then + alert="started" + alert.sh + elif [ "${statusalert}" == "on" ] && [ "${firstcommandname}" == "RESTART" ]; then + alert="restarted" + alert.sh + fi fi rm -f "${lgsmlogdir:?}/.${selfname}-tmux-error.tmp" 2> /dev/null echo -en "\n" diff --git a/lgsm/modules/command_stop.sh b/lgsm/modules/command_stop.sh index 1567252f9..3e503a4f5 100644 --- a/lgsm/modules/command_stop.sh +++ b/lgsm/modules/command_stop.sh @@ -23,6 +23,10 @@ fn_stop_graceful_ctrlc() { fn_print_ok "Graceful: CTRL+c: ${seconds}: " fn_print_ok_eol_nl fn_script_log_pass "Graceful: CTRL+c: OK: ${seconds} seconds" + if [ "${statusalert}" == "on" ] && [ "${firstcommandname}" == "STOP" ]; then + alert="stopped" + alert.sh + fi break fi fn_sleep_time_1 @@ -51,6 +55,10 @@ fn_stop_graceful_cmd() { fn_print_ok "Graceful: sending \"${1}\": ${seconds}: " fn_print_ok_eol_nl fn_script_log_pass "Graceful: sending \"${1}\": OK: ${seconds} seconds" + if [ "${statusalert}" == "on" ] && [ "${firstcommandname}" == "STOP" ]; then + alert="stopped" + alert.sh + fi break fi fn_sleep_time_1 @@ -80,6 +88,10 @@ fn_stop_graceful_goldsrc() { fn_print_ok "Graceful: sending \"quit\": ${seconds}: " fn_print_ok_eol_nl fn_script_log_pass "Graceful: sending \"quit\": OK: ${seconds} seconds" + if [ "${statusalert}" == "on" ] && [ "${firstcommandname}" == "STOP" ]; then + alert="stopped" + alert.sh + fi } # telnet command for sdtd graceful shutdown. @@ -152,6 +164,10 @@ fn_stop_graceful_sdtd() { fn_print_ok "Graceful: telnet: ${telnetip}:${telnetport} : " fn_print_ok_eol_nl fn_script_log_pass "Graceful: telnet: ${telnetip}:${telnetport} : ${seconds} seconds" + if [ "${statusalert}" == "on" ] && [ "${firstcommandname}" == "STOP" ]; then + alert="stopped" + alert.sh + fi break fi fn_sleep_time_1 @@ -195,6 +211,10 @@ fn_stop_graceful_avorion() { fn_print_ok "Graceful: /save /stop: ${seconds}: " fn_print_ok_eol_nl fn_script_log_pass "Graceful: /save /stop: OK: ${seconds} seconds" + if [ "${statusalert}" == "on" ] && [ "${firstcommandname}" == "STOP" ]; then + alert="stopped" + alert.sh + fi break fi fn_sleep_time_1 @@ -246,6 +266,10 @@ fn_stop_tmux() { if [ "${status}" == "0" ]; then fn_print_ok_nl "${servername}" fn_script_log_pass "Stopped ${servername}" + if [ "${statusalert}" == "on" ] && [ "${firstcommandname}" == "STOP" ]; then + alert="stopped" + alert.sh + fi else fn_print_fail_nl "Unable to stop ${servername}" fn_script_log_fail "Unable to stop ${servername}" diff --git a/lgsm/modules/command_wipe.sh b/lgsm/modules/command_wipe.sh index d20bd0d3e..378dae0ec 100644 --- a/lgsm/modules/command_wipe.sh +++ b/lgsm/modules/command_wipe.sh @@ -167,6 +167,8 @@ if [ -n "$(find "${serveridentitydir}" -type f -name "*.map")" ] || [ -n "$(find fn_wipe_random_seed fn_print_complete_nl "${wipetype}" fn_script_log_pass "${wipetype}" + alert="wipe" + alert.sh exitbypass=1 command_start.sh fn_firstcommand_reset @@ -175,6 +177,8 @@ if [ -n "$(find "${serveridentitydir}" -type f -name "*.map")" ] || [ -n "$(find fn_wipe_random_seed fn_print_complete_nl "${wipetype}" fn_script_log_pass "${wipetype}" + alert="wipe" + alert.sh fi else fn_print_ok_nl "Wipe not required" diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index c959df307..121341878 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -48,22 +48,26 @@ fn_info_message_password_strip() { # used with alertlog fn_info_message_head() { echo -e "" - echo -e "${bold}${lightyellow}Alert Summary${default}" + echo -e "LinuxGSM Alert Summary" fn_messages_separator - echo -e "Message" - echo -e "${alertbody}" + echo -e "" + echo -e "Server name" + echo -e "${servername}" + echo -e "" + echo -e "Information" + echo -e "${alertmessage}" echo -e "" echo -e "Game" echo -e "${gamename}" echo -e "" - echo -e "Server name" - echo -e "${servername}" + echo -e "Server IP" + echo -e "${alertip}:${port}" echo -e "" echo -e "Hostname" echo -e "${HOSTNAME}" echo -e "" - echo -e "Server IP" - echo -e "${ip}:${port}" + echo -e "Server Time" + echo -e "$(date)" } fn_info_message_distro() { @@ -75,6 +79,7 @@ fn_info_message_distro() { # Arch: x86_64 # Kernel: 5.4.0-65-generic # Hostname: server + # Environment: kvm # Uptime: 16d, 5h, 18m # tmux: tmux 3.0a # glibc: 2.31 @@ -88,6 +93,7 @@ fn_info_message_distro() { echo -e "${lightblue}Arch:\t${default}${arch}" echo -e "${lightblue}Kernel:\t${default}${kernel}" echo -e "${lightblue}Hostname:\t${default}${HOSTNAME}" + echo -e "${lightblue}Environment:\t${default}${virtualenvironment}" echo -e "${lightblue}Uptime:\t${default}${days}d, ${hours}h, ${minutes}m" echo -e "${lightblue}tmux:\t${default}${tmuxv}" echo -e "${lightblue}glibc:\t${default}${glibcversion}" From 29246f84a482cad29d4cd84e76727f9aeb1c66cf Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 22 Oct 2023 22:48:22 +0100 Subject: [PATCH 276/374] feat: update package netcat dependencies for Debian and Ubuntu (#4348) - Updated the package dependencies in the Debian 12, Ubuntu 23.04, and Ubuntu 23.10 CSV files. - Replaced "netcat" with "netcat-openbsd" as a dependency. - Ensured consistency across different versions of Ubuntu. This commit refactors the code by updating the package dependencies for Debian and Ubuntu distributions. The changes include replacing "netcat" with "netcat-openbsd" as a dependency in all three CSV files (Debian 12, Ubuntu 23.04, and Ubuntu 23.10). These updates ensure consistency across different versions of Ubuntu. --- lgsm/data/debian-12.csv | 2 +- lgsm/data/ubuntu-23.04.csv | 2 +- lgsm/data/ubuntu-23.10.csv | 135 +++++++++++++++++++++++++++++++++++++ 3 files changed, 137 insertions(+), 2 deletions(-) create mode 100644 lgsm/data/ubuntu-23.10.csv diff --git a/lgsm/data/debian-12.csv b/lgsm/data/debian-12.csv index 3a5c24fbf..ed35f9e41 100644 --- a/lgsm/data/debian-12.csv +++ b/lgsm/data/debian-12.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat-traditional,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat-openbsd,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd ac ahl diff --git a/lgsm/data/ubuntu-23.04.csv b/lgsm/data/ubuntu-23.04.csv index 8526a176b..1b59e7431 100644 --- a/lgsm/data/ubuntu-23.04.csv +++ b/lgsm/data/ubuntu-23.04.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat-openbsd,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd ac ahl diff --git a/lgsm/data/ubuntu-23.10.csv b/lgsm/data/ubuntu-23.10.csv new file mode 100644 index 000000000..1b59e7431 --- /dev/null +++ b/lgsm/data/ubuntu-23.10.csv @@ -0,0 +1,135 @@ +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat-openbsd,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils +steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd +ac +ahl +ahl2 +ark +arma3 +armar,libcurl4 +ats +av +bb +bb2,libcurl4-gnutls-dev:i386 +bd +bf1942,libncurses5:i386,libtinfo5:i386 +bfv,libncurses5:i386,libstdc++5:i386 +bmdm,libncurses5:i386 +bo +bs +bt,libicu-dev,dos2unix,libxml2-utils +btl +cc +cd +ck,xvfb,libxi6 +cmw +cod,libstdc++5:i386 +cod2,libstdc++5:i386 +cod4 +coduo,libstdc++5:i386 +codwaw +col +cs +cscz +csgo +css,libtinfo5:i386 +ct +dab +dayz +dmc +dod +dodr +dods +doi +dst,libcurl4-gnutls-dev:i386 +dys +eco,libgdiplus +em +etl +ets2 +fctr +fof +gmod,libtinfo5:i386 +hcu +hl2dm +hldm +hldms +hw,lib32z1 +ins +inss +ios +jc2 +jc3 +jk2 +kf +kf2 +l4d +l4d2 +lo +mc,openjdk-17-jre +mcb +mh +mohaa,libstdc++5:i386 +mom +mta,libncursesw5,libxml2-utils +nd +nec +nmrih,libtinfo5:i386 +ns +ns2,speex,libtbb2 +ns2c,speex:i386,libtbb2 +ohd +onset,libmariadb-dev +opfor +pc +pc2 +pmc,openjdk-17-jre +ps,libgconf-2-4 +pvkii +pvr,libc++1 +pz,openjdk-17-jre,rng-tools5 +q2 +q3 +ql +qw +ricochet +ro +rtcw +rust,lib32z1 +rw,openjdk-17-jre +samp +sb +sbots +scpsl,mono-complete +scpslsm,mono-complete +sdtd,telnet,expect,libxml2-utils +sf +sfc,libtinfo5:i386 +sof2 +sol +squad +st,libxml2-utils +stn +sven,libssl1.1:i386,zlib1g:i386 +terraria +tf2,libcurl4-gnutls-dev:i386 +tfc +ti +ts +ts3 +tu +tw +unt +ut +ut2k4 +ut3 +ut99 +vh,libc6-dev +vints,aspnetcore-runtime-7.0 +vpmc,openjdk-17-jre +vs +wet +wf +wmc,openjdk-17-jre +wurm,xvfb +zmr,libtinfo5:i386 +zps,libtinfo5:i386 From 069e3bd4e1232ff01131efa6239a7ff22d13c715 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 22 Oct 2023 23:19:24 +0100 Subject: [PATCH 277/374] refactor: remove legacy code core_functsions.sh is no longer required refactor: remove legacy code A lot of time has passed on many of these changes. Moving old legacy code conversions refactor: remove unused alert modules This commit removes the unused alert modules `alert.sh`, `alert_discord.sh`, and `alert_email.sh`. These modules were not being used in the codebase and were therefore deleted. --- lgsm/functions/README.md | 17 - lgsm/functions/alert.sh | 238 -- lgsm/functions/alert_discord.sh | 59 - lgsm/functions/alert_email.sh | 25 - lgsm/functions/alert_gotify.sh | 30 - lgsm/functions/alert_ifttt.sh | 29 - lgsm/functions/alert_mailgun.sh | 32 - lgsm/functions/alert_pushbullet.sh | 30 - lgsm/functions/alert_pushover.sh | 33 - lgsm/functions/alert_rocketchat.sh | 50 - lgsm/functions/alert_slack.sh | 75 - lgsm/functions/alert_telegram.sh | 30 - lgsm/functions/check.sh | 101 - lgsm/functions/check_config.sh | 35 - lgsm/functions/check_deps.sh | 363 --- lgsm/functions/check_executable.sh | 20 - lgsm/functions/check_glibc.sh | 29 - lgsm/functions/check_ip.sh | 63 - lgsm/functions/check_last_update.sh | 26 - lgsm/functions/check_logs.sh | 26 - lgsm/functions/check_permissions.sh | 233 -- lgsm/functions/check_root.sh | 21 - lgsm/functions/check_status.sh | 10 - lgsm/functions/check_steamcmd.sh | 22 - lgsm/functions/check_system_dir.sh | 22 - lgsm/functions/check_system_requirements.sh | 55 - lgsm/functions/check_tmuxception.sh | 33 - lgsm/functions/check_version.sh | 23 - lgsm/functions/command_backup.sh | 268 -- lgsm/functions/command_check_update.sh | 39 - lgsm/functions/command_console.sh | 58 - lgsm/functions/command_debug.sh | 142 - lgsm/functions/command_details.sh | 41 - lgsm/functions/command_dev_clear_functions.sh | 24 - lgsm/functions/command_dev_debug.sh | 23 - lgsm/functions/command_dev_detect_deps.sh | 231 -- lgsm/functions/command_dev_detect_glibc.sh | 92 - lgsm/functions/command_dev_detect_ldd.sh | 61 - lgsm/functions/command_dev_query_raw.sh | 280 -- lgsm/functions/command_donate.sh | 26 - lgsm/functions/command_fastdl.sh | 442 --- lgsm/functions/command_install.sh | 52 - .../command_install_resources_mta.sh | 32 - lgsm/functions/command_mods_install.sh | 135 - lgsm/functions/command_mods_remove.sh | 153 - lgsm/functions/command_mods_update.sh | 109 - lgsm/functions/command_monitor.sh | 245 -- lgsm/functions/command_postdetails.sh | 78 - lgsm/functions/command_restart.sh | 18 - lgsm/functions/command_send.sh | 41 - lgsm/functions/command_skeleton.sh | 23 - lgsm/functions/command_start.sh | 224 -- lgsm/functions/command_stop.sh | 283 -- lgsm/functions/command_test_alert.sh | 19 - lgsm/functions/command_ts3_server_pass.sh | 57 - lgsm/functions/command_update.sh | 40 - lgsm/functions/command_update_linuxgsm.sh | 236 -- lgsm/functions/command_validate.sh | 49 - lgsm/functions/command_wipe.sh | 183 -- lgsm/functions/compress_unreal2_maps.sh | 35 - lgsm/functions/compress_ut99_maps.sh | 35 - lgsm/functions/core_dl.sh | 625 ---- lgsm/functions/core_exit.sh | 61 - lgsm/functions/core_functions.sh | 816 ------ lgsm/functions/core_getopt.sh | 215 -- lgsm/functions/core_github.sh | 114 - lgsm/functions/core_legacy.sh | 84 - lgsm/functions/core_logs.sh | 110 - lgsm/functions/core_messages.sh | 598 ---- lgsm/functions/core_modules.sh | 816 ------ lgsm/functions/core_steamcmd.sh | 334 --- lgsm/functions/core_trap.sh | 22 - lgsm/functions/fix.sh | 88 - lgsm/functions/fix_ark.sh | 62 - lgsm/functions/fix_arma3.sh | 16 - lgsm/functions/fix_armar.sh | 17 - lgsm/functions/fix_av.sh | 19 - lgsm/functions/fix_bo.sh | 10 - lgsm/functions/fix_bt.sh | 24 - lgsm/functions/fix_cmw.sh | 23 - lgsm/functions/fix_csgo.sh | 42 - lgsm/functions/fix_dst.sh | 17 - lgsm/functions/fix_hw.sh | 10 - lgsm/functions/fix_ins.sh | 20 - lgsm/functions/fix_kf.sh | 36 - lgsm/functions/fix_kf2.sh | 20 - lgsm/functions/fix_lo.sh | 17 - lgsm/functions/fix_mcb.sh | 11 - lgsm/functions/fix_mta.sh | 16 - lgsm/functions/fix_nmrih.sh | 17 - lgsm/functions/fix_onset.sh | 19 - lgsm/functions/fix_ro.sh | 39 - lgsm/functions/fix_rust.sh | 32 - lgsm/functions/fix_rw.sh | 10 - lgsm/functions/fix_samp.sh | 34 - lgsm/functions/fix_sdtd.sh | 10 - lgsm/functions/fix_sfc.sh | 48 - lgsm/functions/fix_sof2.sh | 11 - lgsm/functions/fix_squad.sh | 26 - lgsm/functions/fix_st.sh | 11 - lgsm/functions/fix_steamcmd.sh | 141 - lgsm/functions/fix_terraria.sh | 10 - lgsm/functions/fix_tf2.sh | 16 - lgsm/functions/fix_ts3.sh | 33 - lgsm/functions/fix_unt.sh | 10 - lgsm/functions/fix_ut.sh | 13 - lgsm/functions/fix_ut2k4.sh | 36 - lgsm/functions/fix_ut3.sh | 20 - lgsm/functions/fix_vh.sh | 35 - lgsm/functions/fix_wurm.sh | 23 - lgsm/functions/fix_zmr.sh | 48 - lgsm/functions/info_distro.sh | 281 -- lgsm/functions/info_game.sh | 2600 ----------------- lgsm/functions/info_messages.sh | 1849 ------------ lgsm/functions/info_stats.sh | 173 -- lgsm/functions/install_complete.sh | 18 - lgsm/functions/install_config.sh | 937 ------ lgsm/functions/install_dst_token.sh | 45 - lgsm/functions/install_eula.sh | 47 - lgsm/functions/install_factorio_save.sh | 15 - lgsm/functions/install_gslt.sh | 47 - lgsm/functions/install_header.sh | 22 - lgsm/functions/install_logs.sh | 100 - lgsm/functions/install_mta_resources.sh | 12 - lgsm/functions/install_retry.sh | 16 - lgsm/functions/install_server_dir.sh | 26 - lgsm/functions/install_server_files.sh | 255 -- lgsm/functions/install_squad_license.sh | 25 - lgsm/functions/install_stats.sh | 28 - lgsm/functions/install_steamcmd.sh | 14 - lgsm/functions/install_ts3db.sh | 76 - lgsm/functions/install_ut2k4_key.sh | 30 - lgsm/functions/mods_core.sh | 755 ----- lgsm/functions/mods_list.sh | 209 -- lgsm/functions/query_gamedig.sh | 93 - lgsm/functions/query_gsquery.py | 151 - lgsm/functions/update_factorio.sh | 168 -- lgsm/functions/update_jediknight2.sh | 163 -- lgsm/functions/update_minecraft.sh | 176 -- lgsm/functions/update_minecraft_bedrock.sh | 181 -- lgsm/functions/update_mta.sh | 166 -- lgsm/functions/update_papermc.sh | 194 -- lgsm/functions/update_steamcmd.sh | 39 - lgsm/functions/update_ts3.sh | 181 -- lgsm/functions/update_ut99.sh | 163 -- lgsm/functions/update_vintagestory.sh | 170 -- lgsm/modules/command_send.sh | 2 +- lgsm/modules/core_dl.sh | 6 +- lgsm/modules/core_functions.sh | 811 ----- lgsm/modules/core_legacy.sh | 71 - linuxgsm.sh | 17 - 151 files changed, 2 insertions(+), 20719 deletions(-) delete mode 100644 lgsm/functions/README.md delete mode 100644 lgsm/functions/alert.sh delete mode 100644 lgsm/functions/alert_discord.sh delete mode 100644 lgsm/functions/alert_email.sh delete mode 100644 lgsm/functions/alert_gotify.sh delete mode 100644 lgsm/functions/alert_ifttt.sh delete mode 100644 lgsm/functions/alert_mailgun.sh delete mode 100644 lgsm/functions/alert_pushbullet.sh delete mode 100644 lgsm/functions/alert_pushover.sh delete mode 100644 lgsm/functions/alert_rocketchat.sh delete mode 100644 lgsm/functions/alert_slack.sh delete mode 100644 lgsm/functions/alert_telegram.sh delete mode 100644 lgsm/functions/check.sh delete mode 100644 lgsm/functions/check_config.sh delete mode 100644 lgsm/functions/check_deps.sh delete mode 100644 lgsm/functions/check_executable.sh delete mode 100644 lgsm/functions/check_glibc.sh delete mode 100644 lgsm/functions/check_ip.sh delete mode 100644 lgsm/functions/check_last_update.sh delete mode 100644 lgsm/functions/check_logs.sh delete mode 100644 lgsm/functions/check_permissions.sh delete mode 100644 lgsm/functions/check_root.sh delete mode 100644 lgsm/functions/check_status.sh delete mode 100644 lgsm/functions/check_steamcmd.sh delete mode 100644 lgsm/functions/check_system_dir.sh delete mode 100644 lgsm/functions/check_system_requirements.sh delete mode 100644 lgsm/functions/check_tmuxception.sh delete mode 100644 lgsm/functions/check_version.sh delete mode 100644 lgsm/functions/command_backup.sh delete mode 100644 lgsm/functions/command_check_update.sh delete mode 100644 lgsm/functions/command_console.sh delete mode 100644 lgsm/functions/command_debug.sh delete mode 100644 lgsm/functions/command_details.sh delete mode 100644 lgsm/functions/command_dev_clear_functions.sh delete mode 100644 lgsm/functions/command_dev_debug.sh delete mode 100644 lgsm/functions/command_dev_detect_deps.sh delete mode 100644 lgsm/functions/command_dev_detect_glibc.sh delete mode 100644 lgsm/functions/command_dev_detect_ldd.sh delete mode 100644 lgsm/functions/command_dev_query_raw.sh delete mode 100644 lgsm/functions/command_donate.sh delete mode 100644 lgsm/functions/command_fastdl.sh delete mode 100644 lgsm/functions/command_install.sh delete mode 100644 lgsm/functions/command_install_resources_mta.sh delete mode 100644 lgsm/functions/command_mods_install.sh delete mode 100644 lgsm/functions/command_mods_remove.sh delete mode 100644 lgsm/functions/command_mods_update.sh delete mode 100644 lgsm/functions/command_monitor.sh delete mode 100644 lgsm/functions/command_postdetails.sh delete mode 100644 lgsm/functions/command_restart.sh delete mode 100644 lgsm/functions/command_send.sh delete mode 100644 lgsm/functions/command_skeleton.sh delete mode 100644 lgsm/functions/command_start.sh delete mode 100644 lgsm/functions/command_stop.sh delete mode 100644 lgsm/functions/command_test_alert.sh delete mode 100644 lgsm/functions/command_ts3_server_pass.sh delete mode 100644 lgsm/functions/command_update.sh delete mode 100644 lgsm/functions/command_update_linuxgsm.sh delete mode 100644 lgsm/functions/command_validate.sh delete mode 100644 lgsm/functions/command_wipe.sh delete mode 100644 lgsm/functions/compress_unreal2_maps.sh delete mode 100644 lgsm/functions/compress_ut99_maps.sh delete mode 100644 lgsm/functions/core_dl.sh delete mode 100644 lgsm/functions/core_exit.sh delete mode 100644 lgsm/functions/core_functions.sh delete mode 100644 lgsm/functions/core_getopt.sh delete mode 100644 lgsm/functions/core_github.sh delete mode 100644 lgsm/functions/core_legacy.sh delete mode 100644 lgsm/functions/core_logs.sh delete mode 100644 lgsm/functions/core_messages.sh delete mode 100644 lgsm/functions/core_modules.sh delete mode 100644 lgsm/functions/core_steamcmd.sh delete mode 100644 lgsm/functions/core_trap.sh delete mode 100644 lgsm/functions/fix.sh delete mode 100644 lgsm/functions/fix_ark.sh delete mode 100644 lgsm/functions/fix_arma3.sh delete mode 100644 lgsm/functions/fix_armar.sh delete mode 100644 lgsm/functions/fix_av.sh delete mode 100644 lgsm/functions/fix_bo.sh delete mode 100644 lgsm/functions/fix_bt.sh delete mode 100644 lgsm/functions/fix_cmw.sh delete mode 100644 lgsm/functions/fix_csgo.sh delete mode 100644 lgsm/functions/fix_dst.sh delete mode 100644 lgsm/functions/fix_hw.sh delete mode 100644 lgsm/functions/fix_ins.sh delete mode 100644 lgsm/functions/fix_kf.sh delete mode 100644 lgsm/functions/fix_kf2.sh delete mode 100644 lgsm/functions/fix_lo.sh delete mode 100644 lgsm/functions/fix_mcb.sh delete mode 100644 lgsm/functions/fix_mta.sh delete mode 100644 lgsm/functions/fix_nmrih.sh delete mode 100644 lgsm/functions/fix_onset.sh delete mode 100644 lgsm/functions/fix_ro.sh delete mode 100644 lgsm/functions/fix_rust.sh delete mode 100644 lgsm/functions/fix_rw.sh delete mode 100644 lgsm/functions/fix_samp.sh delete mode 100644 lgsm/functions/fix_sdtd.sh delete mode 100644 lgsm/functions/fix_sfc.sh delete mode 100644 lgsm/functions/fix_sof2.sh delete mode 100644 lgsm/functions/fix_squad.sh delete mode 100644 lgsm/functions/fix_st.sh delete mode 100644 lgsm/functions/fix_steamcmd.sh delete mode 100644 lgsm/functions/fix_terraria.sh delete mode 100644 lgsm/functions/fix_tf2.sh delete mode 100644 lgsm/functions/fix_ts3.sh delete mode 100644 lgsm/functions/fix_unt.sh delete mode 100644 lgsm/functions/fix_ut.sh delete mode 100644 lgsm/functions/fix_ut2k4.sh delete mode 100644 lgsm/functions/fix_ut3.sh delete mode 100644 lgsm/functions/fix_vh.sh delete mode 100644 lgsm/functions/fix_wurm.sh delete mode 100644 lgsm/functions/fix_zmr.sh delete mode 100644 lgsm/functions/info_distro.sh delete mode 100644 lgsm/functions/info_game.sh delete mode 100644 lgsm/functions/info_messages.sh delete mode 100644 lgsm/functions/info_stats.sh delete mode 100644 lgsm/functions/install_complete.sh delete mode 100644 lgsm/functions/install_config.sh delete mode 100644 lgsm/functions/install_dst_token.sh delete mode 100644 lgsm/functions/install_eula.sh delete mode 100644 lgsm/functions/install_factorio_save.sh delete mode 100644 lgsm/functions/install_gslt.sh delete mode 100644 lgsm/functions/install_header.sh delete mode 100644 lgsm/functions/install_logs.sh delete mode 100644 lgsm/functions/install_mta_resources.sh delete mode 100644 lgsm/functions/install_retry.sh delete mode 100644 lgsm/functions/install_server_dir.sh delete mode 100644 lgsm/functions/install_server_files.sh delete mode 100644 lgsm/functions/install_squad_license.sh delete mode 100644 lgsm/functions/install_stats.sh delete mode 100644 lgsm/functions/install_steamcmd.sh delete mode 100644 lgsm/functions/install_ts3db.sh delete mode 100644 lgsm/functions/install_ut2k4_key.sh delete mode 100644 lgsm/functions/mods_core.sh delete mode 100644 lgsm/functions/mods_list.sh delete mode 100644 lgsm/functions/query_gamedig.sh delete mode 100644 lgsm/functions/query_gsquery.py delete mode 100644 lgsm/functions/update_factorio.sh delete mode 100644 lgsm/functions/update_jediknight2.sh delete mode 100644 lgsm/functions/update_minecraft.sh delete mode 100644 lgsm/functions/update_minecraft_bedrock.sh delete mode 100644 lgsm/functions/update_mta.sh delete mode 100644 lgsm/functions/update_papermc.sh delete mode 100644 lgsm/functions/update_steamcmd.sh delete mode 100644 lgsm/functions/update_ts3.sh delete mode 100644 lgsm/functions/update_ut99.sh delete mode 100644 lgsm/functions/update_vintagestory.sh delete mode 100644 lgsm/modules/core_functions.sh diff --git a/lgsm/functions/README.md b/lgsm/functions/README.md deleted file mode 100644 index de008ecfa..000000000 --- a/lgsm/functions/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# LinuxGSM - Modules - -These modules are scripts that are called upon by the primary script linuxgsm.sh - -## Module Names - -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. diff --git a/lgsm/functions/alert.sh b/lgsm/functions/alert.sh deleted file mode 100644 index 59deae2b6..000000000 --- a/lgsm/functions/alert.sh +++ /dev/null @@ -1,238 +0,0 @@ -#!/bin/bash -# LinuxGSM alert.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Overall function for managing alerts. - -functionselfname="$(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_message_head - fn_info_message_distro - fn_info_message_server_resource - fn_info_message_gameserver_resource - fn_info_message_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 -} - -fn_alert_test() { - fn_script_log_info "Sending test alert" - alertsubject="Alert - ${selfname} - Test" - alertemoji="🚧" - alertsound="1" - alerturl="not enabled" - alertbody="Testing LinuxGSM Alert. No action to be taken." -} - -fn_alert_restart() { - fn_script_log_info "Sending alert: Restarted: ${executable} not running" - alertsubject="Alert - ${selfname} - Restarted" - alertemoji="🚨" - alertsound="2" - alerturl="not enabled" - alertbody="${selfname} ${executable} not running" -} - -fn_alert_restart_query() { - fn_script_log_info "Sending alert: Restarted: ${selfname}" - alertsubject="Alert - ${selfname} - Restarted" - alertemoji="🚨" - alertsound="2" - alerturl="not enabled" - alertbody="Unable to query: ${selfname}" -} - -fn_alert_update() { - fn_script_log_info "Sending alert: Updated" - alertsubject="Alert - ${selfname} - Updated" - alertemoji="🎮" - alertsound="1" - alerturl="not enabled" - alertbody="${gamename} received update: ${remotebuildversion}" -} - -fn_alert_check_update() { - fn_script_log_info "Sending alert: Update available" - alertsubject="Alert - ${selfname} - Update available" - alertemoji="🎮" - alertsound="1" - alerturl="not enabled" - alertbody="${gamename} update available: ${remotebuildversion}" -} - -fn_alert_permissions() { - fn_script_log_info "Sending alert: Permissions error" - alertsubject="Alert - ${selfname}: Permissions error" - alertemoji="❗" - alertsound="2" - alerturl="not enabled" - alertbody="${selfname} has permissions issues" -} - -fn_alert_config() { - fn_script_log_info "Sending alert: New _default.cfg" - alertsubject="Alert - ${selfname} - New _default.cfg" - alertemoji="🎮" - alertsound="1" - alerturl="not enabled" - alertbody="${selfname} has received a new _default.cfg. Check file for changes." -} - -if [ "${alert}" == "permissions" ]; then - fn_alert_permissions -elif [ "${alert}" == "restart" ]; then - fn_alert_restart -elif [ "${alert}" == "restartquery" ]; then - fn_alert_restart_query -elif [ "${alert}" == "test" ]; then - fn_alert_test -elif [ "${alert}" == "update" ]; then - fn_alert_update -elif [ "${alert}" == "check-update" ]; then - fn_alert_check_update -elif [ "${alert}" == "config" ]; then - fn_alert_config -fi - -# Generate alert log. -fn_alert_log - -# Generates the more info link. -if [ "${postalert}" == "on" ] && [ -n "${postalert}" ]; then - exitbypass=1 - command_postdetails.sh - fn_firstcommand_reset - unset exitbypass -elif [ "${postalert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then - fn_print_warn_nl "More Info not enabled" - fn_script_log_warn "More Info alerts not enabled" -fi - -if [ "${discordalert}" == "on" ] && [ -n "${discordalert}" ]; then - alert_discord.sh -elif [ "${discordalert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then - fn_print_warn_nl "Discord alerts not enabled" - fn_script_log_warn "Discord alerts not enabled" -elif [ -z "${discordtoken}" ] && [ "${commandname}" == "TEST-ALERT" ]; then - fn_print_error_nl "Discord token not set" - echo -e "* https://docs.linuxgsm.com/alerts/discord" - fn_script_error "Discord token not set" -fi - -if [ "${emailalert}" == "on" ] && [ -n "${email}" ]; then - alert_email.sh -elif [ "${emailalert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then - fn_print_warn_nl "Email alerts not enabled" - fn_script_log_warn "Email alerts not enabled" -elif [ -z "${email}" ] && [ "${commandname}" == "TEST-ALERT" ]; then - fn_print_error_nl "Email not set" - fn_script_log_error "Email not set" -fi - -if [ "${gotifyalert}" == "on" ] && [ -n "${gotifyalert}" ]; then - alert_gotify.sh -elif [ "${gotifyalert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then - fn_print_warn_nl "Gotify alerts not enabled" - fn_script_log_warn "Gotify alerts not enabled" -elif [ -z "${gotifytoken}" ] && [ "${commandname}" == "TEST-ALERT" ]; then - fn_print_error_nl "Gotify token not set" - echo -e "* https://docs.linuxgsm.com/alerts/gotify" - fn_script_error "Gotify token not set" -elif [ -z "${gotifywebhook}" ] && [ "${commandname}" == "TEST-ALERT" ]; then - fn_print_error_nl "Gotify webhook not set" - echo -e "* https://docs.linuxgsm.com/alerts/gotify" - fn_script_error "Gotify webhook not set" -fi - -if [ "${iftttalert}" == "on" ] && [ -n "${iftttalert}" ]; then - alert_ifttt.sh -elif [ "${iftttalert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then - fn_print_warn_nl "IFTTT alerts not enabled" - fn_script_log_warn "IFTTT alerts not enabled" -elif [ -z "${ifttttoken}" ] && [ "${commandname}" == "TEST-ALERT" ]; then - fn_print_error_nl "IFTTT token not set" - echo -e "* https://docs.linuxgsm.com/alerts/ifttt" - fn_script_error "IFTTT token not set" -fi - -if [ "${mailgunalert}" == "on" ] && [ -n "${mailgunalert}" ]; then - alert_mailgun.sh -elif [ "${mailgunalert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then - fn_print_warn_nl "Mailgun alerts not enabled" - fn_script_log_warn "Mailgun alerts not enabled" -elif [ -z "${mailguntoken}" ] && [ "${commandname}" == "TEST-ALERT" ]; then - fn_print_error_nl "Mailgun token not set" - echo -e "* https://docs.linuxgsm.com/alerts/mailgun" - fn_script_error "Mailgun token not set" -fi - -if [ "${pushbulletalert}" == "on" ] && [ -n "${pushbullettoken}" ]; then - alert_pushbullet.sh -elif [ "${pushbulletalert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then - fn_print_warn_nl "Pushbullet alerts not enabled" - fn_script_log_warn "Pushbullet alerts not enabled" -elif [ -z "${pushbullettoken}" ] && [ "${commandname}" == "TEST-ALERT" ]; then - fn_print_error_nl "Pushbullet token not set" - echo -e "* https://docs.linuxgsm.com/alerts/pushbullet" - fn_script_error "Pushbullet token not set" -fi - -if [ "${pushoveralert}" == "on" ] && [ -n "${pushoveralert}" ]; then - alert_pushover.sh -elif [ "${pushoveralert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then - fn_print_warn_nl "Pushover alerts not enabled" - fn_script_log_warn "Pushover alerts not enabled" -elif [ -z "${pushovertoken}" ] && [ "${commandname}" == "TEST-ALERT" ]; then - fn_print_error_nl "Pushover token not set" - echo -e "* https://docs.linuxgsm.com/alerts/pushover" - fn_script_error "Pushover token not set" -fi - -if [ "${telegramalert}" == "on" ] && [ -n "${telegramtoken}" ]; then - alert_telegram.sh -elif [ "${telegramalert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then - fn_print_warn_nl "Telegram Messages not enabled" - fn_script_log_warn "Telegram Messages not enabled" -elif [ -z "${telegramtoken}" ] && [ "${commandname}" == "TEST-ALERT" ]; then - fn_print_error_nl "Telegram token not set." - echo -e "* https://docs.linuxgsm.com/alerts/telegram" - fn_script_error "Telegram token not set." -elif [ -z "${telegramchatid}" ] && [ "${commandname}" == "TEST-ALERT" ]; then - fn_print_error_nl "Telegram chat id not set." - echo -e "* https://docs.linuxgsm.com/alerts/telegram" - fn_script_error "Telegram chat id not set." -fi - -if [ "${rocketchatalert}" == "on" ] && [ -n "${rocketchatalert}" ]; then - alert_rocketchat.sh -elif [ "${rocketchatalert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then - fn_print_warn_nl "Rocketchat alerts not enabled" - fn_script_log_warn "Rocketchat alerts not enabled" -elif [ -z "${rocketchattoken}" ] && [ "${commandname}" == "TEST-ALERT" ]; then - fn_print_error_nl "Rocketchat token not set" - #echo -e "* https://docs.linuxgsm.com/alerts/slack" - fn_script_error "Rocketchat token not set" -fi - -if [ "${slackalert}" == "on" ] && [ -n "${slackalert}" ]; then - alert_slack.sh -elif [ "${slackalert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then - fn_print_warn_nl "Slack alerts not enabled" - fn_script_log_warn "Slack alerts not enabled" -elif [ -z "${slacktoken}" ] && [ "${commandname}" == "TEST-ALERT" ]; then - fn_print_error_nl "Slack token not set" - echo -e "* https://docs.linuxgsm.com/alerts/slack" - fn_script_error "Slack token not set" -fi diff --git a/lgsm/functions/alert_discord.sh b/lgsm/functions/alert_discord.sh deleted file mode 100644 index 770817516..000000000 --- a/lgsm/functions/alert_discord.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash -# LinuxGSM alert_discord.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Sends Discord alert. - -functionselfname="$(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": [{ - "color": "2067276", - "author": { - "name": "${alertemoji} ${alertsubject} ${alertemoji}", - "icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg" - }, - "title": "${servername}", - "description": "${alertbody} \n More info: ${alerturl}", - "url": "", - "type": "content", - "thumbnail": {}, - "fields": [ - { - "name": "Game", - "value": "${gamename}", - "inline": true - }, - { - "name": "Server IP", - "value": "[${alertip}:${port}](https://www.gametracker.com/server_info/${alertip}:${port})", - "inline": true - }, - { - "name": "Hostname", - "value": "${HOSTNAME}", - "inline": true - } - ] - }] -} -EOF -) - -fn_print_dots "Sending Discord alert" - -discordsend=$(curl --connect-timeout 10 -sSL -H "Content-Type: application/json" -X POST -d "$(echo -n "${json}" | jq -c .)" "${discordwebhook}") - -if [ -n "${discordsend}" ]; then - fn_print_fail_nl "Sending Discord alert: ${discordsend}" - fn_script_log_fatal "Sending Discord alert: ${discordsend}" -else - fn_print_ok_nl "Sending Discord alert" - fn_script_log_pass "Sending Discord alert" -fi diff --git a/lgsm/functions/alert_email.sh b/lgsm/functions/alert_email.sh deleted file mode 100644 index ad90e880f..000000000 --- a/lgsm/functions/alert_email.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -# LinuxGSM alert_email.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Sends email alert. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -fn_print_dots "Sending Email alert: ${email}" -fn_sleep_time - -if [ -n "${emailfrom}" ]; then - mail -s "${alertsubject}" -r "${emailfrom}" "${email}" < "${alertlog}" -else - mail -s "${alertsubject}" "${email}" < "${alertlog}" -fi -exitcode=$? -if [ "${exitcode}" == "0" ]; then - fn_print_ok_nl "Sending Email alert: ${email}" - fn_script_log_pass "Sending Email alert: ${email}" -else - fn_print_fail_nl "Sending Email alert: ${email}" - fn_script_log_fatal "Sending Email alert: ${email}" -fi diff --git a/lgsm/functions/alert_gotify.sh b/lgsm/functions/alert_gotify.sh deleted file mode 100644 index faeba4593..000000000 --- a/lgsm/functions/alert_gotify.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -# LinuxGSM alert_gotify.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Sends Gotify alert. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -json=$( - cat << EOF -{ - "title": "${alertemoji} ${alertsubject} ${alertemoji}", - "message": "Server name\n${servername}\n\nMessage\n${alertbody}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\nMore info\n${alerturl}", - "priority": 5 -} -EOF -) - -fn_print_dots "Sending Gotify alert" - -gotifysend=$(curl --connect-timeout 10 -sSL "${gotifywebhook}/message"?token="${gotifytoken}" -H "Content-Type: application/json" -X POST -d "$(echo -n "${json}" | jq -c .)") - -if [ -n "${gotifysend}" ]; then - fn_print_ok_nl "Sending Gotify alert" - fn_script_log_pass "Sending Gotify alert" -else - fn_print_fail_nl "Sending Gotify alert: ${gotifysend}" - fn_script_log_fatal "Sending Gotify alert: ${gotifysend}" -fi diff --git a/lgsm/functions/alert_ifttt.sh b/lgsm/functions/alert_ifttt.sh deleted file mode 100644 index f8bbc24ad..000000000 --- a/lgsm/functions/alert_ifttt.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -# LinuxGSM alert_ifttt.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Sends IFTTT alert. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -json=$( - cat << EOF -{ - "value1": "${selfname}", - "value2": "${alertemoji} ${alertsubject} ${alertemoji}", - "value3": "Message: \n${alertbody}\n\nGame: \n${gamename}\n\nServer name: \n${servername}\n\nHostname: \n${HOSTNAME}\n\nServer IP: \n${alertip}:${port}\n\nMore info: \n${alerturl}" -} -EOF -) - -fn_print_dots "Sending IFTTT alert" -iftttsend=$(curl --connect-timeout 10 -sSL -H "Content-Type: application/json" -X POST -d "$(echo -n "${json}" | jq -c .)" "https://maker.ifttt.com/trigger/${iftttevent}/with/key/${ifttttoken}" | grep "Bad Request") - -if [ -n "${iftttsend}" ]; then - fn_print_fail_nl "Sending IFTTT alert: ${pushbulletsend}" - fn_script_log_fatal "Sending IFTTT alert: ${pushbulletsend}" -else - fn_print_ok_nl "Sending IFTTT alert" - fn_script_log_pass "Sent IFTTT alert" -fi diff --git a/lgsm/functions/alert_mailgun.sh b/lgsm/functions/alert_mailgun.sh deleted file mode 100644 index 25576209c..000000000 --- a/lgsm/functions/alert_mailgun.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -# LinuxGSM alert_mailgun.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Sends Mailgun Email alert. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -if [ "${mailgunapiregion}" == "eu" ]; then - mailgunapiurl="https://api.eu.mailgun.net" -else - mailgunapiurl="https://api.mailgun.net" -fi - -fn_print_dots "Sending Email alert: Mailgun: ${mailgunemail}" - -mailgunsend=$(curl --connect-timeout 10 -s --user "api:${mailguntoken}" \ - -F from="LinuxGSM <${mailgunemailfrom}>" \ - -F to="LinuxGSM Admin <${mailgunemail}>" \ - -F subject="${alertemoji} ${alertsubject} ${alertemoji}" \ - -F o:tag='alert' \ - -F o:tag='LinuxGSM' \ - -F text="$(cat "${alertlog}")" "${mailgunapiurl}/v3/${mailgundomain}/messages") - -if [ -z "${mailgunsend}" ]; then - fn_print_fail_nl "Sending Email alert: Mailgun: ${mailgunemail}" - fn_script_log_fatal "Sending Email alert: Mailgun: ${mailgunemail}" -else - fn_print_ok_nl "Sending Email alert: Mailgun: ${mailgunemail}" - fn_script_log_pass "Sending Email alert: Mailgun: ${mailgunemail}" -fi diff --git a/lgsm/functions/alert_pushbullet.sh b/lgsm/functions/alert_pushbullet.sh deleted file mode 100644 index 3e82d0db0..000000000 --- a/lgsm/functions/alert_pushbullet.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -# LinuxGSM alert_pushbullet.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Sends Pushbullet Messenger alert. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -json=$( - cat << EOF -{ - "channel_tag": "${channeltag}", - "type": "note", - "title": "${alertemoji} ${alertsubject} ${alertemoji}", - "body": "Server name\n${servername}\n\nMessage\n${alertbody}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\nMore info\n${alerturl}" -} -EOF -) - -fn_print_dots "Sending Pushbullet alert" -pushbulletsend=$(curl --connect-timeout 10 -sSL -u """${pushbullettoken}"":" -H "Content-Type: application/json" -X POST -d "$(echo -n "${json}" | jq -c .)" "https://api.pushbullet.com/v2/pushes" | grep "error_code") - -if [ -n "${pushbulletsend}" ]; then - fn_print_fail_nl "Sending Pushbullet alert: ${pushbulletsend}" - fn_script_log_fatal "Sending Pushbullet alert: ${pushbulletsend}" -else - fn_print_ok_nl "Sending Pushbullet alert" - fn_script_log_pass "Sent Pushbullet alert" -fi diff --git a/lgsm/functions/alert_pushover.sh b/lgsm/functions/alert_pushover.sh deleted file mode 100644 index d7c086478..000000000 --- a/lgsm/functions/alert_pushover.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -# LinuxGSM alert_pushover.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Sends Pushover alert. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -fn_print_dots "Sending Pushover alert" - -# Different alerts are given different priorities and notification sounds. -if [ "${alertsound}" == "1" ]; then - alertsound="" - alertpriority="0" -elif [ "${alertsound}" == "2" ]; then - # restarted. - alertsound="siren" - alertpriority="1" -else - alertsound="" - alertpriority="0" -fi - -pushoversend=$(curl --connect-timeout 10 -sS -F token="${pushovertoken}" -F user="${pushoveruserkey}" -F html="1" -F sound="${alertsound}" -F priority="${alertpriority}" -F title="${alertemoji} ${alertsubject} ${alertemoji}" -F message=" Server name
${servername}

Message
${alertbody}

Game
${gamename}

Server IP
${alertip}:${port}

Hostname
${HOSTNAME}

More info
${alerturl}" "https://api.pushover.net/1/messages.json" | grep errors) - -if [ -n "${pushoversend}" ]; then - fn_print_fail_nl "Sending Pushover alert: ${pushoversend}" - fn_script_log_fatal "Sending Pushover alert: ${pushoversend}" -else - fn_print_ok_nl "Sending Pushover alert" - fn_script_log_pass "Sent Pushover alert" -fi diff --git a/lgsm/functions/alert_rocketchat.sh b/lgsm/functions/alert_rocketchat.sh deleted file mode 100644 index 34d018e38..000000000 --- a/lgsm/functions/alert_rocketchat.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash -# LinuxGSM alert_rocketchat.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Sends Rocketchat alert. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -json=$( - cat << EOF -{ - "alias": "LinuxGSM", - "text": "*${alertemoji} ${alertsubject} ${alertemoji}* \n *${servername}* \n ${alertbody} \n More info: ${alerturl}", - "attachments": [ - { - "fields": [ - { - "short": true, - "title": "Game:", - "value": "${gamename}" - }, - { - "short": true, - "title": "Server IP:", - "value": "${alertip}:${port}" - }, - { - "short": true, - "title": "Hostname:", - "value": "${HOSTNAME}" - } - ] - } - ] -} -EOF -) - -fn_print_dots "Sending Rocketchat alert" - -rocketchatsend=$(curl --connect-timeout 10 -sSL -H "Content-Type: application/json" -X POST -d "$(echo -n "${json}" | jq -c .)" "${rocketchatwebhook}") - -if [ -n "${rocketchatsend}" ]; then - fn_print_ok_nl "Sending Rocketchat alert" - fn_script_log_pass "Sending Rocketchat alert" -else - fn_print_fail_nl "Sending Rocketchat alert: ${rocketchatsend}" - fn_script_log_fatal "Sending Rocketchat alert: ${rocketchatsend}" -fi diff --git a/lgsm/functions/alert_slack.sh b/lgsm/functions/alert_slack.sh deleted file mode 100644 index 2e87c1571..000000000 --- a/lgsm/functions/alert_slack.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/bash -# LinuxGSM alert_slack.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Sends Slack alert. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -json=$( - cat << EOF -{ - "attachments": [ - { - "color": "#36a64f", - "blocks": [ - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "*LinuxGSM Alert*" - } - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "*${alertemoji} ${alertsubject}* \n ${alertbody}" - } - }, - { - "type": "divider" - }, - { - "type": "section", - "fields": [ - { - "type": "mrkdwn", - "text": "*Game:* \n ${gamename}" - }, - { - "type": "mrkdwn", - "text": "*Server IP:* \n ${alertip}:${port}" - }, - { - "type": "mrkdwn", - "text": "*Server Name:* \n ${servername}" - } - ] - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "Hostname: ${HOSTNAME} / More info: ${alerturl}" - } - } - ] - } - ] -} -EOF -) - -fn_print_dots "Sending Slack alert" - -slacksend=$(curl --connect-timeout 10 -sSL -H "Content-Type: application/json" -X POST -d "$(echo -n "${json}" | jq -c .)" "${slackwebhook}") - -if [ "${slacksend}" == "ok" ]; then - fn_print_ok_nl "Sending Slack alert" - fn_script_log_pass "Sending Slack alert" -else - fn_print_fail_nl "Sending Slack alert: ${slacksend}" - fn_script_log_fatal "Sending Slack alert: ${slacksend}" -fi diff --git a/lgsm/functions/alert_telegram.sh b/lgsm/functions/alert_telegram.sh deleted file mode 100644 index 27e34beb4..000000000 --- a/lgsm/functions/alert_telegram.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -# LinuxGSM alert_telegram.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Sends Telegram Messenger alert. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -json=$( - cat << EOF -{ - "chat_id": "${telegramchatid}", - "parse_mode": "HTML", - "text": "${alertemoji} ${alertsubject} ${alertemoji}\n\nServer name\n${servername}\n\nMessage\n${alertbody}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\nMore info\n${alerturl}", - "disable_web_page_preview": "yes" -} -EOF -) - -fn_print_dots "Sending Telegram alert" -telegramsend=$(curl --connect-timeout 10 -sSL -H "Content-Type: application/json" -X POST -d "$(echo -n "${json}" | jq -c .)" ${curlcustomstring} "https://${telegramapi}/bot${telegramtoken}/sendMessage" | grep "error_code") - -if [ -n "${telegramsend}" ]; then - fn_print_fail_nl "Sending Telegram alert: ${telegramsend}" - fn_script_log_fatal "Sending Telegram alert: ${telegramsend}" -else - fn_print_ok_nl "Sending Telegram alert" - fn_script_log_pass "Sent Telegram alert" -fi diff --git a/lgsm/functions/check.sh b/lgsm/functions/check.sh deleted file mode 100644 index e19853424..000000000 --- a/lgsm/functions/check.sh +++ /dev/null @@ -1,101 +0,0 @@ -#!/bin/bash -# LinuxGSM check.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Overall function for managing checks. -# Runs checks that will either halt on or fix an issue. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -# Every command that requires checks just references check.sh. -# check.sh selects which checks to run by using arrays. - -if [ "${commandname}" != "INSTALL" ]; then - check_root.sh -fi - -if [ "${commandname}" != "UPDATE-LGSM" ]; then - check_version.sh -fi - -check_tmuxception.sh - -if [ "$(whoami)" != "root" ] || [ -f /.dockerenv ]; then - if [ "${commandname}" != "MONITOR" ]; then - check_permissions.sh - fi -fi - -if [ "${commandname}" != "INSTALL" ] && [ "${commandname}" != "UPDATE-LGSM" ] && [ "${commandname}" != "DETAILS" ] && [ "${commandname}" != "POST-DETAILS" ]; then - check_system_dir.sh -fi - -allowed_commands_array=(DEBUG START) -for allowed_command in "${allowed_commands_array[@]}"; do - if [ "${allowed_command}" == "${commandname}" ]; then - check_executable.sh - fi -done - -if [ "$(whoami)" != "root" ] || [ -f /.dockerenv ]; then - allowed_commands_array=(DEBUG START INSTALL) - for allowed_command in "${allowed_commands_array[@]}"; do - if [ "${allowed_command}" == "${commandname}" ]; then - check_glibc.sh - fi - done -fi - -allowed_commands_array=(BACKUP CHANGE-PASSWORD CONSOLE DEBUG DETAILS FASTDL MAP-COMPRESSOR MODS-INSTALL MODS-REMOVE MODS-UPDATE MONITOR POST-DETAILS RESTART START STOP TEST-ALERT UPDATE UPDATE-LGSM VALIDATE WIPE) -for allowed_command in "${allowed_commands_array[@]}"; do - if [ "${allowed_command}" == "${commandname}" ]; then - check_logs.sh - fi -done - -allowed_commands_array=(DEBUG START) -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) -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) -for allowed_command in "${allowed_commands_array[@]}"; do - if [ "${allowed_command}" == "${commandname}" ]; then - if [ -z "${installflag}" ]; then - check_ip.sh - fi - fi -done - -allowed_commands_array=(CHECK-UPDATE DEBUG MONITOR START UPDATE VALIDATE) -for allowed_command in "${allowed_commands_array[@]}"; do - if [ "${allowed_command}" == "${commandname}" ]; then - if [ "${appid}" ]; then - check_steamcmd.sh - fi - fi -done - -allowed_commands_array=(CHANGE-PASSWORD DETAILS MONITOR POST-DETAILS START STOP UPDATE VALIDATE) -for allowed_command in "${allowed_commands_array[@]}"; do - if [ "${allowed_command}" == "${commandname}" ]; then - check_status.sh - fi -done - -allowed_commands_array=(DEBUG START INSTALL) -for allowed_command in "${allowed_commands_array[@]}"; do - if [ "${allowed_command}" == "${commandname}" ]; then - check_system_requirements.sh - fi -done diff --git a/lgsm/functions/check_config.sh b/lgsm/functions/check_config.sh deleted file mode 100644 index 2c65243eb..000000000 --- a/lgsm/functions/check_config.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -# LinuxGSM check_config.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Checks if the server config is missing and warns the user if needed. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -if [ -n "${servercfgfullpath}" ] && [ ! -f "${servercfgfullpath}" ]; then - fn_print_dots "" - fn_print_warn_nl "Configuration file missing!" - echo -e "${servercfgfullpath}" - fn_script_log_warn "Configuration file missing!" - fn_script_log_warn "${servercfgfullpath}" - install_config.sh -fi - -if [ "${shortname}" == "rust" ] && [ -v rconpassword ] && [ -z "${rconpassword}" ]; then - fn_print_dots "" - fn_print_fail_nl "RCON password is not set" - fn_script_log_warn "RCON password is not set" -elif [ -v rconpassword ] && [ "${rconpassword}" == "CHANGE_ME" ]; then - fn_print_dots "" - fn_print_warn_nl "Default RCON Password detected" - fn_script_log_warn "Default RCON Password detected" -fi - -if [ "${shortname}" == "vh" ] && [ -z "${serverpassword}" ]; then - fn_print_fail_nl "serverpassword is not set" - fn_script_log_fatal "serverpassword is not set" -elif [ "${shortname}" == "vh" ] && [ "${#serverpassword}" -le "4" ]; then - fn_print_fail_nl "serverpassword is to short (min 5 chars)" - fn_script_log_fatal "serverpassword is to short (min 5 chars)" -fi diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh deleted file mode 100644 index bb8507769..000000000 --- a/lgsm/functions/check_deps.sh +++ /dev/null @@ -1,363 +0,0 @@ -#!/bin/bash -# LinuxGSM check_deps.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Checks and installs missing dependencies. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -fn_install_mono_repo() { - if [ "${autodepinstall}" == "0" ]; then - fn_print_information_nl "Automatically adding Mono repository." - fn_script_log_info "Automatically adding Mono repository." - echo -en ".\r" - sleep 1 - echo -en "..\r" - sleep 1 - echo -en "...\r" - sleep 1 - echo -en " \r" - if [ "${distroid}" == "ubuntu" ]; then - if [ "${distroversion}" == "20.04" ]; then - cmd="sudo apt install gnupg ca-certificates;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/ubuntu stable-focal main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" - elif [ "${distroversion}" == "18.04" ]; then - cmd="sudo apt install gnupg ca-certificates;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/ubuntu stable-bionic main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" - elif [ "${distroversion}" == "16.04" ]; then - cmd="sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;sudo apt install apt-transport-https ca-certificates;echo 'deb https://download.mono-project.com/repo/ubuntu stable-xenial main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" - else - monoautoinstall="1" - fi - elif [ "${distroid}" == "debian" ]; then - if [ "${distroversion}" == "10" ]; then - cmd="sudo apt install apt-transport-https dirmngr gnupg ca-certificates;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/debian stable-buster main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" - elif [ "${distroversion}" == "9" ]; then - cmd="sudo apt install apt-transport-https dirmngr gnupg ca-certificates;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/debian stable-stretch main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" - else - monoautoinstall="1" - fi - elif [ "${distroid}" == "centos" ] || [ "${distroid}" == "almalinux" ] || [ "${distroid}" == "rocky" ]; then - if [ "${distroversion}" == "8" ]; then - cmd="sudo rpmkeys --import 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF';su -c 'curl https://download.mono-project.com/repo/centos8-stable.repo | tee /etc/yum.repos.d/mono-centos8-stable.repo'" - elif [ "${distroversion}" == "7" ]; then - cmd="sudo rpmkeys --import 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF';su -c 'curl https://download.mono-project.com/repo/centos7-stable.repo | tee /etc/yum.repos.d/mono-centos7-stable.repo'" - else - monoautoinstall="1" - fi - elif [ "${distroid}" == "fedora" ]; then - if [ "${distroversion}" -ge "29" ]; then - cmd="sudo rpm --import 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF';su -c 'curl https://download.mono-project.com/repo/centos8-stable.repo | tee /etc/yum.repos.d/mono-centos8-stable.repo';dnf update" - else - cmd="sudo rpm --import 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF';su -c 'curl https://download.mono-project.com/repo/centos7-stable.repo | tee /etc/yum.repos.d/mono-centos7-stable.repo';dnf update" - fi - else - monoautoinstall="1" - fi - - # Run the mono repo install. - eval "${cmd}" - - # Did Mono repo install correctly? - if [ "${monoautoinstall}" != "1" ]; then - if [ $? != 0 ]; then - fn_print_failure_nl "Unable to install Mono repository." - fn_script_log_fatal "Unable to install Mono repository." - else - fn_print_complete_nl "Installing Mono repository completed." - fn_script_log_pass "Installing Mono repository completed." - fi - fi - - # Mono can not be auto installed with this distro. - if [ "${monoautoinstall}" == "1" ]; then - fn_print_warning_nl "Mono auto install not available for ${distroname}." - echo -e "Follow instructions on Mono website to install." - echo -e "https://www.mono-project.com/download/stable/#download-lin" - fn_script_log_warn "Unable to install Mono repository. Mono auto install not available for ${distroname}." - fi - - else - fn_print_information_nl "Installing Mono repository." - fn_print_warning_nl "$(whoami) does not have sudo access." - echo -e "Follow instructions on Mono website to install." - echo -e "https://www.mono-project.com/download/stable/#download-lin" - fn_script_log_warn "Unable to install Mono repository. $(whoami) does not have sudo access." - fi -} - -fn_deps_email() { - # Adds postfix to required dependencies if email alert is enabled. - if [ "${emailalert}" == "on" ]; then - if [ -f /usr/bin/mailx ]; then - if [ -d /etc/exim4 ]; then - array_deps_required+=(exim4) - elif [ -d /etc/sendmail ]; then - array_deps_required+=(sendmail) - elif [ "$(command -v dpkg-query 2> /dev/null)" ]; then - array_deps_required+=(mailutils postfix) - elif [ "$(command -v rpm 2> /dev/null)" ]; then - array_deps_required+=(mailx postfix) - fi - else - if [ "$(command -v dpkg-query 2> /dev/null)" ]; then - array_deps_required+=(mailutils postfix) - elif [ "$(command -v rpm 2> /dev/null)" ]; then - array_deps_required+=(mailx postfix) - fi - fi - fi -} - -fn_install_missing_deps() { - # If any dependencies are not installed. - if [ "${#array_deps_missing[*]}" != "0" ]; then - if [ "${commandname}" == "INSTALL" ]; then - fn_print_warning_nl "Missing dependencies: ${red}${array_deps_missing[*]}${default}" - fn_script_log_warn "Missing dependencies: ${array_deps_missing[*]}" - else - fn_print_dots "Missing dependencies" - fn_print_warn "Missing dependencies: ${red}${array_deps_missing[*]}${default}" - fn_script_log_warn "Missing dependencies: ${array_deps_missing[*]}" - fi - fn_sleep_time - - # Attempt automatic dependency installation - if [ "${autoinstall}" == "1" ]; then - sudo -n true > /dev/null 2>&1 - else - sudo -v > /dev/null 2>&1 - fi - autodepinstall="$?" - - if [ "${monostatus}" == "1" ]; then - fn_install_mono_repo - fi - - if [ "${commandname}" == "INSTALL" ]; then - if [ "${autodepinstall}" == "0" ]; then - fn_print_information_nl "$(whoami) has sudo access." - fn_script_log_info "$(whoami) has sudo access." - else - fn_print_warning_nl "$(whoami) does not have sudo access. Manually install dependencies." - fn_script_log_warn "$(whoami) does not have sudo access. Manually install dependencies." - fi - fi - - # Add sudo dpkg --add-architecture i386 if using i386 packages. - if [ "$(command -v dpkg-query 2> /dev/null)" ]; then - if printf '%s\n' "${array_deps_required[@]}" | grep -q -P 'i386'; then - i386installcommand="sudo dpkg --add-architecture i386; " - fi - fi - - # If automatic dependency install is available - if [ "${autodepinstall}" == "0" ]; then - fn_print_information_nl "Automatically installing missing dependencies." - fn_script_log_info "Automatically installing missing dependencies." - echo -en ".\r" - sleep 1 - echo -en "..\r" - sleep 1 - echo -en "...\r" - sleep 1 - echo -en " \r" - if [ "$(command -v dpkg-query 2> /dev/null)" ]; then - cmd="echo steamcmd steam/question select \"I AGREE\" | sudo debconf-set-selections; echo steamcmd steam/license note '' | sudo debconf-set-selections; ${i386installcommand}sudo apt-get update; sudo apt-get -y install ${array_deps_missing[*]}" - eval "${cmd}" - elif [ "$(command -v dnf 2> /dev/null)" ]; then - cmd="sudo dnf -y install ${array_deps_missing[*]}" - eval "${cmd}" - elif [ "$(command -v yum 2> /dev/null)" ]; then - cmd="sudo yum -y install ${array_deps_missing[*]}" - eval "${cmd}" - fi - autodepinstall="$?" - - # If auto install passes remove steamcmd install failure. - if [ "${autodepinstall}" == "0" ]; then - unset steamcmdfail - fi - fi - - # If automatic dependency install is unavailable. - if [ "${autodepinstall}" != "0" ]; then - if [ "$(command -v dpkg-query 2> /dev/null)" ]; then - echo -e "${i386installcommand}sudo apt update; sudo apt install ${array_deps_missing[*]}" - elif [ "$(command -v dnf 2> /dev/null)" ]; then - echo -e "sudo dnf install ${array_deps_missing[*]}" - elif [ "$(command -v yum 2> /dev/null)" ]; then - echo -e "sudo yum install ${array_deps_missing[*]}" - fi - fi - - if [ "${steamcmdfail}" ]; then - if [ "${commandname}" == "INSTALL" ]; then - fn_print_failure_nl "Missing dependencies required to run SteamCMD." - fn_script_log_fatal "Missing dependencies required to run SteamCMD." - core_exit.sh - else - fn_print_error_nl "Missing dependencies required to run SteamCMD." - fn_script_log_error "Missing dependencies required to run SteamCMD." - fi - fi - - else - if [ "${commandname}" == "INSTALL" ]; then - fn_print_information_nl "Required dependencies already installed." - fn_script_log_info "Required dependencies already installed." - fi - fi -} - -fn_check_loop() { - # Loop though required depenencies checking if they are installed. - for deptocheck in ${array_deps_required[*]}; do - fn_deps_detector - done - - # user will be informed of any missing dependencies. - fn_install_missing_deps -} - -# Checks if dependency is installed or not. -fn_deps_detector() { - ## Check. - # SteamCMD: Will be removed from required array if no appid is present or non-free repo is not available. - # This will cause SteamCMD to be installed using tar. - if [ "${deptocheck}" == "libsdl2-2.0-0:i386" ] && [ -z "${appid}" ]; then - array_deps_required=("${array_deps_required[@]/libsdl2-2.0-0:i386/}") - steamcmdstatus=1 - elif [ "${deptocheck}" == "steamcmd" ] && [ -z "${appid}" ]; then - array_deps_required=("${array_deps_required[@]/steamcmd/}") - steamcmdstatus=1 - elif [ "${deptocheck}" == "steamcmd" ] && [ "${distroid}" == "debian" ] && ! grep -qE "^deb .*non-free" /etc/apt/sources.list; then - array_deps_required=("${array_deps_required[@]/steamcmd/}") - steamcmdstatus=1 - # Java: Added for users using Oracle JRE to bypass check. - elif [[ ${deptocheck} == "openjdk"* ]] || [[ ${deptocheck} == "java"* ]]; then - # Is java already installed? - if [ -n "${javaversion}" ]; then - # Added for users using Oracle JRE to bypass check. - depstatus=0 - deptocheck="${javaversion}" - else - depstatus=1 - fi - # Mono: A Mono repo needs to be installed. - elif [ "${deptocheck}" == "mono-complete" ]; then - if [ -n "${monoversion}" ] && [ "${monoversion}" -ge "5" ]; then - # Mono >= 5.0.0 already installed. - depstatus=0 - monostatus=0 - else - # Mono not installed or installed Mono < 5.0.0. - depstatus=1 - monostatus=1 - fi - elif [ "$(command -v dpkg-query 2> /dev/null)" ]; then - dpkg-query -W -f='${Status}' "${deptocheck}" 2> /dev/null | grep -q -P '^install ok installed' - depstatus=$? - elif [ "$(command -v dnf 2> /dev/null)" ]; then - dnf list installed "${deptocheck}" > /dev/null 2>&1 - depstatus=$? - elif [ "$(command -v rpm 2> /dev/null)" ]; then - rpm -q "${deptocheck}" > /dev/null 2>&1 - depstatus=$? - fi - - # Outcome of Check. - if [ "${steamcmdstatus}" == "1" ]; then - # If SteamCMD is not available in repo dont check for it. - unset steamcmdstatus - elif [ "${depstatus}" == "0" ]; then - # If dependency is found. - missingdep=0 - if [ "${commandname}" == "INSTALL" ]; then - echo -e "${green}${deptocheck}${default}" - sleep 0.1 - fi - elif [ "${depstatus}" != "0" ]; then - # If dependency is not found. - missingdep=1 - if [ "${commandname}" == "INSTALL" ]; then - echo -e "${red}${deptocheck}${default}" - sleep 0.1 - fi - # If SteamCMD requirements are not met install will fail. - if [ -n "${appid}" ]; then - for steamcmddeptocheck in ${array_deps_required_steamcmd[*]}; do - if [ "${deptocheck}" != "steamcmd" ] && [ "${deptocheck}" == "${steamcmddeptocheck}" ]; then - steamcmdfail=1 - fi - done - fi - fi - unset depstatus - - # Missing dependencies are added to array_deps_missing. - if [ "${missingdep}" == "1" ]; then - array_deps_missing+=("${deptocheck}") - fi -} - -if [ "${commandname}" == "INSTALL" ]; then - if [ "$(whoami)" == "root" ] && [ ! -f /.dockerenv ]; then - echo -e "" - echo -e "${lightyellow}Checking Dependencies as root${default}" - echo -e "=================================" - fn_print_information_nl "Checking any missing dependencies for ${gamename} server only." - fn_print_information_nl "This will NOT install a ${gamename} server." - fn_sleep_time - else - echo -e "" - echo -e "${lightyellow}Checking Dependencies${default}" - echo -e "=================================" - fi -fi - -# Will warn user if their distro is no longer supported by the vendor. -if [ -n "${distrosupport}" ]; then - if [ "${distrosupport}" == "unsupported" ]; then - fn_print_warning_nl "${distroname} is no longer supported by the vendor. Upgrading is recommended." - fn_script_log_warn "${distroname} is no longer supported by the vendor. Upgrading is recommended." - fi -fi - -info_distro.sh - -if [ ! -f "${tmpdir}/dependency-no-check.tmp" ] && [ ! -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then - # Check that the distro dependency csv file exists. - fn_check_file_github "lgsm/data" "${distroid}-${distroversioncsv}.csv" - if [ -n "${checkflag}" ] && [ "${checkflag}" == "0" ]; then - fn_fetch_file_github "lgsm/data" "${distroid}-${distroversioncsv}.csv" "lgsm/data" "chmodx" "norun" "noforce" "nohash" - fi -fi - -# If the file successfully downloaded run the dependency check. -if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then - depall=$(awk -F, '$1=="all" {$1=""; print $0}' "${datadir}/${distroid}-${distroversioncsv}.csv") - depsteamcmd=$(awk -F, '$1=="steamcmd" {$1=""; print $0}' "${datadir}/${distroid}-${distroversioncsv}.csv") - depshortname=$(awk -v shortname="${shortname}" -F, '$1==shortname {$1=""; print $0}' "${datadir}/${distroid}-${distroversioncsv}.csv") - - # Generate array of missing deps. - array_deps_missing=() - - array_deps_required=("${depall} ${depsteamcmd} ${depshortname}") - array_deps_required_steamcmd=("${depsteamcmd}") - fn_deps_email - # Unique sort dependency array. - IFS=" " read -r -a array_deps_required <<< "$(echo "${array_deps_required[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' ')" - - fn_check_loop -# Warn the user that dependency checking is unavailable for their distro. -elif [ "${commandname}" == "INSTALL" ] || [ -n "${checkflag}" ] && [ "${checkflag}" != "0" ]; then - fn_print_warning_nl "LinuxGSM dependency checking currently unavailable for ${distroname}." - # Prevent future dependency checking if unavailable for the distro. - echo "${version}" > "${tmpdir}/dependency-no-check.tmp" -elif [ -f "${tmpdir}/dependency-no-check.tmp" ]; then - # Allow LinuxGSM to try a dependency check if LinuxGSM has been recently updated. - nocheckversion=$(cat "${tmpdir}/dependency-no-check.tmp") - if [ "${version}" != "${nocheckversion}" ]; then - rm -f "${tmpdir:?}/dependency-no-check.tmp" - fi -fi diff --git a/lgsm/functions/check_executable.sh b/lgsm/functions/check_executable.sh deleted file mode 100644 index d1b5c3efd..000000000 --- a/lgsm/functions/check_executable.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# LinuxGSM check_executable.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Checks if server executable exists. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -# Check if executable exists -execname=$(basename "${executable}") -if [ ! -f "${executabledir}/${execname}" ]; then - fn_print_fail_nl "executable was not found" - echo -e "* ${executabledir}/${execname}" - if [ -d "${lgsmlogdir}" ]; then - fn_script_log_fatal "Executable was not found: ${executabledir}/${execname}" - fi - unset exitbypass - core_exit.sh -fi diff --git a/lgsm/functions/check_glibc.sh b/lgsm/functions/check_glibc.sh deleted file mode 100644 index b1a959f5b..000000000 --- a/lgsm/functions/check_glibc.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -# LinuxGSM check_glibc.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Checks if the server has the correct Glibc version. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -info_distro.sh - -if [ "${glibc}" == "null" ]; then - # Glibc is not required. - : -elif [ -z "${glibc}" ]; then - fn_print_dots "glibc" - fn_print_error_nl "glibc requirement unknown" - fn_script_log_error "glibc requirement unknown" -elif [ "$(printf '%s\n'${glibc}'\n' "${glibcversion}" | sort -V | head -n 1)" != "${glibc}" ]; then - fn_print_dots "glibc" - fn_print_error_nl "glibc requirements not met" - fn_script_log_error "glibc requirements not met" - echo -en "\n" - echo -e " * glibc required: ${glibc}" - echo -e " * glibc installed: ${red}${glibcversion}${default}" - echo -en "\n" - fn_print_information_nl "distro upgrade is required" - fn_script_log_info "distro upgrade is required" -fi diff --git a/lgsm/functions/check_ip.sh b/lgsm/functions/check_ip.sh deleted file mode 100644 index 4b8eca5ec..000000000 --- a/lgsm/functions/check_ip.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -# LinuxGSM check_ip.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Automatically identifies the server interface IP. -# If multiple interfaces are detected the user will need to manually set using ip="0.0.0.0". - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -info_game.sh - -ip_commands_array=("/bin/ip" "/usr/sbin/ip" "ip") -for ip_command in "${ip_commands_array[@]}"; do - if [ "$(command -v "${ip_command}" 2> /dev/null)" ]; then - ipcommand="${ip_command}" - break - fi -done - -ethtool_commands_array=("/bin/ethtool" "/usr/sbin/ethtool" "ethtool") -for ethtool_command in "${ethtool_commands_array[@]}"; do - if [ "$(command -v "${ethtool_command}" 2> /dev/null)" ]; then - ethtoolcommand="${ethtool_command}" - break - fi -done - -mapfile -t current_ips < <(${ipcommand} -o -4 addr | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | sort -u | grep -v 127.0.0) - -function fn_is_valid_ip() { - local ip="${1}" - # excluding 0.* ips also - grep -qEe '^[1-9]+[0-9]*\.[0-9]+\.[0-9]+\.[0-9]+$' <<< "${ip}" -} - -# Check if server has multiple IP addresses - -# If the IP variable has been set by user. -if fn_is_valid_ip "${ip}"; then - queryips=("${ip}") - webadminip=("${ip}") - telnetip=("${ip}") -# If game config does have an IP set. -elif fn_is_valid_ip "${configip}"; then - queryips=("${configip}") - ip="${configip}" - webadminip=("${configip}") - telnetip=("${configip}") -# If there is only 1 server IP address. -# Some IP details can automaticly use the one IP -elif [ "${#current_ips[@]}" == "1" ]; then - queryips=("127.0.0.1" "${current_ips[@]}") - ip="0.0.0.0" - webadminip=("${current_ips[@]}") - telnetip=("${current_ips[@]}") -# If no ip is set by the user and server has more than one IP. -else - queryips=("127.0.0.1" "${current_ips[@]}") - ip="0.0.0.0" - webadminip=("${ip}") - telnetip=("${ip}") -fi diff --git a/lgsm/functions/check_last_update.sh b/lgsm/functions/check_last_update.sh deleted file mode 100644 index ee86c0ba1..000000000 --- a/lgsm/functions/check_last_update.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -# LinuxGSM check_last_update.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Checks lock file to see when last update happened. -# Will reboot server if instance not rebooted since update. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -if [ -f "${lockdir}/${selfname}-laststart.lock" ]; then - laststart=$(cat "${lockdir}/${selfname}-laststart.lock") -fi -if [ -f "${lockdir}/lastupdate.lock" ]; then - lastupdate=$(cat "${lockdir}/lastupdate.lock") -fi - -check_status.sh -if [ -f "${lockdir}/lastupdate.lock" ] && [ "${status}" != "0" ]; then - if [ ! -f "${lockdir}/${selfname}-laststart.lock" ] || [ "${laststart}" -lt "${lastupdate}" ]; then - fn_print_info "${selfname} has not been restarted since last update" - fn_script_log_info "${selfname} has not been restarted since last update" - command_restart.sh - fn_firstcommand_reset - fi -fi diff --git a/lgsm/functions/check_logs.sh b/lgsm/functions/check_logs.sh deleted file mode 100644 index fa3df92d1..000000000 --- a/lgsm/functions/check_logs.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -# LinuxGSM check_logs.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Checks if log files exist. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -fn_check_logs() { - fn_print_dots "Checking for log files" - fn_print_info_nl "Checking for log files: Creating log files" - checklogs=1 - install_logs.sh -} - -# Create directories for the script and console logs. -if [ ! -d "${lgsmlogdir}" ] || [ ! -d "${consolelogdir}" ]; then - fn_check_logs -fi - -# Create gamelogdir. -# If variable exists gamelogdir exists and log/server does not. -if [ "${gamelogdir}" ] && [ -d "${gamelogdir}" ] && [ ! -d "${logdir}/server" ]; then - fn_check_logs -fi diff --git a/lgsm/functions/check_permissions.sh b/lgsm/functions/check_permissions.sh deleted file mode 100644 index 0094456ec..000000000 --- a/lgsm/functions/check_permissions.sh +++ /dev/null @@ -1,233 +0,0 @@ -#!/bin/bash -# LinuxGSM check_permissions.sh -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Checks ownership & permissions of scripts, files and directories. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -fn_check_ownership() { - if [ -f "${rootdir}/${selfname}" ]; then - if [ "$(find "${rootdir}/${selfname}" -not -user "$(whoami)" | wc -l)" -ne "0" ]; then - selfownissue=1 - fi - fi - if [ -d "${functionsdir}" ]; then - if [ "$(find "${functionsdir}" -not -user "$(whoami)" | wc -l)" -ne "0" ]; then - funcownissue=1 - fi - fi - if [ -d "${serverfiles}" ]; then - if [ "$(find "${serverfiles}" -not -user "$(whoami)" | wc -l)" -ne "0" ]; then - filesownissue=1 - fi - fi - if [ "${selfownissue}" == "1" ] || [ "${funcownissue}" == "1" ] || [ "${filesownissue}" == "1" ]; then - fn_print_fail_nl "Ownership issues found" - fn_script_log_fatal "Ownership issues found" - fn_print_information_nl "The current user ($(whoami)) does not have ownership of the following files:" - fn_script_log_info "The current user ($(whoami)) does not have ownership of the following files:" - { - echo -e "User\tGroup\tFile\n" - if [ "${selfownissue}" == "1" ]; then - find "${rootdir}/${selfname}" -not -user "$(whoami)" -printf "%u\t%g\t%p\n" - fi - if [ "${funcownissue}" == "1" ]; then - find "${functionsdir}" -not -user "$(whoami)" -printf "%u\t%g\t%p\n" - fi - if [ "${filesownissue}" == "1" ]; then - find "${serverfiles}" -not -user "$(whoami)" -printf "%u\t%g\t%p\n" - fi - - } | column -s $'\t' -t | tee -a "${lgsmlog}" - echo -e "" - fn_print_information_nl "please see https://docs.linuxgsm.com/support/faq#fail-starting-game-server-permission-issues-found" - fn_script_log "For more information, please see https://docs.linuxgsm.com/support/faq#fail-starting-game-server-permission-issues-found" - if [ "${monitorflag}" == 1 ]; then - alert="permissions" - alert.sh - fi - core_exit.sh - fi -} - -fn_check_permissions() { - if [ -d "${functionsdir}" ]; then - if [ "$(find "${functionsdir}" -type f -not -executable | wc -l)" -ne "0" ]; then - fn_print_fail_nl "Permissions issues found" - fn_script_log_fatal "Permissions issues found" - fn_print_information_nl "The following files are not executable:" - fn_script_log_info "The following files are not executable:" - { - echo -e "File\n" - find "${functionsdir}" -type f -not -executable -printf "%p\n" - } | column -s $'\t' -t | tee -a "${lgsmlog}" - if [ "${monitorflag}" == 1 ]; then - alert="permissions" - alert.sh - fi - core_exit.sh - fi - fi - - # Check rootdir permissions. - if [ "${rootdir}" ]; then - # Get permission numbers on directory under the form 775. - rootdirperm=$(stat -c %a "${rootdir}") - # Grab the first and second digit for user and group permission. - userrootdirperm="${rootdirperm:0:1}" - grouprootdirperm="${rootdirperm:1:1}" - if [ "${userrootdirperm}" != "7" ] && [ "${grouprootdirperm}" != "7" ]; then - fn_print_fail_nl "Permissions issues found" - fn_script_log_fatal "Permissions issues found" - fn_print_information_nl "The following directory does not have the correct permissions:" - fn_script_log_info "The following directory does not have the correct permissions:" - fn_script_log_info "${rootdir}" - ls -l "${rootdir}" - if [ "${monitorflag}" == 1 ]; then - alert="permissions" - alert.sh - fi - core_exit.sh - fi - fi - # Check if executable is executable and attempt to fix it. - # First get executable name. - execname=$(basename "${executable}") - if [ -f "${executabledir}/${execname}" ]; then - # Get permission numbers on file under the form 775. - execperm=$(stat -c %a "${executabledir}/${execname}") - # Grab the first and second digit for user and group permission. - userexecperm="${execperm:0:1}" - groupexecperm="${execperm:1:1}" - # Check for invalid user permission. - if [ "${userexecperm}" == "0" ] || [ "${userexecperm}" == "2" ] || [ "${userexecperm}" == "4" ] || [ "${userexecperm}" == "6" ]; then - # If user permission is invalid, then check for invalid group permissions. - if [ "${groupexecperm}" == "0" ] || [ "${groupexecperm}" == "2" ] || [ "${groupexecperm}" == "4" ] || [ "${groupexecperm}" == "6" ]; then - # If permission issues are found. - fn_print_warn_nl "Permissions issue found" - fn_script_log_warn "Permissions issue found" - fn_print_information_nl "The following file is not executable:" - ls -l "${executabledir}/${execname}" - fn_script_log_info "The following file is not executable:" - fn_script_log_info "${executabledir}/${execname}" - fn_print_information_nl "Applying chmod u+x,g+x ${executabledir}/${execname}" - fn_script_log_info "Applying chmod u+x,g+x ${execperm}" - # Make the executable executable. - chmod u+x,g+x "${executabledir}/${execname}" - # Second check to see if it's been successfully applied. - # Get permission numbers on file under the form 775. - execperm=$(stat -c %a "${executabledir}/${execname}") - # Grab the first and second digit for user and group permission. - userexecperm="${execperm:0:1}" - groupexecperm="${execperm:1:1}" - if [ "${userexecperm}" == "0" ] || [ "${userexecperm}" == "2" ] || [ "${userexecperm}" == "4" ] || [ "${userexecperm}" == "6" ]; then - if [ "${groupexecperm}" == "0" ] || [ "${groupexecperm}" == "2" ] || [ "${groupexecperm}" == "4" ] || [ "${groupexecperm}" == "6" ]; then - # If errors are still found. - fn_print_fail_nl "The following file could not be set executable:" - ls -l "${executabledir}/${execname}" - fn_script_log_warn "The following file could not be set executable:" - fn_script_log_info "${executabledir}/${execname}" - if [ "${monitorflag}" == "1" ]; then - alert="permissions" - alert.sh - fi - core_exit.sh - fi - fi - fi - fi - fi -} - -## The following fn_sys_perm_* functions checks for permission errors in /sys directory. - -# Checks for permission errors in /sys directory. -fn_sys_perm_errors_detect() { - # Reset test variables. - sysdirpermerror="0" - classdirpermerror="0" - netdirpermerror="0" - # Check permissions. - # /sys, /sys/class and /sys/class/net should be readable & executable. - if [ ! -r "/sys" ] || [ ! -x "/sys" ]; then - sysdirpermerror="1" - fi - if [ ! -r "/sys/class" ] || [ ! -x "/sys/class" ]; then - classdirpermerror="1" - fi - if [ ! -r "/sys/class/net" ] || [ ! -x "/sys/class/net" ]; then - netdirpermerror="1" - fi -} - -# Display a message on how to fix the issue manually. -fn_sys_perm_fix_manually_msg() { - echo -e "" - fn_print_information_nl "This error causes servers to fail starting properly" - fn_script_log_info "This error causes servers to fail starting properly." - echo -e " * To fix this issue, run the following command as root:" - fn_script_log_info "To fix this issue, run the following command as root:" - echo -e " chmod a+rx /sys /sys/class /sys/class/net" - fn_script_log "chmod a+rx /sys /sys/class /sys/class/net" - fn_sleep_time - if [ "${monitorflag}" == 1 ]; then - alert="permissions" - alert.sh - fi - core_exit.sh -} - -# Attempt to fix /sys related permission errors if sudo is available, exits otherwise. -fn_sys_perm_errors_fix() { - if sudo -n true > /dev/null 2>&1; then - fn_print_dots "Automatically fixing /sys permissions" - fn_script_log_info "Automatically fixing /sys permissions." - if [ "${sysdirpermerror}" == "1" ]; then - sudo chmod a+rx "/sys" - fi - if [ "${classdirpermerror}" == "1" ]; then - sudo chmod a+rx "/sys/class" - fi - if [ "${netdirpermerror}" == "1" ]; then - sudo chmod a+rx "/sys/class/net" - fi - # Run check again to see if it's fixed. - fn_sys_perm_errors_detect - if [ "${sysdirpermerror}" == "1" ] || [ "${classdirpermerror}" == "1" ] || [ "${netdirpermerror}" == "1" ]; then - fn_print_error "Could not fix /sys permissions" - fn_script_log_error "Could not fix /sys permissions." - fn_sleep_time - # Show the user how to fix. - fn_sys_perm_fix_manually_msg - else - fn_print_ok_nl "Automatically fixing /sys permissions" - fn_script_log_pass "Permissions in /sys fixed" - fi - else - # Show the user how to fix. - fn_sys_perm_fix_manually_msg - fi -} - -# Processes to the /sys related permission errors check & fix/info. -fn_sys_perm_error_process() { - fn_sys_perm_errors_detect - # If any error was found. - if [ "${sysdirpermerror}" == "1" ] || [ "${classdirpermerror}" == "1" ] || [ "${netdirpermerror}" == "1" ]; then - fn_print_error_nl "Permission error(s) found in /sys" - fn_script_log_error "Permission error(s) found in /sys" - # Run the fix - fn_sys_perm_errors_fix - fi -} - -## Run permisions checks when not root or docker. -if [ "$(whoami)" != "root" ] && [ ! -f /.dockerenv ]; then - fn_check_ownership - fn_check_permissions - if [ "${commandname}" == "START" ]; then - fn_sys_perm_error_process - fi -fi diff --git a/lgsm/functions/check_root.sh b/lgsm/functions/check_root.sh deleted file mode 100644 index dab033148..000000000 --- a/lgsm/functions/check_root.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -# LinuxGSM check_root.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Checks if the user tried to run the script as root. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -if [ "$(whoami)" == "root" ] && [ ! -f /.dockerenv ]; then - if [ "${commandname}" != "INSTALL" ]; then - fn_print_fail_nl "Do NOT run this script as root!" - if [ -d "${lgsmlogdir}" ]; then - fn_script_log_fatal "${selfname} attempted to run as root." - else - # Forces exit code is log does not yet exist. - exitcode=1 - fi - core_exit.sh - fi -fi diff --git a/lgsm/functions/check_status.sh b/lgsm/functions/check_status.sh deleted file mode 100644 index 429f7c72d..000000000 --- a/lgsm/functions/check_status.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -# LinuxGSM check_status.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Checks the process status of the server. Either online or offline. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -status=$(tmux -L "${sessionname}" list-sessions -F "#{session_name}" 2> /dev/null | grep -Ecx "^${sessionname}") diff --git a/lgsm/functions/check_steamcmd.sh b/lgsm/functions/check_steamcmd.sh deleted file mode 100644 index d41e8669f..000000000 --- a/lgsm/functions/check_steamcmd.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -# LinuxGSM check_steamcmd.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Checks if SteamCMD is installed correctly. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -# init steamcmd functions -core_steamcmd.sh - -fn_check_steamcmd_clear -fn_check_steamcmd -if [ "${shortname}" == "ark" ]; then - fn_check_steamcmd_ark -fi -fn_check_steamcmd_dir -fn_check_steamcmd_dir_legacy -fn_check_steamcmd_steamapp -fn_check_steamcmd_user -fn_check_steamcmd_exec diff --git a/lgsm/functions/check_system_dir.sh b/lgsm/functions/check_system_dir.sh deleted file mode 100644 index 0a732d6d1..000000000 --- a/lgsm/functions/check_system_dir.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -# LinuxGSM check_system_dir.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Checks if systemdir/serverfiles is accessible. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -if [ "${commandname}" != "VALIDATE" ]; then - checkdir="${serverfiles}" -else - checkdir="${systemdir}" -fi - -if [ ! -d "${checkdir}" ]; then - fn_print_fail_nl "Cannot access ${checkdir}: No such directory" - if [ -d "${lgsmlogdir}" ]; then - fn_script_log_fatal "Cannot access ${checkdir}: No such directory." - fi - core_exit.sh -fi diff --git a/lgsm/functions/check_system_requirements.sh b/lgsm/functions/check_system_requirements.sh deleted file mode 100644 index bfe597135..000000000 --- a/lgsm/functions/check_system_requirements.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash -# LinuxGSM check_system_requirements.sh -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Checks RAM requirements. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -info_distro.sh - -# RAM requirements in megabytes for each game or engine. - -if [ "${shortname}" == "ark" ]; then - ramrequirementmb="4000" - ramrequirementgb="4" -elif [ "${shortname}" == "bt" ]; then - ramrequirementmb="1000" - ramrequirementgb="1" -elif [ "${shortname}" == "mh" ]; then - ramrequirementmb="4000" - ramrequirementgb="4" -elif [ "${shortname}" == "arma3" ]; then - ramrequirementmb="1000" - ramrequirementgb="1" -elif [ "${shortname}" == "rust" ]; then - ramrequirementmb="4000" - ramrequirementgb="4" -elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ] || [ "${shortname}" == "wmc" ]; then - ramrequirementmb="1000" - ramrequirementgb="1" -elif [ "${shortname}" == "pstbs" ]; then - ramrequirementmb="2000" - ramrequirementgb="2" -elif [ "${shortname}" == "ns2" ] || [ "${shortname}" == "ns2c" ]; then - ramrequirementmb="1000" - ramrequirementgb="1" -elif [ "${shortname}" == "st" ]; then - ramrequirementmb="1000" - ramrequirementgb="1" -elif [ "${shortname}" == "pvr" ]; then - ramrequirementmb="2000" - ramrequirementgb="2" -fi - -# If the game or engine has a minimum RAM Requirement, compare it to system's available RAM. -if [ "${ramrequirementmb}" ]; then - if [ "${physmemtotalmb}" -lt "${ramrequirementmb}" ]; then - fn_print_dots "Check RAM" - # Warn the user. - fn_print_warn_nl "Check RAM: ${ramrequirementgb}G required, ${physmemtotal} available" - echo "* ${gamename} server may fail to run or experience poor performance." - fn_sleep_time - fi -fi diff --git a/lgsm/functions/check_tmuxception.sh b/lgsm/functions/check_tmuxception.sh deleted file mode 100644 index 64705a3a8..000000000 --- a/lgsm/functions/check_tmuxception.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -# LinuxGSM check_config.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Checks if run from tmux or screen. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -fn_check_is_in_tmux() { - if [ "${TMUX}" ]; then - fn_print_fail_nl "tmuxception error: Sorry Cobb you cannot start a tmux session inside of a tmux session." - fn_script_log_fatal "Tmuxception error: Attempted to start a tmux session inside of a tmux session." - fn_print_information_nl "LinuxGSM creates a tmux session when starting the server." - echo -e "It is not possible to run a tmux session inside another tmux session" - echo -e "https://docs.linuxgsm.com/requirements/tmux#tmuxception" - core_exit.sh - fi -} - -fn_check_is_in_screen() { - if [ "${STY}" ]; then - fn_print_fail_nl "tmuxception error: Sorry Cobb you cannot start a tmux session inside of a screen session." - fn_script_log_fatal "Tmuxception error: Attempted to start a tmux session inside of a screen session." - fn_print_information_nl "LinuxGSM creates a tmux session when starting the server." - echo -e "It is not possible to run a tmux session inside screen session" - echo -e "https://docs.linuxgsm.com/requirements/tmux#tmuxception" - core_exit.sh - fi -} - -fn_check_is_in_tmux -fn_check_is_in_screen diff --git a/lgsm/functions/check_version.sh b/lgsm/functions/check_version.sh deleted file mode 100644 index 657e32b54..000000000 --- a/lgsm/functions/check_version.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -# LinuxGSM command_version.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Will run update-lgsm if gameserver.sh and modules version does not match -# this will allow gameserver.sh to update - useful for multi instance servers. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -if [ -n "${modulesversion}" ] && [ -n "${version}" ] && [ "${version}" != "${modulesversion}" ]; then - exitbypass=1 - echo -e "" - fn_print_error_nl "LinuxGSM version mismatch" - echo -e "" - echo -e "* ${selfname}: ${version}" - echo -e "* modules: ${modulesversion}" - echo -e "" - fn_sleep_time - fn_script_log_error "LinuxGSM Version mismatch: ${selfname}: ${version}: modules: ${modulesversion}" - command_update_linuxgsm.sh - fn_firstcommand_reset -fi diff --git a/lgsm/functions/command_backup.sh b/lgsm/functions/command_backup.sh deleted file mode 100644 index d69c57a0f..000000000 --- a/lgsm/functions/command_backup.sh +++ /dev/null @@ -1,268 +0,0 @@ -#!/bin/bash -# LinuxGSM command_backup.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Creates a .tar.gz file in the backup directory. - -commandname="BACKUP" -commandaction="Backing up" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_firstcommand_set - -check.sh - -# Trap to remove lockfile on quit. -fn_backup_trap() { - echo -e "" - echo -en "backup ${backupname}.tar.gz..." - 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_print_removed_eol_nl - fn_script_log_info "Backup ${backupname}.tar.gz: REMOVED" - # Remove lock file. - rm -f "${lockdir:?}/backup.lock" - fn_backup_start_server - unset exitbypass - core_exit.sh -} - -# Check if a backup is pending or has been aborted using backup.lock. -fn_backup_check_lockfile() { - if [ -f "${lockdir}/backup.lock" ]; then - fn_print_info_nl "Lock file found: Backup is currently running" - fn_script_log_error "Lock file found: Backup is currently running: ${lockdir}/backup.lock" - core_exit.sh - fi -} - -# Initialisation. -fn_backup_init() { - # Backup file name with selfname and current date. - backupname="${selfname}-$(date '+%Y-%m-%d-%H%M%S')" - - info_distro.sh - fn_print_dots "Backup starting" - fn_script_log_info "Backup starting" - fn_print_ok_nl "Backup starting" - if [ ! -d "${backupdir}" ] || [ "${backupcount}" == "0" ]; then - fn_print_info_nl "There are no previous backups" - else - if [ "${lastbackupdaysago}" == "0" ]; then - daysago="less than 1 day ago" - elif [ "${lastbackupdaysago}" == "1" ]; then - daysago="1 day ago" - else - daysago="${lastbackupdaysago} days ago" - fi - echo -e "* Previous backup was created ${daysago}, total size ${lastbackupsize}" - fi -} - -# Check if server is started and whether to stop it. -fn_backup_stop_server() { - check_status.sh - # Server is running but will not be stopped. - if [ "${stoponbackup}" == "off" ]; then - fn_print_warn_nl "${selfname} is currently running" - echo -e "* Although unlikely; creating a backup while ${selfname} is running might corrupt the backup." - fn_script_log_warn "${selfname} is currently running" - fn_script_log_warn "Although unlikely; creating a backup while ${selfname} is running might corrupt the backup" - # Server is running and will be stopped if stoponbackup=on or unset. - # If server is started - elif [ "${status}" != "0" ]; then - fn_print_restart_warning - startserver="1" - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - fi -} - -# Create required folders. -fn_backup_dir() { - # Create backupdir if it doesn't exist. - if [ ! -d "${backupdir}" ]; then - mkdir -p "${backupdir}" - fi -} - -# Migrate Backups from old dir before refactor -fn_backup_migrate_olddir() { - # Check if old backup dir is there before the refactor and move the backups - if [ -d "${rootdir}/backups" ]; then - if [ "${rootdir}/backups" != "${backupdir}" ]; then - fn_print_dots "Backup directory is being migrated" - fn_script_log_info "Backup directory is being migrated" - fn_script_log_info "${rootdir}/backups > ${backupdir}" - mv "${rootdir}/backups/"* "${backupdir}" 2> /dev/null - exitcode=$? - if [ "${exitcode}" == 0 ]; then - rmdir "${rootdir}/backups" 2> /dev/null - exitcode=$? - fi - if [ "${exitcode}" != 0 ]; then - fn_print_error_nl "Backup directory is being migrated" - fn_script_log_error "Backup directory is being migrated" - else - - fn_print_ok_nl "Backup directory is being migrated" - fn_script_log_pass "Backup directory is being migrated" - fi - fi - fi -} - -fn_backup_create_lockfile() { - # Create lockfile. - date '+%s' > "${lockdir}/backup.lock" - fn_script_log_info "Lockfile generated" - fn_script_log_info "${lockdir}/backup.lock" - # trap to remove lockfile on quit. - trap fn_backup_trap INT -} - -# 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" - 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_fatal "Problem identifying the previous backup directory for exclusion" - core_exit.sh - fi - - tar -czf "${backupdir}/${backupname}.tar.gz" -C "${rootdir}" --exclude "${excludedir}" --exclude "${lockdir}/backup.lock" ./. - local exitcode=$? - if [ "${exitcode}" != 0 ]; then - fn_print_fail_eol - fn_script_log_fatal "Backup in progress: FAIL" - echo -e "${extractcmd}" | tee -a "${lgsmlog}" - fn_print_fail_nl "Starting backup" - fn_script_log_fatal "Starting backup" - else - fn_print_ok_eol - fn_print_ok_nl "Completed: ${backupname}.tar.gz, 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}')" - fi - # Remove lock file - rm -f "${lockdir:?}/backup.lock" -} - -# Clear old backups according to maxbackups and maxbackupdays variables. -fn_backup_prune() { - # Clear if backup variables are set. - if [ "${maxbackups}" ] && [ -n "${maxbackupdays}" ]; then - # How many backups there are. - info_distro.sh - # 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) - # If anything can be cleared. - if [ "${backupquotadiff}" -gt "0" ] || [ "${backupsoudatedcount}" -gt "0" ]; then - fn_print_dots "Pruning" - fn_script_log_info "Backup pruning activated" - fn_print_ok_nl "Pruning" - # If maxbackups greater or equal to backupsoutdatedcount, then it is over maxbackupdays. - if [ "${backupquotadiff}" -ge "${backupsoudatedcount}" ]; then - # Display how many backups will be cleared. - echo -e "* Pruning: ${backupquotadiff} backup(s) has exceeded the ${maxbackups} backups limit" - fn_script_log_info "Pruning: ${backupquotadiff} backup(s) has exceeded the ${maxbackups} backups limit" - fn_sleep_time - 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 - fn_print_ok_nl "Pruning: Clearing ${backupquotadiff} backup(s)" - fn_script_log_pass "Pruning: Cleared ${backupquotadiff} backup(s)" - # If maxbackupdays is used over maxbackups. - elif [ "${backupquotadiff}" -lt "${backupsoudatedcount}" ]; then - # Display how many backups will be cleared. - echo -e "* Pruning: ${backupsoudatedcount} backup(s) are older than ${maxbackupdays} days." - fn_script_log_info "Pruning: ${backupsoudatedcount} backup(s) older than ${maxbackupdays} days." - fn_sleep_time - 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 -mtime +"${maxbackupdays}" -exec rm -f {} \; - fn_print_ok_nl "Pruning: Clearing ${backupquotadiff} backup(s)" - fn_script_log_pass "Pruning: Cleared ${backupquotadiff} backup(s)" - fi - fi - fi -} - -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")) - if [ ${#rdirtoks[@]} -eq 0 ]; then - fn_print_fail_nl "Problem assessing rootdir during relative path assessment" - fn_script_log_fatal "Problem assessing rootdir during relative path assessment: ${rootdir}" - core_exit.sh - fi - - # Populate an array of tokens initialized from the backupdir components. - declare -a bdirtoks=($(readlink -f "${backupdir}" | sed "s/\// /g")) - if [ ${#bdirtoks[@]} -eq 0 ]; then - fn_print_fail_nl "Problem assessing backupdir during relative path assessment" - fn_script_log_fatal "Problem assessing backupdir during relative path assessment: ${rootdir}" - core_exit.sh - fi - - # Compare the leading entries of each array. These common elements will be clipped off. - # for the relative path output. - for ((base = 0; base < ${#rdirtoks[@]}; base++)); do - [[ "${rdirtoks[$base]}" != "${bdirtoks[$base]}" ]] && break - done - - # Next, climb out of the remaining rootdir location with updir references. - for ((x = base; x < ${#rdirtoks[@]}; x++)); do - echo -n "../" - done - - # Climb down the remaining components of the backupdir location. - for ((x = base; x < $((${#bdirtoks[@]} - 1)); x++)); do - echo -n "${bdirtoks[$x]}/" - done - - # In the event there were no directories left in the backupdir above to - # traverse down, just add a newline. Otherwise at this point, there is - # one remaining directory component in the backupdir to navigate. - if (("$base" < "${#bdirtoks[@]}")); then - echo -e "${bdirtoks[$((${#bdirtoks[@]} - 1))]}" - else - echo - fi -} - -# Start the server if it was stopped for the backup. -fn_backup_start_server() { - if [ -n "${startserver}" ]; then - exitbypass=1 - command_start.sh - fn_firstcommand_reset - fi -} - -# Run functions. -fn_backup_check_lockfile -fn_backup_init -fn_backup_stop_server -fn_backup_dir -fn_backup_migrate_olddir -fn_backup_create_lockfile -fn_backup_compression -fn_backup_prune -fn_backup_start_server - -core_exit.sh diff --git a/lgsm/functions/command_check_update.sh b/lgsm/functions/command_check_update.sh deleted file mode 100644 index b2647e2a1..000000000 --- a/lgsm/functions/command_check_update.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash -# LinuxGSM command_check_update.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Handles updating of servers. - -commandname="CHECK-UPDATE" -commandaction="Check for Update" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_firstcommand_set - -fn_print_dots "" -check.sh -core_logs.sh - -if [ "${shortname}" == "ts3" ]; then - update_ts3.sh -elif [ "${shortname}" == "mc" ]; then - update_minecraft.sh -elif [ "${shortname}" == "mcb" ]; then - update_minecraft_bedrock.sh -elif [ "${shortname}" == "pmc" ] || [ "${shortname}" == "vpmc" ] || [ "${shortname}" == "wmc" ]; then - update_papermc.sh -elif [ "${shortname}" == "fctr" ]; then - update_factorio.sh -elif [ "${shortname}" == "mta" ]; then - update_mta.sh -elif [ "${shortname}" == "jk2" ]; then - update_jediknight2.sh -elif [ "${shortname}" == "vints" ]; then - update_vintagestory.sh -elif [ "${shortname}" == "ut99" ]; then - update_ut99.sh -else - update_steamcmd.sh -fi - -core_exit.sh diff --git a/lgsm/functions/command_console.sh b/lgsm/functions/command_console.sh deleted file mode 100644 index 4f09776b8..000000000 --- a/lgsm/functions/command_console.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash -# LinuxGSM command_console.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Gives access to the server tmux console. - -commandname="CONSOLE" -commandaction="Access console" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_firstcommand_set - -check.sh -fn_print_header - -if [ "${consoleverbose}" == "yes" ]; then - echo -e "* Verbose output: ${lightgreen}yes${default}" -elif [ "${consoleverbose}" == "no" ]; then - echo -e "* Verbose output: ${red}no${default}" -else - echo -e "* Verbose output: ${red}unknown${default}" -fi - -if [ "${consoleinteract}" == "yes" ]; then - echo -e "* Interactive output: ${lightgreen}yes${default}" -elif [ "${consoleinteract}" == "no" ]; then - echo -e "* Interactive output: ${red}no${default}" -else - echo -e "* Interactive output: ${red}unknown${default}" -fi -echo "" -fn_print_information_nl "Press \"CTRL+b\" then \"d\" to exit console." -fn_print_warning_nl "Do NOT press CTRL+c to exit." -echo -e "* https://docs.linuxgsm.com/commands/console" -echo -e "" -if ! fn_prompt_yn "Continue?" Y; then - exitcode=0 - core_exit.sh -fi -fn_print_dots "Accessing console" -check_status.sh -if [ "${status}" != "0" ]; then - fn_print_ok_nl "Accessing console" - fn_script_log_pass "Console accessed" - tmux -L "${sessionname}" attach-session -t "${sessionname}" - fn_print_ok_nl "Closing console" - fn_script_log_pass "Console closed" -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 - fn_firstcommand_reset - fi -fi - -core_exit.sh diff --git a/lgsm/functions/command_debug.sh b/lgsm/functions/command_debug.sh deleted file mode 100644 index c6422be65..000000000 --- a/lgsm/functions/command_debug.sh +++ /dev/null @@ -1,142 +0,0 @@ -#!/bin/bash -# LinuxGSM command_debug.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Runs the server without tmux and directly from the terminal. - -commandname="DEBUG" -commandaction="Debuging" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_firstcommand_set - -# Trap to remove lockfile on quit. -fn_lockfile_trap() { - # Remove lockfile. - rm -f "${lockdir:?}/${selfname}.lock" - # resets terminal. Servers can sometimes mess up the terminal on exit. - reset - fn_print_dots "Stopping debug" - fn_print_ok_nl "Stopping debug" - fn_script_log_pass "Stopping debug" - # remove trap. - trap - INT - core_exit.sh -} - -check.sh -fix.sh -info_distro.sh -info_game.sh -fn_print_header -{ - echo -e "${lightblue}Distro:\t\t${default}${distroname}" - echo -e "${lightblue}Architecture:\t\t${default}${arch}" - echo -e "${lightblue}Kernel:\t\t${default}${kernel}" - echo -e "${lightblue}Hostname:\t\t${default}${HOSTNAME}" - echo -e "${lightblue}tmux:\t\t${default}${tmuxv}" - echo -e "${lightblue}Avg Load:\t\t${default}${load}" - echo -e "${lightblue}Free Memory:\t\t${default}${physmemfree}" - echo -e "${lightblue}Free Disk:\t\t${default}${availspace}" -} | column -s $'\t' -t - -# glibc required. -if [ -n "${glibc}" ]; then - if [ "${glibc}" == "null" ]; then - # Glibc is not required. - : - 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 - 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}" - fi -fi - -# Server IP. -echo -e "${lightblue}Game Server IP:\t${default}${ip}:${port}" - -# External server IP. -if [ "${extip}" ]; then - if [ "${ip}" != "${extip}" ]; then - echo -e "${lightblue}Internet IP:\t${default}${extip}:${port}" - fi -fi - -# Server password. -if [ "${serverpassword}" ]; then - echo -e "${lightblue}Server password:\t${default}${serverpassword}" -fi - -fn_reload_startparameters -echo -e "${lightblue}Start parameters:${default}" -if [ "${engine}" == "source" ] || [ "${engine}" == "goldsrc" ]; then - echo -e "${executable} ${startparameters} -debug" -elif [ "${engine}" == "quake" ]; then - echo -e "${executable} ${startparameters} -condebug" -else - echo -e "${preexecutable} ${executable} ${startparameters}" -fi -echo -e "" -echo -e "Use debug for identifying server issues only!" -echo -e "Press CTRL+c to drop out of debug mode." -fn_print_warning_nl "If ${selfname} is already running it will be stopped." -echo -e "" -if ! fn_prompt_yn "Continue?" Y; then - exitcode=0 - core_exit.sh -fi - -fn_print_info_nl "Stopping any running servers" -fn_script_log_info "Stopping any running servers" -exitbypass=1 -command_stop.sh -fn_firstcommand_reset -unset exitbypass -fn_print_dots "Starting debug" -fn_script_log_info "Starting debug" -fn_print_ok_nl "Starting debug" - -# Create lockfile. -date '+%s' > "${lockdir}/${selfname}.lock" -echo "${version}" >> "${lockdir}/${selfname}.lock" -echo "${port}" >> "${lockdir}/${selfname}.lock" -fn_script_log_info "Lockfile generated" -fn_script_log_info "${lockdir}/${selfname}.lock" - -if [ "${shortname}" == "av" ]; then - cd "${systemdir}" || exit -else - cd "${executabledir}" || exit -fi - -# Note: do not add double quotes to ${executable} ${startparameters}. -if [ "${engine}" == "source" ] || [ "${engine}" == "goldsrc" ]; then - eval "${executable} ${startparameters} -debug" -elif [ "${engine}" == "quake" ]; then - eval "${executable} ${startparameters} -condebug" -else - # shellcheck disable=SC2086 - eval "${preexecutable} ${executable} ${startparameters}" -fi - -if [ $? -ne 0 ]; then - fn_print_error_nl "Server has stopped: exit code: $?" - fn_script_log_error "Server has stopped: exit code: $?" - fn_print_error_nl "Press ENTER to exit debug mode" - read -r -else - fn_print_ok_nl "Server has stopped" - fn_script_log_pass "Server has stopped" - fn_print_ok_nl "Press ENTER to exit debug mode" - read -r -fi - -fn_lockfile_trap - -fn_print_dots "Stopping debug" -fn_print_ok_nl "Stopping debug" -fn_script_log_info "Stopping debug" - -core_exit.sh diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh deleted file mode 100644 index 08d9f031b..000000000 --- a/lgsm/functions/command_details.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash -# LinuxGSM command_details.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Displays server information. - -commandname="DETAILS" -commandaction="Viewing details" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_firstcommand_set - -# Run checks and gathers details to display. -check.sh -info_distro.sh -info_game.sh -info_messages.sh -if [ "${querymode}" == "2" ] || [ "${querymode}" == "3" ]; then - for queryip in "${queryips[@]}"; do - query_gamedig.sh - if [ "${querystatus}" == "0" ]; then - break - fi - done -fi -fn_info_message_distro -fn_info_message_server_resource -fn_info_message_gameserver_resource -fn_info_message_gameserver -fn_info_message_script -fn_info_message_backup -# Some game servers do not have parms. -if [ "${shortname}" != "jc2" ] && [ "${shortname}" != "dst" ] && [ "${shortname}" != "pz" ] && [ "${engine}" != "renderware" ]; then - fn_info_message_commandlineparms -fi -fn_info_message_ports_edit -fn_info_message_ports -fn_info_message_select_engine -fn_info_message_statusbottom - -core_exit.sh diff --git a/lgsm/functions/command_dev_clear_functions.sh b/lgsm/functions/command_dev_clear_functions.sh deleted file mode 100644 index 87c77515d..000000000 --- a/lgsm/functions/command_dev_clear_functions.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -# LinuxGSM command_dev_clear_functions.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Deletes the contents of the functions dir. - -commandname="DEV-CLEAR-MODULES" -commandaction="Clearing modules" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_firstcommand_set - -echo -e "=================================" -echo -e "Clear Functions" -echo -e "=================================" -echo -e "" -if fn_prompt_yn "Do you want to delete all functions?" Y; then - rm -rfv "${functionsdir:?}/"* - rm -rfv "${configdirdefault:?}/"* - fn_script_log_info "Cleared modules directory" - fn_script_log_info "Cleared default config directory" -fi - -core_exit.sh diff --git a/lgsm/functions/command_dev_debug.sh b/lgsm/functions/command_dev_debug.sh deleted file mode 100644 index 19f16d58e..000000000 --- a/lgsm/functions/command_dev_debug.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -# LinuxGSM command_dev_debug.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Dev only: Enables debugging log to be saved to dev-debug.log. - -commandname="DEV-DEBUG" -commandaction="Developer debug" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_firstcommand_reset - -if [ -f "${rootdir}/.dev-debug" ]; then - rm -f "${rootdir:?}/.dev-debug" - fn_print_ok_nl "Disabled dev-debug" - fn_script_log_info "Disabled dev-debug" -else - date '+%s' > "${rootdir}/.dev-debug" - fn_print_ok_nl "Enabled dev-debug" - fn_script_log_info "Enabled dev-debug" -fi - -core_exit.sh diff --git a/lgsm/functions/command_dev_detect_deps.sh b/lgsm/functions/command_dev_detect_deps.sh deleted file mode 100644 index d16b74418..000000000 --- a/lgsm/functions/command_dev_detect_deps.sh +++ /dev/null @@ -1,231 +0,0 @@ -#!/bin/bash -# LinuxGSM command_dev_detect_deps.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Detects dependencies the server binary requires. - -commandname="DEV-DETECT-DEPS" -commandaction="Developer detect deps" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_firstcommand_set - -echo -e "=================================" -echo -e "Dependencies Checker" -echo -e "=================================" -echo -e "Checking directory: " -echo -e "${serverfiles}" -if [ "$(command -v eu-readelf 2> /dev/null)" ]; then - readelf=eu-readelf -elif [ "$(command -v readelf 2> /dev/null)" ]; then - readelf=readelf -else - echo -e "readelf/eu-readelf not installed" -fi -files=$(find "${serverfiles}" | wc -l) -find "${serverfiles}" -type f -print0 \ - | while IFS= read -r -d $'\0' line; do - if [ "${readelf}" == "eu-readelf" ]; then - ${readelf} -d "${line}" 2> /dev/null | grep NEEDED | awk '{ print $4 }' | sed 's/\[//g;s/\]//g' >> "${tmpdir}/.depdetect_readelf" - else - ${readelf} -d "${line}" 2> /dev/null | grep NEEDED | awk '{ print $5 }' | sed 's/\[//g;s/\]//g' >> "${tmpdir}/.depdetect_readelf" - fi - echo -n "${i} / ${files}" $'\r' - ((i++)) - done - -sort "${tmpdir}/.depdetect_readelf" | uniq > "${tmpdir}/.depdetect_readelf_uniq" - -touch "${tmpdir}/.depdetect_centos_list" -touch "${tmpdir}/.depdetect_ubuntu_list" -touch "${tmpdir}/.depdetect_debian_list" - -while read -r lib; do - echo -e "${lib}" - libs_array=(libm.so.6 libc.so.6 libtcmalloc_minimal.so.4 libpthread.so.0 libdl.so.2 libnsl.so.1 libgcc_s.so.1 librt.so.1 ld-linux.so.2 libdbus-glib-1.so.2 libgio-2.0.so.0 libglib-2.0.so.0 libGL.so.1 libgobject-2.0.so.0 libnm-glib.so.4 libnm-util.so.2) - for lib_file in "${libs_array[@]}"; do - if [ "${lib}" == "${lib_file}" ]; then - echo -e "glibc.i686" >> "${tmpdir}/.depdetect_centos_list" - echo -e "lib32gcc1" >> "${tmpdir}/.depdetect_ubuntu_list" - echo -e "lib32gcc1" >> "${tmpdir}/.depdetect_debian_list" - libdetected=1 - fi - done - - libs_array=(libawt.so libjava.so libjli.so libjvm.so libnet.so libnio.so libverify.so) - for lib_file in "${libs_array[@]}"; do - if [ "${lib}" == "${lib_file}" ]; then - echo -e "java-1.8.0-openjdk" >> "${tmpdir}/.depdetect_centos_list" - echo -e "default-jre" >> "${tmpdir}/.depdetect_ubuntu_list" - echo -e "default-jre" >> "${tmpdir}/.depdetect_debian_list" - libdetected=1 - fi - done - - libs_array=(libtier0.so libtier0_srv.so libvstdlib_srv.so Core.so libvstdlib.so libtier0_s.so Editor.so Engine.so liblua.so libsteam_api.so ld-linux-x86-64.so.2 libPhysX3_x86.so libPhysX3Common_x86.so libPhysX3Cooking_x86.so) - for lib_file in "${libs_array[@]}"; do - # Known shared libs what dont requires dependencies. - if [ "${lib}" == "${lib_file}" ]; then - libdetected=1 - fi - done - - if [ "${lib}" == "libstdc++.so.6" ]; then - echo -e "libstdc++.i686" >> "${tmpdir}/.depdetect_centos_list" - echo -e "libstdc++6:i386" >> "${tmpdir}/.depdetect_ubuntu_list" - echo -e "libstdc++6:i386" >> "${tmpdir}/.depdetect_debian_list" - libdetected=1 - elif [ "${lib}" == "libstdc++.so.5" ]; then - echo -e "compat-libstdc++-33.i686" >> "${tmpdir}/.depdetect_centos_list" - echo -e "libstdc++5:i386" >> "${tmpdir}/.depdetect_ubuntu_list" - echo -e "libstdc++5:i386" >> "${tmpdir}/.depdetect_debian_list" - libdetected=1 - elif [ "${lib}" == "libcurl-gnutls.so.4" ]; then - echo -e "libcurl.i686" >> "${tmpdir}/.depdetect_centos_list" - echo -e "libcurl4-gnutls-dev:i386" >> "${tmpdir}/.depdetect_ubuntu_list" - echo -e "libcurl4-gnutls-dev:i386" >> "${tmpdir}/.depdetect_debian_list" - libdetected=1 - elif [ "${lib}" == "libspeex.so.1" ] || [ "${lib}" == "libspeexdsp.so.1" ]; then - echo -e "speex.i686" >> "${tmpdir}/.depdetect_centos_list" - echo -e "speex:i386" >> "${tmpdir}/.depdetect_ubuntu_list" - echo -e "speex:i386" >> "${tmpdir}/.depdetect_debian_list" - libdetected=1 - elif [ "${lib}" == "./libSDL-1.2.so.0" ] || [ "${lib}" == "libSDL-1.2.so.0" ]; then - echo -e "SDL.i686" >> "${tmpdir}/.depdetect_centos_list" - echo -e "libsdl1.2debian" >> "${tmpdir}/.depdetect_ubuntu_list" - echo -e "libsdl1.2debian" >> "${tmpdir}/.depdetect_debian_list" - libdetected=1 - elif [ "${lib}" == "libtbb.so.2" ]; then - echo -e "tbb.i686" >> "${tmpdir}/.depdetect_centos_list" - echo -e "libtbb2" >> "${tmpdir}/.depdetect_ubuntu_list" - echo -e "libtbb2" >> "${tmpdir}/.depdetect_debian_list" - libdetected=1 - - elif [ "${lib}" == "libXrandr.so.2" ]; then - echo -e "libXrandr" >> "${tmpdir}/.depdetect_centos_list" - echo -e "libxrandr2" >> "${tmpdir}/.depdetect_ubuntu_list" - echo -e "libxrandr2" >> "${tmpdir}/.depdetect_debian_list" - libdetected=1 - elif [ "${lib}" == "libXext.so.6" ]; then - echo -e "libXext" >> "${tmpdir}/.depdetect_centos_list" - echo -e "libxext6" >> "${tmpdir}/.depdetect_ubuntu_list" - echo -e "libxext6" >> "${tmpdir}/.depdetect_debian_list" - libdetected=1 - elif [ "${lib}" == "libXtst.so.6" ]; then - echo -e "libXtst" >> "${tmpdir}/.depdetect_centos_list" - echo -e "libxtst6" >> "${tmpdir}/.depdetect_ubuntu_list" - echo -e "libxtst6" >> "${tmpdir}/.depdetect_debian_list" - libdetected=1 - elif [ "${lib}" == "libpulse.so.0" ]; then - echo -e "pulseaudio-libs" >> "${tmpdir}/.depdetect_centos_list" - echo -e "libpulse0" >> "${tmpdir}/.depdetect_ubuntu_list" - echo -e "libpulse0" >> "${tmpdir}/.depdetect_debian_list" - libdetected=1 - elif [ "${lib}" == "libopenal.so.1" ]; then - echo -e "" >> "${tmpdir}/.depdetect_centos_list" - echo -e "libopenal1" >> "${tmpdir}/.depdetect_ubuntu_list" - echo -e "libopenal1" >> "${tmpdir}/.depdetect_debian_list" - libdetected=1 - elif [ "${lib}" == "libgconf-2.so.4" ]; then - echo -e "GConf2" >> "${tmpdir}/.depdetect_centos_list" - echo -e "libgconf2-4" >> "${tmpdir}/.depdetect_ubuntu_list" - echo -e "libgconf2-4" >> "${tmpdir}/.depdetect_debian_list" - libdetected=1 - elif [ "${lib}" == "libz.so.1" ]; then - echo -e "zlib" >> "${tmpdir}/.depdetect_centos_list" - echo -e "zlib1g" >> "${tmpdir}/.depdetect_ubuntu_list" - echo -e "zlib1g" >> "${tmpdir}/.depdetect_debian_list" - libdetected=1 - elif [ "${lib}" == "libatk-1.0.so.0" ]; then - echo -e "atk" >> "${tmpdir}/.depdetect_centos_list" - echo -e "libatk1.0-0" >> "${tmpdir}/.depdetect_ubuntu_list" - echo -e "libatk1.0-0" >> "${tmpdir}/.depdetect_debian_list" - libdetected=1 - elif [ "${lib}" == "libcairo.so.2" ]; then - echo -e "cairo" >> "${tmpdir}/.depdetect_centos_list" - echo -e "libcairo2" >> "${tmpdir}/.depdetect_ubuntu_list" - echo -e "libcairo2" >> "${tmpdir}/.depdetect_debian_list" - libdetected=1 - elif [ "${lib}" == "libfontconfig.so.1" ]; then - echo -e "fontconfig" >> "${tmpdir}/.depdetect_centos_list" - echo -e "libfontconfig1" >> "${tmpdir}/.depdetect_ubuntu_list" - echo -e "libfontconfig1" >> "${tmpdir}/.depdetect_debian_list" - libdetected=1 - elif [ "${lib}" == "libfreetype.so.6" ]; then - echo -e "freetype" >> "${tmpdir}/.depdetect_centos_list" - echo -e "libfreetype6" >> "${tmpdir}/.depdetect_ubuntu_list" - echo -e "libfreetype6" >> "${tmpdir}/.depdetect_debian_list" - libdetected=1 - elif [ "${lib}" == "libc++.so.1" ]; then - echo -e "libcxx" >> "${tmpdir}/.depdetect_centos_list" - echo -e "libc++1" >> "${tmpdir}/.depdetect_ubuntu_list" - echo -e "libc++1" >> "${tmpdir}/.depdetect_debian_list" - libdetected=1 - fi - - if [ "${libdetected}" != "1" ]; then - unknownlib=1 - echo -e "${lib}" >> "${tmpdir}/.depdetect_unknown" - fi - unset libdetected -done < "${tmpdir}/.depdetect_readelf_uniq" - -sort "${tmpdir}/.depdetect_centos_list" | uniq >> "${tmpdir}/.depdetect_centos_list_uniq" -sort "${tmpdir}/.depdetect_ubuntu_list" | uniq >> "${tmpdir}/.depdetect_ubuntu_list_uniq" -sort "${tmpdir}/.depdetect_debian_list" | uniq >> "${tmpdir}/.depdetect_debian_list_uniq" -if [ "${unknownlib}" == "1" ]; then - sort "${tmpdir}/.depdetect_unknown" | uniq >> "${tmpdir}/.depdetect_unknown_uniq" -fi - -awk -vORS='' '{ print $1,$2 }' "${tmpdir}/.depdetect_centos_list_uniq" > "${tmpdir}/.depdetect_centos_line" -awk -vORS='' '{ print $1,$2 }' "${tmpdir}/.depdetect_ubuntu_list_uniq" > "${tmpdir}/.depdetect_ubuntu_line" -awk -vORS='' '{ print $1,$2 }' "${tmpdir}/.depdetect_debian_list_uniq" > "${tmpdir}/.depdetect_debian_line" -echo -e "" -echo -e "" -echo -e "Required Dependencies" -echo -e "=================================" -echo -e "${executable}" -echo -e "" -echo -e "CentOS" -echo -e "=================================" -cat "${tmpdir}/.depdetect_centos_line" -echo -e "" -echo -e "" -echo -e "Ubuntu" -echo -e "=================================" -cat "${tmpdir}/.depdetect_ubuntu_line" -echo -e "" -echo -e "" -echo -e "Debian" -echo -e "=================================" -cat "${tmpdir}/.depdetect_debian_line" -echo -e "" -if [ "${unknownlib}" == "1" ]; then - echo -e "" - echo -e "Unknown shared Library" - echo -e "=================================" - cat "${tmpdir}/.depdetect_unknown" -fi -echo -e "" -echo -e "Required Librarys" -echo -e "=================================" -sort "${tmpdir}/.depdetect_readelf" | uniq -echo -en "\n" -rm -f "${tmpdir:?}/.depdetect_centos_line" -rm -f "${tmpdir:?}/.depdetect_centos_list" -rm -f "${tmpdir:?}/.depdetect_centos_list_uniq" - -rm -f "${tmpdir:?}/.depdetect_debian_line" -rm -f "${tmpdir:?}/.depdetect_debian_list" -rm -f "${tmpdir:?}/.depdetect_debian_list_uniq" - -rm -f "${tmpdir:?}/.depdetect_ubuntu_line" -rm -f "${tmpdir:?}/.depdetect_ubuntu_list" -rm -f "${tmpdir:?}/.depdetect_ubuntu_list_uniq" - -rm -f "${tmpdir:?}/.depdetect_readelf" -rm -f "${tmpdir:?}/.depdetect_readelf_uniq" -rm -f "${tmpdir:?}/.depdetect_unknown" -rm -f "${tmpdir:?}/.depdetect_unknown_uniq" - -core_exit.sh diff --git a/lgsm/functions/command_dev_detect_glibc.sh b/lgsm/functions/command_dev_detect_glibc.sh deleted file mode 100644 index 73280e55d..000000000 --- a/lgsm/functions/command_dev_detect_glibc.sh +++ /dev/null @@ -1,92 +0,0 @@ -#!/bin/bash -# LinuxGSM command_dev_detect_glibc.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Automatically detects the version of GLIBC that is required. -# Can check a file or directory recursively. - -commandname="DEV-DETECT-GLIBC" -commandaction="Developer detect glibc" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_firstcommand_set - -echo -e "=================================" -echo -e "glibc Requirements Checker" -echo -e "=================================" - -if [ ! "$(command -v objdump)" ]; then - fn_print_failure_nl "objdump is missing" - fn_script_log_fatal "objdump is missing" - core_exit.sh -fi - -if [ -z "${serverfiles}" ]; then - dir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") -fi - -if [ -d "${serverfiles}" ]; then - echo -e "Checking directory: " - echo -e "${serverfiles}" -elif [ -f "${serverfiles}" ]; then - echo -e "Checking file: " - echo -e "${serverfiles}" -fi -echo -e "" - -glibc_check_dir_array=(steamcmddir serverfiles) -for glibc_check_var in "${glibc_check_dir_array[@]}"; do - if [ "${glibc_check_var}" == "serverfiles" ]; then - glibc_check_dir="${serverfiles}" - glibc_check_name="${gamename}" - elif [ "${glibc_check_var}" == "steamcmddir" ]; then - glibc_check_dir="${steamcmddir}" - glibc_check_name="SteamCMD" - fi - - if [ -d "${glibc_check_dir}" ]; then - glibc_check_files=$(find "${glibc_check_dir}" | wc -l) - find "${glibc_check_dir}" -type f -print0 \ - | while IFS= read -r -d $'\0' line; do - glibcversion=$(objdump -T "${line}" 2> /dev/null | grep -oP "GLIBC[^ ]+" | grep -v GLIBCXX | sort | uniq | sort -r --version-sort | head -n 1) - if [ "${glibcversion}" ]; then - echo -e "${glibcversion}: ${line}" >> "${tmpdir}/detect_glibc_files_${glibc_check_var}.tmp" - fi - objdump -T "${line}" 2> /dev/null | grep -oP "GLIBC[^ ]+" >> "${tmpdir}/detect_glibc_${glibc_check_var}.tmp" - echo -n "${i} / ${glibc_check_files}" $'\r' - ((i++)) - done - echo -e "" - echo -e "" - echo -e "${glibc_check_name} glibc Requirements" - echo -e "=================================" - if [ -f "${tmpdir}/detect_glibc_files_${glibc_check_var}.tmp" ]; then - echo -e "Required glibc" - 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" - cat "${tmpdir}/detect_glibc_files_${glibc_check_var}.tmp" - echo -e "" - echo -e "All required GLIBC versions" - cat "${tmpdir}/detect_glibc_${glibc_check_var}.tmp" | sort | uniq | sort -r --version-sort - rm -f "${tmpdir:?}/detect_glibc_${glibc_check_var}.tmp" - rm -f "${tmpdir:?}/detect_glibc_files_${glibc_check_var}.tmp" - else - fn_print_information_nl "glibc is not required" - fi - else - fn_print_information_nl "${glibc_check_name} is not installed" - fi -done -echo -e "" -echo -e "Final glibc Requirement" -echo -e "=================================" -if [ -f "${tmpdir}/detect_glibc_highest.tmp" ]; then - cat "${tmpdir}/detect_glibc_highest.tmp" | sort | uniq | sort -r --version-sort | head -1 - rm -f "${tmpdir:?}/detect_glibc_highest.tmp" -else - fn_print_information_nl "glibc is not required" -fi - -core_exit.sh diff --git a/lgsm/functions/command_dev_detect_ldd.sh b/lgsm/functions/command_dev_detect_ldd.sh deleted file mode 100644 index 43630d4e9..000000000 --- a/lgsm/functions/command_dev_detect_ldd.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash -# LinuxGSM command_dev_detect_ldd.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Automatically detects required deps using ldd. -# Can check a file or directory recursively. - -commandname="DEV-DETECT-LDD" -commandaction="Developer detect ldd" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_firstcommand_set - -echo -e "=================================" -echo -e "Shared Object dependencies Checker" -echo -e "=================================" - -if [ -z "${serverfiles}" ]; then - dir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") -fi - -if [ -d "${serverfiles}" ]; then - echo -e "Checking directory: " - echo -e "${serverfiles}" -elif [ -f "${serverfiles}" ]; then - echo -e "Checking file: " - echo -e "${serverfiles}" -fi -echo -e "" -touch "${tmpdir}/detect_ldd.tmp" -touch "${tmpdir}/detect_ldd_not_found.tmp" - -files=$(find "${serverfiles}" | wc -l) -find "${serverfiles}" -type f -print0 \ - | while IFS= read -r -d $'\0' line; do - if ldd "${line}" 2> /dev/null | grep -v "not a dynamic executable"; then - echo -e "${line}" >> "${tmpdir}/detect_ldd.tmp" - ldd "${line}" 2> /dev/null | grep -v "not a dynamic executable" >> "${tmpdir}/detect_ldd.tmp" - if ldd "${line}" 2> /dev/null | grep -v "not a dynamic executable" | grep "not found"; then - echo -e "${line}" >> "${tmpdir}/detect_ldd_not_found.tmp" - ldd "${line}" 2> /dev/null | grep -v "not a dynamic executable" | grep "not found" >> "${tmpdir}/detect_ldd_not_found.tmp" - fi - fi - echo -n "$i / $files" $'\r' - ((i++)) - done -echo -e "" -echo -e "" -echo -e "All" -echo -e "=================================" -cat "${tmpdir}/detect_ldd.tmp" - -echo -e "" -echo -e "Not Found" -echo -e "=================================" -cat "${tmpdir}/detect_ldd_not_found.tmp" - -rm -f "${tmpdir:?}/detect_ldd.tmp" -rm -f "${tmpdir:?}/detect_ldd_not_found.tmp" - -core_exit.sh diff --git a/lgsm/functions/command_dev_query_raw.sh b/lgsm/functions/command_dev_query_raw.sh deleted file mode 100644 index 26884b259..000000000 --- a/lgsm/functions/command_dev_query_raw.sh +++ /dev/null @@ -1,280 +0,0 @@ -#!/bin/bash -# LinuxGSM command_dev_query_raw.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Raw gamedig output of the server. - -commandname="DEV-QUERY-RAW" -commandaction="Developer query raw" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_firstcommand_set - -check.sh -info_game.sh -info_distro.sh -info_messages.sh - -echo -e "" -echo -e "${lightgreen}Query IP Addresses${default}" -echo -e "==================================================================" -echo -e "" -for queryip in "${queryips[@]}"; do - echo -e "${queryip}" -done -echo -e "" -echo -e "${lightgreen}Game Server Ports${default}" -echo -e "==================================================================" -{ - echo -e "${lightblue}Port Name \tPort Number \tStatus \tTCP \tUDP${default}" - if [ -v port ]; then - echo -e "Game: \t${port} \t$(ss -tupl | grep -c ${port}) \t$(ss -tupl | grep ${port} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${port} | grep udp | awk '{ print $2 }')" - else - echo -e "Game:" - fi - if [ "${shortname}" == "rw" ]; then - if [ -v port2 ]; then - echo -e "Game+1: \t${port2} \t$(ss -tupl | grep -c ${port}) \t$(ss -tupl | grep ${port2} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${port2} | grep udp | awk '{ print $2 }')" - else - echo -e "Game+1:" - fi - - if [ -v port3 ]; then - echo -e "Game+2: \t${port3} \t$(ss -tupl | grep -c ${port}) \t$(ss -tupl | grep ${port3} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${port3} | grep udp | awk '{ print $2 }')" - else - echo -e "Game+2:" - fi - - if [ -v port4 ]; then - echo -e "Game+3: \t${port4} \t$(ss -tupl | grep -c ${port}) \t$(ss -tupl | grep ${port4} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${port4} | grep udp | awk '{ print $2 }')" - else - echo -e "Game+3:" - fi - fi - - if [ -v port401 ]; then - echo -e "Game+400: \t${port401} \t$(ss -tupl | grep -c ${port401}) \t$(ss -tupl | grep ${port401} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${port401} | grep udp | awk '{ print $2 }')" - else - echo -e "Game+400:" - fi - - if [ -v portipv6 ]; then - echo -e "Game ipv6: \t${portipv6} \t$(ss -tupl | grep -c ${portipv6}) \t$(ss -tupl | grep ${portipv6} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${portipv6} | grep udp | awk '{ print $2 }')" - else - echo -e "Game ipv6:" - fi - - if [ -v queryport ]; then - echo -e "Query: \t${queryport} \t$(ss -tupl | grep -c ${queryport}) \t$(ss -tupl | grep ${queryport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${queryport} | grep udp | awk '{ print $2 }')" - else - echo -e "Query:" - fi - - if [ -v httpport ]; then - echo -e "HTTP: \t${httpport} \t$(ss -tupl | grep -c ${httpport}) \t$(ss -tupl | grep ${httpport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${httpport} | grep udp | awk '{ print $2 }')" - else - echo -e "HTTP:" - fi - - if [ -v httpqueryport ]; then - echo -e "HTTP Query: \t${httpqueryport} \t$(ss -tupl | grep -c ${httpqueryport}) \t$(ss -tupl | grep ${httpqueryport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${httpqueryport} | grep udp | awk '{ print $2 }')" - else - echo -e "HTTP Query:" - fi - - if [ -v webadminport ]; then - echo -e "Web Admin: \t${webadminport} \t$(ss -tupl | grep -c ${webadminport}) \t$(ss -tupl | grep ${webadminport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${webadminport} | grep udp | awk '{ print $2 }')" - else - echo -e "Web Admin:" - fi - - if [ -v 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 - echo -e "Client:" - fi - - if [ -v rconport ]; then - echo -e "RCON: \t${rconport} \t$(ss -tupl | grep -c ${rconport}) \t$(ss -tupl | grep ${rconport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${rconport} | grep udp | awk '{ print $2 }')" - else - echo -e "RCON:" - fi - - if [ -v rawport ]; then - echo -e "RAW UDP Socket: \t${rawport} \t$(ss -tupl | grep -c ${rawport}) \t$(ss -tupl | grep ${rawport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${rawport} | grep udp | awk '{ print $2 }')" - else - echo -e "RAW UDP Socket:" - fi - - if [ -v masterport ]; then - echo -e "Game: Master: \t${masterport} \t$(ss -tupl | grep -c ${masterport}) \t$(ss -tupl | grep ${masterport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${masterport} | grep udp | awk '{ print $2 }')" - else - echo -e "Game: Master:" - fi - - if [ -v steamport ]; then - echo -e "Steam: \t${steamport} \t$(ss -tupl | grep -c ${steamport}) \t$(ss -tupl | grep ${steamport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${steamport} | grep udp | awk '{ print $2 }')" - else - echo -e "Steam:" - fi - - if [ -v steamauthport ]; then - echo -e "Steam: Auth: \t${steamauthport} \t$(ss -tupl | grep -c ${steamauthport}) \t$(ss -tupl | grep ${steamauthport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${steamauthport} | grep udp | awk '{ print $2 }')" - else - echo -e "Steam: Auth:" - fi - - if [ -v steammasterport ]; then - echo -e "Steam: Master: \t${steammasterport} \t$(ss -tupl | grep -c ${steammasterport}) \t$(ss -tupl | grep ${steammasterport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${steammasterport} | grep udp | awk '{ print $2 }')" - else - echo -e "Steam: Master:" - fi - - if [ -v steamqueryport ]; then - echo -e "Steam: Query: \t${steamqueryport} \t$(ss -tupl | grep -c ${steamqueryport}) \t$(ss -tupl | grep ${steamqueryport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${steamqueryport} | grep udp | awk '{ print $2 }')" - else - echo -e "Steam: Query:" - fi - if [ -v beaconport ]; then - echo -e "Beacon: \t${beaconport} \t$(ss -tupl | grep -c ${beaconport}) \t$(ss -tupl | grep ${beaconport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${beaconport} | grep udp | awk '{ print $2 }')" - else - echo -e "Beacon:" - fi - - if [ -v appport ]; then - echo -e "App: \t${appport} \t$(ss -tupl | grep -c ${appport}) \t$(ss -tupl | grep ${appport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${appport} | grep udp | awk '{ print $2 }')" - else - echo -e "App:" - fi - - if [ -v telnetport ]; then - echo -e "Telnet: \t${telnetport} \t$(ss -tupl | grep -c ${telnetport}) \t$(ss -tupl | grep ${telnetport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${telnetport} | grep udp | awk '{ print $2 }')" - else - echo -e "Telnet:" - fi - - if [ -v sourcetvport ]; then - echo -e "SourceTV: \t${sourcetvport} \t$(ss -tupl | grep -c ${sourcetvport}) \t$(ss -tupl | grep ${sourcetvport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${sourcetvport} | grep udp | awk '{ print $2 }')" - else - echo -e "SourceTV:" - fi - - if [ -v fileport ]; then - echo -e "File: \t${fileport} \t$(ss -tupl | grep -c ${fileport}) \t$(ss -tupl | grep ${fileport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${fileport} | grep udp | awk '{ print $2 }')" - else - echo -e "File:" - fi - - if [ -v udplinkport ]; then - echo -e "UDP Link: \t${udplinkport} \t$(ss -tupl | grep -c ${udplinkport}) \t$(ss -tupl | grep ${udplinkport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${udplinkport} | grep udp | awk '{ print $2 }')" - else - echo -e "UDP Link:" - fi - - if [ -v voiceport ]; then - echo -e "Voice: \t${voiceport} \t$(ss -tupl | grep -c ${voiceport}) \t$(ss -tupl | grep ${voiceport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${voiceport} | grep udp | awk '{ print $2 }')" - else - echo -e "Voice:" - fi - - if [ -v voiceunusedport ]; then - echo -e "Voice (Unused): \t${voiceunusedport} \t$(ss -tupl | grep -c ${voiceunusedport}) \t$(ss -tupl | grep ${voiceunusedport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${voiceunusedport} | grep udp | awk '{ print $2 }')" - else - echo -e "Voice (Unused):" - fi - - if [ -v battleeyeport ]; then - echo -e "BattleEye: \t${battleeyeport} \t$(ss -tupl | grep -c ${battleeyeport}) \t$(ss -tupl | grep ${battleeyeport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${battleeyeport} | grep udp | awk '{ print $2 }')" - else - echo -e "BattleEye:" - fi - - if [ -v statsport ]; then - echo -e "Stats: \t${battleeyeport} \t$(ss -tupl | grep -c ${statsport}) \t$(ss -tupl | grep ${statsport} | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep ${statsport} | grep udp | awk '{ print $2 }')" - else - echo -e "Stats:" - fi - -} | column -s $'\t' -t -echo -e "" -echo -e "${lightgreen}SS Output${default}" -echo -e "=================================" -fn_info_message_ports -echo -e "" -echo -e "${lightgreen}Query Port - Raw Output${default}" -echo -e "==================================================================" -echo -e "" -echo -e "PORT: ${port}" -echo -e "QUERY PORT: ${queryport}" -echo -e "" -echo -e "${lightgreen}Gamedig Raw Output${default}" -echo -e "=================================" -echo -e "" -if [ ! "$(command -v gamedig 2> /dev/null)" ]; then - fn_print_failure_nl "gamedig not installed" -fi -if [ ! "$(command -v jq 2> /dev/null)" ]; then - fn_print_failure_nl "jq not installed" -fi -for queryip in "${queryips[@]}"; do - query_gamedig.sh - echo -e "${gamedigcmd}" - echo"" - echo "${gamedigraw}" | jq -done -echo -e "" -echo -e "${lightgreen}gsquery Raw Output${default}" -echo -e "=================================" -echo -e "" -for queryip in "${queryips[@]}"; do - echo -e "./query_gsquery.py -a \"${queryip}\" -p \"${queryport}\" -e \"${querytype}\"" - echo -e "" - if [ ! -f "${functionsdir}/query_gsquery.py" ]; then - fn_fetch_file_github "lgsm/functions" "query_gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nohash" - fi - "${functionsdir}"/query_gsquery.py -a "${queryip}" -p "${queryport}" -e "${querytype}" -done -echo -e "" -echo -e "${lightgreen}TCP Raw Output${default}" -echo -e "=================================" -echo -e "" -for queryip in "${queryips[@]}"; do - echo -e "bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${queryport}''" - echo -e "" - timeout 3 bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${queryport}'' - querystatus="$?" - echo -e "" - if [ "${querystatus}" == "0" ]; then - echo -e "TCP query PASS" - else - echo -e "TCP query FAIL" - fi -done -echo -e "" -echo -e "${lightgreen}Game Port - Raw Output${default}" -echo -e "==================================================================" -echo -e "" -echo -e "${lightgreen}TCP Raw Output${default}" -echo -e "=================================" -echo -e "" -for queryip in "${queryips[@]}"; do - echo -e "bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${port}''" - echo -e "" - timeout 3 bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${port}'' - querystatus="$?" - echo -e "" - if [ "${querystatus}" == "0" ]; then - echo -e "TCP query PASS" - else - echo -e "TCP query FAIL" - fi -done -echo -e "" -echo -e "${lightgreen}Steam Master Server Response${default}" -echo -e "==================================================================" -echo -e "" -echo -e "Response: ${displaymasterserver}" -echo -e "" - -exitcode=0 -core_exit.sh diff --git a/lgsm/functions/command_donate.sh b/lgsm/functions/command_donate.sh deleted file mode 100644 index f00a4d702..000000000 --- a/lgsm/functions/command_donate.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -# LinuxGSM command_donate.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Shows ways to donate. - -commandname="DONATE" -commandaction="Donate" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_firstcommand_set - -fn_print_ascii_logo -echo -e "${lightyellow}Support LinuxGSM${default}" -echo -e "=================================" -echo -e "" -echo -e "Been using LinuxGSM?" -echo -e "Consider donating to support development." -echo -e "" -echo -e "* ${lightblue}Patreon:${default} https://linuxgsm.com/patreon" -echo -e "* ${lightblue}GitHub:${default} https://github.com/sponsors/dgibbs64" -echo -e "* ${lightblue}PayPal:${default} https://linuxgsm.com/paypal" -echo -e "" -echo -e "LinuxGSM est. 2012" - -core_exit.sh diff --git a/lgsm/functions/command_fastdl.sh b/lgsm/functions/command_fastdl.sh deleted file mode 100644 index 78abd650a..000000000 --- a/lgsm/functions/command_fastdl.sh +++ /dev/null @@ -1,442 +0,0 @@ -#!/bin/bash -# LinuxGSM command_fastdl.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Creates a FastDL directory. - -commandname="FASTDL" -commandaction="Fastdl" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_firstcommand_set - -check.sh - -# Directories. -if [ -z "${webdir}" ]; then - webdir="${rootdir}/public_html" -fi -fastdldir="${webdir}/fastdl" -addonsdir="${systemdir}/addons" -# Server lua autorun dir, used to autorun lua on client connect to the server. -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_fatal "bzip2 is not installed" - core_exit.sh -fi - -# Header -fn_print_header -echo -e "More info: https://docs.linuxgsm.com/commands/fastdl" -echo -e "" - -# Prompts user for FastDL creation settings. -echo -e "${commandaction} setup" -echo -e "=================================" - -# Prompt for clearing old files if directory was already here. -if [ -d "${fastdldir}" ]; then - fn_print_warning_nl "FastDL directory already exists." - echo -e "${fastdldir}" - echo -e "" - if fn_prompt_yn "Overwrite existing directory?" Y; then - fn_script_log_info "Overwrite existing directory: YES" - else - core_exit.sh - fi -fi - -# Garry's Mod Specific. -if [ "${shortname}" == "gmod" ]; then - # Prompt for download enforcer, which is using a .lua addfile resource generator. - if fn_prompt_yn "Force clients to download files?" Y; then - luaresource="on" - fn_script_log_info "Force clients to download files: YES" - else - luaresource="off" - fn_script_log_info "Force clients to download filesr: NO" - fi -fi - -# Clears any fastdl directory content. -fn_clear_old_fastdl() { - # Clearing old FastDL. - if [ -d "${fastdldir}" ]; then - echo -en "clearing existing FastDL directory ${fastdldir}..." - rm -rf "${fastdldir:?}" - exitcode=$? - if [ "${exitcode}" != 0 ]; then - fn_print_fail_eol_nl - fn_script_log_fatal "Clearing existing FastDL directory ${fastdldir}" - core_exit.sh - else - fn_print_ok_eol_nl - fn_script_log_pass "Clearing existing FastDL directory ${fastdldir}" - fi - fi -} - -fn_fastdl_dirs() { - # Check and create directories. - if [ ! -d "${webdir}" ]; then - echo -en "creating web directory ${webdir}..." - mkdir -p "${webdir}" - exitcode=$? - if [ "${exitcode}" != 0 ]; then - fn_print_fail_eol_nl - fn_script_log_fatal "Creating web directory ${webdir}" - core_exit.sh - else - fn_print_ok_eol_nl - fn_script_log_pass "Creating web directory ${webdir}" - fi - fi - if [ ! -d "${fastdldir}" ]; then - echo -en "creating fastdl directory ${fastdldir}..." - mkdir -p "${fastdldir}" - exitcode=$? - if [ "${exitcode}" != 0 ]; then - fn_print_fail_eol_nl - fn_script_log_fatal "Creating fastdl directory ${fastdldir}" - core_exit.sh - else - fn_print_ok_eol_nl - fn_script_log_pass "Creating fastdl directory ${fastdldir}" - fi - fi -} - -# 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 - ) - - local bytes="${1}" - local precision="${2}" - - if [[ "${bytes}" == "1" ]]; then - echo -e "1 byte" - else - for item in "${abbrevs[@]}"; do - local factor="${item%:*}" - local abbrev="${item#*:}" - if [[ "${bytes}" -ge "${factor}" ]]; then - size=$(bc -l <<< "${bytes} / ${factor}") - printf "%.*f %s\n" "${precision}" "${size}" "${abbrev}" - break - fi - done - fi -} - -# Provides info about the fastdl directory content and prompts for confirmation. -fn_fastdl_preview() { - # Remove any file list. - if [ -f "${tmpdir}/fastdl_files_to_compress.txt" ]; then - rm -f "${tmpdir:?}/fastdl_files_to_compress.txt" - fi - echo -e "analysing required files" - fn_script_log_info "Analysing required files" - # Garry's Mod - if [ "${shortname}" == "gmod" ]; then - cd "${systemdir}" || exit - allowed_extentions_array=("*.ain" "*.bsp" "*.mdl" "*.mp3" "*.ogg" "*.otf" "*.pcf" "*.phy" "*.png" "*.svg" "*.vtf" "*.vmt" "*.vtx" "*.vvd" "*.ttf" "*.wav") - for allowed_extention in "${allowed_extentions_array[@]}"; do - fileswc=0 - tput sc - while read -r ext; do - ((fileswc++)) - tput rc - tput el - echo -e "gathering ${allowed_extention} : ${fileswc}..." - echo -e "${ext}" >> "${tmpdir}/fastdl_files_to_compress.txt" - done < <(find . -type f -iname "${allowed_extention}") - if [ ${fileswc} != 0 ]; then - fn_print_ok_eol_nl - else - fn_print_info_eol_nl - fi - done - # Source engine - else - fastdl_directories_array=("maps" "materials" "models" "particles" "sound" "resources") - for directory in "${fastdl_directories_array[@]}"; do - if [ -d "${systemdir}/${directory}" ]; then - if [ "${directory}" == "maps" ]; then - local allowed_extentions_array=("*.bsp" "*.ain" "*.nav" "*.jpg" "*.txt") - elif [ "${directory}" == "materials" ]; then - local allowed_extentions_array=("*.vtf" "*.vmt" "*.vbf" "*.png" "*.svg") - elif [ "${directory}" == "models" ]; then - local allowed_extentions_array=("*.vtx" "*.vvd" "*.mdl" "*.phy" "*.jpg" "*.png" "*.vmt" "*.vtf") - elif [ "${directory}" == "particles" ]; then - local allowed_extentions_array=("*.pcf") - elif [ "${directory}" == "sound" ]; then - local allowed_extentions_array=("*.wav" "*.mp3" "*.ogg") - fi - for allowed_extention in "${allowed_extentions_array[@]}"; do - fileswc=0 - tput sc - while read -r ext; do - ((fileswc++)) - tput rc - tput el - echo -e "gathering ${directory} ${allowed_extention} : ${fileswc}..." - echo -e "${ext}" >> "${tmpdir}/fastdl_files_to_compress.txt" - done < <(find "${systemdir}/${directory}" -type f -iname "${allowed_extention}") - tput rc - tput el - echo -e "gathering ${directory} ${allowed_extention} : ${fileswc}..." - if [ ${fileswc} != 0 ]; then - fn_print_ok_eol_nl - else - fn_print_info_eol_nl - fi - done - fi - done - fi - if [ -f "${tmpdir}/fastdl_files_to_compress.txt" ]; then - echo -e "calculating total file size..." - fn_sleep_time - totalfiles=$(wc -l < "${tmpdir}/fastdl_files_to_compress.txt") - # Calculates total file size. - while read -r dufile; do - filesize=$(stat -c %s "${dufile}") - filesizetotal=$((filesizetotal + filesize)) - exitcode=$? - if [ "${exitcode}" != 0 ]; then - fn_print_fail_eol_nl - fn_script_log_fatal "Calculating total file size." - core_exit.sh - fi - done < "${tmpdir}/fastdl_files_to_compress.txt" - else - fn_print_fail_eol_nl "generating file list" - fn_script_log_fatal "Generating file list." - core_exit.sh - fi - echo -e "about to compress ${totalfiles} files, total size $(fn_human_readable_file_size ${filesizetotal} 0)" - 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" - core_exit.sh - fi -} - -# Builds Garry's Mod fastdl directory content. -fn_fastdl_gmod() { - cd "${systemdir}" || exit - for allowed_extention in "${allowed_extentions_array[@]}"; do - fileswc=0 - tput sc - while read -r fastdlfile; do - ((fileswc++)) - tput rc - tput el - echo -e "copying ${allowed_extention} : ${fileswc}..." - cp --parents "${fastdlfile}" "${fastdldir}" - exitcode=$? - if [ "${exitcode}" != 0 ]; then - fn_print_fail_eol_nl - fn_script_log_fatal "Copying ${fastdlfile} > ${fastdldir}" - core_exit.sh - else - fn_script_log_pass "Copying ${fastdlfile} > ${fastdldir}" - fi - done < <(find . -type f -iname "${allowed_extention}") - if [ ${fileswc} != 0 ]; then - fn_print_ok_eol_nl - fi - done - # Correct addons directory structure for FastDL. - if [ -d "${fastdldir}/addons" ]; then - echo -en "updating addons file structure..." - cp -Rf "${fastdldir}"/addons/*/* "${fastdldir}" - exitcode=$? - if [ "${exitcode}" != 0 ]; then - fn_print_fail_eol_nl - fn_script_log_fatal "Updating addons file structure" - core_exit.sh - else - fn_print_ok_eol_nl - fn_script_log_pass "Updating addons file structure" - fi - # Clear addons directory in fastdl. - echo -en "clearing addons dir from fastdl dir..." - fn_sleep_time - rm -rf "${fastdldir:?}/addons" - exitcode=$? - if [ "${exitcode}" != 0 ]; then - fn_print_fail_eol_nl - fn_script_log_fatal "Clearing addons dir from fastdl dir" - core_exit.sh - else - fn_print_ok_eol_nl - fn_script_log_pass "Clearing addons dir from fastdl dir" - fi - fi - # Correct content that may be into a lua directory by mistake like some darkrpmodification addons. - if [ -d "${fastdldir}/lua" ]; then - echo -en "correcting DarkRP files..." - fn_sleep_time - cp -Rf "${fastdldir}/lua/"* "${fastdldir}" - exitcode=$? - if [ "${exitcode}" != 0 ]; then - fn_print_fail_eol_nl - fn_script_log_fatal "Correcting DarkRP files" - core_exit.sh - else - fn_print_ok_eol_nl - fn_script_log_pass "Correcting DarkRP files" - fi - fi - if [ -f "${tmpdir}/fastdl_files_to_compress.txt" ]; then - totalfiles=$(wc -l < "${tmpdir}/fastdl_files_to_compress.txt") - # Calculates total file size. - while read -r dufile; do - filesize=$(du -b "${dufile}" | awk '{ print $1 }') - filesizetotal=$((filesizetotal + filesize)) - done < "${tmpdir}/fastdl_files_to_compress.txt" - fi -} - -fn_fastdl_source() { - for directory in "${fastdl_directories_array[@]}"; do - if [ -d "${systemdir}/${directory}" ]; then - if [ "${directory}" == "maps" ]; then - local allowed_extentions_array=("*.bsp" "*.ain" "*.nav" "*.jpg" "*.txt") - elif [ "${directory}" == "materials" ]; then - local allowed_extentions_array=("*.vtf" "*.vmt" "*.vbf" "*.png" "*.svg") - elif [ "${directory}" == "models" ]; then - local allowed_extentions_array=("*.vtx" "*.vvd" "*.mdl" "*.phy" "*.jpg" "*.png") - elif [ "${directory}" == "particles" ]; then - local allowed_extentions_array=("*.pcf") - elif [ "${directory}" == "sound" ]; then - local allowed_extentions_array=("*.wav" "*.mp3" "*.ogg") - fi - for allowed_extention in "${allowed_extentions_array[@]}"; do - fileswc=0 - tput sc - while read -r fastdlfile; do - ((fileswc++)) - tput rc - tput el - echo -e "copying ${directory} ${allowed_extention} : ${fileswc}..." - fn_sleep_time - # get relative path of file in the dir - tmprelfilepath="${fastdlfile#"${systemdir}/"}" - copytodir="${tmprelfilepath%/*}" - # create relative path for fastdl - if [ ! -d "${fastdldir}/${copytodir}" ]; then - mkdir -p "${fastdldir}/${copytodir}" - fi - cp "${fastdlfile}" "${fastdldir}/${copytodir}" - exitcode=$? - if [ "${exitcode}" != 0 ]; then - fn_print_fail_eol_nl - fn_script_log_fatal "Copying ${fastdlfile} > ${fastdldir}/${copytodir}" - core_exit.sh - else - fn_script_log_pass "Copying ${fastdlfile} > ${fastdldir}/${copytodir}" - fi - done < <(find "${systemdir}/${directory}" -type f -iname "${allowed_extention}") - if [ ${fileswc} != 0 ]; then - fn_print_ok_eol_nl - fi - done - fi - done -} - -# Builds the fastdl directory content. -fn_fastdl_build() { - # Copy all needed files for FastDL. - echo -e "copying files to ${fastdldir}" - fn_script_log_info "Copying files to ${fastdldir}" - if [ "${shortname}" == "gmod" ]; then - fn_fastdl_gmod - fn_fastdl_gmod_dl_enforcer - else - fn_fastdl_source - fi -} - -# Generate lua file that will force download any file into the FastDL directory. -fn_fastdl_gmod_dl_enforcer() { - # Clear old lua file. - if [ -f "${luafastdlfullpath}" ]; then - echo -en "removing existing download enforcer: ${luafastdlfile}..." - rm -f "${luafastdlfullpath:?}" - exitcode=$? - if [ "${exitcode}" != 0 ]; then - fn_print_fail_eol_nl - fn_script_log_fatal "Removing existing download enforcer ${luafastdlfullpath}" - core_exit.sh - else - fn_print_ok_eol_nl - fn_script_log_pass "Removing existing download enforcer ${luafastdlfullpath}" - fi - fi - # Generate new one if user said yes. - if [ "${luaresource}" == "on" ]; then - echo -en "creating new download enforcer: ${luafastdlfile}..." - touch "${luafastdlfullpath}" - # Read all filenames and put them into a lua file at the right path. - while read -r line; do - echo -e "resource.AddFile( \"${line}\" )" >> "${luafastdlfullpath}" - done < <(find "${fastdldir:?}" \( -type f ! -name "*.bz2" \) -printf '%P\n') - exitcode=$? - if [ "${exitcode}" != 0 ]; then - fn_print_fail_eol_nl - fn_script_log_fatal "Creating new download enforcer ${luafastdlfullpath}" - core_exit.sh - else - fn_print_ok_eol_nl - fn_script_log_pass "Creating new download enforcer ${luafastdlfullpath}" - fi - fi -} - -# Compresses FastDL files using bzip2. -fn_fastdl_bzip2() { - while read -r filetocompress; do - echo -en "\r\033[Kcompressing ${filetocompress}..." - bzip2 -f "${filetocompress}" - exitcode=$? - if [ "${exitcode}" != 0 ]; then - fn_print_fail_eol_nl - fn_script_log_fatal "Compressing ${filetocompress}" - core_exit.sh - else - fn_script_log_pass "Compressing ${filetocompress}" - fi - done < <(find "${fastdldir:?}" \( -type f ! -name "*.bz2" \)) - fn_print_ok_eol_nl -} - -# Run functions. -fn_fastdl_preview -fn_clear_old_fastdl -fn_fastdl_dirs -fn_fastdl_build -fn_fastdl_bzip2 -# Finished message. -echo -e "FastDL files are located in:" -echo -e "${fastdldir}" -echo -e "FastDL completed" -fn_script_log_info "FastDL completed" - -core_exit.sh diff --git a/lgsm/functions/command_install.sh b/lgsm/functions/command_install.sh deleted file mode 100644 index 19dc59c7e..000000000 --- a/lgsm/functions/command_install.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash -# LinuxGSM command_install.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Overall function for the installer. - -commandname="INSTALL" -commandaction="Installing" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_firstcommand_set - -check.sh -if [ "$(whoami)" == "root" ] && [ ! -f /.dockerenv ]; then - check_deps.sh -else - install_header.sh - install_server_dir.sh - install_logs.sh - check_deps.sh - installflag=1 - # Download and install. - if [ "${shortname}" == "ut2k4" ]; then - install_server_files.sh - install_ut2k4_key.sh - elif [ -z "${appid}" ]; then - install_server_files.sh - elif [ "${appid}" ]; then - install_steamcmd.sh - install_server_files.sh - fi - - # Configuration. - install_config.sh - if [ -v gslt ]; then - install_gslt.sh - elif [ "${shortname}" == "dst" ]; then - install_dst_token.sh - elif [ "${shortname}" == "squad" ]; then - install_squad_license.sh - elif [ "${shortname}" == "ts3" ]; then - install_ts3db.sh - elif [ "${shortname}" == "mta" ]; then - command_install_resources_mta.sh - fn_firstcommand_reset - fi - - fix.sh - install_stats.sh - install_complete.sh -fi -core_exit.sh diff --git a/lgsm/functions/command_install_resources_mta.sh b/lgsm/functions/command_install_resources_mta.sh deleted file mode 100644 index daf039551..000000000 --- a/lgsm/functions/command_install_resources_mta.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -# LinuxGSM command_install_resources_mta.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Installs the default resources for Multi Theft Auto. - -commandname="DEFAULT-RESOURCES" -commandaction="Default Resources" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_firstcommand_set - -fn_install_resources() { - echo -e "" - echo -e "${lightyellow}Installing Default Resources${default}" - echo -e "=================================" - fn_fetch_file "http://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip" "" "" "" "${tmpdir}" "mtasa-resources-latest.zip" "nochmodx" "norun" "noforce" "nohash" - fn_dl_extract "${tmpdir}" "mtasa-resources-latest.zip" "${resourcesdir}" - echo -e "Default Resources Installed." -} - -fn_print_header - -if [ -z "${autoinstall}" ]; then - fn_print_warning_nl "Installing the default resources with existing resources may cause issues." - if fn_prompt_yn "Do you want to install MTA default resources?" Y; then - fn_install_resources - fi -else - fn_print_warning_nl "Default resources are not installed when using ./${selfname} auto-install." - fn_print_information_nl "To install default resources use ./${selfname} install" -fi diff --git a/lgsm/functions/command_mods_install.sh b/lgsm/functions/command_mods_install.sh deleted file mode 100644 index 0edbe5bc0..000000000 --- a/lgsm/functions/command_mods_install.sh +++ /dev/null @@ -1,135 +0,0 @@ -#!/bin/bash -# LinuxGSM command_mods_install.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: List and installs available mods along with mods_list.sh and mods_core.sh. - -commandname="MODS-INSTALL" -commandaction="Installing mods" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_firstcommand_set - -check.sh -mods_core.sh - -fn_print_header - -# Displays a list of installed mods. -fn_mods_installed_list -if [ "${installedmodscount}" -gt "0" ]; then - echo -e "Installed addons/mods" - echo -e "=================================" - # Go through all available commands, get details and display them to the user. - for ((llindex = 0; llindex < ${#installedmodslist[@]}; llindex++)); do - # Current mod is the "llindex" value of the array we're going through. - currentmod="${installedmodslist[llindex]}" - fn_mod_get_info - # Display mod info to the user. - echo -e " * ${green}${modcommand}${default}${default}" - done - echo -e "" -fi - -echo -e "Available addons/mods" -echo -e "=================================" -# Display available mods from mods_list.sh. -# Set and reset vars -compatiblemodslistindex=0 -# As long as we're within index values. -while [ "${compatiblemodslistindex}" -lt "${#compatiblemodslist[@]}" ]; do - # Set values for convenience. - displayedmodname="${compatiblemodslist[compatiblemodslistindex]}" - displayedmodcommand="${compatiblemodslist[compatiblemodslistindex + 1]}" - displayedmodsite="${compatiblemodslist[compatiblemodslistindex + 2]}" - displayedmoddescription="${compatiblemodslist[compatiblemodslistindex + 3]}" - # Output mods to the user. - echo -e "${displayedmodname} - ${displayedmoddescription} - ${displayedmodsite}" - echo -e " * ${cyan}${displayedmodcommand}${default}" - # Increment index from the amount of values we just displayed. - let "compatiblemodslistindex+=4" - ((totalmodsavailable++)) -done - -# If no mods are available for a specific game. -if [ -z "${compatiblemodslist}" ]; then - fn_print_fail_nl "No mods are currently available for ${gamename}." - fn_script_log_info "No mods are currently available for ${gamename}." - core_exit.sh -fi -fn_script_log_info "${totalmodsavailable} addons/mods are available for install" - -## User selects a mod. -echo -e "" -while [[ ! " ${availablemodscommands[@]} " =~ " ${usermodselect} " ]]; 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 -done -# Get mod info. -currentmod="${usermodselect}" -fn_mod_get_info - -echo -e "" -echo -e "Installing ${modprettyname}" -echo -e "=================================" -fn_script_log_info "${modprettyname} selected for install" - -# Check if the mod is already installed and warn the user. -if [ -f "${modsinstalledlistfullpath}" ]; then - if [ "$(sed -n "/^${modcommand}$/p" "${modsinstalledlistfullpath}")" ]; then - fn_print_warning_nl "${modprettyname} is already installed" - fn_script_log_warn "${modprettyname} is already installed" - echo -e " * Any configs may be overwritten." - if ! fn_prompt_yn "Continue?" Y; then - core_exit.sh - fi - fn_script_log_info "User selected to continue" - fi -fi - -## Installation. -# If amxmodx check if metamod exists first -if [ "${modcommand}" == "amxmodx" ]; then - fn_mod_exist "metamod" -fi - -if [ "${modcommand}" == "amxmodxcs" ] \ - || [ "${modcommand}" == "amxmodxdod" ] \ - || [ "${modcommand}" == "amxmodxtfc" ] \ - || [ "${modcommand}" == "amxmodxns" ] \ - || [ "${modcommand}" == "amxmodxts" ]; then - fn_mod_exist "amxmodx" -fi - -fn_create_mods_dir -fn_mods_clear_tmp_dir -fn_mods_create_tmp_dir -fn_mod_install_files -fn_mod_lowercase -fn_mod_create_filelist -fn_mod_copy_destination -fn_mod_add_list -fn_mod_tidy_files_list -fn_mods_clear_tmp_dir - -# Create/modify existing liblist.gam file for Metamod -if [ "${modcommand}" == "metamod" ]; then - fn_mod_install_liblist_gam_file -fi - -# Create/modify plugins.ini file for Metamod -if [ "${modcommand}" == "amxmodx" ]; then - fn_mod_install_amxmodx_file -fi - -echo -e "${modprettyname} installed" -fn_script_log_pass "${modprettyname} installed." - -core_exit.sh diff --git a/lgsm/functions/command_mods_remove.sh b/lgsm/functions/command_mods_remove.sh deleted file mode 100644 index 7127dcb3c..000000000 --- a/lgsm/functions/command_mods_remove.sh +++ /dev/null @@ -1,153 +0,0 @@ -#!/bin/bash -# LinuxGSM command_mods_uninstall.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Uninstall mods along with mods_list.sh and mods_core.sh. - -commandname="MODS-REMOVE" -commandaction="Removing mods" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_firstcommand_set - -check.sh -mods_core.sh -fn_mods_check_installed - -fn_print_header -echo -e "Remove addons/mods" -echo -e "=================================" - -# Displays list of installed mods. -# Generates list to display to user. -fn_mods_installed_list -for ((mlindex = 0; mlindex < ${#installedmodslist[@]}; mlindex++)); do - # Current mod is the "mlindex" value of the array we are going through. - currentmod="${installedmodslist[mlindex]}" - # Get mod info. - fn_mod_get_info - # Display mod info to the user. - echo -e "${red}${modcommand}${default} - ${modprettyname} - ${moddescription}" -done - -echo -e "" -# Keep prompting as long as the user input doesn't correspond to an available mod. -while [[ ! " ${installedmodslist[@]} " =~ " ${usermodselect} " ]]; 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 -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 - core_exit.sh -fi - -currentmod="${usermodselect}" -fn_mod_get_info -fn_check_mod_files_list - -# Uninstall the mod. -fn_script_log_info "Removing ${modsfilelistsize} files from ${modprettyname}" -echo -e "removing ${modprettyname}" -echo -e "* ${modsfilelistsize} files to be removed" -echo -e "* location: ${modinstalldir}" -fn_sleep_time -# Go through every file and remove it. -modfileline="1" -tput sc -while [ "${modfileline}" -le "${modsfilelistsize}" ]; do - # Current line defines current file to remove. - currentfileremove=$(sed "${modfileline}q;d" "${modsdir}/${modcommand}-files.txt") - # If file or directory exists, then remove it. - - if [ -f "${modinstalldir}/${currentfileremove}" ] || [ -d "${modinstalldir}/${currentfileremove}" ]; then - rm -rf "${modinstalldir:?}/${currentfileremove:?}" - ((exitcode = $?)) - if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "Removing ${modinstalldir}/${currentfileremove}" - break - else - fn_script_log_pass "Removing ${modinstalldir}/${currentfileremove}" - fi - fi - tput rc - tput el - echo -e "removing ${modprettyname} ${modfileline} / ${modsfilelistsize} : ${currentfileremove}..." - ((modfileline++)) -done - -# Added logic not to fail since removing game specific mods (amxmodxcs) removes files that will -# not be found when removing the base (amxmodx) mod -if [ "${modcommand}" != "amxmodx" ]; then - if [ "${exitcode}" != 0 ]; then - fn_print_fail_eol_nl - core_exit.sh - else - fn_print_ok_eol_nl - fi -else - fn_print_ok_eol_nl -fi - -# Remove file list. -echo -en "removing ${modcommand}-files.txt..." -fn_sleep_time -rm -rf "${modsdir:?}/${modcommand}-files.txt" -exitcode=$? -if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "Removing ${modsdir}/${modcommand}-files.txt" - fn_print_fail_eol_nl - core_exit.sh -else - fn_script_log_pass "Removing ${modsdir}/${modcommand}-files.txt" - fn_print_ok_eol_nl -fi - -# Remove mods from installed mods list. -echo -en "removing ${modcommand} from ${modsinstalledlist}..." -fn_sleep_time - -sed -i "/^${modcommand}$/d" "${modsinstalledlistfullpath}" -exitcode=$? -if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "Removing ${modcommand} from ${modsinstalledlist}" - fn_print_fail_eol_nl - core_exit.sh -else - fn_script_log_pass "Removing ${modcommand} from ${modsinstalledlist}" - fn_print_ok_eol_nl -fi - -# Oxide fix -# Oxide replaces server files, so a validate is required after uninstall. -if [ "${engine}" == "unity3d" ] && [[ "${modprettyname}" == *"Oxide"* ]]; then - fn_print_information_nl "Validating to restore original ${gamename} files replaced by Oxide" - fn_script_log "Validating to restore original ${gamename} files replaced by Oxide" - exitbypass="1" - command_validate.sh - fn_firstcommand_reset - unset exitbypass -fi - -# Remove/modify existing liblist.gam file for Metamod -if [ "${modcommand}" == "metamod" ]; then - fn_mod_remove_liblist_gam_file -fi - -# Remove/modify plugins.ini file for AMX Mod X -if [ "${modcommand}" == "amxmodx" ]; then - fn_mod_remove_amxmodx_file -fi - -echo -e "${modprettyname} removed" -fn_script_log "${modprettyname} removed" - -core_exit.sh diff --git a/lgsm/functions/command_mods_update.sh b/lgsm/functions/command_mods_update.sh deleted file mode 100644 index 80b23fea9..000000000 --- a/lgsm/functions/command_mods_update.sh +++ /dev/null @@ -1,109 +0,0 @@ -#!/bin/bash -# LinuxGSM command_mods_update.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Updates installed mods along with mods_list.sh and mods_core.sh. - -commandname="MODS-UPDATE" -commandaction="Updating mods" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_firstcommand_set - -check.sh -mods_core.sh - -# Prevents specific files being overwritten upon update (set by ${modkeepfiles}). -# For that matter, remove cfg files after extraction before copying them to destination. -fn_remove_cfg_files() { - if [ "${modkeepfiles}" != "OVERWRITE" ] && [ "${modkeepfiles}" != "NOUPDATE" ]; then - echo -e "the following files/directories will be preserved:" - fn_sleep_time - # Count how many files there are to remove. - filestopreserve=$(echo -e "${modkeepfiles}" | awk -F ';' '{ print NF }') - # Test all subvalues of "modkeepfiles" using the ";" separator. - for ((preservefilesindex = 1; preservefilesindex < filestopreserve; preservefilesindex++)); do - # Put the current file we are looking for into a variable. - filetopreserve=$(echo -e "${modkeepfiles}" | awk -F ';' -v x=${preservefilesindex} '{ print $x }') - echo -e " * serverfiles/${filetopreserve}" - # If it matches an existing file that have been extracted delete the file. - if [ -f "${extractdest}/${filetopreserve}" ] || [ -d "${extractdest}/${filetopreserve}" ]; then - rm -r "${extractdest:?}/${filetopreserve}" - # Write the file path in a tmp file, to rebuild a full file list as it is rebuilt upon update. - if [ ! -f "${modsdir}/.removedfiles.tmp" ]; then - touch "${modsdir}/.removedfiles.tmp" - fi - echo -e "${filetopreserve}" >> "${modsdir}/.removedfiles.tmp" - fi - done - fi -} - -fn_print_dots "Update addons/mods" -fn_mods_check_installed -fn_print_info_nl "Update addons/mods: ${installedmodscount} addons/mods will be updated" -fn_script_log_info "${installedmodscount} mods or addons will be updated" -fn_mods_installed_list -# Go through all available commands, get details and display them to the user. -for ((ulindex = 0; ulindex < ${#installedmodslist[@]}; ulindex++)); do - # Current mod is the "ulindex" value of the array we're going through. - currentmod="${installedmodslist[ulindex]}" - fn_mod_get_info - # Display installed mods and the update policy. - if [ -z "${modkeepfiles}" ]; then - # If modkeepfiles is not set for some reason, that's a problem. - fn_script_log_error "Could not find update policy for ${modprettyname}" - fn_print_error_nl "Could not find update policy for ${modprettyname}" - exitcode="1" - core_exit.sh - # If the mod won't get updated. - elif [ "${modkeepfiles}" == "NOUPDATE" ]; then - echo -e " * ${red}{modprettyname}${default} (won't be updated)" - # If the mode is just overwritten. - elif [ "${modkeepfiles}" == "OVERWRITE" ]; then - echo -e " * ${modprettyname} (overwrite)" - else - echo -e " * ${yellow}${modprettyname}${default} (retain common custom files)" - fi -done - -## Update -# List all installed mods and apply update. -# Reset line value. -installedmodsline="1" -while [ "${installedmodsline}" -le "${installedmodscount}" ]; do - currentmod=$(sed "${installedmodsline}q;d" "${modsinstalledlistfullpath}") - if [ "${currentmod}" ]; then - fn_mod_get_info - # Don not update mod if the policy is set to "NOUPDATE". - if [ "${modkeepfiles}" == "NOUPDATE" ]; then - fn_print_info "${modprettyname} will not be updated to preserve custom files" - fn_script_log_info "${modprettyname} will not be updated to preserve custom files" - else - echo -e "" - echo -e "==> Updating ${modprettyname}" - fn_create_mods_dir - fn_mods_clear_tmp_dir - fn_mods_create_tmp_dir - fn_mod_install_files - fn_mod_lowercase - fn_remove_cfg_files - fn_mod_create_filelist - fn_mod_copy_destination - fn_mod_add_list - fn_mod_tidy_files_list - fn_mods_clear_tmp_dir - fi - ((installedmodsline++)) - else - fn_print_fail "No mod was selected" - fn_script_log_fatal "No mod was selected" - exitcode="1" - core_exit.sh - fi -done -echo -e "" -fn_print_ok_nl "Mods update complete" -fn_script_log_info "Mods update complete" - -core_exit.sh diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh deleted file mode 100644 index 20c830e0b..000000000 --- a/lgsm/functions/command_monitor.sh +++ /dev/null @@ -1,245 +0,0 @@ -#!/bin/bash -# LinuxGSM command_monitor.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Monitors server by checking for running processes -# then passes to gamedig and gsquery. - -commandname="MONITOR" -commandaction="Monitoring" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_firstcommand_set - -fn_monitor_check_lockfile() { - # Monitor does not run it lockfile is not found. - if [ ! -f "${lockdir}/${selfname}.lock" ]; then - fn_print_dots "Checking lockfile: " - fn_print_checking_eol - fn_script_log_info "Checking lockfile: CHECKING" - fn_print_error "Checking lockfile: No lockfile found: " - fn_print_error_eol_nl - fn_script_log_error "Checking lockfile: No lockfile found: ERROR" - echo -e "* Start ${selfname} to run monitor." - core_exit.sh - fi - - # Fix if lockfile is not unix time or contains letters - if [ -f "${lockdir}/${selfname}.lock" ] && [[ "$(head -n 1 "${lockdir}/${selfname}.lock")" =~ [A-Za-z] ]]; then - date '+%s' > "${lockdir}/${selfname}.lock" - echo "${version}" >> "${lockdir}/${selfname}.lock" - echo "${port}" >> "${lockdir}/${selfname}.lock" - fi -} - -fn_monitor_check_update() { - # Monitor will check if update is already running. - if [ "$(pgrep "${selfname} update" | wc -l)" != "0" ]; then - fn_print_dots "Checking active updates: " - fn_print_checking_eol - fn_script_log_info "Checking active updates: CHECKING" - fn_print_error_nl "Checking active updates: SteamCMD is currently checking for updates: " - fn_print_error_eol - fn_script_log_error "Checking active updates: SteamCMD is currently checking for updates: ERROR" - core_exit.sh - fi -} - -fn_monitor_check_session() { - fn_print_dots "Checking session: " - fn_print_checking_eol - fn_script_log_info "Checking session: CHECKING" - # uses status var from check_status.sh - if [ "${status}" != "0" ]; then - fn_print_ok "Checking session: " - fn_print_ok_eol_nl - fn_script_log_pass "Checking session: OK" - else - fn_print_error "Checking session: " - fn_print_fail_eol_nl - fn_script_log_fatal "Checking session: FAIL" - alert="restart" - alert.sh - fn_script_log_info "Checking session: Monitor is restarting ${selfname}" - command_restart.sh - core_exit.sh - fi -} - -fn_monitor_check_queryport() { - # Monitor will check queryport is set before continuing. - if [ -z "${queryport}" ] || [ "${queryport}" == "0" ]; then - fn_print_dots "Checking port: " - fn_print_checking_eol - fn_script_log_info "Checking port: CHECKING" - if [ -n "${rconenabled}" ] && [ "${rconenabled}" != "true" ] && [ "${shortname}" == "av" ]; then - fn_print_warn "Checking port: Unable to query, rcon is not enabled" - fn_script_log_warn "Checking port: Unable to query, rcon is not enabled" - else - fn_print_error "Checking port: Unable to query, queryport is not set" - fn_script_log_error "Checking port: Unable to query, queryport is not set" - fi - core_exit.sh - fi -} - -fn_query_gsquery() { - if [ ! -f "${functionsdir}/query_gsquery.py" ]; then - fn_fetch_file_github "lgsm/functions" "query_gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nohash" - fi - "${functionsdir}"/query_gsquery.py -a "${queryip}" -p "${queryport}" -e "${querytype}" > /dev/null 2>&1 - querystatus="$?" -} - -fn_query_tcp() { - bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${queryport}'' > /dev/null 2>&1 - querystatus="$?" -} - -fn_monitor_query() { - # Will loop and query up to 5 times every 15 seconds. - # Query will wait up to 60 seconds to confirm server is down as server can become non-responsive during map changes. - totalseconds=0 - for queryattempt in {1..5}; do - for queryip in "${queryips[@]}"; do - fn_print_dots "Querying port: ${querymethod}: ${queryip}:${queryport} : ${totalseconds}/${queryattempt}: " - fn_print_querying_eol - fn_script_log_info "Querying port: ${querymethod}: ${queryip}:${queryport} : ${queryattempt} : QUERYING" - # querydelay - if [ "$(head -n 1 "${lockdir}/${selfname}.lock")" -gt "$(date "+%s" -d "${querydelay} mins ago")" ]; then - fn_print_ok "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: " - fn_print_delay_eol_nl - fn_script_log_info "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt} : DELAY" - fn_script_log_info "Query bypassed: ${gameservername} started less than ${querydelay} minutes ago" - fn_script_log_info "Server started: $(date -d @$(head -n 1 "${lockdir}/${selfname}.lock"))" - fn_script_log_info "Current time: $(date)" - monitorpass=1 - core_exit.sh - # will use query method selected in fn_monitor_loop - # gamedig - elif [ "${querymethod}" == "gamedig" ]; then - query_gamedig.sh - # gsquery - elif [ "${querymethod}" == "gsquery" ]; then - fn_query_gsquery - #tcp query - elif [ "${querymethod}" == "tcp" ]; then - fn_query_tcp - fi - - if [ "${querystatus}" == "0" ]; then - # Server query OK. - fn_print_ok "Querying port: ${querymethod}: ${queryip}:${queryport} : ${totalseconds}/${queryattempt}: " - fn_print_ok_eol_nl - fn_script_log_pass "Querying port: ${querymethod}: ${queryip}:${queryport} : ${queryattempt} : OK" - monitorpass=1 - if [ "${querystatus}" == "0" ]; then - # Add query data to log. - if [ "${gdname}" ]; then - fn_script_log_info "Server name: ${gdname}" - fi - if [ "${gdplayers}" ]; then - fn_script_log_info "Players: ${gdplayers}/${gdmaxplayers}" - fi - if [ "${gdbots}" ]; then - fn_script_log_info "Bots: ${gdbots}" - fi - if [ "${gdmap}" ]; then - fn_script_log_info "Map: ${gdmap}" - fi - if [ "${gdgamemode}" ]; then - fn_script_log_info "Game Mode: ${gdgamemode}" - fi - - # send LinuxGSM stats if monitor is OK. - if [ "${stats}" == "on" ] || [ "${stats}" == "y" ]; then - info_stats.sh - fi - fi - core_exit.sh - else - # Server query FAIL. - fn_print_fail "Querying port: ${querymethod}: ${queryip}:${queryport} : ${totalseconds}/${queryattempt}: " - fn_print_fail_eol - fn_script_log_warn "Querying port: ${querymethod}: ${queryip}:${queryport} : ${queryattempt} : FAIL" - # Monitor will try gamedig (if supported) for first 30s then gsquery before restarting. - # gsquery will fail if longer than 60s - if [ "${totalseconds}" -ge "59" ]; then - # Monitor will FAIL if over 60s and trigger gane server reboot. - fn_print_fail "Querying port: ${querymethod}: ${queryip}:${queryport} : ${totalseconds}/${queryattempt}: " - fn_print_fail_eol_nl - fn_script_log_warn "Querying port: ${querymethod}: ${queryip}:${queryport} : ${queryattempt} : FAIL" - # Send alert if enabled. - alert="restartquery" - alert.sh - command_restart.sh - fn_firstcommand_reset - core_exit.sh - fi - fi - done - # Second counter will wait for 15s before breaking loop. - for seconds in {1..15}; do - fn_print_fail "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt} : ${cyan}WAIT${default}" - sleep 0.5 - totalseconds=$((totalseconds + 1)) - if [ "${seconds}" == "15" ]; then - break - fi - done - done -} - -fn_monitor_loop() { - # loop though query methods selected by querymode. - totalseconds=0 - if [ "${querymode}" == "2" ]; then - local query_methods_array=(gamedig gsquery) - elif [ "${querymode}" == "3" ]; then - local query_methods_array=(gamedig) - elif [ "${querymode}" == "4" ]; then - local query_methods_array=(gsquery) - elif [ "${querymode}" == "5" ]; then - local query_methods_array=(tcp) - fi - for querymethod in "${query_methods_array[@]}"; do - # Will check if gamedig is installed and bypass if not. - if [ "${querymethod}" == "gamedig" ]; then - if [ "$(command -v gamedig 2> /dev/null)" ] && [ "$(command -v jq 2> /dev/null)" ]; then - if [ -z "${monitorpass}" ]; then - fn_monitor_query - fi - else - fn_script_log_info "gamedig is not installed" - fn_script_log_info "https://docs.linuxgsm.com/requirements/gamedig" - fi - else - # will not query if query already passed. - if [ -z "${monitorpass}" ]; then - fn_monitor_query - fi - fi - done -} - -monitorflag=1 -check.sh -core_logs.sh -info_game.sh - -# query pre-checks -fn_monitor_check_lockfile -fn_monitor_check_update -fn_monitor_check_session -# Monitor will not continue if session only check. -if [ "${querymode}" != "1" ]; then - fn_monitor_check_queryport - - # Add a querydelay of 1 min if var missing. - if [ -z "${querydelay}" ]; then - querydelay="1" - fi - - fn_monitor_loop -fi -core_exit.sh diff --git a/lgsm/functions/command_postdetails.sh b/lgsm/functions/command_postdetails.sh deleted file mode 100644 index dad44d9af..000000000 --- a/lgsm/functions/command_postdetails.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/bash -# LinuxGSM command_postdetails.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Strips sensitive information out of Details output. - -commandname="POST-DETAILS" -commandaction="Posting details" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_firstcommand_set - -posttarget="https://termbin.com" - -# source all of the functions defined in the details command. -info_messages.sh - -fn_bad_postdetailslog() { - fn_print_fail_nl "Unable to create temporary file ${postdetailslog}." - core_exit.sh -} - -# Remove any existing postdetails.log file. -if [ -f "${postdetailslog}" ]; then - rm -f "${postdetailslog:?}" -fi - -# Rather than a one-pass sed parser, default to using a temporary directory. -if [ "${exitbypass}" ]; then - postdetailslog="${alertlog}" -else - # Run checks and gathers details to display. - check.sh - info_game.sh - info_distro.sh - info_messages.sh - for queryip in "${queryips[@]}"; do - query_gamedig.sh - if [ "${querystatus}" == "0" ]; then - break - fi - done - touch "${postdetailslog}" || fn_bad_postdetailslog - { - fn_info_message_distro - fn_info_message_server_resource - fn_info_message_gameserver_resource - fn_info_message_gameserver - fn_info_message_script - fn_info_message_backup - # Some game servers do not have parms. - if [ "${shortname}" != "jc2" ] && [ "${shortname}" != "jc3" ] && [ "${shortname}" != "dst" ] && [ "${shortname}" != "pz" ] && [ "${engine}" != "renderware" ]; then - fn_info_message_commandlineparms - fi - fn_info_message_ports_edit - fn_info_message_ports - fn_info_message_select_engine - fn_info_message_statusbottom - } | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" | tee -a "${postdetailslog}" > /dev/null 2>&1 -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}" - -if [ "${firstcommandname}" == "POST-DETAILS" ]; then - echo -e "" - echo -e "Please share the following url for support: " - echo -e "${pdurl}" -fi -fn_script_log_info "${pdurl}" -alerturl="${pdurl}" - -if [ -z "${exitbypass}" ]; then - core_exit.sh -fi diff --git a/lgsm/functions/command_restart.sh b/lgsm/functions/command_restart.sh deleted file mode 100644 index 3bf60c32c..000000000 --- a/lgsm/functions/command_restart.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -# LinuxGSM command_restart.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Restarts the server. - -commandname="MODS-INSTALL" -commandaction="Restarting" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_firstcommand_set - -info_game.sh -exitbypass=1 -command_stop.sh -command_start.sh -fn_firstcommand_reset -core_exit.sh diff --git a/lgsm/functions/command_send.sh b/lgsm/functions/command_send.sh deleted file mode 100644 index d65212571..000000000 --- a/lgsm/functions/command_send.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash -# LinuxGSM command_send.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Send command to the server tmux console. - -commandname="SEND" -commandaction="Send" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_firstcommand_set - -check.sh -if [ -z "${userinput2}" ]; then - fn_print_header - fn_print_information_nl "Send a command to the console." -fi - -check_status.sh -if [ "${status}" != "0" ]; then - if [ -n "${userinput2}" ]; then - commandtosend="${userinput2}" - else - echo "" - commandtosend=$(fn_prompt_message "send: ") - fi - echo "" - fn_print_dots "Sending command to console: \"${commandtosend}\"" - tmux -L "${sessionname}" send-keys -t "${servicename}" "${commandtosend}" ENTER - fn_print_ok_nl "Sending command to console: \"${commandtosend}\"" - 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 -fi - -core_exit.sh diff --git a/lgsm/functions/command_skeleton.sh b/lgsm/functions/command_skeleton.sh deleted file mode 100644 index 53c4ddec5..000000000 --- a/lgsm/functions/command_skeleton.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -# LinuxGSM command_skeleton.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Creates an copy of a game servers directorys. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -fn_print_dots "Creating skeleton directory" -check.sh - -# Find all directorys and create them in the skel directory -find "${rootdir}" -type d -not \( -path ./skel -prune \) | cpio -pdvm skel 2> /dev/null -exitcode=$? -if [ "${exitcode}" != 0 ]; then - fn_print_fail_nl "Creating skeleton directory" - fn_script_log_fatal "Creating skeleton directory" -else - fn_print_ok_nl "Creating skeleton directory: ./skel" - fn_script_log_pass "Creating skeleton directory: ./skel" -fi -core_exit.sh diff --git a/lgsm/functions/command_start.sh b/lgsm/functions/command_start.sh deleted file mode 100644 index 699bc8222..000000000 --- a/lgsm/functions/command_start.sh +++ /dev/null @@ -1,224 +0,0 @@ -#!/bin/bash -# LinuxGSM command_start.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Starts the server. - -commandname="START" -commandaction="Starting" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -addtimestamp="gawk '{ print strftime(\\\"[$logtimestampformat]\\\"), \\\$0 }'" -fn_firstcommand_set - -fn_start_teamspeak3() { - if [ ! -f "${servercfgfullpath}" ]; then - fn_print_warn_nl "${servercfgfullpath} is missing" - fn_script_log_warn "${servercfgfullpath} is missing" - echo " * Creating blank ${servercfg}" - fn_script_log_info "Creating blank ${servercfg}" - fn_sleep_time - echo " * ${servercfg} can remain blank by default." - fn_script_log_info "${servercfgfullpath} can remain blank by default." - fn_sleep_time - echo " * ${servercfg} is located in ${servercfgfullpath}." - fn_script_log_info "${servercfg} is located in ${servercfgfullpath}." - sleep 5 - touch "${servercfgfullpath}" - fi - # Accept license. - if [ ! -f "${executabledir}/.ts3server_license_accepted" ]; then - install_eula.sh - fi - fn_start_tmux -} - -# This will allow the Jedi Knight 2 version to be printed in console on start. -# Used to allow update to detect JK2MV server version. -fn_start_jk2() { - fn_start_tmux - tmux -L "${sessionname}" send -t "${sessionname}" version ENTER > /dev/null 2>&1 -} - -fn_start_tmux() { - if [ "${parmsbypass}" ]; then - startparameters="" - fi - # check for tmux size variables. - if [[ "${servercfgtmuxwidth}" =~ ^[0-9]+$ ]]; then - sessionwidth="${servercfgtmuxwidth}" - else - sessionwidth="80" - fi - if [[ "${servercfgtmuxheight}" =~ ^[0-9]+$ ]]; then - sessionheight="${servercfgtmuxheight}" - else - sessionheight="23" - fi - - # Log rotation. - fn_script_log_info "Rotating log files" - if [ "${engine}" == "unreal2" ] && [ -f "${gamelog}" ]; then - mv "${gamelog}" "${gamelogdate}" - fi - if [ -f "${lgsmlog}" ]; then - mv "${lgsmlog}" "${lgsmlogdate}" - fi - if [ -f "${consolelog}" ]; then - mv "${consolelog}" "${consolelogdate}" - fi - - # Create lockfile - date '+%s' > "${lockdir}/${selfname}.lock" - echo "${version}" >> "${lockdir}/${selfname}.lock" - echo "${port}" >> "${lockdir}/${selfname}.lock" - fn_reload_startparameters - - if [ "${shortname}" == "av" ]; then - cd "${systemdir}" || exit - else - cd "${executabledir}" || exit - fi - - tmux -L "${sessionname}" new-session -d -x "${sessionwidth}" -y "${sessionheight}" -s "${sessionname}" "${preexecutable} ${executable} ${startparameters}" 2> "${lgsmlogdir}/.${selfname}-tmux-error.tmp" - - # Create logfile. - touch "${consolelog}" - - # Create last start lock file - date +%s > "${lockdir}/${selfname}-laststart.lock" - - # tmux compiled from source will return "master", therefore ignore it. - if [ "${tmuxv}" == "master" ]; then - fn_script_log "tmux version: master (user compiled)" - echo -e "tmux version: master (user compiled)" >> "${consolelog}" - if [ "${consolelogging}" == "on" ] || [ -z "${consolelogging}" ]; then - if [ "$logtimestamp" == "on" ]; then - tmux -L "${sessionname}" pipe-pane -o -t "${sessionname}" "exec bash -c \"cat | $addtimestamp\" >> '${consolelog}'" - else - tmux -L "${sessionname}" pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'" - fi - fi - - elif [ -n "${tmuxv}" ]; then - # tmux pipe-pane not supported in tmux versions < 1.6. - if [ "${tmuxvdigit}" -lt "16" ]; then - echo -e "Console logging disabled: tmux => 1.6 required - https://linuxgsm.com/tmux-upgrade - Currently installed: $(tmux -V)" > "${consolelog}" - - # Console logging disabled: Bug in tmux 1.8 breaks logging. - elif [ "${tmuxvdigit}" -eq "18" ]; then - echo -e "Console logging disabled: Bug in tmux 1.8 breaks logging - https://linuxgsm.com/tmux-upgrade - Currently installed: $(tmux -V)" > "${consolelog}" - # Console logging enable or not set. - elif [ "${consolelogging}" == "on" ] || [ -z "${consolelogging}" ]; then - if [ "$logtimestamp" == "on" ]; then - tmux pipe-pane -o -t "${sessionname}" "exec bash -c \"cat | $addtimestamp\" >> '${consolelog}'" - else - tmux pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'" - fi - fi - else - echo -e "Unable to detect tmux version" >> "${consolelog}" - fn_script_log_warn "Unable to detect tmux version" - fi - - # Console logging disabled. - if [ "${consolelogging}" == "off" ]; then - echo -e "Console logging disabled by user" >> "${consolelog}" - fn_script_log_info "Console logging disabled by user" - fi - fn_sleep_time - - # If the server fails to start. - check_status.sh - if [ "${status}" == "0" ]; then - fn_print_fail_nl "Unable to start ${servername}" - fn_script_log_fatal "Unable to start ${servername}" - if [ -s "${lgsmlogdir}/.${selfname}-tmux-error.tmp" ]; then - fn_print_fail_nl "Unable to start ${servername}: tmux error:" - fn_script_log_fatal "Unable to start ${servername}: tmux error:" - echo -e "" - echo -e "Command" - echo -e "=================================" - echo -e "tmux -L \"${sessionname}\" new-session -d -s \"${sessionname}\" \"${preexecutable} ${executable} ${startparameters}\"" | tee -a "${lgsmlog}" - echo -e "" - echo -e "Error" - echo -e "=================================" - tee -a "${lgsmlog}" < "${lgsmlogdir}/.${selfname}-tmux-error.tmp" - - # Detected error https://linuxgsm.com/support - if grep -c "Operation not permitted" "${lgsmlogdir}/.${selfname}-tmux-error.tmp"; then - echo -e "" - echo -e "Fix" - echo -e "=================================" - if ! grep "tty:" /etc/group | grep "$(whoami)"; then - echo -e "$(whoami) is not part of the tty group." - fn_script_log_info "$(whoami) is not part of the tty group." - group=$(grep tty /etc/group) - echo -e "" - echo -e " ${group}" - fn_script_log_info "${group}" - echo -e "" - echo -e "Run the following command with root privileges." - echo -e "" - echo -e " usermod -G tty $(whoami)" - echo -e "" - echo -e "https://linuxgsm.com/tmux-op-perm" - fn_script_log_info "https://linuxgsm.com/tmux-op-perm" - else - echo -e "No known fix currently. Please log an issue." - fn_script_log_info "No known fix currently. Please log an issue." - echo -e "https://linuxgsm.com/support" - fn_script_log_info "https://linuxgsm.com/support" - fi - fi - fi - core_exit.sh - else - fn_print_ok "${servername}" - fn_script_log_pass "Started ${servername}" - fi - rm -f "${lgsmlogdir:?}/.${selfname}-tmux-error.tmp" 2> /dev/null - echo -en "\n" -} - -check.sh - -# Is the server already started. -# $status comes from check_status.sh, which is run by check.sh for this command -if [ "${status}" != "0" ]; then - fn_print_dots "${servername}" - fn_print_info_nl "${servername} is already running" - fn_script_log_error "${servername} is already running" - if [ -z "${exitbypass}" ]; then - core_exit.sh - fi -fi -if [ -z "${fixbypass}" ]; then - fix.sh -fi -info_game.sh -core_logs.sh - -# Will check for updates is updateonstart is yes. -if [ "${updateonstart}" == "yes" ] || [ "${updateonstart}" == "1" ] || [ "${updateonstart}" == "on" ]; then - exitbypass=1 - unset updateonstart - command_update.sh - fn_firstcommand_reset -fi - -fn_print_dots "${servername}" - -if [ "${shortname}" == "ts3" ]; then - fn_start_teamspeak3 -elif [ "${shortname}" == "jk2" ]; then - fn_start_jk2 -else - fn_start_tmux -fi - -core_exit.sh diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh deleted file mode 100644 index 92785af98..000000000 --- a/lgsm/functions/command_stop.sh +++ /dev/null @@ -1,283 +0,0 @@ -#!/bin/bash -# LinuxGSM command_stop.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Stops the server. - -commandname="STOP" -commandaction="Stopping" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_firstcommand_set - -# Attempts graceful shutdown by sending 'CTRL+c'. -fn_stop_graceful_ctrlc() { - fn_print_dots "Graceful: CTRL+c" - fn_script_log_info "Graceful: CTRL+c" - # Sends quit. - tmux -L "${sessionname}" send-keys -t "${sessionname}" C-c > /dev/null 2>&1 - # Waits up to 30 seconds giving the server time to shutdown gracefuly. - for seconds in {1..30}; do - check_status.sh - if [ "${status}" == "0" ]; then - fn_print_ok "Graceful: CTRL+c: ${seconds}: " - fn_print_ok_eol_nl - fn_script_log_pass "Graceful: CTRL+c: OK: ${seconds} seconds" - break - fi - sleep 1 - fn_print_dots "Graceful: CTRL+c: ${seconds}" - done - check_status.sh - if [ "${status}" != "0" ]; then - fn_print_error "Graceful: CTRL+c: " - fn_print_fail_eol_nl - fn_script_log_error "Graceful: CTRL+c: FAIL" - fi -} - -# Attempts graceful shutdown by sending a specified command. -# Usage: fn_stop_graceful_cmd "console_command" "timeout_in_seconds" -# e.g.: fn_stop_graceful_cmd "quit" "30" -fn_stop_graceful_cmd() { - fn_print_dots "Graceful: sending \"${1}\"" - fn_script_log_info "Graceful: sending \"${1}\"" - # Sends specific stop command. - tmux -L "${sessionname}" send -t "${sessionname}" ENTER "${1}" ENTER > /dev/null 2>&1 - # Waits up to ${seconds} seconds giving the server time to shutdown gracefully. - for ((seconds = 1; seconds <= ${2}; seconds++)); do - check_status.sh - if [ "${status}" == "0" ]; then - fn_print_ok "Graceful: sending \"${1}\": ${seconds}: " - fn_print_ok_eol_nl - fn_script_log_pass "Graceful: sending \"${1}\": OK: ${seconds} seconds" - break - fi - sleep 1 - fn_print_dots "Graceful: sending \"${1}\": ${seconds}" - done - check_status.sh - if [ "${status}" != "0" ]; then - fn_print_error "Graceful: sending \"${1}\": " - fn_print_fail_eol_nl - fn_script_log_error "Graceful: sending \"${1}\": FAIL" - fi -} - -# Attempts graceful shutdown of goldsrc using rcon 'quit' command. -# There is only a 3 second delay before a forced a tmux shutdown -# as GoldSrc servers 'quit' command does a restart rather than shutdown. -fn_stop_graceful_goldsrc() { - fn_print_dots "Graceful: sending \"quit\"" - fn_script_log_info "Graceful: sending \"quit\"" - # sends quit - tmux -L "${sessionname}" send -t "${sessionname}" quit ENTER > /dev/null 2>&1 - # Waits 3 seconds as goldsrc servers restart with the quit command. - for seconds in {1..3}; do - sleep 1 - fn_print_dots "Graceful: sending \"quit\": ${seconds}" - done - fn_print_ok "Graceful: sending \"quit\": ${seconds}: " - fn_print_ok_eol_nl - fn_script_log_pass "Graceful: sending \"quit\": OK: ${seconds} seconds" -} - -# telnet command for sdtd graceful shutdown. -fn_stop_graceful_sdtd_telnet() { - if [ -z "${telnetpass}" ] || [ "${telnetpass}" == "NOT SET" ]; then - sdtd_telnet_shutdown=$(expect -c ' - proc abort {} { - puts "Timeout or EOF\n" - exit 1 - } - spawn telnet '"${telnetip}"' '"${telnetport}"' - expect { - "session." { send "shutdown\r" } - default abort - } - expect { eof } - puts "Completed.\n" - ') - else - sdtd_telnet_shutdown=$(expect -c ' - proc abort {} { - puts "Timeout or EOF\n" - exit 1 - } - spawn telnet '"${telnetip}"' '"${telnetport}"' - expect { - "password:" { send "'"${telnetpass}"'\r" } - default abort - } - expect { - "session." { send "shutdown\r" } - default abort - } - expect { eof } - puts "Completed.\n" - ') - fi -} - -# Attempts graceful shutdown of 7 Days To Die using telnet. -fn_stop_graceful_sdtd() { - fn_print_dots "Graceful: telnet" - fn_script_log_info "Graceful: telnet" - if [ "${telnetenabled}" == "false" ]; then - fn_print_info_nl "Graceful: telnet: DISABLED: Enable in ${servercfg}" - elif [ "$(command -v expect 2> /dev/null)" ]; then - # Tries to shutdown with both localhost and server IP. - for telnetip in 127.0.0.1 ${ip}; do - fn_print_dots "Graceful: telnet: ${telnetip}:${telnetport}" - fn_script_log_info "Graceful: telnet: ${telnetip}:${telnetport}" - fn_stop_graceful_sdtd_telnet - completed=$(echo -en "\n ${sdtd_telnet_shutdown}" | grep "Completed.") - refused=$(echo -en "\n ${sdtd_telnet_shutdown}" | grep "Timeout or EOF") - if [ "${refused}" ]; then - fn_print_error "Graceful: telnet: ${telnetip}:${telnetport} : " - fn_print_fail_eol_nl - fn_script_log_error "Graceful: telnet: ${telnetip}:${telnetport} : FAIL" - elif [ "${completed}" ]; then - break - fi - done - - # If telnet shutdown was successful will use telnet again to check - # the connection has closed, confirming that the tmux session can now be killed. - if [ "${completed}" ]; then - for seconds in {1..30}; do - fn_stop_graceful_sdtd_telnet - refused=$(echo -en "\n ${sdtd_telnet_shutdown}" | grep "Timeout or EOF") - if [ "${refused}" ]; then - fn_print_ok "Graceful: telnet: ${telnetip}:${telnetport} : " - fn_print_ok_eol_nl - fn_script_log_pass "Graceful: telnet: ${telnetip}:${telnetport} : ${seconds} seconds" - break - fi - sleep 1 - fn_print_dots "Graceful: telnet: ${seconds}" - done - # If telnet shutdown fails tmux shutdown will be used, this risks loss of world save. - else - if [ "${refused}" ]; then - fn_print_error "Graceful: telnet: " - fn_print_fail_eol_nl - fn_script_log_error "Graceful: telnet: ${telnetip}:${telnetport} : FAIL" - else - fn_print_error_nl "Graceful: telnet: Unknown error" - fn_script_log_error "Graceful: telnet: Unknown error" - fi - echo -en "\n" | tee -a "${lgsmlog}" - echo -en "Telnet output:" | tee -a "${lgsmlog}" - echo -en "\n ${sdtd_telnet_shutdown}" | tee -a "${lgsmlog}" - echo -en "\n\n" | tee -a "${lgsmlog}" - fi - else - fn_print_warn "Graceful: telnet: expect not installed: " - fn_print_fail_eol_nl - fn_script_log_warn "Graceful: telnet: expect not installed: FAIL" - fi -} - -# Attempts graceful shutdown by sending /save /stop. -fn_stop_graceful_avorion() { - fn_print_dots "Graceful: /save /stop" - fn_script_log_info "Graceful: /save /stop" - # Sends /save. - tmux -L "${sessionname}" send-keys -t "${sessionname}" /save ENTER > /dev/null 2>&1 - sleep 5 - # Sends /quit. - tmux -L "${sessionname}" send-keys -t "${sessionname}" /stop ENTER > /dev/null 2>&1 - # Waits up to 30 seconds giving the server time to shutdown gracefuly. - for seconds in {1..30}; do - check_status.sh - if [ "${status}" == "0" ]; then - fn_print_ok "Graceful: /save /stop: ${seconds}: " - fn_print_ok_eol_nl - fn_script_log_pass "Graceful: /save /stop: OK: ${seconds} seconds" - break - fi - sleep 1 - fn_print_dots "Graceful: /save /stop: ${seconds}" - done - check_status.sh - if [ "${status}" != "0" ]; then - fn_print_error "Graceful: /save /stop: " - fn_print_fail_eol_nl - fn_script_log_error "Graceful: /save /stop: FAIL" - fi -} - -fn_stop_graceful_select() { - if [ "${stopmode}" == "1" ]; then - fn_stop_tmux - elif [ "${stopmode}" == "2" ]; then - fn_stop_graceful_ctrlc - elif [ "${stopmode}" == "3" ]; then - fn_stop_graceful_cmd "quit" 30 - elif [ "${stopmode}" == "4" ]; then - fn_stop_graceful_cmd "quit" 120 - elif [ "${stopmode}" == "5" ]; then - fn_stop_graceful_cmd "stop" 30 - elif [ "${stopmode}" == "6" ]; then - fn_stop_graceful_cmd "q" 30 - elif [ "${stopmode}" == "7" ]; then - fn_stop_graceful_cmd "exit" 30 - elif [ "${stopmode}" == "8" ]; then - fn_stop_graceful_sdtd - elif [ "${stopmode}" == "9" ]; then - fn_stop_graceful_goldsrc - elif [ "${stopmode}" == "10" ]; then - fn_stop_graceful_avorion - elif [ "${stopmode}" == "11" ]; then - fn_stop_graceful_cmd "end" 30 - elif [ "${stopmode}" == "12" ]; then - fn_stop_graceful_cmd "shutdown" 30 - fi -} - -fn_stop_tmux() { - fn_print_dots "${servername}" - fn_script_log_info "tmux kill-session: ${sessionname}: ${servername}" - # Kill tmux session. - tmux -L "${sessionname}" kill-session -t "${sessionname}" > /dev/null 2>&1 - sleep 0.5 - check_status.sh - if [ "${status}" == "0" ]; then - fn_print_ok_nl "${servername}" - fn_script_log_pass "Stopped ${servername}" - else - fn_print_fail_nl "Unable to stop ${servername}" - fn_script_log_fatal "Unable to stop ${servername}" - fi -} - -# Checks if the server is already stopped. -fn_stop_pre_check() { - if [ "${status}" == "0" ]; then - fn_print_info_nl "${servername} is already stopped" - fn_script_log_error "${servername} is already stopped" - else - # Select graceful shutdown. - fn_stop_graceful_select - fi - # Check status again, a kill tmux session if graceful shutdown failed. - check_status.sh - if [ "${status}" != "0" ]; then - fn_stop_tmux - fi -} - -check.sh -fn_print_dots "${servername}" - -info_game.sh -fn_stop_pre_check -# Remove lockfile. -if [ -f "${lockdir}/${selfname}.lock" ]; then - rm -f "${lockdir:?}/${selfname}.lock" -fi - -if [ -z "${exitbypass}" ]; then - core_exit.sh -fi diff --git a/lgsm/functions/command_test_alert.sh b/lgsm/functions/command_test_alert.sh deleted file mode 100644 index 7fe61e48a..000000000 --- a/lgsm/functions/command_test_alert.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -# LinuxGSM command_test_alert.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Sends a test alert. - -commandname="TEST-ALERT" -commandaction="Sending Alert" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_firstcommand_set - -fn_print_dots "${servername}" -check.sh -info_game.sh -alert="test" -alert.sh - -core_exit.sh diff --git a/lgsm/functions/command_ts3_server_pass.sh b/lgsm/functions/command_ts3_server_pass.sh deleted file mode 100644 index be0816d15..000000000 --- a/lgsm/functions/command_ts3_server_pass.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash -# LinuxGSM command_ts3_server_pass.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Changes TS3 serveradmin password. - -commandname="CHANGE-PASSWORD" -commandaction="Changing password" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_firstcommand_set - -fn_serveradmin_password_prompt() { - fn_print_header - fn_print_information_nl "You are about to change the ${gamename} ServerAdmin password." - fn_print_warning_nl "${gamename} will restart during this process." - echo -e "" - if ! fn_prompt_yn "Continue?" Y; then - exitcode=0 - core_exit.sh - fi - fn_script_log_info "Initiating ${gamename} ServerAdmin password change" - read -rp "Enter new password: " newpassword - fn_print_info_nl "Changing password" - fn_script_log_info "Changing password" -} - -fn_serveradmin_password_set() { - # Start server in "new password mode". - ts3serverpass="1" - exitbypass="1" - command_start.sh - fn_firstcommand_reset - fn_print_ok_nl "New password applied" - fn_script_log_pass "New ServerAdmin password applied" -} - -# Running functions. -check.sh -fn_serveradmin_password_prompt -if [ "${status}" != "0" ]; then - # Stop any running server. - exitbypass="1" - command_stop.sh - fn_firstcommand_reset - fn_serveradmin_password_set - parms="serveradmin_password=\"${newpassword}\" inifile=\"${servercfgfullpath}\" > /dev/null 2>&1" - ts3serverpass="0" - command_restart.sh - fn_firstcommand_reset -else - fn_serveradmin_password_set - command_stop.sh - fn_firstcommand_reset -fi - -core_exit.sh diff --git a/lgsm/functions/command_update.sh b/lgsm/functions/command_update.sh deleted file mode 100644 index ae5c2065c..000000000 --- a/lgsm/functions/command_update.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash -# LinuxGSM command_update.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Handles updating of servers. - -commandname="UPDATE" -commandaction="Updating" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_firstcommand_set - -fn_print_dots "" -check.sh -core_logs.sh -check_last_update.sh - -if [ "${shortname}" == "ts3" ]; then - update_ts3.sh -elif [ "${shortname}" == "mc" ]; then - update_minecraft.sh -elif [ "${shortname}" == "mcb" ]; then - update_minecraft_bedrock.sh -elif [ "${shortname}" == "pmc" ] || [ "${shortname}" == "vpmc" ] || [ "${shortname}" == "wmc" ]; then - update_papermc.sh -elif [ "${shortname}" == "fctr" ]; then - update_factorio.sh -elif [ "${shortname}" == "mta" ]; then - update_mta.sh -elif [ "${shortname}" == "jk2" ]; then - update_jediknight2.sh -elif [ "${shortname}" == "vints" ]; then - update_vintagestory.sh -elif [ "${shortname}" == "ut99" ]; then - update_ut99.sh -else - update_steamcmd.sh -fi - -core_exit.sh diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh deleted file mode 100644 index 569bc7cdb..000000000 --- a/lgsm/functions/command_update_linuxgsm.sh +++ /dev/null @@ -1,236 +0,0 @@ -#!/bin/bash -# LinuxGSM command_update_linuxgsm.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Deletes the functions dir to allow re-downloading of functions from GitHub. - -commandname="UPDATE-LGSM" -commandaction="Updating LinuxGSM" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_firstcommand_set - -check.sh -info_distro.sh - -fn_print_dots "" -fn_script_log_info "Updating LinuxGSM" - -fn_print_dots "Selecting repo" -fn_script_log_info "Selecting repo" -# Select remotereponame -curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh" 1> /dev/null -if [ $? != "0" ]; then - curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh" 1> /dev/null - if [ $? != "0" ]; then - fn_print_fail_nl "Selecting repo: Unable to to access GitHub or Bitbucket repositories" - fn_script_log_fatal "Selecting repo: Unable to to access GitHub or Bitbucket repositories" - core_exit.sh - else - remotereponame="Bitbucket" - fn_print_ok_nl "Selecting repo: ${remotereponame}" - fi -else - remotereponame="GitHub" - fn_print_ok_nl "Selecting repo: ${remotereponame}" -fi - -# Check linuxsm.sh -echo -en "checking ${remotereponame} linuxgsm.sh...\c" -if [ "${remotereponame}" == "GitHub" ]; then - curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh" 1> /dev/null -else - curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh" 1> /dev/null -fi -if [ $? != "0" ]; then - fn_print_fail_eol_nl - fn_script_log_fatal "Checking ${remotereponame} linuxgsm.sh" - fn_script_log_fatal "Curl returned error: $?" - core_exit.sh -fi - -if [ "${remotereponame}" == "GitHub" ]; then - tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(curl --connect-timeout 10 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh")) -else - tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(curl --connect-timeout 10 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh")) -fi - -if [ "${tmp_script_diff}" != "" ]; then - fn_print_update_eol_nl - fn_script_log_update "Checking ${remotereponame} linuxgsm.sh" - rm -f "${tmpdir:?}/linuxgsm.sh" - fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "nochmodx" "norun" "noforcedl" "nohash" -else - fn_print_ok_eol_nl - fn_script_log_pass "Checking ${remotereponame} linuxgsm.sh" -fi - -# Check gameserver.sh -# Compare gameserver.sh against linuxgsm.sh in the tmp dir. -# Ignoring server specific vars. -echo -en "checking ${selfname}...\c" -fn_script_log_info "Checking ${selfname}" -script_diff=$(diff <(sed '\/shortname/d;\/gameservername/d;\/gamename/d;\/githubuser/d;\/githubrepo/d;\/githubbranch/d' "${tmpdir}/linuxgsm.sh") <(sed '\/shortname/d;\/gameservername/d;\/gamename/d;\/githubuser/d;\/githubrepo/d;\/githubbranch/d' "${rootdir}/${selfname}")) -if [ "${script_diff}" != "" ]; then - fn_print_update_eol_nl - fn_script_log_update "Checking ${selfname}" - echo -en "backup ${selfname}...\c" - fn_script_log_info "Backup ${selfname}" - if [ ! -d "${backupdir}/script" ]; then - mkdir -p "${backupdir}/script" - fi - cp "${rootdir}/${selfname}" "${backupdir}/script/${selfname}-$(date +"%m_%d_%Y_%M").bak" - if [ $? != 0 ]; then - fn_print_fail_eol_nl - fn_script_log_fatal "Backup ${selfname}" - core_exit.sh - else - fn_print_ok_eol_nl - fn_script_log_pass "Backup ${selfname}" - echo -e "backup location ${backupdir}/script/${selfname}-$(date +"%m_%d_%Y_%M").bak" - fn_script_log_pass "Backup location ${backupdir}/script/${selfname}-$(date +"%m_%d_%Y_%M").bak" - fi - - echo -en "copying ${selfname}...\c" - fn_script_log_info "copying ${selfname}" - cp "${tmpdir}/linuxgsm.sh" "${rootdir}/${selfname}" - sed -i "s+shortname=\"core\"+shortname=\"${shortname}\"+g" "${rootdir}/${selfname}" - sed -i "s+gameservername=\"core\"+gameservername=\"${gameservername}\"+g" "${rootdir}/${selfname}" - sed -i "s+gamename=\"core\"+gamename=\"${gamename}\"+g" "${rootdir}/${selfname}" - sed -i "s+githubuser=\"GameServerManagers\"+githubuser=\"${githubuser}\"+g" "${rootdir}/${selfname}" - sed -i "s+githubrepo=\"LinuxGSM\"+githubrepo=\"${githubrepo}\"+g" "${rootdir}/${selfname}" - sed -i "s+githubbranch=\"master\"+githubbranch=\"${githubbranch}\"+g" "${rootdir}/${selfname}" - - if [ $? != "0" ]; then - fn_print_fail_eol_nl - fn_script_log_fatal "copying ${selfname}" - core_exit.sh - else - fn_print_ok_eol_nl - fn_script_log_pass "copying ${selfname}" - fi -else - fn_print_ok_eol_nl - fn_script_log_info "Checking ${selfname}" -fi - -# Check _default.cfg. -echo -en "checking ${remotereponame} config _default.cfg...\c" -fn_script_log_info "Checking ${remotereponame} config _default.cfg" -if [ "${remotereponame}" == "GitHub" ]; then - curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg" 1> /dev/null -else - curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg" 1> /dev/null -fi -if [ $? != "0" ]; then - fn_print_fail_eol_nl - fn_script_log_fatal "Checking ${remotereponame} config _default.cfg" - fn_script_log_fatal "Curl returned error: $?" - core_exit.sh -fi - -if [ "${remotereponame}" == "GitHub" ]; then - config_file_diff=$(diff "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" <(curl --connect-timeout 10 -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 --connect-timeout 10 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg")) -fi - -if [ "${config_file_diff}" != "" ]; then - fn_print_update_eol_nl - fn_script_log_update "Checking ${remotereponame} config _default.cfg" - rm -f "${configdirdefault:?}/config-lgsm/${gameservername:?}/_default.cfg" - fn_fetch_file_github "lgsm/config-default/config-lgsm/${gameservername}" "_default.cfg" "${configdirdefault}/config-lgsm/${gameservername}" "nochmodx" "norun" "noforce" "nohash" - alert="config" - alert.sh -else - fn_print_ok_eol_nl - fn_script_log_pass "Checking ${remotereponame} config _default.cfg" -fi - -# Check distro csv. ${datadir}/${distroid}-${distroversioncsv}.csv -if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then - echo -en "checking ${remotereponame} config ${distroid}-${distroversioncsv}.csv...\c" - fn_script_log_info "Checking ${remotereponame} ${distroid}-${distroversioncsv}.csv" - if [ "${remotereponame}" == "GitHub" ]; then - curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv" 1> /dev/null - else - curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv" 1> /dev/null - fi - if [ $? != "0" ]; then - fn_print_fail_eol_nl - fn_script_log_fatal "Checking ${remotereponame} ${distroid}-${distroversioncsv}.csv" - fn_script_log_fatal "Curl returned error: $?" - core_exit.sh - fi - - if [ "${remotereponame}" == "GitHub" ]; then - config_file_diff=$(diff "${datadir}/${distroid}-${distroversioncsv}.csv" <(curl --connect-timeout 10 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv")) - else - config_file_diff=$(diff "${datadir}/${distroid}-${distroversioncsv}.csv" <(curl --connect-timeout 10 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv")) - fi - - if [ "${config_file_diff}" != "" ]; then - fn_print_update_eol_nl - fn_script_log_update "Checking ${remotereponame} ${distroid}-${distroversioncsv}.csv" - rm -f "${datadir:?}/${distroid}-${distroversioncsv}.csv" - fn_fetch_file_github "lgsm/data" "${distroid}-${distroversioncsv}.csv" "${datadir}" "nochmodx" "norun" "noforce" "nohash" - else - fn_print_ok_eol_nl - fn_script_log_pass "Checking ${remotereponame} ${distroid}-${distroversioncsv}.csv" - fi -fi -# Check and update modules. -if [ -n "${functionsdir}" ]; then - if [ -d "${functionsdir}" ]; then - ( - cd "${functionsdir}" || exit - for functionfile in *; do - # check if module exists in the repo and remove if missing. - # commonly used if module names change. - echo -en "checking ${remotereponame} module ${functionfile}...\c" - github_file_url_dir="lgsm/functions" - if [ "${remotereponame}" == "GitHub" ]; then - curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}" 1> /dev/null - else - curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${functionfile}" 1> /dev/null - fi - if [ $? != 0 ]; then - fn_print_error_eol_nl - fn_script_log_error "Checking ${remotereponame} module ${functionfile}" - echo -en "removing module ${functionfile}...\c" - if ! rm -f "${functionfile:?}"; then - fn_print_fail_eol_nl - fn_script_log_fatal "Removing module ${functionfile}" - core_exit.sh - else - fn_print_ok_eol_nl - fn_script_log_pass "Removing module ${functionfile}" - fi - else - # compare file - if [ "${remotereponame}" == "GitHub" ]; then - function_file_diff=$(diff "${functionsdir}/${functionfile}" <(curl --connect-timeout 10 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}")) - else - function_file_diff=$(diff "${functionsdir}/${functionfile}" <(curl --connect-timeout 10 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${functionfile}")) - fi - - # results - if [ "${function_file_diff}" != "" ]; then - fn_print_update_eol_nl - fn_script_log_update "Checking ${remotereponame} module ${functionfile}" - rm -rf "${functionsdir:?}/${functionfile}" - fn_update_function - else - fn_print_ok_eol_nl - fn_script_log_pass "Checking ${remotereponame} module ${functionfile}" - fi - fi - done - ) - fi -fi - -fn_print_ok_nl "Updating functions" -fn_script_log_pass "Updating functions" - -core_exit.sh diff --git a/lgsm/functions/command_validate.sh b/lgsm/functions/command_validate.sh deleted file mode 100644 index 15257a3e2..000000000 --- a/lgsm/functions/command_validate.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash -# LinuxGSM command_validate.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Runs a server validation. - -commandname="VALIDATE" -commandaction="Validating" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_firstcommand_set - -fn_validate() { - fn_print_warn "Validate might overwrite some customised files" - fn_script_log_warn "${commandaction} server: Validate might overwrite some customised files" - totalseconds=3 - for seconds in {3..1}; do - fn_print_warn "Validate might overwrite some customised files: ${totalseconds}" - totalseconds=$((totalseconds - 1)) - sleep 1 - if [ "${seconds}" == "0" ]; then - break - fi - done - fn_print_warn_nl "Validate might overwrite some customised files" - - fn_dl_steamcmd -} - -# The location where the builds are checked and downloaded. -remotelocation="SteamCMD" -check.sh - -fn_print_dots "${remotelocation}" - -if [ "${status}" != "0" ]; then - fn_print_restart_warning - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - fn_validate - exitbypass=1 - command_start.sh - fn_firstcommand_reset -else - fn_validate -fi - -core_exit.sh diff --git a/lgsm/functions/command_wipe.sh b/lgsm/functions/command_wipe.sh deleted file mode 100644 index e1677e827..000000000 --- a/lgsm/functions/command_wipe.sh +++ /dev/null @@ -1,183 +0,0 @@ -#!/bin/bash -# LinuxGSM command_backup.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Wipes server data, useful after updates for some games like Rust. - -commandname="WIPE" -commandaction="Wiping" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_firstcommand_set - -# Provides an exit code upon error. -fn_wipe_exit_code() { - exitcode=$? - if [ "${exitcode}" != 0 ]; then - fn_print_fail_eol_nl - core_exit.sh - else - fn_print_ok_eol_nl - fi -} - -# Removes files to wipe server. -fn_wipe_files() { - fn_print_start_nl "${wipetype}" - fn_script_log_info "${wipetype}" - - # Remove Map files - if [ -n "${serverwipe}" ] || [ -n "${mapwipe}" ]; then - if [ -n "$(find "${serveridentitydir}" -type f -name "*.map")" ]; then - echo -en "removing .map file(s)..." - fn_script_log_info "removing *.map file(s)" - fn_sleep_time - find "${serveridentitydir:?}" -type f -name "*.map" -printf "%f\n" >> "${lgsmlog}" - find "${serveridentitydir:?}" -type f -name "*.map" -delete | tee -a "${lgsmlog}" - fn_wipe_exit_code - else - echo -e "no .map file(s) to remove" - fn_sleep_time - fn_script_log_pass "no .map file(s) to remove" - fi - fi - # Remove Save files. - if [ -n "${serverwipe}" ] || [ -n "${mapwipe}" ]; then - if [ -n "$(find "${serveridentitydir}" -type f -name "*.sav*")" ]; then - echo -en "removing .sav file(s)..." - fn_script_log_info "removing .sav file(s)" - fn_sleep_time - find "${serveridentitydir:?}" -type f -name "*.sav*" -printf "%f\n" >> "${lgsmlog}" - find "${serveridentitydir:?}" -type f -name "*.sav*" -delete - fn_wipe_exit_code - else - echo -e "no .sav file(s) to remove" - fn_script_log_pass "no .sav file(s) to remove" - fn_sleep_time - fi - fi - # Remove db files for full wipe. - # Excluding player.tokens.db for Rust+. - if [ -n "${serverwipe}" ]; then - if [ -n "$(find "${serveridentitydir}" -type f ! -name 'player.tokens.db' -name "*.db")" ]; then - echo -en "removing .db file(s)..." - fn_script_log_info "removing .db file(s)" - fn_sleep_time - find "${serveridentitydir:?}" -type f ! -name 'player.tokens.db' -name "*.db" -printf "%f\n" >> "${lgsmlog}" - find "${serveridentitydir:?}" -type f ! -name 'player.tokens.db' -name "*.db" -delete - fn_wipe_exit_code - else - echo -e "no .db file(s) to remove" - fn_sleep_time - fn_script_log_pass "no .db file(s) to remove" - fi - fi -} - -fn_map_wipe_warning() { - fn_print_warn "Map wipe will reset the map data and keep blueprint data" - fn_script_log_warn "Map wipe will reset the map data and keep blueprint data" - totalseconds=3 - for seconds in {3..1}; do - fn_print_warn "Map wipe will reset the map data and keep blueprint data: ${totalseconds}" - totalseconds=$((totalseconds - 1)) - sleep 1 - if [ "${seconds}" == "0" ]; then - break - fi - done - fn_print_warn_nl "Map wipe will reset the map data and keep blueprint data" -} - -fn_full_wipe_warning() { - fn_print_warn "Server wipe will reset the map data and remove blueprint data" - fn_script_log_warn "Server wipe will reset the map data and remove blueprint data" - totalseconds=3 - for seconds in {3..1}; do - fn_print_warn "Server wipe will reset the map data and remove blueprint data: ${totalseconds}" - totalseconds=$((totalseconds - 1)) - sleep 1 - if [ "${seconds}" == "0" ]; then - break - fi - done - fn_print_warn_nl "Server wipe will reset the map data and remove blueprint data" -} - -# Will change the seed if the seed is not defined by the user. -fn_wipe_random_seed() { - if [ -f "${datadir}/${selfname}-seed.txt" ] && [ -n "${randomseed}" ]; then - shuf -i 1-2147483647 -n 1 > "${datadir}/${selfname}-seed.txt" - seed=$(cat "${datadir}/${selfname}-seed.txt") - randomseed=1 - echo -en "generating new random seed (${cyan}${seed}${default})..." - fn_script_log_pass "Generating new random seed (${cyan}${seed}${default})" - fn_sleep_time - fn_print_ok_eol_nl - fi -} - -# A summary of what wipe is going to do. -fn_wipe_details() { - fn_print_information_nl "Wipe does not remove Rust+ data." - echo -en "* Wipe map data: " - if [ -n "${serverwipe}" ] || [ -n "${mapwipe}" ]; then - fn_print_yes_eol_nl - else - fn_print_no_eol_nl - fi - - echo -en "* Wipe blueprint data: " - if [ -n "${serverwipe}" ]; then - fn_print_yes_eol_nl - else - fn_print_no_eol_nl - fi - - echo -en "* Change Procedural Map seed: " - if [ -n "${randomseed}" ]; then - fn_print_yes_eol_nl - else - fn_print_no_eol_nl - fi -} - -fn_print_dots "" -check.sh -fix_rust.sh - -# Check if there is something to wipe. -if [ -n "$(find "${serveridentitydir}" -type f -name "*.map")" ] || [ -n "$(find "${serveridentitydir}" -type f -name "*.sav*")" ] && [ -n "$(find "${serveridentitydir}" -type f ! -name 'player.tokens.db' -name "*.db")" ]; then - if [ -n "${serverwipe}" ]; then - wipetype="Full wipe" - fn_full_wipe_warning - fn_wipe_details - elif [ -n "${mapwipe}" ]; then - wipetype="Map wipe" - fn_map_wipe_warning - fn_wipe_details - fi - check_status.sh - if [ "${status}" != "0" ]; then - fn_print_restart_warning - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - fn_wipe_files - fn_wipe_random_seed - fn_print_complete_nl "${wipetype}" - fn_script_log_pass "${wipetype}" - exitbypass=1 - command_start.sh - fn_firstcommand_reset - else - fn_wipe_files - fn_wipe_random_seed - fn_print_complete_nl "${wipetype}" - fn_script_log_pass "${wipetype}" - fi -else - fn_print_ok_nl "Wipe not required" - fn_script_log_pass "Wipe not required" -fi -core_exit.sh diff --git a/lgsm/functions/compress_unreal2_maps.sh b/lgsm/functions/compress_unreal2_maps.sh deleted file mode 100644 index 0c32d3c77..000000000 --- a/lgsm/functions/compress_unreal2_maps.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -# LinuxGSM compress_unreal2_maps.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Compresses unreal maps. - -commandname="MAP-COMPRESSOR" -commandaction="Compressing maps" -functionselfname="$(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 diff --git a/lgsm/functions/compress_ut99_maps.sh b/lgsm/functions/compress_ut99_maps.sh deleted file mode 100644 index 9aa074ba9..000000000 --- a/lgsm/functions/compress_ut99_maps.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -# LinuxGSM compress_ut99_maps.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Compresses unreal maps. - -commandname="MAP-COMPRESSOR" -commandaction="Compressing maps" -functionselfname="$(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 diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh deleted file mode 100644 index 53a60cc1a..000000000 --- a/lgsm/functions/core_dl.sh +++ /dev/null @@ -1,625 +0,0 @@ -#!/bin/bash -# LinuxGSM core_dl.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Deals with all downloads for LinuxGSM. - -# remote_fileurl: The URL of the file: http://example.com/dl/File.tar.bz2 -# local_filedir: location the file is to be saved: /home/server/lgsm/tmp -# local_filename: name of file (this can be different from the url name): file.tar.bz2 -# chmodx: Optional, set to "chmodx" to make file executable using chmod +x -# run: Optional, set run to execute the file after download -# forcedl: Optional, force re-download of file even if exists -# hash: Optional, set an hash sum and will compare it against the file. -# -# Downloads can be defined in code like so: -# fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}" -# fn_fetch_file "http://example.com/file.tar.bz2" "http://example.com/file2.tar.bz2" "file.tar.bz2" "file2.tar.bz2" "/some/dir" "file.tar.bz2" "chmodx" "run" "forcedl" "10cd7353aa9d758a075c600a6dd193fd" - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -fn_dl_steamcmd() { - fn_print_start_nl "${remotelocation}" - fn_script_log_info "${commandaction} ${selfname}: ${remotelocation}" - if [ -n "${branch}" ]; then - echo -e "Branch: ${branch}" - fn_script_log_info "Branch: ${branch}" - fi - if [ -n "${betapassword}" ]; then - echo -e "Branch password: ${betapassword}" - fn_script_log_info "Branch password: ${betapassword}" - fi - if [ -d "${steamcmddir}" ]; then - cd "${steamcmddir}" || exit - fi - - # Unbuffer will allow the output of steamcmd not buffer allowing a smooth output. - # unbuffer us part of the expect package. - if [ "$(command -v unbuffer)" ]; then - unbuffer="unbuffer" - fi - - # Validate will be added as a parameter if required. - if [ "${commandname}" == "VALIDATE" ] || [ "${commandname}" == "INSTALL" ]; then - validate="validate" - fi - - # To do error checking for SteamCMD the output of steamcmd will be saved to a log. - steamcmdlog="${lgsmlogdir}/${selfname}-steamcmd.log" - - # clear previous steamcmd log - if [ -f "${steamcmdlog}" ]; then - rm -f "${steamcmdlog:?}" - fi - counter=0 - while [ "${counter}" == "0" ] || [ "${exitcode}" != "0" ]; do - counter=$((counter + 1)) - # Select SteamCMD parameters - # If GoldSrc (appid 90) servers. GoldSrc (appid 90) require extra commands. - if [ "${appid}" == "90" ]; then - # If using a specific branch. - if [ -n "${branch}" ] && [ -n "${betapassword}" ]; then - ${unbuffer} ${steamcmdcommand} +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" - elif [ -n "${branch}" ]; then - ${unbuffer} ${steamcmdcommand} +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" -beta "${branch}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" - else - ${unbuffer} ${steamcmdcommand} +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" - fi - # Force Windows Platform type. - elif [ "${steamcmdforcewindows}" == "yes" ]; then - if [ -n "${branch}" ] && [ -n "${betapassword}" ]; then - ${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" - elif [ -n "${branch}" ]; then - ${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" - else - ${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" - fi - # All other servers. - else - if [ -n "${branch}" ] && [ -n "${betapassword}" ]; then - ${unbuffer} ${steamcmdcommand} +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" - elif [ -n "${branch}" ]; then - ${unbuffer} ${steamcmdcommand} +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" - else - ${unbuffer} ${steamcmdcommand} +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" - fi - fi - - # Error checking for SteamCMD. Some errors will loop to try again and some will just exit. - # Check also if we have more errors than retries to be sure that we do not loop to many times and error out. - exitcode=$? - if [ -n "$(grep -i "Error!" "${steamcmdlog}" | tail -1)" ] && [ "$(grep -ic "Error!" "${steamcmdlog}")" -ge "${counter}" ]; then - # Not enough space. - if [ -n "$(grep "0x202" "${steamcmdlog}" | tail -1)" ]; then - fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files" - fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files" - core_exit.sh - # Not enough space. - elif [ -n "$(grep "0x212" "${steamcmdlog}" | tail -1)" ]; then - fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files" - fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files" - core_exit.sh - # Need tp purchase game. - elif [ -n "$(grep "No subscription" "${steamcmdlog}" | tail -1)" ]; then - fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Steam account does not have a license for the required game" - fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Steam account does not have a license for the required game" - core_exit.sh - # Two-factor authentication failure - elif [ -n "$(grep "Two-factor code mismatch" "${steamcmdlog}" | tail -1)" ]; then - fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Two-factor authentication failure" - fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Two-factor authentication failure" - core_exit.sh - # Incorrect Branch password - elif [ -n "$(grep "Password check for AppId" "${steamcmdlog}" | tail -1)" ]; then - fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: betapassword is incorrect" - fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: betapassword is incorrect" - core_exit.sh - # Update did not finish. - elif [ -n "$(grep "0x402" "${steamcmdlog}" | tail -1)" ] || [ -n "$(grep "0x602" "${steamcmdlog}" | tail -1)" ]; then - fn_print_error2_nl "${commandaction} ${selfname}: ${remotelocation}: Update required but not completed - check network" - fn_script_log_error "${commandaction} ${selfname}: ${remotelocation}: Update required but not completed - check network" - else - fn_print_error2_nl "${commandaction} ${selfname}: ${remotelocation}: Unknown error occured" - echo -en "Please provide content log to LinuxGSM developers https://linuxgsm.com/steamcmd-error" - fn_script_log_error "${commandaction} ${selfname}: ${remotelocation}: Unknown error occured" - fi - elif [ "${exitcode}" != 0 ]; then - fn_print_error2_nl "${commandaction} ${selfname}: ${remotelocation}: Exit code: ${exitcode}" - fn_script_log_error "${commandaction} ${selfname}: ${remotelocation}: Exit code: ${exitcode}" - else - fn_print_complete_nl "${commandaction} ${selfname}: ${remotelocation}" - fn_script_log_pass "${commandaction} ${selfname}: ${remotelocation}" - fi - - if [ "${counter}" -gt "10" ]; then - fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Did not complete the download, too many retrys" - fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Did not complete the download, too many retrys" - core_exit.sh - fi - done -} - -# Emptys contents of the LinuxGSM tmpdir. -fn_clear_tmp() { - echo -en "clearing LinuxGSM tmp directory..." - if [ -d "${tmpdir}" ]; then - rm -rf "${tmpdir:?}/"* - local exitcode=$? - if [ "${exitcode}" != 0 ]; then - fn_print_error_eol_nl - fn_script_log_error "clearing LinuxGSM tmp directory" - else - fn_print_ok_eol_nl - fn_script_log_pass "clearing LinuxGSM tmp directory" - fi - fi -} - -fn_dl_hash() { - # Runs Hash Check if available. - if [ "${hash}" != "0" ] && [ "${hash}" != "nohash" ] && [ "${hash}" != "nomd5" ]; then - # MD5 - if [ "${#hash}" == "32" ]; then - hashbin="md5sum" - hashtype="MD5" - # SHA1 - elif [ "${#hash}" == "40" ]; then - hashbin="sha1sum" - hashtype="SHA1" - # SHA256 - elif [ "${#hash}" == "64" ]; then - hashbin="sha256sum" - hashtype="SHA256" - # SHA512 - elif [ "${#hash}" == "128" ]; then - hashbin="sha512sum" - hashtype="SHA512" - else - fn_script_log_error "hash lengh not known for hash type" - fn_print_error_nl "hash lengh not known for hash type" - core_exit.sh - fi - echo -en "verifying ${local_filename} with ${hashtype}..." - fn_sleep_time - hashsumcmd=$(${hashbin} "${local_filedir}/${local_filename}" | awk '{print $1}') - if [ "${hashsumcmd}" != "${hash}" ]; then - fn_print_fail_eol_nl - echo -e "${local_filename} returned ${hashtype} checksum: ${hashsumcmd}" - echo -e "expected ${hashtype} checksum: ${hash}" - fn_script_log_fatal "Verifying ${local_filename} with ${hashtype}" - fn_script_log_info "${local_filename} returned ${hashtype} checksum: ${hashsumcmd}" - fn_script_log_info "Expected ${hashtype} checksum: ${hash}" - core_exit.sh - else - fn_print_ok_eol_nl - fn_script_log_pass "Verifying ${local_filename} with ${hashtype}" - fn_script_log_info "${local_filename} returned ${hashtype} checksum: ${hashsumcmd}" - fn_script_log_info "Expected ${hashtype} checksum: ${hash}" - fi - fi -} - -# Extracts bzip2, gzip or zip files. -# Extracts can be defined in code like so: -# fn_dl_extract "${local_filedir}" "${local_filename}" "${extractdest}" "${extractsrc}" -# fn_dl_extract "/home/gameserver/lgsm/tmp" "file.tar.bz2" "/home/gamserver/serverfiles" -fn_dl_extract() { - local_filedir="${1}" - local_filename="${2}" - extractdest="${3}" - extractsrc="${4}" - # Extracts archives. - echo -en "extracting ${local_filename}..." - - if [ ! -d "${extractdest}" ]; then - mkdir "${extractdest}" - fi - if [ ! -f "${local_filedir}/${local_filename}" ]; then - fn_print_fail_eol_nl - echo -en "file ${local_filedir}/${local_filename} not found" - fn_script_log_fatal "Extracting ${local_filename}" - fn_script_log_fatal "File ${local_filedir}/${local_filename} not found" - core_exit.sh - fi - mime=$(file -b --mime-type "${local_filedir}/${local_filename}") - if [ "${mime}" == "application/gzip" ] || [ "${mime}" == "application/x-gzip" ]; then - if [ -n "${extractsrc}" ]; then - extractcmd=$(tar -zxf "${local_filedir}/${local_filename}" -C "${extractdest}" --strip-components=1 "${extractsrc}") - else - extractcmd=$(tar -zxf "${local_filedir}/${local_filename}" -C "${extractdest}") - fi - elif [ "${mime}" == "application/x-bzip2" ]; then - if [ -n "${extractsrc}" ]; then - extractcmd=$(tar -jxf "${local_filedir}/${local_filename}" -C "${extractdest}" --strip-components=1 "${extractsrc}") - else - extractcmd=$(tar -jxf "${local_filedir}/${local_filename}" -C "${extractdest}") - fi - elif [ "${mime}" == "application/x-xz" ]; then - if [ -n "${extractsrc}" ]; then - extractcmd=$(tar -Jxf "${local_filedir}/${local_filename}" -C "${extractdest}" --strip-components=1 "${extractsrc}") - else - extractcmd=$(tar -Jxf "${local_filedir}/${local_filename}" -C "${extractdest}") - fi - elif [ "${mime}" == "application/zip" ]; then - if [ -n "${extractsrc}" ]; then - extractcmd=$(unzip -qoj -d "${extractdest}" "${local_filedir}/${local_filename}" "${extractsrc}"/*) - else - extractcmd=$(unzip -qo -d "${extractdest}" "${local_filedir}/${local_filename}") - fi - fi - local exitcode=$? - if [ "${exitcode}" != 0 ]; then - fn_print_fail_eol_nl - fn_script_log_fatal "Extracting ${local_filename}" - if [ -f "${lgsmlog}" ]; then - echo -e "${extractcmd}" >> "${lgsmlog}" - fi - echo -e "${extractcmd}" - core_exit.sh - else - fn_print_ok_eol_nl - fn_script_log_pass "Extracting ${local_filename}" - fi -} - -# Trap to remove file download if canceled before completed. -fn_fetch_trap() { - echo -e "" - echo -en "downloading ${local_filename}..." - fn_print_canceled_eol_nl - fn_script_log_info "Downloading ${local_filename}...CANCELED" - fn_sleep_time - rm -f "${local_filedir:?}/${local_filename}" - echo -en "downloading ${local_filename}..." - fn_print_removed_eol_nl - fn_script_log_info "Downloading ${local_filename}...REMOVED" - core_exit.sh -} - -# Will check a file exists and download it. Will not exit if fails to download. -fn_check_file() { - remote_fileurl="${1}" - remote_fileurl_backup="${2}" - remote_fileurl_name="${3}" - remote_fileurl_backup_name="${4}" - remote_filename="${5}" - # If backup fileurl exists include it. - if [ -n "${remote_fileurl_backup}" ]; then - # counter set to 0 to allow second try - counter=0 - remote_fileurls_array=(remote_fileurl remote_fileurl_backup) - else - # counter set to 1 to not allow second try - counter=1 - remote_fileurls_array=(remote_fileurl) - fi - for remote_fileurl_array in "${remote_fileurls_array[@]}"; do - if [ "${remote_fileurl_array}" == "remote_fileurl" ]; then - fileurl="${remote_fileurl}" - fileurl_name="${remote_fileurl_name}" - elif [ "${remote_fileurl_array}" == "remote_fileurl_backup" ]; then - fileurl="${remote_fileurl_backup}" - fileurl_name="${remote_fileurl_backup_name}" - fi - counter=$((counter + 1)) - echo -en "checking ${fileurl_name} ${remote_filename}...\c" - curlcmd=$(curl --output /dev/null --silent --head --fail "${fileurl}" 2>&1) - local exitcode=$? - - # On first try will error. On second try will fail. - if [ "${exitcode}" != 0 ]; then - if [ ${counter} -ge 2 ]; then - fn_print_fail_eol_nl - if [ -f "${lgsmlog}" ]; then - fn_script_log_fatal "Checking ${remote_filename}" - fn_script_log_fatal "${fileurl}" - checkflag=1 - fi - else - fn_print_error_eol_nl - if [ -f "${lgsmlog}" ]; then - fn_script_log_error "Checking ${remote_filename}" - fn_script_log_error "${fileurl}" - checkflag=2 - fi - fi - else - fn_print_ok_eol - echo -en "\033[2K\\r" - if [ -f "${lgsmlog}" ]; then - fn_script_log_pass "Checking ${remote_filename}" - checkflag=0 - fi - break - fi - done - - if [ -f "${local_filedir}/${local_filename}" ]; then - fn_dl_hash - # Execute file if run is set. - if [ "${run}" == "run" ]; then - # shellcheck source=/dev/null - source "${local_filedir}/${local_filename}" - fi - fi -} - -fn_fetch_file() { - remote_fileurl="${1}" - remote_fileurl_backup="${2}" - remote_fileurl_name="${3}" - remote_fileurl_backup_name="${4}" - local_filedir="${5}" - local_filename="${6}" - chmodx="${7:-0}" - run="${8:-0}" - forcedl="${9:-0}" - hash="${10:-0}" - - # Download file if missing or download forced. - if [ ! -f "${local_filedir}/${local_filename}" ] || [ "${forcedl}" == "forcedl" ]; then - # If backup fileurl exists include it. - if [ -n "${remote_fileurl_backup}" ]; then - # counter set to 0 to allow second try - counter=0 - remote_fileurls_array=(remote_fileurl remote_fileurl_backup) - else - # counter set to 1 to not allow second try - counter=1 - remote_fileurls_array=(remote_fileurl) - fi - for remote_fileurl_array in "${remote_fileurls_array[@]}"; do - if [ "${remote_fileurl_array}" == "remote_fileurl" ]; then - fileurl="${remote_fileurl}" - fileurl_name="${remote_fileurl_name}" - elif [ "${remote_fileurl_array}" == "remote_fileurl_backup" ]; then - fileurl="${remote_fileurl_backup}" - fileurl_name="${remote_fileurl_backup_name}" - fi - counter=$((counter + 1)) - if [ ! -d "${local_filedir}" ]; then - mkdir -p "${local_filedir}" - fi - # Trap will remove part downloaded files if canceled. - trap fn_fetch_trap INT - curlcmd=(curl --connect-timeout 10 --fail -L -o "${local_filedir}/${local_filename}" --retry 2) - - # if is large file show progress, else be silent - local exitcode="" - large_files=("bz2" "gz" "zip" "jar" "xz") - if grep -qE "(^|\s)${local_filename##*.}(\s|$)" <<< "${large_files[@]}"; then - echo -en "downloading ${local_filename}..." - fn_sleep_time - echo -en "\033[1K" - "${curlcmd[@]}" --progress-bar "${fileurl}" 2>&1 - exitcode="$?" - else - echo -en "fetching ${fileurl_name} ${local_filename}...\c" - "${curlcmd[@]}" --silent --show-error "${fileurl}" 2>&1 - exitcode="$?" - fi - - # Download will fail if downloads a html file. - if [ -f "${local_filedir}/${local_filename}" ]; then - if head -n 1 "${local_filedir}/${local_filename}" | grep -q "DOCTYPE"; then - rm "${local_filedir:?}/${local_filename:?}" - local exitcode=2 - fi - fi - - # On first try will error. On second try will fail. - if [ "${exitcode}" != 0 ]; then - if [ ${counter} -ge 2 ]; then - fn_print_fail_eol_nl - if [ -f "${lgsmlog}" ]; then - fn_script_log_fatal "Downloading ${local_filename}..." - fn_script_log_fatal "${fileurl}" - fi - core_exit.sh - else - fn_print_error_eol_nl - if [ -f "${lgsmlog}" ]; then - fn_script_log_error "Downloading ${local_filename}..." - fn_script_log_error "${fileurl}" - fi - fi - else - fn_print_ok_eol_nl - if [ -f "${lgsmlog}" ]; then - fn_script_log_pass "Downloading ${local_filename}..." - fi - - # Make file executable if chmodx is set. - if [ "${chmodx}" == "chmodx" ]; then - chmod +x "${local_filedir}/${local_filename}" - fi - - # Remove trap. - trap - INT - - break - fi - done - fi - - if [ -f "${local_filedir}/${local_filename}" ]; then - fn_dl_hash - # Execute file if run is set. - if [ "${run}" == "run" ]; then - # shellcheck source=/dev/null - source "${local_filedir}/${local_filename}" - fi - fi -} - -# GitHub file download functions. -# Used to simplify downloading specific files from GitHub. - -# github_fileurl_dir: the directory of the file in the GitHub: lgsm/functions -# github_fileurl_name: the filename of the file to download from GitHub: core_messages.sh -# githuburl: the full GitHub url - -# remote_fileurl: The URL of the file: http://example.com/dl/File.tar.bz2 -# local_filedir: location the file is to be saved: /home/server/lgsm/tmp -# local_filename: name of file (this can be different from the url name): file.tar.bz2 -# chmodx: Optional, set to "chmodx" to make file executable using chmod +x -# run: Optional, set run to execute the file after download -# forcedl: Optional, force re-download of file even if exists -# hash: Optional, set an hash sum and will compare it against the file. - -# Fetches files from the Git repo. -fn_fetch_file_github() { - github_fileurl_dir="${1}" - github_fileurl_name="${2}" - # For legacy versions - code can be removed at a future date - if [ "${legacymode}" == "1" ]; then - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" - # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. - elif [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}" - else - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" - fi - remote_fileurl_name="GitHub" - remote_fileurl_backup_name="Bitbucket" - local_filedir="${3}" - local_filename="${github_fileurl_name}" - chmodx="${4:-0}" - run="${5:-0}" - forcedl="${6:-0}" - hash="${7:-0}" - # Passes vars to the file download function. - fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}" -} - -fn_check_file_github() { - github_fileurl_dir="${1}" - github_fileurl_name="${2}" - if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}" - else - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" - fi - remote_fileurl_name="GitHub" - remote_fileurl_backup_name="Bitbucket" - fn_check_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${github_fileurl_name}" -} - -# Fetches config files from the Git repo. -fn_fetch_config() { - github_fileurl_dir="${1}" - github_fileurl_name="${2}" - # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. - if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}" - else - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" - fi - remote_fileurl_name="GitHub" - remote_fileurl_backup_name="Bitbucket" - local_filedir="${3}" - local_filename="${4}" - chmodx="nochmodx" - run="norun" - forcedl="noforce" - hash="nohash" - # Passes vars to the file download function. - fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}" -} - -# Fetches modules from the Git repo during first download. -fn_fetch_function() { - github_fileurl_dir="lgsm/functions" - github_fileurl_name="${functionfile}" - # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. - if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}" - else - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" - fi - remote_fileurl_name="GitHub" - remote_fileurl_backup_name="Bitbucket" - local_filedir="${functionsdir}" - local_filename="${github_fileurl_name}" - chmodx="chmodx" - run="run" - forcedl="noforce" - hash="nohash" - # Passes vars to the file download function. - fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}" -} - -# Fetches modules from the Git repo during update-lgsm. -fn_update_function() { - github_fileurl_dir="lgsm/functions" - github_fileurl_name="${functionfile}" - # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. - if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}" - else - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" - fi - remote_fileurl_name="GitHub" - remote_fileurl_backup_name="Bitbucket" - local_filedir="${functionsdir}" - local_filename="${github_fileurl_name}" - chmodx="chmodx" - run="norun" - forcedl="noforce" - hash="nohash" - # Passes vars to the file download function. - fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}" - -} - -# Function to download latest github release. -# $1 GitHub user / organisation. -# $2 Repo name. -# $3 Destination for download. -# $4 Search string in releases (needed if there are more files that can be downloaded from the release pages). -fn_dl_latest_release_github() { - local githubreleaseuser="${1}" - local githubreleaserepo="${2}" - local githubreleasedownloadpath="${3}" - local githubreleasesearch="${4}" - local githublatestreleaseurl="https://api.github.com/repos/${githubreleaseuser}/${githubreleaserepo}/releases/latest" - - # Get last github release. - # If no search for the release filename is set, just get the first file from the latest release. - if [ -z "${githubreleasesearch}" ]; then - githubreleaseassets=$(curl -s "${githublatestreleaseurl}" | jq '[ .assets[] ]') - else - githubreleaseassets=$(curl -s "${githublatestreleaseurl}" | jq "[ .assets[]|select(.browser_download_url | contains(\"${githubreleasesearch}\")) ]") - fi - - # Check how many releases we got from the api and exit if we have more then one. - if [ "$(echo -e "${githubreleaseassets}" | jq '. | length')" -gt 1 ]; then - fn_print_fatal_nl "Found more than one release to download - Please report this to the LinuxGSM issue tracker" - fn_script_log_fatal "Found more than one release to download - Please report this to the LinuxGSM issue tracker" - else - # Set variables for download via fn_fetch_file. - githubreleasefilename=$(echo -e "${githubreleaseassets}" | jq -r '.[]name') - githubreleasedownloadlink=$(echo -e "${githubreleaseassets}" | jq -r '.[]browser_download_url') - - # Error if no version is there. - if [ -z "${githubreleasefilename}" ]; then - fn_print_fail_nl "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" - fn_script_log_fatal "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" - else - # Fetch file from the remote location from the existing function to the ${tmpdir} for now. - fn_fetch_file "${githubreleasedownloadlink}" "" "${githubreleasefilename}" "" "${githubreleasedownloadpath}" "${githubreleasefilename}" - fi - fi -} diff --git a/lgsm/functions/core_exit.sh b/lgsm/functions/core_exit.sh deleted file mode 100644 index 95d9d8cae..000000000 --- a/lgsm/functions/core_exit.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash -# LinuxGSM core_exit.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Handles exiting of LinuxGSM by running and reporting an exit code. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -fn_exit_dev_debug() { - if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "" - echo -e "${functionselfname} exiting with code: ${exitcode}" - if [ -f "${rootdir}/dev-debug.log" ]; then - grep "functionfile=" "${rootdir}/dev-debug.log" | sed 's/functionfile=//g' > "${rootdir}/dev-debug-function-order.log" - fi - fi -} - -# If running dependency check as root will remove any files that belong to root user. -if [ "$(whoami)" == "root" ] && [ ! -f /.dockerenv ]; then - find "${lgsmdir}"/ -group root -prune -exec rm -rf {} + > /dev/null 2>&1 - find "${logdir}"/ -group root -prune -exec rm -rf {} + > /dev/null 2>&1 -fi - -if [ "${exitbypass}" ]; then - unset exitbypass -elif [ "${exitcode}" != "0" ]; then - # List LinuxGSM version in logs - fn_script_log_info "LinuxGSM version: ${version}" - if [ "${exitcode}" == "1" ]; then - fn_script_log_fatal "${functionselfname} exiting with code: ${exitcode}" - elif [ "${exitcode}" == "2" ]; then - fn_script_log_error "${functionselfname} exiting with code: ${exitcode}" - elif [ "${exitcode}" == "3" ]; then - fn_script_log_warn "${functionselfname} exiting with code: ${exitcode}" - else - fn_script_log_warn "${functionselfname} exiting with code: ${exitcode}" - fi - fn_exit_dev_debug - # remove trap. - trap - INT - exit "${exitcode}" -elif [ "${exitcode}" ] && [ "${exitcode}" == "0" ]; then - # List LinuxGSM version in logs - fn_script_log_info "LinuxGSM version: ${version}" - fn_script_log_pass "${functionselfname} exiting with code: ${exitcode}" - fn_exit_dev_debug - # remove trap. - trap - INT - exit "${exitcode}" -else - # List LinuxGSM version in logs - fn_script_log_info "LinuxGSM version: ${version}" - fn_print_error "No exit code set" - fn_script_log_pass "${functionselfname} exiting with code: NOT SET" - fn_exit_dev_debug - # remove trap. - trap - INT - exit "${exitcode}" -fi diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh deleted file mode 100644 index b301b7e46..000000000 --- a/lgsm/functions/core_functions.sh +++ /dev/null @@ -1,816 +0,0 @@ -#!/bin/bash -# LinuxGSM core_functions.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Defines all functions to allow download and execution of functions using fn_fetch_function. -# This function is called first before any other function. Without this file other functions will not load. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -modulesversion="v23.2.3" - -# Core - -core_dl.sh() { - functionfile="${FUNCNAME[0]}" - if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then - fn_fetch_core_dl "lgsm/functions" "core_dl.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" - else - fn_bootstrap_fetch_file_github "lgsm/functions" "core_dl.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" - fi -} - -core_messages.sh() { - functionfile="${FUNCNAME[0]}" - if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then - fn_fetch_core_dl "lgsm/functions" "core_messages.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" - else - fn_bootstrap_fetch_file_github "lgsm/functions" "core_messages.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" - fi -} - -core_legacy.sh() { - functionfile="${FUNCNAME[0]}" - if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then - fn_fetch_core_dl "lgsm/functions" "core_legacy.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" - else - fn_bootstrap_fetch_file_github "lgsm/functions" "core_legacy.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" - fi -} - -core_exit.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -core_getopt.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -core_trap.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -core_steamcmd.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -core_github.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -# Commands - -command_backup.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_console.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_debug.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_details.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_donate.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_postdetails.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_test_alert.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_monitor.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_start.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_stop.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_validate.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_install.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_install_resources_mta.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_squad_license.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_mods_install.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_mods_update.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_mods_remove.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_fastdl.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_ts3_server_pass.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_restart.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_skeleton.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_wipe.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_send.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -# Checks - -check.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -check_config.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -check_deps.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -check_executable.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -check_glibc.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -check_ip.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -check_last_update.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -check_logs.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -check_permissions.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -check_root.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -check_status.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -check_steamcmd.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -check_system_dir.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -check_system_requirements.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -check_tmuxception.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -check_version.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -# Compress - -compress_unreal2_maps.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -compress_ut99_maps.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -# Mods - -mods_list.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -mods_core.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -# Dev - -command_dev_clear_functions.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_dev_debug.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_dev_detect_deps.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_dev_detect_glibc.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_dev_detect_ldd.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_dev_query_raw.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -# Fix - -fix.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_ark.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_av.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_arma3.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_armar.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_bt.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_bo.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_cmw.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_csgo.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_dst.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_hw.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_ins.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_kf.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_kf2.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_lo.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_mcb.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_mta.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_nmrih.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_onset.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_ro.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_rust.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_rw.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_sfc.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_st.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_steamcmd.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_terraria.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_tf2.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_ut3.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_rust.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_samp.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_sdtd.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_sof2.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_squad.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_ts3.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_ut2k4.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_ut.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_unt.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_vh.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_wurm.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_zmr.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -# Info - -info_distro.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -info_game.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -info_messages.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -info_stats.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -# Alert - -alert.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -alert_discord.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -alert_email.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -alert_ifttt.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -alert_mailgun.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -alert_pushbullet.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -alert_pushover.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -alert_gotify.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -alert_telegram.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -alert_rocketchat.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -alert_slack.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} -# Logs - -core_logs.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -# Query - -query_gamedig.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -# Update - -command_update_functions.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_update_linuxgsm.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_update.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_check_update.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -update_ts3.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -update_minecraft.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -update_minecraft_bedrock.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -update_papermc.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -update_mta.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -update_factorio.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -update_jediknight2.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -update_steamcmd.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -update_vintagestory.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -update_ut99.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fn_update_functions.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -# -## Installer functions -# - -fn_autoinstall() { - autoinstall=1 - command_install.sh -} - -install_complete.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_config.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_factorio_save.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_dst_token.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_eula.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_gsquery.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_gslt.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_header.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_logs.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_retry.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_server_dir.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} -install_server_files.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_stats.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_steamcmd.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_ts3.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_ts3db.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_ut2k4.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_dl_ut2k4.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_ut2k4_key.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -# Calls code required for legacy servers -core_legacy.sh - -# Creates tmp dir if missing -if [ ! -d "${tmpdir}" ]; then - mkdir -p "${tmpdir}" -fi - -# Creates lock dir if missing -if [ ! -d "${lockdir}" ]; then - mkdir -p "${lockdir}" -fi - -# Calls on-screen messages (bootstrap) -core_messages.sh - -#Calls file downloader (bootstrap) -core_dl.sh - -# Calls the global Ctrl-C trap -core_trap.sh diff --git a/lgsm/functions/core_getopt.sh b/lgsm/functions/core_getopt.sh deleted file mode 100644 index 808fe2e2a..000000000 --- a/lgsm/functions/core_getopt.sh +++ /dev/null @@ -1,215 +0,0 @@ -#!/bin/bash -# LinuxGSM core_getopt.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: getopt arguments. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -### Define all commands here. -## User commands | Trigger commands | Description -# Standard commands. -cmd_install=("i;install" "command_install.sh" "Install the server.") -cmd_auto_install=("ai;auto-install" "fn_autoinstall" "Install the server without prompts.") -cmd_start=("st;start" "command_start.sh" "Start the server.") -cmd_stop=("sp;stop" "command_stop.sh" "Stop the server.") -cmd_restart=("r;restart" "command_restart.sh" "Restart the server.") -cmd_details=("dt;details" "command_details.sh" "Display server information.") -cmd_postdetails=("pd;postdetails" "command_postdetails.sh" "Post details to termbin.com (removing passwords).") -cmd_backup=("b;backup" "command_backup.sh" "Create backup archives of the server.") -cmd_update_linuxgsm=("ul;update-lgsm;uf;update-functions" "command_update_linuxgsm.sh" "Check and apply any LinuxGSM updates.") -cmd_test_alert=("ta;test-alert" "command_test_alert.sh" "Send a test alert.") -cmd_monitor=("m;monitor" "command_monitor.sh" "Check server status and restart if crashed.") -cmd_skeleton=("sk;skeleton" "command_skeleton.sh" "Create a skeleton directory.") -cmd_donate=("do;donate" "command_donate.sh" "Donation options.") -cmd_send=("sd;send" "command_send.sh" "Send command to game server console.") -# Console servers only. -cmd_console=("c;console" "command_console.sh" "Access server console.") -cmd_debug=("d;debug" "command_debug.sh" "Start server directly in your terminal.") -# Update servers only. -cmd_update=("u;update" "command_update.sh" "Check and apply any server updates.") -cmd_check_update=("cu;check-update" "command_check_update.sh" "Check if a gameserver update is available") -cmd_force_update=("fu;force-update;update-restart;ur" "forceupdate=1; command_update.sh" "Apply server updates bypassing check.") -# SteamCMD servers only. -cmd_validate=("v;validate" "command_validate.sh" "Validate server files with SteamCMD.") -# Server with mods-install. -cmd_mods_install=("mi;mods-install" "command_mods_install.sh" "View and install available mods/addons.") -cmd_mods_remove=("mr;mods-remove" "command_mods_remove.sh" "View and remove an installed mod/addon.") -cmd_mods_update=("mu;mods-update" "command_mods_update.sh" "Update installed mods/addons.") -# Server specific. -cmd_change_password=("pw;change-password" "command_ts3_server_pass.sh" "Change TS3 serveradmin password.") -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_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.") -cmd_fastdl=("fd;fastdl" "command_fastdl.sh" "Build a FastDL directory.") -# Dev commands. -cmd_dev_debug=("dev;developer" "command_dev_debug.sh" "Enable developer Mode.") -cmd_dev_detect_deps=("dd;detect-deps" "command_dev_detect_deps.sh" "Detect required dependencies.") -cmd_dev_detect_glibc=("dg;detect-glibc" "command_dev_detect_glibc.sh" "Detect required glibc.") -cmd_dev_detect_ldd=("dl;detect-ldd" "command_dev_detect_ldd.sh" "Detect required dynamic dependencies.") -cmd_dev_query_raw=("qr;query-raw" "command_dev_query_raw.sh" "The raw output of gamedig and gsquery.") -cmd_dev_clear_functions=("cf;clear-functions" "command_dev_clear_functions.sh" "Delete the contents of the functions dir.") - -### Set specific opt here. - -currentopt=("${cmd_start[@]}" "${cmd_stop[@]}" "${cmd_restart[@]}" "${cmd_monitor[@]}" "${cmd_test_alert[@]}" "${cmd_details[@]}" "${cmd_postdetails[@]}" "${cmd_skeleton[@]}") - -# Update LinuxGSM. -currentopt+=("${cmd_update_linuxgsm[@]}") - -# Exclude noupdate games here. -if [ "${shortname}" == "jk2" ] || [ "${engine}" != "idtech3" ]; then - if [ "${shortname}" != "bf1942" ] && [ "${shortname}" != "bfv" ] && [ "${engine}" != "idtech2" ] && [ "${engine}" != "iw2.0" ] && [ "${engine}" != "iw3.0" ] && [ "${engine}" != "quake" ] && [ "${shortname}" != "samp" ] && [ "${shortname}" != "ut2k4" ]; then - currentopt+=("${cmd_update[@]}" "${cmd_check_update[@]}") - # force update for SteamCMD or Multi Theft Auto only. - if [ "${appid}" ] || [ "${shortname}" == "mta" ]; then - currentopt+=("${cmd_force_update[@]}") - fi - fi -fi - -# Validate and check-update command. -if [ "${appid}" ]; then - currentopt+=("${cmd_validate[@]}") -fi - -# Backup. -currentopt+=("${cmd_backup[@]}") - -# Console & Debug. -currentopt+=("${cmd_console[@]}" "${cmd_debug[@]}") - -# Console send. -if [ "${consoleinteract}" == "yes" ]; then - currentopt+=("${cmd_send[@]}") -fi - -## Game server exclusive commands. - -# FastDL command. -if [ "${engine}" == "source" ]; then - currentopt+=("${cmd_fastdl[@]}") -fi - -# TeamSpeak exclusive. -if [ "${shortname}" == "ts3" ]; then - currentopt+=("${cmd_change_password[@]}") -fi - -# Rust exclusive. -if [ "${shortname}" == "rust" ]; then - currentopt+=("${cmd_fullwipe[@]}" "${cmd_mapwipe[@]}") -fi - -# Unreal exclusive. -if [ "${engine}" == "unreal2" ]; then - if [ "${shortname}" == "ut2k4" ]; then - currentopt+=("${cmd_install_cdkey[@]}" "${cmd_map_compressor_u2[@]}") - else - currentopt+=("${cmd_map_compressor_u2[@]}") - fi -fi -if [ "${engine}" == "unreal" ]; then - currentopt+=("${cmd_map_compressor_u99[@]}") -fi - -# DST exclusive. -if [ "${shortname}" == "dst" ]; then - currentopt+=("${cmd_install_dst_token[@]}") -fi - -# MTA exclusive. -if [ "${shortname}" == "mta" ]; then - currentopt+=("${cmd_install_default_resources[@]}") -fi - -# Squad license exclusive. -if [ "${shortname}" == "squad" ]; then - currentopt+=("${cmd_install_squad_license[@]}") -fi - -## Mods commands. -if [ "${engine}" == "source" ] || [ "${shortname}" == "rust" ] || [ "${shortname}" == "hq" ] || [ "${shortname}" == "sdtd" ] || [ "${shortname}" == "cs" ] || [ "${shortname}" == "dod" ] || [ "${shortname}" == "tfc" ] || [ "${shortname}" == "ns" ] || [ "${shortname}" == "ts" ] || [ "${shortname}" == "hldm" ] || [ "${shortname}" == "vh" ]; then - currentopt+=("${cmd_mods_install[@]}" "${cmd_mods_remove[@]}" "${cmd_mods_update[@]}") -fi - -## Installer. -currentopt+=("${cmd_install[@]}" "${cmd_auto_install[@]}") - -## Developer commands. -currentopt+=("${cmd_dev_debug[@]}") -if [ -f ".dev-debug" ]; then - currentopt+=("${cmd_dev_detect_deps[@]}" "${cmd_dev_detect_glibc[@]}" "${cmd_dev_detect_ldd[@]}" "${cmd_dev_query_raw[@]}" "${cmd_dev_clear_functions[@]}") -fi - -## Donate. -currentopt+=("${cmd_donate[@]}") - -### Build list of available commands. -optcommands=() -index="0" -for ((index = "0"; index < ${#currentopt[@]}; index += 3)); do - cmdamount=$(echo -e "${currentopt[index]}" | awk -F ';' '{ print NF }') - for ((cmdindex = 1; cmdindex <= cmdamount; cmdindex++)); do - optcommands+=("$(echo -e "${currentopt[index]}" | awk -F ';' -v x=${cmdindex} '{ print $x }')") - done -done - -# Shows LinuxGSM usage. -fn_opt_usage() { - echo -e "Usage: $0 [option]" - echo -e "" - echo -e "LinuxGSM - ${gamename} - Version ${version}" - echo -e "https://linuxgsm.com/${gameservername}" - echo -e "" - echo -e "${lightyellow}Commands${default}" - # Display available commands. - index="0" - { - for ((index = "0"; index < ${#currentopt[@]}; index += 3)); do - # Hide developer commands. - if [ "${currentopt[index + 2]}" != "DEVCOMMAND" ]; then - echo -e "${cyan}$(echo -e "${currentopt[index]}" | awk -F ';' '{ print $2 }')\t${default}$(echo -e "${currentopt[index]}" | awk -F ';' '{ print $1 }')\t| ${currentopt[index + 2]}" - fi - done - } | column -s $'\t' -t - fn_script_log_pass "Display commands" - core_exit.sh -} - -# Check if command existw and run corresponding scripts, or display script usage. -if [ -z "${getopt}" ]; then - fn_opt_usage -fi -# If command exists. -for i in "${optcommands[@]}"; do - if [ "${i}" == "${getopt}" ]; then - # Seek and run command. - index="0" - for ((index = "0"; index < ${#currentopt[@]}; index += 3)); do - currcmdamount=$(echo -e "${currentopt[index]}" | awk -F ';' '{ print NF }') - for ((currcmdindex = 1; currcmdindex <= currcmdamount; currcmdindex++)); do - if [ "$(echo -e "${currentopt[index]}" | awk -F ';' -v x=${currcmdindex} '{ print $x }')" == "${getopt}" ]; then - # Run command. - eval "${currentopt[index + 1]}" - # Exit should occur in modules. Should this not happen print an error - fn_print_error2_nl "Command did not exit correctly: ${getopt}" - fn_script_log_error "Command did not exit correctly: ${getopt}" - core_exit.sh - fi - done - done - fi -done - -# If we're executing this, it means command was not found. -fn_print_error2_nl "Unknown command: $0 ${getopt}" -fn_script_log_error "Unknown command: $0 ${getopt}" -fn_opt_usage -core_exit.sh diff --git a/lgsm/functions/core_github.sh b/lgsm/functions/core_github.sh deleted file mode 100644 index 0462e65bf..000000000 --- a/lgsm/functions/core_github.sh +++ /dev/null @@ -1,114 +0,0 @@ -#!/bin/bash -# LinuxGSM core_github.sh function -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: core function file for updates via github - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -github_api="https://api.github.com" - -fn_githublocalversionfile() { - local githubreleaseuser="${1}" - local githubreleaserepo="${2}" - - githublocalversionfile="${datadir}/github-${githubreleaseuser}-${githubreleaserepo}-version" -} - -# $1 githubuser/group -# $2 github repo name -fn_github_get_latest_release_version() { - local githubreleaseuser="${1}" - local githubreleaserepo="${2}" - local githublatestreleaseurl="${github_api}/repos/${githubreleaseuser}/${githubreleaserepo}/releases/latest" - - githubreleaseversion=$(curl -s --connect-timeout 10 "${githublatestreleaseurl}" | jq '.tag_name') - - # error if no version is there - if [ -z "${githubreleaseversion}" ]; then - fn_print_fail_nl "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" - fn_script_log_fatal "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" - fi -} - -# $1 githubuser/group -# $2 github repo name -fn_github_set_latest_release_version() { - local githubreleaseuser="${1}" - local githubreleaserepo="${2}" - - fn_githublocalversionfile "${githubreleaseuser}" "${githubreleaserepo}" - - local githublatestreleaseurl="${github_api}/repos/${githubreleaseuser}/${githubreleaserepo}/releases/latest" - githubreleaseversion=$(curl -s "${githublatestreleaseurl}" | jq -r '.tag_name') - - # error if no version is there - if [ -z "${githubreleaseversion}" ]; then - fn_print_fail_nl "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" - fn_script_log_fatal "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" - else - echo "${githubreleaseversion}" > "${githublocalversionfile}" - fi -} - -# $1 githubuser/group -# $2 github repo name -fn_github_get_installed_version() { - local githubreleaseuser="${1}" - local githubreleaserepo="${2}" - - fn_githublocalversionfile "${githubreleaseuser}" "${githubreleaserepo}" - - githublocalversion=$(cat "${githublocalversionfile}") -} - -# $1 githubuser/group -# $2 github repo name -# if a update needs to be downloaded - updateneeded is set to 1 -fn_github_compare_version() { - local githubreleaseuser="${1}" - local githubreleaserepo="${2}" - exitcode=0 - updateneeded=0 - - fn_githublocalversionfile "${githubreleaseuser}" "${githubreleaserepo}" - local githublatestreleaseurl="${github_api}/repos/${githubreleaseuser}/${githubreleaserepo}/releases/latest" - - githublocalversion=$(cat "${githublocalversionfile}") - githubreleaseversion=$(curl -s "${githublatestreleaseurl}" | jq '.tag_name') - - # error if no version is there - if [ -z "${githubreleaseversion}" ]; then - fn_print_fail_nl "Can not get version from Github Api for ${githubreleaseuser}/${githubreleaserepo}" - fn_script_log_fatal "Can not get version from Github Api for ${githubreleaseuser}/${githubreleaserepo}" - else - if [ "${githublocalversion}" == "${githubreleaseversion}" ]; then - echo -en "\n" - echo -e "No update from github.com/${githubreleaseuser}/${githubreleaserepo}/ available:" - echo -e "* Local build: ${red}${githublocalversion}${default}" - echo -e "* Remote build: ${green}${githubreleaseversion}${default}" - echo -en "\n" - else - # check if version that is installed is higher than the remote version to not override it - last_version=$(echo -e "${githublocalversion}\n${githubreleaseversion}" | sort -V | head -n1) - if [ "${githubreleaseversion}" == "${last_version}" ]; then - echo -en "\n" - echo -e "Update from github.com/${githubreleaseuser}/${githubreleaserepo}/ available:" - echo -e "* Local build: ${red}${githublocalversion}${default}" - echo -e "* Remote build: ${green}${githubreleaseversion}${default}" - echo -en "\n" - updateneeded=1 - else - # local version is higher than the remote version output this to the user - # strange case but could be possible, as a release could be removed from github - echo -en "\n" - echo -e "Local version is newer than the remote version" - echo -e "* Local version: ${green}${githublocalversion}${default}" - echo -e "* Remote version: ${green}${githubreleaseversion}${default}" - echo -en "\n" - exitcode=1 - fi - fi - fi -} diff --git a/lgsm/functions/core_legacy.sh b/lgsm/functions/core_legacy.sh deleted file mode 100644 index 1cb77258b..000000000 --- a/lgsm/functions/core_legacy.sh +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/bash -# LinuxGSM core_legacy.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Code for backwards compatability with older versions of LinuxGSM. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -# This is to help the transition to v20.3.0 and above -legacy_versions_array=(v20.2.1 v20.2.0 v20.1.5 v20.1.4 v20.1.3 v20.1.2 v20.1.1 v20.1.0 v19.12.5 v19.12.4 v19.12.3 v19.12.2 v19.12.1 v19.12.0) -for legacy_version in "${legacy_versions_array[@]}"; do - if [ "${version}" == "${legacy_version}" ]; then - legacymode=1 - fi -done - -if [ -z "${serverfiles}" ]; then - serverfiles="${filesdir}" -fi - -if [ -z "${logdir}" ]; then - [ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" -fi - -if [ -z "${lgsmlogdir}" ]; then - lgsmlogdir="${scriptlogdir}" -fi - -if [ -z "${lgsmlog}" ]; then - lgsmlog="${scriptlog}" -fi - -if [ -z "${lgsmlogdate}" ]; then - lgsmlogdate="${scriptlogdate}" -fi - -if [ -z "${steamcmddir}" ]; then - steamcmddir="${HOME}/.steam/steamcmd" -fi - -if [ -z "${lgsmdir}" ]; then - lgsmdir="${rootdir}/lgsm" -fi - -if [ -z "${tmpdir}" ]; then - tmpdir="${lgsmdir}/tmp" -fi - -if [ -z "${alertlog}" ]; then - alertlog="${emaillog}" -fi - -if [ -z "${servicename}" ]; then - servicename="${selfname}" -fi - -# Alternations to workshop variables. -if [ -z "${wsapikey}" ]; then - if [ "${workshopauth}" ]; then - wsapikey="${workshopauth}" - elif [ "${authkey}" ]; then - wsapikey="${authkey}" - fi -fi - -if [ -z "${wscollectionid}" ]; then - if [ "${workshopauth}" ]; then - wscollectionid="${ws_collection_id}" - elif [ "${authkey}" ]; then - wscollectionid="${workshopcollectionid}" - fi -fi - -if [ -z "${wsstartmap}" ]; then - if [ "${ws_start_map}" ]; then - wscollectionid="${ws_start_map}" - fi -fi - -fn_parms() { - fn_reload_startparameters - parms="${startparameters}" -} diff --git a/lgsm/functions/core_logs.sh b/lgsm/functions/core_logs.sh deleted file mode 100644 index 1f0e27540..000000000 --- a/lgsm/functions/core_logs.sh +++ /dev/null @@ -1,110 +0,0 @@ -#!/bin/bash -# LinuxGSM core_logs.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Acts as a log rotator, removing old logs. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -# Check if logfile variable and file exist, create logfile if it doesn't exist. -if [ "${consolelog}" ]; then - if [ ! -f "${consolelog}" ]; then - touch "${consolelog}" - fi -fi - -# For games not displaying a console, and having logs into their game directory. -check_status.sh -if [ "${status}" != "0" ] && [ "${commandname}" == "START" ] && [ -n "${gamelogfile}" ]; then - if [ "$(find "${systemdir}" -name "gamelog*.log")" ]; then - fn_print_info "Moving game logs to ${gamelogdir}" - fn_script_log_info "Moving game logs to ${gamelogdir}" - echo -en "\n" - fn_sleep_time - mv "${systemdir}"/gamelog*.log "${gamelogdir}" - fi -fi - -# Log manager will start the cleanup if it finds logs older than "${logdays}". -if [ "$(find "${lgsmlogdir}"/ -type f -mtime +"${logdays}" | wc -l)" -ne "0" ]; then - fn_print_dots "Starting" - # Set common logs directories - commonlogs="${systemdir}/logs" - commonsourcelogs="${systemdir}/*/logs" - # Set addon logs directories - sourcemodlogdir="${systemdir}/addons/sourcemod/logs" - ulxlogdir="${systemdir}/data/ulx_logs" - darkrplogdir="${systemdir}/data/darkrp_logs" - legacyserverlogdir="${logdir}/server" - # Setting up counting variables - scriptcount="0" - consolecount="0" - gamecount="0" - srcdscount="0" - smcount="0" - ulxcount="0" - darkrpcount="0" - legacycount="0" - fn_sleep_time - fn_print_info "Removing logs older than ${logdays} days" - fn_script_log_info "Removing logs older than ${logdays} days" - # Logging logfiles to be removed according to "${logdays}", counting and removing them. - # Script logfiles. - find "${lgsmlogdir}"/ -type f -mtime +"${logdays}" | tee >> "${lgsmlog}" - scriptcount=$(find "${lgsmlogdir}"/ -type f -mtime +"${logdays}" | wc -l) - find "${lgsmlogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \; - # SRCDS and unreal logfiles. - if [ "${engine}" == "unreal2" ] || [ "${engine}" == "source" ]; then - find "${gamelogdir}"/ -type f -mtime +"${logdays}" | tee >> "${lgsmlog}" - gamecount=$(find "${gamelogdir}"/ -type f -mtime +"${logdays}" | wc -l) - find "${gamelogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \; - fi - # Console logfiles. - if [ "${consolelog}" ]; then - find "${consolelogdir}"/ -type f -mtime +"${logdays}" | tee >> "${lgsmlog}" - consolecount=$(find "${consolelogdir}"/ -type f -mtime +"${logdays}" | wc -l) - find "${consolelogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \; - fi - # Common logfiles. - if [ -d "${commonlogs}" ]; then - find "${commonlogs}"/ -type f -mtime +"${logdays}" | tee >> "${lgsmlog}" - smcount=$(find "${commonlogs}"/ -type f -mtime +"${logdays}" | wc -l) - find "${commonlogs}"/ -mtime +"${logdays}" -type f -exec rm -f {} \; - fi - if [ -d "${commonsourcelogs}" ]; then - find "${commonsourcelogs}"/* -type f -mtime +"${logdays}" | tee >> "${lgsmlog}" - smcount=$(find "${commonsourcelogs}"/* -type f -mtime +"${logdays}" | wc -l) - find "${commonsourcelogs}"/* -mtime +"${logdays}" -type f -exec rm -f {} \; - fi - # Source addons logfiles. - if [ "${engine}" == "source" ]; then - # SourceMod logfiles. - if [ -d "${sourcemodlogdir}" ]; then - find "${sourcemodlogdir}"/ -type f -mtime +"${logdays}" | tee >> "${lgsmlog}" - smcount=$(find "${sourcemodlogdir}"/ -type f -mtime +"${logdays}" | wc -l) - find "${sourcemodlogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \; - fi - # Garry's Mod logfiles. - if [ "${shortname}" == "gmod" ]; then - # ULX logfiles. - if [ -d "${ulxlogdir}" ]; then - find "${ulxlogdir}"/ -type f -mtime +"${logdays}" | tee >> "${lgsmlog}" - ulxcount=$(find "${ulxlogdir}"/ -type f -mtime +"${logdays}" | wc -l) - find "${ulxlogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \; - fi - # DarkRP logfiles. - if [ -d "${darkrplogdir}" ]; then - find "${darkrplogdir}"/ -type f -mtime +"${logdays}" | tee >> "${lgsmlog}" - darkrpcount=$(find "${darkrplogdir}"/ -type f -mtime +"${logdays}" | wc -l) - find "${darkrplogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \; - fi - fi - fi - - # Count total amount of files removed. - countlogs=$((scriptcount + consolecount + gamecount + srcdscount + smcount + ulxcount + darkrpcount)) - # Job done. - fn_print_ok "Removed ${countlogs} log files" - fn_script_log "Removed ${countlogs} log files" -fi diff --git a/lgsm/functions/core_messages.sh b/lgsm/functions/core_messages.sh deleted file mode 100644 index 5362dd3d3..000000000 --- a/lgsm/functions/core_messages.sh +++ /dev/null @@ -1,598 +0,0 @@ -#!/bin/bash -# LinuxGSM core_messages.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Defines on-screen messages such as [ OK ] and how script logs look. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -# nl: new line: message is following by a new line. -# eol: end of line: message is placed at the end of the current line. -fn_ansi_loader() { - if [ "${ansi}" != "off" ]; then - # echo colors - default="\e[0m" - black="\e[30m" - red="\e[31m" - lightred="\e[91m" - green="\e[32m" - lightgreen="\e[92m" - yellow="\e[33m" - lightyellow="\e[93m" - blue="\e[34m" - lightblue="\e[94m" - magenta="\e[35m" - lightmagenta="\e[95m" - cyan="\e[36m" - lightcyan="\e[96m" - darkgrey="\e[90m" - lightgrey="\e[37m" - white="\e[97m" - fi - # carriage return & erase to end of line. - creeol="\r\033[K" -} - -fn_sleep_time() { - if [ "${sleeptime}" != "0" ] || [ "${travistest}" != "1" ]; then - if [ -z "${sleeptime}" ]; then - sleeptime=0.5 - fi - sleep "${sleeptime}" - fi -} - -# Log display -######################## -## Feb 28 14:56:58 ut99-server: Monitor: -fn_script_log() { - if [ -d "${lgsmlogdir}" ]; then - if [ -n "${commandname}" ]; then - echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: ${1}" >> "${lgsmlog}" - else - echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${1}" >> "${lgsmlog}" - fi - fi -} - -## Feb 28 14:56:58 ut99-server: Monitor: PASS: -fn_script_log_pass() { - if [ -d "${lgsmlogdir}" ]; then - - if [ -n "${commandname}" ]; then - echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: PASS: ${1}" >> "${lgsmlog}" - else - echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: PASS: ${1}" >> "${lgsmlog}" - fi - fi - exitcode=0 -} - -## Feb 28 14:56:58 ut99-server: Monitor: FATAL: -fn_script_log_fatal() { - if [ -d "${lgsmlogdir}" ]; then - if [ -n "${commandname}" ]; then - echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: FATAL: ${1}" >> "${lgsmlog}" - else - echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: FATAL: ${1}" >> "${lgsmlog}" - fi - fi - exitcode=1 -} - -## Feb 28 14:56:58 ut99-server: Monitor: ERROR: -fn_script_log_error() { - if [ -d "${lgsmlogdir}" ]; then - if [ -n "${commandname}" ]; then - echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: ERROR: ${1}" >> "${lgsmlog}" - else - echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ERROR: ${1}" >> "${lgsmlog}" - fi - fi - exitcode=2 -} - -## Feb 28 14:56:58 ut99-server: Monitor: WARN: -fn_script_log_warn() { - if [ -d "${lgsmlogdir}" ]; then - if [ -n "${commandname}" ]; then - echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: WARN: ${1}" >> "${lgsmlog}" - else - echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: WARN: ${1}" >> "${lgsmlog}" - fi - fi - exitcode=3 -} - -## Feb 28 14:56:58 ut99-server: Monitor: INFO: -fn_script_log_info() { - if [ -d "${lgsmlogdir}" ]; then - if [ -n "${commandname}" ]; then - echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: INFO: ${1}" >> "${lgsmlog}" - else - echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: INFO: ${1}" >> "${lgsmlog}" - fi - fi -} - -## Feb 28 14:56:58 ut99-server: Monitor: UPDATE: -fn_script_log_update() { - if [ -d "${lgsmlogdir}" ]; then - if [ -n "${commandname}" ]; then - echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: UPDATE: ${1}" >> "${lgsmlog}" - else - echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: UPDATE: ${1}" >> "${lgsmlog}" - fi - fi -} - -# On-Screen - Automated functions -################################## - -# [ .... ] -fn_print_dots() { - if [ "${commandaction}" ]; then - echo -en "${creeol}[ .... ] ${commandaction} ${selfname}: $*" - else - echo -en "${creeol}[ .... ] $*" - fi - fn_sleep_time -} - -fn_print_dots_nl() { - if [ "${commandaction}" ]; then - echo -e "${creeol}[ .... ] ${commandaction} ${selfname}: $*" - else - echo -e "${creeol}[ .... ] $*" - fi - fn_sleep_time - echo -en "\n" -} - -# [ OK ] -fn_print_ok() { - if [ "${commandaction}" ]; then - echo -en "${creeol}[${green} OK ${default}] ${commandaction} ${selfname}: $*" - else - echo -en "${creeol}[${green} OK ${default}] $*" - fi - fn_sleep_time -} - -fn_print_ok_nl() { - if [ "${commandaction}" ]; then - echo -en "${creeol}[${green} OK ${default}] ${commandaction} ${selfname}: $*" - else - echo -en "${creeol}[${green} OK ${default}] $*" - fi - fn_sleep_time - echo -en "\n" -} - -# [ FAIL ] -fn_print_fail() { - if [ "${commandaction}" ]; then - echo -en "${creeol}[${red} FAIL ${default}] ${commandaction} ${selfname}: $*" - else - echo -en "${creeol}[${red} FAIL ${default}] $*" - fi - fn_sleep_time -} - -fn_print_fail_nl() { - if [ "${commandaction}" ]; then - echo -en "${creeol}[${red} FAIL ${default}] ${commandaction} ${selfname}: $*" - else - echo -en "${creeol}[${red} FAIL ${default}] $*" - fi - fn_sleep_time - echo -en "\n" -} - -# [ ERROR ] -fn_print_error() { - if [ "${commandaction}" ]; then - echo -en "${creeol}[${red} ERROR ${default}] ${commandaction} ${selfname}: $*" - else - echo -en "${creeol}[${red} ERROR ${default}] $*" - fi - fn_sleep_time -} - -fn_print_error_nl() { - if [ "${commandaction}" ]; then - echo -en "${creeol}[${red} ERROR ${default}] ${commandaction} ${selfname}: $*" - else - echo -en "${creeol}[${red} ERROR ${default}] $*" - fi - fn_sleep_time - echo -en "\n" -} - -# [ WARN ] -fn_print_warn() { - if [ "${commandaction}" ]; then - echo -en "${creeol}[${lightyellow} WARN ${default}] ${commandaction} ${selfname}: $*" - else - echo -en "${creeol}[${lightyellow} WARN ${default}] $*" - fi - fn_sleep_time -} - -fn_print_warn_nl() { - if [ "${commandaction}" ]; then - echo -en "${creeol}[${lightyellow} WARN ${default}] ${commandaction} ${selfname}: $*" - else - echo -en "${creeol}[${lightyellow} WARN ${default}] $*" - fi - fn_sleep_time - echo -en "\n" -} - -# [ INFO ] -fn_print_info() { - if [ "${commandaction}" ]; then - echo -en "${creeol}[${cyan} INFO ${default}] ${commandaction} ${selfname}: $*" - else - echo -en "${creeol}[${cyan} INFO ${default}] $*" - fi - fn_sleep_time -} - -fn_print_info_nl() { - if [ "${commandaction}" ]; then - echo -en "${creeol}[${cyan} INFO ${default}] ${commandaction} ${selfname}: $*" - else - echo -en "${creeol}[${cyan} INFO ${default}] $*" - fi - fn_sleep_time - echo -en "\n" -} - -# [ START ] -fn_print_start() { - if [ "${commandaction}" ]; then - echo -en "${creeol}[${lightgreen} START ${default}] ${commandaction} ${selfname}: $*" - else - echo -en "${creeol}[${lightgreen} START ${default}] $*" - fi - fn_sleep_time -} - -fn_print_start_nl() { - if [ "${commandaction}" ]; then - echo -en "${creeol}[${lightgreen} START ${default}] ${commandaction} ${selfname}: $*" - else - echo -en "${creeol}[${lightgreen} START ${default}] $*" - fi - fn_sleep_time - echo -en "\n" -} - -# On-Screen - Interactive messages -################################## - -# No More Room in Hell Debug -# ================================= -fn_print_header() { - echo -e "" - echo -e "${lightyellow}${gamename} ${commandaction}${default}" - echo -e "=================================${default}" -} - -# Complete! -fn_print_complete() { - echo -en "${green}Complete!${default} $*" - fn_sleep_time -} - -fn_print_complete_nl() { - echo -e "${green}Complete!${default} $*" - fn_sleep_time -} - -# Failure! -fn_print_failure() { - echo -en "${red}Failure!${default} $*" - fn_sleep_time -} - -fn_print_failure_nl() { - echo -e "${red}Failure!${default} $*" - fn_sleep_time -} - -# Error! -fn_print_error2() { - echo -en "${red}Error!${default} $*" - fn_sleep_time -} - -fn_print_error2_nl() { - echo -e "${red}Error!${default} $*" - fn_sleep_time -} - -# Warning! -fn_print_warning() { - echo -en "${lightyellow}Warning!${default} $*" - fn_sleep_time -} - -fn_print_warning_nl() { - echo -e "${lightyellow}Warning!${default} $*" - fn_sleep_time -} - -# Information! -fn_print_information() { - echo -en "${cyan}Information!${default} $*" - fn_sleep_time -} - -fn_print_information_nl() { - echo -e "${cyan}Information!${default} $*" - fn_sleep_time -} - -# Y/N Prompt -fn_prompt_yn() { - local prompt="$1" - local initial="$2" - - if [ "${initial}" == "Y" ]; then - prompt+=" [Y/n] " - elif [ "${initial}" == "N" ]; then - prompt+=" [y/N] " - else - prompt+=" [y/n] " - fi - - while true; do - read -e -i "${initial}" -p "${prompt}" -r yn - case "${yn}" in - [Yy] | [Yy][Ee][Ss]) return 0 ;; - [Nn] | [Nn][Oo]) return 1 ;; - *) echo -e "Please answer yes or no." ;; - esac - done -} - -# Prompt for message -fn_prompt_message() { - while true; do - unset prompt - local prompt="$1" - read -e -p "${prompt}" -r answer - if fn_prompt_yn "Continue" Y; then - break - fi - done - echo "${answer}" -} - -# On-Screen End of Line -################################## - -# YES -fn_print_yes_eol() { - echo -en "${cyan}YES${default}" - fn_sleep_time -} - -fn_print_yes_eol_nl() { - echo -e "${cyan}YES${default}" - fn_sleep_time -} - -# NO -fn_print_no_eol() { - echo -en "${red}NO${default}" - fn_sleep_time -} - -fn_print_no_eol_nl() { - echo -e "${red}NO${default}" - fn_sleep_time -} - -# OK -fn_print_ok_eol() { - echo -en "${green}OK${default}" - fn_sleep_time -} - -fn_print_ok_eol_nl() { - echo -e "${green}OK${default}" - fn_sleep_time -} - -# FAIL -fn_print_fail_eol() { - echo -en "${red}FAIL${default}" - fn_sleep_time -} - -fn_print_fail_eol_nl() { - echo -e "${red}FAIL${default}" - fn_sleep_time -} - -# ERROR -fn_print_error_eol() { - echo -en "${red}ERROR${default}" - fn_sleep_time -} - -fn_print_error_eol_nl() { - echo -e "${red}ERROR${default}" - fn_sleep_time -} - -# WAIT -fn_print_wait_eol() { - echo -en "${cyan}WAIT${default}" - fn_sleep_time -} - -fn_print_wait_eol_nl() { - echo -e "${cyan}WAIT${default}" - fn_sleep_time -} - -# WARN -fn_print_warn_eol() { - echo -en "${lightyellow}WARN${default}" - fn_sleep_time -} - -fn_print_warn_eol_nl() { - echo -e "${lightyellow}WARN${default}" - fn_sleep_time -} - -# INFO -fn_print_info_eol() { - echo -en "${cyan}INFO${default}" - fn_sleep_time -} - -fn_print_info_eol_nl() { - echo -e "${cyan}INFO${default}" - fn_sleep_time -} - -# QUERYING -fn_print_querying_eol() { - echo -en "${cyan}QUERYING${default}" - fn_sleep_time -} - -fn_print_querying_eol_nl() { - echo -e "${cyan}QUERYING${default}" - fn_sleep_time -} - -# CHECKING -fn_print_checking_eol() { - echo -en "${cyan}CHECKING${default}" - fn_sleep_time -} - -fn_print_checking_eol_nl() { - echo -e "${cyan}CHECKING${default}" - fn_sleep_time -} - -# DELAY -fn_print_delay_eol() { - echo -en "${green}DELAY${default}" - fn_sleep_time -} - -fn_print_delay_eol_nl() { - echo -e "${green}DELAY${default}" - fn_sleep_time -} - -# CANCELED -fn_print_canceled_eol() { - echo -en "${lightyellow}CANCELED${default}" - fn_sleep_time -} - -fn_print_canceled_eol_nl() { - echo -e "${lightyellow}CANCELED${default}" - fn_sleep_time -} - -# REMOVED -fn_print_removed_eol() { - echo -en "${red}REMOVED${default}" - fn_sleep_time -} - -fn_print_removed_eol_nl() { - echo -e "${red}REMOVED${default}" - fn_sleep_time -} - -# UPDATE -fn_print_update_eol() { - echo -en "${cyan}UPDATE${default}" - fn_sleep_time -} - -fn_print_update_eol_nl() { - echo -e "${cyan}UPDATE${default}" - fn_sleep_time -} - -fn_print_ascii_logo() { - echo -e "" - echo -e " mdMMMMbm" - echo -e " mMMMMMMMMMMm" - echo -e " mMMMMMMMMMMMMm" - echo -e " mMMMMMMMMMMMMMMm" - echo -e " hMMMV^VMMV^VMMMh" - echo -e " MMMMM MM MMMMM" - echo -e " hMMs vv sMMh" - echo -e " hMMM: :MMMh" - echo -e " .hMMMh hMMMh." - echo -e " -dMMMh ${lightgrey}__${default} hMMMd-" - echo -e " :mMMMs ${lightgrey}||${default} sMMMm:" - echo -e " :MMMM+ ${lightgrey}||${default} ${red}_${default} +NMMN:" - echo -e " .mMMM+ ${lightgrey}========${default} +MMMm." - echo -e " yMMMy ${darkgrey}##############${default} yMMMy" - echo -e " mMMM: ${darkgrey}##############${default} :MMMm" - echo -e " mMM ${lightyellow}nn${default} ${lightyellow}nn${default} ${lightyellow}nn${default} ${lightyellow}nn${default} MMm" - echo -e " o ${lightyellow}nNNNNNNNn${default} ${lightyellow}nNNNNNNNn${default} o" - echo -e " ${lightyellow}nNNNNNNNNNn${default} ${lightyellow}nNNNNNNNNNn${default}" - echo -e " ${lightyellow}nNNNNNNNNNNN${default} ${lightyellow}NNNNNNNNNNNn${default}" - echo -e " ${lightyellow}+NNNNNNNNN:${default} ${lightyellow}:NNNNNNNNN+${default}" - echo -e " ${lightyellow}nNNNNNNN${default} /\ ${lightyellow}NNNNNNNn${default}" - echo -e " ${lightyellow}nnnnn${default} db ${lightyellow}nnnnn${default}" - echo -e "" - echo -e "${lightyellow}888${default} ${lightyellow}d8b${default} ${default}.d8888b. .d8888b. 888b d888" - echo -e "${lightyellow}888 Y8P ${default}d88P Y88b d88P Y88b 8888b d8888" - echo -e "${lightyellow}888${default} ${default}888${default} 888 Y88b. 88888b.d88888" - echo -e "${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}88888b.${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} 888 Y888b. 888Y88888P888" - echo -e "${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}88b${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}Y8bd8P${default} 888 88888 Y88b. 888 Y888P 888" - echo -e "${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}X88K${default} 888 888 888 888 Y8P 888" - echo -e "${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}Y88b${default} ${lightyellow}88Y${default} ${lightyellow}.d8pq8b.${default} Y88b d88P Y88b d88P 888 * 888" - echo -e "${lightyellow}LinuxGSM${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}Y8888Y${default} ${lightyellow}888${default} ${lightyellow}888${default} Y2012P88 Y8888P 888 888" - echo -e "" -} - -fn_print_restart_warning() { - fn_print_warn "${selfname} will be restarted" - fn_script_log_warn "${selfname} will be restarted" - totalseconds=3 - for seconds in {3..1}; do - fn_print_warn "${selfname} will be restarted: ${totalseconds}" - totalseconds=$((totalseconds - 1)) - sleep 1 - if [ "${seconds}" == "0" ]; then - break - fi - done - fn_print_warn_nl "${selfname} will be restarted" -} - -# Functions below are used to ensure that logs and UI correctly reflect the command it is actually running. -# Useful when a command has to call upon another command causing the other command to overrite commandname variables - -# Used to remember the command that ran first. -fn_firstcommand_set() { - if [ -z "${firstcommandname}" ]; then - firstcommandname="${commandname}" - firstcommandaction="${commandaction}" - fi -} - -# Used to reset commandname variables to the command the script ran first. -fn_firstcommand_reset() { - commandname="${firstcommandname}" - commandaction="${firstcommandaction}" -} diff --git a/lgsm/functions/core_modules.sh b/lgsm/functions/core_modules.sh deleted file mode 100644 index 80e890d1a..000000000 --- a/lgsm/functions/core_modules.sh +++ /dev/null @@ -1,816 +0,0 @@ -#!/bin/bash -# LinuxGSM core_modules.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Defines all modules to allow download and execution of modules using fn_fetch_module. -# This module is called first before any other module. Without this file other modules will not load. - -moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -modulesversion="v23.3.1" - -# Core - -core_dl.sh() { - modulefile="${FUNCNAME[0]}" - if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then - fn_fetch_core_dl "lgsm/modules" "core_dl.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" - else - fn_bootstrap_fetch_file_github "lgsm/modules" "core_dl.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" - fi -} - -core_messages.sh() { - modulefile="${FUNCNAME[0]}" - if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then - fn_fetch_core_dl "lgsm/modules" "core_messages.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" - else - fn_bootstrap_fetch_file_github "lgsm/modules" "core_messages.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" - fi -} - -core_legacy.sh() { - modulefile="${FUNCNAME[0]}" - if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then - fn_fetch_core_dl "lgsm/modules" "core_legacy.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" - else - fn_bootstrap_fetch_file_github "lgsm/modules" "core_legacy.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" - fi -} - -core_exit.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -core_getopt.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -core_trap.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -core_steamcmd.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -core_github.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -# Commands - -command_backup.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_console.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_debug.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_details.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_sponsor.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_postdetails.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_test_alert.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_monitor.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_start.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_stop.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_validate.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_install.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_install_resources_mta.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_squad_license.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_mods_install.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_mods_update.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_mods_remove.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_fastdl.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_ts3_server_pass.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_restart.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_skeleton.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_wipe.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_send.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -# Checks - -check.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -check_config.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -check_deps.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -check_executable.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -check_glibc.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -check_ip.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -check_last_update.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -check_logs.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -check_permissions.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -check_root.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -check_status.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -check_steamcmd.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -check_system_dir.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -check_system_requirements.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -check_tmuxception.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -check_version.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -# Compress - -compress_unreal2_maps.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -compress_ut99_maps.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -# Mods - -mods_list.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -mods_core.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -# Dev - -command_dev_clear_modules.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_dev_debug.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_dev_detect_deps.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_dev_detect_glibc.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_dev_detect_ldd.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_dev_query_raw.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -# Fix - -fix.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_ark.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_av.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_arma3.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_armar.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_bt.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_bo.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_cmw.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_csgo.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_dst.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_hw.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_ins.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_kf.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_kf2.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_lo.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_mcb.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_mta.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_nmrih.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_onset.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_ro.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_rust.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_rw.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_sfc.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_st.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_steamcmd.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_terraria.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_tf2.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_ut3.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_rust.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_samp.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_sdtd.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_sof2.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_squad.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_ts3.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_ut2k4.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_ut.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_unt.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_vh.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_wurm.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fix_zmr.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -# Info - -info_distro.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -info_game.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -info_messages.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -info_stats.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -# Alert - -alert.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -alert_discord.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -alert_email.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -alert_ifttt.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -alert_mailgun.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -alert_pushbullet.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -alert_pushover.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -alert_gotify.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -alert_telegram.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -alert_rocketchat.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -alert_slack.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} -# Logs - -core_logs.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -# Query - -query_gamedig.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -# Update - -command_update_modules.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_update_linuxgsm.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_update.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -command_check_update.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -update_ts3.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -update_minecraft.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -update_minecraft_bedrock.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -update_papermc.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -update_mta.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -update_factorio.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -update_jediknight2.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -update_steamcmd.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -update_vintagestory.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -update_ut99.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -fn_update_modules.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -# -## Installer modules -# - -fn_autoinstall() { - autoinstall=1 - command_install.sh -} - -install_complete.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_config.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_factorio_save.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_dst_token.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_eula.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_gsquery.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_gslt.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_header.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_logs.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_retry.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_server_dir.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} -install_server_files.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_stats.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_steamcmd.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_ts3.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_ts3db.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_ut2k4.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_dl_ut2k4.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -install_ut2k4_key.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - -# Calls code required for legacy servers -core_legacy.sh - -# Creates tmp dir if missing -if [ ! -d "${tmpdir}" ]; then - mkdir -p "${tmpdir}" -fi - -# Creates lock dir if missing -if [ ! -d "${lockdir}" ]; then - mkdir -p "${lockdir}" -fi - -# Calls on-screen messages (bootstrap) -core_messages.sh - -#Calls file downloader (bootstrap) -core_dl.sh - -# Calls the global Ctrl-C trap -core_trap.sh diff --git a/lgsm/functions/core_steamcmd.sh b/lgsm/functions/core_steamcmd.sh deleted file mode 100644 index 77dd12d5e..000000000 --- a/lgsm/functions/core_steamcmd.sh +++ /dev/null @@ -1,334 +0,0 @@ -#!/bin/bash -# LinuxGSM core_steamcmd.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Core functions for SteamCMD - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -fn_install_steamcmd() { - if [ "${shortname}" == "ark" ] && [ "${installsteamcmd}" == "1" ]; then - steamcmddir="${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux" - fi - if [ ! -d "${steamcmddir}" ]; then - mkdir -p "${steamcmddir}" - fi - fn_fetch_file "http://media.steampowered.com/client/steamcmd_linux.tar.gz" "" "" "" "${tmpdir}" "steamcmd_linux.tar.gz" "nochmodx" "norun" "noforce" "nohash" - fn_dl_extract "${tmpdir}" "steamcmd_linux.tar.gz" "${steamcmddir}" - chmod +x "${steamcmddir}/steamcmd.sh" -} - -fn_check_steamcmd_user() { - # Checks if steamuser is setup. - if [ "${steamuser}" == "username" ]; then - fn_print_fail_nl "Steam login not set. Update steamuser in ${configdirserver}" - echo -e " * Change steamuser=\"username\" to a valid steam login." - if [ -d "${lgsmlogdir}" ]; then - fn_script_log_fatal "Steam login not set. Update steamuser in ${configdirserver}" - fi - core_exit.sh - fi - # Anonymous user is set if steamuser is missing. - if [ -z "${steamuser}" ]; then - if [ -d "${lgsmlogdir}" ]; then - fn_script_log_info "Login to SteamCMD as: anonymous" - fi - steamuser="anonymous" - steampass='' - else - if [ -d "${lgsmlogdir}" ]; then - fn_script_log_info "Login to SteamCMD as: ${steamuser}" - fi - fi -} - -fn_check_steamcmd() { - # Checks if SteamCMD exists when starting or updating a server. - # Only install if steamcmd package is missing or steamcmd dir is missing. - if [ ! -f "${steamcmddir}/steamcmd.sh" ] && [ -z "$(command -v steamcmd 2> /dev/null)" ]; then - if [ "${commandname}" == "INSTALL" ]; then - fn_install_steamcmd - else - fn_print_warn_nl "SteamCMD is missing" - fn_script_log_warn "SteamCMD is missing" - fn_install_steamcmd - fi - elif [ "${commandname}" == "INSTALL" ]; then - fn_print_information "SteamCMD is already installed..." - fn_print_ok_eol_nl - fi -} - -fn_check_steamcmd_dir() { - # Worksround that pre-installs the correct steam directories to ensure all packages use the correct Standard. - # https://github.com/ValveSoftware/steam-for-linux/issues/6976#issuecomment-610446347 - - # Create Steam installation directory. - if [ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" ]; then - mkdir -p "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" - fi - - # Create common Steam directory. - if [ ! -d "${HOME}/.steam" ]; then - mkdir -p "${HOME}/.steam" - fi - - # Symbolic links to Steam installation directory. - if [ ! -L "${HOME}/.steam/root" ]; then - if [ -d "${HOME}/.steam/root" ]; then - rm -f "${HOME:?}/.steam/root" - fi - ln -s "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" "${HOME}/.steam/root" - fi - - if [ ! -L "${HOME}/.steam/steam" ]; then - if [ -d "${HOME}/.steam/steam" ]; then - rm -rf "${HOME}/.steam/steam" - fi - ln -s "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" "${HOME}/.steam/steam" - fi -} - -fn_check_steamcmd_dir_legacy() { - # Remove old Steam installation directories ~/Steam and ${rootdir}/steamcmd - if [ -d "${rootdir}/steamcmd" ] && [ "${steamcmddir}" == "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" ]; then - rm -rf "${rootdir:?}/steamcmd" - fi - - if [ -d "${HOME}/Steam" ] && [ "${steamcmddir}" == "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" ]; then - rm -rf "${HOME}/Steam" - fi -} - -fn_check_steamcmd_steamapp() { - # Check that steamapp directory fixes issue #3481 - if [ ! -d "${serverfiles}/steamapps" ]; then - mkdir -p "${serverfiles}/steamapps" - fi -} - -fn_check_steamcmd_ark() { - # Checks if SteamCMD exists in - # Engine/Binaries/ThirdParty/SteamCMD/Linux - # to allow ark mods to work - if [ ! -f "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamcmd.sh" ]; then - installsteamcmd=1 - if [ "${commandname}" == "INSTALL" ]; then - fn_install_steamcmd - else - fn_print_warn_nl "ARK mods SteamCMD is missing" - fn_script_log_warn "ARK mods SteamCMD is missing" - fn_install_steamcmd - fi - elif [ "${commandname}" == "INSTALL" ]; then - fn_print_information "ARK mods SteamCMD is already installed..." - fn_print_ok_eol_nl - fi -} - -fn_check_steamcmd_clear() { - # Will remove steamcmd dir if steamcmd package is installed. - if [ "$(command -v steamcmd 2> /dev/null)" ] && [ -d "${rootdir}/steamcmd" ]; then - rm -rf "${steamcmddir:?}" - exitcode=$? - if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "Removing ${rootdir}/steamcmd" - else - fn_script_log_pass "Removing ${rootdir}/steamcmd" - fi - fi -} - -fn_check_steamcmd_exec() { - if [ "$(command -v steamcmd 2> /dev/null)" ]; then - steamcmdcommand="steamcmd" - else - steamcmdcommand="./steamcmd.sh" - fi -} - -fn_update_steamcmd_localbuild() { - # Gets local build info. - fn_print_dots "Checking local build: ${remotelocation}" - fn_appmanifest_check - # Uses appmanifest to find local build. - localbuild=$(grep buildid "${appmanifestfile}" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\ -f3) - - # Set branch to public if no custom branch. - if [ -z "${branch}" ]; then - branch="public" - fi - - # Checks if localbuild variable has been set. - if [ -z "${localbuild}" ]; then - fn_print_fail "Checking local build: ${remotelocation}: missing local build info" - fn_script_log_fatal "Missing local build info" - core_exit.sh - else - fn_print_ok "Checking local build: ${remotelocation}" - fn_script_log_pass "Checking local build" - fi -} - -fn_update_steamcmd_remotebuild() { - # Get remote build info. - if [ -d "${steamcmddir}" ]; then - cd "${steamcmddir}" || exit - fi - - # Removes appinfo.vdf as a fix for not always getting up to date version info from SteamCMD. - if [ "$(find "${HOME}" -type f -name "appinfo.vdf" | wc -l)" -ne "0" ]; then - find "${HOME}" -type f -name "appinfo.vdf" -exec rm -f {} \; - fi - - # password for branch not needed to check the buildid - remotebuildversion=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed -e '/"branches"/,/^}/!d' | sed -n "/\"${branch}\"/,/}/p" | grep -m 1 buildid | tr -cd '[:digit:]') - - if [ "${firstcommandname}" != "INSTALL" ]; then - fn_print_dots "Checking remote build: ${remotelocation}" - # Checks if remotebuildversion variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then - fn_print_fail "Checking remote build: ${remotelocation}" - fn_script_log_fatal "Checking remote build" - core_exit.sh - else - fn_print_ok "Checking remote build: ${remotelocation}" - fn_script_log_pass "Checking remote build" - fi - else - # Checks if remotebuild variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then - fn_print_failure "Unable to get remote build" - fn_script_log_fatal "Unable to get remote build" - core_exit.sh - fi - fi -} - -fn_update_steamcmd_compare() { - fn_print_dots "Checking for update: ${remotelocation}" - if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then - fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "Update available" - echo -e "* Local build: ${red}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" - if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" - fi - if [ -n "${betapassword}" ]; then - echo -e "* Branch password: ${betapassword}" - fi - echo -e "https://steamdb.info/app/${appid}/" - echo -en "\n" - fn_script_log_info "Update available" - fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" - if [ -n "${branch}" ]; then - fn_script_log_info "Branch: ${branch}" - fi - if [ -n "${betapassword}" ]; then - fn_script_log_info "Branch password: ${betapassword}" - fi - fn_script_log_info "${localbuild} > ${remotebuildversion}" - - if [ "${commandname}" == "UPDATE" ]; then - unset updateonstart - check_status.sh - # If server stopped. - if [ "${status}" == "0" ]; then - fn_dl_steamcmd - # If server started. - else - fn_print_restart_warning - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - exitbypass=1 - fn_dl_steamcmd - exitbypass=1 - command_start.sh - fn_firstcommand_reset - fi - unset exitbypass - date +%s > "${lockdir}/lastupdate.lock" - alert="update" - elif [ "${commandname}" == "CHECK-UPDATE" ]; then - alert="check-update" - fi - alert.sh - else - fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "No update available" - echo -e "* Local build: ${green}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" - if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" - fi - if [ -n "${betapassword}" ]; then - echo -e "* Branch password: ${betapassword}" - fi - echo -e "https://steamdb.info/app/${appid}/" - echo -en "\n" - fn_script_log_info "No update available" - fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" - if [ -n "${branch}" ]; then - fn_script_log_info "Branch: ${branch}" - fi - if [ -n "${betapassword}" ]; then - fn_script_log_info "Branch password: ${betapassword}" - fi - fi -} - -fn_appmanifest_info() { - appmanifestfile=$(find -L "${serverfiles}" -type f -name "appmanifest_${appid}.acf") - appmanifestfilewc=$(find -L "${serverfiles}" -type f -name "appmanifest_${appid}.acf" | wc -l) -} - -fn_appmanifest_check() { - fn_appmanifest_info - # Multiple or no matching appmanifest files may sometimes be present. - # This error is corrected if required. - if [ "${appmanifestfilewc}" -ge "2" ]; then - fn_print_error "Multiple appmanifest_${appid}.acf files found" - fn_script_log_error "Multiple appmanifest_${appid}.acf files found" - fn_print_dots "Removing x${appmanifestfilewc} appmanifest_${appid}.acf files" - for appfile in ${appmanifestfile}; do - rm -f "${appfile:?}" - done - appmanifestfilewc1="${appmanifestfilewc}" - fn_appmanifest_info - # if error can not be resolved. - if [ "${appmanifestfilewc}" -ge "2" ]; then - fn_print_fail "Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files" - fn_script_log_fatal "Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files" - echo -e "* Check user permissions" - for appfile in ${appmanifestfile}; do - echo -e " ${appfile}" - done - core_exit.sh - else - fn_print_ok "Removed x${appmanifestfilewc1} appmanifest_${appid}.acf files" - fn_script_log_pass "Removed x${appmanifestfilewc1} appmanifest_${appid}.acf files" - fn_print_info_nl "Forcing update to correct issue" - fn_script_log_info "Forcing update to correct issue" - fn_dl_steamcmd - fi - elif [ "${appmanifestfilewc}" -eq "0" ]; then - fn_print_error_nl "No appmanifest_${appid}.acf found" - fn_script_log_error "No appmanifest_${appid}.acf found" - fn_print_info_nl "Forcing update to correct issue" - fn_script_log_info "Forcing update to correct issue" - fn_dl_steamcmd - fn_appmanifest_info - if [ "${appmanifestfilewc}" -eq "0" ]; then - fn_print_fail_nl "Still no appmanifest_${appid}.acf found" - fn_script_log_fatal "Still no appmanifest_${appid}.acf found" - core_exit.sh - fi - fi -} diff --git a/lgsm/functions/core_trap.sh b/lgsm/functions/core_trap.sh deleted file mode 100644 index ae2b79470..000000000 --- a/lgsm/functions/core_trap.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -# LinuxGSM core_trap.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Handles CTRL-C trap to give an exit code. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -fn_exit_trap() { - if [ -z "${exitcode}" ]; then - exitcode=$? - fi - echo -e "" - if [ -z "${exitcode}" ]; then - exitcode=0 - fi - core_exit.sh -} - -# trap to give an exit code. -trap fn_exit_trap INT diff --git a/lgsm/functions/fix.sh b/lgsm/functions/fix.sh deleted file mode 100644 index 57f6a91fa..000000000 --- a/lgsm/functions/fix.sh +++ /dev/null @@ -1,88 +0,0 @@ -#!/bin/bash -# LinuxGSM fix.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Overall function for managing fixes. -# Runs functions that will fix an issue. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -# Messages that are displayed for some fixes. -fn_fix_msg_start() { - fn_print_dots "Applying ${fixname} fix: ${gamename}" - fn_print_info "Applying ${fixname} fix: ${gamename}" - fn_script_log_info "Applying ${fixname} fix: ${gamename}" -} - -fn_fix_msg_start_nl() { - fn_print_dots "Applying ${fixname} fix: ${gamename}" - fn_print_info_nl "Applying ${fixname} fix: ${gamename}" - fn_script_log_info "Applying ${fixname} fix: ${gamename}" -} - -fn_fix_msg_end() { - if [ $? != 0 ]; then - fn_print_error_nl "Applying ${fixname} fix: ${gamename}" - fn_script_log_error "Applying ${fixname} fix: ${gamename}" - else - fn_print_ok_nl "Applying ${fixname} fix: ${gamename}" - fn_script_log_pass "Applying ${fixname} fix: ${gamename}" - fi -} - -fn_exists_fix() { - local short="${1:?}" - - if [ "$(type -t "fix_${short}.sh")" == 'function' ]; then - return 0 - else - return 1 - fi -} - -fn_apply_fix() { - local phase_message="${1:?}" - local short="${2:?}" - - if fn_exists_fix "${short}"; then - "fix_${short}.sh" - else - fn_print_error_nl "${shortname} is marked to apply pre start fix but there is no fix registered" - fi -} - -apply_pre_start_fix=(arma3 armar ark av bt bo csgo cmw dst hw ins nmrih onset rust rw sdtd sfc sof2 squad st tf2 terraria ts3 mcb mta unt vh wurm zmr) -apply_post_install_fix=(av kf kf2 lo ro samp ut2k4 ut ut3) - -# validate registered fixes for safe development -for fix in "${apply_pre_start_fix[@]}" "${apply_post_install_fix[@]}"; do - if ! fn_exists_fix "${fix}"; then - fn_print_fail_nl "fix_${fix}.sh is registered but doesn't exist. Typo or did you miss to modify core_functions.sh?" - exitcode 1 - core_exit.sh - fi -done - -# Fixes that are run on start. -if [ "${commandname}" != "INSTALL" ] && [ -z "${fixbypass}" ]; then - if [ "${appid}" ]; then - fix_steamcmd.sh - fi - - if grep -qEe "(^|\s)${shortname}(\s|$)" <<< "${apply_pre_start_fix[@]}"; then - fn_apply_fix "pre start" "${shortname}" - fi -fi - -# Fixes that are run on install only. -if [ "${commandname}" == "INSTALL" ]; then - if grep -qEe "(^|\s)${shortname}(\s|$)" <<< "${apply_post_install_fix[@]}"; then - echo -e "" - echo -e "${lightyellow}Applying Post-Install Fixes${default}" - echo -e "=================================" - fn_sleep_time - postinstall=1 - fn_apply_fix "post install" "${shortname}" - fi -fi diff --git a/lgsm/functions/fix_ark.sh b/lgsm/functions/fix_ark.sh deleted file mode 100644 index f8e0447e3..000000000 --- a/lgsm/functions/fix_ark.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_ark.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Resolves various issues with ARK: Survival Evolved. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -# removes mulitple appworkshop_346110.acf if found. -steamappsfilewc="$(find "${HOME}" -name appworkshop_346110.acf | wc -l)" -if [ "${steamappsfilewc}" -gt "1" ]; then - fixname="multiple appworkshop acf files" - fn_fix_msg_start - find "${HOME}" -name appworkshop_346110.acf -exec rm -f {} \; - fn_fix_msg_end -elif [ "${steamappsfilewc}" -eq "1" ]; then - # Steam mods directory selecter - # This allows LinxuGSM to select either ~/.steam or ~/Steam. depending on what is being used - steamappsfile=$(find "${HOME}" -name appworkshop_346110.acf) - steamappsdir=$(dirname "${steamappsfile}") - steamappspath=$( - cd "${steamappsdir}" || return - cd ../ - pwd - ) - - # removes the symlink if exists. - # fixes issue with older versions of LinuxGSM linking to /home/arkserver/steamcmd - if [ -L "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux" ]; then - fixname="broken SteamCMD symlink" - fn_fix_msg_start - unlink "${serverfiles:?}/Engine/Binaries/ThirdParty/SteamCMD/Linux" - fn_fix_msg_end - check_steamcmd.sh - fi - - # removed ARK steamcmd directory if steamcmd is missing. - if [ ! -f "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamcmd.sh" ]; then - fixname="remove invalid ARK SteamCMD directory" - fn_fix_msg_start - rm -rf "${serverfiles:?}/Engine/Binaries/ThirdParty/SteamCMD/Linux" - fn_fix_msg_end - check_steamcmd.sh - fi - - # if the steamapps symlink is incorrect unlink it. - if [ -d "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux" ] && [ -L "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps" ] && [ "$(readlink "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps")" != "${steamappspath}" ]; then - fixname="incorrect steamapps symlink" - fn_fix_msg_start - unlink "${serverfiles:?}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps" - fn_fix_msg_end - fi - - # Put symlink to steamapps directory into the ARK SteamCMD directory to link the downloaded mods to the correct location. - if [ ! -L "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps" ]; then - fixname="steamapps symlink" - fn_fix_msg_start - ln -s "${steamappspath}" "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps" - fn_fix_msg_end - fi -fi diff --git a/lgsm/functions/fix_arma3.sh b/lgsm/functions/fix_arma3.sh deleted file mode 100644 index bbf14c9d2..000000000 --- a/lgsm/functions/fix_arma3.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_arma3.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Resolves an issue with ARMA3. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -# Fixes: 20150 Segmentation fault (core dumped) error. -if [ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Arma 3" ] || [ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Arma 3 - Other Profiles" ]; then - fixname="20150 Segmentation fault (core dumped)" - fn_fix_msg_start - mkdir -p "${XDG_DATA_HOME:="${HOME}/.local/share"}/Arma 3 - Other Profiles" - fn_fix_msg_end -fi diff --git a/lgsm/functions/fix_armar.sh b/lgsm/functions/fix_armar.sh deleted file mode 100644 index 9db42f51a..000000000 --- a/lgsm/functions/fix_armar.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_armar.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Resolves an issue with Arma Reforger. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -# Fixes: Profile directory doesn't exist. -# Issue Link: https://feedback.bistudio.com/T164845 -if [ ! -d "${serverprofilefullpath}" ]; then - fixname="Profile directory doesn't exist" - fn_fix_msg_start - mkdir -p "${serverprofilefullpath}" - fn_fix_msg_end -fi diff --git a/lgsm/functions/fix_av.sh b/lgsm/functions/fix_av.sh deleted file mode 100644 index a61a8be65..000000000 --- a/lgsm/functions/fix_av.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_av.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Resolves startup issue with Avorion - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/linux64" - -# Generates the server config if it doesn't exist. -if [ ! -f "${servercfgfullpath}" ]; then - startparameters="--datapath ${avdatapath} --galaxy-name ${selfname} --init-folders-only" - fn_print_information "starting ${gamename} server to generate configs." - fn_sleep_time - cd "${systemdir}" || exit - eval "${executable} ${startparameters}" -fi diff --git a/lgsm/functions/fix_bo.sh b/lgsm/functions/fix_bo.sh deleted file mode 100644 index 453691874..000000000 --- a/lgsm/functions/fix_bo.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_hw.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Resolves various issues with Ballistic Overkill. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/BODS_Data/Plugins/x86_64" diff --git a/lgsm/functions/fix_bt.sh b/lgsm/functions/fix_bt.sh deleted file mode 100644 index 07fd61ce5..000000000 --- a/lgsm/functions/fix_bt.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_bt.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Resolves an issue with Barotrauma. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -# Fixes: Missing user data directory error. -if [ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Daedalic Entertainment GmbH/Barotrauma" ]; then - fixname="Missing user data directory error." - fn_fix_msg_start - mkdir -p "${XDG_DATA_HOME:="${HOME}/.local/share"}/Daedalic Entertainment GmbH/Barotrauma" - fn_fix_msg_end -fi - -# check if startscript is with windows line endings and reformat it -if file -b "${serverfiles}${executable:1}" | grep -q CRLF; then - fixname="Convert ${executable:2} to unix file format" - fn_fix_msg_start - dos2unix -q "${serverfiles}${executable:1}" - fn_fix_msg_end -fi diff --git a/lgsm/functions/fix_cmw.sh b/lgsm/functions/fix_cmw.sh deleted file mode 100644 index 192f483e8..000000000 --- a/lgsm/functions/fix_cmw.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_cmw.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Resolves the issue of the not starting server on linux - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -if [ ! -f "${executabledir}/steam_appid.txt" ]; then - fixname="steam_appid.txt" - fn_fix_msg_start - echo 219640 > "${executabledir}/steam_appid.txt" - fn_fix_msg_end -fi - -if [ ! -f "${servercfgfullpath}" ]; then - fn_fix_msg_start - fixname="copy config" - mkdir "${servercfgdir}" - cp "${systemdir}/UDKGame/Config/"*.ini "${servercfgdir}" - fn_fix_msg_end -fi diff --git a/lgsm/functions/fix_csgo.sh b/lgsm/functions/fix_csgo.sh deleted file mode 100644 index a393f2fd9..000000000 --- a/lgsm/functions/fix_csgo.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_csgo.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Resolves various issues with CS:GO. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -# Fixes: server not always creating steam_appid.txt file. -if [ ! -f "${serverfiles}/steam_appid.txt" ]; then - fixname="730 steam_appid.txt" - fn_fix_msg_start - echo -n "730" >> "${serverfiles}/steam_appid.txt" - fn_fix_msg_end -fi - -# Fixes: Error parsing BotProfile.db - unknown attribute 'Rank'". -if [ -f "${systemdir}/botprofile.db" ] && grep "^\s*Rank" "${systemdir}/botprofile.db" > /dev/null 2>&1; then - fixname="botprofile.db" - fn_fix_msg_start - sed -i 's/^\s*Rank/\t\/\/Rank/g' "${systemdir}/botprofile.db" > /dev/null 2>&1 - fn_fix_msg_end -fi - -# Fixes: Unknown command "cl_bobamt_vert" and exec: couldn't exec joystick.cfg. -if [ -f "${servercfgdir}/valve.rc" ] && grep -E '^\s*exec\s*(default|joystick)\.cfg' "${servercfgdir}/valve.rc" > /dev/null 2>&1; then - fixname="valve.rc" - fn_fix_msg_start - sed -i 's/^\s*exec\s*default.cfg/\/\/exec default.cfg/g' "${servercfgdir}/valve.rc" > /dev/null 2>&1 - sed -i 's/^\s*exec\s*joystick.cfg/\/\/exec joystick.cfg/g' "${servercfgdir}/valve.rc" > /dev/null 2>&1 - fn_fix_msg_end -fi - -# Fixes: Detected engine 11 but could not load: /home/csgo/serverfiles/bin/libgcc_s.so.1: version `GCC_7.0.0' not found (required by /lib/i386-linux-gnu/libstdc++.so.6) -libgccc_so="${serverfiles}/bin/libgcc_s.so.1" -if [ -f "${libgccc_so}" ]; then - fixname="libgcc_s.so.1 move away" - fn_fix_msg_start - mv -v "${libgccc_so}" "${libgccc_so}.bck" - fn_fix_msg_end -fi diff --git a/lgsm/functions/fix_dst.sh b/lgsm/functions/fix_dst.sh deleted file mode 100644 index e30507dc9..000000000 --- a/lgsm/functions/fix_dst.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_dst.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Resolves various issues with Don't Starve Together. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -# Fixes: ./dontstarve_dedicated_server_nullrenderer: ./lib32/libcurl-gnutls.so.4: no version information available (required by ./dontstarve_dedicated_server_nullrenderer). -# Issue only occures on CentOS as libcurl-gnutls.so.4 is called libcurl.so.4 on CentOS. -if [ -f "/etc/redhat-release" ] && [ ! -f "${serverfiles}/bin/lib32/libcurl-gnutls.so.4" ]; then - fixname="libcurl-gnutls.so.4" - fn_fix_msg_start - ln -s "/usr/lib/libcurl.so.4" "${serverfiles}/bin/lib32/libcurl-gnutls.so.4" - fn_fix_msg_end -fi diff --git a/lgsm/functions/fix_hw.sh b/lgsm/functions/fix_hw.sh deleted file mode 100644 index af06924db..000000000 --- a/lgsm/functions/fix_hw.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_hw.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Resolves various issues with Hurtworld. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/Hurtworld_Data/Plugins/x86_64" diff --git a/lgsm/functions/fix_ins.sh b/lgsm/functions/fix_ins.sh deleted file mode 100644 index 21a979c4c..000000000 --- a/lgsm/functions/fix_ins.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_ins.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Resolves various issues with Insurgency. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -# Fixes: ./srcds_linux: error while loading shared libraries: libtier0.so: cannot open shared object file: No such file or directory. - -export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/bin" - -# Fixes: issue #529 - gamemode not passed to debug or start. - -if [ "${commandname}" == "DEBUG" ]; then - defaultmap="\"${defaultmap}\"" -else - defaultmap="\\\"${defaultmap}\\\"" -fi diff --git a/lgsm/functions/fix_kf.sh b/lgsm/functions/fix_kf.sh deleted file mode 100644 index e749a2d27..000000000 --- a/lgsm/functions/fix_kf.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_kf.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Resolves various issues with Killing Floor. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -echo -e "Applying WebAdmin ROOst.css fix." -echo -e "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13" -sed -i 's/none}/none;/g' "${serverfiles}/Web/ServerAdmin/ROOst.css" -sed -i 's/underline}/underline;/g' "${serverfiles}/Web/ServerAdmin/ROOst.css" -fn_sleep_time -echo -e "Applying WebAdmin CharSet fix." -echo -e "http://forums.tripwireinteractive.com/showpost.php?p=442340&postcount=1" -sed -i 's/CharSet="iso-8859-1"/CharSet="utf-8"/g' "${systemdir}/UWeb.int" -fn_sleep_time -echo -e "applying server name fix." -fn_sleep_time -echo -e "forcing server restart..." -fn_sleep_time -exitbypass=1 -command_start.sh -fn_firstcommand_reset -sleep 5 -exitbypass=1 -command_stop.sh -fn_firstcommand_reset -exitbypass=1 -command_start.sh -fn_firstcommand_reset -sleep 5 -exitbypass=1 -command_stop.sh -fn_firstcommand_reset diff --git a/lgsm/functions/fix_kf2.sh b/lgsm/functions/fix_kf2.sh deleted file mode 100644 index b680a9937..000000000 --- a/lgsm/functions/fix_kf2.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_kf2.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Resolves various issues with Killing Floor 2. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -startparameters="\"${defaultmap}?Game=KFGameContent.KFGameInfo_VersusSurvival\"" - -fn_print_information "starting ${gamename} server to generate configs." -fn_sleep_time -exitbypass=1 -command_start.sh -fn_firstcommand_reset -sleep 10 -exitbypass=1 -command_stop.sh -fn_firstcommand_reset diff --git a/lgsm/functions/fix_lo.sh b/lgsm/functions/fix_lo.sh deleted file mode 100644 index eec2ebd36..000000000 --- a/lgsm/functions/fix_lo.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_lo.sh function -# Author: Daniel Gibbs -# Website: https://linuxgsm.com -# Description: Resolves installation issue with Last Oasis - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -appidfile=${executabledir}/steam_appid.txt -if [ ! -f "${appidfile}" ]; then - fn_print_information "adding ${appidfile} to ${gamename} server." - fn_sleep_time - echo "903950" > "${appidfile}" -else - fn_print_information "${appidfile} already exists. No action to be taken." - fn_sleep_time -fi diff --git a/lgsm/functions/fix_mcb.sh b/lgsm/functions/fix_mcb.sh deleted file mode 100644 index 4768a40cf..000000000 --- a/lgsm/functions/fix_mcb.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_mcb.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Resolves possible startup issue with Minecraft Bedrock. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -# official docs state that the server should be started with: LD_LIBRARY_PATH=. ./bedrock_server -export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}" diff --git a/lgsm/functions/fix_mta.sh b/lgsm/functions/fix_mta.sh deleted file mode 100644 index 2c92e8d12..000000000 --- a/lgsm/functions/fix_mta.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_mta.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Installs the libmysqlclient for database functions on the server. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -if [ ! -f "${lgsmdir}/lib/libmysqlclient.so.16" ]; then - fixname="libmysqlclient16" - fn_fix_msg_start_nl - fn_sleep_time - fn_fetch_file "https://nightly.mtasa.com/files/modules/64/libmysqlclient.so.16" "" "" "" "${lgsmdir}/lib" "libmysqlclient.so.16" "chmodx" "norun" "noforce" "6c188e0f8fb5d7a29f4bc413b9fed6c2" - fn_fix_msg_end -fi diff --git a/lgsm/functions/fix_nmrih.sh b/lgsm/functions/fix_nmrih.sh deleted file mode 100644 index 4bb70c6f9..000000000 --- a/lgsm/functions/fix_nmrih.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_nmrih.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Create symlinks for renamed No More Room In Hell serverfiles. -# Solution from Steam Community post: https://steamcommunity.com/app/224260/discussions/2/1732089092441769414/ - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -ln -s "${serverfiles}/bin/vphysics_srv.so" "${serverfiles}/bin/vphysics.so" -ln -s "${serverfiles}/bin/studiorender_srv.so" "${serverfiles}/bin/studiorender.so" -ln -s "${serverfiles}/bin/soundemittersystem_srv.so" "${serverfiles}/bin/soundemittersystem.so" -ln -s "${serverfiles}/bin/shaderapiempty_srv.so" "${serverfiles}/bin/shaderapiempty.so" -ln -s "${serverfiles}/bin/scenefilecache_srv.so" "${serverfiles}/bin/scenefilecache.so" -ln -s "${serverfiles}/bin/replay_srv.so" "${serverfiles}/bin/replay.so" -ln -s "${serverfiles}/bin/materialsystem_srv.so" "${serverfiles}/bin/materialsystem.so" diff --git a/lgsm/functions/fix_onset.sh b/lgsm/functions/fix_onset.sh deleted file mode 100644 index e4183999d..000000000 --- a/lgsm/functions/fix_onset.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_onset.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Resolves various issues with Onset. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}" - -# Fixes: Failed loading "mariadb": libmariadbclient.so.18: cannot open shared object file: No such file or directory -# Issue only occures on CentOS as libmariadbclient.so.18 is called libmariadb.so.3 on CentOS. -if [ -f "/etc/redhat-release" ] && [ ! -f "${serverfiles}/libmariadbclient.so.18" ] && [ -f "/usr/lib64/libmariadb.so.3" ]; then - fixname="libmariadbclient.so.18" - fn_fix_msg_start - ln -s "/usr/lib64/libmariadb.so.3" "${serverfiles}/libmariadbclient.so.18" - fn_fix_msg_end -fi diff --git a/lgsm/functions/fix_ro.sh b/lgsm/functions/fix_ro.sh deleted file mode 100644 index 895c7c2da..000000000 --- a/lgsm/functions/fix_ro.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_ro.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Resolves various issues with Red Orchestra. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -echo -e "Applying WebAdmin ROOst.css fix." -echo -e "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13" -sed -i 's/none}/none;/g' "${serverfiles}/Web/ServerAdmin/ROOst.css" -sed -i 's/underline}/underline;/g' "${serverfiles}/Web/ServerAdmin/ROOst.css" -fn_sleep_time -echo -e "Applying WebAdmin CharSet fix." -echo -e "http://forums.tripwireinteractive.com/showpost.php?p=442340&postcount=1" -sed -i 's/CharSet="iso-8859-1"/CharSet="utf-8"/g' "${systemdir}/uweb.int" -fn_sleep_time -echo -e "Applying Steam AppID fix." -sed -i 's/1210/1200/g' "${systemdir}/steam_appid.txt" -fn_sleep_time -echo -e "applying server name fix." -fn_sleep_time -echo -e "forcing server restart..." -fn_sleep_time -exitbypass=1 -command_start.sh -fn_firstcommand_reset -sleep 5 -exitbypass=1 -command_stop.sh -fn_firstcommand_reset -exitbypass=1 -command_start.sh -fn_firstcommand_reset -sleep 5 -exitbypass=1 -command_stop.sh -fn_firstcommand_reset diff --git a/lgsm/functions/fix_rust.sh b/lgsm/functions/fix_rust.sh deleted file mode 100644 index 5f407e89f..000000000 --- a/lgsm/functions/fix_rust.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_rust.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Resolves startup issue with Rust. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -# Fixes: [Raknet] Server Shutting Down (Shutting Down). -export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/RustDedicated_Data/Plugins/x86_64" - -# Part of random seed feature. -# If seed is not defined by user generate a seed file. -if [ -z "${seed}" ] || [ "${seed}" == "0" ]; then - if [ ! -f "${datadir}/${selfname}-seed.txt" ]; then - shuf -i 1-2147483647 -n 1 > "${datadir}/${selfname}-seed.txt" - seed="$(cat "${datadir}/${selfname}-seed.txt")" - fn_print_info_nl "Generating new random seed (${cyan}${seed}${default})" - fn_script_log_pass "Generating new random seed (${cyan}${seed}${default})" - fi - seed="$(cat "${datadir}/${selfname}-seed.txt")" - randomseed=1 -fi - -# If Carbon mod is installed, run enviroment.sh -if [ -f "${serverfiles}/carbon/tools/environment.sh" ]; then - fn_print_info_nl "Running Carbon environment.sh" - fn_script_log_info "Running Carbon environment.sh" - # shellcheck source=/dev/null - source "${serverfiles}/carbon/tools/environment.sh" -fi diff --git a/lgsm/functions/fix_rw.sh b/lgsm/functions/fix_rw.sh deleted file mode 100644 index aef41a703..000000000 --- a/lgsm/functions/fix_rw.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_rw.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Resolves various issues with Rising World. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/linux64" diff --git a/lgsm/functions/fix_samp.sh b/lgsm/functions/fix_samp.sh deleted file mode 100644 index a88bf154f..000000000 --- a/lgsm/functions/fix_samp.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_sfc.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Resolves issue that the default rcon password is not changed - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -if [ -f "${servercfgfullpath}" ]; then - # check if default password is set "changeme" - currentpass=$(grep -E "^rcon_password" "${servercfgfullpath}" | sed 's/^rcon_password //') - defaultpass="changeme" - # check if default password is set - if [ "${currentpass}" == "${defaultpass}" ]; then - fixname="change default rcon password" - fn_fix_msg_start - fn_script_log_info "changing rcon/admin password." - random=$(tr -dc A-Za-z0-9_ < /dev/urandom | head -c 8 | xargs) - rconpass="admin${random}" - sed -i "s/rcon_password changeme/rcon_password ${rconpass}/g" "${servercfgfullpath}" - fn_fix_msg_end - fi - # check if the hostname is the default name - currenthostname=$(grep -E "^hostname" "${servercfgfullpath}" | sed 's/^hostname //') - defaulthostname="SA-MP 0.3 Server" - if [ "${currenthostname}" == "${defaulthostname}" ]; then - fixname="change default hostname" - fn_fix_msg_start - fn_script_log_info "changing default hostname to LinuxGSM" - sed -i "s/hostname ${defaulthostname}/hostname LinuxGSM/g" "${servercfgfullpath}" - fn_fix_msg_end - fi -fi diff --git a/lgsm/functions/fix_sdtd.sh b/lgsm/functions/fix_sdtd.sh deleted file mode 100644 index e93db7970..000000000 --- a/lgsm/functions/fix_sdtd.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_sdtd.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Resolves various issues with 7 Days to Die. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}/7DaysToDieServer_Data/Plugins/x86_64" diff --git a/lgsm/functions/fix_sfc.sh b/lgsm/functions/fix_sfc.sh deleted file mode 100644 index 51b95b9d5..000000000 --- a/lgsm/functions/fix_sfc.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_sfc.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Resolves various issues with Source Forts Classic. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -if [ ! -f "${serverfiles}/bin/datacache.so" ]; then - ln -s "${serverfiles}/bin/datacache_srv.so" "${serverfiles}/bin/datacache.so" -fi - -if [ ! -f "${serverfiles}/bin/dedicated.so" ]; then - ln -s "${serverfiles}/bin/dedicated_srv.so" "${serverfiles}/bin/dedicated.so" -fi - -if [ ! -f "${serverfiles}/bin/engine.so" ]; then - ln -s "${serverfiles}/bin/engine_srv.so" "${serverfiles}/bin/engine.so" -fi - -if [ ! -f "${serverfiles}/bin/materialsystem.so" ]; then - ln -s "${serverfiles}/bin/materialsystem_srv.so" "${serverfiles}/bin/materialsystem.so" -fi - -if [ ! -f "${serverfiles}/bin/replay.so" ]; then - ln -s "${serverfiles}/bin/replay_srv.so" "${serverfiles}/bin/replay.so" -fi - -if [ ! -f "${serverfiles}/bin/shaderapiempty.so" ]; then - ln -s "${serverfiles}/bin/shaderapiempty_srv.so" "${serverfiles}/bin/shaderapiempty.so" -fi - -if [ ! -f "${serverfiles}/bin/soundemittersystem.so" ]; then - ln -s "${serverfiles}/bin/soundemittersystem_srv.so" "${serverfiles}/bin/soundemittersystem.so" -fi - -if [ ! -f "${serverfiles}/bin/studiorender.so" ]; then - ln -s "${serverfiles}/bin/studiorender_srv.so" "${serverfiles}/bin/studiorender.so" -fi - -if [ ! -f "${serverfiles}/bin/vphysics.so" ]; then - ln -s "${serverfiles}/bin/vphysics_srv.so" "${serverfiles}/bin/vphysics.so" -fi - -if [ ! -f "${serverfiles}/bin/scenefilecache.so" ]; then - ln -s "${serverfiles}/bin/scenefilecache_srv.so" "${serverfiles}/bin/scenefilecache.so" -fi diff --git a/lgsm/functions/fix_sof2.sh b/lgsm/functions/fix_sof2.sh deleted file mode 100644 index 002f42952..000000000 --- a/lgsm/functions/fix_sof2.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_rust.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Resolves various issues with Soldier of Fortune 2. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -# Fixes: error while loading shared libraries: libcxa.so.1 -export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}" diff --git a/lgsm/functions/fix_squad.sh b/lgsm/functions/fix_squad.sh deleted file mode 100644 index 7d5929b5d..000000000 --- a/lgsm/functions/fix_squad.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_squad.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Resolves various issues with Squad. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -# As the server base dir changed for the game, we need to migrate the default config from the old to the new location -oldservercfg="${serverfiles}/Squad/ServerConfig/${servercfg}" -if [ -f "${oldservercfg}" ] && [ -f "${servercfgfullpath}" ]; then - # diff old and new config - if it is different move the old config over the new one - if [ "$(diff -c "${oldservercfg}" "${servercfgfullpath}" | wc -l)" -gt 0 ]; then - fixname="Migrate server config to new Game folder" - fn_fix_msg_start - mv -v "${oldservercfg}" "${servercfgfullpath}" - fn_fix_msg_end - else - fixname="remove the same config from old configdir" - fn_fix_msg_start - rm -f "${oldservercfg}" - fn_fix_msg_end - - fi -fi diff --git a/lgsm/functions/fix_st.sh b/lgsm/functions/fix_st.sh deleted file mode 100644 index b9fb5b084..000000000 --- a/lgsm/functions/fix_st.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_rust.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Resolves startup issue with Stationeers. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -# Fixes: [Raknet] Server Shutting Down (Shutting Down). -export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/rocketstation_DedicatedServer_Data/Plugins/x86_64" diff --git a/lgsm/functions/fix_steamcmd.sh b/lgsm/functions/fix_steamcmd.sh deleted file mode 100644 index 9644208dc..000000000 --- a/lgsm/functions/fix_steamcmd.sh +++ /dev/null @@ -1,141 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_steamcmd.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Resolves various issues related to SteamCMD. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -# function to simplify the steamclient.so fix -# example -# fn_fix_steamclient_so 32|64 (bit) "${serverfiles}/linux32/" -fn_fix_steamclient_so() { - # $1 type of fix 32 or 64 as possible values - # $2 as destination where the lib will be copied to - if [ "$1" == "32" ]; then - # steamclient.so x86 fix. - if [ ! -f "${2}/steamclient.so" ]; then - fixname="steamclient.so x86" - fn_fix_msg_start - if [ ! -d "${2}" ]; then - mkdir -p "${2}" - fi - if [ -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" ]; then - cp "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${2}/steamclient.so" - elif [ -f "${steamcmddir}/linux32/steamclient.so" ]; then - cp "${steamcmddir}/linux32/steamclient.so" "${2}/steamclient.so" - elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux32/steamclient.so" ]; then - cp "${HOME}/.local/share/Steam/steamcmd/linux32/steamclient.so" "${2}/steamclient.so" - fi - fn_fix_msg_end - fi - elif [ "$1" == "64" ]; then - # steamclient.so x86_64 fix. - if [ ! -f "${2}/steamclient.so" ]; then - fixname="steamclient.so x86_64" - fn_fix_msg_start - if [ ! -d "${2}" ]; then - mkdir -p "${2}" - fi - if [ -f "${HOME}/.steam/steamcmd/linux64/steamclient.so" ]; then - cp "${HOME}/.steam/steamcmd/linux64/steamclient.so" "${2}/steamclient.so" - elif [ -f "${steamcmddir}/linux64/steamclient.so" ]; then - cp "${steamcmddir}/linux64/steamclient.so" "${2}/steamclient.so" - elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux64/steamclient.so" ]; then - cp "${HOME}/.local/share/Steam/steamcmd/linux64/steamclient.so" "${2}/steamclient.so" - fi - fn_fix_msg_end - fi - fi -} - -# Helps fix: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam,or a local steamclient.so. -steamsdk64="${HOME}/.steam/sdk64" -steamclientsdk64="${steamsdk64}/steamclient.so" -# remove any old unlinked versions of steamclient.so -if [ -f "${steamclientsdk64}" ]; then - if [ "$(stat -c '%h' "${steamclientsdk64}")" -eq 1 ]; then - fixname="steamclient.so sdk64 - remove old file" - fn_fix_msg_start - rm -f "${steamclientsdk64}" - fn_fix_msg_end - fi -fi - -# place new hardlink for the file to the disk -if [ ! -f "${steamclientsdk64}" ]; then - fixname="steamclient.so sdk64 hardlink" - fn_fix_msg_start - if [ ! -d "${steamsdk64}" ]; then - mkdir -p "${steamsdk64}" - fi - if [ -f "${HOME}/.steam/steamcmd/linux64/steamclient.so" ]; then - ln "${HOME}/.steam/steamcmd/linux64/steamclient.so" "${steamclientsdk64}" - elif [ -f "${steamcmddir}/linux64/steamclient.so" ]; then - ln "${steamcmddir}/linux64/steamclient.so" "${steamclientsdk64}" - elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux64/steamclient.so" ]; then - ln "${HOME}/.local/share/Steam/steamcmd/linux64/steamclient.so" "${steamclientsdk64}" - else - fn_print_fail_nl "Could not copy any steamclient.so 64bit for the gameserver" - fi - fn_fix_msg_end -fi - -# Helps fix: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam,or a local steamclient.so. -steamsdk32="${HOME}/.steam/sdk32" -steamclientsdk32="${HOME}/.steam/sdk32/steamclient.so" -if [ -f "${steamclientsdk32}" ]; then - if [ " $(stat -c '%h' "${steamclientsdk32}")" -eq 1 ]; then - fixname="steamclient.so sdk32 - remove old file" - fn_fix_msg_start - rm -f "${steamclientsdk32}" - fn_fix_msg_end - fi -fi - -# place new hardlink for the file to the disk -if [ ! -f "${steamclientsdk32}" ]; then - fixname="steamclient.so sdk32 link" - fn_fix_msg_start - if [ ! -d "${steamsdk32}" ]; then - mkdir -p "${steamsdk32}" - fi - if [ -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" ]; then - ln "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${steamclientsdk32}" - elif [ -f "${steamcmddir}/linux32/steamclient.so" ]; then - ln "${steamcmddir}/linux32/steamclient.so" "${steamclientsdk32}" - elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux32/steamclient.so" ]; then - ln "${HOME}/.local/share/Steam/steamcmd/linux32/steamclient.so" "${steamclientsdk32}" - else - fn_print_fail_nl "Could not copy any steamclient.so 32bit for the gameserver" - fi - fn_fix_msg_end -fi - -# steamclient.so fixes -if [ "${shortname}" == "bo" ]; then - fn_fix_steamclient_so "32" "${serverfiles}/BODS_Data/Plugins/x86" - fn_fix_steamclient_so "64" "${serverfiles}/BODS_Data/Plugins/x86_64" -elif [ "${shortname}" == "cmw" ]; then - fn_fix_steamclient_so "32" "${executabledir}/lib" -elif [ "${shortname}" == "cs" ]; then - fn_fix_steamclient_so "32" "${serverfiles}" -elif [ "${shortname}" == "col" ]; then - fn_fix_steamclient_so "64" "${serverfiles}" -elif [ "${shortname}" == "ins" ]; then - fn_fix_steamclient_so "32" "${serverfiles}/bin" -elif [ "${shortname}" == "pz" ]; then - fn_fix_steamclient_so "32" "${serverfiles}/linux32" - fn_fix_steamclient_so "64" "${serverfiles}/linux64" -elif [ "${shortname}" == "pvr" ]; then - fn_fix_steamclient_so "64" "${executabledir}" -elif [ "${shortname}" == "ss3" ]; then - fn_fix_steamclient_so "32" "${serverfiles}/Bin" -elif [ "${shortname}" == "tu" ]; then - fn_fix_steamclient_so "64" "${executabledir}" -elif [ "${shortname}" == "unt" ]; then - fn_fix_steamclient_so "64" "${serverfiles}" -elif [ "${shortname}" == "wurm" ]; then - fn_fix_steamclient_so "64" "${serverfiles}/nativelibs" -fi diff --git a/lgsm/functions/fix_terraria.sh b/lgsm/functions/fix_terraria.sh deleted file mode 100644 index 7758fdad9..000000000 --- a/lgsm/functions/fix_terraria.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_terraria.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Resolves an issue with Terraria. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -export TERM=xterm diff --git a/lgsm/functions/fix_tf2.sh b/lgsm/functions/fix_tf2.sh deleted file mode 100644 index 77e41a969..000000000 --- a/lgsm/functions/fix_tf2.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_tf2.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Resolves various issues with Team Fortress 2. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -# Fixes: Team Fortress 2 Segmentation fault for Red-Hat Distros #2062. -if [ -f "/etc/redhat-release" ] && [ ! -f "${serverfiles}/bin/libcurl-gnutls.so.4" ]; then - fixname="libcurl-gnutls.so.4" - fn_fix_msg_start - ln -s "/usr/lib/libcurl.so.4" "${serverfiles}/bin/libcurl-gnutls.so.4" - fn_fix_msg_end -fi diff --git a/lgsm/functions/fix_ts3.sh b/lgsm/functions/fix_ts3.sh deleted file mode 100644 index 7c7387cb6..000000000 --- a/lgsm/functions/fix_ts3.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_ts3.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Resolves various issues with Teamspeak 3. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -# Fixes: makes libmariadb2 available #1924. -if [ ! -f "${serverfiles}/libmariadb.so.2" ]; then - fixname="libmariadb.so.2" - fn_fix_msg_start - cp "${serverfiles}/redist/libmariadb.so.2" "${serverfiles}/libmariadb.so.2" - fn_fix_msg_end -fi - -# Fixes: failed to register local accounting service: No such file or directory. -accountingfile="/dev/shm/7gbhujb54g8z9hu43jre8" -if [ -f "${accountingfile}" ] && [ "${status}" == "0" ]; then - # Check permissions for the file if the current user owns it, if not exit. - if [ "$(stat -c %U ${accountingfile})" == "$(whoami)" ]; then - fixname="Delete file ${accountingfile}" - fn_fix_msg_start - rm -f "${accountingfile}" - fn_fix_msg_end - # file is not owned by the current user and needs to be deleted manually. - else - fn_print_error_nl "File ${accountingfile} is not owned by $(whoami) and needs to be deleted manually" - fn_script_log_fatal "File ${accountingfile} is not owned by $(whoami) and needs to be deleted manually" - core_exit.sh - fi -fi diff --git a/lgsm/functions/fix_unt.sh b/lgsm/functions/fix_unt.sh deleted file mode 100644 index eae2e6313..000000000 --- a/lgsm/functions/fix_unt.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_rust.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Resolves startup issue with Unturned. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/Unturned_Headless_Data/Plugins/x86_64" diff --git a/lgsm/functions/fix_ut.sh b/lgsm/functions/fix_ut.sh deleted file mode 100644 index 2e6686a8d..000000000 --- a/lgsm/functions/fix_ut.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_ut.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Resolves various issues with Unreal Tournament. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -#Set Binary Executable -echo -e "chmod +x ${executabledir}/${executable}" -chmod +x "${executabledir}/${executable}" -fn_sleep_time diff --git a/lgsm/functions/fix_ut2k4.sh b/lgsm/functions/fix_ut2k4.sh deleted file mode 100644 index 49610e4b6..000000000 --- a/lgsm/functions/fix_ut2k4.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_ut2k4.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Resolves various issues with Unreal Tournament 2004. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -echo -e "applying WebAdmin ut2003.css fix." -echo -e "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13" -sed -i 's/none}/none;/g' "${serverfiles}/Web/ServerAdmin/ut2003.css" -sed -i 's/underline}/underline;/g' "${serverfiles}/Web/ServerAdmin/ut2003.css" -fn_sleep_time -echo -e "applying WebAdmin CharSet fix." -echo -e "http://forums.tripwireinteractive.com/showpost.php?p=442340&postcount=1" -sed -i 's/CharSet="iso-8859-1"/CharSet="utf-8"/g' "${systemdir}/UWeb.int" -fn_sleep_time -echo -e "applying server name fix." -fn_sleep_time -echo -e "forcing server restart." -fn_sleep_time -exitbypass=1 -command_start.sh -fn_firstcommand_reset -sleep 5 -exitbypass=1 -command_stop.sh -fn_firstcommand_reset -exitbypass=1 -command_start.sh -fn_firstcommand_reset -sleep 5 -exitbypass=1 -command_stop.sh -fn_firstcommand_reset diff --git a/lgsm/functions/fix_ut3.sh b/lgsm/functions/fix_ut3.sh deleted file mode 100644 index 6bd26a53a..000000000 --- a/lgsm/functions/fix_ut3.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_ut2.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Resolves various issues with Unreal Tournament 3. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -startparameters="server VCTF-Suspense?Game=UTGameContent.UTVehicleCTFGame_Content?bIsDedicated=true?bIsLanMatch=false?bUsesStats=false?bShouldAdvertise=false?PureServer=1?bAllowJoinInProgress=true?ConfigSubDir=${selfname} -port=${port} -queryport=${queryport} -multihome=${ip} -nohomedir -unattended -log=${gamelog}" - -fn_print_information "starting ${gamename} server to generate configs." -fn_sleep_time -exitbypass=1 -command_start.sh -fn_firstcommand_reset -sleep 10 -exitbypass=1 -command_stop.sh -fn_firstcommand_reset diff --git a/lgsm/functions/fix_vh.sh b/lgsm/functions/fix_vh.sh deleted file mode 100644 index a90c5d0b0..000000000 --- a/lgsm/functions/fix_vh.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_rust.sh function -# Author: Alasdair Haig -# Website: https://linuxgsm.com -# Description: Resolves startup issue with Valheim - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -export LD_LIBRARY_PATH=./linux64:$LD_LIBRARY_PATH - -modsdir="${lgsmdir}/mods" -modsinstalledlistfullpath="${modsdir}/installed-mods.txt" -if [ -f "${modsinstalledlistfullpath}" ]; then - # special check if Valheim Plus is installed - if grep -qE "^valheimplus" "${modsinstalledlistfullpath}"; then - if ! grep -qE "^executable=\"./start_server_bepinex.sh\"" "${configdirserver}/${selfname}.cfg"; then - echo 'executable="./start_server_bepinex.sh"' >> "${configdirserver}/${selfname}.cfg" - executable="./start_server_bepinex.sh" - fi - fi - # special exports for BepInEx if installed - if grep -qE "^bepinexvh" "${modsinstalledlistfullpath}"; then - fn_print_info_nl "BepInEx install detected, applying start exports" - fn_script_log_info "BepInEx install detected, applying start exports" - # exports for BepInEx framework from script start_server_bepinex.sh - export DOORSTOP_ENABLE=TRUE - export DOORSTOP_INVOKE_DLL_PATH=./BepInEx/core/BepInEx.Preloader.dll - export DOORSTOP_CORLIB_OVERRIDE_PATH=./unstripped_corlib - - export LD_LIBRARY_PATH="./doorstop_libs:${LD_LIBRARY_PATH}" - export LD_PRELOAD="libdoorstop_x64.so:${LD_PRELOAD}" - - export SteamAppId=892970 - fi -fi diff --git a/lgsm/functions/fix_wurm.sh b/lgsm/functions/fix_wurm.sh deleted file mode 100644 index aba24d382..000000000 --- a/lgsm/functions/fix_wurm.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_wurm.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Resolves various issues with Wurm Unlimited. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -# First run requires start with no parms. -# After first run new dirs are created. -if [ ! -d "${serverfiles}/Creative" ]; then - parmsbypass=1 - fixbypass=1 - exitbypass=1 - command_start.sh - fn_firstcommand_reset - sleep 10 - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - unset parmsbypass -fi diff --git a/lgsm/functions/fix_zmr.sh b/lgsm/functions/fix_zmr.sh deleted file mode 100644 index 491c36638..000000000 --- a/lgsm/functions/fix_zmr.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_sfc.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Resolves various issues with Zombie Master: Reborn. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -if [ ! -f "${serverfiles}/bin/datacache.so" ]; then - ln -s "${serverfiles}/bin/datacache_srv.so" "${serverfiles}/bin/datacache.so" -fi - -if [ ! -f "${serverfiles}/bin/dedicated.so" ]; then - ln -s "${serverfiles}/bin/dedicated_srv.so" "${serverfiles}/bin/dedicated.so" -fi - -if [ ! -f "${serverfiles}/bin/engine.so" ]; then - ln -s "${serverfiles}/bin/engine_srv.so" "${serverfiles}/bin/engine.so" -fi - -if [ ! -f "${serverfiles}/bin/materialsystem.so" ]; then - ln -s "${serverfiles}/bin/materialsystem_srv.so" "${serverfiles}/bin/materialsystem.so" -fi - -if [ ! -f "${serverfiles}/bin/replay.so" ]; then - ln -s "${serverfiles}/bin/replay_srv.so" "${serverfiles}/bin/replay.so" -fi - -if [ ! -f "${serverfiles}/bin/shaderapiempty.so" ]; then - ln -s "${serverfiles}/bin/shaderapiempty_srv.so" "${serverfiles}/bin/shaderapiempty.so" -fi - -if [ ! -f "${serverfiles}/bin/soundemittersystem.so" ]; then - ln -s "${serverfiles}/bin/soundemittersystem_srv.so" "${serverfiles}/bin/soundemittersystem.so" -fi - -if [ ! -f "${serverfiles}/bin/studiorender.so" ]; then - ln -s "${serverfiles}/bin/studiorender_srv.so" "${serverfiles}/bin/studiorender.so" -fi - -if [ ! -f "${serverfiles}/bin/vphysics.so" ]; then - ln -s "${serverfiles}/bin/vphysics_srv.so" "${serverfiles}/bin/vphysics.so" -fi - -if [ ! -f "${serverfiles}/bin/scenefilecache.so" ]; then - ln -s "${serverfiles}/bin/scenefilecache_srv.so" "${serverfiles}/bin/scenefilecache.so" -fi diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh deleted file mode 100644 index 8c2a67adf..000000000 --- a/lgsm/functions/info_distro.sh +++ /dev/null @@ -1,281 +0,0 @@ -#!/bin/bash -# LinuxGSM info_distro.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Variables providing useful info on the Operating System such as disk and performace info. -# Used for command_details.sh, command_debug.sh and alert.sh. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -### Game Server pid -if [ "${status}" == "1" ]; then - gameserverpid="$(tmux -L "${sessionname}" list-sessions -F "#{session_name} #{pane_pid}" | grep "^${sessionname} " | awk '{print $NF}')" - if [ "${engine}" == "source" ]; then - srcdslinuxpid="$(ps -ef | grep -v grep | grep "${gameserverpid}" | grep srcds_linux | awk '{print $2}')" - elif [ "${engine}" == "goldsrc" ]; then - hldslinuxpid="$(ps -ef | grep -v grep | grep "${gameserverpid}" | grep hlds_linux | awk '{print $2}')" - fi -fi -### Distro information - -## Distro -# Returns architecture, kernel and distro/os. -arch="$(uname -m)" -kernel="$(uname -r)" - -# Distro Name - Ubuntu 16.04 LTS -# Distro Version - 16.04 -# Distro ID - ubuntu -# Distro Codename - xenial - -# Gathers distro info from various sources filling in missing gaps. -distro_info_array=(os-release lsb_release hostnamectl debian_version redhat-release) -for distro_info in "${distro_info_array[@]}"; do - if [ -f "/etc/os-release" ] && [ "${distro_info}" == "os-release" ]; then - distroname="$(grep "PRETTY_NAME" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')" - distroversion="$(grep "VERSION_ID" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')" - # Special var for rhel like distros to removed point in number e.g 8.4 to just 8. - distroversionrh="$(sed -nr 's/^VERSION_ID="([0-9]*).+?"/\1/p' /etc/os-release)" - distroid="$(grep "ID=" /etc/os-release | grep -v _ID | awk -F\= '{gsub(/"/,"",$2);print $2}')" - distroidlike="$(grep "ID_LIKE=" /etc/os-release | grep -v _ID | awk -F\= '{gsub(/"/,"",$2);print $2}')" - distrocodename="$(grep "VERSION_CODENAME" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')" - elif [ "$(command -v lsb_release 2> /dev/null)" ] && [ "${distro_info}" == "lsb_release" ]; then - if [ -z "${distroname}" ]; then - distroname="$(lsb_release -sd)" - elif [ -z "${distroversion}" ]; then - distroversion="$(lsb_release -sr)" - elif [ -z "${distroid}" ]; then - distroid="$(lsb_release -si)" - elif [ -z "${distrocodename}" ]; then - distrocodename="$(lsb_release -sc)" - fi - elif [ "$(command -v hostnamectl 2> /dev/null)" ] && [ "${distro_info}" == "hostnamectl" ]; then - if [ -z "${distroname}" ]; then - distroname="$(hostnamectl | grep "Operating System" | sed 's/Operating System: //g')" - fi - elif [ -f "/etc/debian_version" ] && [ "${distro_info}" == "debian_version" ]; then - if [ -z "${distroname}" ]; then - distroname="Debian $(cat /etc/debian_version)" - elif [ -z "${distroversion}" ]; then - distroversion="$(cat /etc/debian_version)" - elif [ -z "${distroid}" ]; then - distroid="debian" - fi - elif [ -f "/etc/redhat-release" ] && [ "${distro_info}" == "redhat-release" ]; then - if [ -z "${distroname}" ]; then - distroname="$(cat /etc/redhat-release)" - elif [ -z "${distroversion}" ]; then - distroversion="$(rpm -qa \*-release | grep -Ei "oracle|redhat|centos|fedora" | cut -d"-" -f3)" - elif [ -z "${distroid}" ]; then - distroid="$(awk '{print $1}' /etc/redhat-release)" - fi - fi -done - -# some RHEL based distros use 8.4 instead of just 8. -if [[ "${distroidlike}" == *"rhel"* ]] || [ "${distroid}" == "rhel" ]; then - distroversioncsv="${distroversionrh}" -else - distroversioncsv="${distroversion}" -fi - -# Check if distro supported by distro vendor. -if [ "$(command -v distro-info 2> /dev/null)" ]; then - distrosunsupported="$(distro-info --unsupported)" - distrosunsupported_array=("${distrosunsupported}") - for distrounsupported in "${distrosunsupported_array[@]}"; do - if [ "${distrounsupported}" == "${distrocodename}" ]; then - distrosupport=unsupported - break - else - distrosupport=supported - fi - done -else - distrosupport=unknown -fi - -## Glibc version -# e.g: 1.17 -glibcversion="$(ldd --version | sed -n '1s/.* //p')" - -## tmux version -# e.g: tmux 1.6 -if [ ! "$(command -V tmux 2> /dev/null)" ]; then - tmuxv="${red}NOT INSTALLED!${default}" - tmuxvdigit="0" -else - tmuxvdigit="$(tmux -V | sed "s/tmux //" | sed -n '1 p' | tr -cd '[:digit:]')" - if [ "${tmuxvdigit}" -lt "16" ]; then - tmuxv="$(tmux -V) (>= 1.6 required for console log)" - else - tmuxv="$(tmux -V)" - fi -fi - -if [ "$(command -V java 2> /dev/null)" ]; then - javaversion="$(java -version 2>&1 | grep "version")" -fi - -if [ "$(command -v mono 2> /dev/null)" ]; then - monoversion="$(mono --version 2>&1 | grep -Po '(?<=version )\d')" -fi - -## Uptime -uptime="$(< /proc/uptime)" -uptime=${uptime/[. ]*/} -minutes="$((uptime / 60 % 60))" -hours="$((uptime / 60 / 60 % 24))" -days="$((uptime / 60 / 60 / 24))" - -### Performance information - -## Average server load -load="$(uptime | awk -F 'load average: ' '{ print $2 }')" - -## CPU information -cpumodel="$(awk -F: '/model name/ {name=$2} END {print name}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//')" -cpucores="$(awk -F: '/model name/ {core++} END {print core}' /proc/cpuinfo)" -cpufreqency="$(awk -F: '/cpu MHz/ {freq=$2} END {print freq}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//')" -# CPU usage of the game server pid -if [ -n "${gameserverpid}" ]; then - cpuused="$(ps --forest -o pcpu -g "${gameserverpid}" | awk '{s+=$1} END {print s}')" - cpuusedmhz="$(echo "${cpufreqency} * ${cpuused} / 100" | bc)" -fi - -## Memory information -# Available RAM and swap. - -# Newer distros can use numfmt to give more accurate results. -if [ "$(command -v numfmt 2> /dev/null)" ]; then - # Issue #2005 - Kernel 3.14+ contains MemAvailable which should be used. All others will be calculated. - - # get the raw KB values of these fields. - physmemtotalkb="$(grep MemTotal /proc/meminfo | awk '{print $2}')" - physmemfreekb="$(grep ^MemFree /proc/meminfo | awk '{print $2}')" - physmembufferskb="$(grep ^Buffers /proc/meminfo | awk '{print $2}')" - physmemcachedkb="$(grep ^Cached /proc/meminfo | awk '{print $2}')" - physmemreclaimablekb="$(grep ^SReclaimable /proc/meminfo | awk '{print $2}')" - - # check if MemAvailable Exists. - if grep -q ^MemAvailable /proc/meminfo; then - physmemactualfreekb="$(grep ^MemAvailable /proc/meminfo | awk '{print $2}')" - else - physmemactualfreekb="$((physmemfreekb + physmembufferskb + physmemcachedkb))" - fi - - # Available RAM and swap. - physmemtotalmb="$((physmemtotalkb / 1024))" - physmemtotal="$(numfmt --to=iec --from=iec --suffix=B "${physmemtotalkb}K")" - physmemfree="$(numfmt --to=iec --from=iec --suffix=B "${physmemactualfreekb}K")" - physmemused="$(numfmt --to=iec --from=iec --suffix=B "$((physmemtotalkb - physmemfreekb - physmembufferskb - physmemcachedkb - physmemreclaimablekb))K")" - physmemavailable="$(numfmt --to=iec --from=iec --suffix=B "${physmemactualfreekb}K")" - physmemcached="$(numfmt --to=iec --from=iec --suffix=B "$((physmemcachedkb + physmemreclaimablekb))K")" - - swaptotal="$(numfmt --to=iec --from=iec --suffix=B "$(grep ^SwapTotal /proc/meminfo | awk '{print $2}')K")" - swapfree="$(numfmt --to=iec --from=iec --suffix=B "$(grep ^SwapFree /proc/meminfo | awk '{print $2}')K")" - swapused="$(numfmt --to=iec --from=iec --suffix=B "$(($(grep ^SwapTotal /proc/meminfo | awk '{print $2}') - $(grep ^SwapFree /proc/meminfo | awk '{print $2}')))K")" - # RAM usage of the game server pid - # MB - if [ "${gameserverpid}" ]; then - memused="$(ps --forest -o rss -g "${gameserverpid}" | awk '{s+=$1} END {print s}' | awk '{$1/=1024;printf "%.0f",$1}{print $2}')" - # % - pmemused="$(ps --forest -o %mem -g "${gameserverpid}" | awk '{s+=$1} END {print s}')" - fi -else - # Older distros will need to use free. - # Older versions of free do not support -h option. - if [ "$( - free -h > /dev/null 2>&1 - echo $? - )" -ne "0" ]; then - humanreadable="-m" - else - humanreadable="-h" - fi - physmemtotalmb="$(free -m | awk '/Mem:/ {print $2}')" - physmemtotal="$(free ${humanreadable} | awk '/Mem:/ {print $2}')" - physmemfree="$(free ${humanreadable} | awk '/Mem:/ {print $4}')" - physmemused="$(free ${humanreadable} | awk '/Mem:/ {print $3}')" - - oldfree="$(free ${humanreadable} | awk '/cache:/')" - if [ "${oldfree}" ]; then - physmemavailable="n/a" - physmemcached="n/a" - else - physmemavailable="$(free ${humanreadable} | awk '/Mem:/ {print $7}')" - physmemcached="$(free ${humanreadable} | awk '/Mem:/ {print $6}')" - fi - - swaptotal="$(free ${humanreadable} | awk '/Swap:/ {print $2}')" - swapused="$(free ${humanreadable} | awk '/Swap:/ {print $3}')" - swapfree="$(free ${humanreadable} | awk '/Swap:/ {print $4}')" -fi - -### Disk information - -## Available disk space on the partition. -filesystem="$(LC_ALL=C df -hP "${rootdir}" | tail -n 1 | awk '{print $1}')" -totalspace="$(LC_ALL=C df -hP "${rootdir}" | tail -n 1 | awk '{print $2}')" -usedspace="$(LC_ALL=C df -hP "${rootdir}" | tail -n 1 | awk '{print $3}')" -availspace="$(LC_ALL=C df -hP "${rootdir}" | tail -n 1 | awk '{print $4}')" - -## LinuxGSM used space total. -rootdirdu="$(du -sh "${rootdir}" 2> /dev/null | awk '{print $1}')" -if [ -z "${rootdirdu}" ]; then - rootdirdu="0M" -fi - -## LinuxGSM used space in serverfiles dir. -serverfilesdu="$(du -sh "${serverfiles}" 2> /dev/null | awk '{print $1}')" -if [ -z "${serverfilesdu}" ]; then - serverfilesdu="0M" -fi - -## LinuxGSM used space total minus backup dir. -rootdirduexbackup="$(du -sh --exclude="${backupdir}" "${serverfiles}" 2> /dev/null | awk '{print $1}')" -if [ -z "${rootdirduexbackup}" ]; then - rootdirduexbackup="0M" -fi - -## Backup info -if [ -d "${backupdir}" ]; then - # Used space in backups dir. - backupdirdu="$(du -sh "${backupdir}" | awk '{print $1}')" - # If no backup dir, size is 0M. - if [ -z "${backupdirdu}" ]; then - backupdirdu="0M" - fi - - # number of backups set to 0 by default. - backupcount=0 - - # If there are backups in backup dir. - if [ "$(find "${backupdir}" -name "*.tar.gz" | wc -l)" -ne "0" ]; then - # number of backups. - backupcount="$(find "${backupdir}"/*.tar.gz | wc -l)" - # most recent backup. - lastbackup="$(ls -1t "${backupdir}"/*.tar.gz | head -1)" - # date of most recent backup. - lastbackupdate="$(date -r "${lastbackup}")" - # no of days since last backup. - lastbackupdaysago="$((($(date +'%s') - $(date -r "${lastbackup}" +'%s')) / 60 / 60 / 24))" - # size of most recent backup. - lastbackupsize="$(du -h "${lastbackup}" | awk '{print $1}')" - fi -fi - -# Network Interface name -netint=$(${ipcommand} -o addr | grep "${ip}" | awk '{print $2}') -netlink=$(${ethtoolcommand} "${netint}" 2> /dev/null | grep Speed | awk '{print $2}') - -# Sets the SteamCMD glibc requirement if the game server requirement is less or not required. -if [ "${appid}" ]; then - if [ "${glibc}" = "null" ] || [ -z "${glibc}" ] || [ "$(printf '%s\n'${glibc}'\n' "2.14" | sort -V | head -n 1)" != "2.14" ]; then - glibc="2.14" - fi -fi - -# Gather Port Info using ss -ssinfo="$(ss -tuplwn)" diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh deleted file mode 100644 index b8f94c18a..000000000 --- a/lgsm/functions/info_game.sh +++ /dev/null @@ -1,2600 +0,0 @@ -#!/bin/bash -# LinuxGSM info_game.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Gathers various game server information. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -## Examples of filtering to get info from config files. -# sed 's/foo//g' - remove foo -# tr -cd '[:digit:]' leave only digits -# tr -d '=\"; ' remove selected characters =\"; -# grep -v "foo" filter out lines that contain foo -# cut -f1 -d "/" remove everything after / - -fn_info_game_ac() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - adminpassword="${unavailable}" - httpport="${zero}" - port="${zero}" - queryport="${zero}" - servername="${unavailable}" - else - adminpassword=$(grep "ADMIN_PASSWORD" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/ADMIN_PASSWORD//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - httpport=$(grep "HTTP_PORT" "${servercfgfullpath}" | tr -cd '[:digit:]') - port=$(grep "TCP_PORT" "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport="${httpport}" - servername=$(grep "NAME" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/NAME//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | head -n 1) - - # Not set - adminpassword=${adminpassword:-"NOT SET"} - httpport=${httpport:-"0"} - port=${port:-"0"} - queryport=${queryport:-"0"} - servername=${servername:-"NOT SET"} - - fi -} - -fn_info_game_ark() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - adminpassword="${unavailable}" - servername="${unavailable}" - serverpassword="${unavailable}" - else - adminpassword=$(sed -nr 's/^ServerAdminPassword=(.*)/\1/p' "${servercfgfullpath}") - servername=$(sed -nr 's/^SessionName=(.*)/\1/p' "${servercfgfullpath}") - serverpassword=$(sed -nr 's/^ServerPassword=(.*)/\1/p' "${servercfgfullpath}") - - # Not set - adminpassword=${adminpassword:-"NOT SET"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - fi - - # Parameters - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - queryport=${queryport:-"0"} - rawport=$((port + 1)) - rconport=${rconport:-"0"} -} - -fn_info_game_arma3() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - adminpassword="${unavailable}" - maxplayers="${zero}" - servername="${unavailable}" - serverpassword="${unavailable}" - else - adminpassword=$(sed -nr 's/^passwordAdmin\s*=\s*"(.*)"\s*;/\1/p' "${servercfgfullpath}") - maxplayers=$(sed -nr 's/^maxPlayers\s*=\s*([0-9]+)\s*;/\1/p' "${servercfgfullpath}") - servername=$(sed -nr 's/^hostname\s*=\s*"(.*)"\s*;/\1/p' "${servercfgfullpath}") - serverpassword=$(sed -nr 's/^password\s*=\s*"(.*)"\s*;/\1/p' "${servercfgfullpath}") - - # Not set - adminpassword=${adminpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - fi - - # Parameters - battleeyeport=$((port + 4)) - port=${port:-"2302"} - queryport=$((port + 1)) - steammasterport=$((port + 2)) - voiceport=${port:-"2302"} - voiceunusedport=$((port + 3)) -} - -fn_info_game_armar() { - if [ ! -f "${servercfgfullpath}" ]; then - adminpassword="${unavailable}" - maxplayers="${zero}" - port="${zero}" - queryport="${zero}" - servername="${unavailable}" - serverpassword="${unavailable}" - else - adminpassword=$(jq -r '.game.passwordAdmin' "${servercfgfullpath}") - battleeyeport=1376 - configip=$(jq -r '.bindAddress' "${servercfgfullpath}") - maxplayers=$(jq -r '.game.maxPlayers' "${servercfgfullpath}") - port=$(jq -r '.bindPort' "${servercfgfullpath}") - queryport=$(jq -r '.a2s.port' "${servercfgfullpath}") - servername=$(jq -r '.game.name' "${servercfgfullpath}") - serverpassword=$(jq -r '.game.password' "${servercfgfullpath}") - - # Not set - adminpassword=${adminpassword:-"NOT SET"} - configip=${configip:-"0.0.0.0"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - queryport=${queryport:-"0"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - fi -} - -fn_info_game_av() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - maxplayers="${unavailable}" - servername="${unavailable}" - serverpassword="${unavailable}" - port=${zero} - queryport=${zero} - steamqueryport=${zero} - steammasterport=${zero} - rconport=${zero} - rconenabled="${unavailable}" - rconpassword="${unavailable}" - else - maxplayers=$(grep "maxPlayers=" "${servercfgfullpath}" | sed 's/maxPlayers=//') - servername=$(grep "name=" "${servercfgfullpath}" | sed 's/name=//') - serverpassword=$(grep "password=" "${servercfgfullpath}" | sed 's/password=//') - port=$(grep "port=" "${servercfgfullpath}" | sed 's/port=//') - queryport=$((port + 3)) - steamqueryport=$((port + 20)) - steammasterport=$((port + 21)) - rconport=$(grep "rconPort=" "${servercfgfullpath}" | sed 's/rconPort=//') - - rconpassword=$(grep "rconPassword=" "${servercfgfullpath}" | sed 's/rconPassword=//') - if [ -n "${rconpassword}" ]; then - rconenabled="true" - fi - - # Not set - maxplayers=${maxplayers:-"0"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} - steamqueryport=${steamqueryport:-"0"} - steammasterport=${steammasterport:-"0"} - rconport=${rconport:-"0"} - rconenabled=${rconenabled:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} - fi -} - -fn_info_game_bf1942() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - port="${zero}" - queryport="${zero}" - else - servername=$(grep -E "^game.serverName " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverName //g' | tr -d '=\";,:' | xargs) - serverpassword=$(grep "game.serverPassword" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/game.serverPassword//g' | tr -d '=\";,:' | xargs) - maxplayers=$(grep "game.serverMaxPlayers" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') - port=$(grep "game.serverPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') - queryport="22000" - configip=$(grep "game.serverIP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverIP//g' | tr -d '=\";,:' | xargs) - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - queryport=${queryport:-"0"} - configip=${configip:-"0.0.0.0"} - fi -} - -fn_info_game_bfv() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - port="${zero}" - queryport="${zero}" - else - servername=$(grep "game.serverName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverName//g' | tr -d '=\";,:' | xargs) - serverpassword=$(grep "game.serverPassword" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/game.serverPassword//g' | tr -d '=\";,:' | xargs) - maxplayers=$(grep "game.serverMaxPlayers" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') - port=$(grep "game.serverPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') - queryport="23000" - configip=$(grep "game.serverIP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverIP//g' | tr -d '=\";,:' | xargs) - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - queryport=${queryport:-"0"} - configip=${configip:-"0.0.0.0"} - fi -} - -fn_info_game_bo() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - port="${zero}" - queryport="${zero}" - maxplayers="${unavailable}" - else - servername=$(grep "ServerName=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "Password=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - port=$(grep "ServerPort=" "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport=$((port + 1)) - maxplayers=$(grep "MaxPlayers=" "${servercfgfullpath}" | tr -cd '[:digit:]') - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} - maxplayers=${maxplayers:-"0"} - fi -} - -fn_info_game_bt() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - port="${zero}" - queryport="${zero}" - maxplayers="${unavailable}" - else - servername=$(grep -Po 'name="\K.*(?=")' "${servercfgfullpath}") # Assuming GNU grep is used - serverpassword=$(grep -Po 'password="\K.*(?=")' "${servercfgfullpath}") # Assuming GNU grep is used - port=$(grep " port=" "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport=$(grep "queryport=" "${servercfgfullpath}" | tr -cd '[:digit:]') - maxplayers=$(grep "maxplayers=" "${servercfgfullpath}" | tr -cd '[:digit:]') - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} - maxplayers=${maxplayers:-"0"} - fi -} - -fn_info_game_btl() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - gamemode="${unavailable}" - else - servername=$(grep -m2 "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "Password" "${servercfgfullpath}" | grep -v "RCONPassword" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - gamemode=$(grep -m2 "PlayMode" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/PlayMode//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - gamemode=${gamemode:-"NOT SET"} - fi - - # Parameters - port=${port:-"0"} - queryport=${queryport:-"0"} - rconport=$((port + 2)) -} - -fn_info_game_cd() { - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - port="${zero}" - rconenabled="false" - rconport="${zero}" - rconpassword="${unavailable}" - steamport="${zero}" - maxplayers="${zero}" - else - servername=$(jq -r '.game_title' "${servercfgfullpath}") - port=$(jq -r '.game_port' "${servercfgfullpath}") - steamport=$(jq -r '.steam_port_messages' "${servercfgfullpath}") - rconenabled=$(jq -r '.rcon' "${servercfgfullpath}") - rconport=$(jq -r '.rcon_port' "${servercfgfullpath}") - rconpassword=$(jq -r '.rcon_password' "${servercfgfullpath}") - maxplayers=$(jq -r '.player_count' "${servercfgfullpath}") - fi -} - -fn_info_game_ck() { - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - maxplayers="${zero}" - else - servername=$(jq -r '.worldName' "${servercfgfullpath}") - maxplayers=$(jq -r '.maxNumberPlayers' "${servercfgfullpath}") - fi - queryport=$((port + 1)) -} - -fn_info_game_cmw() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - adminpassword="${unavailable}" - rconport=${zero} - servername="${unavailable}" - serverpassword="${unavailable}" - - else - adminpassword=$(grep -E "^adminpassword=" "${servercfgfullpath}" | tr -cd '[:digit:]') - rconport=$(grep -E "^RConPort=" "${servercfgdir}/DefaultGame.ini" | tr -cd '[:digit:]') - servername=$(grep -E "^ServerName" "${servercfgfullpath}" | sed 's/^ServerName=//') - serverpassword=$(grep -E "^GamePassword" "${servercfgfullpath}" | sed 's/^ServerName=//') - - # Not set - adminpassword=${adminpassword:-"NOT SET"} - rconport=${rconport:-"0"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - fi - - # Parameters - defaultmap=${defaultmap:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} -} - -fn_info_game_cod() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - rconpassword="${unavailable}" - else - servername=$(grep "sv_hostname " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | xargs) - rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - servername=${servername:-"NOT SET"} - rconpassword=${rconpassword=:-"NOT SET"} - fi - - # Parameters - defaultmap=${defaultmap:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} -} - -fn_info_game_coduo() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - rconpassword="${unavailable}" - else - servername=$(grep "sv_hostname " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | xargs) - rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - servername=${servername:-"NOT SET"} - rconpassword=${rconpassword=:-"NOT SET"} - fi - - # Parameters - defaultmap=${defaultmap:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - queryport=${port:-"28960"} -} - -fn_info_game_cod2() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - rconpassword="${unavailable}" - else - servername=$(grep "sv_hostname " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | xargs) - rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - servername=${servername:-"NOT SET"} - rconpassword=${rconpassword=:-"NOT SET"} - fi - - # Parameters - defaultmap=${defaultmap:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - queryport=${port:-"28960"} -} - -fn_info_game_cod4() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - rconpassword="${unavailable}" - else - servername=$(sed -nr 's/^set\s*sv_hostname\s*"(.*)".*/\1/p' "${servercfgfullpath}") - rconpassword=$(sed -nr 's/^set\s*rcon_password\s*"(.*)"\s*\/.*/\1/p' "${servercfgfullpath}") - queryport=${port:-"28960"} - - # Not set - servername=${servername:-"NOT SET"} - rconpassword=${rconpassword=:-"NOT SET"} - queryport=${queryport:-"28960"} - fi - - # Parameters - defaultmap=${defaultmap:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - queryport=${port:-"28960"} -} - -fn_info_game_codwaw() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - rconpassword="${unavailable}" - else - servername=$(grep "sv_hostname " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | xargs) - rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - servername=${servername:-"NOT SET"} - rconpassword=${rconpassword=:-"NOT SET"} - fi - - # Parameters - defaultmap=${defaultmap:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - queryport=${port:-"28960"} -} - -fn_info_game_col() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${unavailable}" - port="${zero}" - queryport="${zero}" - steamport="${zero}" - rconpassword="${unavailable}" - else - servername=$(jq -r '.ServerSettings.ServerName' "${servercfgfullpath}") - serverpassword=$(jq -r '.ServerSettings.ServerPassword' "${servercfgfullpath}") - maxplayers=$(jq -r '.ServerSettings.MaxPlayerCount' "${servercfgfullpath}") - port=$(jq -r '.ServerSettings.ServerGamePort' "${servercfgfullpath}") - queryport=${port:-"0"} - steamport=$(jq -r '.ServerSettings.ServerSteamPort' "${servercfgfullpath}") - rconpassword=$(jq -r '.ServerSettings.RCONPassword' "${servercfgfullpath}") - configip=$(jq -r '.ServerSettings.ServerIP' "${servercfgfullpath}") - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"27004"} - queryport=${queryport:-"0"} - steamport=${steamport:-"27005"} - rconpassword=${rconpassword:-"NOT SET"} - configip=${configip:-"0.0.0.0"} - fi -} - -fn_info_game_dodr() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - maxplayers="${zero}" - else - maxplayers=$(sed -nr 's/^iServerMaxPlayers=(.*)$/\1/p' "${servercfgfullpath}") - - # Not set - maxplayers=${maxplayers:-"0"} - fi - - # Parameters - servername=${servername:-"NOT SET"} - port=${port:-"7777"} - queryport=${queryport:-"27015"} -} - -fn_info_game_dayz() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - adminpassword="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - else - servername=$(sed -nr 's/^hostname\s*=\s*"(.*)"\s*;/\1/p' "${servercfgfullpath}") - adminpassword=$(sed -nr 's/^passwordAdmin\s*=\s*"(.*)"\s*;/\1/p' "${servercfgfullpath}") - serverpassword=$(sed -nr 's/^password\s*=\s*"(.*)"\s*;/\1/p' "${servercfgfullpath}") - maxplayers=$(sed -nr 's/^maxPlayers\s*=\s*([0-9]+)\s*;/\1/p' "${servercfgfullpath}") - queryport=$(sed -nr 's/^steamQueryPort\s*=\s*([0-9]+)\s*;/\1/p' "${servercfgfullpath}") - - # Not Set - servername=${servername:-"NOT SET"} - adminpassword=${adminpassword:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - queryport=${queryport:-"27016"} - fi - - # Parameters - port=${port:-"2302"} - steammasterport=$((port + 2)) - battleeyeport=$((port + 4)) -} - -fn_info_game_dst() { - # Config - if [ ! -f "${clustercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - gamemode="${unavailable}" - tickrate="${zero}" - masterport="${zero}" - else - servername=$(grep "cluster_name" "${clustercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/cluster_name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "cluster_password" "${clustercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/cluster_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "max_players" "${clustercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - gamemode=$(grep "game_mode" "${clustercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/game_mode//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - tickrate=$(grep "tick_rate" "${clustercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - masterport=$(grep "master_port" "${clustercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - configip=$(grep "bind_ip" "${clustercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bind_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - gamemode=${gamemode:-"NOT SET"} - tickrate=${tickrate:-"0"} - masterport=${masterport:-"0"} - configip=${configip:-"0.0.0.0"} - fi - - if [ ! -f "${servercfgfullpath}" ]; then - port="${zero}" - steamauthport="${zero}" - steammasterport="${zero}" - else - port=$(grep "server_port" "${servercfgfullpath}" | grep "^server_port" | grep -v "#" | tr -cd '[:digit:]') - steamauthport=$(grep "authentication_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - steammasterport=$(grep "master_server_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - - # Not set - port=${port:-"0"} - steamauthport=${steamauthport:-"0"} - steammasterport=${steammasterport:-"0"} - fi - - # Parameters - sharding=${sharding:-"NOT SET"} - master=${master:-"NOT SET"} - shard=${shard:-"NOT SET"} - cluster=${cluster:-"NOT SET"} - cave=${cave:-"NOT SET"} -} - -fn_info_game_eco() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - tickrate="${zero}" - port="${zero}" - webadminport="${zero}" - else - configip=$(jq -r '.IPAddress' "${servercfgfullpath}") - servername=$(jq -r '.Description' "${servercfgfullpath}") - serverpassword=$(jq -r '.Password' "${servercfgfullpath}") - maxplayers=$(jq -r '.MaxConnections' "${servercfgfullpath}") - tickrate=$(jq -r '.Rate' "${servercfgfullpath}") - port=$(jq -r '.GameServerPort' "${servercfgfullpath}") - webadminport=$(jq -r '.WebServerPort' "${servercfgfullpath}") - - # Not set - configip=${configip:-"0.0.0.0"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers=:-"0"} - tickrate=${tickrate=:-"0"} - port=${port=:-"0"} - webadminport=${webadminport=:-"0"} - fi -} - -fn_info_game_etl() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - rconpassword="${unavailable}" - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - port="${zero}" - queryport="${zero}" - else - port=$(grep "set net_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - queryport="${port}" - rconpassword=$(grep "set rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//g' -e '/^\//d' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - servername=$(grep "set sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "set g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "set sv_maxclients" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - configip=$(grep "set net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set net_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - rconpassword=${rconpassword:-"NOT SET"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"27960"} - queryport=${queryport:-"27960"} - configip=${configip:-"0.0.0.0"} - fi -} - -fn_info_game_fctr() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="Factorio Server" - serverpassword="${unavailable}" - maxplayers="${zero}" - authtoken="${unavailable}" - savegameinterval="${unavailable}" - versioncount="${unavailable}" - else - servername=$(jq -r '.name' "${servercfgfullpath}") - serverpassword=$(jq -r '.game_password' "${servercfgfullpath}") - maxplayers=$(jq -r '.max_players' "${servercfgfullpath}") - authtoken=$(jq -r '.token' "${servercfgfullpath}") - savegameinterval=$(jq -r '.autosave_interval' "${servercfgfullpath}") - versioncount=$(jq -r '.autosave_slots' "${servercfgfullpath}") - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - authtoken=${authtoken:-"NOT SET"} - savegameinterval=${savegameinterval:-"0"} - versioncount=${versioncount:-"0"} - fi - - # Parameters - port=${port:-"0"} - rconport=${rconport:-"0"} - rconpassword=${rconpassword:-"NOT SET"} - - # get server version if installed - local factoriobin="${executabledir}${executable:1}" - if [ -f "${factoriobin}" ]; then - serverversion=$(${factoriobin} --version | grep "Version:" | awk '{print $2}') - fi -} - -fn_info_game_jc2() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverdescription="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - port="${zero}" - queryport="${zero}" - else - servername=$(grep "Name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/Name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverdescription=$(grep "Description" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/Description//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "Password" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') - port=$(grep "BindPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') - queryport="${port}" - configip=$(grep "BindIP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/BindIP//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - serverdescription=${serverdescription:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - queryport=${queryport:-"0"} - configip=${configip:-"0.0.0.0"} - fi -} - -fn_info_game_hw() { - # Parameters - servername=${servername:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} - maxplayers=${maxplayers:-"0"} - defaultmap=${defaultmap:-"NOT SET"} - creativemode=${creativemode:-"NOT SET"} -} - -fn_info_game_inss() { - # Parameters - port=${port:-"0"} - queryport=${queryport:-"0"} - rconport=${rconport:-"0"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - defaultmap=${defaultmap:-"NOT SET"} - defaultscenario=${defaultscenario:-"NOT SET"} - maxplayers=${maxplayers:-"0"} -} - -fn_info_game_jc3() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverdescription="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - port="${zero}" - queryPort="${zero}" - steamport="${zero}" - httpport="${zero}" - tickrate="${zero}" - else - servername=$(grep "name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverdescription=$(grep "description" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/description//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "\"maxPlayers\"" "${servercfgfullpath}" | tr -cd '[:digit:]') - port=$(grep "\"port\"" "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport=$(grep "\"queryPort\"" "${servercfgfullpath}" | tr -cd '[:digit:]') - steamport=$(grep "\"steamPort\"" "${servercfgfullpath}" | tr -cd '[:digit:]') - httpport=$(grep "\"httpPort\"" "${servercfgfullpath}" | tr -cd '[:digit:]') - tickrate=$(grep "\"maxTickRate\"" "${servercfgfullpath}" | tr -cd '[:digit:]') - configip=$(grep "host" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/host//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - servername=${servername:-"NOT SET"} - serverdescription=${serverdescription:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers=:-"0"} - port=${port=:-"0"} - queryport=${queryport=:-"0"} - steamport=${steamport=:-"0"} - httpport=${httpport=:-"0"} - tickrate=${tickrate=:-"0"} - configip=${configip:-"0.0.0.0"} - fi -} - -fn_info_game_jk2() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - rconpassword="${unavailable}" - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - serverversion="${unavailable}" - else - rconpassword=$(grep "seta rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta rconpassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - servername=$(grep "seta sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "seta g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "seta sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - serverversion=$(grep "seta mv_serverversion" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta mv_serverversion//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - rconpassword=${rconpassword:-"NOT SET"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - serverversion=${serverversion:-"NOT SET"} - fi - - # Parameters - port=${port:-"0"} - queryport=${port} - defaultmap=${defaultmap:-"NOT SET"} -} - -fn_info_game_kf() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - adminpassword="${unavailable}" - port="${zero}" - queryport="${zero}" - queryportgs="${zero}" - steamport="${zero}" - steammasterport="${zero}" - lanport="${zero}" - httpport="${zero}" - webadminenabled="${unavailable}" - webadminuser="${unavailable}" - webadminpass="${unavailable}" - else - servername=$(sed -nr 's/^ServerName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - serverpassword=$(sed -nr 's/^GamePassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - adminpassword=$(sed -nr 's/^AdminPassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - port=$(sed -nr 's/^Port=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport=$((port + 1)) - queryportgs=$(sed -nr 's/^OldQueryPortNumber=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') - steamport="20560" - steammasterport="28852" - lanport=$(grep "LANServerPort=" "${servercfgfullpath}" | tr -cd '[:digit:]') - httpport=$(sed -nr 's/^ListenPort=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') - webadminenabled=$(sed -nr 's/^bEnabled=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - webadminuser=$(sed -nr 's/^AdminName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - webadminpass="${adminpassword}" - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - adminpassword=${adminpassword:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} - queryportgs=${queryportgs:-"0"} - steamport=${steamport:-"0"} - steammasterport=${steammasterport:-"0"} - lanport=${lanport:-"0"} - httpport=${httpport:-"0"} - webadminenabled=${webadminenabled:-"NOT SET"} - webadminuser=${webadminuser:-"NOT SET"} - webadminpass=${webadminpass:-"NOT SET"} - fi - - # Parameters - defaultmap=${defaultmap:-"NOT SET"} -} - -fn_info_game_kf2() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - adminpassword="${unavailable}" - port=${zero} - queryport=${zero} - webadminenabled="${unavailable}" - httpport="${zero}" - webadminuser="${unavailable}" - webadminpass="${unavailable}" - else - servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "GamePassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/GamePassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - adminpassword=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - port=$(grep "Port" "${servercfgdir}/LinuxServer-KFEngine.ini" | sed -e 's/^[ \t]*//g' | grep "^Port" | grep -v "#" | tr -cd '[:digit:]') - webadminenabled=$(grep "bEnabled" "${servercfgdir}/KFWeb.ini" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bEnabled//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - httpport=$(grep "ListenPort" "${servercfgdir}/KFWeb.ini" | grep -v "#" | tr -cd '[:digit:]') - webadminuser="Admin" - webadminpass=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - adminpassword=${adminpassword:-"NOT SET"} - port=${port:-"0"} - webadminenabled=${webadminenabled:-"NOT SET"} - httpport=${webadminport:-"0"} - webadminuser=${webadminuser:-"NOT SET"} - webadminpass=${webadminpass:-"NOT SET"} - fi - - # Parameters - queryport=${queryport:-"0"} - defaultmap=${defaultmap:-"NOT SET"} -} - -fn_info_game_lo() { - # Parameters - servername=${servername:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} - maxplayers=${slots:-"0"} -} - -fn_info_game_mc() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - rconpassword="${unavailable}" - rconport="${zero}" - maxplayers="${zero}" - port="${zero}" - queryport="${zero}" - queryenabled="${unavailable}" - gamemode="${unavailable}" - gameworld="${unavailable}" - else - servername=$(grep "motd" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/motd//g' | tr -d '=\";,:' | sed 's/\\u00A70//g;s/\\u00A71//g;s/\\u00A72//g;s/\\u00A73//g;s/\\u00A74//g;s/\\u00A75//g;s/\\u00A76//g;s/\\u00A77//g;s/\\u00A78//g;s/\\u00A79//g;s/\\u00A7a//g;s/\\u00A7b//g;s/\\u00A7c//g;s/\\u00A7d//g;s/\\u00A7e//g;s/\\u00A7f//g;s/\\u00A7l//g;s/\\u00A7o//g;s/\\u00A7n//g;s/\\u00A7m//g;s/\\u00A7k//g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconpassword=$(grep "rcon.password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/rcon.password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconport=$(grep "rcon.port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - maxplayers=$(grep "max-players" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - port=$(grep "server-port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - queryport=$(grep "query.port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - if [ -z "${queryport}" ]; then - queryport=${port} - fi - queryenabled=$(grep "enable-query" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/enable-query//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - gamemode=$(grep "gamemode" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - gameworld=$(grep "level-name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/level-name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - configip=$(grep "server-ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/server-ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - servername=${servername:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} - rconport=${rconport:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"NOT SET"} - queryport=${queryport:-"NOT SET"} - queryenabled="${queryenabled:-"NOT SET"}" - gamemode=${gamemode:-"NOT SET"} - gameworld=${gameworld:-"NOT SET"} - configip=${configip:-"0.0.0.0"} - fi -} - -fn_info_game_mcb() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - maxplayers="${zero}" - port="${zero}" - portipv6="${zero}" - queryport="${zero}" - gamemode="${unavailable}" - gameworld="${unavailable}" - else - servername=$(grep "server-name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/server-name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "max-players" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - port=$(grep "server-port\b" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - portipv6=$(grep "server-portv6\b" "${servercfgfullpath}" | sed 's/v6//g' | grep -v "#" | tr -cd '[:digit:]') - queryport=${port} - gamemode=$(grep "gamemode" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/gamemode//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - gameworld=$(grep "level-name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/level-name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - servername=${servername:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"NOT SET"} - portipv6=${portipv6:-"NOT SET"} - queryport=${queryport:-"NOT SET"} - gamemode=${gamemode:-"NOT SET"} - gameworld=${gameworld:-"NOT SET"} - fi -} - -fn_info_game_mh() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - rconpassword="${unavailable}" - maxplayers="${unavailable}" - else - servername=$(grep "ServerName" "${servercfgfullpath}" | awk -F '=' '{print $2}') - serverpassword=$(grep "ServerPassword" "${servercfgfullpath}" | awk -F '=' '{print $2}') - rconpassword=$(grep "AdminPassword" "${servercfgfullpath}" | awk -F '=' '{print $2}') - maxplayers=$(grep "MaxSlots" "${servercfgfullpath}" | awk -F '=' '{print $2}') - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi - - # Parameters - port=${port:-"0"} - queryport=${queryport:-"0"} - beaconport=${beaconport:-"0"} -} - -fn_info_game_mohaa() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - rconpassword="${unavailable}" - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - else - rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta rconpassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - - # Not set - rconpassword=${rconpassword:-"NOT SET"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi - - # Parameters - port=${port:-"0"} - queryport=${port:-"0"} - defaultmap=${defaultmap:-"NOT SET"} -} - -fn_info_game_mom() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - defaultmap="${unavailable}" - else - servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "ServerPassword" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/ServerPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/MaxPlayers//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - defaultmap=$(grep "MapName" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/MapName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - defaultmap=${defaultmap:-"NOT SET"} - fi - - # Parameters - port=${port:-"7777"} - beaconport=${queryport:-"15000"} -} - -fn_info_game_mta() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - port=${zero} - queryport=${zero} - httpport=${zero} - ase="${unavailable}" - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - else - port=$(grep -m 1 "serverport" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<" | tr -cd '[:digit:]') - queryport=$((port + 123)) - httpport=$(grep -m 1 "httpport" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<" | tr -cd '[:digit:]') - servername=$(grep -m 1 "servername" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<") - serverpassword=$(grep -m 1 "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<") - maxplayers=$(grep -m 1 "maxplayers" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<" | tr -cd '[:digit:]') - ase=$(grep -m 1 "ase" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<" | tr -cd '[:digit:]') - if [ "${ase}" == "1" ]; then - ase="Enabled" - else - ase="Disabled" - fi - - # Not set - port=${port:-"22003"} - queryport=${queryport:-"2326"} - httpport=${httpport:-"22005"} - ase=${ase:-"Disabled"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi - -} - -fn_info_game_nec() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - servername="Necesse" - serverpassword="${unavailable}" - else - maxplayers=$(grep "slots" "${servercfgfullpath}" | cut -f1 -d "/" | tr -cd '[:digit:]') - port=$(grep "port" "${servercfgfullpath}" | cut -f1 -d "/" | tr -cd '[:digit:]') - serverpassword=$(grep "password" "${servercfgfullpath}" | cut -f1 -d "/" | tr -cd '[:digit:]') - - # Not set - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - servername="Necesse Port ${port}" - serverpassword=${serverpassword:-"NOT SET"} - fi -} - -fn_info_game_onset() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - maxplayers="${zero}" - port="${zero}" - httpport="${zero}" - queryport="${zero}" - else - servername=$(grep -v "servername_short" "${servercfgfullpath}" | grep "servername" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/servername//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "maxplayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - port=$(grep "port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - httpport=$((port - 2)) - queryport=$((port - 1)) - - # Not set - servername=${servername:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"NOT SET"} - httpport=${httpport:-"NOT SET"} - queryport=${queryport:-"NOT SET"} - fi -} - -fn_info_game_pc() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - port="${zero}" - queryport="${zero}" - steamport="${zero}" - else - servername=$(grep "name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "password " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - port=$(grep "hostPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - queryport=$(grep "queryPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - steamport=$(grep "steamPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"NOT SET"} - queryport=${queryport:-"NOT SET"} - steamport=${steamport:-"NOT SET"} - fi -} - -fn_info_game_pc2() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - port="${zero}" - queryport="${zero}" - steamport="${zero}" - else - servername=$(grep "name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "password " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - port=$(grep "hostPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - queryport=$(grep "queryPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - steamport=$(grep "steamPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"NOT SET"} - queryport=${queryport:-"NOT SET"} - steamport=${steamport:-"NOT SET"} - fi -} - -fn_info_game_pstbs() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - maxplayers="${unavailable}" - reservedslots="${unavailable}" - else - servername=$(grep "ServerName=" "${servercfgfullpath}" | sed -e 's/^[ \t]//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=";,:' | sed -e 's/^[ \t]//' -e 's/[ \t]*$//') - maxplayers=$(grep "MaxPlayers=" "${servercfgfullpath}" | tr -cd '[:digit:]') - reservedslots=$(grep "NumReservedSlots=" "${servercfgfullpath}" | tr -cd '[:digit:]') - - # Not set - servername=${servername:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - reservedslots=${reservedslots:-"0"} - fi - - if [ ! -f "${servercfgdir}/Rcon.cfg" ]; then - rconport=${unavailable} - rconpassword=${unavailable} - else - rconport=$(grep "Port=" "${servercfgdir}/Rcon.cfg" | tr -cd '[:digit:]') - rconpassword=$(grep "Password=" "${servercfgdir}/Rcon.cfg" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - rconport=${rconport:-"0"} - if [ -z "${rconpassword}" ] || [ ${#rconpassword} == 1 ]; then - rconpassword="NOT SET" - fi - fi - - # Parameters - port=${port:-"0"} - if [ -z "${queryport}" ]; then - queryport=${port:-"0"} - fi - rconport=${rconport:-"0"} - randommap=${randommap:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - reservedslots=${reservedslots:-"0"} -} - -fn_info_game_pvr() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - maxplayers="${unavailable}" - else - servername=$(grep "ServerName" "${servercfgfullpath}" | awk -F '=' '{print $2}') - maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | awk -F '=' '{print $2}') - - # Not set - servername=${servername:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi - - # Parameters - port=${port:-"0"} - port401=$((port + 400)) - queryport=${port:-"0"} -} - -fn_info_game_prism3d() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - maxplayers="${unavailable}" - port="${zero}" - queryport="${zero}" - servername="${unavailable}" - serverpassword="${unavailable}" - else - maxplayers=$(sed -nr 's/^\s*max_players\s*:\s*([0-9]+)/\1/p' "${servercfgfullpath}") - port=$(sed -nr 's/^\s*connection_dedicated_port\s*:\s*([0-9]+)/\1/p' "${servercfgfullpath}") - queryport=$(sed -nr 's/^\s*query_dedicated_port\s*:\s*([0-9]+)/\1/p' "${servercfgfullpath}") - servername=$(sed -nr 's/^\s*lobby_name\s*:\s*"?([^"\r\n]+)"?/\1/p' "${servercfgfullpath}") - serverpassword=$(sed -nr 's/^\s*password\s*:\s*"(.*)"/\1/p' "${servercfgfullpath}") - - # Not set - maxplayers=${maxplayers:-"0"} - port=${port:-"27015"} - queryport=${queryport:-"27016"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - fi -} - -fn_info_game_pz() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - rconpassword="${unavailable}" - maxplayers="${zero}" - port="${zero}" - queryport="${zero}" - gameworld="${unavailable}" - else - servername=$(grep "PublicName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/PublicName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "Password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^Password" | sed -e '/^#/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconpassword=$(grep "RCONPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/RCONPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - port=$(grep "DefaultPort" "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport=${port} - gameworld=$(grep "Map" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^Map" | sed -e '/^#/d' -e 's/Map//g' | tr -d '=\";' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - queryport=${queryport:-"0"} - gameworld=${gameworld:-"NOT SET"} - fi - - # Parameters - adminpassword=${adminpassword:-"NOT SET"} - -} - -fn_info_game_q2() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - rconpassword="${unavailable}" - servername="${unavailable}" - maxplayers="${zero}" - else - rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - - # Not set - rconpassword=${rconpassword:-"NOT SET"} - servername=${servername:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi - - # Parameters - port=${port:-"0"} - queryport=${port} - defaultmap=${defaultmap:-"NOT SET"} -} - -fn_info_game_q3() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - rconpassword="${unavailable}" - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - else - rconpassword=$(grep "zmq_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set zmq_rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - - # Not set - rconpassword=${rconpassword:-"NOT SET"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi - - # Parameters - port=${port:-"0"} - queryport=${port} - defaultmap=${defaultmap:-"NOT SET"} -} - -fn_info_game_ql() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - rconpassword="${unavailable}" - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - port="${zero}" - queryport="${zero}" - rconport="${zero}" - statsport="${zero}" - else - rconpassword=$(grep "zmq_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set zmq_rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "sv_maxClients" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - port=$(grep "net_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - queryport=${port} - rconport=$(grep "zmq_rcon_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - statsport=$(grep "zmq_stats_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - configip=$(grep "set net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set net_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - rconpassword=${rconpassword:-"NOT SET"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - queryport=${queryport:-"0"} - rconport=${rconport:-"0"} - statsport=${statsport:-"0"} - configip=${configip:-"0.0.0.0"} - fi -} - -fn_info_game_qw() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - rconpassword="${unavailable}" - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - port="${zero}" - else - rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "/") - servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "/") - maxplayers=$(grep "maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - - # Not set - rconpassword=${rconpassword:-"NOT SET"} - servername=${servername:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi - - # Parameters - port=${port:-"0"} - queryport=${port} -} - -fn_info_game_ro() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - adminpassword="${unavailable}" - port="${zero}" - queryport="${zero}" - steamport="${zero}" - steammasterport="${zero}" - lanport="${zero}" - httpport="${zero}" - webadminenabled="${unavailable}" - webadminuser="${unavailable}" - webadminpass="${unavailable}" - else - servername=$(sed -nr 's/^ServerName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - serverpassword=$(sed -nr 's/^GamePassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - adminpassword=$(sed -nr 's/^AdminPassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - port=$(sed -nr 's/^Port=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport=$((port + 1)) - steamport="20610" - steammasterport="28902" - lanport=$(grep "LANServerPort=" "${servercfgfullpath}" | tr -cd '[:digit:]') - httpport=$(sed -nr 's/^ListenPort=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') - webadminenabled=$(sed -nr 's/^bEnabled=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - webadminuser=$(sed -nr 's/^AdminName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - webadminpass="${adminpassword}" - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - adminpassword=${adminpassword:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} - steamport=${steamport:-"0"} - steammasterport=${steammasterport:-"0"} - lanport=${lanport:-"0"} - httpport=${httpport:-"0"} - webadminenabled=${webadminenabled:-"NOT SET"} - webadminuser=${webadminuser:-"NOT SET"} - webadminpass=${webadminpass:-"NOT SET"} - fi - - # Parameters - defaultmap=${defaultmap:-"NOT SET"} -} - -fn_info_game_rtcw() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - rconpassword="${unavailable}" - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - else - rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - - # Not set - rconpassword=${rconpassword:-"NOT SET"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi - - # Parameters - port=${port:-"0"} - queryport=${port:-"0"} - defaultmap=${defaultmap:-"NOT SET"} -} - -fn_info_game_rust() { - # Parameters - servername=${servername:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} - appport=${appport:-"0"} - rconport=${rconport:-"0"} - gamemode=${gamemode:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - rconpassword=${rconpassword:-"NOT SET"} - rconweb=${rconweb:-"NOT SET"} - tickrate=${tickrate:-"0"} - saveinterval=${saveinterval:-"0"} - serverlevel=${serverlevel:-"NOT SET"} - customlevelurl=${customlevelurl:-"NOT SET"} - worldsize=${worldsize:-"0"} - if [ -n "${seed}" ]; then - seed=${seed:-"0"} - elif [ -f "${datadir}/${selfname}-seed.txt" ]; then - seed=$(cat "${datadir}/${selfname}-seed.txt") - else - seed="0" - fi - salt=${salt:-"0"} -} - -fn_info_game_rw() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - rconpassword="${unavailable}" - rconport="${zero}" - maxplayers="${zero}" - port="${zero}" - port2="${zero}" - port3="${zero}" - port4="${zero}" - queryport="${zero}" - gamemode="${unavailable}" - gameworld="${unavailable}" - else - servername=$(grep "server_name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/server_name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "server_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/server_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconport=$(grep "rcon_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - maxplayers=$(grep "settings_max_players" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - port=$(grep "server_port" "${servercfgfullpath}" | grep -v "database_mysql_server_port" | grep -v "#" | tr -cd '[:digit:]') - port2=$((port + 1)) - port3=$((port + 2)) - port4=$((port + 3)) - queryport="${port}" - httpqueryport=$((port - 1)) - gamemode=$(grep "settings_default_gamemode=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/settings_default_gamemode//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - gameworld=$(grep "server_world_name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/server_world_name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - configip=$(grep "server_ip" "${servercfgfullpath}" | grep -v "database_mysql_server_ip" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/server_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} - rconport=${rconport:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - port2=${port2:-"0"} - port3=${port3:-"0"} - port4=${port4:-"0"} - queryport=${queryport:-"0"} - httpqueryport=${httpport:-"0"} - gamemode=${gamemode:-"NOT SET"} - gameworld=${gameworld:-"NOT SET"} - configip=${configip:-"0.0.0.0"} - fi -} - -fn_info_game_samp() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="unnamed server" - rconpassword="${unavailable}" - port="7777" - rconport="${port}" - maxplayers="50" - else - servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/^rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - port=$(grep "port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - queryport=${port} - rconport=${port} - maxplayers=$(grep "maxplayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - - # Not set - servername=${servername:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} - port=${port:-"7777"} - queryport=${port:-"7777"} - rconport=${rconport:-"7777"} - maxplayers=${maxplayers:-"12"} - fi -} - -fn_info_game_sb() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - queryenabled="${unavailable}" - rconenabled="${unavailable}" - rconpassword="${unavailable}" - port="21025" - queryport="21025" - rconport="21026" - maxplayers="8" - else - servername=$(grep "serverName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e 's/serverName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - queryenabled=$(grep "runQueryServer" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e 's/runQueryServer//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconenabled=$(grep "runRconServer" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e 's/runRconServer//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconpassword=$(grep "rconServerPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e 's/rconServerPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - port=$(grep "gameServerPort" "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport=$(grep "queryServerPort" "${servercfgfullpath}" | tr -cd '[:digit:]') - rconport=$(grep "rconServerPort" "${servercfgfullpath}" | tr -cd '[:digit:]') - maxplayers=$(grep "maxPlayers" "${servercfgfullpath}" | tr -cd '[:digit:]') - - # Not set - servername=${servername:-"NOT SET"} - queryenabled=${queryenabled:-"NOT SET"} - rconenabled=${rconenabled:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} - port=${port:-"21025"} - queryport=${queryport:-"21025"} - rconport=${rconport:-"21026"} - maxplayers=${maxplayers:-"8"} - fi -} - -fn_info_game_sbots() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - maxplayers="${unavailable}" - else - servername=$(grep "ServerName=" "${servercfgfullpath}" | sed -e 's/^[ \t]//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=";,:' | sed -e 's/^[ \t]//' -e 's/[ \t]*$//') - maxplayers=$(grep "MaxPlayers=" "${servercfgfullpath}" | tr -cd '[:digit:]') - - # Not set - servername=${servername:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi - - # Parameters - port=${port:-"0"} - queryport=${queryport:-"0"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - defaultmap=${defaultmap:-"NOT SET"} - maxplayers=${maxplayers:-"0"} -} - -fn_info_game_scpsl() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername=${servername:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - configip=${configip:-"0.0.0.0"} - tickrate=${tickrate:-"NOT SET"} - adminpassword=${adminpassword:-"NOT SET"} - else - servername=$(sed -nr 's/^server_name: (.*)$/\1/p' "${servercfgfullpath}") - maxplayers=$(sed -nr 's/^max_players: (.*)$/\1/p' "${servercfgfullpath}") - configip=$(sed -nr 's/^ipv4_bind_ip: (.*)$/\1/p' "${servercfgfullpath}") - tickrate=$(sed -nr 's/^server_tickrate: (.*)$/\1/p' "${servercfgfullpath}") - adminpassword=$(sed -nr 's/^administrator_query_password: (.*)$/\1/p' "${servercfgfullpath}") - fi - - # Parameters - port=${port:-"0"} - queryport=${port} -} - -fn_info_game_sdtd() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - port="${zero}" - port3="${zero}" - queryport="${zero}" - webadminenabled="${unavailable}" - webadminport="${zero}" - webadminpass="${unavailable}" - telnetenabled="${unavailable}" - telnetport="${zero}" - telnetpass="${unavailable}" - telnetip="${unavailable}" - maxplayers="${unavailable}" - gamemode="${unavailable}" - gameworld="${unavailable}" - else - servername=$(grep "ServerName" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") - serverpassword=$(grep "ServerPassword" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") - port=$(grep "ServerPort" "${servercfgfullpath}" | grep -Eo 'value="[0-9]+"' | tr -cd '[:digit:]') - port3=$((port + 2)) - queryport=${port:-"0"} - webadminenabled=$(grep "ControlPanelEnabled" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") - webadminport=$(grep "ControlPanelPort" "${servercfgfullpath}" | tr -cd '[:digit:]') - webadminpass=$(grep "ControlPanelPassword" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") - telnetenabled=$(grep "TelnetEnabled" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") - telnetport=$(grep "TelnetPort" "${servercfgfullpath}" | tr -cd '[:digit:]') - telnetpass=$(grep "TelnetPassword" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") - # Telnet IP will be localhost if no password is set - # check_ip will set the IP first. This will overwrite it. - if [ -z "${telnetpass}" ]; then - telnetip="127.0.0.1" - fi - maxplayers=$(grep "ServerMaxPlayerCount" "${servercfgfullpath}" | tr -cd '[:digit:]') - gamemode=$(grep "GameMode" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") - gameworld=$(grep "GameWorld" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} - webadminenabled=${webadminenabled:-"NOT SET"} - webadminport=${webadminport:-"0"} - webadminpass=${webadminpass:-"NOT SET"} - telnetenabled=${telnetenabled:-"NOT SET"} - telnetport=${telnetport:-"0"} - telnetpass=${telnetpass:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - gamemode=${gamemode:-"NOT SET"} - gameworld=${gameworld:-"NOT SET"} - fi -} - -fn_info_game_sf() { - # Parameters - servername=${selfname:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} - beaconport=${beaconport:-"0"} -} - -fn_info_game_sof2() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - rconpassword="${unavailable}" - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - else - rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - - # Not set - rconpassword=${rconpassword:-"NOT SET"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi - - # Parameters - port=${port:-"0"} - queryport=${port} - defaultmap=${defaultmap:-"NOT SET"} -} - -fn_info_game_sol() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - adminpassword="${unavailable}" - maxplayers="${unavailable}" - port="${zero}" - queryport="${zero}" - servername="${unavailable}" - serverpassword="${unavailable}" - else - adminpassword=$(grep "Admin_Password=" "${servercfgfullpath}" | awk -F '=' '{print $2}') - maxplayers=$(grep "Max_Players=" "${servercfgfullpath}" | tr -cd '[:digit:]') - port=$(grep "Port=" "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport="${port}" - filesport=$((port + 10)) - servername=$(grep "Server_Name=" "${servercfgfullpath}" | awk -F '=' '{print $2}') - serverpassword=$(grep "Game_Password=" "${servercfgfullpath}" | awk -F '=' '{print $2}') - - # Not set - adminpassword=${adminpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"23073"} - queryport=${queryport:-"23083"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - fi -} - -fn_info_game_source() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - rconpassword="${unavailable}" - else - servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "sv_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/sv_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} - fi - - # Parameters - defaultmap=${defaultmap:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - rconport=${port:-"0"} - queryport=${port:-"0"} - clientport=${clientport:-"0"} - # Steamport can be between 26901-26910 and is normaly automatically set. - # Some servers might support -steamport parameter to set - if [ "${steamport}" == "0" ] || [ -v "${steamport}" ]; then - steamport="$(echo "${ssinfo}" | grep "${srcdslinuxpid}" | awk '{print $5}' | grep ":269" | cut -d ":" -f2)" - fi -} - -fn_info_game_spark() { - defaultmap=${defaultmap:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - queryport=$((port + 1)) - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - webadminuser=${webadminuser:-"NOT SET"} - webadminpass=${webadminpass:-"NOT SET"} - webadminport=${webadminport:-"0"} - # Commented out as displaying not set in details parameters - #mods=${mods:-"NOT SET"} -} - -fn_info_game_squad() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - maxplayers="${unavailable}" - else - servername=$(grep "ServerName=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "MaxPlayers=" "${servercfgfullpath}" | tr -cd '[:digit:]') - - servername=${servername:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi - - if [ ! -f "${servercfgdir}/Rcon.cfg" ]; then - rconport=${unavailable} - rconpassword=${unavailable} - else - rconport=$(grep "Port=" "${servercfgdir}/Rcon.cfg" | tr -cd '[:digit:]') - rconpassword=$(grep "Password=" "${servercfgdir}/Rcon.cfg" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - rconport=${rconport:-"0"} - if [ -z "${rconpassword}" ] || [ ${#rconpassword} == 1 ]; then - rconpassword="NOT SET" - fi - - fi - - # Parameters - port=${port:-"0"} - queryport=${queryport:-"0"} -} - -fn_info_game_st() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - rconpassword="${unavailable}" - maxplayers="${unavailable}" - else - servername=$(grep "SERVERNAME" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/SERVERNAME//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "PASSWORD" "${servercfgfullpath}" | grep "^PASSWORD" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/PASSWORD//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconpassword=$(grep "RCONPASSWORD" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/RCONPASSWORD//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "MAXPLAYER" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/MAXPLAYER//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi - - # Parameters - port=${port:-"0"} - queryport=${queryport:-"0"} - httpport=${port:-"0"} - worldtype=${worldtype:-"NOT SET"} - autosaveinterval=${autosaveinterval:-"0"} - clearinterval=${clearinterval:-"0"} - worldname=${worldname:-"NOT SET"} -} - -fn_info_game_terraria() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - port="${zero}" - gameworld="${unavailable}" - maxplayers="${zero}" - queryport="${zero}" - else - servername=$(grep "worldname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/worldname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - port=$(grep "port" "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport=${port:-"0"} - gameworld=$(grep "world=" "${servercfgfullpath}" | grep -v "//" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/world=//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "maxplayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - - # Not set - servername=${servername:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} - gameworld=${gameworld:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi -} - -fn_info_game_stn() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - configip=${configip:-"0.0.0.0"} - port="${zero}" - queryport="${zero}" - serverpassword=${serverpassword:-"NOT SET"} - else - servername=$(sed -nr 's/^ServerName="(.*)"/\1/p' "${servercfgfullpath}") - configip=$(sed -nr 's/^ServerIP=([0-9]+)/\1/p' "${servercfgfullpath}") - port=$(sed -nr 's/^ServerPort=([0-9]+)/\1/p' "${servercfgfullpath}") - serverpassword=$(sed -nr 's/^ServerPassword=(.*)$/\1/p' "${servercfgfullpath}") - queryport=$((port + 1)) - - # Not set - serverpassword=${serverpassword:-"NOT SET"} - port=${port:-"0"} - serverpassword=${serverpassword:-"NOT SET"} - queryport=${queryport:-"0"} - fi -} - -fn_info_game_ti() { - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - maxplayers="${zero}" - else - servername=$(sed -nr 's/^ServerName="(.*)"/\1/p' "${servercfgfullpath}") - maxplayers=$(sed -nr 's/^MaxPlayerCount=([0-9]+)/\1/' "${servercfgfullpath}") - - # Not set - servername=${servername:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi - -} - -fn_info_game_ts3() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - dbplugin="${unavailable}" - port="9987" - queryport="10011" - querysshport="10022" - queryhttpport="10080" - queryhttpsport="10443" - fileport="30033" - telnetport="10011" - else - dbplugin=$(grep "dbplugin=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/dbplugin=//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - port=$(grep "default_voice_port" "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport=$(grep "query_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - querysshport=$(grep "query_ssh_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - queryhttpport=$(grep "query_http_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - queryhttpsport=$(grep "query_https_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - fileport=$(grep "filetransfer_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - telnetport="${queryport}" - configip=$(grep "voice_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/voice_ip//g' | sed 's/,.*//' | tr -d '=\";,' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - dbplugin=${dbplugin:-"NOT SET"} - port=${port:-"9987"} - queryport=${queryport:-"10011"} - querysshport=${querysshport:-"10022"} - queryhttpport=${queryhttpport:-"10080"} - queryhttpsport=${queryhttpsport:-"10443"} - fileport=${fileport:-"30033"} - telnetport=${telnetport:-"10011"} - configip=${configip:-"0.0.0.0"} - fi -} - -fn_info_game_tu() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - maxplayers="${zero}" - else - servername=$(grep "ServerTitle" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/ServerTitle//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - - # Not set - servername=${servername:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi - - # Parameters - port=${port:-"0"} - steamport=$((port + 1)) - queryport=${queryport:-"0"} -} - -fn_info_game_tw() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="unnamed server" - serverpassword="${unavailable}" - rconpassword="${unavailable}" - port="8303" - queryport="8303" - maxplayers="12" - else - servername=$(grep "sv_name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/^sv_name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^password" | sed -e '/^#/d' -e 's/^password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconpassword=$(grep "sv_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/^sv_rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - port=$(grep "sv_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - queryport="${port}" - maxplayers=$(grep "sv_max_clients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} - port=${port:-"8303"} - queryport=${port:-"8303"} - maxplayers=${maxplayers:-"12"} - fi -} - -fn_info_game_ut99() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - adminpassword="${unavailable}" - port="${zero}" - queryport="${zero}" - queryportgs="${zero}" - webadminenabled="${unavailable}" - webadminport="${zero}" - webadminuser="${unavailable}" - webadminpass="${unavailable}" - else - servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | sed 's/\r$//') - serverpassword=$(grep "GamePassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/GamePassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | sed 's/\r$//') - adminpassword=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | sed 's/\r$//') - port=$(grep "Port" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^Port" | grep -v "#" | tr -cd '[:digit:]') - queryport=$((port + 1)) - queryportgs=$(grep "OldQueryPortNumber" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - beaconport=$(grep "ServerBeaconPort" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - webadminenabled=$(grep "bEnabled" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bEnabled//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | sed 's/\r$//') - httpport=$(grep "ListenPort" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - webadminuser=$(grep "AdminUsername" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminUsername//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | sed 's/\r$//') - webadminpass=$(grep "UTServerAdmin.UTServerAdmin" "${servercfgfullpath}" -A 4 | grep "AdminPassword" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | sed 's/\r$//') - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - adminpassword=${adminpassword:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} - beaconport=${beaconport:-"8777"} - queryportgs=${queryportgs:-"0"} - webadminenabled=${webadminenabled:-"NOT SET"} - webadminport=${webadminport:-"0"} - webadminuser=${webadminuser:-"NOT SET"} - webadminpass=${webadminpass:-"NOT SET"} - fi - - # Parameters - defaultmap=${defaultmap:-"NOT SET"} -} - -fn_info_game_unreal2() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - adminpassword="${unavailable}" - port="${zero}" - queryport="${zero}" - queryportgs="${zero}" - webadminenabled="${unavailable}" - webadminport="${zero}" - webadminuser="${unavailable}" - webadminpass="${unavailable}" - else - servername=$(sed -nr 's/^ServerName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - serverpassword=$(sed -nr 's/^GamePassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - adminpassword=$(sed -nr 's/^AdminPassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - port=$(sed -nr 's/^Port=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport=$((port + 1)) - queryportgs=$(sed -nr 's/^OldQueryPortNumber=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') - webadminenabled=$(sed -nr 's/^bEnabled=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - webadminport=$(sed -nr 's/^ListenPort=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') - webadminuser=$(sed -nr 's/^AdminName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - webadminpass="${adminpassword}" - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - adminpassword=${adminpassword:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} - queryportgs=${queryportgs:-"0"} - webadminenabled=${webadminenabled:-"NOT SET"} - webadminport=${webadminport:-"0"} - webadminuser=${webadminuser:-"NOT SET"} - webadminpass=${webadminpass:-"NOT SET"} - fi - - # Parameters - defaultmap=${defaultmap:-"NOT SET"} -} - -fn_info_game_unt() { - # Parameters - servername=${selfname:-"NOT SET"} - port=${port:-"0"} - queryport=${port} - steamport=$((port + 1)) -} - -fn_info_game_ut() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - else - servername=$(grep "ServerName" "${servercfgfullpath}" | awk -F '=' '{print $2}') - - # Not set - servername=${servername:-"NOT SET"} - fi - - # Parameters - port=${port:-"0"} - queryport=$((port + 1)) -} - -fn_info_game_unreal2k4() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - adminpassword="${unavailable}" - port="${zero}" - queryport="${zero}" - queryportgs="${zero}" - lanport="${zero}" - webadminenabled="${unavailable}" - httpport="${zero}" - webadminuser="${unavailable}" - webadminpass="${unavailable}" - else - servername=$(sed -nr 's/^ServerName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - serverpassword=$(sed -nr 's/^GamePassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - adminpassword=$(sed -nr 's/^AdminPassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - port=$(sed -nr 's/^Port=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport=$((port + 1)) - queryportgs=$(sed -nr 's/^OldQueryPortNumber=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') - lanport=$(grep "LANServerPort=" "${servercfgfullpath}" | tr -cd '[:digit:]') - webadminenabled=$(sed -nr 's/^bEnabled=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - httpport=$(sed -nr 's/^ListenPort=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') - webadminuser=$(sed -nr 's/^AdminName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - webadminpass="${adminpassword}" - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - adminpassword=${adminpassword:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} - queryportgs=${queryportgs:-"0"} - lanport=${lanport:-"0"} - webadminenabled=${webadminenabled:-"NOT SET"} - httpport=${httpport:-"0"} - webadminuser=${webadminuser:-"NOT SET"} - webadminpass=${webadminpass:-"NOT SET"} - fi -} - -fn_info_game_ut3() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - adminpassword="${unavailable}" - maxplayers="${unavailable}" - webadminenabled="${unavailable}" - webadminport="${zero}" - webadminuser="${unavailable}" - webadminpass="${unavailable}" - else - servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "GamePassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/GamePassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - adminpassword=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - webadminenabled=$(grep "bEnabled" "${servercfgdir}/UTWeb.ini" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bEnabled//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - webadminport=$(grep "ListenPort" "${servercfgdir}/UTWeb.ini" | grep -v "#" | tr -cd '[:digit:]') - webadminuser="Admin" - webadminpass=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - adminpassword=${adminpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - webadminenabled=${webadminenabled:-"NOT SET"} - webadminport=${webadminport:-"0"} - webadminuser=${webadminuser:-"NOT SET"} - webadminpass=${webadminpass:-"NOT SET"} - fi - - # Parameters - port=${port:-"0"} - queryport=${queryport:-"0"} - defaultmap=${defaultmap:-"NOT SET"} -} - -fn_info_game_vh() { - # Parameters - port=${port:-"0"} - # Query port only enabled if public server - if [ "${public}" != "0" ]; then - queryport=$((port + 1)) - else - querymode="1" - fi - gameworld=${gameworld:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - servername=${servername:-"NOT SET"} -} - -fn_info_game_vints() { - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - maxplayers="${unavailable}" - serverpassword="${unavailable}" - port="${port:-"0"}" - else - servername=$(jq -r '.ServerName' "${servercfgfullpath}") - maxplayers=$(jq -r '.MaxClients' "${servercfgfullpath}") - serverpassword=$(jq -r 'select(.Password != null) | .Password' "${servercfgfullpath}") - port=$(jq -r '.Port' "${servercfgfullpath}") - configip=$(jq -r 'select(.Ip != null) | .Ip' "${servercfgfullpath}") - fi - queryport=${port:-"0"} - serverpassword=${serverpassword:-"NOT SET"} - configip=${configip:-"0.0.0.0"} -} - -fn_info_game_vpmc() { - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - configip="0.0.0.0" - port="25577" - else - servername=$(sed -nr 's/^motd\s*=\s*"(.*)"/\1/p' "${servercfgfullpath}") - bindaddress=$(sed -nr 's/^bind\s*=\s*"([0-9.:]+)"/\1/p' "${servercfgfullpath}") - configip=$(echo "${bindaddress}" | cut -d ':' -f 1) - port=$(echo "${bindaddress}" | cut -d ':' -f 2) - - servername=${servername:-"NOT SET"} - fi - queryport=${port:-"25577"} -} - -fn_info_game_wet() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - rconpassword="${unavailable}" - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - port="${zero}" - queryport="${zero}" - else - port=$(grep "set net_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - queryport="${port}" - rconpassword=$(grep "set zmq_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set zmq_rcon_password //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//g' -e '/^\//d' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - servername=$(grep "set sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "set g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "set sv_maxclients" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - configip=$(grep "set net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set net_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - rconpassword=${rconpassword:-"NOT SET"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"27960"} - queryport=${queryport:-"27960"} - configip=${configip:-"0.0.0.0"} - fi -} - -fn_info_game_wf() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - rconpassword="${unavailable}" - servername="${unavailable}" - maxplayers="${zero}" - else - rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - - # Not set - rconpassword=${rconpassword:-"NOT SET"} - servername=${servername:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi - - # Parameters - port=${port:-"0"} - queryport="${port:-"0"}" - webadminport=${webadminport:-"0"} -} - -fn_info_game_wmc() { - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - maxplayers="${zero}" - port="${zero}" - queryport="${zero}" - queryenabled="${unavailable}" - else - servername=$(sed -e '/^listeners:/,/^[a-z]/!d' "${servercfgfullpath}" | sed -nr 's/^[ ]+motd: (.*)$/\1/p' | tr -d "'" | sed 's/&1//') - queryport=$(sed -nr 's/^[ -]+query_port: ([0-9]+)/\1/p' "${servercfgfullpath}") - queryenabled=$(sed -nr 's/^[ ]+query_enabled: (.*)$/\1/p' "${servercfgfullpath}") - port=$(sed -nr 's/^[ ]+host: [0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:([0-9]+)/\1/p' "${servercfgfullpath}") - # the normal max_players does only show in on the client side and has no effect how many players can connect. - maxplayers=$(sed -nr 's/^player_limit: ([-]*[0-9])/\1/p' "${servercfgfullpath}") - configip=$(sed -nr 's/^[ ]+host: ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+):[0-9]+/\1/p' "${servercfgfullpath}") - - if [ "${maxplayers}" == "-1" ] || [ "${maxplayers}" == "0" ]; then - maxplayers="UNLIMITED" - fi - - # Not set - servername=${servername:-"NOT SET"} - queryport=${queryport:-"25577"} - maxplayers=${maxplayers:-"0"} - configip=${configip:-"0.0.0.0"} - fi -} - -fn_info_game_wurm() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - port="${zero}" - queryport="${zero}" - rconpassword="${unavailable}" - servername="${unavailable}" - serverpassword="${unavailable}" - adminpassword="${unavailable}" - maxplayers="${zero}" - else - port=$(grep "EXTERNALPORT=" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - queryport=$(grep "QUERYPORT=" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - servername=$(grep "SERVERNAME=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/SERVERNAME//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "SERVERPASSWORD=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/SERVERPASSWORD//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - adminpassword=$(grep "ADMINPWD=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/ADMINPWD//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "MAXPLAYERS=" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - configip=$(grep "IP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/IP//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not set - port=${port:-"3724"} - queryport=${queryport:-"27017"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - adminpassword=${adminpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi -} - -unavailable="${red}UNAVAILABLE${default}" -zero="${red}0${default}" - -if [ "${shortname}" == "ac" ]; then - fn_info_game_ac -elif [ "${shortname}" == "ark" ]; then - fn_info_game_ark -elif [ "${shortname}" == "arma3" ]; then - fn_info_game_arma3 -elif [ "${shortname}" == "armar" ]; then - fn_info_game_armar -elif [ "${shortname}" == "av" ]; then - fn_info_game_av -elif [ "${shortname}" == "bf1942" ]; then - fn_info_game_bf1942 -elif [ "${shortname}" == "bfv" ]; then - fn_info_game_bfv -elif [ "${shortname}" == "bo" ]; then - fn_info_game_bo -elif [ "${shortname}" == "bt" ]; then - fn_info_game_bt -elif [ "${shortname}" == "btl" ]; then - fn_info_game_btl -elif [ "${shortname}" == "cd" ]; then - fn_info_game_cd -elif [ "${shortname}" == "ck" ]; then - fn_info_game_ck -elif [ "${shortname}" == "cmw" ]; then - fn_info_game_cmw -elif [ "${shortname}" == "cod" ]; then - fn_info_game_cod -elif [ "${shortname}" == "coduo" ]; then - fn_info_game_cod -elif [ "${shortname}" == "cod2" ]; then - fn_info_game_cod2 -elif [ "${shortname}" == "cod4" ]; then - fn_info_game_cod4 -elif [ "${shortname}" == "codwaw" ]; then - fn_info_game_codwaw -elif [ "${shortname}" == "col" ]; then - fn_info_game_col -elif [ "${shortname}" == "dayz" ]; then - fn_info_game_dayz -elif [ "${shortname}" == "dodr" ]; then - fn_info_game_dodr -elif [ "${shortname}" == "dst" ]; then - fn_info_game_dst -elif [ "${shortname}" == "eco" ]; then - fn_info_game_eco -elif [ "${shortname}" == "etl" ]; then - fn_info_game_etl -elif [ "${shortname}" == "fctr" ]; then - fn_info_game_fctr -elif [ "${shortname}" == "hw" ]; then - fn_info_game_hw -elif [ "${shortname}" == "inss" ]; then - fn_info_game_inss -elif [ "${shortname}" == "jc2" ]; then - fn_info_game_jc2 -elif [ "${shortname}" == "jc3" ]; then - fn_info_game_jc3 -elif [ "${shortname}" == "jk2" ]; then - fn_info_game_jk2 -elif [ "${shortname}" == "kf" ]; then - fn_info_game_kf -elif [ "${shortname}" == "kf2" ]; then - fn_info_game_kf2 -elif [ "${shortname}" == "lo" ]; then - fn_info_game_lo -elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ]; then - fn_info_game_mc -elif [ "${shortname}" == "mcb" ]; then - fn_info_game_mcb -elif [ "${shortname}" == "mh" ]; then - fn_info_game_mh -elif [ "${shortname}" == "mohaa" ]; then - fn_info_game_mohaa -elif [ "${shortname}" == "mom" ]; then - fn_info_game_mom -elif [ "${shortname}" == "mta" ]; then - fn_info_game_mta -elif [ "${shortname}" == "nec" ]; then - fn_info_game_nec -elif [ "${shortname}" == "onset" ]; then - fn_info_game_onset -elif [ "${shortname}" == "pc" ]; then - fn_info_game_pc -elif [ "${shortname}" == "pc2" ]; then - fn_info_game_pc2 -elif [ "${shortname}" == "pstbs" ]; then - fn_info_game_pstbs -elif [ "${shortname}" == "pvr" ]; then - fn_info_game_pvr -elif [ "${shortname}" == "pz" ]; then - fn_info_game_pz -elif [ "${shortname}" == "q2" ]; then - fn_info_game_q2 -elif [ "${shortname}" == "q3" ]; then - fn_info_game_q3 -elif [ "${shortname}" == "ql" ]; then - fn_info_game_ql -elif [ "${shortname}" == "qw" ]; then - fn_info_game_qw -elif [ "${shortname}" == "ro" ]; then - fn_info_game_ro -elif [ "${shortname}" == "rtcw" ]; then - fn_info_game_rtcw -elif [ "${shortname}" == "rust" ]; then - fn_info_game_rust -elif [ "${shortname}" == "rw" ]; then - fn_info_game_rw -elif [ "${shortname}" == "samp" ]; then - fn_info_game_samp -elif [ "${shortname}" == "sb" ]; then - fn_info_game_sb -elif [ "${shortname}" == "sbots" ]; then - fn_info_game_sbots -elif [ "${shortname}" == "scpsl" ] || [ "${shortname}" == "scpslsm" ]; then - fn_info_game_scpsl -elif [ "${shortname}" == "sdtd" ]; then - fn_info_game_sdtd -elif [ "${shortname}" == "sf" ]; then - fn_info_game_sf -elif [ "${shortname}" == "sof2" ]; then - fn_info_game_sof2 -elif [ "${shortname}" == "sol" ]; then - fn_info_game_sol -elif [ "${engine}" == "spark" ]; then - fn_info_game_spark -elif [ "${shortname}" == "squad" ]; then - fn_info_game_squad -elif [ "${shortname}" == "st" ]; then - fn_info_game_st -elif [ "${shortname}" == "stn" ]; then - fn_info_game_stn -elif [ "${shortname}" == "terraria" ]; then - fn_info_game_terraria -elif [ "${shortname}" == "ti" ]; then - fn_info_game_ti -elif [ "${shortname}" == "ts3" ]; then - fn_info_game_ts3 -elif [ "${shortname}" == "tu" ]; then - fn_info_game_tu -elif [ "${shortname}" == "tw" ]; then - fn_info_game_tw -elif [ "${shortname}" == "unt" ]; then - fn_info_game_unt -elif [ "${shortname}" == "ut" ]; then - fn_info_game_ut -elif [ "${shortname}" == "ut2k4" ]; then - fn_info_game_unreal2k4 -elif [ "${shortname}" == "ut3" ]; then - fn_info_game_ut3 -elif [ "${shortname}" == "ut99" ]; then - fn_info_game_ut99 -elif [ "${shortname}" == "vh" ]; then - fn_info_game_vh -elif [ "${shortname}" == "vints" ]; then - fn_info_game_vints -elif [ "${shortname}" == "vpmc" ]; then - fn_info_game_vpmc -elif [ "${shortname}" == "wet" ]; then - fn_info_game_wet -elif [ "${shortname}" == "wf" ]; then - fn_info_game_wf -elif [ "${shortname}" == "wmc" ]; then - fn_info_game_wmc -elif [ "${shortname}" == "wurm" ]; then - fn_info_game_wurm -elif [ "${engine}" == "prism3d" ]; then - fn_info_game_prism3d -elif [ "${engine}" == "source" ] || [ "${engine}" == "goldsrc" ]; then - fn_info_game_source -elif [ "${engine}" == "unreal2" ]; then - fn_info_game_unreal2 -fi - -# External IP address -# Cache external IP address for 24 hours -if [ -f "${tmpdir}/extip.txt" ]; then - if [ "$(find "${tmpdir}/extip.txt" -mmin +1440)" ]; then - rm -f "${tmpdir:?}/extip.txt" - fi -fi - -if [ ! -f "${tmpdir}/extip.txt" ]; then - extip="$(curl --connect-timeout 10 -s https://api.ipify.org 2> /dev/null)" - exitcode=$? - # if curl passes add extip to externalip.txt - if [ "${exitcode}" != "0" ]; then - echo "Unable to get external IP address" - else - echo "${extip}" > "${tmpdir}/extip.txt" - fi -else - extip="$(cat "${tmpdir}/extip.txt")" -fi - -# Alert IP address -if [ "${displayip}" ]; then - alertip="${displayip}" -elif [ "${extip}" ]; then - alertip="${extip}" -else - alertip="${ip}" -fi - -# Steam Master Server - checks if detected by master server. -# Checked after config init, as the queryport is needed -if [ -z "${displaymasterserver}" ]; then - if [ "$(command -v jq 2> /dev/null)" ]; then - if [ "${ip}" ] && [ "${port}" ]; then - if [ "${steammaster}" == "true" ] || [ "${commandname}" == "DEV-QUERY-RAW" ]; then - # Will query server IP addresses first. - for queryip in "${queryips[@]}"; do - masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${queryip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" '.response.servers[] | select((.gameport == ($port|tonumber) or (.gameport == ($queryport|tonumber)))) | .addr' | wc -l 2> /dev/null)" - done - # Should that not work it will try the external IP. - if [ "${masterserver}" == "0" ]; then - masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${extip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" '.response.servers[] | select((.gameport == ($port|tonumber) or (.gameport == ($queryport|tonumber)))) | .addr' | wc -l 2> /dev/null)" - fi - if [ "${masterserver}" == "0" ]; then - displaymasterserver="false" - else - displaymasterserver="true" - fi - fi - fi - fi -fi diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh deleted file mode 100644 index 3766049c6..000000000 --- a/lgsm/functions/info_messages.sh +++ /dev/null @@ -1,1849 +0,0 @@ -#!/bin/bash -# LinuxGSM info_messages.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Defines server info messages for details and alerts. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -# Separator is different for details. -fn_messages_separator() { - if [ "${commandname}" == "DETAILS" ]; then - printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = - else - echo -e "=================================" - fi -} - -# Removes the passwords form all but details. -fn_info_message_password_strip() { - if [ "${commandname}" != "DETAILS" ]; then - if [ "${serverpassword}" ]; then - serverpassword="********" - fi - - if [ "${rconpassword}" ]; then - rconpassword="********" - fi - - if [ "${adminpassword}" ]; then - adminpassword="********" - fi - - if [ "${statspassword}" ]; then - statspassword="********" - fi - - if [ "${webadminpass}" ]; then - webadminpass="********" - fi - - if [ "${telnetpass}" ]; then - telnetpass="********" - fi - - if [ "${wsapikey}" ]; then - wsapikey="********" - fi - - if [ "${gslt}" ]; then - gslt="********" - fi - fi -} - -# Alert Summary -# used with alertlog -fn_info_message_head() { - echo -e "" - echo -e "${lightyellow}Alert Summary${default}" - fn_messages_separator - echo -e "Message" - echo -e "${alertbody}" - echo -e "" - echo -e "Game" - echo -e "${gamename}" - echo -e "" - echo -e "Server name" - echo -e "${servername}" - echo -e "" - echo -e "Hostname" - echo -e "${HOSTNAME}" - echo -e "" - echo -e "Server IP" - echo -e "${ip}:${port}" -} - -fn_info_message_distro() { - # - # Distro Details - # ================================= - # Date: Sun 21 Feb 2021 09:22:53 AM UTC - # Distro: Ubuntu 20.04.2 LTS - # Arch: x86_64 - # Kernel: 5.4.0-65-generic - # Hostname: server - # Uptime: 16d, 5h, 18m - # tmux: tmux 3.0a - # glibc: 2.31 - - echo -e "" - echo -e "${lightyellow}Distro Details${default}" - fn_messages_separator - { - echo -e "${lightblue}Date:\t${default}$(date)" - echo -e "${lightblue}Distro:\t${default}${distroname}" - echo -e "${lightblue}Arch:\t${default}${arch}" - echo -e "${lightblue}Kernel:\t${default}${kernel}" - echo -e "${lightblue}Hostname:\t${default}${HOSTNAME}" - echo -e "${lightblue}Uptime:\t${default}${days}d, ${hours}h, ${minutes}m" - echo -e "${lightblue}tmux:\t${default}${tmuxv}" - echo -e "${lightblue}glibc:\t${default}${glibcversion}" - if [ -n "${javaram}" ]; then - echo -e "${lightblue}Java:\t${default}${javaversion}" - fi - } | column -s $'\t' -t -} - -fn_info_message_server_resource() { - # - # Server Resource - # ================================= - # CPU - # Model: AMD EPYC 7601 32-Core Processor - # Cores: 2 - # Frequency: 2199.994MHz - # Avg Load: 0.01, 0.05, 0.18 - # - # Memory - # Mem: total used free cached available - # Physical: 3.9GB 350MB 3.3GB 3.2GB 3.3GB - # Swap: 512MB 55MB 458MB - # - # Storage - # Filesystem: /dev/sda - # Total: 79G - # Used: 73G - # Available: 1.4G - # - # Network - # IP: 0.0.0.0 - # Internet IP: 176.58.124.96 - - echo -e "" - echo -e "${lightyellow}Server Resource${default}" - fn_messages_separator - { - echo -e "${lightyellow}CPU\t${default}" - echo -e "${lightblue}Model:\t${default}${cpumodel}" - echo -e "${lightblue}Cores:\t${default}${cpucores}" - echo -e "${lightblue}Frequency:\t${default}${cpufreqency}MHz" - echo -e "${lightblue}Avg Load:\t${default}${load}" - } | column -s $'\t' -t - echo -e "" - { - echo -e "${lightyellow}Memory\t${default}" - echo -e "${lightblue}Mem:\t${lightblue}total\tused\tfree\tcached\tavailable${default}" - echo -e "${lightblue}Physical:\t${default}${physmemtotal}\t${physmemused}\t${physmemfree}\t${physmemcached}\t${physmemavailable}${default}" - echo -e "${lightblue}Swap:\t${default}${swaptotal}\t${swapused}\t${swapfree}${default}" - } | column -s $'\t' -t - echo -e "" - { - echo -e "${lightyellow}Storage${default}" - echo -e "${lightblue}Filesystem:\t${default}${filesystem}" - echo -e "${lightblue}Total:\t\t${default}${totalspace}" - echo -e "${lightblue}Used:\t\t${default}${usedspace}" - echo -e "${lightblue}Available:\t${default}${availspace}" - } | column -s $'\t' -t - echo -e "" - { - echo -e "${lightyellow}Network${default}" - if [ -n "${netint}" ]; then - echo -e "${lightblue}Interface:\t${default}${netint}" - fi - if [ -n "${netlink}" ]; then - echo -e "${lightblue}Link Speed:\t${default}${netlink}" - fi - echo -e "${lightblue}IP:\t${default}${ip}" - if [ "${ip}" != "${extip}" ]; then - echo -e "${lightblue}Internet IP:\t${default}${extip}" - fi - } | column -s $'\t' -t -} - -fn_info_message_gameserver_resource() { - # - # Game Server Resource Usage - # ================================= - # CPU Used: 1.1% - # Mem Used: 4.8% 189MB - # - # Storage - # Total: 241M - # Serverfiles: 240M - # Backups: 24K - - echo -e "" - echo -e "${lightyellow}Game Server Resource Usage${default}" - fn_messages_separator - { - if [ "${status}" != "0" ] && [ -v status ]; then - if [ -n "${cpuused}" ]; then - echo -e "${lightblue}CPU Used:\t${default}${cpuused}%${default}" - else - echo -e "${lightblue}CPU Used:\t${red}unknown${default}" - fi - if [ -n "${memused}" ]; then - echo -e "${lightblue}Mem Used:\t${default}${pmemused}%\t${memused}MB${default}" - else - echo -e "${lightblue}Mem Used:\t${default}${pmemused}\t${red}unknown${default}" - fi - else - echo -e "${lightblue}CPU Used:\t${default}0%${default}" - echo -e "${lightblue}Mem Used:\t${default}0%\t0MB${default}" - fi - } | column -s $'\t' -t - echo -e "" - { - echo -e "${lightyellow}Storage${default}" - echo -e "${lightblue}Total:\t${default}${rootdirdu}" - echo -e "${lightblue}Serverfiles:\t${default}${serverfilesdu}" - if [ -d "${backupdir}" ]; then - echo -e "${lightblue}Backups:\t${default}${backupdirdu}" - fi - } | column -s $'\t' -t -} - -fn_info_message_gameserver() { - # - # Counter-Strike: Global Offensive Server Details - # ================================= - # Server name: LinuxGSM - # Server IP: 0.0.0.0:27015 - # Internet IP: 176.48.124.96:34197 - # Server password: NOT SET - # RCON password: adminF54CC0VR - # Players: 0/16 - # Current map: de_mirage - # Default map: de_mirage - # Game type: 0 - # Game mode: 0 - # Tick rate: 64 - # Master Server: listed - # Status: STARTED - - echo -e "" - echo -e "${lightgreen}${gamename} Server Details${default}" - fn_info_message_password_strip - fn_messages_separator - { - # Server name - if [ -n "${gdname}" ]; then - echo -e "${lightblue}Server name:\t${default}${gdname}" - elif [ -n "${servername}" ]; then - echo -e "${lightblue}Server name:\t${default}${servername}" - fi - - # Server description - if [ -n "${serverdescription}" ]; then - echo -e "${lightblue}Server Description:\t${default}${serverdescription}" - fi - - # Appid - if [ -n "${appid}" ]; then - echo -e "${lightblue}App ID:\t${default}${appid}" - fi - - # Branch - if [ -n "${branch}" ]; then - echo -e "${lightblue}Branch:\t${default}${branch}" - fi - - # Beta Password - if [ -n "${betapassword}" ]; then - echo -e "${lightblue}Beta Password:\t${default}${betapassword}" - fi - - # Server Version - if [ -n "${gdversion}" ]; then - echo -e "${lightblue}Server Version:\t${default}${gdversion}" - fi - - # Server ip - echo -e "${lightblue}Server IP:\t${default}${ip}:${port}" - - # Internet ip - if [ -n "${extip}" ]; then - if [ "${ip}" != "${extip}" ]; then - echo -e "${lightblue}Internet IP:\t${default}${extip}:${port}" - fi - fi - - # Display ip - if [ -n "${displayip}" ]; then - echo -e "${lightblue}Display IP:\t${default}${displayip}:${port}" - fi - - # Server password - if [ -n "${serverpassword}" ]; then - echo -e "${lightblue}Server password:\t${default}${serverpassword}" - fi - - # Query enabled (Starbound) - if [ -n "${queryenabled}" ]; then - echo -e "${lightblue}Query enabled:\t${default}${queryenabled}" - fi - - # RCON enabled (Starbound) - if [ -n "${rconenabled}" ]; then - echo -e "${lightblue}RCON enabled:\t${default}${rconenabled}" - fi - - # RCON password - if [ -n "${rconpassword}" ]; then - echo -e "${lightblue}RCON password:\t${default}${rconpassword}" - fi - - # RCON web (Rust) - if [ -n "${rconweb}" ]; then - echo -e "${lightblue}RCON web:\t${default}${rconweb}" - fi - - # Admin password - if [ -n "${adminpassword}" ]; then - echo -e "${lightblue}Admin password:\t${default}${adminpassword}" - fi - - # Stats password (Quake Live) - if [ -n "${statspassword}" ]; then - echo -e "${lightblue}Stats password:\t${default}${statspassword}" - fi - - # Players - if [ "${querystatus}" != "0" ]; then - if [ -n "${maxplayers}" ]; then - echo -e "${lightblue}Maxplayers:\t${default}${maxplayers}" - fi - else - if [ -n "${gdplayers}" ] && [ -n "${gdmaxplayers}" ]; then - echo -e "${lightblue}Players:\t${default}${gdplayers}/${gdmaxplayers}" - elif [ -n "${gdplayers}" ] && [ -n "${maxplayers}" ]; then - echo -e "${lightblue}Players:\t${default}${gdplayers}/${maxplayers}" - elif [ -z "${gdplayers}" ] && [ -n "${gdmaxplayers}" ]; then - echo -e "${lightblue}Players:\t${default}0/${gdmaxplayers}" - elif [ -n "${gdplayers}" ] && [ -z "${gdmaxplayers}" ]; then - echo -e "${lightblue}Players:\t${default}${gdplayers}/∞" - elif [ -z "${gdplayers}" ] && [ -z "${gdmaxplayers}" ] && [ -n "${maxplayers}" ]; then - echo -e "${lightblue}Maxplayers:\t${default}${maxplayers}" - fi - fi - - # Reverved Slots - if [ -n "${statspassword}" ]; then - echo -e "${lightblue}Reserved Slots:\t${default}${reservedslots}" - fi - - # Bots - if [ -n "${gdbots}" ]; then - echo -e "${lightblue}Bots:\t${default}${gdbots}" - fi - - # Current map - if [ -n "${gdmap}" ]; then - echo -e "${lightblue}Current map:\t${default}${gdmap}" - fi - - # Default map - if [ -n "${defaultmap}" ]; then - echo -e "${lightblue}Default map:\t${default}${defaultmap}" - fi - - if [ -n "${defaultscenario}" ]; then - # Current scenario (Insurgency: Sandstorm) - if [ -n "${gdgamemode}" ]; then - echo -e "${lightblue}Current scenario:\t${default}${gdgamemode}" - fi - else - # Current game mode - if [ -n "${gdgamemode}" ]; then - echo -e "${lightblue}Current game mode:\t${default}${gdgamemode}" - fi - fi - - # Default scenario - if [ -n "${defaultscenario}" ]; then - echo -e "${lightblue}Default scenario:\t${default}${defaultscenario}" - fi - - # Game type - if [ -n "${gametype}" ]; then - echo -e "${lightblue}Game type:\t${default}${gametype}" - fi - - # Game mode - if [ -n "${gamemode}" ]; then - echo -e "${lightblue}Game mode:\t${default}${gamemode}" - fi - - # Game world - if [ -n "${gameworld}" ]; then - echo -e "${lightblue}Game world:\t${default}${gameworld}" - fi - - # Tick rate - if [ -n "${tickrate}" ]; then - echo -e "${lightblue}Tick rate:\t${default}${tickrate}" - fi - - # Sharding (Don't Starve Together) - if [ -n "${sharding}" ]; then - echo -e "${lightblue}Sharding:\t${default}${sharding}" - fi - - # Master (Don't Starve Together) - if [ -n "${master}" ]; then - echo -e "${lightblue}Master:\t${default}${master}" - fi - - # Shard (Don't Starve Together) - if [ -n "${shard}" ]; then - echo -e "${lightblue}Shard:\t${default}${shard}" - fi - - # Cluster (Don't Starve Together) - if [ -n "${cluster}" ]; then - echo -e "${lightblue}Cluster:\t${default}${cluster}" - fi - - # Cave (Don't Starve Together) - if [ -n "${cave}" ]; then - echo -e "${lightblue}Cave:\t${default}${cave}" - fi - - # Creativemode (Hurtworld) - if [ -n "${creativemode}" ]; then - echo -e "${lightblue}Creativemode:\t${default}${creativemode}" - fi - - # TeamSpeak dbplugin - if [ -n "${dbplugin}" ]; then - echo -e "${lightblue}dbplugin:\t${default}${dbplugin}" - fi - - # ASE (Multi Theft Auto) - if [ -n "${ase}" ]; then - echo -e "${lightblue}ASE:\t${default}${ase}" - fi - - # Save interval (Rust) - if [ -n "${saveinterval}" ]; then - echo -e "${lightblue}Save interval:\t${default}${saveinterval}s" - fi - - # Seed (Rust) - if [ -n "${seed}" ]; then - echo -e "${lightblue}Seed:\t${default}${seed}" - fi - - # Salt (Rust) - if [ -n "${salt}" ]; then - echo -e "${lightblue}Salt:\t${default}${salt}" - fi - - # World Size (Rust) - if [ -n "${worldsize}" ]; then - echo -e "${lightblue}World size:\t${default}${worldsize}m" - fi - - # Random map rotation mode (Squad and Post Scriptum) - if [ -n "${randommap}" ]; then - echo -e "${lightblue}Map rotation:\t${default}${randommap}" - fi - - # Server Version (Jedi Knight II: Jedi Outcast) - if [ -n "${serverversion}" ]; then - echo -e "${lightblue}Server Version:\t${default}${serverversion}" - fi - - # authentication token (Factorio) - if [ -n "${authtoken}" ]; then - echo -e "${lightblue}Auth Token:\t${default}${authtoken}" - fi - - # savegameinterval (Factorio) - if [ -n "${savegameinterval}" ]; then - echo -e "${lightblue}Savegame Interval:\t${default}${savegameinterval}" - fi - - # versioncount (Factorio) - if [ -n "${versioncount}" ]; then - echo -e "${lightblue}Version Count:\t${default}${versioncount}" - fi - - # Listed on Master server - if [ -n "${displaymasterserver}" ]; then - if [ "${displaymasterserver}" == "true" ]; then - echo -e "${lightblue}Master server:\t${green}listed${default}" - else - echo -e "${lightblue}Master server:\t${red}not listed${default}" - fi - fi - - # Game server status - if [ "${status}" == "0" ]; then - echo -e "${lightblue}Status:\t${red}STOPPED${default}" - else - echo -e "${lightblue}Status:\t${green}STARTED${default}" - fi - } | column -s $'\t' -t - echo -e "" -} - -fn_info_message_script() { - # csgoserver Script Details - # ================================= - # Script name: csgoserver - # LinuxGSM version: v21.1.3 - # glibc required: 2.18 - # Discord alert: off - # Email alert: off - # Gotify alert: off - # IFTTT alert: off - # Mailgun (email) alert: off - # Pushbullet alert: off - # Pushover alert: off - # Rocketchat alert: off - # Slack alert: off - # Telegram alert: off - # Update on start: off - # User: lgsm - # Location: /home/lgsm/csgoserver - # Config file: /home/lgsm/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg - - echo -e "${lightgreen}${selfname} Script Details${default}" - fn_messages_separator - { - # Script name - echo -e "${lightblue}Script name:\t${default}${selfname}" - - # LinuxGSM version - if [ -n "${version}" ]; then - echo -e "${lightblue}LinuxGSM version:\t${default}${version}" - fi - - # glibc required - if [ -n "${glibc}" ]; then - if [ "${glibc}" == "null" ]; then - # Glibc is not required. - : - 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 - 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}" - fi - fi - - # Discord alert - echo -e "${lightblue}Discord alert:\t${default}${discordalert}" - # Email alert - echo -e "${lightblue}Email alert:\t${default}${emailalert}" - # Gotify alert - echo -e "${lightblue}Gotify alert:\t${default}${gotifyalert}" - # IFTTT alert - echo -e "${lightblue}IFTTT alert:\t${default}${iftttalert}" - # Mailgun alert - echo -e "${lightblue}Mailgun (email) alert:\t${default}${mailgunalert}" - # Pushbullet alert - echo -e "${lightblue}Pushbullet alert:\t${default}${pushbulletalert}" - # Pushover alert - echo -e "${lightblue}Pushover alert:\t${default}${pushoveralert}" - # Rocketchat alert - echo -e "${lightblue}Rocketchat alert:\t${default}${rocketchatalert}" - # Slack alert - echo -e "${lightblue}Slack alert:\t${default}${slackalert}" - # Telegram alert - echo -e "${lightblue}Telegram alert:\t${default}${telegramalert}" - - # Update on start - if [ -n "${updateonstart}" ]; then - echo -e "${lightblue}Update on start:\t${default}${updateonstart}" - fi - - # User - echo -e "${lightblue}User:\t${default}$(whoami)" - - # Script location - echo -e "${lightblue}Location:\t${default}${rootdir}" - - # Config file location - if [ -n "${servercfgfullpath}" ]; then - if [ -f "${servercfgfullpath}" ]; then - echo -e "${lightblue}Config file:\t${default}${servercfgfullpath}" - elif [ -d "${servercfgfullpath}" ]; then - echo -e "${lightblue}Config dir:\t${default}${servercfgfullpath}" - else - echo -e "${lightblue}Config file:\t${default}${red}${servercfgfullpath}${default} (${red}FILE MISSING${default})" - fi - fi - - # Network config file location (ARMA 3) - if [ -n "${networkcfgfullpath}" ]; then - echo -e "${lightblue}Network config file:\t${default}${networkcfgfullpath}" - fi - } | column -s $'\t' -t -} - -fn_info_message_backup() { - # - # Backups - # ================================= - # No. of backups: 1 - # Latest backup: - # date: Fri May 6 18:34:19 UTC 2016 - # file: /home/lgsm/qlserver/backups/ql-server-2016-05-06-183239.tar.gz - # size: 945M - - echo -e "" - echo -e "${lightgreen}Backups${default}" - fn_messages_separator - if [ ! -d "${backupdir}" ] || [ "${backupcount}" == "0" ]; then - echo -e "No Backups created" - else - { - echo -e "${lightblue}No. of backups:\t${default}${backupcount}" - echo -e "${lightblue}Latest backup:${default}" - if [ "${lastbackupdaysago}" == "0" ]; then - echo -e "${lightblue} date:\t${default}${lastbackupdate} (less than 1 day ago)" - elif [ "${lastbackupdaysago}" == "1" ]; then - echo -e "${lightblue} date:\t${default}${lastbackupdate} (1 day ago)" - else - echo -e "${lightblue} date:\t${default}${lastbackupdate} (${lastbackupdaysago} days ago)" - fi - echo -e "${lightblue} file:\t${default}${lastbackup}" - echo -e "${lightblue} size:\t${default}${lastbackupsize}" - } | column -s $'\t' -t - fi -} - -fn_info_message_commandlineparms() { - # - # Command-line Parameters - # ================================= - # ./run_server_x86.sh +set net_strict 1 - - echo -e "" - echo -e "${lightgreen}Command-line Parameters${default}" - fn_info_message_password_strip - fn_messages_separator - if [ "${serverpassword}" == "NOT SET" ]; then - unset serverpassword - fi - fn_reload_startparameters - echo -e "${preexecutable} ${executable} ${startparameters}" -} - -fn_info_message_ports_edit() { - # - # Ports - # ================================= - # Change ports by editing the parameters in: - # /home/lgsm/qlserver/serverfiles/baseq3/ql-server.cfg - echo -e "" - echo -e "${lightgreen}Ports${default}" - fn_messages_separator - echo -e "${lightblue}Change ports by editing the parameters in:${default}" - - startparameterslocation="${red}UNKNOWN${default}" - # engines/games that require editing in the config file. - local ports_edit_array=("ac" "arma3" "armar" "bo" "bt" "cd" "dst" "eco" "idtech2" "idtech3" "idtech3_ql" "jc2" "jc3" "lwjgl2" "mcb" "nec" "pc" "pc2" "prism3d" "pz" "qw" "refractor" "renderware" "rw" "sb" "sdtd" "st" "stn" "ts3" "tw" "terraria" "unreal" "unreal2" "unreal3" "vints" "wurm") - for port_edit in "${ports_edit_array[@]}"; do - if [ "${shortname}" == "ut3" ]; then - startparameterslocation="${servercfgdir}/UTWeb.ini" - elif [ "${shortname}" == "kf2" ]; then - startparameterslocation="${servercfgdir}/LinuxServer-KFEngine.ini\n${servercfgdir}/KFWeb.ini" - elif [ "${engine}" == "${port_edit}" ] || [ "${gamename}" == "${port_edit}" ] || [ "${shortname}" == "${port_edit}" ]; then - startparameterslocation="${servercfgfullpath}" - fi - done - # engines/games that require editing the start parameters. - local ports_edit_array=("av" "ck" "col" "fctr" "goldsrc" "hw" "iw3.0" "ioquake3" "qfusion" "rust" "scpsl" "scpslsm" "sol" "spark" "source" "unreal4" "arma3" "dayz" "unt" "vh") - for port_edit in "${ports_edit_array[@]}"; do - if [ "${engine}" == "${port_edit}" ] || [ "${gamename}" == "${port_edit}" ] || [ "${shortname}" == "${port_edit}" ]; then - startparameterslocation="${configdirserver}" - fi - done - echo -e "${startparameterslocation}" - echo -e "" -} - -fn_info_message_ports() { - echo -e "${lightblue}Useful port diagnostic command:${default}" - if [ "${shortname}" == "armar" ]; then - echo -e "ss -tuplwn | grep enfMain" - elif [ "${shortname}" == "av" ]; then - echo -e "ss -tuplwn | grep AvorionServer" - elif [ "${shortname}" == "bf1942" ]; then - echo -e "ss -tuplwn | grep bf1942_lnxded" - elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "nec" ] || [ "${shortname}" == "pmc" ] || [ "${shortname}" == "rw" ] || [ "${shortname}" == "vpmc" ] || [ "${shortname}" == "wmc" ]; then - echo -e "ss -tuplwn | grep java" - elif [ "${shortname}" == "terraria" ]; then - echo -e "ss -tuplwn | grep Main" - elif [ "${engine}" == "source" ]; then - echo -e "ss -tuplwn | grep srcds_linux" - elif [ "${engine}" == "goldsrc" ]; then - echo -e "ss -tuplwn | grep hlds_linux" - else - executableshort="$(basename "${executable}" | cut -c -15)" - echo -e "ss -tuplwn | grep ${executableshort}" - fi - echo -e "" -} - -fn_info_message_statusbottom() { - echo -e "" - if [ "${status}" == "0" ]; then - echo -e "${lightblue}Status:\t${red}STOPPED${default}" - else - echo -e "${lightblue}Status:\t${green}STARTED${default}" - fi - echo -e "" -} - -fn_info_logs() { - echo -e "" - echo -e "${selfname} Logs" - echo -e "=================================" - - if [ -n "${lgsmlog}" ]; then - echo -e "\nScript log\n===================" - if [ ! "$(ls -A "${lgsmlogdir}")" ]; then - echo -e "${lgsmlogdir} (NO LOG FILES)" - elif [ ! -s "${lgsmlog}" ]; then - echo -e "${lgsmlog} (LOG FILE IS EMPTY)" - else - echo -e "${lgsmlog}" - tail -25 "${lgsmlog}" - fi - echo -e "" - fi - - if [ -n "${consolelog}" ]; then - echo -e "\nConsole log\n====================" - if [ ! "$(ls -A "${consolelogdir}")" ]; then - echo -e "${consolelogdir} (NO LOG FILES)" - elif [ ! -s "${consolelog}" ]; then - echo -e "${consolelog} (LOG FILE IS EMPTY)" - else - echo -e "${consolelog}" - tail -25 "${consolelog}" | awk '{ sub("\r$", ""); print }' - fi - echo -e "" - fi - - if [ -n "${gamelogdir}" ]; then - echo -e "\nServer log\n===================" - if [ ! "$(ls -A "${gamelogdir}")" ]; then - echo -e "${gamelogdir} (NO LOG FILES)" - else - echo -e "${gamelogdir}" - # dos2unix sed 's/\r//' - tail "${gamelogdir}"/* 2> /dev/null | grep -v "==>" | sed '/^$/d' | sed 's/\r//' | tail -25 - fi - echo -e "" - fi -} - -# Engine/Game Specific details - -# Function used to generate port info. by passing info to function. (Reduces repeating code) -# example output -# DESCRIPTION PORT PROTOCOL LISTEN -# Game 7777 udp 1 -# RAW UDP Socket 7778 udp 1 -# Query 27015 udp 1 -# RCON 27020 tcp 1 - -fn_port() { - if [ "${1}" == "header" ]; then - echo -e "${lightblue}DESCRIPTION\tPORT\tPROTOCOL\tLISTEN${default}" - else - portname="${1}" - porttype="${2}" - portprotocol="${3}" - echo -e "${portname}\t${!porttype}\t${portprotocol}\t$(echo "${ssinfo}" | grep "${portprotocol}" | grep -c "${!porttype}")" - fi -} - -fn_info_message_ac() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Game" port tcp - fn_port "Query" queryport udp - fn_port "HTTP" httpport tcp - } | column -s $'\t' -t -} - -fn_info_message_ark() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "RAW UDP Socket" rawport udp - fn_port "Query" queryport udp - fn_port "RCON" rconport tcp - } | column -s $'\t' -t -} - -fn_info_message_arma3() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Voice" voiceport udp - fn_port "Query" queryport udp - fn_port "Steam Master" steammasterport udp - fn_port "Voice (unused)" voiceunusedport udp - fn_port "BattleEye" battleeyeport udp - } | column -s $'\t' -t -} - -fn_info_message_armar() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Steam Query" queryport udp - fn_port "BattleEye" battleeyeport tcp - } | column -s $'\t' -t -} - -fn_info_message_av() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - fn_port "Steam Master" steammasterport udp - fn_port "Steam Query" steamqueryport udp - fn_port "RCON" rconport tcp - } | column -s $'\t' -t -} - -fn_info_message_bf1942() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - } | column -s $'\t' -t -} - -fn_info_message_bfv() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - } | column -s $'\t' -t -} - -fn_info_message_bo() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - } | column -s $'\t' -t -} - -fn_info_message_bt() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - } | column -s $'\t' -t -} - -fn_info_message_btl() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - fn_port "RCON" rconport tcp - } | column -s $'\t' -t -} - -fn_info_messages_cd() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Steam" steamport udp - fn_port "RCON" rconport tcp - } | column -s $'\t' -t -} - -fn_info_messages_ck() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - } | column -s $'\t' -t -} - -fn_info_message_cmw() { - fn_info_message_password_strip - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - fn_port "RCON" rconport tcp - } | column -s $'\t' -t -} - -fn_info_message_cod() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - } | column -s $'\t' -t -} - -fn_info_message_coduo() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - } | column -s $'\t' -t -} - -fn_info_message_cod2() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - } | column -s $'\t' -t -} - -fn_info_message_cod4() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - } | column -s $'\t' -t -} - -fn_info_message_codwaw() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - } | column -s $'\t' -t -} - -fn_info_message_col() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport tcp - fn_port "Steam" steamport tcp - } | column -s $'\t' -t -} - -fn_info_message_csgo() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport tcp - fn_port "RCON" rconport tcp - fn_port "SourceTV" sourcetvport udp - fn_port "Client" clientport udp - } | column -s $'\t' -t -} - -fn_info_message_dayz() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query Steam" queryport udp - fn_port "Steam Master" steammasterport udp - fn_port "BattleEye" battleeyeport udp - } | column -s $'\t' -t -} - -fn_info_message_dodr() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - } | column -s $'\t' -t -} - -fn_info_message_dst() { - { - fn_port "header" - fn_port "Game: Server" port udp - fn_port "Game: Master" masterport udp - fn_port "Steam: Auth" steamauthport udp - fn_port "Steam: Master" steammasterport udp - } | column -s $'\t' -t -} - -fn_info_message_eco() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Web Admin" webadminport tcp - } | column -s $'\t' -t -} - -fn_info_message_etl() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - } | column -s $'\t' -t -} - -fn_info_message_fctr() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "RCON" rconport tcp - } | column -s $'\t' -t -} - -fn_info_message_goldsrc() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Client" clientport udp - } | column -s $'\t' -t -} - -fn_info_message_hw() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - } | column -s $'\t' -t -} - -fn_info_message_ins() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport tcp - fn_port "RCON" rconport tcp - fn_port "SourceTV" sourcetvport udp - fn_port "Client" clientport udp - } | column -s $'\t' -t -} - -fn_info_message_inss() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - fn_port "RCON" rconport tcp - } | column -s $'\t' -t -} - -fn_info_message_jc2() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - } | column -s $'\t' -t -} - -fn_info_message_jc3() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - fn_port "Steam" steamport udp - fn_port "HTTP" httpport tcp - } | column -s $'\t' -t -} - -fn_info_message_jk2() { - { - fn_port "header" - fn_port "Game" port udp - } | column -s $'\t' -t -} - -fn_info_message_kf() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - fn_port "Query (GameSpy)" queryportgs udp - fn_port "Web Admin" webadminport tcp - fn_port "LAN" lanport udp - fn_port "Steam" steamport udp - fn_port "Steam Master" steammasterport udp - } | column -s $'\t' -t - echo -e "" - echo -e "${lightgreen}${servername} Web Admin${default}" - fn_messages_separator - { - echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}" - echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}" - echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}" - echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}" - } | column -s $'\t' -t -} - -fn_info_message_kf2() { - fn_info_message_password_strip - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - fn_port "Web Admin" webadminport tcp - } | column -s $'\t' -t - echo -e "" - echo -e "${lightgreen}${servername} Web Admin${default}" - fn_messages_separator - { - echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}" - echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}" - echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}" - echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}" - } | column -s $'\t' -t -} - -fn_info_message_lo() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - } | column -s $'\t' -t -} - -fn_info_message_mc() { - { - fn_port "header" - fn_port "Game" port tcp - fn_port "Query" queryport udp - fn_port "RCON" rconport tcp - } | column -s $'\t' -t -} - -fn_info_message_mcb() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Game" portipv6 udp6 - } | column -s $'\t' -t -} - -fn_info_message_mh() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - fn_port "Beacon" beaconport udp - } | column -s $'\t' -t -} - -fn_info_message_mohaa() { - { - fn_port "header" - fn_port "Game" port udp - } | column -s $'\t' -t -} - -fn_info_message_mom() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Beacon" beaconport udp - } | column -s $'\t' -t -} - -fn_info_message_mta() { - { - fn_port "header" - fn_port "Game" port udp - if [ "${ase}" == "Enabled" ]; then - fn_port "Query" queryport udp - fi - fn_port "HTTP" httpport tcp - } | column -s $'\t' -t -} - -fn_info_message_nec() { - { - fn_port "header" - fn_port "Game" port udp - } | column -s $'\t' -t -} - -fn_info_message_onset() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - fn_port "HTTP" httpport tcp - } | column -s $'\t' -t -} - -fn_info_message_pc() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - fn_port "Steam" steamport udp - } | column -s $'\t' -t -} - -fn_info_message_pc2() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - fn_port "Steam" steamport udp - } | column -s $'\t' -t -} - -fn_info_message_pstbs() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - fn_port "RCON" rconport tcp - } | column -s $'\t' -t -} - -fn_info_message_pvr() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Game" port tcp - fn_port "Game+400" port401 udp - fn_port "Query" queryport tcp - } | column -s $'\t' -t -} - -fn_info_message_pz() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - } | column -s $'\t' -t -} - -fn_info_message_qw() { - { - fn_port "header" - fn_port "Game" port udp - } | column -s $'\t' -t -} - -fn_info_message_q2() { - { - fn_port "header" - fn_port "Game" port udp - } | column -s $'\t' -t -} - -fn_info_message_q3() { - { - fn_port "header" - fn_port "Game" port udp - } | column -s $'\t' -t -} - -fn_info_message_ql() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - fn_port "RCON" rconport tcp - fn_port "Stats" statsport udp - } | column -s $'\t' -t -} - -fn_info_message_ro() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - fn_port "Web Admin" webadminport tcp - fn_port "LAN" lanport udp - fn_port "Steam" steamport udp - fn_port "Steam Master" steammasterport udp - } | column -s $'\t' -t - echo -e "" - echo -e "${lightgreen}${servername} Web Admin${default}" - fn_messages_separator - { - echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}" - echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}" - echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}" - echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}" - } | column -s $'\t' -t -} - -fn_info_message_rtcw() { - { - fn_port "header" - fn_port "Game" port udp - } | column -s $'\t' -t -} - -fn_info_message_rust() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - fn_port "RCON" rconport tcp - fn_port "App" appport tcp - } | column -s $'\t' -t -} - -fn_info_message_rw() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Game+1" port2 udp - fn_port "Game+2" port3 udp - fn_port "Game+3" port4 udp - fn_port "Game+1" port2 tcp - fn_port "Game+2" port3 tcp - fn_port "Game+3" port4 tcp - fn_port "Query" queryport tcp - fn_port "Query HTTP" httpqueryport tcp - fn_port "RCON" rconport tcp - } | column -s $'\t' -t -} - -fn_info_message_samp() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "RCON" rconport udp - } | column -s $'\t' -t -} - -fn_info_message_sb() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport tcp - fn_port "RCON" rconport tcp - } | column -s $'\t' -t -} - -fn_info_message_sbots() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - } | column -s $'\t' -t -} - -fn_info_message_scpsl() { - { - fn_port "header" - fn_port "Game" port tcp - } | column -s $'\t' -t -} - -fn_info_message_sdtd() { - fn_info_message_password_strip - { - fn_port "header" - fn_port "Game" port udp - fn_port "Game+2" port3 udp - fn_port "Query" queryport tcp - fn_port "Web Admin" webadminport tcp - fn_port "Telnet" telnetport tcp - } | column -s $'\t' -t - echo -e "" - echo -e "${lightgreen}${gamename} Web Admin${default}" - fn_messages_separator - { - echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}" - echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}/index.html" - echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}" - echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}" - } | column -s $'\t' -t - echo -e "" - echo -e "${lightgreen}${gamename} Telnet${default}" - fn_messages_separator - { - echo -e "${lightblue}Telnet enabled:\t${default}${telnetenabled}" - echo -e "${lightblue}Telnet address:\t${default}${telnetip} ${telnetport}" - echo -e "${lightblue}Telnet password:\t${default}${telnetpass}" - } | column -s $'\t' -t -} - -fn_info_message_sf() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - fn_port "Beacon" beaconport udp - } | column -s $'\t' -t -} - -fn_info_message_sof2() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - } | column -s $'\t' -t -} - -fn_info_message_sol() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - fn_port "Files" filesport tcp - } | column -s $'\t' -t -} - -fn_info_message_prism3d() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - } | column -s $'\t' -t -} - -fn_info_message_source() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport tcp - fn_port "RCON" rconport tcp - fn_port "SourceTV" sourcetvport udp - # Will not show if unaviable - if [ "${steamport}" == "0" ] || [ -v "${steamport}" ]; then - fn_port "Steam" steamport udp - fi - fn_port "Client" clientport udp - } | column -s $'\t' -t -} - -fn_info_message_spark() { - fn_info_message_password_strip - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - fn_port "Web Admin" webadminport tcp - } | column -s $'\t' -t - echo -e "" - echo -e "${lightgreen}${gamename} Web Admin${default}" - fn_messages_separator - { - echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}/index.html" - echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}" - echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}" - } | column -s $'\t' -t -} - -fn_info_message_squad() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - fn_port "RCON" rconport tcp - } | column -s $'\t' -t -} - -fn_info_message_st() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - fn_port "Web Admin" webadminport tcp - } | column -s $'\t' -t - echo -e "" - echo -e "${lightgreen}${gamename} Web Admin${default}" - fn_messages_separator - { - echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}" - } | column -s $'\t' -t -} - -fn_info_message_ti() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - } | column -s $'\t' -t -} - -fn_info_message_ts3() { - { - fn_port "header" - fn_port "Voice" port udp - fn_port "Query" queryport tcp - fn_port "Query (SSH)" querysshport tcp - fn_port "Query (http)" queryhttpport tcp - fn_port "Query (https)" queryhttpsport tcp - fn_port "File Transfer" fileport tcp - fn_port "Telnet" telnetport tcp - } | column -s $'\t' -t -} - -fn_info_message_tw() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - } | column -s $'\t' -t -} - -fn_info_message_terraria() { - { - fn_port "header" - fn_port "Game" port tcp - fn_port "Query" queryport tcp - } | column -s $'\t' -t -} - -fn_info_message_tu() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - fn_port "Steam" steamport udp - } | column -s $'\t' -t -} - -fn_info_message_unreal() { - fn_info_message_password_strip - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - fn_port "LAN Beacon" beaconport udp - fn_port "Web Admin" webadminport tcp - } | column -s $'\t' -t - echo -e "" - echo -e "${lightgreen}${servername} Web Admin${default}" - fn_messages_separator - { - echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}" - echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}" - echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}" - echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}" - } | column -s $'\t' -t -} - -fn_info_message_ut2k4() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - fn_port "Query (GameSpy)" queryportgs udp - fn_port "Web Admin" webadminport tcp - fn_port "LAN" lanport udp - } | column -s $'\t' -t - echo -e "" - echo -e "${lightgreen}${servername} Web Admin${default}" - fn_messages_separator - { - echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}" - echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}" - echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}" - echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}" - } | column -s $'\t' -t -} - -fn_info_message_unreal() { - fn_info_message_password_strip - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - fn_port "LAN Beacon" beaconport udp - fn_port "Web Admin" webadminport tcp - } | column -s $'\t' -t - echo -e "" - echo -e "${lightgreen}${servername} Web Admin${default}" - fn_messages_separator - { - echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}" - echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}" - echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}" - echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}" - } | column -s $'\t' -t -} - -fn_info_message_unt() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - fn_port "Steam" steamport udp - } | column -s $'\t' -t -} - -fn_info_message_ut() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - } | column -s $'\t' -t -} - -fn_info_message_ut3() { - fn_info_message_password_strip - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - fn_port "Web Admin" webadminport tcp - } | column -s $'\t' -t - echo -e "" - echo -e "${lightgreen}${servername} Web Admin${default}" - fn_messages_separator - { - echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}" - echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}" - echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}" - echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}" - } | column -s $'\t' -t -} - -fn_info_message_vh() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - } | column -s $'\t' -t -} - -fn_info_message_vints() { - { - fn_port "header" - fn_port "Game" port tcp - } | column -s $'\t' -t -} - -fn_info_message_vpmc() { - { - fn_port "header" - fn_port "Game" port tcp - } | column -s $'\t' -t -} - -fn_info_message_wet() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - } | column -s $'\t' -t -} - -fn_info_message_wf() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "HTTP" httpport tcp - } | column -s $'\t' -t -} - -fn_info_message_wurm() { - { - fn_port "header" - fn_port "Game" port tcp - fn_port "Query" queryport udp - } | column -s $'\t' -t -} - -fn_info_message_stn() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - } | column -s $'\t' -t -} - -fn_info_message_select_engine() { - # Display details depending on game or engine. - if [ "${shortname}" == "ac" ]; then - fn_info_message_ac - elif [ "${shortname}" == "ark" ]; then - fn_info_message_ark - elif [ "${shortname}" == "arma3" ]; then - fn_info_message_arma3 - elif [ "${shortname}" == "armar" ]; then - fn_info_message_armar - elif [ "${shortname}" == "av" ]; then - fn_info_message_av - elif [ "${shortname}" == "bf1942" ]; then - fn_info_message_bf1942 - elif [ "${shortname}" == "bfv" ]; then - fn_info_message_bfv - elif [ "${shortname}" == "bo" ]; then - fn_info_message_bo - elif [ "${shortname}" == "bt" ]; then - fn_info_message_bt - elif [ "${shortname}" == "btl" ]; then - fn_info_message_btl - elif [ "${shortname}" == "cd" ]; then - fn_info_messages_cd - elif [ "${shortname}" == "ck" ]; then - fn_info_messages_ck - elif [ "${shortname}" == "csgo" ]; then - fn_info_message_csgo - elif [ "${shortname}" == "cmw" ]; then - fn_info_message_cmw - elif [ "${shortname}" == "cod" ]; then - fn_info_message_cod - elif [ "${shortname}" == "coduo" ]; then - fn_info_message_coduo - elif [ "${shortname}" == "cod2" ]; then - fn_info_message_cod2 - elif [ "${shortname}" == "cod4" ]; then - fn_info_message_cod4 - elif [ "${shortname}" == "codwaw" ]; then - fn_info_message_codwaw - elif [ "${shortname}" == "col" ]; then - fn_info_message_col - elif [ "${shortname}" == "dayz" ]; then - fn_info_message_dayz - elif [ "${shortname}" == "dodr" ]; then - fn_info_message_dodr - elif [ "${shortname}" == "dst" ]; then - fn_info_message_dst - elif [ "${shortname}" == "eco" ]; then - fn_info_message_eco - elif [ "${shortname}" == "etl" ]; then - fn_info_message_etl - elif [ "${shortname}" == "fctr" ]; then - fn_info_message_fctr - elif [ "${shortname}" == "hcu" ]; then - fn_info_message_hcu - elif [ "${shortname}" == "hw" ]; then - fn_info_message_hw - elif [ "${shortname}" == "ins" ]; then - fn_info_message_ins - elif [ "${shortname}" == "inss" ]; then - fn_info_message_inss - elif [ "${shortname}" == "jc2" ]; then - fn_info_message_jc2 - elif [ "${shortname}" == "jc3" ]; then - fn_info_message_jc3 - elif [ "${shortname}" == "jk2" ]; then - fn_info_message_jk2 - elif [ "${shortname}" == "kf" ]; then - fn_info_message_kf - elif [ "${shortname}" == "kf2" ]; then - fn_info_message_kf2 - elif [ "${shortname}" == "lo" ]; then - fn_info_message_lo - elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ] || [ "${shortname}" == "wmc" ]; then - fn_info_message_mc - elif [ "${shortname}" == "mcb" ]; then - fn_info_message_mcb - elif [ "${shortname}" == "mh" ]; then - fn_info_message_mh - elif [ "${shortname}" == "mohaa" ]; then - fn_info_message_mohaa - elif [ "${shortname}" == "mom" ]; then - fn_info_message_mom - elif [ "${shortname}" == "mta" ]; then - fn_info_message_mta - elif [ "${shortname}" == "nec" ]; then - fn_info_message_nec - elif [ "${shortname}" == "onset" ]; then - fn_info_message_onset - elif [ "${shortname}" == "pc" ]; then - fn_info_message_pc - elif [ "${shortname}" == "pc2" ]; then - fn_info_message_pc2 - elif [ "${shortname}" == "pstbs" ]; then - fn_info_message_pstbs - elif [ "${shortname}" == "pvr" ]; then - fn_info_message_pvr - elif [ "${shortname}" == "pz" ]; then - fn_info_message_pz - elif [ "${shortname}" == "q2" ]; then - fn_info_message_q2 - elif [ "${shortname}" == "q3" ]; then - fn_info_message_q3 - elif [ "${shortname}" == "ql" ]; then - fn_info_message_ql - elif [ "${shortname}" == "qw" ]; then - fn_info_message_qw - elif [ "${shortname}" == "ro" ]; then - fn_info_message_ro - elif [ "${shortname}" == "rtcw" ]; then - fn_info_message_rtcw - elif [ "${shortname}" == "samp" ]; then - fn_info_message_samp - elif [ "${shortname}" == "sb" ]; then - fn_info_message_sb - elif [ "${shortname}" == "sbots" ]; then - fn_info_message_sbots - elif [ "${shortname}" == "scpsl" ] || [ "${shortname}" == "scpslsm" ]; then - fn_info_message_scpsl - elif [ "${shortname}" == "sdtd" ]; then - fn_info_message_sdtd - elif [ "${shortname}" == "sf" ]; then - fn_info_message_sf - elif [ "${shortname}" == "sof2" ]; then - fn_info_message_sof2 - elif [ "${shortname}" == "sol" ]; then - fn_info_message_sol - elif [ "${shortname}" == "squad" ]; then - fn_info_message_squad - elif [ "${shortname}" == "st" ]; then - fn_info_message_st - elif [ "${shortname}" == "stn" ]; then - fn_info_message_stn - elif [ "${shortname}" == "terraria" ]; then - fn_info_message_terraria - elif [ "${shortname}" == "ti" ]; then - fn_info_message_ti - elif [ "${shortname}" == "ts3" ]; then - fn_info_message_ts3 - elif [ "${shortname}" == "tu" ]; then - fn_info_message_tu - elif [ "${shortname}" == "tw" ]; then - fn_info_message_tw - elif [ "${shortname}" == "unt" ]; then - fn_info_message_unt - elif [ "${shortname}" == "vh" ]; then - fn_info_message_vh - elif [ "${shortname}" == "vints" ]; then - fn_info_message_vints - elif [ "${shortname}" == "rust" ]; then - fn_info_message_rust - elif [ "${shortname}" == "rw" ]; then - fn_info_message_rw - elif [ "${shortname}" == "ut" ]; then - fn_info_message_ut - elif [ "${shortname}" == "ut2k4" ]; then - fn_info_message_ut2k4 - elif [ "${shortname}" == "ut3" ]; then - fn_info_message_ut3 - elif [ "${shortname}" == "vpmc" ]; then - fn_info_message_vpmc - elif [ "${shortname}" == "wet" ]; then - fn_info_message_wet - elif [ "${shortname}" == "wf" ]; then - fn_info_message_wf - elif [ "${shortname}" == "wurm" ]; then - fn_info_message_wurm - elif [ "${engine}" == "goldsrc" ]; then - fn_info_message_goldsrc - elif [ "${engine}" == "prism3d" ]; then - fn_info_message_prism3d - elif [ "${engine}" == "source" ]; then - fn_info_message_source - elif [ "${engine}" == "spark" ]; then - fn_info_message_spark - elif [ "${engine}" == "unreal" ]; then - fn_info_message_unreal - else - fn_print_error_nl "Unable to detect game server." - fi -} diff --git a/lgsm/functions/info_stats.sh b/lgsm/functions/info_stats.sh deleted file mode 100644 index 0589770f6..000000000 --- a/lgsm/functions/info_stats.sh +++ /dev/null @@ -1,173 +0,0 @@ -#!/bin/bash -# LinuxGSM info_stats.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Collect optional Stats sent to LinuxGSM project. -# Uses Google analytics. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -info_distro.sh - -# remove uuid that was used in v20.2.0 and below -if [ -f "${datadir}/uuid.txt" ]; then - rm -f "${datadir:?}/uuid.txt" -fi - -# generate uuid's -# this consists of a standard uuid and a docker style name -# to allow human readable uuid's. -# e.g angry_proskuriakova_38a9ef76-4ae3-46a6-a895-7af474831eba - -if [ ! -f "${datadir}/uuid-${selfname}.txt" ] || [ ! -f "${datadir}/uuid-install.txt" ]; then - # download dictionary words - if [ ! -f "${datadir}/name-left.csv" ]; then - fn_fetch_file_github "lgsm/data" "name-left.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nohash" - fi - if [ ! -f "${datadir}/name-right.csv" ]; then - fn_fetch_file_github "lgsm/data" "name-right.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nohash" - fi - - # generate instance uuid - if [ -n "$(command -v uuidgen 2> /dev/null)" ]; then - uuid="$(uuidgen)" - else - uuid="$(cat /proc/sys/kernel/random/uuid)" - fi - - nameleft="$(shuf -n 1 "${datadir}/name-left.csv")" - nameright="$(shuf -n 1 "${datadir}/name-right.csv")" - echo "instance_${nameleft}_${nameright}_${uuid}" > "${datadir}/uuid-${selfname}.txt" - # generate install uuid if missing - if [ ! -f "${datadir}/uuid-install.txt" ]; then - echo "${nameleft}_${nameright}_${uuid}" > "${datadir}/uuid-install.txt" - fi -fi - -uuidinstance=$(cat "${datadir}/uuid-${selfname}.txt") -uuidinstall=$(cat "${datadir}/uuid-install.txt") -# machine-id is a unique id set on OS install -uuidhardware=$(cat "/etc/machine-id") - -# results are rounded up to reduce number of different results in analytics. -# nearest 100Mhz. -cpuusedmhzroundup="$(((cpuusedmhz + 99) / 100 * 100))" -# nearest 100MB -memusedroundup="$(((memused + 99) / 100 * 100))" - -# Spliting the metrics in to 3 propertys allows more accurate metrics on numbers of invidual instances, installs and hardware. -# Instance Property - UA-165287622-1 -# Install Property - UA-165287622-2 -# Hardware Property - UA-165287622-3 - -## Distro. -curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=distro" -d "ea=${distroname}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=distro" -d "ea=${distroname}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=distro" -d "ea=${distroname}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - -## Game Server Name. -curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=game" -d "ea=${gamename}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=game" -d "ea=${gamename}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=game" -d "ea=${gamename}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - -## LinuxGSM Version. -curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=version" -d "ea=${version}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=version" -d "ea=${version}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=version" -d "ea=${version}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - -## CPU usage of a game server. -if [ -n "${cpuusedmhzroundup}" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=cpuused" -d "ea=${cpuusedmhzroundup}MHz" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=cpuused" -d "ea=${cpuusedmhzroundup}MHz" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=cpuused" -d "ea=${cpuusedmhzroundup}MHz" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -fi -## Ram usage of a game server. -if [ -n "${memusedroundup}" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=ramused" -d "ea=${memusedroundup}MB" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=ramused" -d "ea=${memusedroundup}MB" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=ramused" -d "ea=${memusedroundup}MB" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -fi -## Disk usage of a game server. -if [ -n "${serverfilesdu}" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=diskused" -d "ea=${serverfilesdu}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=diskused" -d "ea=${serverfilesdu}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=diskused" -d "ea=${serverfilesdu}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -fi - -## CPU Model. -if [ -n "${cpumodel}" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=servercpu" -d "ea=${cpumodel} ${cpucores} cores" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=servercpu" -d "ea=${cpumodel} ${cpucores} cores" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=servercpu" -d "ea=${cpumodel} ${cpucores} cores" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - -fi - -## CPU Frequency. -if [ -n "${cpufreqency}" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=servercpufreq" -d "ea=${cpufreqency} x${cpucores}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=servercpufreq" -d "ea=${cpufreqency} x${cpucores}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=servercpufreq" -d "ea=${cpufreqency} x${cpucores}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -fi - -## Server RAM. -if [ -n "${physmemtotal}" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=serverram" -d "ea=${physmemtotal}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=serverram" -d "ea=${physmemtotal}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=serverram" -d "ea=${physmemtotal}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -fi - -## Server Disk. -if [ -n "${totalspace}" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=serverdisk" -d "ea=${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=serverdisk" -d "ea=${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=serverdisk" -d "ea=${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -fi - -## Alert Stats. -if [ "${discordalert}" == "on" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=Discord" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -fi -if [ "${emailalert}" == "on" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=Email" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -fi -if [ "${iftttalert}" == "on" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=IFTTT" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -fi -if [ "${mailgunalert}" == "on" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=Mailgun" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -fi -if [ "${pushbulletalert}" == "on" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=Pushbullet" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -fi -if [ "${pushoveralert}" == "on" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=Pushover" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -fi -if [ "${rocketchatalert}" == "on" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=Rocket Chat" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -fi -if [ "${slackalert}" == "on" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=Slack" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -fi -if [ "${telegramalert}" == "on" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=Telegram" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -fi - -## Summary Stats -curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=summary" -d "ea=GAME: ${gamename} | DISTRO: ${distroname} | CPU MODEL: ${cpumodel} ${cpucores} cores | RAM: ${physmemtotal} | DISK: ${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=summary" -d "ea=GAME: ${gamename} | DISTRO: ${distroname} | CPU MODEL: ${cpumodel} ${cpucores} cores | RAM: ${physmemtotal} | DISK: ${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 -curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=summary" -d "ea=GAME: ${gamename} | DISTRO: ${distroname} | CPU MODEL: ${cpumodel} ${cpucores} cores | RAM: ${physmemtotal} | DISK: ${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 - -fn_script_log_info "Send LinuxGSM stats" -fn_script_log_info "* uuid-${selfname}: ${uuidinstance}" -fn_script_log_info "* uuid-install: ${uuidinstall}" -fn_script_log_info "* uuid-hardware: ${uuidhardware}" -fn_script_log_info "* Game Name: ${gamename}" -fn_script_log_info "* Distro Name: ${distroname}" -fn_script_log_info "* Game Server CPU Used: ${cpuusedmhzroundup}MHz" -fn_script_log_info "* Game Server RAM Used: ${memusedroundup}MB" -fn_script_log_info "* Game Server Disk Used: ${serverfilesdu}" -fn_script_log_info "* Server CPU Model: ${cpumodel}" -fn_script_log_info "* Server CPU Frequency: ${cpufreqency}" -fn_script_log_info "* Server RAM: ${physmemtotal}" -fn_script_log_info "* Server Disk: ${totalspace}" diff --git a/lgsm/functions/install_complete.sh b/lgsm/functions/install_complete.sh deleted file mode 100644 index ad258b224..000000000 --- a/lgsm/functions/install_complete.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -# LinuxGSM install_complete.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Prints installation completion message and hints. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -echo -e "" -echo -e "=================================" -echo -e "Install Complete!" -fn_script_log_info "Install Complete!" -echo -e "" -echo -e "To start server type:" -echo -e "./${selfname} start" -echo -e "" -core_exit.sh diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh deleted file mode 100644 index 35d7df7c6..000000000 --- a/lgsm/functions/install_config.sh +++ /dev/null @@ -1,937 +0,0 @@ -#!/bin/bash -# LinuxGSM install_config.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Creates default server configs. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -# Checks if server cfg dir exists, creates it if it doesn't. -fn_check_cfgdir() { - if [ ! -d "${servercfgdir}" ]; then - echo -e "creating ${servercfgdir} config directory." - fn_script_log_info "creating ${servercfgdir} config directory." - mkdir -pv "${servercfgdir}" - fi -} - -# Downloads default configs from Game-Server-Configs repo to lgsm/config-default. -fn_fetch_default_config() { - echo -e "" - echo -e "${lightyellow}Downloading ${gamename} Configs${default}" - echo -e "=================================" - echo -e "default configs from https://github.com/GameServerManagers/Game-Server-Configs" - fn_sleep_time - mkdir -p "${lgsmdir}/config-default/config-game" - githuburl="https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/master" - for config in "${array_configs[@]}"; do - fn_fetch_file "${githuburl}/${gamedirname}/${config}" "${remote_fileurl_backup}" "GitHub" "Bitbucket" "${lgsmdir}/config-default/config-game" "${config}" "nochmodx" "norun" "forcedl" "nohash" - done -} - -# Copys default configs from Game-Server-Configs repo to server config location. -fn_default_config_remote() { - for config in "${array_configs[@]}"; do - # every config is copied - echo -e "copying ${config} config file." - fn_script_log_info "copying ${servercfg} config file." - if [ "${config}" == "${servercfgdefault}" ]; then - mkdir -p "${servercfgdir}" - cp -nv "${lgsmdir}/config-default/config-game/${config}" "${servercfgfullpath}" - elif [ "${shortname}" == "arma3" ] && [ "${config}" == "${networkcfgdefault}" ]; then - mkdir -p "${servercfgdir}" - cp -nv "${lgsmdir}/config-default/config-game/${config}" "${networkcfgfullpath}" - elif [ "${shortname}" == "dst" ] && [ "${config}" == "${clustercfgdefault}" ]; then - cp -nv "${lgsmdir}/config-default/config-game/${clustercfgdefault}" "${clustercfgfullpath}" - else - mkdir -p "${servercfgdir}" - cp -nv "${lgsmdir}/config-default/config-game/${config}" "${servercfgdir}/${config}" - fi - done - fn_sleep_time -} - -# Copys local default config to server config location. -fn_default_config_local() { - echo -e "copying ${servercfgdefault} config file." - cp -nv "${servercfgdir}/${servercfgdefault}" "${servercfgfullpath}" - fn_sleep_time -} - -# Changes some variables within the default configs. -# SERVERNAME to LinuxGSM -# PASSWORD to random password -fn_set_config_vars() { - if [ -f "${servercfgfullpath}" ]; then - random=$(tr -dc A-Za-z0-9_ < /dev/urandom | head -c 8 | xargs) - servername="LinuxGSM" - rconpass="admin${random}" - echo -e "changing hostname." - fn_script_log_info "changing hostname." - fn_sleep_time - # prevents var from being overwritten with the servername. - if grep -q "SERVERNAME=SERVERNAME" "${lgsmdir}/config-default/config-game/${config}" 2> /dev/null; then - sed -i "s/SERVERNAME=SERVERNAME/SERVERNAME=${servername}/g" "${servercfgfullpath}" - elif grep -q "SERVERNAME=\"SERVERNAME\"" "${lgsmdir}/config-default/config-game/${config}" 2> /dev/null; then - sed -i "s/SERVERNAME=\"SERVERNAME\"/SERVERNAME=\"${servername}\"/g" "${servercfgfullpath}" - else - sed -i "s/SERVERNAME/${servername}/g" "${servercfgfullpath}" - fi - echo -e "changing rcon/admin password." - fn_script_log_info "changing rcon/admin password." - if [ "${shortname}" == "squad" ]; then - sed -i "s/ADMINPASSWORD/${rconpass}/g" "${servercfgdir}/Rcon.cfg" - else - sed -i "s/ADMINPASSWORD/${rconpass}/g" "${servercfgfullpath}" - fi - fn_sleep_time - else - fn_script_log_warn "Config file not found, cannot alter it." - echo -e "Config file not found, cannot alter it." - fn_sleep_time - fi -} - -# Changes some variables within the default Don't Starve Together configs. -fn_set_dst_config_vars() { - ## cluster.ini - if grep -Fq "SERVERNAME" "${clustercfgfullpath}"; then - echo -e "changing server name." - fn_script_log_info "changing server name." - sed -i "s/SERVERNAME/LinuxGSM/g" "${clustercfgfullpath}" - fn_sleep_time - echo -e "changing shard mode." - fn_script_log_info "changing shard mode." - sed -i "s/USESHARDING/${sharding}/g" "${clustercfgfullpath}" - fn_sleep_time - echo -e "randomizing cluster key." - fn_script_log_info "randomizing cluster key." - randomkey=$(tr -dc A-Za-z0-9_ < /dev/urandom | head -c 8 | xargs) - sed -i "s/CLUSTERKEY/${randomkey}/g" "${clustercfgfullpath}" - fn_sleep_time - else - echo -e "${clustercfg} is already configured." - fn_script_log_info "${clustercfg} is already configured." - fi - - ## server.ini - # removing unnecessary options (dependent on sharding & shard type). - if [ "${sharding}" == "false" ]; then - sed -i "s/ISMASTER//g" "${servercfgfullpath}" - sed -i "/SHARDNAME/d" "${servercfgfullpath}" - elif [ "${master}" == "true" ]; then - sed -i "/SHARDNAME/d" "${servercfgfullpath}" - fi - - echo -e "changing shard name." - fn_script_log_info "changing shard name." - sed -i "s/SHARDNAME/${shard}/g" "${servercfgfullpath}" - fn_sleep_time - echo -e "changing master setting." - fn_script_log_info "changing master setting." - sed -i "s/ISMASTER/${master}/g" "${servercfgfullpath}" - fn_sleep_time - - ## worldgenoverride.lua - if [ "${cave}" == "true" ]; then - echo -e "defining ${shard} as cave in ${servercfgdir}/worldgenoverride.lua." - fn_script_log_info "defining ${shard} as cave in ${servercfgdir}/worldgenoverride.lua." - echo 'return { override_enabled = true, preset = "DST_CAVE", }' > "${servercfgdir}/worldgenoverride.lua" - fi - fn_sleep_time - echo -e "" -} - -# Lists local config file locations -fn_list_config_locations() { - echo -e "" - echo -e "${lightyellow}Config File Locations${default}" - echo -e "=================================" - if [ -n "${servercfgfullpath}" ]; then - if [ -f "${servercfgfullpath}" ]; then - echo -e "Game Server Config File: ${servercfgfullpath}" - elif [ -d "${servercfgfullpath}" ]; then - echo -e "Game Server Config Dir: ${servercfgfullpath}" - else - echo -e "Config file: ${red}${servercfgfullpath} (${red}FILE MISSING${default})" - fi - fi - echo -e "LinuxGSM Config: ${lgsmdir}/config-lgsm/${gameservername}" - echo -e "Documentation: https://docs.linuxgsm.com/configuration/game-server-config" -} - -if [ "${shortname}" == "sdtd" ]; then - gamedirname="7DaysToDie" - fn_default_config_local - fn_list_config_locations -elif [ "${shortname}" == "ac" ]; then - gamedirname="AssettoCorsa" - array_configs+=(server_cfg.ini) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "ahl" ]; then - gamedirname="ActionHalfLife" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "ahl2" ]; then - gamedirname="ActionSource" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "ark" ]; then - gamedirname="ARKSurvivalEvolved" - fn_check_cfgdir - array_configs+=(GameUserSettings.ini) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "arma3" ]; then - gamedirname="Arma3" - fn_check_cfgdir - array_configs+=(server.cfg network.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "armar" ]; then - gamedirname="ArmaReforger" - fn_check_cfgdir - array_configs+=(server.json) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "ats" ]; then - gamedirname="AmericanTruckSimulator" - fn_check_cfgdir - array_configs+=(server_config.sii) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "bo" ]; then - gamedirname="BallisticOverkill" - array_configs+=(config.txt) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "bd" ]; then - gamedirname="BaseDefense" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "bt" ]; then - gamedirname="Barotrauma" - fn_check_cfgdir - array_configs+=(serversettings.xml) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "btl" ]; then - gamedirname="BattalionLegacy" - fn_check_cfgdir - array_configs+=(DefaultGame.ini) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "bf1942" ]; then - gamedirname="Battlefield1942" - array_configs+=(serversettings.con) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "bfv" ]; then - gamedirname="BattlefieldVietnam" - array_configs+=(serversettings.con) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "bs" ]; then - gamedirname="BladeSymphony" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "bb" ]; then - gamedirname="BrainBread" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "bb2" ]; then - gamedirname="BrainBread2" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "bmdm" ]; then - gamedirname="BlackMesa" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "cd" ]; then - gamedirname="CraftingDead" - array_configs+=(properties.json) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "ck" ]; then - gamedirname="CoreKeeper" - array_configs+=(ServerConfig.json) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "cod" ]; then - gamedirname="CallOfDuty" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "coduo" ]; then - gamedirname="CallOfDutyUnitedOffensive" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "cod2" ]; then - gamedirname="CallOfDuty2" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "cod4" ]; then - gamedirname="CallOfDuty4" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "codwaw" ]; then - gamedirname="CallOfDutyWorldAtWar" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "cc" ]; then - gamedirname="CodenameCURE" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "col" ]; then - gamedirname="ColonySurvival" - array_configs+=(colserver.json) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "cs" ]; then - gamedirname="CounterStrike" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "cscz" ]; then - gamedirname="CounterStrikeConditionZero" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "csgo" ]; then - gamedirname="CounterStrikeGlobalOffensive" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "css" ]; then - gamedirname="CounterStrikeSource" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "dayz" ]; then - gamedirname="DayZ" - fn_check_cfgdir - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "dod" ]; then - gamedirname="DayOfDefeat" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "dodr" ]; then - gamedirname="DayOfDragons" - array_configs+=(Game.ini) - fn_fetch_default_config - fn_default_config_remote - fn_list_config_locations -elif [ "${shortname}" == "dods" ]; then - gamedirname="DayOfDefeatSource" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "doi" ]; then - gamedirname="DayOfInfamy" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "dmc" ]; then - gamedirname="DeathmatchClassic" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "dst" ]; then - gamedirname="DontStarveTogether" - fn_check_cfgdir - array_configs+=(cluster.ini server.ini) - fn_fetch_default_config - fn_default_config_remote - fn_set_dst_config_vars - fn_list_config_locations -elif [ "${shortname}" == "dab" ]; then - gamedirname="DoubleActionBoogaloo" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "dys" ]; then - gamedirname="Dystopia" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "eco" ]; then - gamedirname="Eco" - array_configs+=(Network.eco) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "etl" ]; then - gamedirname="ETLegacy" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "ets2" ]; then - gamedirname="EuroTruckSimulator2" - fn_check_cfgdir - array_configs+=(server_config.sii) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "fctr" ]; then - gamedirname="Factorio" - array_configs+=(server-settings.json) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "fof" ]; then - gamedirname="FistfulofFrags" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "gmod" ]; then - gamedirname="GarrysMod" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "hldm" ]; then - gamedirname="HalfLifeDeathmatch" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "hldms" ]; then - gamedirname="HalfLifeDeathmatchSource" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "opfor" ]; then - gamedirname="OpposingForce" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "hl2dm" ]; then - gamedirname="HalfLife2Deathmatch" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "ins" ]; then - gamedirname="Insurgency" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "ios" ]; then - gamedirname="IOSoccer" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "jc2" ]; then - gamedirname="JustCause2" - array_configs+=(config.lua) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "jc3" ]; then - gamedirname="JustCause3" - array_configs+=(config.json) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "kf" ]; then - gamedirname="KillingFloor" - array_configs+=(Default.ini) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "l4d" ]; then - gamedirname="Left4Dead" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "l4d2" ]; then - gamedirname="Left4Dead2" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ]; then - gamedirname="Minecraft" - array_configs+=(server.properties) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "mcb" ]; then - gamedirname="MinecraftBedrock" - array_configs+=(server.properties) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "mohaa" ]; then - gamedirname="MedalOfHonorAlliedAssault" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "mh" ]; then - gamedirname="Mordhau" - fn_check_cfgdir - array_configs+=(Game.ini) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "ns" ]; then - gamedirname="NaturalSelection" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "nmrih" ]; then - gamedirname="NoMoreRoominHell" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "nd" ]; then - gamedirname="NuclearDawn" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "mta" ]; then - gamedirname="MultiTheftAuto" - fn_check_cfgdir - array_configs+=(acl.xml mtaserver.conf vehiclecolors.conf) - fn_fetch_default_config - fn_default_config_remote - fn_list_config_locations -elif [ "${shotname}" == "mom" ]; then - gamedirname="MemoriesofMars" - array_configs+=(DedicatedServerConfig.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "pvr" ]; then - gamedirname="PavlovVR" - fn_check_cfgdir - array_configs+=(Game.ini) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars -elif [ "${shortname}" == "pvkii" ]; then - gamedirname="PiratesVikingandKnightsII" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "pz" ]; then - gamedirname="ProjectZomboid" - fn_check_cfgdir - array_configs+=(server.ini) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "nec" ]; then - gamedirname="Necesse" - fn_check_cfgdir - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "pc" ]; then - gamedirname="ProjectCars" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "pc2" ]; then - gamedirname="ProjectCars2" - fn_default_config_local - fn_list_config_locations -elif [ "${shortname}" == "q2" ]; then - gamedirname="Quake2" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "q3" ]; then - gamedirname="Quake3Arena" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "ql" ]; then - gamedirname="QuakeLive" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "jk2" ]; then - gamedirname="JediKnightIIJediOutcast" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars -elif [ "${shortname}" == "qw" ]; then - gamedirname="QuakeWorld" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "ricochet" ]; then - gamedirname="Ricochet" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "rtcw" ]; then - gamedirname="ReturnToCastleWolfenstein" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "rust" ]; then - gamedirname="Rust" - fn_check_cfgdir - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_list_config_locations -elif [ "${shortname}" == "scpsl" ] || [ "${shortname}" == "scpslsm" ]; then - gamedirname="SCPSecretLaboratory" - array_configs+=(config_gameplay.txt config_localadmin.txt) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "sf" ]; then - gamedirname="Satisfactory" - array_configs+=(GameUserSettings.ini) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "sol" ]; then - gamedirname="Soldat" - array_configs+=(soldat.ini) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "sof2" ]; then - gamedirname="SoldierOfFortune2Gold" - array_configs+=(server.cfg mapcycle.txt) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "sfc" ]; then - gamedirname="SourceFortsClassic" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "squad" ]; then - gamedirname="Squad" - array_configs+=(Admins.cfg Bans.cfg License.cfg Server.cfg Rcon.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "sb" ]; then - gamedirname="Starbound" - array_configs+=(starbound_server.config) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "st" ]; then - gamedirname="Stationeers" - array_configs+=(default.ini) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "stn" ]; then - gamedirname="SurvivetheNights" - array_configs+=(ServerConfig.txt ServerUsers.txt TpPresets.json UserPermissions.json) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "sven" ]; then - gamedirname="SvenCoop" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "tf2" ]; then - gamedirname="TeamFortress2" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "tfc" ]; then - gamedirname="TeamFortressClassic" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "ti" ]; then - gamedirname="TheIsle" - array_configs+=(Game.ini) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "ts" ]; then - gamedirname="TheSpecialists" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "ts3" ]; then - gamedirname="TeamSpeak3" - array_configs+=(ts3server.ini) - fn_fetch_default_config - fn_default_config_remote - fn_list_config_locations -elif [ "${shortname}" == "tw" ]; then - gamedirname="Teeworlds" - array_configs+=(server.cfg ctf.cfg dm.cfg duel.cfg tdm.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "terraria" ]; then - gamedirname="Terraria" - array_configs+=(serverconfig.txt) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "tu" ]; then - gamedirname="TowerUnite" - fn_check_cfgdir - array_configs+=(TowerServer.ini) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "ut" ]; then - gamedirname="UnrealTournament" - array_configs+=(Game.ini Engine.ini) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "ut2k4" ]; then - gamedirname="UnrealTournament2004" - array_configs+=(UT2004.ini) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "ut99" ]; then - gamedirname="UnrealTournament99" - array_configs+=(Default.ini) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "unt" ]; then - gamedirname="Unturned" - array_configs+=(Config.json) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "vints" ]; then - gamedirname="VintageStory" - array_configs+=(serverconfig.json) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "vs" ]; then - gamedirname="VampireSlayer" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "wet" ]; then - gamedirname="WolfensteinEnemyTerritory" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "wf" ]; then - gamedirname="Warfork" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "wmc" ]; then - gamedirname="Waterfall" - array_configs+=(config.yml) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars -elif [ "${shortname}" == "wurm" ]; then - gamedirname="WurmUnlimited" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "zmr" ]; then - gamedirname="ZombieMasterReborn" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "zps" ]; then - gamedirname="ZombiePanicSource" - array_configs+=(server.cfg) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -fi diff --git a/lgsm/functions/install_dst_token.sh b/lgsm/functions/install_dst_token.sh deleted file mode 100644 index 50bc7ed97..000000000 --- a/lgsm/functions/install_dst_token.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -# LinuxGSM install_dst_token.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Configures Don't Starve Together cluster with given token. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -echo -e "" -echo -e "${lightyellow}Enter ${gamename} Cluster Token${default}" -echo -e "=================================" -fn_sleep_time -echo -e "A cluster token is required to run this server!" -echo -e "Follow the instructions in this link to obtain this key:" -echo -e "https://linuxgsm.com/dst-auth-token" -echo -e "" -if [ -z "${autoinstall}" ]; then - overwritetoken="true" - if [ -s "${clustercfgdir}/cluster_token.txt" ]; then - echo -e "The cluster token is already set. Do you want to overwrite it?" - fn_script_log_info "Don't Starve Together cluster token is already set" - if fn_prompt_yn "Continue?" N; then - overwritetoken="true" - else - overwritetoken="false" - fi - fi - if [ "${overwritetoken}" == "true" ]; then - echo -e "Once you have the cluster token, enter it below" - echo -n "Cluster Token: " - read -r token - mkdir -pv "${clustercfgdir}" - echo -e "${token}" > "${clustercfgdir}/cluster_token.txt" - if [ -f "${clustercfgdir}/cluster_token.txt" ]; then - echo -e "Don't Starve Together cluster token created" - fn_script_log_info "Don't Starve Together cluster token created" - fi - unset overwritetoken - fi -else - echo -e "You can add your cluster token using the following command" - echo -e "./${selfname} cluster-token" -fi -echo -e "" diff --git a/lgsm/functions/install_eula.sh b/lgsm/functions/install_eula.sh deleted file mode 100644 index 3e51fac71..000000000 --- a/lgsm/functions/install_eula.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# LinuxGSM install_eula.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Gets user to accept the EULA. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -if [ "${shortname}" == "ts3" ]; then - eulaurl="https://www.teamspeak.com/en/privacy-and-terms" -elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ]; then - eulaurl="https://account.mojang.com/documents/minecraft_eula" -elif [ "${shortname}" == "ut" ]; then - eulaurl="https://www.epicgames.com/unrealtournament/unreal-tournament-pre-alpha-test-development-build-eula" -fi - -echo -e "" -echo -e "${lightyellow}Accept ${gamename} EULA${default}" -echo -e "=================================" -fn_sleep_time -echo -e "You are required to accept the EULA:" -echo -e "${eulaurl}" -echo -e "" -if [ -z "${autoinstall}" ]; then - echo -e "By continuing you are indicating your agreement to the EULA." - echo -e "" - if ! fn_prompt_yn "Continue?" Y; then - exitcode=0 - core_exit.sh - fi -elif [ "${commandname}" == "START" ]; then - fn_print_info "By continuing you are indicating your agreement to the EULA." - sleep 5 -else - echo -e "By using auto-install you are indicating your agreement to the EULA." - sleep 5 -fi - -if [ "${shortname}" == "ts3" ]; then - touch "${executabledir}/.ts3server_license_accepted" -elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ]; then - touch "${serverfiles}/eula.txt" - echo -e "eula=true" > "${serverfiles}/eula.txt" -elif [ "${shortname}" == "ut" ]; then - : -fi diff --git a/lgsm/functions/install_factorio_save.sh b/lgsm/functions/install_factorio_save.sh deleted file mode 100644 index f5fdb8a04..000000000 --- a/lgsm/functions/install_factorio_save.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -# LinuxGSM install_factorio_save.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Creates the initial save file for Factorio. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -echo -e "" -echo -e "${lightyellow}Creating initial Factorio savefile${default}" -echo -e "=================================" -fn_sleep_time -check_glibc.sh -"${executabledir}"/factorio --create "${serverfiles}/save1" diff --git a/lgsm/functions/install_gslt.sh b/lgsm/functions/install_gslt.sh deleted file mode 100644 index 1ae1ef3b0..000000000 --- a/lgsm/functions/install_gslt.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# LinuxGSM install_gslt.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Configures GSLT. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -echo -e "" -echo -e "${lightyellow}Game Server Login Token${default}" -echo -e "=================================" -fn_sleep_time -if [ "${shortname}" == "csgo" ] || [ "${shortname}" == "css" ] || [ "${shortname}" == "nmrih" ] || [ "${shortname}" == "bs" ]; then - echo -e "GSLT is required to run a public ${gamename} server" - fn_script_log_info "GSLT is required to run a public ${gamename} server" -else - echo -e "GSLT is an optional feature for ${gamename} server" - fn_script_log_info "GSLT is an optional feature for ${gamename} server" -fi - -echo -e "Get more info and a token here:" -echo -e "https://docs.linuxgsm.com/steamcmd/gslt" -fn_script_log_info "Get more info and a token here:" -fn_script_log_info "https://docs.linuxgsm.com/steamcmd/gslt" -echo -e "" -if [ -z "${autoinstall}" ]; then - if [ "${shortname}" != "tu" ]; then - echo -e "Enter token below (Can be blank)." - echo -n "GSLT TOKEN: " - read -r token - if ! grep -q "^gslt=" "${configdirserver}/${selfname}.cfg" > /dev/null 2>&1; then - echo -e "\ngslt=\"${token}\"" >> "${configdirserver}/${selfname}.cfg" - else - sed -i -e "s/gslt=\"[^\"]*\"/gslt=\"${token}\"/g" "${configdirserver}/${selfname}.cfg" - fi - fi -fi -fn_sleep_time -if [ "${shortname}" == "tu" ]; then - echo -e "The GSLT can be changed by editing ${servercfgdir}/${servercfg}." - fn_script_log_info "The GSLT can be changed by editing ${servercfgdir}/${servercfg}." -else - echo -e "The GSLT can be changed by editing ${configdirserver}/${selfname}.cfg." - fn_script_log_info "The GSLT can be changed by editing ${configdirserver}/${selfname}.cfg." -fi -echo -e "" diff --git a/lgsm/functions/install_header.sh b/lgsm/functions/install_header.sh deleted file mode 100644 index 4cf067f8f..000000000 --- a/lgsm/functions/install_header.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -# LinuxGSM install_header.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Prints installation header. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -clear -fn_print_ascii_logo -fn_sleep_time -echo -e "=================================" -echo -e "${lightyellow}Linux${default}GSM_" -echo -e "by Daniel Gibbs" -echo -e "${lightblue}Version:${default} ${version}" -echo -e "${lightblue}Game:${default} ${gamename}" -echo -e "${lightblue}Website:${default} https://linuxgsm.com" -echo -e "${lightblue}Contributors:${default} https://linuxgsm.com/contrib" -echo -e "${lightblue}Sponsor:${default} https://linuxgsm.com/sponsor" -echo -e "=================================" -fn_sleep_time diff --git a/lgsm/functions/install_logs.sh b/lgsm/functions/install_logs.sh deleted file mode 100644 index 80a55fb94..000000000 --- a/lgsm/functions/install_logs.sh +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/bash -# LinuxGSM install_logs.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Creates log directories. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -if [ "${checklogs}" != "1" ]; then - echo -e "" - echo -e "${lightyellow}Creating log directories${default}" - echo -e "=================================" -fi -fn_sleep_time -# Create LinuxGSM logs. -echo -en "installing log dir: ${logdir}..." -mkdir -p "${logdir}" -if [ $? != 0 ]; then - fn_print_fail_eol_nl - core_exit.sh -else - fn_print_ok_eol_nl -fi - -echo -en "installing LinuxGSM log dir: ${lgsmlogdir}..." -mkdir -p "${lgsmlogdir}" -if [ $? != 0 ]; then - fn_print_fail_eol_nl - core_exit.sh -else - fn_print_ok_eol_nl -fi -echo -en "creating LinuxGSM log: ${lgsmlog}..." -touch "${lgsmlog}" -if [ $? != 0 ]; then - fn_print_fail_eol_nl - core_exit.sh -else - fn_print_ok_eol_nl -fi -# Create Console logs. -if [ "${consolelogdir}" ]; then - echo -en "installing console log dir: ${consolelogdir}..." - mkdir -p "${consolelogdir}" - if [ $? != 0 ]; then - fn_print_fail_eol_nl - core_exit.sh - else - fn_print_ok_eol_nl - fi - echo -en "creating console log: ${consolelog}..." - if ! touch "${consolelog}"; then - fn_print_fail_eol_nl - core_exit.sh - else - fn_print_ok_eol_nl - fi -fi - -# Create Game logs. -if [ "${gamelogdir}" ] && [ ! -d "${gamelogdir}" ]; then - echo -en "installing game log dir: ${gamelogdir}..." - if ! mkdir -p "${gamelogdir}"; then - fn_print_fail_eol_nl - core_exit.sh - else - fn_print_ok_eol_nl - fi -fi - -# Symlink to gamelogdir -# unless gamelogdir is within logdir. -# e.g serverfiles/log is not within log/: symlink created -# log/server is in log/: symlink not created -if [ "${gamelogdir}" ]; then - if [ "${gamelogdir:0:${#logdir}}" != "${logdir}" ]; then - echo -en "creating symlink to game log dir: ${logdir}/server -> ${gamelogdir}..." - if ! ln -nfs "${gamelogdir}" "${logdir}/server"; then - fn_print_fail_eol_nl - core_exit.sh - else - fn_print_ok_eol_nl - fi - fi -fi - -# If server uses SteamCMD create a symbolic link to the Steam logs. -if [ -d "${rootdir}/Steam/logs" ]; then - if [ ! -L "${logdir}/steamcmd" ]; then - echo -en "creating symlink to steam log dir: ${logdir}/steamcmd -> ${rootdir}/Steam/logs..." - if ! ln -nfs "${rootdir}/Steam/logs" "${logdir}/steamcmd"; then - fn_print_fail_eol_nl - core_exit.sh - else - fn_print_ok_eol_nl - fi - fi -fi -fn_script_log_info "Logs installed" diff --git a/lgsm/functions/install_mta_resources.sh b/lgsm/functions/install_mta_resources.sh deleted file mode 100644 index 011ad9b71..000000000 --- a/lgsm/functions/install_mta_resources.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -# LinuxGSM install_mta_resources.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Installs the libmysqlclient for database functions on the server and optionally installs default resources required to run the server. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -fn_print_information_nl "${gamename} will not function without resources!" -echo -e " * install default resources using ./${selfname} install-default-resources" -echo -e " * download resources from https://community.multitheftauto.com" diff --git a/lgsm/functions/install_retry.sh b/lgsm/functions/install_retry.sh deleted file mode 100644 index a36b4fb38..000000000 --- a/lgsm/functions/install_retry.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -# LinuxGSM install_retry.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Asks for installation retry after failure. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -if fn_prompt_yn "Retry install?" Y; then - command_install.sh - core_exit.sh -else - exitcode=0 - core_exit.sh -fi diff --git a/lgsm/functions/install_server_dir.sh b/lgsm/functions/install_server_dir.sh deleted file mode 100644 index 658f4360c..000000000 --- a/lgsm/functions/install_server_dir.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -# LinuxGSM install_server_dir.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Creates the server directory. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -echo -e "" -echo -e "${lightyellow}Server Directory${default}" -echo -e "=================================" -fn_sleep_time -if [ -d "${serverfiles}" ]; then - fn_print_warning_nl "A server is already installed here." -fi -pwd -if [ -z "${autoinstall}" ]; then - if ! fn_prompt_yn "Continue?" Y; then - exitcode=0 - core_exit.sh - fi -fi -if [ ! -d "${serverfiles}" ]; then - mkdir -v "${serverfiles}" -fi diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh deleted file mode 100644 index e550e1455..000000000 --- a/lgsm/functions/install_server_files.sh +++ /dev/null @@ -1,255 +0,0 @@ -#!/bin/bash -# LinuxGSM install_server_files.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Installs server files. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -fn_install_server_files() { - if [ "${shortname}" == "ahl" ]; then - remote_fileurl="http://linuxgsm.download/ActionHalfLife/action_halflife-1.0.tar.xz" - local_filedir="${tmpdir}" - local_filename="action_halflife-1.0.tar.xz" - chmodx="nochmodx" run="norun" - force="noforce" - md5="61d7b79fd714888b6d65944fdaafa94a" - elif [ "${shortname}" == "bf1942" ]; then - remote_fileurl="http://linuxgsm.download/BattleField1942/bf1942_lnxded-1.61-hacked-to-1.612.full.tar.xz" - local_filedir="${tmpdir}" - local_filename="bf1942_lnxded-1.61-hacked-to-1.612.full.tar.xz" - chmodx="nochmodx" run="norun" - force="noforce" - md5="4223bf4ed85f5162c24b2cba51249b9e" - elif [ "${shortname}" == "bfv" ]; then - remote_fileurl="http://linuxgsm.download/BattlefieldVietnam/bfv_linded-v1.21-20041207_patch.tar.xz" - local_filedir="${tmpdir}" - local_filename="bfv_linded-v1.21-20041207_patch.tar.xz" - chmodx="nochmodx" run="norun" - force="noforce" - md5="e3b4962cdd9d41e23c6fed65101bccde" - elif [ "${shortname}" == "bb" ]; then - remote_fileurl="http://linuxgsm.download/BrainBread/brainbread-v1.2-linuxserver.tar.xz" - local_filedir="${tmpdir}" - local_filename="brainbread-v1.2-linuxserver.tar.xz" - chmodx="nochmodx" run="norun" - force="noforce" - md5="55f227183b736397806d5b6db6143f15" - elif [ "${shortname}" == "cod" ]; then - remote_fileurl="http://linuxgsm.download/CallOfDuty/cod-lnxded-1.5b-full.tar.xz" - local_filedir="${tmpdir}" - local_filename="cod-lnxded-1.5-large.tar.xz" - chmodx="nochmodx" run="norun" - force="noforce" - md5="ee0ad1ccbfa1fd27fde01a4a431a5c2f" - elif [ "${shortname}" == "coduo" ]; then - remote_fileurl="http://linuxgsm.download/CallOfDutyUnitedOffensive/coduo-lnxded-1.51b-full.tar.xz" - local_filedir="${tmpdir}" - local_filename="coduo-lnxded-1.51b-full.tar.xz" - chmodx="nochmodx" run="norun" - force="noforce" - md5="35cabccd67adcda44aaebc59405915b9" - elif [ "${shortname}" == "cod2" ]; then - remote_fileurl="http://linuxgsm.download/CallOfDuty2/cod2-lnxded-1.3-full.tar.xz" - local_filedir="${tmpdir}" - local_filename="cod2-lnxded-1.3-full.tar.xz" - chmodx="nochmodx" run="norun" - force="noforce" - md5="b8c4c611f01627dd43348e78478a3d41" - elif [ "${shortname}" == "cod4" ]; then - remote_fileurl="http://linuxgsm.download/CallOfDuty4/cod4x18_lnxded.tar.xz" - local_filedir="${tmpdir}" - local_filename="cod4x18_lnxded.tar.xz" - chmodx="nochmodx" run="norun" - force="noforce" - md5="d255b59b9756d7dbead67718208512ee" - elif [ "${shortname}" == "codwaw" ]; then - remote_fileurl="http://linuxgsm.download/CallOfDutyWorldAtWar/codwaw-lnxded-1.7-full.tar.xz" - local_filedir="${tmpdir}" - local_filename="codwaw-lnxded-1.7-full.tar.xz" - chmodx="nochmodx" run="norun" - force="noforce" - md5="2c6be1bb66ea631b9b2e7ae6216c6680" - elif [ "${shortname}" == "etl" ]; then - remote_fileurl="http://linuxgsm.download/WolfensteinEnemyTerritory/etlegacy-v2.78.1-i386-et-260b.tar.xz" - local_filedir="${tmpdir}" - local_filename="etlegacy-v2.78.1-i386-et-260b.tar.xz" - chmodx="nochmodx" run="norun" - force="noforce" - md5="7c08b52cb09b30eadb98ea05ef780fc7" - elif [ "${shortname}" == "mohaa" ]; then - remote_fileurl="http://linuxgsm.download/MedalofHonorAlliedAssault/moh_revival_v1.12_RC3.5.1.tar.xz" - local_filedir="${tmpdir}" - local_filename="moh_revival_v1.12_RC3.5.1.tar.xz" - chmodx="nochmodx" run="norun" - force="noforce" - md5="7c664538999252eeaf2b6d9949416480" - elif [ "${shortname}" == "ns" ]; then - remote_fileurl="http://linuxgsm.download/NaturalSelection/ns_dedicated_server_v32.tar.xz" - local_filedir="${tmpdir}" - local_filename="ns_dedicated_server_v32.tar.xz" - chmodx="nochmodx" run="norun" - force="noforce" - md5="23ec3cadd93d8bb1c475bad5b9cce370" - elif [ "${shortname}" == "q2" ]; then - remote_fileurl="http://linuxgsm.download/Quake2/quake2-3.20-glibc-i386-full-linux2.0.tar.xz" - local_filedir="${tmpdir}" - local_filename="quake2-3.20-glibc-i386-full-linux2.0.tar.xz" - chmodx="nochmodx" run="norun" - force="noforce" - md5="2908164a32d4808bb720f2161f6b0c82" - elif [ "${shortname}" == "q3" ]; then - remote_fileurl="http://linuxgsm.download/Quake3/quake3-1.32c-x86-full-linux.tar.xz" - local_filedir="${tmpdir}" - local_filename="quake3-1.32c-x86-full-linux.tar.xz" - chmodx="nochmodx" run="norun" - force="noforce" - md5="b0e26d8919fe9313fb9d8ded2360f3db" - elif [ "${shortname}" == "qw" ]; then - remote_fileurl="http://linuxgsm.download/QuakeWorld/nquake.server.linux.190506.full.tar.xz" - local_filedir="${tmpdir}" - local_filename="nquake.server.linux.190506.full.tar.xz" - chmodx="nochmodx" run="norun" - force="noforce" - md5="82055b7d973206c13a606db8ba288d03" - elif [ "${shortname}" == "rtcw" ]; then - remote_fileurl="http://linuxgsm.download/ReturnToCastleWolfenstein/iortcw-1.51c-x86_64-server-linux-20190507.tar.xz" - local_filedir="${tmpdir}" - local_filename="iortcw-1.51c-x86_64-server-linux-20190507.tar.xz" - chmodx="nochmodx" run="norun" - force="noforce" - md5="df6ff664d37dd0d22787848bdb3cac5f" - elif [ "${shortname}" == "sfc" ]; then - remote_fileurl="http://linuxgsm.download/SourceFortsClassic/SFClassic-1.0-RC7-fix.tar.xz" - local_filedir="${tmpdir}" - local_filename="SFClassic-1.0-RC7-fix.tar.xz" - chmodx="nochmodx" run="norun" - force="noforce" - md5="70077137185700e28fe6bbb6021d12bc" - elif [ "${shortname}" == "sof2" ]; then - remote_fileurl="http://linuxgsm.download/SoldierOfFortune2/sof2gold-1.03.tar.xz" - local_filedir="${tmpdir}" - local_filename="sof2gold-1.03.tar.xz" - chmodx="nochmodx" run="norun" - force="noforce" - md5="201e23bab04207d00ce813d001c483d9" - elif [ "${shortname}" == "ts" ]; then - remote_fileurl="http://linuxgsm.download/TheSpecialists/ts-3-linux-final.tar.xz" - local_filedir="${tmpdir}" - local_filename="ts-3-linux-final.tar.xz" - chmodx="nochmodx" run="norun" - force="noforce" - md5="3c66ecff6e3644f7ac88015732a0fb93" - elif [ "${shortname}" == "ut2k4" ]; then - remote_fileurl="http://linuxgsm.download/UnrealTournament2004/ut2004-server-3369-3-ultimate-linux.tar.xz" - local_filedir="${tmpdir}" - local_filename="ut2004-server-3369-3-ultimate-linux.tar.xz" - chmodx="nochmodx" run="norun" - force="noforce" - md5="9fceaab68554749f4b45be66613b9a15" - elif [ "${shortname}" == "ut99" ]; then - remote_fileurl="http://linuxgsm.download/UnrealTournament99/ut99-server-469b-ultimate-linux.tar.xz" - local_filedir="${tmpdir}" - local_filename="ut99-server-469b-ultimate-linux.tar.xz" - chmodx="nochmodx" run="norun" - force="noforce" - md5="dba3f1122a5e60ee45ece7422fcf78f5" - elif [ "${shortname}" == "ut" ]; then - remote_fileurl="http://linuxgsm.download/UnrealTournament/UnrealTournament-Server-XAN-3525360-Linux.tar.xz" - local_filedir="${tmpdir}" - local_filename="UnrealTournament-Server-XAN-3525360-Linux.tar.xz" - chmodx="noexecute" run="norun" - force="noforce" - md5="41dd92015713a78211eaccf503b72393" - elif [ "${shortname}" == "ut3" ]; then - remote_fileurl="http://linuxgsm.download/UnrealTournament3/UT3-linux-server-2.1.tar.xz" - local_filedir="${tmpdir}" - local_filename="UT3-linux-server-2.1.tar.xz" - chmodx="nochmodx" run="norun" - force="noforce" - md5="8876cca61e3f83ea08db25208bde6ac6" - elif [ "${shortname}" == "vs" ]; then - remote_fileurl="http://linuxgsm.download/VampireSlayer/vs_l-6.0_full.tar.xz" - local_filedir="${tmpdir}" - local_filename="vs_l-6.0_full.tar.xz" - chmodx="nochmodx" run="norun" - force="noforce" - md5="b322f79e0abd31847493c52acf802667" - elif [ "${shortname}" == "wet" ]; then - remote_fileurl="http://linuxgsm.download/WolfensteinEnemyTerritory/enemy-territory.260b.tar.xz" - local_filedir="${tmpdir}" - local_filename="enemy-territory.260b.tar.xz" - chmodx="nochmodx" run="norun" - force="noforce" - md5="581a333cc7eacda2f56d5a00fe11eafa" - elif [ "${shortname}" == "samp" ]; then - remote_fileurl="https://files.sa-mp.com/samp037svr_R2-1.tar.gz" - local_filedir="${tmpdir}" - local_filename="samp037svr_R2-1.tar.gz" - chmodx="nochmodx" run="norun" - force="noforce" - md5="93705e165550c97484678236749198a4" - elif [ "${shortname}" == "zmr" ]; then - remote_fileurl="http://linuxgsm.download/ZombieMasterReborn/zombie_master_reborn_b6_1.tar.xz" - local_filedir="${tmpdir}" - local_filename="zombie_master_reborn_b6_1.tar.xz" - chmodx="nochmodx" run="norun" - force="noforce" - md5="0188ae86dbc9376f11ae3032dba2d665" - else - fn_print_fail_nl "Installing ${gamename} Server failed, missing default configuration" - fn_script_log_fatal "Installing ${gamename} Server failed, missing default configuration" - fi - fn_fetch_file "${remote_fileurl}" "" "" "" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" - fn_dl_extract "${local_filedir}" "${local_filename}" "${serverfiles}" -} - -echo -e "" -echo -e "${lightyellow}Installing ${gamename} Server${default}" -echo -e "=================================" -fn_sleep_time - -if [ "${appid}" ]; then - remotelocation="SteamCMD" - fn_dl_steamcmd -fi - -if [ "${shortname}" == "ts3" ]; then - update_ts3.sh -elif [ "${shortname}" == "mc" ]; then - install_eula.sh - update_minecraft.sh -elif [ "${shortname}" == "mcb" ]; then - update_minecraft_bedrock.sh -elif [ "${shortname}" == "pmc" ]; then - install_eula.sh - update_papermc.sh -elif [ "${shortname}" == "wmc" ] || [ "${shortname}" == "vpmc" ]; then - update_papermc.sh -elif [ "${shortname}" == "mta" ]; then - update_mta.sh -elif [ "${shortname}" == "fctr" ]; then - update_factorio.sh - install_factorio_save.sh -elif [ "${shortname}" == "jk2" ]; then - update_jediknight2.sh -elif [ "${shortname}" == "vints" ]; then - update_vintagestory.sh -elif [ "${shortname}" == "ut99" ]; then - fn_install_server_files - update_ut99.sh -elif [ -z "${appid}" ] || [ "${shortname}" == "ahl" ] || [ "${shortname}" == "bb" ] || [ "${shortname}" == "ns" ] || [ "${shortname}" == "sfc" ] || [ "${shortname}" == "ts" ] || [ "${shortname}" == "vs" ] || [ "${shortname}" == "zmr" ]; then - if [ "${shortname}" == "ut" ]; then - install_eula.sh - fi - fn_install_server_files -fi - -if [ -z "${autoinstall}" ]; then - echo -e "" - echo -e "=================================" - if ! fn_prompt_yn "Was the install successful?" Y; then - install_retry.sh - fi -fi diff --git a/lgsm/functions/install_squad_license.sh b/lgsm/functions/install_squad_license.sh deleted file mode 100644 index 181646e85..000000000 --- a/lgsm/functions/install_squad_license.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -# LinuxGSM install_squad_license.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Configures the Squad server's license. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -echo -e "" -echo -e "${lightyellow}Squad Server License${default}" -echo -e "=================================" -fn_sleep_time -echo -e "Server license is an optional feature for ${gamename} server" -fn_script_log_info "Server license is an optional feature for ${gamename} server" - -echo -e "Get more info and a server license here:" -echo -e "http://forums.joinsquad.com/topic/16519-server-licensing-general-info/" -fn_script_log_info "Get more info and a server license here:" -fn_script_log_info "http://forums.joinsquad.com/topic/16519-server-licensing-general-info/" -echo -e "" -fn_sleep_time -echo -e "The Squad server license can be changed by editing ${servercfgdir}/License.cfg." -fn_script_log_info "The Squad server license can be changed by editing ${selfname}." -echo -e "" diff --git a/lgsm/functions/install_stats.sh b/lgsm/functions/install_stats.sh deleted file mode 100644 index d3b45b40b..000000000 --- a/lgsm/functions/install_stats.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash -# LinuxGSM install_stats.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Enabled LinuxGSM Stats. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -echo -e "" -echo -e "${lightyellow}LinuxGSM Stats${default}" -echo -e "=================================" -fn_sleep_time -echo -e "Assist LinuxGSM development by sending anonymous stats to developers." -echo -e "More info: https://docs.linuxgsm.com/configuration/linuxgsm-stats" -echo -e "The following info will be sent:" -echo -e "* game server" -echo -e "* distro" -echo -e "* game server resource usage" -echo -e "* server hardware info" -if [ -z "${autoinstall}" ]; then - if fn_prompt_yn "Allow anonymous usage statistics?" Y; then - echo "stats=\"on\"" >> "${configdirserver}/common.cfg" - fn_print_information_nl "Stats setting is now enabled in common.cfg." - fi -else - fn_print_information_nl "auto-install leaves stats off by default. Stats can be enabled in common.cfg" -fi diff --git a/lgsm/functions/install_steamcmd.sh b/lgsm/functions/install_steamcmd.sh deleted file mode 100644 index b1e64a42c..000000000 --- a/lgsm/functions/install_steamcmd.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -# LinuxGSM install_steamcmd.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Downloads SteamCMD on install. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -echo -e "" -echo -e "${lightyellow}Installing SteamCMD${default}" -echo -e "=================================" -fn_sleep_time -check_steamcmd.sh diff --git a/lgsm/functions/install_ts3db.sh b/lgsm/functions/install_ts3db.sh deleted file mode 100644 index ed879cd28..000000000 --- a/lgsm/functions/install_ts3db.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash -# LinuxGSM install_ts3db.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Installs the database server MariaDB for TeamSpeak 3. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -fn_install_ts3db_mariadb() { - if [ ! -f "${serverfiles}/libts3db_mariadb.so" ]; then - echo -e "copying libmariadb.so.2...\c" - cp "${serverfiles}/redist/libmariadb.so.2" "${serverfiles}" - local exitcode=$? - if [ "${exitcode}" != "0" ]; then - fn_print_fail_eol_nl - fn_script_log_fatal "copying libmariadb.so.2" - core_exit.sh - else - fn_print_ok_eol_nl - fn_script_log_pass "copying libmariadb.so.2" - fi - fi - - echo -e "" - echo -e "${lightyellow}Configure ${gamename} Server for MariaDB${default}" - echo -e "=================================" - fn_sleep_time - read -rp "Enter MariaDB hostname: " mariahostname - read -rp "Enter MariaDB port: " mariaport - read -rp "Enter MariaDB username: " mariausername - read -rp "Enter MariaDB password: " mariapassword - read -rp "Enter MariaDB database name: " mariadbname - read -rp "Enter MariaDB socket path: " mariadbsocket - - { - echo -e "[config]" - echo -e "host='${mariahostname}'" - echo -e "port='${mariaport}'" - echo -e "username='${mariausername}'" - echo -e "password='${mariapassword}'" - echo -e "database='${mariadbname}'" - echo -e "socket='${mariadbsocket}'" - } >> "${servercfgdir}/ts3db_mariadb.ini" - sed -i "s/dbplugin=ts3db_sqlite3/dbplugin=ts3db_mariadb/g" "${servercfgfullpath}" - sed -i "s/dbpluginparameter=/dbpluginparameter=ts3db_mariadb.ini/g" "${servercfgfullpath}" - sed -i "s/dbsqlcreatepath=create_sqlite\//dbsqlcreatepath=create_mariadb\//g" "${servercfgfullpath}" - echo -e "updating ts3db_mariadb.ini." - fn_sleep_time -} - -echo -e "" -echo -e "${lightyellow}Select Database${default}" -echo -e "=================================" -fn_sleep_time -if [ -z "${autoinstall}" ]; then - if fn_prompt_yn "Do you want to use MariaDB instead of sqlite? (MariaDB must be pre-configured)" N; then - fn_install_ts3db_mariadb - fi -else - fn_print_information_nl "./${selfname} auto-install is uses sqlite. For MariaDB use ./${selfname} install" -fi - -install_eula.sh - -echo -e "" -echo -e "${lightyellow}Getting Privilege Key${default}" -echo -e "=================================" -fn_sleep_time -fn_print_information_nl "Save these details for later." -fn_print_information_nl "Key also saved in:" -echo -e "${serverfiles}/privilege_key.txt" -cd "${executabledir}" || exit -./ts3server_startscript.sh start inifile=ts3-server.ini 2>&1 | tee "${serverfiles}/privilege_key.txt" -sleep 5 -./ts3server_startscript.sh stop diff --git a/lgsm/functions/install_ut2k4_key.sh b/lgsm/functions/install_ut2k4_key.sh deleted file mode 100644 index 124052d05..000000000 --- a/lgsm/functions/install_ut2k4_key.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -# LinuxGSM install_ut2k4_key.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Activates ut2k4 server with given key. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -echo -e "" -echo -e "${lightyellow}Enter ${gamename} CD Key${default}" -echo -e "=================================" -fn_sleep_time -echo -e "To get your server listed on the Master Server list" -echo -e "you must get a free CD key. Get a key here:" -echo -e "https://www.epicgames.com/unrealtournament/forums/cdkey.php?2004" -echo -e "" -if [ -z "${autoinstall}" ]; then - echo -e "Once you have the key enter it below" - echo -n "KEY: " - read -r CODE - echo -e ""\""CDKey"\""="\""${CODE}"\""" > "${systemdir}/cdkey" - if [ -f "${systemdir}/cdkey" ]; then - fn_script_log_info "UT2K4 Server CD Key created" - fi -else - echo -e "You can add your key using the following command" - echo -e "./${selfname} server-cd-key" -fi -echo -e "" diff --git a/lgsm/functions/mods_core.sh b/lgsm/functions/mods_core.sh deleted file mode 100644 index 8e4ade771..000000000 --- a/lgsm/functions/mods_core.sh +++ /dev/null @@ -1,755 +0,0 @@ -#!/bin/bash -# LinuxGSM command_mods_install.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Core functions for mods list/install/update/remove - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -# Files and Directories. -modsdir="${lgsmdir}/mods" -modstmpdir="${modsdir}/tmp" -extractdest="${modstmpdir}/extract" -modsinstalledlist="installed-mods.txt" -modsinstalledlistfullpath="${modsdir}/${modsinstalledlist}" - -## Installation. - -# Download management. -fn_mod_install_files() { - fn_fetch_file "${modurl}" "" "" "" "${modstmpdir}" "${modfilename}" - # Check if variable is valid checking if file has been downloaded and exists. - if [ ! -f "${modstmpdir}/${modfilename}" ]; then - fn_print_failure "An issue occurred downloading ${modprettyname}" - fn_script_log_fatal "An issue occurred downloading ${modprettyname}" - core_exit.sh - fi - if [ ! -d "${extractdest}" ]; then - mkdir -p "${extractdest}" - fi - fn_dl_extract "${modstmpdir}" "${modfilename}" "${extractdest}" -} - -# Convert mod files to lowercase if needed. -fn_mod_lowercase() { - # Checking lowercase settings from mods array definition - if [ "${modlowercase}" == "LowercaseOn" ]; then - echo -en "converting ${modprettyname} files to lowercase..." - fn_sleep_time - fn_script_log_info "Converting ${modprettyname} files to lowercase" - # Total files and directories for the mod, to output to the user - fileswc=$(find "${extractdest}" | wc -l) - # Total uppercase files and directories for the mod, to output to the user - filesupperwc=$(find "${extractdest}" -name '*[[:upper:]]*' | wc -l) - fn_script_log_info "Found ${filesupperwc} uppercase files out of ${fileswc}, converting" - echo -en "Found ${filesupperwc} uppercase files out of ${fileswc}, converting..." - # Convert files and directories starting from the deepest to prevent issues (-depth argument) - while read -r src; do - # We have to convert only the last file from the path, otherwise we will fail to convert anything if a parent dir has any uppercase - # therefore, we have to separate the end of the filename to only lowercase it rather than the whole line - # Gather parent dir, filename lowercase filename, and set lowercase destination name - latestparentdir=$(dirname "${src}") - latestfilelc=$(basename "${src}" | tr '[:upper:]' '[:lower:]') - dst="${latestparentdir}/${latestfilelc}" - # Only convert if destination does not already exist for some reason - if [ ! -e "${dst}" ]; then - # Finally we can rename the file - mv "${src}" "${dst}" - # Exit if it fails for any reason - local exitcode=$? - if [ "${exitcode}" != 0 ]; then - fn_print_fail_eol_nl - core_exit.sh - fi - fi - done < <(find "${extractdest}" -depth -name '*[[:upper:]]*') - fn_print_ok_eol_nl - fi -} - -# Create ${modcommand}-files.txt containing the full extracted file/directory list. -fn_mod_create_filelist() { - echo -en "building ${modcommand}-files.txt..." - fn_sleep_time - # ${modsdir}/${modcommand}-files.txt. - find "${extractdest}" -mindepth 1 -printf '%P\n' > "${modsdir}/${modcommand}-files.txt" - local exitcode=$? - if [ "${exitcode}" != 0 ]; then - fn_print_fail_eol_nl - fn_script_log_fatal "Building ${modsdir}/${modcommand}-files.txt" - core_exit.sh - else - fn_print_ok_eol_nl - fn_script_log_pass "Building ${modsdir}/${modcommand}-files.txt" - fi - # Adding removed files if needed. - if [ -f "${modsdir}/.removedfiles.tmp" ]; then - cat "${modsdir}/.removedfiles.tmp" >> "${modsdir}/${modcommand}-files.txt" - fi -} - -# Copy the mod into serverfiles. -fn_mod_copy_destination() { - echo -en "copying ${modprettyname} to ${modinstalldir}..." - fn_sleep_time - cp -Rf "${extractdest}/." "${modinstalldir}/" - local exitcode=$? - if [ "${exitcode}" != 0 ]; then - fn_print_fail_eol_nl - fn_script_log_fatal "Copying ${modprettyname} to ${modinstalldir}" - else - fn_print_ok_eol_nl - fn_script_log_pass "Copying ${modprettyname} to ${modinstalldir}" - fi -} - -# Add the mod to the installed-mods.txt. -fn_mod_add_list() { - if [ -z "$(sed -n "/^${modcommand}$/p" "${modsinstalledlistfullpath}")" ]; then - echo -e "${modcommand}" >> "${modsinstalledlistfullpath}" - fn_script_log_info "${modcommand} added to ${modsinstalledlist}" - fi -} - -# Prevent sensitive directories from being erased upon uninstall by removing them from: ${modcommand}-files.txt. -fn_mod_tidy_files_list() { - # Check file list validity. - fn_check_mod_files_list - # Output to the user - echo -en "tidy up ${modcommand}-files.txt..." - fn_sleep_time - fn_script_log_info "Tidy up ${modcommand}-files.txt" - # Lines/files to remove from file list (end with ";" separator). - removefromlist="cfg;addons;RustDedicated_Data;RustDedicated_Data\/Managed;RustDedicated_Data\/Managed\/x86;RustDedicated_Data\/Managed\/x64;" - # Loop through files to remove from file list, - # generate elements to remove from list. - removefromlistamount=$(echo -e "${removefromlist}" | awk -F ';' '{ print NF }') - # Test all subvalue of "removefromlist" using the ";" separator. - for ((filesindex = 1; filesindex < removefromlistamount; filesindex++)); do - # Put current file into test variable. - removefilevar=$(echo -e "${removefromlist}" | awk -F ';' -v x=${filesindex} '{ print $x }') - # Delete line(s) matching exactly. - sed -i "/^${removefilevar}$/d" "${modsdir}/${modcommand}-files.txt" - # Exit on error. - local exitcode=$? - if [ "${exitcode}" != 0 ]; then - fn_print_fail_eol_nl - fn_script_log_fatal "Error while tidying line: ${removefilevar} from: ${modsdir}/${modcommand}-files.txt" - core_exit.sh - break - fi - done - fn_print_ok_eol_nl - # Sourcemod fix - # Remove metamod from sourcemod fileslist. - if [ "${modcommand}" == "sourcemod" ]; then - # Remove addons/metamod & addons/metamod/sourcemod.vdf from ${modcommand}-files.txt. - sed -i "/^addons\/metamod$/d" "${modsdir}/${modcommand}-files.txt" - sed -i "/^addons\/metamod\/sourcemod.vdf$/d" "${modsdir}/${modcommand}-files.txt" - fi - - # Remove common paths from deletion list (Add your sourcemod mod here) - if [ "${modcommand}" == "gokz" ] || [ "${modcommand}" == "ttt" ] || [ "${modcommand}" == "steamworks" ] || [ "${modcommand}" == "get5" ]; then - sed -i "/^addons\/sourcemod$/d" "${modsdir}/${modcommand}-files.txt" - sed -i "/^addons\/sourcemod\/configs$/d" "${modsdir}/${modcommand}-files.txt" - sed -i "/^addons\/sourcemod\/extensions$/d" "${modsdir}/${modcommand}-files.txt" - sed -i "/^addons\/sourcemod\/logs$/d" "${modsdir}/${modcommand}-files.txt" - sed -i "/^addons\/sourcemod\/plugins$/d" "${modsdir}/${modcommand}-files.txt" - sed -i "/^addons\/sourcemod\/plugins\/disabled$/d" "${modsdir}/${modcommand}-files.txt" - sed -i "/^addons\/sourcemod\/scripting$/d" "${modsdir}/${modcommand}-files.txt" - sed -i "/^addons\/sourcemod\/scripting\/include$/d" "${modsdir}/${modcommand}-files.txt" - sed -i "/^addons\/sourcemod\/translations$/d" "${modsdir}/${modcommand}-files.txt" - # Don't delete directories of translations like 'fr', 'sv', 'de', etc - sed -i "/^addons\/sourcemod\/translations\/[A-Za-z0-9_]*$/d" "${modsdir}/${modcommand}-files.txt" - sed -i "/^cfg\/sourcemod$/d" "${modsdir}/${modcommand}-files.txt" - sed -i "/^maps$/d" "${modsdir}/${modcommand}-files.txt" - sed -i "/^materialss$/d" "${modsdir}/${modcommand}-files.txt" - sed -i "/^materials\/models$/d" "${modsdir}/${modcommand}-files.txt" - sed -i "/^materials\/models\/weapons$/d" "${modsdir}/${modcommand}-files.txt" - sed -i "/^materials\/darkness$/d" "${modsdir}/${modcommand}-files.txt" - sed -i "/^materials\/decals$/d" "${modsdir}/${modcommand}-files.txt" - sed -i "/^materials\/overlays$/d" "${modsdir}/${modcommand}-files.txt" - sed -i "/^models$/d" "${modsdir}/${modcommand}-files.txt" - sed -i "/^models\/weapons$/d" "${modsdir}/${modcommand}-files.txt" - sed -i "/^sound$/d" "${modsdir}/${modcommand}-files.txt" - sed -i "/^sound\/weapons$/d" "${modsdir}/${modcommand}-files.txt" - fi - - # Remove paths of specific mods from deletion list - if [ "${modcommand}" == "gokz" ]; then - sed -i "/^addons\/sourcemod\/scripting\/include\/smjansson.inc$/d" "${modsdir}/${modcommand}-files.txt" - sed -i "/^addons\/sourcemod\/scripting\/include\/GlobalAPI-Core.inc$/d" "${modsdir}/${modcommand}-files.txt" - sed -i "/^addons\/sourcemod\/scripting\/include\/sourcebanspp.inc$/d" "${modsdir}/${modcommand}-files.txt" - sed -i "/^addons\/sourcemod\/scripting\/include\/autoexecconfig.inc$/d" "${modsdir}/${modcommand}-files.txt" - sed -i "/^addons\/sourcemod\/scripting\/include\/colorvariables.inc$/d" "${modsdir}/${modcommand}-files.txt" - sed -i "/^addons\/sourcemod\/scripting\/include\/movementapi.inc$/d" "${modsdir}/${modcommand}-files.txt" - sed -i "/^addons\/sourcemod\/scripting\/include\/movement.inc$/d" "${modsdir}/${modcommand}-files.txt" - sed -i "/^addons\/sourcemod\/scripting\/include\/dhooks.inc$/d" "${modsdir}/${modcommand}-files.txt" - sed -i "/^addons\/sourcemod\/scripting\/include\/updater.inc$/d" "${modsdir}/${modcommand}-files.txt" - fi -} - -## Information Gathering. - -# Get details of a mod any (relevant and unique, such as full mod name or install command) value. -fn_mod_get_info() { - # Variable to know when job is done. - modinfocommand="0" - # Find entry in global array. - for ((index = 0; index <= ${#mods_global_array[@]}; index++)); do - # When entry is found. - if [ "${mods_global_array[index]}" == "${currentmod}" ]; then - # Go back to the previous "MOD" separator. - for ((index = index; index <= ${#mods_global_array[@]}; index--)); do - # When "MOD" is found. - if [ "${mods_global_array[index]}" == "MOD" ]; then - # Get info. - fn_mods_define - modinfocommand="1" - break - fi - done - fi - # Exit the loop if job is done. - if [ "${modinfocommand}" == "1" ]; then - break - fi - done - - # What happens if mod is not found. - if [ "${modinfocommand}" == "0" ]; then - fn_script_log_error "Could not find information for ${currentmod}" - fn_print_error_nl "Could not find information for ${currentmod}" - core_exit.sh - fi -} - -# Define all variables for a mod at once when index is set to a separator. -fn_mods_define() { - if [ -z "$index" ]; then - fn_script_log_fatal "index variable not set. Please report an issue." - fn_print_error "index variable not set. Please report an issue." - echo -e "* https://github.com/GameServerManagers/LinuxGSM/issues" - core_exit.sh - fi - modcommand="${mods_global_array[index + 1]}" - modprettyname="${mods_global_array[index + 2]}" - modurl="${mods_global_array[index + 3]}" - modfilename="${mods_global_array[index + 4]}" - modsubdirs="${mods_global_array[index + 5]}" - modlowercase="${mods_global_array[index + 6]}" - modinstalldir="${mods_global_array[index + 7]}" - modkeepfiles="${mods_global_array[index + 8]}" - modengines="${mods_global_array[index + 9]}" - modgames="${mods_global_array[index + 10]}" - modexcludegames="${mods_global_array[index + 11]}" - modsite="${mods_global_array[index + 12]}" - moddescription="${mods_global_array[index + 13]}" -} - -# Builds list of installed mods. -# using installed-mods.txt grabing mod info from mods_list.sh. -fn_mods_installed_list() { - fn_mods_count_installed - # Set/reset variables. - installedmodsline="1" - installedmodslist=() - modprettynamemaxlength="0" - modsitemaxlength="0" - moddescriptionmaxlength="0" - modcommandmaxlength="0" - # Loop through every line of the installed mods list ${modsinstalledlistfullpath}. - while [ "${installedmodsline}" -le "${installedmodscount}" ]; do - currentmod=$(sed "${installedmodsline}q;d" "${modsinstalledlistfullpath}") - # Get mod info to make sure mod exists. - fn_mod_get_info - # Add the mod to available commands. - installedmodslist+=("${modcommand}") - # Increment line check. - ((installedmodsline++)) - done - if [ "${installedmodscount}" ]; then - fn_script_log_info "${installedmodscount} addons/mods are currently installed" - fi -} - -# Loops through mods_global_array to define available mods & provide available commands for mods installation. -fn_mods_available() { - # First, reset variables. - compatiblemodslist=() - availablemodscommands=() - # Find compatible games. - # Find separators through the global array. - for ((index = "0"; index <= ${#mods_global_array[@]}; index++)); do - # If current value is a separator; then. - if [ "${mods_global_array[index]}" == "${modseparator}" ]; then - # Set mod variables. - fn_mods_define - # Test if game is compatible. - fn_mod_compatible_test - # If game is compatible. - if [ "${modcompatibility}" == "1" ]; then - # Put it into an array to prepare user output. - compatiblemodslist+=("${modprettyname}" "${modcommand}" "${modsite}" "${moddescription}") - # Keep available commands in an array to make life easier. - availablemodscommands+=("${modcommand}") - fi - fi - done -} - -## Mod compatibility check. - -# Find out if a game is compatible with a mod from a modgames (list of games supported by a mod) variable. -fn_compatible_mod_games() { - # Reset test value. - modcompatiblegame="0" - # If value is set to GAMES (ignore). - if [ "${modgames}" != "GAMES" ]; then - # How many games we need to test. - gamesamount=$(echo -e "${modgames}" | awk -F ';' '{ print NF }') - # Test all subvalue of "modgames" using the ";" separator. - for ((gamevarindex = 1; gamevarindex < gamesamount; gamevarindex++)); do - # Put current game name into modtest variable. - gamemodtest=$(echo -e "${modgames}" | awk -F ';' -v x=${gamevarindex} '{ print $x }') - # If game name matches. - if [ "${gamemodtest}" == "${gamename}" ]; then - # Mod is compatible. - modcompatiblegame="1" - fi - done - fi -} - -# Find out if an engine is compatible with a mod from a modengines (list of engines supported by a mod) variable. -fn_compatible_mod_engines() { - # Reset test value. - modcompatibleengine="0" - # If value is set to ENGINES (ignore). - if [ "${modengines}" != "ENGINES" ]; then - # How many engines we need to test. - enginesamount=$(echo -e "${modengines}" | awk -F ';' '{ print NF }') - # Test all subvalue of "modengines" using the ";" separator. - for ((gamevarindex = 1; gamevarindex < ${enginesamount}; gamevarindex++)); do - # Put current engine name into modtest variable. - enginemodtest=$(echo -e "${modengines}" | awk -F ';' -v x=${gamevarindex} '{ print $x }') - # If engine name matches. - if [ "${enginemodtest}" == "${engine}" ]; then - # Mod is compatible. - modcompatibleengine="1" - fi - done - fi -} - -# Find out if a game is not compatible with a mod from a modnotgames (list of games not supported by a mod) variable. -fn_not_compatible_mod_games() { - # Reset test value. - modeincompatiblegame="0" - # If value is set to NOTGAMES (ignore). - if [ "${modexcludegames}" != "NOTGAMES" ]; then - # How many engines we need to test. - excludegamesamount=$(echo -e "${modexcludegames}" | awk -F ';' '{ print NF }') - # Test all subvalue of "modexcludegames" using the ";" separator. - for ((gamevarindex = 1; gamevarindex < excludegamesamount; gamevarindex++)); do - # Put current engine name into modtest variable. - excludegamemodtest=$(echo -e "${modexcludegames}" | awk -F ';' -v x=${gamevarindex} '{ print $x }') - # If engine name matches. - if [ "${excludegamemodtest}" == "${gamename}" ]; then - # Mod is compatible. - modeincompatiblegame="1" - fi - done - fi -} - -# Sums up if a mod is compatible or not with modcompatibility=0/1. -fn_mod_compatible_test() { - # Test game and engine compatibility. - fn_compatible_mod_games - fn_compatible_mod_engines - fn_not_compatible_mod_games - if [ "${modeincompatiblegame}" == "1" ]; then - modcompatibility="0" - elif [ "${modcompatibleengine}" == "1" ] || [ "${modcompatiblegame}" == "1" ]; then - modcompatibility="1" - else - modcompatibility="0" - fi -} - -## Directory management. - -# Create mods files and directories if it doesn't exist. -fn_create_mods_dir() { - # Create lgsm data modsdir. - if [ ! -d "${modsdir}" ]; then - echo -en "creating LinuxGSM mods data directory ${modsdir}..." - mkdir -p "${modsdir}" - exitcode=$? - if [ "${exitcode}" != 0 ]; then - fn_print_fail_eol_nl - fn_script_log_fatal "Creating mod download dir ${modsdir}" - core_exit.sh - else - fn_print_ok_eol_nl - fn_script_log_pass "Creating mod download dir ${modsdir}" - fi - fi - # Create mod install directory. - if [ ! -d "${modinstalldir}" ]; then - echo -en "creating mods install directory ${modinstalldir}..." - mkdir -p "${modinstalldir}" - exitcode=$? - if [ "${exitcode}" != 0 ]; then - fn_print_fail_eol_nl - fn_script_log_fatal "Creating mod install directory ${modinstalldir}" - core_exit.sh - else - fn_print_ok_eol_nl - fn_script_log_pass "Creating mod install directory ${modinstalldir}" - fi - fi - - # Create lgsm/data/${modsinstalledlist}. - if [ ! -f "${modsinstalledlistfullpath}" ]; then - touch "${modsinstalledlistfullpath}" - fn_script_log_info "Created ${modsinstalledlistfullpath}" - fi -} - -# Create tmp download mod directory. -fn_mods_create_tmp_dir() { - if [ ! -d "${modstmpdir}" ]; then - mkdir -p "${modstmpdir}" - exitcode=$? - echo -en "creating mod download directory ${modstmpdir}..." - if [ "${exitcode}" != 0 ]; then - fn_print_fail_eol_nl - fn_script_log_fatal "Creating mod download directory ${modstmpdir}" - core_exit.sh - else - fn_print_ok_eol_nl - fn_script_log_pass "Creating mod download directory ${modstmpdir}" - fi - fi -} - -# Remove the tmp mod download directory when finished. -fn_mods_clear_tmp_dir() { - if [ -d "${modstmpdir}" ]; then - echo -en "clearing mod download directory ${modstmpdir}..." - rm -rf "${modstmpdir:?}" - exitcode=$? - if [ "${exitcode}" != 0 ]; then - fn_print_fail_eol_nl - fn_script_log_fatal "Clearing mod download directory ${modstmpdir}" - core_exit.sh - else - fn_print_ok_eol_nl - fn_script_log_pass "Clearing mod download directory ${modstmpdir}" - fi - - fi - # Clear temp file list as well. - if [ -f "${modsdir}/.removedfiles.tmp" ]; then - rm -f "${modsdir:?}/.removedfiles.tmp" - fi -} - -# Counts how many mods were installed. -fn_mods_count_installed() { - if [ -f "${modsinstalledlistfullpath}" ]; then - installedmodscount=$(wc -l < "${modsinstalledlistfullpath}") - else - installedmodscount=0 - fi -} - -# Exits if no mods were installed. -fn_mods_check_installed() { - # Count installed mods. - fn_mods_count_installed - # If no mods are found. - if [ ${installedmodscount} -eq 0 ]; then - echo -e "" - fn_print_failure_nl "No installed mods or addons were found" - echo -e " * Install mods using LinuxGSM first with: ./${selfname} mods-install" - fn_script_log_error "No installed mods or addons were found." - core_exit.sh - fi -} - -# Checks that mod files list exists and isn't empty. -fn_check_mod_files_list() { - # File list must exist and be valid before any operation on it. - if [ -f "${modsdir}/${modcommand}-files.txt" ]; then - # How many lines is the file list. - modsfilelistsize=$(wc -l < "${modsdir}/${modcommand}-files.txt") - # If file list is empty. - if [ "${modsfilelistsize}" -eq 0 ]; then - fn_print_failure "${modcommand}-files.txt is empty" - echo -e "* Unable to remove ${modprettyname}" - fn_script_log_fatal "${modcommand}-files.txt is empty: Unable to remove ${modprettyname}." - core_exit.sh - fi - else - fn_print_failure "${modsdir}/${modcommand}-files.txt does not exist" - fn_script_log_fatal "${modsdir}/${modcommand}-files.txt does not exist: Unable to remove ${modprettyname}." - core_exit.sh - fi -} - -fn_mod_exist() { - modreq=$1 - # requires one parameter, the mod - if [ -f "${modsdir}/${modreq}-files.txt" ]; then - # how many lines is the file list - modsfilelistsize=$(wc -l < "${modsdir}/${modreq}-files.txt") - # if file list is empty - if [ "${modsfilelistsize}" -eq 0 ]; then - fn_mod_required_fail_exist "${modreq}" - fi - else - fn_mod_required_fail_exist "${modreq}" - fi -} - -fn_mod_required_fail_exist() { - modreq=$1 - # requires one parameter, the mod - fn_script_log_fatal "${modreq}-files.txt is empty: unable to find ${modreq} installed" - echo -en "* Unable to find '${modreq}' which is required prior to installing this mod..." - fn_print_fail_eol_nl - core_exit.sh -} - -fn_mod_liblist_gam_filenames() { - # clear variables just in case - moddll="" - modso="" - moddylib="" - - # default libraries - case ${gamename} in - "Counter-Strike 1.6") - moddll="mp.dll" - modso="cs.so" - moddylib="cs.dylib" - ;; - "Day of Defeat") - moddll="dod.dll" - modso="dod.so" - moddylib="dod.dylib" - ;; - "Team Fortress Classic") - moddll="tfc.dll" - modso="tfc.so" - moddylib="tfc.dylib" - ;; - "Natural Selection") - moddll="ns.dll" - modso="ns_i386.so" - moddylib="" - ;; - "The Specialists") - moddll="mp.dll" - modso="ts_i386.so" - moddylib="" - ;; - "Half-Life: Deathmatch") - moddll="hl.dll" - modso="hl.so" - moddylib="hl.dylib" - ;; - esac -} - -# modifers for liblist.gam to add/remote metamod binaries -fn_mod_install_liblist_gam_file() { - - fn_mod_liblist_gam_filenames - - if [ -f "${modinstalldir}/liblist.gam" ]; then - # modify the liblist.gam file to initialize Metamod - logentry="sed replace (dlls\\${moddll}) ${modinstalldir}/liblist.gam" - echo -en "modifying gamedll in liblist.gam..." - rpldll="s/dlls\\\\${moddll}/addons\/metamod\/dlls\/metamod.dll/g" - sed -i $rpldll "${modinstalldir}/liblist.gam" - grep -q "addons/metamod/dlls/metamod.dll" "${modinstalldir}/liblist.gam" - exitcode=$? - # if replacement back didn't happen, error out. - if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "${logentry}" - fn_print_fail_eol_nl - else - fn_script_log_pass "${logentry}" - fn_print_ok_eol_nl - fi - - # modify the liblist.gam file to initialize metamod - logentry="sed replace (dlls\\${modso}) ${modinstalldir}/liblist.gam" - echo -en "modifying gamedll_linux in liblist.gam..." - rplso="s/dlls\/${modso}/addons\/metamod\/dlls\/metamod.so/g" - sed -i $rplso "${modinstalldir}/liblist.gam" - grep -q "addons/metamod/dlls/metamod.so" "${modinstalldir}/liblist.gam" - exitcode=$? - # if replacement back didn't happen, error out - if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "${logentry}" - fn_print_fail_eol_nl - else - fn_script_log_pass "${logentry}" - fn_print_ok_eol_nl - fi - - # mac os needs to be checked not all mods support mac os - if [ -n "${moddylib}" ]; then - # modify the liblist.gam file to initialize metamod - logentry="sed replace (dlls\\${moddylib}) ${modinstalldir}/liblist.gam" - echo -en "modifying gamedll_osx in liblist.gam..." - rpldylib="s/dlls\/${moddylib}/addons\/metamod\/dlls\/metamod.dylib/g" - sed -i $rpldylib "${modinstalldir}/liblist.gam" - grep -q "addons/metamod/dlls/metamod.dylib" "${modinstalldir}/liblist.gam" - exitcode=$? - # if replacement back didn't happen, error out. - if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "${logentry}" - fn_print_fail_eol_nl - else - fn_script_log_pass ${logentry} - fn_print_ok_eol_nl - fi - fi - fi -} - -fn_mod_remove_liblist_gam_file() { - - fn_mod_liblist_gam_filenames - - if [ -f "${modinstalldir}/liblist.gam" ]; then - # modify the liblist.gam file back to defaults - logentry="sed replace (addons/metamod/dlls/metamod.dll) ${modinstalldir}/liblist.gam" - echo -en "modifying gamedll in liblist.gam..." - rpldll="s/addons\/metamod\/dlls\/metamod.dll/dlls\\\\${moddll}/g" - sed -i $rpldll "${modinstalldir}/liblist.gam" - grep -q "${moddll}" "${modinstalldir}/liblist.gam" - exitcode=$? - # if replacement back didn't happen, error out. - if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "${logentry}" - fn_print_fail_eol_nl - else - fn_script_log_pass ${logentry} - fn_print_ok_eol_nl - fi - - # modify the liblist.gam file back to defaults - logentry="sed replace (addons/metamod/dlls/metamod.so) ${modinstalldir}/liblist.gam" - echo -en "modifying gamedll_linux in liblist.gam..." - rplso="s/addons\/metamod\/dlls\/metamod.so/dlls\/${modso}/g" - sed -i $rplso "${modinstalldir}/liblist.gam" - grep -q "${modso}" "${modinstalldir}/liblist.gam" - exitcode=$? - # if replacement back didn't happen, error out - if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "${logentry}" - fn_print_fail_eol_nl - else - fn_script_log_pass ${logentry} - fn_print_ok_eol_nl - fi - - # mac os needs to be checked not all mods support mac os - if [ -n "${moddylib}" ]; then - # modify the liblist.gam file back to defaults - logentry="sed replace (addons/metamod/dlls/metamod.dylib) ${modinstalldir}/liblist.gam" - echo -en "modifying gamedll_osx in liblist.gam..." - rpldylib="s/addons\/metamod\/dlls\/metamod.dylib/dlls\/${moddylib}/g" - sed -i $rpldylib "${modinstalldir}/liblist.gam" - grep -q "${moddylib}" "${modinstalldir}/liblist.gam" - # if replacement back didn't happen, error out. - exitcode=$? - if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "${logentry}" - fn_print_fail_eol_nl - else - fn_script_log_pass ${logentry} - fn_print_ok_eol_nl - fi - fi - fi -} - -fn_mod_install_amxmodx_file() { - # does plugins.ini exist? - if [ -f "${modinstalldir}/addons/metamod/plugins.ini" ]; then - # since it does exist, is the entry already in plugins.ini - logentry="line (linux addons/amxmodx/dlls/amxmodx_mm_i386.so) inserted into ${modinstalldir}/addons/metamod/plugins.ini" - echo -en "adding amxmodx_mm_i386.so in plugins.ini..." - grep -q "amxmodx_mm_i386.so" "${modinstalldir}/addons/metamod/plugins.ini" - exitcode=$? - if [ "${exitcode}" != 0 ]; then - # file exists but the entry does not, let's add it - echo "linux addons/amxmodx/dlls/amxmodx_mm_i386.so" >> "${modinstalldir}/addons/metamod/plugins.ini" - exitcode=$? - if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "${logentry}" - fn_print_fail_eol_nl - else - fn_script_log_pass ${logentry} - fn_print_ok_eol_nl - fi - fi - else - # create new file and add the mod to it - echo "linux addons/amxmodx/dlls/amxmodx_mm_i386.so" > "${modinstalldir}/addons/metamod/plugins.ini" - exitcode=$? - if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "${logentry}" - fn_print_fail_eol_nl - core_exit.sh - else - fn_script_log_pass ${logentry} - fn_print_ok_eol_nl - fi - fi -} - -fn_mod_remove_amxmodx_file() { - if [ -f "${modinstalldir}/addons/metamod/plugins.ini" ]; then - # since it does exist, is the entry already in plugins.ini - logentry="line (linux addons/amxmodx/dlls/amxmodx_mm_i386.so) removed from ${modinstalldir}/addons/metamod/plugins.ini" - echo -en "removing amxmodx_mm_i386.so in plugins.ini..." - grep -q "linux addons/amxmodx/dlls/amxmodx_mm_i386.so" "${modinstalldir}/addons/metamod/plugins.ini" - # iIs it found? If so remove it and clean up - exitcode=$? - if [ "${exitcode}" == 0 ]; then - # delete the line we inserted - sed -i '/linux addons\/amxmodx\/dlls\/amxmodx_mm_i386.so/d' "${modinstalldir}/addons/metamod/plugins.ini" - # remove empty lines - sed -i '/^$/d' "${modinstalldir}/addons/metamod/plugins.ini" - exitcode=$? - if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "${logentry}" - fn_print_fail_eol_nl - else - fn_script_log_pass ${logentry} - fn_print_ok_eol_nl - fi - - # if file is empty, remove it. - if [ -f "${modinstalldir}/addons/metamod/plugins.ini" ]; then - rm -f "${modinstalldir}/addons/metamod/plugins.ini" - fn_script_log_pass "file removed ${modinstalldir}/addons/metamod/plugins.ini because it was empty" - fi - fi - fi -} - -## Database initialisation. - -mods_list.sh -fn_mods_available diff --git a/lgsm/functions/mods_list.sh b/lgsm/functions/mods_list.sh deleted file mode 100644 index a83b7e303..000000000 --- a/lgsm/functions/mods_list.sh +++ /dev/null @@ -1,209 +0,0 @@ -#!/bin/bash -# LinuxGSM mods_list.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Lists and defines available mods for LinuxGSM supported servers; works along with mods_core.sh. -# Usage: To add a mod, you need to add an array variable following the guide to set proper values; -# Usage: Then add this array to the mods_global_array. -# Usage: If needed, you can scrape the download URL first. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -# Get a proper URL for mods that don't provide a good one (optional) -fn_script_log_info "Retrieving latest mods URLs" - -# Metamod (Half-life 1 Classic Engine) -metamodversion="1.21.1-am" -metamodlatestfile="metamod-${metamodversion}.zip" -metamoddownloadurl="https://www.amxmodx.org/release/${metamodlatestfile}" -metamodurl="${metamoddownloadurl}" -# AMX Mod X: Base -amxxbaseversion="1.8.2" -amxxbasemod="base" -amxxbaselatestfile="amxmodx-${amxxbaseversion}-${amxxbasemod}-linux.tar.gz" -amxxbasedownloadurl="https://www.amxmodx.org/release/${amxxbaselatestfile}" -amxxbaseurl="${amxxbasedownloadurl}" -# AMX Mod X: Counter-Strike -amxxcsversion="1.8.2" -amxxcsmod="cstrike" -amxxcslatestfile="amxmodx-${amxxbaseversion}-${amxxcsmod}-linux.tar.gz" -amxxcsdownloadurl="https://www.amxmodx.org/release/${amxxcslatestfile}" -amxxcsurl="${amxxcsdownloadurl}" -# AMX Mod X: Day of Defeat -amxxdodversion="1.8.2" -amxxdodmod="dod" -amxxdodlatestfile="amxmodx-${amxxdodversion}-${amxxdodmod}-linux.tar.gz" -amxxdoddownloadurl="https://www.amxmodx.org/release/${amxxdodlatestfile}" -amxxdodurl="${amxxdoddownloadurl}" -# AMX Mod X: Team Fortress Classic -amxxtfcversion="1.8.2" -amxxtfcmod="tfc" -amxxtfclatestfile="amxmodx-${amxxtfcversion}-${amxxtfcmod}-linux.tar.gz" -amxxtfcdownloadurl="https://www.amxmodx.org/release/${amxxtfclatestfile}" -amxxtfcurl="${amxxtfcdownloadurl}" -# AMX Mod X: Natural Selection -amxxnsversion="1.8.2" -amxxnsmod="ns" -amxxnslatestfile="amxmodx-${amxxnsversion}-${amxxnsmod}-linux.tar.gz" -amxxnsdownloadurl="https://www.amxmodx.org/release/${amxxnslatestfile}" -amxxnsurl="${amxxnsdownloadurl}" -# AMX Mod X: The Specialists -amxxtsversion="1.8.2" -amxxtsmod="ts" -amxxtslatestfile="amxmodx-${amxxtsversion}-${amxxtsmod}-linux.tar.gz" -amxxtsdownloadurl="https://www.amxmodx.org/release/${amxxtslatestfile}" -amxxtsurl="${amxxtsdownloadurl}" -# Metamod:Source -metamodsourceversion="1.11" -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" -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}" -sourcemodurl="${sourcemoddownloadurl}" -# Steamworks -steamworksscrapeurl="https://users.alliedmods.net/~kyles/builds/SteamWorks" -steamworkslatestfile=$(curl --connect-timeout 10 -sL ${steamworksscrapeurl} | grep -m 1 linux | cut -d '"' -f 4) -steamworksdownloadurl="${steamworksscrapeurl}/${steamworkslatestfile}" -steamworksurl="${steamworksdownloadurl}" -# CS:GO Mods -get5lastbuild=$(curl --connect-timeout 10 -sL https://api.github.com/repos/splewis/get5/releases/latest | jq '.assets[] |select(.browser_download_url | endswith(".tar.gz"))') -get5latestfile=$(echo -e "${get5lastbuild}" | jq -r '.name') -get5latestfilelink=$(echo -e "${get5lastbuild}" | jq -r '.browser_download_url') -csgopracticelatest=$(curl --connect-timeout 10 -sL https://api.github.com/repos/splewis/csgo-practice-mode/releases/latest | jq '.assets[]') -csgopracticelatestfile=$(echo -e "${csgopracticelatest}" | jq -r '.name') -csgopracticelatestlink=$(echo -e "${csgopracticelatest}" | jq -r '.browser_download_url') -csgopuglatest=$(curl --connect-timeout 10 -sL https://api.github.com/repos/splewis/csgo-pug-setup/releases/latest | jq '.assets[]') -csgopuglatestfile=$(echo -e "${csgopuglatest}" | jq -r '.name') -csgopuglatestlink=$(echo -e "${csgopuglatest}" | jq -r '.browser_download_url') -gokzlatestversion=$(curl --connect-timeout 10 -s https://api.github.com/repos/KZGlobalTeam/gokz/releases/latest | grep "tag_name" | cut -d : -f 2,3 | sed -E 's/.*"([^"]+)".*/\1/') -gokzlatestfile="GOKZ-v${gokzlatestversion}.zip" -gokzlatestlink="https://github.com/KZGlobalTeam/gokz/releases/download/${gokzlatestversion}/${gokzlatestfile}" -movementapilatestversion=$(curl --connect-timeout 10 -s https://api.github.com/repos/danzayau/MovementAPI/releases/latest | grep "tag_name" | cut -d : -f 2,3 | sed -E 's/.*"([^"]+)".*/\1/') -movementapilatestfile="MovementAPI-v${movementapilatestversion}.zip" -movementapilatestlink="https://github.com/danzayau/MovementAPI/releases/download/${movementapilatestversion}/${movementapilatestfile}" - -# Rust -carbonrustapilatestfile="Carbon.Linux.Release.tar.gz" -carbonrustlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/CarbonCommunity/Carbon.Core/releases/tags/production_build | jq -r '.assets[]|select(.name == "Carbon.Linux.Release.tar.gz") | .browser_download_url') - -# Oxide -oxiderustlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/OxideMod/Oxide.Rust/releases/latest | jq -r '.assets[]|select(.browser_download_url | contains("linux")) | .browser_download_url') -oxidehurtworldlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/OxideMod/Oxide.Hurtworld/releases/latest | jq -r '.assets[].browser_download_url') -oxidesdtdlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/OxideMod/Oxide.SevenDaysToDie/releases/latest | jq -r '.assets[]|select(.browser_download_url | contains("linux")) | .browser_download_url') -# Valheim Plus -valeimpluslatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/valheimPlus/ValheimPlus/releases/latest | jq -r '.assets[]|select(.browser_download_url | contains("UnixServer.tar.gz")) | .browser_download_url') -# Valheim BepInEx -bepinexvhlatestlink=$(curl --connect-timeout 10 -sL "https://valheim.thunderstore.io/api/experimental/package/denikson/BepInExPack_Valheim/" -H "accept: application/json" | jq -r '.latest.download_url') - -# Define mods information (required) - -# Separator name -modseparator="MOD" - -# REQUIRED: mod_info_name=( MOD "modcommand" "Pretty Name" "URL" "filename" "modsubdirs" "LowercaseOn/Off" "/files/to/keep;" "/install/path" "ENGINES" "GAMES" "NOTGAMES" "AUTHOR_URL" "Short Description" ) -# Example 1) Well made mod: mod_info_name=( MOD "awesomemod" "This is an Awesome Mod" "https://awesomemod.com/latest.zip" "awesomemod.zip" "0" "LowercaseOff" "OVERWRITE" "${systemdir}/addons" "source;unity3d;" "GAMES" "NOTGAMES" "https://awesomemod.com/" "This mod knows that 42 is the answer" ) -# Example 2) Poorly made mod: mod_info_name=( MOD "stupidmod" "This is a stupid mod" "${crappymodurl}" "StupidMod.zip" "2" "LowercaseOn" "cfg;data/crappymod;" "${systemdir}" "source;" "GAMES" "Garry's mod;Counter-Strike: Source;" "This mod is dumber than dumb" ) -# None of those values can be empty -# index | Usage -# [0] | MOD: separator, all mods must begin with it -# [1] | "modcommand": the LGSM name and command to install the mod (must be unique and lowercase) -# [2] | "Pretty Name": the common name people use to call the mod that will be displayed to the user -# [3] | "URL": link to the mod archive file; can be a variable previously defined while scraping a URL -# [4] | "filename": the output filename -# [5] | "modsubdirs": in how many subdirectories is the mod (none is 0) (not used at release, but could be in the future) -# [6] | "LowercaseOn/Off": LowercaseOff or LowercaseOn: enable/disable converting extracted files and directories to lowercase (some games require it) -# [7] | "modinstalldir": the directory in which to install the mode (use LGSM dir variables such as ${systemdir}) -# [8] | "/files/to/keep;", files & directories that should not be overwritten upon update, separated and ended with a semicolon; you can also use "OVERWRITE" value to ignore the value or "NOUPDATE" to disallow updating; for files to keep upon uninstall, see fn_mod_tidy_files_list from mods_core.sh -# [9] | "Supported Engines;": list them according to LGSM ${engine} variables, separated and ended with a semicolon, or use ENGINES to ignore the value -# [10] | "Supported Games;": list them according to LGSM ${gamename} variables, separated and ended with a semicolon, or use GAMES to ignore the value -# [11] | "Unsupported Games;": list them according to LGSM ${gamename} variables, separated and ended with a semicolon, or use NOTGAMES to ignore the value (useful to exclude a game when using Supported Engines) -# [12] | "AUTHOR_URL" is the author's website, displayed to the user when chosing mods to install -# [13] | "Short Description" a description showed to the user upon installation/removal - -# Half-life 1 Engine Mods -mod_info_metamod=(MOD "metamod" "Metamod" "${metamodurl}" "${metamodlatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/metamod/plugins.ini;" "ENGINES" "Counter-Strike 1.6;Day of Defeat;Team Fortress Classic;Natural Selection;The Specialists;Half-Life: Deathmatch;" "NOTGAMES" "https://github.com/alliedmodders/metamod-hl1" "Plugins Framework") -mod_info_base_amxx=(MOD "amxmodx" "AMX Mod X: Base" "${amxxbaseurl}" "${amxxbaselatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/amxmodx/configs;" "ENGINES" "Counter-Strike 1.6;Day of Defeat;Team Fortress Classic;Natural Selection;The Specialists;Half-Life: Deathmatch;" "NOTGAMES" "https://www.amxmodx.org" "Admin Features (requires Metamod)") - -# CS 1.6 (HL1) Engine Mods -mod_info_cs_amxx=(MOD "amxmodxcs" "AMX Mod X: Counter-Strike" "${amxxcsurl}" "${amxxcslatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/amxmodx/configs;" "ENGINES" "Counter-Strike 1.6;" "NOTGAMES" "https://www.amxmodx.org" "Admin Features (requires Metamod & AMX Mod X: Base)") - -# DOD (HL1) Engine Mods -mod_info_dod_amxx=(MOD "amxmodxdod" "AMX Mod X: Day of Defeat" "${amxxdodurl}" "${amxxdodlatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/amxmodx/configs;" "ENGINES" "Day of Defeat;" "NOTGAMES" "https://www.amxmodx.org" "Admin Features (requires Metamod & AMX Mod X: Base)") - -# TFC (HL1) Engine Mods -mod_info_tfc_amxx=(MOD "amxmodxtfc" "AMX Mod X: Team Fortress Classic" "${amxxtfcurl}" "${amxxtfclatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/amxmodx/configs;" "ENGINES" "Team Fortress Classic;" "NOTGAMES" "https://www.amxmodx.org" "Admin Features (requires Metamod & AMX Mod X: Base)") - -# NS (Natural Selection) (HL1) Engine Mods -mod_info_ns_amxx=(MOD "amxmodxns" "AMX Mod X: Natural Selection" "${amxxnsurl}" "${amxxnslatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/amxmodx/configs;" "ENGINES" "Natural Selection;" "NOTGAMES" "https://www.amxmodx.org" "Admin Features (requires Metamod & AMX Mod X: Base)") - -# TS (The Specialists) (HL1) Engine Mods -mod_info_ts_amxx=(MOD "amxmodxts" "AMX Mod X: The Specialists" "${amxxtsurl}" "${amxxtslatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/amxmodx/configs;" "ENGINES" "The Specialists;" "NOTGAMES" "https://www.amxmodx.org" "Admin Features (requires Metamod & AMX Mod X: Base)") - -# Source mods -mod_info_metamodsource=(MOD "metamodsource" "Metamod: Source" "${metamodsourceurl}" "${metamodsourcelatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/metamod/metaplugins.ini;" "source;" "GAMES" "NOTGAMES" "https://www.sourcemm.net" "Plugins Framework") -mod_info_sourcemod=(MOD "sourcemod" "SourceMod" "${sourcemodurl}" "${sourcemodlatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "source;" "GAMES" "NOTGAMES" "http://www.sourcemod.net" "Admin Features (requires Metamod: Source)") -mod_info_steamworks=(MOD "steamworks" "SteamWorks" "${steamworksurl}" "${steamworkslatestfile}" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/KyleSanderson/SteamWorks" "Exposing SteamWorks functions to SourcePawn") -mod_info_stripper=(MOD "stripper" "Stripper Source" "http://www.bailopan.net/stripper/snapshots/1.2/stripper-1.2.2-git129-linux.tar.gz" "stripper-1.2.2-git129-linux.tar.gz" "0" "LowercaseOff" "${systemdir}" "addons/stripper/maps;" "ENGINES" "Counter-Strike: Global Offensive;Counter-Strike: Source;Day of Defeat: Source;Half Life: Deathmatch;Half Life 2: Deathmatch;Insurgency;Left 4 Dead;Left 4 Dead 2;Nuclear Dawn;Team Fortress 2;" "NOTGAMES" "http://www.bailopan.net/stripper/" "Add or remove objects from map (requires MetaMod)") - -# CS:GO Mods -mod_info_gokz=(MOD "gokz" "GOKZ" "${gokzlatestlink}" "${gokzlatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/KZGlobalTeam/gokz" "GOKZ ${gokzlatestversion} - Implements the KZ game mode (requires SourceMod and MetaMod)") -mod_info_ttt=(MOD "ttt" "Trouble in Terrorist Town" "https://csgottt.com/downloads/ttt-latest-dev-${sourcemodversion}.zip" "ttt-latest.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/Bara/TroubleinTerroristTown" "Implements the TTT game mode (requires SourceMod and MetaMod)") -mod_info_get5=(MOD "get5" "Get 5" "${get5latestfilelink}" "${get5latestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/get5" "Plugin for competitive matches/scrims (requires SourceMod and MetaMod)") -mod_info_prac=(MOD "prac" "csgo practice mode" "${csgopracticelatestlink}" "${csgopracticelatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/csgo-practice-mode" "Practice Mode is a sourcemod plugin for helping players/teams run practices.") -mod_info_pug=(MOD "pug" "PUG" "${csgopuglatestlink}" "${csgopuglatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/csgo-pug-setup" "plugin for setting up private pug/10man games") -mod_info_dhook=(MOD "dhook" "dhook" "https://forums.alliedmods.net/attachment.php?attachmentid=190123&d=1625050030" "dhooks-2.2.0d17.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://forums.alliedmods.net/showpost.php?p=2588686&postcount=589" "DHooks 2.2.0 - Required for GOKZ") -mod_info_movement=(MOD "movementapi" "movementapi" "${movementapilatestlink}" "${movementapilatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/danzayau/MovementAPI" "Movement API ${movementapilatestversion} - Required for GOKZ") -mod_info_cleaner=(MOD "cleaner" "cleaner" "https://github.com/e54385991/console-cleaner/archive/refs/heads/master.zip" "console-cleaner.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/e54385991/console-cleaner" "Console Cleaner - Optional for GOKZ") - -# Garry's Mod Addons -mod_info_ulib=(MOD "ulib" "ULib" "https://codeload.github.com/TeamUlysses/ulib/zip/master" "ulib-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://ulyssesmod.net" "Complete Framework") -mod_info_ulx=(MOD "ulx" "ULX" "https://codeload.github.com/TeamUlysses/ulx/zip/master" "ulx-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://ulyssesmod.net" "Admin Panel (requires ULib)") -mod_info_utime=(MOD "utime" "UTime" "https://github.com/TeamUlysses/utime/archive/master.zip" "utime-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://ulyssesmod.net" "Keep track of players play time") -mod_info_uclip=(MOD "uclip" "UClip" "https://github.com/TeamUlysses/uclip/archive/master.zip" "uclip-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://ulyssesmod.net" "An alternative to noclip") -mod_info_acf=(MOD "acf" "Armoured Combat Framework" "https://github.com/nrlulz/ACF/archive/master.zip" "acf-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "acf-master/lua/acf/shared/guns;" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/nrlulz/ACF" "Realistic Wepons & Engines") -mod_info_acf_missiles=(MOD "acfmissiles" "ACF Missiles" "https://github.com/Bubbus/ACF-Missiles/archive/master.zip" "acf-missiles-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/Bubbus/ACF-Missiles" "More missiles for ACF") -mod_info_advdupe2=(MOD "advdupe2" "Advanced Duplicator 2" "https://github.com/wiremod/advdupe2/archive/master.zip" "advdupe2-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://www.wiremod.com" "Save your constructions. Second version") -mod_info_pac3=(MOD "pac3" "PAC3" "https://github.com/CapsAdmin/pac3/archive/master.zip" "pac3-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/CapsAdmin/pac3" "Advanced player model customization") -mod_info_wiremod=(MOD "wiremod" "Wiremod" "https://github.com/wiremod/wire/archive/master.zip" "wire-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/wiremod/wire" "Base Wiremod Addon") -mod_info_wiremodextras=(MOD "wiremod-extras" "Wiremod Extras" "https://github.com/wiremod/wire-extras/archive/master.zip" "wire-extras-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/wiremod/wire-extras/" "Addition to Wiremod, Extra Content") -mod_info_advduplicator=(MOD "advdupe1" "Advanced Duplicator 1" "https://github.com/wiremod/advduplicator/archive/master.zip" "advduplicator-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/wiremod/advduplicator" "Save your constructions. First version") -mod_info_trackassemblytool=(MOD "trackassemblytool" "Track Assembly Tool" "https://github.com/dvdvideo1234/trackassemblytool/archive/master.zip" "trackassemblytool-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/TrackAssemblyTool" "Assembles segmented track. Supports wire") -mod_info_physpropertiesadv=(MOD "physpropertiesadv" "Phys Properties Adv" "https://github.com/dvdvideo1234/physpropertiesadv/archive/master.zip" "physpropertiesadv-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/PhysPropertiesAdv" "Advanced configurable properties") -mod_info_controlsystemse2=(MOD "controlsystemse2" "Control Systems E2" "https://github.com/dvdvideo1234/controlsystemse2/archive/master.zip" "controlsystemse2-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/ControlSystemsE2" "PID controllers and fast traces for E2. Minor included in wire-extas") -mod_info_e2pistontiming=(MOD "e2pistontiming" "E2 Piston Timing" "https://github.com/dvdvideo1234/e2pistontiming/archive/master.zip" "e2pistontiming-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/E2PistonTiming" "Routine driven piston engine timings for E2") -mod_info_propcannontool=(MOD "propcannontool" "Prop Cannon Tool" "https://github.com/dvdvideo1234/propcannontool/archive/master.zip" "propcannontool-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/PropCannonTool" "Cannon entity that can fire props. Supports wire") -mod_info_gearassemblytool=(MOD "gearassemblytool" "Gear Assembly Tool" "https://github.com/dvdvideo1234/gearassemblytool/archive/master.zip" "gearassemblytool-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/GearAssemblyTool" "Assembles segmented gearbox") -mod_info_spinnertool=(MOD "spinnertool" "Spinner Tool" "https://github.com/dvdvideo1234/spinnertool/archive/master.zip" "spinnertool-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/SpinnerTool" "Torque lever controlled spinner. Supports wire") -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") -mod_info_darkrp=(MOD "darkrp" "DarkRP" "https://github.com/FPtje/DarkRP/archive/master.zip" "darkrp-master.zip" "0" "LowercaseOn" "${systemdir}/gamemodes" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://darkrp.com" "Most popular gamemode") -mod_info_darkrpmodification=(MOD "darkrpmodification" "DarkRP Modification" "https://github.com/FPtje/darkrpmodification/archive/master.zip" "darkrpmodification-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "NOUPDATE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://darkrp.com" "Customize DarkRP settings") -mod_info_laserstool=(MOD "laserstool" "Laser STool" "https://github.com/dvdvideo1234/laserstool/archive/main.zip" "laserstool-main.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/LaserSTool" "Scripted tool that spawns laser entities, simulates light rays and even kill players") - -# Rust -mod_info_rustcarbon=(MOD "rustcarbon" "Carbon for Rust" "${carbonrustlatestlink}" "Carbon.Linux.Release.tar.gz" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Rust;" "NOTGAMES" "carbonmod.gg" "Allows for the use of both plugins and harmony mods") - -# Oxidemod -mod_info_rustoxide=(MOD "rustoxide" "Oxide for Rust" "${oxiderustlatestlink}" "Oxide.Rust-linux.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Rust;" "NOTGAMES" "https://umod.org/games/rust" "Allows for the use of plugins") -mod_info_hwoxide=(MOD "hwoxide" "Oxide for Hurtworld" "${oxidehurtworldlatestlink}" "Oxide.Hurtworld.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Hurtworld;" "NOTGAMES" "https://umod.org/games/hurtworld" "Allows for the use of plugins") -mod_info_sdtdoxide=(MOD "sdtdoxide" "Oxide for 7 Days To Die" "${oxidesdtdlatestlink}" "Oxide.SevenDaysToDie.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "7 Days To Die;" "NOTGAMES" "https://umod.org/games/7-days-to-die" "Allows for the use of plugins") - -# ValheimPlus -mod_info_valheimplus=(MOD "valheimplus" "Valheim PLUS" "${valeimpluslatestlink}" "ValheimPlus.tar.gz" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Valheim;" "NOTGAMES" "https://github.com/valheimPlus/ValheimPlus" "Mod to improve Valheim gameplay") - -# BepInEx Valheim -mod_info_bepinexvh=(MOD "bepinexvh" "BepInEx Valheim" "${bepinexvhlatestlink}" "denikson-BepInExPack_Valheim.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Valheim;" "NOTGAMES" "https://valheim.thunderstore.io/package/denikson/BepInExPack_Valheim/" "Unity / XNA game patcher and plugin framework") - -# REQUIRED: Set all mods info into the global array -mods_global_array=("${mod_info_metamod[@]}" "${mod_info_base_amxx[@]}" "${mod_info_cs_amxx[@]}" "${mod_info_dod_amxx[@]}" "${mod_info_tfc_amxx[@]}" "${mod_info_ns_amxx[@]}" "${mod_info_ts_amxx[@]}" "${mod_info_metamodsource[@]}" "${mod_info_sourcemod[@]}" "${mod_info_steamworks[@]}" "${mod_info_gokz[@]}" "${mod_info_ttt[@]}" "${mod_info_get5[@]}" "${mod_info_prac[@]}" "${mod_info_pug[@]}" "${mod_info_dhook[@]}" "${mod_info_movement[@]}" "${mod_info_cleaner[@]}" "${mod_info_ulib[@]}" "${mod_info_ulx[@]}" "${mod_info_utime[@]}" "${mod_info_uclip[@]}" "${mod_info_acf[@]}" "${mod_info_acf_missiles[@]}" "${mod_info_acf_sweps[@]}" "${mod_info_advdupe2[@]}" "${mod_info_pac3[@]}" "${mod_info_wiremod[@]}" "${mod_info_wiremodextras[@]}" "${mod_info_darkrp[@]}" "${mod_info_darkrpmodification[@]}" "${mod_info_rustcarbon[@]}" "${mod_info_rustoxide[@]}" "${mod_info_hwoxide[@]}" "${mod_info_sdtdoxide[@]}" "${mod_info_advduplicator[@]}" "${mod_info_trackassemblytool[@]}" "${mod_info_physpropertiesadv[@]}" "${mod_info_controlsystemse2[@]}" "${mod_info_e2pistontiming[@]}" "${mod_info_propcannontool[@]}" "${mod_info_gearassemblytool[@]}" "${mod_info_spinnertool[@]}" "${mod_info_surfacefrictiontool[@]}" "${mod_info_magneticdipole[@]}" "${mod_info_environmentorganizer[@]}" "${mod_info_precision_alignment[@]}" "${mod_info_improved_stacker[@]}" "${mod_info_improved_weight[@]}" "${mod_info_improved_antinoclip[@]}" "${mod_info_laserstool[@]}" "${mod_info_valheimplus[@]}" "${mod_info_bepinexvh[@]}") diff --git a/lgsm/functions/query_gamedig.sh b/lgsm/functions/query_gamedig.sh deleted file mode 100644 index 344874011..000000000 --- a/lgsm/functions/query_gamedig.sh +++ /dev/null @@ -1,93 +0,0 @@ -#!/bin/bash -# LinuxGSM query_gamedig.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Querys a gameserver using node-gamedig. -# https://github.com/gamedig/node-gamedig - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -querystatus="2" -# Check if gamedig and jq are installed. -if [ "$(command -v gamedig 2> /dev/null)" ] && [ "$(command -v jq 2> /dev/null)" ]; then - - # will bypass query if server offline. - check_status.sh - if [ "${status}" != "0" ]; then - # GameDig requires you use the voice port when querying. - if [ "${querytype}" == "teamspeak3" ]; then - queryport="${port}" - fi - # checks if query is working null = pass. - gamedigcmd=$(echo -e "gamedig --type \"${querytype}\" --host \"${queryip}\" --query_port \"${queryport}\"|jq") - gamedigraw=$(gamedig --type "${querytype}" --host "${queryip}" --query_port "${queryport}") - querystatus=$(echo "${gamedigraw}" | jq '.error|length') - - if [ "${querystatus}" != "null" ]; then - gamedigcmd=$(echo -e "gamedig --type \"${querytype}\" --host \"${queryip}\" --port \"${queryport}\"|jq") - gamedigraw=$(gamedig --type "${querytype}" --host "${queryip}" --port "${queryport}") - querystatus=$(echo "${gamedigraw}" | jq '.error|length') - fi - - if [ "${querytype}" == "teamspeak3" ]; then - fn_info_game_ts3 - fi - - # server name. - gdname=$(echo "${gamedigraw}" | jq -re '.name') - if [ "${gdname}" == "null" ]; then - unset gdname - fi - - # numplayers. - if [ "${querytype}" == "minecraft" ]; then - gdplayers=$(echo "${gamedigraw}" | jq -re '.players | length-1') - elif [ "${querytype}" == "teamspeak3" ]; then - gdplayers=$(echo "${gamedigraw}" | jq -re '.raw.virtualserver_clientsonline') - else - gdplayers=$(echo "${gamedigraw}" | jq -re '.players | length') - fi - if [ "${gdplayers}" == "null" ]; then - unset gdplayers - elif [ "${gdplayers}" == "[]" ] || [ "${gdplayers}" == "-1" ]; then - gdplayers=0 - fi - - # maxplayers. - gdmaxplayers=$(echo "${gamedigraw}" | jq -re '.maxplayers') - if [ "${gdmaxplayers}" == "null" ]; then - unset gdmaxplayers - elif [ "${gdmaxplayers}" == "[]" ]; then - gdmaxplayers=0 - fi - - # current map. - gdmap=$(echo "${gamedigraw}" | jq -re '.map') - if [ "${gdmap}" == "null" ]; then - unset gdmap - fi - - # current gamemode. - gdgamemode=$(echo "${gamedigraw}" | jq -re '.raw.rules.GameMode_s') - if [ "${gdgamemode}" == "null" ]; then - unset gdgamemode - fi - - # numbots. - gdbots=$(echo "${gamedigraw}" | jq -re '.bots | length') - if [ "${gdbots}" == "null" ] || [ "${gdbots}" == "0" ]; then - unset gdbots - fi - - # server version. - if [ "${querytype}" == "teamspeak3" ]; then - gdversion=$(echo "${gamedigraw}" | jq -re '.raw.virtualserver_version') - else - gdversion=$(echo "${gamedigraw}" | jq -re '.raw.version') - fi - - if [ "${gdversion}" == "null" ] || [ "${gdversion}" == "0" ]; then - unset gdversion - fi - fi -fi diff --git a/lgsm/functions/query_gsquery.py b/lgsm/functions/query_gsquery.py deleted file mode 100644 index 62c92082e..000000000 --- a/lgsm/functions/query_gsquery.py +++ /dev/null @@ -1,151 +0,0 @@ -#! /usr/bin/env python3 -# -*- coding: utf-8 -*- -# LinuxGSM query_gsquery.py function -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Allows querying of various game servers. - -import argparse -import socket -import sys - -engine_types=('protocol-valve','protocol-quake3','protocol-quake3','protocol-gamespy1','protocol-unreal2','ut3','minecraft','minecraftbe','jc2mp','mumbleping','soldat','teeworlds') - -class gsquery: - server_response_timeout = 5 - default_buffer_length = 1024 - sourcequery=('protocol-valve','avalanche3.0','barotrauma','madness','quakelive','realvirtuality','refractor','source','goldsrc','spark','starbound','unity3d','unreal4','wurm') - idtech2query=('protocol-quake3','idtech2','quake','iw2.0') - idtech3query=('protocol-quake3','iw3.0','ioquake3','qfusion') - minecraftquery=('minecraft','lwjgl2') - minecraftbequery=('minecraftbe',) - jc2mpquery=('jc2mp',) - mumblequery=('mumbleping',) - soldatquery=('soldat',) - twquery=('teeworlds',) - unrealquery=('protocol-gamespy1','unreal') - unreal2query=('protocol-unreal2','unreal2') - unreal3query=('ut3','unreal3') - - def __init__(self, arguments): - self.argument = arguments - # - if self.argument.engine in self.sourcequery: - self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0' - elif self.argument.engine in self.idtech2query: - 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: - 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' - elif self.argument.engine in self.minecraftbequery: - self.query_prompt_string = b'\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\xfe\xfe\xfe\xfe\xfd\xfd\xfd\xfd\x12\x34\x56\x78\x00\x00\x00\x00\x00\x00\x00\x00' - elif self.argument.engine in self.mumblequery: - self.query_prompt_string = b'\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x07\x08' - elif self.argument.engine in self.soldatquery: - self.query_prompt_string = b'\x69\x00' - elif self.argument.engine in self.twquery: - self.query_prompt_string = b'\x04\x00\x00\xff\xff\xff\xff\x05' + bytearray(511) - elif self.argument.engine in self.unrealquery: - self.query_prompt_string = b'\x5C\x69\x6E\x66\x6F\x5C' - elif self.argument.engine in self.unreal2query: - self.query_prompt_string = b'\x79\x00\x00\x00\x00' - elif self.argument.engine in self.unreal3query: - self.query_prompt_string = b'\xFE\xFD\x09\x00\x00\x00\x00' - - self.connected = False - self.response = None - - @staticmethod - def fatal_error(error_message, error_code=1): - sys.stderr.write('ERROR: ' + str(error_message) + '\n') - sys.exit(error_code) - - @staticmethod - def exit_success(success_message=''): - sys.stdout.write('OK: ' + str(success_message) + '\n') - sys.exit(0) - - def responding(self): - # Connect. - connection = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) - connection.settimeout(self.server_response_timeout) - try: - self.connected = connection.connect((self.argument.address, int(self.argument.port))) - except socket.timeout: - self.fatal_error('Request timed out', 1) - except Exception: - self.fatal_error('Unable to connect', 1) - # Send. - connection.send(self.query_prompt_string) - # Receive. - try: - self.response = connection.recv(self.default_buffer_length) - except socket.error: - self.fatal_error('Unable to receive', 2) - connection.close() - # Response. - if self.response is None: - self.fatal_error('No response', 3) - if len(self.response) < 5: - sys.exit('Short response.', 3) - else: - self.exit_success(str(self.response)) - -def parse_args(): - parser = argparse.ArgumentParser( - description='Allows querying of various game servers.', - usage='usage: python3 %(prog)s [options]', - add_help=False - ) - parser.add_argument( - '-a', '--address', - type=str, - required=True, - help='The IPv4 address of the server.' - ) - parser.add_argument( - '-p', '--port', - type=int, - required=True, - help='The IPv4 port of the server.' - ) - parser.add_argument( - '-e', '--engine', - metavar='ENGINE', - choices=engine_types, - help='Engine type: ' + ' '.join(engine_types) - ) - parser.add_argument( - '-v', '--verbose', - action='store_true', - help='Display verbose output.' - ) - parser.add_argument( - '-d', '--debug', - action='store_true', - help='Display debugging output.' - ) - parser.add_argument( - '-V', '--version', - action='version', - version='%(prog)s 0.0.1', - help='Display version and exit.' - ) - parser.add_argument( - '-h', '--help', - action='help', - help='Display help and exit.' - ) - return parser.parse_args() - -def main(): - arguments = parse_args() - server = gsquery(arguments) - server.responding() - -if __name__ == '__main__': - main() diff --git a/lgsm/functions/update_factorio.sh b/lgsm/functions/update_factorio.sh deleted file mode 100644 index 852ab9d87..000000000 --- a/lgsm/functions/update_factorio.sh +++ /dev/null @@ -1,168 +0,0 @@ -#!/bin/bash -# LinuxGSM update_factorio.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Handles updating of Factorio servers. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -fn_update_dl() { - # Download and extract files to serverfiles. - fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "nohash" - fn_dl_extract "${tmpdir}" "factorio_headless_${factorioarch}-${remotebuildversion}.tar.xz" "${serverfiles}" "factorio" - fn_clear_tmp -} - -fn_update_localbuild() { - # Gets local build info. - fn_print_dots "Checking local build: ${remotelocation}" - # Uses executable to get local build. - if [ -d "${executabledir}" ]; then - cd "${executabledir}" || exit - localbuild=$(${executable} --version | grep "Version:" | awk '{print $2}') - fi - if [ -z "${localbuild}" ]; then - fn_print_error "Checking local build: ${remotelocation}: missing local build info" - fn_script_log_error "Missing local build info" - fn_script_log_error "Set localbuild to 0" - localbuild="0" - else - fn_print_ok "Checking local build: ${remotelocation}" - fn_script_log_pass "Checking local build" - fi -} - -fn_update_remotebuild() { - # Get 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) - remotebuildurl="https://factorio.com/get-download/${branch}/headless/${factorioarch}" - remotebuildfilename="factorio_headless_${factorioarch}-${remotebuildversion}.tar.xz" - - if [ "${firstcommandname}" != "INSTALL" ]; then - fn_print_dots "Checking remote build: ${remotelocation}" - # Checks if remotebuildversion variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then - fn_print_fail "Checking remote build: ${remotelocation}" - fn_script_log_fatal "Checking remote build" - core_exit.sh - else - fn_print_ok "Checking remote build: ${remotelocation}" - fn_script_log_pass "Checking remote build" - fi - else - # Checks if remotebuild variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then - fn_print_failure "Unable to get remote build" - fn_script_log_fatal "Unable to get remote build" - core_exit.sh - fi - fi -} - -fn_update_compare() { - fn_print_dots "Checking for update: ${remotelocation}" - if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then - fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "Update available" - echo -e "* Local build: ${red}${localbuild} ${factorioarch}${default}" - echo -e "* Remote build: ${green}${remotebuildversion} ${factorioarch}${default}" - if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" - fi - if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" - fi - echo -en "\n" - fn_script_log_info "Update available" - fn_script_log_info "Local build: ${localbuild} ${factorioarch}" - fn_script_log_info "Remote build: ${remotebuildversion} ${factorioarch}" - if [ -n "${branch}" ]; then - fn_script_log_info "Branch: ${branch}" - fi - fn_script_log_info "${localbuild} > ${remotebuildversion}" - - if [ "${commandname}" == "UPDATE" ]; then - unset updateonstart - check_status.sh - # If server stopped. - if [ "${status}" == "0" ]; then - fn_update_dl - if [ "${localbuild}" == "0" ]; then - exitbypass=1 - command_start.sh - fn_firstcommand_reset - exitbypass=1 - sleep 5 - command_stop.sh - fn_firstcommand_reset - fi - # If server started. - else - fn_print_restart_warning - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - exitbypass=1 - fn_update_dl - exitbypass=1 - command_start.sh - fn_firstcommand_reset - fi - unset exitbypass - date +%s > "${lockdir}/lastupdate.lock" - alert="update" - elif [ "${commandname}" == "CHECK-UPDATE" ]; then - alert="check-update" - fi - alert.sh - else - fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "No update available" - echo -e "* Local build: ${green}${localbuild} ${factorioarch}${default}" - echo -e "* Remote build: ${green}${remotebuildversion} ${factorioarch}${default}" - if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" - fi - echo -en "\n" - fn_script_log_info "No update available" - fn_script_log_info "Local build: ${localbuild} ${factorioarch}" - fn_script_log_info "Remote build: ${remotebuildversion} ${factorioarch}" - if [ -n "${branch}" ]; then - fn_script_log_info "Branch: ${branch}" - fi - if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" - fi - fi -} - -# Game server architecture. -factorioarch="linux64" - -# The location where the builds are checked and downloaded. -remotelocation="factorio.com" - -if [ "${firstcommandname}" == "INSTALL" ]; then - fn_update_remotebuild - fn_update_dl -else - fn_print_dots "Checking for update" - fn_print_dots "Checking for update: ${remotelocation}" - fn_script_log_info "Checking for update: ${remotelocation}" - fn_update_localbuild - fn_update_remotebuild - fn_update_compare -fi diff --git a/lgsm/functions/update_jediknight2.sh b/lgsm/functions/update_jediknight2.sh deleted file mode 100644 index a88b96f61..000000000 --- a/lgsm/functions/update_jediknight2.sh +++ /dev/null @@ -1,163 +0,0 @@ -#!/bin/bash -# LinuxGSM update_jk2.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Handles updating of Jedi Knight 2 servers. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -fn_update_dl() { - # Download and extract files to serverfiles. - fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "nohash" - fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}/GameData" "linux-amd64" - fn_clear_tmp -} - -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 | sed 's/.*://' | awk '{print $1}' | head -n 1 | sed 's/v//') - if [ -z "${localbuild}" ]; then - fn_print_error "Checking local build: ${remotelocation}: missing local build info" - fn_script_log_error "Missing local build info" - fn_script_log_error "Set localbuild to 0" - localbuild="0" - else - fn_print_ok "Checking local build: ${remotelocation}" - fn_script_log_pass "Checking local build" - fi -} - -fn_update_remotebuild() { - # Get 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') - remotebuildurl=$(echo "${remotebuildresponse}" | jq -r '.assets[]|select(.browser_download_url | contains("dedicated.zip")) | .browser_download_url') - remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '.tag_name') - - if [ "${firstcommandname}" != "INSTALL" ]; then - fn_print_dots "Checking remote build: ${remotelocation}" - # Checks if remotebuildversion variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then - fn_print_fail "Checking remote build: ${remotelocation}" - fn_script_log_fatal "Checking remote build" - core_exit.sh - else - fn_print_ok "Checking remote build: ${remotelocation}" - fn_script_log_pass "Checking remote build" - fi - else - # Checks if remotebuild variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then - fn_print_failure "Unable to get remote build" - fn_script_log_fatal "Unable to get remote build" - core_exit.sh - fi - fi -} - -fn_update_compare() { - fn_print_dots "Checking for update: ${remotelocation}" - if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then - fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "Update available" - echo -e "* Local build: ${red}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" - if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" - fi - if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" - fi - echo -en "\n" - fn_script_log_info "Update available" - fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" - if [ -n "${branch}" ]; then - fn_script_log_info "Branch: ${branch}" - fi - fn_script_log_info "${localbuild} > ${remotebuildversion}" - - if [ "${commandname}" == "UPDATE" ]; then - unset updateonstart - check_status.sh - # If server stopped. - if [ "${status}" == "0" ]; then - fn_update_dl - if [ "${localbuild}" == "0" ]; then - exitbypass=1 - command_start.sh - fn_firstcommand_reset - exitbypass=1 - sleep 5 - command_stop.sh - fn_firstcommand_reset - fi - # If server started. - else - fn_print_restart_warning - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - exitbypass=1 - fn_update_dl - exitbypass=1 - command_start.sh - fn_firstcommand_reset - fi - unset exitbypass - date +%s > "${lockdir}/lastupdate.lock" - alert="update" - elif [ "${commandname}" == "CHECK-UPDATE" ]; then - alert="check-update" - fi - alert.sh - else - fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "No update available" - echo -e "* Local build: ${green}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" - if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" - fi - echo -en "\n" - fn_script_log_info "No update available" - fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" - if [ -n "${branch}" ]; then - fn_script_log_info "Branch: ${branch}" - fi - if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" - fi - fi -} - -# The location where the builds are checked and downloaded. -remotelocation="github.com" - -if [ "${firstcommandname}" == "INSTALL" ]; then - fn_update_remotebuild - fn_update_dl -else - update_steamcmd.sh - fn_print_dots "Checking for update" - fn_print_dots "Checking for update: ${remotelocation}" - fn_script_log_info "Checking for update: ${remotelocation}" - fn_update_localbuild - fn_update_remotebuild - fn_update_compare -fi diff --git a/lgsm/functions/update_minecraft.sh b/lgsm/functions/update_minecraft.sh deleted file mode 100644 index dbef26d34..000000000 --- a/lgsm/functions/update_minecraft.sh +++ /dev/null @@ -1,176 +0,0 @@ -#!/bin/bash -# LinuxGSM update_minecraft.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Handles updating of Minecraft: Java Edition servers. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -fn_update_dl() { - # Download and extract files to serverfiles. - fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "chmodx" "norun" "noforce" "nohash" - cp -f "${tmpdir}/${remotebuildfilename}" "${serverfiles}/${executable#./}" -} - -fn_update_localbuild() { - # Gets local build info. - fn_print_dots "Checking local build: ${remotelocation}" - # Uses executable to get local build. - if [ -d "${executabledir}" ]; then - cd "${executabledir}" || exit - localbuild=$(unzip -p "minecraft_server.jar" version.json | jq -r '.id') - fi - if [ -z "${localbuild}" ]; then - fn_print_error "Checking local build: ${remotelocation}: missing local build info" - fn_script_log_error "Missing local build info" - fn_script_log_error "Set localbuild to 0" - localbuild="0" - else - fn_print_ok "Checking local build: ${remotelocation}" - fn_script_log_pass "Checking local build" - fi -} - -fn_update_remotebuild() { - # Get remote build info. - apiurl="https://launchermeta.mojang.com/mc/game/version_manifest.json" - remotebuildresponse=$(curl -s "${apiurl}") - # Latest release. - if [ "${branch}" == "release" ] && [ "${mcversion}" == "latest" ]; then - remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '.latest.release') - # Latest snapshot. - elif [ "${branch}" == "snapshot" ] && [ "${mcversion}" == "latest" ]; then - remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '.latest.snapshot') - # Specific release/snapshot. - else - remotebuildversion=$(echo "${remotebuildresponse}" | jq -r --arg branch "${branch}" --arg mcversion "${mcversion}" '.versions | .[] | select(.type==$branch and .id==$mcversion) | .id') - fi - remotebuildfilename="minecraft_server.${remotebuildversion}.jar" - # Generate link to version manifest json. - remotebuildmanifest=$(echo "${remotebuildresponse}" | jq -r --arg branch "${branch}" --arg mcversion "${remotebuildversion}" '.versions | .[] | select(.type==$branch and .id==$mcversion) | .url') - # Generate link to server.jar - remotebuildurl=$(curl -s "${remotebuildmanifest}" | jq -r '.downloads.server.url') - - if [ "${firstcommandname}" != "INSTALL" ]; then - fn_print_dots "Checking remote build: ${remotelocation}" - # Checks if remotebuildversion variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then - fn_print_fail "Checking remote build: ${remotelocation}" - fn_script_log_fatal "Checking remote build" - core_exit.sh - else - fn_print_ok "Checking remote build: ${remotelocation}" - fn_script_log_pass "Checking remote build" - fi - else - # Checks if remotebuild variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then - fn_print_failure "Unable to get remote build" - fn_script_log_fatal "Unable to get remote build" - core_exit.sh - fi - fi -} - -fn_update_compare() { - fn_print_dots "Checking for update: ${remotelocation}" - if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then - fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "Update available" - echo -e "* Local build: ${red}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" - if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" - fi - if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" - fi - echo -en "\n" - fn_script_log_info "Update available" - fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" - if [ -n "${branch}" ]; then - fn_script_log_info "Branch: ${branch}" - fi - fn_script_log_info "${localbuild} > ${remotebuildversion}" - - if [ "${commandname}" == "UPDATE" ]; then - unset updateonstart - check_status.sh - # If server stopped. - if [ "${status}" == "0" ]; then - fn_update_dl - if [ "${localbuild}" == "0" ]; then - exitbypass=1 - command_start.sh - fn_firstcommand_reset - exitbypass=1 - sleep 5 - command_stop.sh - fn_firstcommand_reset - fi - # If server started. - else - fn_print_restart_warning - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - exitbypass=1 - fn_update_dl - exitbypass=1 - command_start.sh - fn_firstcommand_reset - fi - unset exitbypass - date +%s > "${lockdir}/lastupdate.lock" - alert="update" - elif [ "${commandname}" == "CHECK-UPDATE" ]; then - alert="check-update" - fi - alert.sh - else - fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "No update available" - echo -e "* Local build: ${green}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" - if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" - fi - echo -en "\n" - fn_script_log_info "No update available" - fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" - if [ -n "${branch}" ]; then - fn_script_log_info "Branch: ${branch}" - fi - if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" - fi - fi -} - -# The location where the builds are checked and downloaded. -remotelocation="mojang.com" - -if [ "${firstcommandname}" == "INSTALL" ]; then - fn_update_remotebuild - fn_update_dl -else - fn_print_dots "Checking for update" - fn_print_dots "Checking for update: ${remotelocation}" - fn_script_log_info "Checking for update: ${remotelocation}" - fn_update_localbuild - fn_update_remotebuild - fn_update_compare -fi diff --git a/lgsm/functions/update_minecraft_bedrock.sh b/lgsm/functions/update_minecraft_bedrock.sh deleted file mode 100644 index c17088171..000000000 --- a/lgsm/functions/update_minecraft_bedrock.sh +++ /dev/null @@ -1,181 +0,0 @@ -#!/bin/bash -# LinuxGSM update_minecraft_bedrock.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Handles updating of Minecraft Bedrock servers. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -fn_update_dl() { - fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "bedrock_server.${remotebuildversion}.zip" "nochmodx" "norun" "noforce" "nohash" - echo -e "Extracting to ${serverfiles}...\c" - if [ "${firstcommandname}" == "INSTALL" ]; then - unzip -oq "${tmpdir}/bedrock_server.${remotebuildversion}.zip" -x "server.properties" -d "${serverfiles}" - else - unzip -oq "${tmpdir}/bedrock_server.${remotebuildversion}.zip" -x "permissions.json" "server.properties" "allowlist.json" -d "${serverfiles}" - fi - local exitcode=$? - if [ "${exitcode}" != 0 ]; then - fn_print_fail_eol_nl - fn_script_log_fatal "Extracting ${local_filename}" - if [ -f "${lgsmlog}" ]; then - echo -e "${extractcmd}" >> "${lgsmlog}" - fi - echo -e "${extractcmd}" - core_exit.sh - else - fn_print_ok_eol_nl - fn_script_log_pass "Extracting ${local_filename}" - fi -} - -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') - if [ -z "${localbuild}" ]; then - fn_print_error "Checking local build: ${remotelocation}: missing local build info" - fn_script_log_error "Missing local build info" - fn_script_log_error "Set localbuild to 0" - localbuild="0" - else - fn_print_ok "Checking local build: ${remotelocation}" - fn_script_log_pass "Checking local build" - fi -} - -fn_update_remotebuild() { - # Random number for userAgent - randnum=$((1 + RANDOM % 5000)) - # 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.${randnum}.212 Safari/537.36" "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*' | sed 's/.*\///' | grep -Eo "[.0-9]+[0-9]") - else - remotebuildversion="${mcversion}" - fi - remotebuildurl="https://minecraft.azureedge.net/bin-linux/bedrock-server-${remotebuildversion}.zip" - - if [ "${firstcommandname}" != "INSTALL" ]; then - fn_print_dots "Checking remote build: ${remotelocation}" - # Checks if remotebuildversion variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then - fn_print_fail "Checking remote build: ${remotelocation}" - fn_script_log_fatal "Checking remote build" - core_exit.sh - else - fn_print_ok "Checking remote build: ${remotelocation}" - fn_script_log_pass "Checking remote build" - fi - else - # Checks if remotebuild variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then - fn_print_failure "Unable to get remote build" - fn_script_log_fatal "Unable to get remote build" - core_exit.sh - fi - fi -} - -fn_update_compare() { - fn_print_dots "Checking for update: ${remotelocation}" - if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then - fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "Update available" - echo -e "* Local build: ${red}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" - if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" - fi - if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" - fi - echo -en "\n" - fn_script_log_info "Update available" - fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" - if [ -n "${branch}" ]; then - fn_script_log_info "Branch: ${branch}" - fi - fn_script_log_info "${localbuild} > ${remotebuildversion}" - - if [ "${commandname}" == "UPDATE" ]; then - unset updateonstart - check_status.sh - # If server stopped. - if [ "${status}" == "0" ]; then - fn_update_dl - if [ "${localbuild}" == "0" ]; then - exitbypass=1 - command_start.sh - fn_firstcommand_reset - exitbypass=1 - sleep 5 - command_stop.sh - fn_firstcommand_reset - fi - # If server started. - else - fn_print_restart_warning - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - exitbypass=1 - fn_update_dl - exitbypass=1 - command_start.sh - fn_firstcommand_reset - fi - unset exitbypass - date +%s > "${lockdir}/lastupdate.lock" - alert="update" - elif [ "${commandname}" == "CHECK-UPDATE" ]; then - alert="check-update" - fi - alert.sh - else - fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "No update available" - echo -e "* Local build: ${green}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" - if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" - fi - echo -en "\n" - fn_script_log_info "No update available" - fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" - if [ -n "${branch}" ]; then - fn_script_log_info "Branch: ${branch}" - fi - if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" - fi - fi -} - -# The location where the builds are checked and downloaded. -remotelocation="minecraft.net" - -if [ "${firstcommandname}" == "INSTALL" ]; then - fn_update_remotebuild - fn_update_dl -else - fn_print_dots "Checking for update" - fn_print_dots "Checking for update: ${remotelocation}" - fn_script_log_info "Checking for update: ${remotelocation}" - fn_update_localbuild - fn_update_remotebuild - fn_update_compare -fi diff --git a/lgsm/functions/update_mta.sh b/lgsm/functions/update_mta.sh deleted file mode 100644 index 5252c1328..000000000 --- a/lgsm/functions/update_mta.sh +++ /dev/null @@ -1,166 +0,0 @@ -#!/bin/bash -# LinuxGSM update_mta.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Handles updating of Multi Theft Auto servers. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -fn_update_dl() { - # Download and extract files to tmpdir. - fn_fetch_file "http://linux.mtasa.com/dl/multitheftauto_linux_x64.tar.gz" "" "" "" "${tmpdir}" "multitheftauto_linux_x64.tar.gz" "nochmodx" "norun" "force" "nohash" - fn_dl_extract "${tmpdir}" "multitheftauto_linux_x64.tar.gz" "${serverfiles}" "multitheftauto_linux_x64" -} - -fn_update_localbuild() { - # Gets local build info. - fn_print_dots "Checking local build: ${remotelocation}" - # Uses log file to get local build. - localbuild=$(grep "= Multi Theft Auto: San Andreas v" "${serverfiles}/mods/deathmatch/logs/server.log" | awk '{ print $7 }' | sed -r 's/^.{1}//' | tail -1) - if [ -z "${localbuild}" ]; then - fn_print_error "Checking local build: ${remotelocation}: missing local build info" - fn_script_log_error "Missing local build info" - fn_script_log_error "Set localbuild to 0" - localbuild="0" - else - fn_print_ok "Checking local build: ${remotelocation}" - fn_script_log_pass "Checking local build" - fi -} - -fn_update_remotebuild() { - # Get remote build info. - apiurl="https://api.github.com/repos/multitheftauto/mtasa-blue/releases/latest" - remotebuildresponse=$(curl -s "${apiurl}") - remotebuildfilename=$(echo "${remotebuildresponse}" | jq -r '.assets[]|select(.browser_download_url | contains("Linux-amd64")) | .name') - remotebuildurl=$(echo "${remotebuildresponse}" | jq -r '.assets[]|select(.browser_download_url | contains("Linux-amd64")) | .browser_download_url') - remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '.tag_name') - if [ "${firstcommandname}" != "INSTALL" ]; then - fn_print_dots "Checking remote build: ${remotelocation}" - # Checks if remotebuildversion variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then - fn_print_fail "Checking remote build: ${remotelocation}" - fn_script_log_fatal "Checking remote build" - core_exit.sh - else - fn_print_ok "Checking remote build: ${remotelocation}" - fn_script_log_pass "Checking remote build" - fi - else - # Checks if remotebuild variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then - fn_print_failure "Unable to get remote build" - fn_script_log_fatal "Unable to get remote build" - core_exit.sh - fi - fi -} - -fn_update_compare() { - fn_print_dots "Checking for update: ${remotelocation}" - if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then - if [ "${forceupdate}" == "1" ]; then - # forceupdate bypasses checks, useful for small build changes - mtaupdatestatus="forced" - else - mtaupdatestatus="available" - fi - fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "Update available" - echo -e "* Local build: ${red}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" - if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" - fi - if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" - fi - echo -en "\n" - fn_script_log_info "Update available" - fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" - if [ -n "${branch}" ]; then - fn_script_log_info "Branch: ${branch}" - fi - fn_script_log_info "${localbuild} > ${remotebuildversion}" - - if [ "${commandname}" == "UPDATE" ]; then - unset updateonstart - check_status.sh - # If server stopped. - if [ "${status}" == "0" ]; then - fn_update_dl - if [ "${localbuild}" == "0" ]; then - exitbypass=1 - command_start.sh - fn_firstcommand_reset - exitbypass=1 - sleep 5 - command_stop.sh - fn_firstcommand_reset - fi - # If server started. - else - fn_print_restart_warning - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - exitbypass=1 - fn_update_dl - exitbypass=1 - command_start.sh - fn_firstcommand_reset - fi - unset exitbypass - date +%s > "${lockdir}/lastupdate.lock" - alert="update" - elif [ "${commandname}" == "CHECK-UPDATE" ]; then - alert="check-update" - fi - alert.sh - else - fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "No update available" - echo -e "* Local build: ${green}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" - if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" - fi - echo -en "\n" - fn_script_log_info "No update available" - fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" - if [ -n "${branch}" ]; then - fn_script_log_info "Branch: ${branch}" - fi - if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" - fi - fi -} - -# The location where the builds are checked and downloaded. -remotelocation="linux.mtasa.com" - -if [ "${firstcommandname}" == "INSTALL" ]; then - fn_update_remotebuild - fn_update_dl -else - fn_print_dots "Checking for update" - fn_print_dots "Checking for update: ${remotelocation}" - fn_script_log_info "Checking for update: ${remotelocation}" - fn_update_localbuild - fn_update_remotebuild - fn_update_compare -fi diff --git a/lgsm/functions/update_papermc.sh b/lgsm/functions/update_papermc.sh deleted file mode 100644 index 102ef6570..000000000 --- a/lgsm/functions/update_papermc.sh +++ /dev/null @@ -1,194 +0,0 @@ -#!/bin/bash -# LinuxGSM update_papermc.sh function -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Handles updating of PaperMC and Waterfall servers. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -fn_update_dl() { - # Download and extract files to serverfiles. - fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "chmodx" "norun" "force" "${remotebuildhash}" - cp -f "${tmpdir}/${remotebuildfilename}" "${serverfiles}/${executable#./}" - echo "${remotebuildversion}" > "${serverfiles}/build.txt" -} - -fn_update_localbuild() { - # Gets local build info. - fn_print_dots "Checking local build: ${remotelocation}" - # Uses build file to get local build. - localbuild=$(head -n 1 "${serverfiles}/build.txt" 2> /dev/null) - if [ -z "${localbuild}" ]; then - fn_print_error "Checking local build: ${remotelocation}: missing local build info" - fn_script_log_error "Missing local build info" - fn_script_log_error "Set localbuild to 0" - localbuild="0" - else - fn_print_ok "Checking local build: ${remotelocation}" - fn_script_log_pass "Checking local build" - fi -} - -fn_update_remotebuild() { - # Get remote build info. - apiurl="https://papermc.io/api/v2/projects" - # Get list of projects. - remotebuildresponse=$(curl -s "${apiurl}") - # Get list of Minecraft versions for project. - remotebuildresponseproject=$(curl -s "${apiurl}/${paperproject}") - # Get latest Minecraft: Java Edition version or user specified version. - if [ "${mcversion}" == "latest" ]; then - remotebuildmcversion=$(echo "${remotebuildresponseproject}" | jq -r '.versions[-1]') - else - # Checks if user specified version exists. - remotebuildmcversion=$(echo "${remotebuildresponseproject}" | jq -r -e --arg mcversion "${mcversion}" '.versions[]|select(. == $mcversion)') - if [ -z "${remotebuildmcversion}" ]; then - # user passed version does not exist - fn_print_error_nl "Version ${mcversion} not available from ${remotelocation}" - fn_script_log_error "Version ${mcversion} not available from ${remotelocation}" - core_exit.sh - fi - fi - # Get list of paper builds for specific Minecraft: Java Edition version. - remotebuildresponsemcversion=$(curl -s "${apiurl}/paper/versions/${remotebuildmcversion}") - # Get latest paper build for specific Minecraft: Java Edition version. - remotebuildpaperversion=$(echo "${remotebuildresponsemcversion}" | jq -r '.builds[-1]') - # Get various info about the paper build. - remotebuildresponseversion=$(curl -s "${apiurl}/${paperproject}/versions/${remotebuildmcversion}/builds/${remotebuildpaperversion}") - remotebuildfilename=$(echo "${remotebuildresponseversion}" | jq -r '.downloads.application.name') - remotebuildhash=$(echo "${remotebuildresponseversion}" | jq -r '.downloads.application.sha256') - remotebuildurl="${apiurl}/${paperproject}/versions/${remotebuildmcversion}/builds/${remotebuildpaperversion}/downloads/${remotebuildfilename}" - # Combines Minecraft: Java Edition version and paper build. e.g 1.16.5-456 - remotebuildversion="${remotebuildmcversion}-${remotebuildpaperversion}" - - if [ "${firstcommandname}" != "INSTALL" ]; then - fn_print_dots "Checking remote build: ${remotelocation}" - # Checks if remotebuildversion variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then - fn_print_fail "Checking remote build: ${remotelocation}" - fn_script_log_fatal "Checking remote build" - core_exit.sh - else - fn_print_ok "Checking remote build: ${remotelocation}" - fn_script_log_pass "Checking remote build" - fi - else - # Checks if remotebuild variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then - fn_print_failure "Unable to get remote build" - fn_script_log_fatal "Unable to get remote build" - core_exit.sh - fi - fi -} - -fn_update_compare() { - fn_print_dots "Checking for update: ${remotelocation}" - if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then - fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "Update available" - echo -e "* Local build: ${red}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" - if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" - fi - if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" - fi - echo -en "\n" - fn_script_log_info "Update available" - fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" - if [ -n "${branch}" ]; then - fn_script_log_info "Branch: ${branch}" - fi - fn_script_log_info "${localbuild} > ${remotebuildversion}" - - if [ "${commandname}" == "UPDATE" ]; then - unset updateonstart - check_status.sh - # If server stopped. - if [ "${status}" == "0" ]; then - fn_update_dl - if [ "${localbuild}" == "0" ]; then - exitbypass=1 - command_start.sh - fn_firstcommand_reset - exitbypass=1 - sleep 5 - command_stop.sh - fn_firstcommand_reset - fi - # If server started. - else - fn_print_restart_warning - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - exitbypass=1 - fn_update_dl - exitbypass=1 - command_start.sh - fn_firstcommand_reset - fi - unset exitbypass - date +%s > "${lockdir}/lastupdate.lock" - alert="update" - elif [ "${commandname}" == "CHECK-UPDATE" ]; then - alert="check-update" - fi - alert.sh - else - fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "No update available" - echo -e "* Local build: ${green}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" - if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" - fi - echo -en "\n" - fn_script_log_info "No update available" - fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" - if [ -n "${branch}" ]; then - fn_script_log_info "Branch: ${branch}" - fi - if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" - fi - fi -} - -# The location where the builds are checked and downloaded. -remotelocation="papermc.io" - -if [ "${shortname}" == "pmc" ]; then - paperproject="paper" -elif [ "${shortname}" == "vpmc" ]; then - paperproject="velocity" -elif [ "${shortname}" == "wmc" ]; then - paperproject="waterfall" -fi - -if [ "${firstcommandname}" == "INSTALL" ]; then - fn_update_remotebuild - fn_update_dl -else - fn_print_dots "Checking for update" - fn_print_dots "Checking for update: ${remotelocation}" - fn_script_log_info "Checking for update: ${remotelocation}" - fn_update_localbuild - fn_update_remotebuild - fn_update_compare -fi diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh deleted file mode 100644 index 85bacb899..000000000 --- a/lgsm/functions/update_steamcmd.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash -# LinuxGSM update_steamcmd.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Handles updating using SteamCMD. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -# init steamcmd functions -core_steamcmd.sh - -# The location where the builds are checked and downloaded. -remotelocation="SteamCMD" -check.sh - -fn_print_dots "${remotelocation}" - -if [ "${forceupdate}" == "1" ]; then - # forceupdate bypasses update checks. - if [ "${status}" != "0" ]; then - fn_print_restart_warning - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - fn_dl_steamcmd - date +%s > "${lockdir}/lastupdate.lock" - exitbypass=1 - command_start.sh - fn_firstcommand_reset - else - fn_dl_steamcmd - date +%s > "${lockdir}/lastupdate.lock" - fi -else - fn_update_steamcmd_localbuild - fn_update_steamcmd_remotebuild - fn_update_steamcmd_compare -fi diff --git a/lgsm/functions/update_ts3.sh b/lgsm/functions/update_ts3.sh deleted file mode 100644 index 0f5327de2..000000000 --- a/lgsm/functions/update_ts3.sh +++ /dev/null @@ -1,181 +0,0 @@ -#!/bin/bash -# LinuxGSM command_ts3.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Handles updating of Teamspeak 3 servers. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -fn_update_dl() { - # Download and extract files to serverfiles. - fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "${remotebuildhash}" - fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}" "teamspeak3-server_linux_${ts3arch}" - fn_clear_tmp -} - -fn_update_localbuild() { - # Gets local build info. - fn_print_dots "Checking local build: ${remotelocation}" - # Uses log file to get local build. - localbuild=$(grep -Eo "TeamSpeak 3 Server ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}" "$(find ./* -name "ts3server*_0.log" 2> /dev/null | sort | tail -1)" | grep -Eo "((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}" | tail -1) - if [ -z "${localbuild}" ]; then - fn_print_error "Checking local build: ${remotelocation}: missing local build info" - fn_script_log_error "Missing local build info" - fn_script_log_error "Set localbuild to 0" - localbuild="0" - else - fn_print_ok "Checking local build: ${remotelocation}" - fn_script_log_pass "Checking local build" - fi -} - -fn_update_remotebuild() { - # Get remote build info. - apiurl="https://www.teamspeak.com/versions/server.json" - remotebuildresponse=$(curl -s "${apiurl}") - - if [ "${ts3arch}" == "amd64" ]; then - remotebuildurl=$(echo -e "${remotebuildresponse}" | jq -r '.linux.x86_64.mirrors."teamspeak.com"') - remotebuildhash=$(echo -e "${remotebuildresponse}" | jq -r '.linux.x86_64.checksum') - elif [ "${ts3arch}" == "x86" ]; then - remotebuildurl=$(echo -e "${remotebuildresponse}" | jq -r '.linux.x86.mirrors."teamspeak.com"') - remotebuildhash=$(echo -e "${remotebuildresponse}" | jq -r '.linux.x86.checksum') - fi - remotebuildfilename=$(basename "${remotebuildurl}") - remotebuildversion=$(echo -e "${remotebuildresponse}" | jq -r '.linux.x86_64.version') - - if [ "${firstcommandname}" != "INSTALL" ]; then - fn_print_dots "Checking remote build: ${remotelocation}" - # Checks if remotebuildversion variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then - fn_print_fail "Checking remote build: ${remotelocation}" - fn_script_log_fatal "Checking remote build" - core_exit.sh - else - fn_print_ok "Checking remote build: ${remotelocation}" - fn_script_log_pass "Checking remote build" - fi - else - # Checks if remotebuild variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then - fn_print_failure "Unable to get remote build" - fn_script_log_fatal "Unable to get remote build" - core_exit.sh - fi - fi -} - -fn_update_compare() { - fn_print_dots "Checking for update: ${remotelocation}" - if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then - fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "Update available" - echo -e "* Local build: ${red}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" - if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" - fi - if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" - fi - echo -en "\n" - fn_script_log_info "Update available" - fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" - if [ -n "${branch}" ]; then - fn_script_log_info "Branch: ${branch}" - fi - fn_script_log_info "${localbuild} > ${remotebuildversion}" - - if [ "${commandname}" == "UPDATE" ]; then - unset updateonstart - check_status.sh - # If server stopped. - if [ "${status}" == "0" ]; then - fn_update_dl - if [ "${localbuild}" == "0" ]; then - exitbypass=1 - command_start.sh - fn_firstcommand_reset - exitbypass=1 - sleep 5 - command_stop.sh - fn_firstcommand_reset - fi - # If server started. - else - fn_print_restart_warning - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - exitbypass=1 - fn_update_dl - exitbypass=1 - command_start.sh - fn_firstcommand_reset - fi - unset exitbypass - date +%s > "${lockdir}/lastupdate.lock" - alert="update" - elif [ "${commandname}" == "CHECK-UPDATE" ]; then - alert="check-update" - fi - alert.sh - else - fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "No update available" - echo -e "* Local build: ${green}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" - if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" - fi - echo -en "\n" - fn_script_log_info "No update available" - fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" - if [ -n "${branch}" ]; then - fn_script_log_info "Branch: ${branch}" - fi - if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" - fi - fi -} - -# Game server architecture. -info_distro.sh -if [ "${arch}" == "x86_64" ]; then - ts3arch="amd64" -elif [ "${arch}" == "i386" ] || [ "${arch}" == "i686" ]; then - ts3arch="x86" -else - fn_print_failure "Unknown or unsupported architecture: ${arch}" - fn_script_log_fatal "Unknown or unsupported architecture: ${arch}" - core_exit.sh -fi - -# The location where the builds are checked and downloaded. -remotelocation="teamspeak.com" - -if [ "${firstcommandname}" == "INSTALL" ]; then - fn_update_remotebuild - fn_update_dl -else - fn_print_dots "Checking for update" - fn_print_dots "Checking for update: ${remotelocation}" - fn_script_log_info "Checking for update: ${remotelocation}" - fn_update_localbuild - fn_update_remotebuild - fn_update_compare -fi diff --git a/lgsm/functions/update_ut99.sh b/lgsm/functions/update_ut99.sh deleted file mode 100644 index 045b29dbe..000000000 --- a/lgsm/functions/update_ut99.sh +++ /dev/null @@ -1,163 +0,0 @@ -#!/bin/bash -# LinuxGSM command_ut99.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Handles updating of Unreal Tournament 99 servers. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -fn_update_dl() { - # Download and extract files to serverfiles. - fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "nohash" - fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}" - echo "${remotebuildversion}" > "${serverfiles}/build.txt" - fn_clear_tmp -} - -fn_update_localbuild() { - # Gets local build info. - fn_print_dots "Checking local build: ${remotelocation}" - # Uses build file to get local build. - localbuild=$(head -n 1 "${serverfiles}/build.txt" 2> /dev/null) - if [ -z "${localbuild}" ]; then - fn_print_error "Checking local build: ${remotelocation}: missing local build info" - fn_script_log_error "Missing local build info" - fn_script_log_error "Set localbuild to 0" - localbuild="0" - else - fn_print_ok "Checking local build: ${remotelocation}" - fn_script_log_pass "Checking local build" - fi -} - -fn_update_remotebuild() { - # Get 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') - remotebuildurl=$(echo "${remotebuildresponse}" | jq -r '.assets[]|select(.browser_download_url | contains("Linux-amd64")) | .browser_download_url') - remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '.tag_name') - - if [ "${firstcommandname}" != "INSTALL" ]; then - fn_print_dots "Checking remote build: ${remotelocation}" - # Checks if remotebuildversion variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then - fn_print_fail "Checking remote build: ${remotelocation}" - fn_script_log_fatal "Checking remote build" - core_exit.sh - else - fn_print_ok "Checking remote build: ${remotelocation}" - fn_script_log_pass "Checking remote build" - fi - else - # Checks if remotebuild variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then - fn_print_failure "Unable to get remote build" - fn_script_log_fatal "Unable to get remote build" - core_exit.sh - fi - fi -} - -fn_update_compare() { - fn_print_dots "Checking for update: ${remotelocation}" - if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then - fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "Update available" - echo -e "* Local build: ${red}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" - if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" - fi - if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" - fi - echo -en "\n" - fn_script_log_info "Update available" - fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" - if [ -n "${branch}" ]; then - fn_script_log_info "Branch: ${branch}" - fi - fn_script_log_info "${localbuild} > ${remotebuildversion}" - - if [ "${commandname}" == "UPDATE" ]; then - unset updateonstart - check_status.sh - # If server stopped. - if [ "${status}" == "0" ]; then - fn_update_dl - if [ "${localbuild}" == "0" ]; then - exitbypass=1 - command_start.sh - fn_firstcommand_reset - exitbypass=1 - sleep 5 - command_stop.sh - fn_firstcommand_reset - fi - # If server started. - else - fn_print_restart_warning - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - exitbypass=1 - fn_update_dl - exitbypass=1 - command_start.sh - fn_firstcommand_reset - fi - unset exitbypass - date +%s > "${lockdir}/lastupdate.lock" - alert="update" - elif [ "${commandname}" == "CHECK-UPDATE" ]; then - alert="check-update" - fi - alert.sh - else - fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "No update available" - echo -e "* Local build: ${green}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" - if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" - fi - echo -en "\n" - fn_script_log_info "No update available" - fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" - if [ -n "${branch}" ]; then - fn_script_log_info "Branch: ${branch}" - fi - if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" - fi - fi -} - -# The location where the builds are checked and downloaded. -remotelocation="github.com" - -if [ "${firstcommandname}" == "INSTALL" ]; then - fn_update_remotebuild - fn_update_dl -else - fn_print_dots "Checking for update" - fn_print_dots "Checking for update: ${remotelocation}" - fn_script_log_info "Checking for update: ${remotelocation}" - fn_update_localbuild - fn_update_remotebuild - fn_update_compare -fi diff --git a/lgsm/functions/update_vintagestory.sh b/lgsm/functions/update_vintagestory.sh deleted file mode 100644 index 7307a4b77..000000000 --- a/lgsm/functions/update_vintagestory.sh +++ /dev/null @@ -1,170 +0,0 @@ -#!/bin/bash -# LinuxGSM update_vintagestory.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Handles updating of Vintage Story servers. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -fn_update_dl() { - # Download and extract files to serverfiles. - fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "${remotebuildhash}" - fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}" - fn_clear_tmp -} - -fn_update_localbuild() { - # Gets local build info. - fn_print_dots "Checking local build: ${remotelocation}" - # Uses executable to get local build. - if [ -d "${executabledir}" ]; then - cd "${executabledir}" || exit - localbuild="$(${preexecutable} ${executable} --version | sed '/^[[:space:]]*$/d')" - fi - if [ -z "${localbuild}" ]; then - fn_print_error "Checking local build: ${remotelocation}: missing local build info" - fn_script_log_error "Missing local build info" - fn_script_log_error "Set localbuild to 0" - localbuild="0" - else - fn_print_ok "Checking local build: ${remotelocation}" - fn_script_log_pass "Checking local build" - fi -} - -fn_update_remotebuild() { - # Get 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 - remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '[ to_entries[] ] | .[].key' | grep -E "\-rc|\-pre" | sort -r -V | head -1) - fi - remotebuildfilename=$(echo "${remotebuildresponse}" | jq --arg remotebuildversion "${remotebuildversion}" -r '.[$remotebuildversion].server.filename') - remotebuildurl=$(echo "${remotebuildresponse}" | jq --arg remotebuildversion "${remotebuildversion}" -r '.[$remotebuildversion].server.urls.cdn') - remotebuildhash=$(echo "${remotebuildresponse}" | jq --arg remotebuildversion "${remotebuildversion}" -r '.[$remotebuildversion].server.md5') - - if [ "${firstcommandname}" != "INSTALL" ]; then - fn_print_dots "Checking remote build: ${remotelocation}" - # Checks if remotebuildversion variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then - fn_print_fail "Checking remote build: ${remotelocation}" - fn_script_log_fatal "Checking remote build" - core_exit.sh - else - fn_print_ok "Checking remote build: ${remotelocation}" - fn_script_log_pass "Checking remote build" - fi - else - # Checks if remotebuild variable has been set. - if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then - fn_print_failure "Unable to get remote build" - fn_script_log_fatal "Unable to get remote build" - core_exit.sh - fi - fi -} - -fn_update_compare() { - fn_print_dots "Checking for update: ${remotelocation}" - if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then - fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "Update available" - echo -e "* Local build: ${red}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" - if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" - fi - if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" - fi - echo -en "\n" - fn_script_log_info "Update available" - fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" - if [ -n "${branch}" ]; then - fn_script_log_info "Branch: ${branch}" - fi - fn_script_log_info "${localbuild} > ${remotebuildversion}" - - if [ "${commandname}" == "UPDATE" ]; then - unset updateonstart - check_status.sh - # If server stopped. - if [ "${status}" == "0" ]; then - fn_update_dl - if [ "${localbuild}" == "0" ]; then - exitbypass=1 - command_start.sh - fn_firstcommand_reset - exitbypass=1 - sleep 5 - command_stop.sh - fn_firstcommand_reset - fi - # If server started. - else - fn_print_restart_warning - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - exitbypass=1 - fn_update_dl - exitbypass=1 - command_start.sh - fn_firstcommand_reset - fi - unset exitbypass - date +%s > "${lockdir}/lastupdate.lock" - alert="update" - elif [ "${commandname}" == "CHECK-UPDATE" ]; then - alert="check-update" - fi - alert.sh - else - fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "No update available" - echo -e "* Local build: ${green}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuildversion}${default}" - if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" - fi - echo -en "\n" - fn_script_log_info "No update available" - fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuildversion}" - if [ -n "${branch}" ]; then - fn_script_log_info "Branch: ${branch}" - fi - if [ -f "${rootdir}/.dev-debug" ]; then - echo -e "Remote build info" - echo -e "* apiurl: ${apiurl}" - echo -e "* remotebuildfilename: ${remotebuildfilename}" - echo -e "* remotebuildurl: ${remotebuildurl}" - echo -e "* remotebuildversion: ${remotebuildversion}" - fi - fi -} - -# The location where the builds are checked and downloaded. -remotelocation="vintagestory.at" - -if [ "${firstcommandname}" == "INSTALL" ]; then - fn_update_remotebuild - fn_update_dl -else - fn_print_dots "Checking for update" - fn_print_dots "Checking for update: ${remotelocation}" - fn_script_log_info "Checking for update: ${remotelocation}" - fn_update_localbuild - fn_update_remotebuild - fn_update_compare -fi diff --git a/lgsm/modules/command_send.sh b/lgsm/modules/command_send.sh index e3dafd693..cf6a9f08a 100644 --- a/lgsm/modules/command_send.sh +++ b/lgsm/modules/command_send.sh @@ -26,7 +26,7 @@ if [ "${status}" != "0" ]; then fi echo "" fn_print_dots "Sending command to console: \"${commandtosend}\"" - tmux -L "${socketname}" send-keys -t "${servicename}" "${commandtosend}" ENTER + tmux -L "${socketname}" send-keys -t "${sessionname}" "${commandtosend}" ENTER fn_print_ok_nl "Sending command to console: \"${commandtosend}\"" fn_script_log_pass "Command \"${commandtosend}\" sent to console" else diff --git a/lgsm/modules/core_dl.sh b/lgsm/modules/core_dl.sh index 3b2e7f117..caca0fc58 100644 --- a/lgsm/modules/core_dl.sh +++ b/lgsm/modules/core_dl.sh @@ -481,12 +481,8 @@ fn_fetch_file() { fn_fetch_file_github() { github_file_url_dir="${1}" github_file_url_name="${2}" - # For legacy versions - code can be removed at a future date - if [ "${legacymode}" == "1" ]; then - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. - elif [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then + if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" else diff --git a/lgsm/modules/core_functions.sh b/lgsm/modules/core_functions.sh deleted file mode 100644 index 09eedeb7b..000000000 --- a/lgsm/modules/core_functions.sh +++ /dev/null @@ -1,811 +0,0 @@ -#!/bin/bash -# LinuxGSM core_functions.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Defines all functions to allow download and execution of functions using fn_fetch_function. -# This function is called first before any other function. Without this file other functions will not load. - -module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -modulesversion="v23.5.3" - -# Core - -core_dl.sh() { - functionfile="${FUNCNAME[0]}" - if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then - fn_fetch_core_dl "lgsm/functions" "core_dl.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" - else - fn_bootstrap_fetch_file_github "lgsm/functions" "core_dl.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" - fi -} - -core_messages.sh() { - functionfile="${FUNCNAME[0]}" - if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then - fn_fetch_core_dl "lgsm/functions" "core_messages.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" - else - fn_bootstrap_fetch_file_github "lgsm/functions" "core_messages.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" - fi -} - -core_legacy.sh() { - functionfile="${FUNCNAME[0]}" - if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then - fn_fetch_core_dl "lgsm/functions" "core_legacy.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" - else - fn_bootstrap_fetch_file_github "lgsm/functions" "core_legacy.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" - fi -} - -core_exit.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -core_getopt.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -core_trap.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -core_steamcmd.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -core_github.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -# Commands - -command_backup.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_console.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_debug.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_details.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_sponsor.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_postdetails.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_test_alert.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_monitor.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_start.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_stop.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_validate.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_install.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_install_resources_mta.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_squad_license.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_mods_install.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_mods_update.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_mods_remove.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_fastdl.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_ts3_server_pass.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_restart.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_skeleton.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_wipe.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_send.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -# Checks - -check.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -check_config.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -check_deps.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -check_executable.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -check_glibc.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -check_ip.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -check_last_update.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -check_logs.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -check_permissions.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -check_root.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -check_status.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -check_steamcmd.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -check_system_dir.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -check_system_requirements.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -check_tmuxception.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -check_version.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -# Compress - -compress_unreal2_maps.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -compress_ut99_maps.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -# Mods - -mods_list.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -mods_core.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -# Dev - -command_dev_clear_functions.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_dev_debug.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_dev_detect_deps.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_dev_detect_glibc.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_dev_detect_ldd.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_dev_query_raw.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -# Fix - -fix.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_ark.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_av.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_arma3.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_armar.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_bt.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_bo.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_cmw.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_csgo.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_dst.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_hw.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_ins.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_kf.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_kf2.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_lo.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_mcb.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_mta.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_nmrih.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_onset.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_ro.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_rust.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_rw.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_sfc.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_st.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_steamcmd.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_terraria.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_tf2.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_ut3.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_rust.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_samp.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_sdtd.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_sof2.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_squad.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_ts3.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_ut2k4.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_ut.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_unt.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_vh.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_wurm.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fix_zmr.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -# Info - -info_distro.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -info_game.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -info_messages.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -info_stats.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -# Alert - -alert.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -alert_discord.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -alert_email.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -alert_ifttt.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -alert_pushbullet.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -alert_pushover.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -alert_gotify.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -alert_telegram.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -alert_rocketchat.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -alert_slack.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} -# Logs - -core_logs.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -# Query - -query_gamedig.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -# Update - -command_update_functions.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_update_linuxgsm.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_update.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -command_check_update.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -update_ts3.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -update_mc.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -update_mcb.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -update_pmc.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -update_mta.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -update_fctr.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -update_jk2.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -update_steamcmd.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -update_vints.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -update_ut99.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -fn_update_functions.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -# -## Installer functions -# - -fn_autoinstall() { - autoinstall=1 - command_install.sh -} - -install_complete.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_config.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_factorio_save.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_dst_token.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_eula.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_gsquery.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_gslt.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_header.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_logs.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_retry.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_server_dir.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} -install_server_files.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_stats.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_steamcmd.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_ts3.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_ts3db.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_ut2k4.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_dl_ut2k4.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -install_ut2k4_key.sh() { - functionfile="${FUNCNAME[0]}" - fn_fetch_function -} - -# Calls code required for legacy servers -core_legacy.sh - -# Creates tmp dir if missing -if [ ! -d "${tmpdir}" ]; then - mkdir -p "${tmpdir}" -fi - -# Creates lock dir if missing -if [ ! -d "${lockdir}" ]; then - mkdir -p "${lockdir}" -fi - -# Calls on-screen messages (bootstrap) -core_messages.sh - -#Calls file downloader (bootstrap) -core_dl.sh - -# Calls the global Ctrl-C trap -core_trap.sh diff --git a/lgsm/modules/core_legacy.sh b/lgsm/modules/core_legacy.sh index 7a7e554ed..cf11e3a54 100644 --- a/lgsm/modules/core_legacy.sh +++ b/lgsm/modules/core_legacy.sh @@ -7,14 +7,6 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -# This is to help the transition to v20.3.0 and above -legacy_versions_array=(v20.2.1 v20.2.0 v20.1.5 v20.1.4 v20.1.3 v20.1.2 v20.1.1 v20.1.0 v19.12.5 v19.12.4 v19.12.3 v19.12.2 v19.12.1 v19.12.0) -for legacy_version in "${legacy_versions_array[@]}"; do - if [ "${version}" == "${legacy_version}" ]; then - legacymode=1 - fi -done - if [ -z "${socketname}" ]; then socketname="${sessionname}" fi @@ -43,69 +35,6 @@ if [ -n "${autosaveinterval}" ]; then saveinterval="${autosaveinterval}" fi -if [ -z "${serverfiles}" ]; then - serverfiles="${filesdir}" -fi - -if [ -z "${logdir}" ]; then - [ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" -fi - -if [ -z "${lgsmlogdir}" ]; then - lgsmlogdir="${scriptlogdir}" -fi - -if [ -z "${lgsmlog}" ]; then - lgsmlog="${scriptlog}" -fi - -if [ -z "${lgsmlogdate}" ]; then - lgsmlogdate="${scriptlogdate}" -fi - -if [ -z "${steamcmddir}" ]; then - steamcmddir="${HOME}/.steam/steamcmd" -fi - -if [ -z "${lgsmdir}" ]; then - lgsmdir="${rootdir}/lgsm" -fi - -if [ -z "${tmpdir}" ]; then - tmpdir="${lgsmdir}/tmp" -fi - -if [ -z "${alertlog}" ]; then - alertlog="${emaillog}" -fi - -if [ -z "${servicename}" ]; then - servicename="${selfname}" -fi - -# Alternations to workshop variables. -if [ -z "${wsapikey}" ]; then - if [ "${workshopauth}" ]; then - wsapikey="${workshopauth}" - elif [ "${authkey}" ]; then - wsapikey="${authkey}" - fi -fi - -if [ -z "${wscollectionid}" ]; then - if [ "${workshopauth}" ]; then - wscollectionid="${ws_collection_id}" - elif [ "${authkey}" ]; then - wscollectionid="${workshopcollectionid}" - fi -fi - -if [ -z "${wsstartmap}" ]; then - if [ "${ws_start_map}" ]; then - wscollectionid="${ws_start_map}" - fi -fi - # Added as part of migrating functions dir to modules dir. # Will remove functions dir if files in modules dir older than 14 days functionsdir="${lgsmdir}/modules" diff --git a/linuxgsm.sh b/linuxgsm.sh index 20adc1db6..395285c7b 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -490,23 +490,6 @@ else elif grep -qE "^[[:blank:]]*preexecutable=" "${configdirserver}/_default.cfg"; then eval preexecutable="$(sed -nr 's/^ *preexecutable=(.*)$/\1/p' "${configdirserver}/_default.cfg")" fi - - # For legacy configs that still use parms= 15.03.21 - if grep -qE "^[[:blank:]]*parms=" "${configdirserver}/secrets-${selfname}.cfg"; then - eval parms="$(sed -nr 's/^ *parms=(.*)$/\1/p' "${configdirserver}/secrets-${selfname}.cfg")" - elif grep -qE "^[[:blank:]]*parms=" "${configdirserver}/${selfname}.cfg"; then - eval parms="$(sed -nr 's/^ *parms=(.*)$/\1/p' "${configdirserver}/${selfname}.cfg")" - elif grep -qE "^[[:blank:]]*parms=" "${configdirserver}/secrets-common.cfg"; then - eval parms="$(sed -nr 's/^ *parms=(.*)$/\1/p' "${configdirserver}/secrets-common.cfg")" - elif grep -qE "^[[:blank:]]*parms=" "${configdirserver}/common.cfg"; then - eval parms="$(sed -nr 's/^ *parms=(.*)$/\1/p' "${configdirserver}/common.cfg")" - elif grep -qE "^[[:blank:]]*parms=" "${configdirserver}/_default.cfg"; then - eval parms="$(sed -nr 's/^ *parms=(.*)$/\1/p' "${configdirserver}/_default.cfg")" - fi - - if [ -n "${parms}" ]; then - startparameters="${parms}" - fi } # Load the linuxgsm.sh in to tmpdir. If missing download it. From 8b0d98c887e7bee7cfce0046ae7d0600cf71f099 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 22 Oct 2023 23:24:29 +0100 Subject: [PATCH 278/374] feat: deprecate Last Oasis (#4349) The commit removes the Last Oasis game server configuration file `_default.cfg` and the corresponding module `fix_lo.sh`. These files are no longer needed as Last Oasis is being removed from the supported games list. --- .../config-lgsm/loserver/_default.cfg | 189 ------------------ lgsm/data/serverlist.csv | 1 - lgsm/modules/core_modules.sh | 5 - lgsm/modules/fix_lo.sh | 15 -- lgsm/modules/info_game.sh | 10 - lgsm/modules/info_messages.sh | 10 - 6 files changed, 230 deletions(-) delete mode 100644 lgsm/config-default/config-lgsm/loserver/_default.cfg delete mode 100644 lgsm/modules/fix_lo.sh diff --git a/lgsm/config-default/config-lgsm/loserver/_default.cfg b/lgsm/config-default/config-lgsm/loserver/_default.cfg deleted file mode 100644 index 9a2e90a47..000000000 --- a/lgsm/config-default/config-lgsm/loserver/_default.cfg +++ /dev/null @@ -1,189 +0,0 @@ -################################## -######## Default Settings ######## -################################## -# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! -# Copy settings from here and use them in either: -# common.cfg - applies settings to every instance. -# [instance].cfg - applies settings to a specific instance. - -#### Game Server Settings #### - -## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters -## https://docs.linuxgsm.com/game-servers/last-oasis -servername="LinuxGSM" -ip="0.0.0.0" -port="7777" -queryport="27015" -customerkey="" -providerkey="" -slots="100" - -## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -# For specific IP use: -OverrideConnectionAddress=${ip} -startparameters="-log -force_steamclient_link -messaging -NoLiveServer -EnableCheats -backendapiurloverride="backend.last-oasis.com" -identifier=${servername} -port=${port} -CustomerKey=${customerkey} -ProviderKey=${providerkey} -slots=${slots} -QueryPort=${queryport}" - -#### LinuxGSM Settings #### - -## LinuxGSM Stats -# Send useful stats to LinuxGSM developers. -# https://docs.linuxgsm.com/configuration/linuxgsm-stats -# (on|off) -stats="off" - -## Notification Alerts -# (on|off) - -# Display IP | https://docs.linuxgsm.com/alerts#display-ip -displayip="" - -# More info | https://docs.linuxgsm.com/alerts#more-info -postalert="off" - -# Alert on Start/Stop/Restart -statusalert="off" - -# Discord Alerts | https://docs.linuxgsm.com/alerts/discord -discordalert="off" -discordwebhook="webhook" - -# Email Alerts | https://docs.linuxgsm.com/alerts/email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify -gotifyalert="off" -gotifytoken="token" -gotifywebhook="webhook" - -# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt -iftttalert="off" -ifttttoken="accesstoken" -iftttevent="linuxgsm_alert" - -# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover -pushoveralert="off" -pushovertoken="accesstoken" -pushoveruserkey="userkey" - -# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat -rocketchatalert="off" -rocketchatwebhook="webhook" - -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - -# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram -# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". -telegramapi="api.telegram.org" -telegramalert="off" -telegramtoken="accesstoken" -telegramchatid="" -curlcustomstring="" - -## Updating | https://docs.linuxgsm.com/commands/update -updateonstart="off" - -## Backup | https://docs.linuxgsm.com/commands/backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://docs.linuxgsm.com/features/logging -consolelogging="on" -logdays="7" - -## Monitor | https://docs.linuxgsm.com/commands/monitor -# Query delay time -querydelay="1" - -## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors -ansi="on" - -#### Advanced Settings #### - -## Message Display Time | https://docs.linuxgsm.com/features/message-display-time -sleeptime="0.5" - -## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd -# Server appid -appid="920720" -steamcmdforcewindows="no" -# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch -branch="" -betapassword="" -# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server -steammaster="false" - -## Stop Mode | https://docs.linuxgsm.com/features/stop-mode -# 1: tmux kill -# 2: CTRL+c -# 3: quit -# 4: quit 120s -# 5: stop -# 6: q -# 7: exit -# 8: 7 Days to Die -# 9: GoldSrc -# 10: Avorion -# 11: end -stopmode="2" - -## Query mode -# 1: session only -# 2: gamedig (gsquery fallback) -# 3: gamedig -# 4: gsquery -# 5: tcp -querymode="1" -querytype="" - -## Console type -consoleverbose="yes" -consoleinteract="no" - -## Game Server Details -# Do not edit -gamename="Last Oasis" -engine="unreal4" -glibc="2.17" - -#### Directories #### -# Edit with care - -## Game Server Directories -systemdir="${serverfiles}/Mist" -executabledir="${systemdir}/Binaries/Linux" -executable="./MistServer-Linux-Shipping" -servercfgdir="${systemdir}/Saved/Config/LinuxServer" -servercfg="Game.ini" -servercfgdefault="Game.ini" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${lgsmdir}/backup" - -## Logging Directories -[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" -gamelogdir="${systemdir}/Saved/Logs" -lgsmlogdir="${logdir}/script" -consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${selfname}-script.log" -consolelog="${consolelogdir}/${selfname}-console.log" -alertlog="${lgsmlogdir}/${selfname}-alert.log" -postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" - -## Logs Naming -lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -## Log Parameters -logtimestamp="off" -logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 7872048c7..43b9dc426 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -63,7 +63,6 @@ kf,kfserver,Killing Floor,ubuntu-22.04 kf2,kf2server,Killing Floor 2,ubuntu-22.04 l4d,l4dserver,Left 4 Dead,ubuntu-22.04 l4d2,l4d2server,Left 4 Dead 2,ubuntu-22.04 -lo,loserver,Last Oasis,ubuntu-22.04 mc,mcserver,Minecraft,ubuntu-22.04 mcb,mcbserver,Minecraft Bedrock,ubuntu-22.04 mh,mhserver,MORDHAU,ubuntu-22.04 diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index c2b529741..3d989f346 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -396,11 +396,6 @@ fix_kf2.sh() { fn_fetch_module } -fix_lo.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - fix_mcb.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module diff --git a/lgsm/modules/fix_lo.sh b/lgsm/modules/fix_lo.sh deleted file mode 100644 index 4966afd57..000000000 --- a/lgsm/modules/fix_lo.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_lo.sh module -# Author: Daniel Gibbs -# Website: https://linuxgsm.com -# Description: Resolves various issues with Last Oasis. - -moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -appidfile=${executabledir}/steam_appid.txt -if [ ! -f "${appidfile}" ]; then - fn_print_information "adding ${appidfile} to ${gamename} server." - echo "903950" > "${appidfile}" -else - fn_print_information "${appidfile} already exists. No action to be taken." -fi diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 2d172cdd5..c31a4171f 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -1366,14 +1366,6 @@ fn_info_game_jk2() { serverversion="${serverversion:-"NOT SET"}" } -# Config Type: unknown -fn_info_game_lo() { - servername="${servername:-"NOT SET"}" - port="${port:-"0"}" - queryport="${queryport:-"0"}" - maxplayers="${slots:-"0"}" -} - # Config Type: Java properties # Comment: # or ! # Example: motd=SERVERNAME @@ -2288,8 +2280,6 @@ elif [ "${shortname}" == "kf" ]; then fn_info_game_kf elif [ "${shortname}" == "kf2" ]; then fn_info_game_kf2 -elif [ "${shortname}" == "lo" ]; then - fn_info_game_lo elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ]; then fn_info_game_mc elif [ "${shortname}" == "mcb" ]; then diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index 121341878..4bd6a3c66 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -1134,14 +1134,6 @@ fn_info_message_kf2() { } | column -s $'\t' -t } -fn_info_message_lo() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp - } | column -s $'\t' -t -} - fn_info_message_mc() { { fn_port "header" @@ -1747,8 +1739,6 @@ fn_info_message_select_engine() { fn_info_message_kf elif [ "${shortname}" == "kf2" ]; then fn_info_message_kf2 - elif [ "${shortname}" == "lo" ]; then - fn_info_message_lo elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ] || [ "${shortname}" == "wmc" ]; then fn_info_message_mc elif [ "${shortname}" == "mcb" ]; then From ab0fb4f14e4420dcaa428fa21e8d4ab9b098e8dd Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 23 Oct 2023 13:34:00 +0100 Subject: [PATCH 279/374] fix: correct fn_script_log_fail --- lgsm/modules/alert.sh | 2 +- lgsm/modules/install_complete.sh | 2 +- lgsm/modules/install_config.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/modules/alert.sh b/lgsm/modules/alert.sh index 785c7ae20..74822e94c 100644 --- a/lgsm/modules/alert.sh +++ b/lgsm/modules/alert.sh @@ -219,7 +219,7 @@ elif [ "${alert}" == "backup" ]; then fn_alert_backup else fn_print_fail_nl "Missing alert type" - fn_script_log_fatal "Missing alert type" + fn_script_log_fail "Missing alert type" core_exit.sh fi diff --git a/lgsm/modules/install_complete.sh b/lgsm/modules/install_complete.sh index 2c3cb2493..5a9873067 100644 --- a/lgsm/modules/install_complete.sh +++ b/lgsm/modules/install_complete.sh @@ -12,7 +12,7 @@ fn_messages_separator if [ "${exitcode}" == "1" ]; then echo -e "${bold}${red}Install Failed!${default}" - fn_script_log_fatal "Install Failed!" + fn_script_log_fail "Install Failed!" elif [ "${exitcode}" == "2" ]; then echo -e "${bold}${red}Install Completed with Errors!${default}}" fn_script_log_error "Install Completed with Errors!" diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index 258a7744a..a8d97e661 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -66,7 +66,7 @@ fn_default_config_local() { cp -n "${servercfgdir}/${servercfgdefault}" "${servercfgfullpath}" if [ "${exitcode}" != 0 ]; then fn_print_fail_eol - fn_script_log_fatal "copying config file [ ${servercfgdefault} ]" + fn_script_log_fail "copying config file [ ${servercfgdefault} ]" else fn_print_ok_eol fn_script_log_pass "copying config file [ ${servercfgdefault} ]" From f33bfdf47c226a1ea66f91956d0900b5c4b8b95e Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 27 Oct 2023 23:59:57 +0100 Subject: [PATCH 280/374] feat(new server): Counter Strike 2 (#4356) * cs2 * config * fix: remove lo code * config * params * source2 * game info * messages * config changes * dirs * config * refactor: refactor info message functions in alert.sh, command_details.sh, command_dev_query_raw.sh, and command_postdetails.sh - Refactored the info message functions in multiple files to have consistent naming conventions. - Renamed fn_info_message_* functions to fn_info_messages_* for clarity and consistency. - Updated function calls accordingly. * refactor: remove unnecessary code duplication in info_game.sh The commit removes duplicated code for retrieving server information from the game configuration file. Specifically, it removes redundant lines related to rconpassword, rconport, and serverpassword. This improves code readability and maintainability. * cs2 * cs2 * cs2 icon * remove lo * remove file * remove lo * update url * ignore games with no configs * remove configs from games that have non * details check fix * details check * details check * ignore systemdir check if running github actions * fix name --- .github/workflows/details-check.yml | 4 +- .../workflows/detals-check-generate-matrix.sh | 2 +- .../config-lgsm/cs2server/_default.cfg | 217 ++++++++++ .../config-lgsm/inssserver/_default.cfg | 3 - .../config-lgsm/sbotsserver/_default.cfg | 5 - lgsm/data/almalinux-8.csv | 2 +- lgsm/data/almalinux-9.csv | 2 +- lgsm/data/centos-7.csv | 2 +- lgsm/data/centos-8.csv | 2 +- lgsm/data/centos-9.csv | 2 +- lgsm/data/debian-10.csv | 2 +- lgsm/data/debian-11.csv | 2 +- lgsm/data/debian-12.csv | 2 +- lgsm/data/debian-9.csv | 2 +- lgsm/data/gameicons/cs2-icon.png | Bin 0 -> 2397 bytes lgsm/data/gameicons/lo-icon.png | Bin 2747 -> 0 bytes lgsm/data/rhel-7.csv | 2 +- lgsm/data/rhel-8.csv | 2 +- lgsm/data/rhel-9.csv | 2 +- lgsm/data/rocky-8.csv | 2 +- lgsm/data/rocky-9.csv | 2 +- lgsm/data/serverlist.csv | 1 + lgsm/data/ubuntu-16.04.csv | 2 +- lgsm/data/ubuntu-18.04.csv | 2 +- lgsm/data/ubuntu-20.04.csv | 2 +- lgsm/data/ubuntu-22.04.csv | 2 +- lgsm/data/ubuntu-23.04.csv | 2 +- lgsm/data/ubuntu-23.10.csv | 2 +- lgsm/modules/alert.sh | 10 +- lgsm/modules/check_system_dir.sh | 2 +- lgsm/modules/command_details.sh | 22 +- lgsm/modules/command_dev_query_raw.sh | 2 +- lgsm/modules/command_postdetails.sh | 22 +- lgsm/modules/command_stop.sh | 2 +- lgsm/modules/fix.sh | 4 +- lgsm/modules/info_game.sh | 22 + lgsm/modules/info_messages.sh | 402 +++++++++--------- lgsm/modules/install_config.sh | 6 + 38 files changed, 507 insertions(+), 259 deletions(-) create mode 100644 lgsm/config-default/config-lgsm/cs2server/_default.cfg create mode 100644 lgsm/data/gameicons/cs2-icon.png delete mode 100644 lgsm/data/gameicons/lo-icon.png diff --git a/.github/workflows/details-check.yml b/.github/workflows/details-check.yml index ca27ba5a3..ce9b45996 100644 --- a/.github/workflows/details-check.yml +++ b/.github/workflows/details-check.yml @@ -59,14 +59,14 @@ jobs: - name: Download config run: | - if [ -z "${{ steps.sets-servercfgname.outputs.servercfgname }}" ]; then + if [ "${{ steps.sets-servercfgname.outputs.servercfgname }}" == "" ]; then echo "This game server has no config file." else curl -f -o config "https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/main/${{ matrix.shortname }}/${{ steps.sets-servercfgname.outputs.servercfgname }}" fi - name: Display config run: | - if [ -z "${{ steps.sets-servercfgname.outputs.servercfgname }}" ]; then + if [ "${{ steps.sets-servercfgname.outputs.servercfgname }}" == "" ]; then echo "This game server has no config file." else cat config diff --git a/.github/workflows/detals-check-generate-matrix.sh b/.github/workflows/detals-check-generate-matrix.sh index 14cbb6ee7..bba9e8d5d 100755 --- a/.github/workflows/detals-check-generate-matrix.sh +++ b/.github/workflows/detals-check-generate-matrix.sh @@ -1,6 +1,6 @@ #!/bin/bash -curl "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/master/lgsm/data/serverlist.csv" | grep -v '^[[:blank:]]*$' > serverlist.csv +curl "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/${GITHUB_REF#refs/heads/}/lgsm/data/serverlist.csv" | grep -v '^[[:blank:]]*$' > serverlist.csv echo -n "{" > "shortnamearray.json" echo -n "\"include\":[" >> "shortnamearray.json" diff --git a/lgsm/config-default/config-lgsm/cs2server/_default.cfg b/lgsm/config-default/config-lgsm/cs2server/_default.cfg new file mode 100644 index 000000000..820f80379 --- /dev/null +++ b/lgsm/config-default/config-lgsm/cs2server/_default.cfg @@ -0,0 +1,217 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! +# Copy settings from here and use them in either: +# common.cfg - applies settings to every instance. +# [instance].cfg - applies settings to a specific instance. + +#### Game Server Settings #### + +## SteamCMD Login | https://docs.linuxgsm.com/steamcmd#steamcmd-login +steamuser="username" +steampass='password' + +## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters +# https://docs.linuxgsm.com/game-servers/counter-strike-2 +# [Game Modes] gametype gamemode gamemodeflags skirmishid mapgroup (you can mix these across all Game Modes except Danger Zone, but use only one) +# Arms Race 1 0 0 0 mg_armsrace +# Boom! Headshot! 1 2 0 6 mg_skirmish_headshots +# Classic Casual 0 0 0 0 mg_casualsigma, mg_casualdelta +# Classic Competitive (Default) 0 1 0 0 mg_active, mg_reserves, mg_hostage, mg_de_dust2, ... +# Classic Competitive (Short Match) 0 1 32 0 mg_active, mg_reserves, mg_hostage, mg_de_dust2, ... +# Danger Zone 6 0 0 0 mg_dz_blacksite (map: dz_blacksite), mg_dz_sirocco (map: dz_sirocco) +# Deathmatch (Default) 1 2 0 0 mg_deathmatch +# Deathmatch (Free For All) 1 2 32 0 mg_deathmatch +# Deathmatch (Team vs Team) 1 2 4 0 mg_deathmatch +# Demolition 1 1 0 0 mg_demolition +# Flying Scoutsman 0 0 0 3 mg_skirmish_flyingscoutsman +# Hunter-Gatherers 1 2 0 7 mg_skirmish_huntergatherers +# Retakes 0 0 0 12 mg_skirmish_retakes +# Stab Stab Zap 0 0 0 1 mg_skirmish_stabstabzap +# Trigger Discipline 0 0 0 4 mg_skirmish_triggerdiscipline +# Wingman 0 2 0 0 mg_de_prime, mg_de_blagai, mg_de_vertigo, mg_de_inferno, mg_de_overpass, mg_de_cbble, mg_de_train, mg_de_shortnuke, mg_de_shortdust, mg_de_lake +gametype="0" +gamemode="1" +gamemodeflags="0" +skirmishid="0" +mapgroup="mg_active" +ip="0.0.0.0" +port="27015" +defaultmap="de_dust2" +maxplayers="16" +tickrate="64" + +## Game Server Login Token (GSLT): Required +# GSLT is required for running a public server. +# More info: https://docs.linuxgsm.com/steamcmd/gslt +gslt="" + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="-dedicated +sv_setsteamaccount ${gslt} +map ${defaultmap} +game_type 0 +game_mode 1 +sv_logfile 1 -serverlogging +exec ${selfname}.cfg" + +#### LinuxGSM Settings #### + +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + +## Notification Alerts +# (on|off) + +# Display IP | https://docs.linuxgsm.com/alerts#display-ip +displayip="" + +# More info | https://docs.linuxgsm.com/alerts#more-info +postalert="off" + +# Alert on Start/Stop/Restart +statusalert="off" + +# Discord Alerts | https://docs.linuxgsm.com/alerts/discord +discordalert="off" +discordwebhook="webhook" + +# Email Alerts | https://docs.linuxgsm.com/alerts/email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + +# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover +pushoveralert="off" +pushovertoken="accesstoken" +pushoveruserkey="userkey" + +# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat +rocketchatalert="off" +rocketchatwebhook="webhook" + +# Slack Alerts | https://docs.linuxgsm.com/alerts/slack +slackalert="off" +slackwebhook="webhook" + +# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram +# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +telegramapi="api.telegram.org" +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +curlcustomstring="" + +## Updating | https://docs.linuxgsm.com/commands/update +updateonstart="off" + +## Backup | https://docs.linuxgsm.com/commands/backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://docs.linuxgsm.com/features/logging +consolelogging="on" +logdays="7" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="1" + +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors +ansi="on" + +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time +sleeptime="0.5" + +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd +# Server appid +appid="730" +steamcmdforcewindows="no" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +betapassword="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="true" + +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode +# 1: tmux kill +# 2: CTRL+c +# 3: quit +# 4: quit 120s +# 5: stop +# 6: q +# 7: exit +# 8: 7 Days to Die +# 9: GoldSrc +# 10: Avorion +# 11: end +stopmode="9" + +## Query mode +# 1: session only +# 2: gamedig (gsquery fallback) +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Console type +consoleverbose="yes" +consoleinteract="yes" + +## Game Server Details +# Do not edit +gamename="Counter-Strike 2" +engine="source2" +glibc="2.31" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}/game/csgo" +executabledir="${serverfiles}/game/bin/linuxsteamrt64" +executable="./cs2" +servercfgdir="${systemdir}/cfg" +servercfg="${selfname}.cfg" +servercfgdefault="server.cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/inssserver/_default.cfg b/lgsm/config-default/config-lgsm/inssserver/_default.cfg index 9c23bffa0..13addae47 100644 --- a/lgsm/config-default/config-lgsm/inssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/inssserver/_default.cfg @@ -168,9 +168,6 @@ glibc="2.17" systemdir="${serverfiles}/Insurgency" executabledir="${systemdir}/Binaries/Linux" executable="./InsurgencyServer-Linux-Shipping" -servercfgdir="${systemdir}/Saved/Config/LinuxServer" -servercfg="Game.ini" -servercfgdefault="Game.ini" ## Backup Directory backupdir="${lgsmdir}/backup" diff --git a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg index a5b1aa9a8..ef33b7f9a 100644 --- a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg @@ -157,11 +157,6 @@ glibc="2.17" systemdir="${serverfiles}" executabledir="${systemdir}/blank1/Binaries/Linux" executable="./blank1Server-Linux-Shipping" -servercfgdir="${systemdir}/blank1/Saved/Config/LinuxServer" -servercfg="Game.ini" -servercfgdefault="Game.ini" -servercfgfullpath="${servercfgdir}/${servercfg}" - ## Backup Directory backupdir="${lgsmdir}/backup" diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index ac4b7c36f..4142c3c82 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -29,6 +29,7 @@ coduo,compat-libstdc++-33.i686 codwaw col cs +cs2 cscz csgo css,ncurses-libs.i686 @@ -64,7 +65,6 @@ kf kf2 l4d l4d2 -lo mc,java-17-openjdk mcb,libnsl mh diff --git a/lgsm/data/almalinux-9.csv b/lgsm/data/almalinux-9.csv index 124322b62..0e9ff15e2 100644 --- a/lgsm/data/almalinux-9.csv +++ b/lgsm/data/almalinux-9.csv @@ -29,6 +29,7 @@ coduo,compat-libstdc++-33.i686 codwaw col cs +cs2 cscz csgo css,ncurses-libs.i686 @@ -64,7 +65,6 @@ kf kf2 l4d l4d2 -lo mc,java-17-openjdk mcb,libnsl mh diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index 4c256491d..111bd9afa 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -29,6 +29,7 @@ coduo,compat-libstdc++-33.i686 codwaw col cs +cs2 cscz csgo css,ncurses-libs.i686 @@ -64,7 +65,6 @@ kf kf2 l4d l4d2 -lo mc,java-11-openjdk mcb,libnsl mh diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index ac4b7c36f..4142c3c82 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -29,6 +29,7 @@ coduo,compat-libstdc++-33.i686 codwaw col cs +cs2 cscz csgo css,ncurses-libs.i686 @@ -64,7 +65,6 @@ kf kf2 l4d l4d2 -lo mc,java-17-openjdk mcb,libnsl mh diff --git a/lgsm/data/centos-9.csv b/lgsm/data/centos-9.csv index 124322b62..0e9ff15e2 100644 --- a/lgsm/data/centos-9.csv +++ b/lgsm/data/centos-9.csv @@ -29,6 +29,7 @@ coduo,compat-libstdc++-33.i686 codwaw col cs +cs2 cscz csgo css,ncurses-libs.i686 @@ -64,7 +65,6 @@ kf kf2 l4d l4d2 -lo mc,java-17-openjdk mcb,libnsl mh diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index 4b1c94518..0e9d67d03 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -29,6 +29,7 @@ coduo,libstdc++5:i386 codwaw col cs +cs2 cscz csgo css,libtinfo5:i386 @@ -64,7 +65,6 @@ kf kf2 l4d l4d2 -lo mc,openjdk-11-jre mcb mh diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index 9ab997eaa..9a458349e 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -29,6 +29,7 @@ coduo,libstdc++5:i386 codwaw col cs +cs2 cscz csgo css,libtinfo5:i386 @@ -64,7 +65,6 @@ kf kf2 l4d l4d2 -lo mc,openjdk-17-jre mcb mh diff --git a/lgsm/data/debian-12.csv b/lgsm/data/debian-12.csv index ed35f9e41..d0e56cf46 100644 --- a/lgsm/data/debian-12.csv +++ b/lgsm/data/debian-12.csv @@ -29,6 +29,7 @@ coduo,libstdc++5:i386 codwaw col cs +cs2 cscz csgo css,libtinfo5:i386 @@ -64,7 +65,6 @@ kf kf2 l4d l4d2 -lo mc,openjdk-17-jre mcb mh diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index e3143955f..c8aceef1b 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -29,6 +29,7 @@ coduo,libstdc++5:i386 codwaw col cs +cs2 cscz csgo css,libtinfo5:i386 @@ -64,7 +65,6 @@ kf kf2 l4d l4d2 -lo mc,openjdk-8-jre mcb mh diff --git a/lgsm/data/gameicons/cs2-icon.png b/lgsm/data/gameicons/cs2-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3cda210bb4f7e6fc29c4af21e013648f359b5664 GIT binary patch literal 2397 zcmV-j38MCiP)004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00006 zVoOIv0RI600RN!9r;`8x010qNS#tmY4s-wj4s-!)B(v5400>`6L_t(Y$5mEauU%CY z{>GSd&2`yp?|tsq(o<=r)FLPmjHpE61@OrS5=H$7YT_U8$v26SC<&MtU(p9mNH8TB z6RF&)h!mkfFO>GQ=hAb|K4-7J)?RDP%kbfxwqayEjHfZj?fbq-{CMh~AGm1#)az&e^ukO3IQ`${g_E0GO=2cTrHx|4 z3{MT<(}bI*biUP^HG4oJP=Jt7004mDvpn-v14Y8dN@sTdSbpaTs0hHfAG&vG?%35& ze}4IsPqWT^C)3WiS;v%RA)#%WF^g$inA;3puYE01#FJ1?T-BaH+ak%e}Sj zv}mT0%tDMfXyEgQv-|Hkxj564c6W2_V}!jM8yB*~t5CCV7H8+WNq01;67FgCIYKPt zK>-971^{^HOHrwZZuGRum&6=Ho4~s$MPsqPIw*FpwBz;IM8=qa-O0sXQLax-^!vR# zKK|&VH0dr(&(>8<_K$Z85Qv35xYXo0D29a@SHWzT%e|$C`bQr|?>Mq!K(}pc)9Cu;}|UcI`mRnVS-un+7Q3{e~aVrzq#T=kav zhwj7DgP?i11S&Ea5NtInW~L_v@PG|iUEB1ctfjm&wXuO`fAia7&t>Ukx6{=G2NF;a z3PBhk2q0Xy#>dnB#e1=QA9$`Vqu3-wEG<(MXPvYx5XXSV%YS|M>0dq5SP?|!sO|OV zhr6NMU2MiklAJ*es14*G%%UhLfFY?ecT{!`=@F!dKt1ksVYqEAnP@aBLC88Fg&??m zd84f0ee8T3CH-+7^4?Tytx)jdbl`$@>>UTMjENO7d>bflWpQccTR8kxguLY_5E=_o z()gm&Gahh))`BA(K6;m^*ozWSAO-~|6(T0hRvO(%X_$=8g|#MjHaIIznTfl;iIs04 zU1_;niE|#Ymn<;?-l@h!aT4R%=U-Yma`M!vS9LsB)eVFL;kFS#K?`{xXdwh52*i8E zF6v?Si!evwdR9kp91PrxFaCS4IJ3Pyo}OLyApimdPyqHF z05qE{fMFf`0Ii4s6Cvwk;t2Fy;D{LlFd!mLLz9z-|NNIdURfSj zt=y{mvw?Q#Qh@SK34xge4O0c4r~=YRGzhT1(L$Lv9(ewDe{hJ3s-0b02ogE(_loO6 zP)gk@{2;k70Bv1L5)8&r0&(I)&8h+wZ5umShE|B66Ri+%=8f}b-h8i<&W_5~L_VMu zu)u=^Ob6M80j8i?0>JD-56DOn(8551;4MU?^^2#8rxz~%EB&;0s%*CxKr z<7lcXLlWmA((7kQ!URjO1WyPm>|cCLA?7s1h9f8eTG+-)qVuEu`TKyx0ZJSrluhu2 zKv-K_V=}>05_cviW}2oIkKu4smE(iS3s^vM5U_yr#zsvukSfe|$8loKQX4&xFMTKQ zOmIk;G(v5-BrLDYf8~LD+EC~?|$O3N1A46A`a3r zlXH%UoDBd$G=M-50`^ae0>envjC}37$yDG@ODUWJV59|htLy*Tx%?V-KIkP4(1_rN zKYDUuZnCa+yLsx`x~{8Enp^9!Pn2MQ0SG}@guqbFB*xnin_g)*yT^5&R7_SIYJG6KZ`ufW3bG(%WIUwU4Kn8N`VS!4nBHi-`9gLIBIY zn$T_MBumFOxOmb`ADcb-D6%C`1KP#rSwH-w8*@?Y#U0()Au}O>8RtIS-Pzg}`0=Q; z*7iENZT+o^KTAnqC~iYEXnQj!AAy>I%77BZrRu^PvELb$d$Y?cTV=g;88`nspEUxAeSp)Qbm|1m64E}XLA8O^|JlLST-!*?-nijxK3+Hu ziF9NJJ9z!|x7OCTiehBajF~;WF$T2Hr~5C-?G8#SfqD~*_d_oN7GYhkoxO4KT~+U~ zt3w!DqJ=xZhN%;95g4cc`OfD0@N-A*j&v$PMNtG`Jg$HMINFE7O|~FmwvtdX-Cg_w zq8>1`8}ARUzvs$pd8Q%~jiA`1{T0|8K6W);c;UsOa71xqQMWb_6Oq<@Q)=X96Z@C| zBbx0_97bmr5DYGsSI*eo3lmujTOqiVb*eM;7HgX#oqYeJjrENp&u4CI4zrdXRRzEU;6UWbI<+qCqMmJmUR>xCT)yy&INHd^%5+%b^sC(@P9LN zm_c%>w08gi03~!qSaf7zbY(hYa%Ew3WdJfTGBYhPFfB4SR53X^GdVgmF)J`IIxsLK z7CT)4001R)MObuXVRU6WZEs|0W_bWIFfubOF)%GMH&ih>Ix{&sG%+hMFgh?WRZD~6 P00000NkvXXu0mjfr_4_L literal 0 HcmV?d00001 diff --git a/lgsm/data/gameicons/lo-icon.png b/lgsm/data/gameicons/lo-icon.png deleted file mode 100644 index 17aa10b3176c55b836423d2df7a426763b75483d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2747 zcmZ{mX*kpi8^-?)vTJ0`u}n2+WUN`o-pG)>F+|A8klnFQh!G)6WI4%}YO-cuvKE@b zG?}yz6*Bg1vX5mr`uKi$ujjg-`?~J?`F($qtu0M>xx}~t0N^!6A#INx@<$w?<9#5y z^8DCXJq;}k0if<7_kkPRpYj&U)&c1@G%N-B>Lq#hd}0cHUJB~?)BNi_x}msh-@$^r92w?u7t z#IR1UbANbsTVkd*|H_qtv){F-6dnqNVqh+rl#~?D3Z)kYBSQv(GXR8_CBfSMq)i-$ zbz+le%BOpD=dh+vCAh6n{twgl3Jkde1_zW+@E6l{!FX^i5;@Ki3!XY)HD5L{(^BLm zYCa=FL{H%@o6KZu-h_rMGk$RI=MdxaUsf60DV2D-Ux9c~r~47-s34Ba6JSG#8QwPb z<`siX2VscuN*W)`XoOXm*&Q+a>79>&2Xl(p9|rShg|mNKi;Wt5%YyLeLmD7^wAe2Y z&==SspmSztoZc%^{?u%3ly83qm5Zi}SgAp2FP0xj{PZxT*9vVeCbQ z3cXKVn$p6AFm6Sh|IT3+926B`m>;WUmDQ*kW?6ue= z_4FnzZiKjUBZp?wLU>(8+EUZ7G`A9>zR9r9o`2^?IJpJZd>xoLwtn%hR~UngXE5r> z-`C6$*Buom)+F0EeoCnM*;@&vYsBx^J#`=H6>LMiJM1i6(kxPA5DEB@P7 zU6khSD5hd>sbsZ&&?(pb=5C1?40|*o^b2R)uLsXP5H+yPJG<}zwTFCz9$vNSyJ?Zr zX;Qhi>cYZRgu_hwP*;s5@!8A4(WBjxgNcCqoar@tmm6rOY%dUWY^tjp>5S%%D5twq zUk}kSZD!dJyFiJAa!09e9=3iHZHGU&lGR-rRY#*EeZJ2;m*vCk#E_z940W?6cMhfd z>nl!+^%Zh(X?VdmB_nUIPj)px<96X2;fFa)0O|hUjZ-~Z&9t*F@VUyCn z4!=Ixlf`Y44|HM{98&5chyKpx>)B9Hqu17RPel!^jtdp(e2rnEw?6s}VDj~} zojNWxb9)Mr+FZZ2$~k?`O?@<$v6?1%cbn1@Zk3~&9PHgEMN7Dfr9*X?SXkTzl8aV- z)`p+Cqlr}j^nKdH@#^Y!5>NW*T#?vBjOXTi|IPEgTUXlb_CxZG0$;tx$%q@fvlxsz zRX%;yVAGKCBoQ6D+^$y^_lu;ePwFA00X`u%q8!(*PhIqXeE8cXrW@nqckpnhT7O5N z%v&$M=_B~skVML=0aU(^zMmyOF8>;r66LVJSyahoGi zrV#a#c1)Y-nI>-6Hmbk#cwpLy{_gml3HuPyTA?(iYqt4l4q_XA&Qky8cY z`j@An0P@RcePv_ledq77a9GQrWtr8 zR)QzLP+f7kt-#J+0;45zL<=i4;E2u7{V{Z&mSyrtF$x|zw^i3~-?fEWD$4i$d5Tln z7e)`o`oanPCNdvfmLeJB-&jih21VI&!vmHAio<5l%=GN>2 z{>!!PfxbOz*KC}1I=d>J2^XL|2x3x1!Yz&%nLQ_O@LrM|FakeI49aanK z_t(C56~@n>6nh5Db`H2RH!7e4;n<$+95K3Y#_dJpdrjeOfGqlT9azNdPZXwvr%RLt z_2_Qb@MJJ3O_;q}zB;*n8kHu_qEamDXn*EfYWcQ%a-oTl4;+-FcM@C{`khzHP6XcD z3@6eia`X}X`mf*YO?zf5I)B-a9u!3sYuF|_`oN?C$TRSiNaLBOn|2nYwy{UI+yjSI zBEQDh%hf|tqlK_mIuY9+H7?ZQGMxP!p`|D-4{mYOYr$dlsZDh*&Gvl9R^ z`<++OoH+$)BnOMXC2Vw{Z$|l%)+2uK`S_8O4l#BJad!*BYTpXN9vh&dq@oH}R)Q<5 xqm?zZm9(@~)h;S2X)7rqy_+}w2k;AU_wvB~e?U!x&*~TeOpPs()kZht{sWEfB<}zK diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index ac272c917..9125bd093 100644 --- a/lgsm/data/rhel-7.csv +++ b/lgsm/data/rhel-7.csv @@ -29,6 +29,7 @@ coduo,compat-libstdc++-33.i686 codwaw col cs +cs2 cscz csgo css,ncurses-libs.i686 @@ -64,7 +65,6 @@ kf kf2 l4d l4d2 -lo mc,java-11-openjdk mcb,libnsl mh diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index ac4b7c36f..4142c3c82 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -29,6 +29,7 @@ coduo,compat-libstdc++-33.i686 codwaw col cs +cs2 cscz csgo css,ncurses-libs.i686 @@ -64,7 +65,6 @@ kf kf2 l4d l4d2 -lo mc,java-17-openjdk mcb,libnsl mh diff --git a/lgsm/data/rhel-9.csv b/lgsm/data/rhel-9.csv index 124322b62..0e9ff15e2 100644 --- a/lgsm/data/rhel-9.csv +++ b/lgsm/data/rhel-9.csv @@ -29,6 +29,7 @@ coduo,compat-libstdc++-33.i686 codwaw col cs +cs2 cscz csgo css,ncurses-libs.i686 @@ -64,7 +65,6 @@ kf kf2 l4d l4d2 -lo mc,java-17-openjdk mcb,libnsl mh diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index ac4b7c36f..4142c3c82 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -29,6 +29,7 @@ coduo,compat-libstdc++-33.i686 codwaw col cs +cs2 cscz csgo css,ncurses-libs.i686 @@ -64,7 +65,6 @@ kf kf2 l4d l4d2 -lo mc,java-17-openjdk mcb,libnsl mh diff --git a/lgsm/data/rocky-9.csv b/lgsm/data/rocky-9.csv index 124322b62..0e9ff15e2 100644 --- a/lgsm/data/rocky-9.csv +++ b/lgsm/data/rocky-9.csv @@ -29,6 +29,7 @@ coduo,compat-libstdc++-33.i686 codwaw col cs +cs2 cscz csgo css,ncurses-libs.i686 @@ -64,7 +65,6 @@ kf kf2 l4d l4d2 -lo mc,java-17-openjdk mcb,libnsl mh diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 43b9dc426..094731373 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -28,6 +28,7 @@ coduo,coduoserver,Call of Duty: United Offensive,ubuntu-22.04 codwaw,codwawserver,Call of Duty: World at War,ubuntu-22.04 col,colserver,Colony Survival,ubuntu-22.04 cs,csserver,Counter-Strike 1.6,ubuntu-22.04 +cs2,cs2server,Counter-Strike 2,ubuntu-22.04 cscz,csczserver,Counter-Strike: Condition Zero,ubuntu-22.04 csgo,csgoserver,Counter-Strike: Global Offensive,ubuntu-22.04 css,cssserver,Counter-Strike: Source,ubuntu-22.04 diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index fd1cd8460..37fc3114b 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -29,6 +29,7 @@ coduo,libstdc++5:i386 codwaw col cs +cs2 cscz csgo css,libtinfo5:i386 @@ -64,7 +65,6 @@ kf kf2 l4d l4d2 -lo mc,openjdk-8-jre mcb mh diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index 4b1c94518..0e9d67d03 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -29,6 +29,7 @@ coduo,libstdc++5:i386 codwaw col cs +cs2 cscz csgo css,libtinfo5:i386 @@ -64,7 +65,6 @@ kf kf2 l4d l4d2 -lo mc,openjdk-11-jre mcb mh diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index f50fb4c83..35d284786 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -29,6 +29,7 @@ coduo,libstdc++5:i386 codwaw col cs +cs2 cscz csgo css,libtinfo5:i386 @@ -64,7 +65,6 @@ kf kf2 l4d l4d2 -lo mc,openjdk-17-jre mcb mh diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index 8526a176b..1f57e9613 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -29,6 +29,7 @@ coduo,libstdc++5:i386 codwaw col cs +cs2 cscz csgo css,libtinfo5:i386 @@ -64,7 +65,6 @@ kf kf2 l4d l4d2 -lo mc,openjdk-17-jre mcb mh diff --git a/lgsm/data/ubuntu-23.04.csv b/lgsm/data/ubuntu-23.04.csv index 1b59e7431..dbfe82f9e 100644 --- a/lgsm/data/ubuntu-23.04.csv +++ b/lgsm/data/ubuntu-23.04.csv @@ -29,6 +29,7 @@ coduo,libstdc++5:i386 codwaw col cs +cs2 cscz csgo css,libtinfo5:i386 @@ -64,7 +65,6 @@ kf kf2 l4d l4d2 -lo mc,openjdk-17-jre mcb mh diff --git a/lgsm/data/ubuntu-23.10.csv b/lgsm/data/ubuntu-23.10.csv index 1b59e7431..dbfe82f9e 100644 --- a/lgsm/data/ubuntu-23.10.csv +++ b/lgsm/data/ubuntu-23.10.csv @@ -29,6 +29,7 @@ coduo,libstdc++5:i386 codwaw col cs +cs2 cscz csgo css,libtinfo5:i386 @@ -64,7 +65,6 @@ kf kf2 l4d l4d2 -lo mc,openjdk-17-jre mcb mh diff --git a/lgsm/modules/alert.sh b/lgsm/modules/alert.sh index 74822e94c..4a34207e9 100644 --- a/lgsm/modules/alert.sh +++ b/lgsm/modules/alert.sh @@ -18,11 +18,11 @@ fn_alert_log() { fi { - fn_info_message_head - fn_info_message_distro - fn_info_message_server_resource - fn_info_message_gameserver_resource - fn_info_message_gameserver + fn_info_messages_head + fn_info_messages_distro + fn_info_messages_server_resource + 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 } diff --git a/lgsm/modules/check_system_dir.sh b/lgsm/modules/check_system_dir.sh index 01c643748..2f57511fb 100644 --- a/lgsm/modules/check_system_dir.sh +++ b/lgsm/modules/check_system_dir.sh @@ -15,7 +15,7 @@ if [ ! -d "${serverfiles}" ]; then core_exit.sh fi -if [ ! -d "${systemdir}" ]; then +if [ ! -d "${systemdir}" ] && [ -z "${CI}" ]; then fn_print_fail_nl "Cannot access ${systemdir}: No such directory" if [ -d "${lgsmlogdir}" ]; then fn_script_log_fail "Cannot access ${systemdir}: No such directory." diff --git a/lgsm/modules/command_details.sh b/lgsm/modules/command_details.sh index d180b3b18..ad55b1241 100644 --- a/lgsm/modules/command_details.sh +++ b/lgsm/modules/command_details.sh @@ -23,20 +23,20 @@ if [ "${querymode}" == "2" ] || [ "${querymode}" == "3" ]; then fi done fi -fn_info_message_distro -fn_info_message_server_resource -fn_info_message_gameserver_resource -fn_info_message_gameserver -fn_info_message_script -fn_info_message_backup +fn_info_messages_distro +fn_info_messages_server_resource +fn_info_messages_gameserver_resource +fn_info_messages_gameserver +fn_info_messages_script +fn_info_messages_backup # Some game servers do not have parms. if [ "${shortname}" != "jc2" ] && [ "${shortname}" != "dst" ] && [ "${shortname}" != "pz" ] && [ "${engine}" != "renderware" ]; then - fn_info_message_commandlineparms + fn_info_messages_commandlineparms fi -fn_info_message_ports_edit -fn_info_message_ports -fn_info_message_select_engine -fn_info_message_statusbottom +fn_info_messages_ports_edit +fn_info_messages_ports +fn_info_messages_select_engine +fn_info_messages_statusbottom exitcode=0 core_exit.sh diff --git a/lgsm/modules/command_dev_query_raw.sh b/lgsm/modules/command_dev_query_raw.sh index cf9e14858..50c07fd7b 100644 --- a/lgsm/modules/command_dev_query_raw.sh +++ b/lgsm/modules/command_dev_query_raw.sh @@ -185,7 +185,7 @@ fn_messages_separator echo -e "" echo -e "${lightgreen}SS Output${default}" fn_messages_separator -fn_info_message_ports +fn_info_messages_ports eval "${portcommand}" echo -e "" echo -e "${lightgreen}Query Port - Raw Output${default}" diff --git a/lgsm/modules/command_postdetails.sh b/lgsm/modules/command_postdetails.sh index 736c9ec27..3bfed78ed 100644 --- a/lgsm/modules/command_postdetails.sh +++ b/lgsm/modules/command_postdetails.sh @@ -42,20 +42,20 @@ else done touch "${postdetailslog}" || fn_bad_postdetailslog { - fn_info_message_distro - fn_info_message_server_resource - fn_info_message_gameserver_resource - fn_info_message_gameserver - fn_info_message_script - fn_info_message_backup + fn_info_messages_distro + fn_info_messages_server_resource + fn_info_messages_gameserver_resource + fn_info_messages_gameserver + fn_info_messages_script + fn_info_messages_backup # Some game servers do not have parms. if [ "${shortname}" != "jc2" ] && [ "${shortname}" != "jc3" ] && [ "${shortname}" != "dst" ] && [ "${shortname}" != "pz" ] && [ "${engine}" != "renderware" ]; then - fn_info_message_commandlineparms + fn_info_messages_commandlineparms fi - fn_info_message_ports_edit - fn_info_message_ports - fn_info_message_select_engine - fn_info_message_statusbottom + fn_info_messages_ports_edit + fn_info_messages_ports + fn_info_messages_select_engine + fn_info_messages_statusbottom } | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" | tee -a "${postdetailslog}" > /dev/null 2>&1 fi diff --git a/lgsm/modules/command_stop.sh b/lgsm/modules/command_stop.sh index 3e503a4f5..3d534317a 100644 --- a/lgsm/modules/command_stop.sh +++ b/lgsm/modules/command_stop.sh @@ -14,7 +14,7 @@ fn_firstcommand_set fn_stop_graceful_ctrlc() { fn_print_dots "Graceful: CTRL+c" fn_script_log_info "Graceful: CTRL+c" - # Sends quit. + # 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. for seconds in {1..30}; do diff --git a/lgsm/modules/fix.sh b/lgsm/modules/fix.sh index 9a4f5b779..2f8b5442a 100644 --- a/lgsm/modules/fix.sh +++ b/lgsm/modules/fix.sh @@ -53,12 +53,12 @@ fn_apply_fix() { } apply_pre_start_fix=(arma3 armar ark av bt bo csgo cmw dst hw ins nmrih onset pvr rust rw sdtd sfc sof2 squad st tf2 terraria ts3 mcb mta unt vh wurm zmr) -apply_post_install_fix=(av kf kf2 lo ro samp ut2k4 ut ut3) +apply_post_install_fix=(av kf kf2 ro samp ut2k4 ut ut3) # validate registered fixes for safe development for fix in "${apply_pre_start_fix[@]}" "${apply_post_install_fix[@]}"; do if ! fn_exists_fix "${fix}"; then - fn_print_fail_nl "fix_${fix}.sh is registered but doesn't exist. Typo or did you miss to modify core_functions.sh?" + fn_print_fail_nl "fix_${fix}.sh is registered but doesn't exist. Typo or did you miss to modify core_modules.sh?" exitcode=1 core_exit.sh fi diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index c31a4171f..fd4598166 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -1132,6 +1132,26 @@ fn_info_game_col() { steamport="${steamport:-"0"}" } +# Config Type: Valve KeyValues +# Comment: // +# Example: hostname "SERVERNAME" +# Filetype: cfg +fn_info_game_cs2() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_valve_keyvalues "servername" "hostname" + fi + # Steamport can be between 26901-26910 and is normally automatically set. + # Some servers might support -steamport parameter to set + if [ "${steamport}" == "0" ] || [ -v "${steamport}" ]; then + steamport="$(echo "${ssinfo}" | grep "${srcdslinuxpid}" | awk '{print $5}' | grep ":269" | cut -d ":" -f2)" + fi + defaultmap="${defaultmap:-"NOT SET"}" + maxplayers="${maxplayers:-"0"}" + port="${port:-"0"}" + queryport="${port:-"0"}" + servername="${servername:-"NOT SET"}" +} + # Config Type: ini # Parameters: true # Comment: ; or # @@ -2252,6 +2272,8 @@ elif [ "${shortname}" == "codwaw" ]; then fn_info_game_codwaw elif [ "${shortname}" == "col" ]; then fn_info_game_col +elif [ "${shortname}" == "cs2" ]; then + fn_info_game_cs2 elif [ "${shortname}" == "ct" ]; then fn_info_game_ct elif [ "${shortname}" == "dayz" ]; then diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index 4bd6a3c66..0e57690bf 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Removes the passwords form all but details. -fn_info_message_password_strip() { +fn_info_messages_password_strip() { if [ "${commandname}" != "DETAILS" ]; then if [ "${serverpassword}" ]; then serverpassword="********" @@ -46,7 +46,7 @@ fn_info_message_password_strip() { # Alert Summary # used with alertlog -fn_info_message_head() { +fn_info_messages_head() { echo -e "" echo -e "LinuxGSM Alert Summary" fn_messages_separator @@ -70,7 +70,7 @@ fn_info_message_head() { echo -e "$(date)" } -fn_info_message_distro() { +fn_info_messages_distro() { # # Distro Details # ================================= @@ -103,7 +103,7 @@ fn_info_message_distro() { } | column -s $'\t' -t } -fn_info_message_server_resource() { +fn_info_messages_server_resource() { # # Server Resource # ================================= @@ -169,7 +169,7 @@ fn_info_message_server_resource() { } | column -s $'\t' -t } -fn_info_message_gameserver_resource() { +fn_info_messages_gameserver_resource() { # # Game Server Resource Usage # ================================= @@ -212,7 +212,7 @@ fn_info_message_gameserver_resource() { } | column -s $'\t' -t } -fn_info_message_gameserver() { +fn_info_messages_gameserver() { # # Counter-Strike: Global Offensive Server Details # ================================= @@ -232,7 +232,7 @@ fn_info_message_gameserver() { echo -e "" echo -e "${bold}${lightgreen}${gamename} Server Details${default}" - fn_info_message_password_strip + fn_info_messages_password_strip fn_messages_separator { # Server name @@ -502,7 +502,7 @@ fn_info_message_gameserver() { echo -e "" } -fn_info_message_script() { +fn_info_messages_script() { # csgoserver Script Details # ================================= # Script name: csgoserver @@ -601,7 +601,7 @@ fn_info_message_script() { } | column -s $'\t' -t } -fn_info_message_backup() { +fn_info_messages_backup() { # # Backups # ================================= @@ -633,7 +633,7 @@ fn_info_message_backup() { fi } -fn_info_message_commandlineparms() { +fn_info_messages_commandlineparms() { # # Command-line Parameters # ================================= @@ -641,7 +641,7 @@ fn_info_message_commandlineparms() { echo -e "" echo -e "${bold}${lightgreen}Command-line Parameters${default}" - fn_info_message_password_strip + fn_info_messages_password_strip fn_messages_separator if [ "${serverpassword}" == "NOT SET" ]; then unset serverpassword @@ -650,7 +650,7 @@ fn_info_message_commandlineparms() { echo -e "${preexecutable} ${executable} ${startparameters}" } -fn_info_message_ports_edit() { +fn_info_messages_ports_edit() { # # Ports # ================================= @@ -674,7 +674,7 @@ fn_info_message_ports_edit() { fi done # engines/games that require editing the start parameters. - local ports_edit_array=("av" "ck" "col" "fctr" "goldsrc" "hcu" "hw" "iw3.0" "ioquake3" "qfusion" "rust" "scpsl" "scpslsm" "sol" "spark" "source" "unreal4" "arma3" "dayz" "unt" "vh") + local ports_edit_array=("av" "ck" "col" "cs2" "fctr" "goldsrc" "hcu" "hw" "iw3.0" "ioquake3" "qfusion" "rust" "scpsl" "scpslsm" "sol" "spark" "source" "unreal4" "arma3" "dayz" "unt" "vh") for port_edit in "${ports_edit_array[@]}"; do if [ "${engine}" == "${port_edit}" ] || [ "${gamename}" == "${port_edit}" ] || [ "${shortname}" == "${port_edit}" ]; then startparameterslocation="${configdirserver}" @@ -684,7 +684,7 @@ fn_info_message_ports_edit() { echo -e "" } -fn_info_message_ports() { +fn_info_messages_ports() { echo -e "${lightblue}Useful port diagnostic command:${default}" if [ "${shortname}" == "armar" ]; then portcommand="ss -tuplwn | grep enfMain" @@ -708,7 +708,7 @@ fn_info_message_ports() { echo -e "" } -fn_info_message_statusbottom() { +fn_info_messages_statusbottom() { echo -e "" if [ "${status}" == "0" ]; then echo -e "${lightblue}Status:\t${red}STOPPED${default}" @@ -783,7 +783,7 @@ fn_port() { fi } -fn_info_message_ac() { +fn_info_messages_ac() { { fn_port "header" fn_port "Game" port udp @@ -793,7 +793,7 @@ fn_info_message_ac() { } | column -s $'\t' -t } -fn_info_message_ark() { +fn_info_messages_ark() { { fn_port "header" fn_port "Game" port udp @@ -803,7 +803,7 @@ fn_info_message_ark() { } | column -s $'\t' -t } -fn_info_message_arma3() { +fn_info_messages_arma3() { { fn_port "header" fn_port "Game" port udp @@ -815,7 +815,7 @@ fn_info_message_arma3() { } | column -s $'\t' -t } -fn_info_message_armar() { +fn_info_messages_armar() { { fn_port "header" fn_port "Game" port udp @@ -824,7 +824,7 @@ fn_info_message_armar() { } | column -s $'\t' -t } -fn_info_message_av() { +fn_info_messages_av() { { fn_port "header" fn_port "Game" port udp @@ -835,7 +835,7 @@ fn_info_message_av() { } | column -s $'\t' -t } -fn_info_message_bf1942() { +fn_info_messages_bf1942() { { fn_port "header" fn_port "Game" port udp @@ -843,7 +843,7 @@ fn_info_message_bf1942() { } | column -s $'\t' -t } -fn_info_message_bfv() { +fn_info_messages_bfv() { { fn_port "header" fn_port "Game" port udp @@ -851,7 +851,7 @@ fn_info_message_bfv() { } | column -s $'\t' -t } -fn_info_message_bo() { +fn_info_messages_bo() { { fn_port "header" fn_port "Game" port udp @@ -859,7 +859,7 @@ fn_info_message_bo() { } | column -s $'\t' -t } -fn_info_message_bt() { +fn_info_messages_bt() { { fn_port "header" fn_port "Game" port udp @@ -867,7 +867,7 @@ fn_info_message_bt() { } | column -s $'\t' -t } -fn_info_message_btl() { +fn_info_messages_btl() { { fn_port "header" fn_port "Game" port udp @@ -893,8 +893,8 @@ fn_info_messages_ck() { } | column -s $'\t' -t } -fn_info_message_cmw() { - fn_info_message_password_strip +fn_info_messages_cmw() { + fn_info_messages_password_strip { fn_port "header" fn_port "Game" port udp @@ -903,7 +903,7 @@ fn_info_message_cmw() { } | column -s $'\t' -t } -fn_info_message_cod() { +fn_info_messages_cod() { { fn_port "header" fn_port "Game" port udp @@ -911,7 +911,7 @@ fn_info_message_cod() { } | column -s $'\t' -t } -fn_info_message_coduo() { +fn_info_messages_coduo() { { fn_port "header" fn_port "Game" port udp @@ -919,7 +919,7 @@ fn_info_message_coduo() { } | column -s $'\t' -t } -fn_info_message_cod2() { +fn_info_messages_cod2() { { fn_port "header" fn_port "Game" port udp @@ -927,7 +927,7 @@ fn_info_message_cod2() { } | column -s $'\t' -t } -fn_info_message_cod4() { +fn_info_messages_cod4() { { fn_port "header" fn_port "Game" port udp @@ -935,7 +935,7 @@ fn_info_message_cod4() { } | column -s $'\t' -t } -fn_info_message_codwaw() { +fn_info_messages_codwaw() { { fn_port "header" fn_port "Game" port udp @@ -943,7 +943,7 @@ fn_info_message_codwaw() { } | column -s $'\t' -t } -fn_info_message_col() { +fn_info_messages_col() { { fn_port "header" fn_port "Game" port udp @@ -952,7 +952,15 @@ fn_info_message_col() { } | column -s $'\t' -t } -fn_info_message_csgo() { +fn_info_messages_cs2() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport tcp + } | column -s $'\t' -t +} + +fn_info_messages_csgo() { { fn_port "header" fn_port "Game" port udp @@ -963,15 +971,15 @@ fn_info_message_csgo() { } | column -s $'\t' -t } -fn_info_message_ct() { - fn_info_message_password_strip +fn_info_messages_ct() { + fn_info_messages_password_strip { fn_port "header" fn_port "Game" port udp } | column -s $'\t' -t } -fn_info_message_dayz() { +fn_info_messages_dayz() { { fn_port "header" fn_port "Game" port udp @@ -981,7 +989,7 @@ fn_info_message_dayz() { } | column -s $'\t' -t } -fn_info_message_dodr() { +fn_info_messages_dodr() { { fn_port "header" fn_port "Game" port udp @@ -989,7 +997,7 @@ fn_info_message_dodr() { } | column -s $'\t' -t } -fn_info_message_dst() { +fn_info_messages_dst() { { fn_port "header" fn_port "Game: Server" port udp @@ -999,7 +1007,7 @@ fn_info_message_dst() { } | column -s $'\t' -t } -fn_info_message_eco() { +fn_info_messages_eco() { { fn_port "header" fn_port "Game" port udp @@ -1007,7 +1015,7 @@ fn_info_message_eco() { } | column -s $'\t' -t } -fn_info_message_etl() { +fn_info_messages_etl() { { fn_port "header" fn_port "Game" port udp @@ -1015,7 +1023,7 @@ fn_info_message_etl() { } | column -s $'\t' -t } -fn_info_message_fctr() { +fn_info_messages_fctr() { { fn_port "header" fn_port "Game" port udp @@ -1023,7 +1031,7 @@ fn_info_message_fctr() { } | column -s $'\t' -t } -fn_info_message_goldsrc() { +fn_info_messages_goldsrc() { { fn_port "header" fn_port "Game" port udp @@ -1032,7 +1040,7 @@ fn_info_message_goldsrc() { } | column -s $'\t' -t } -fn_info_message_hcu() { +fn_info_messages_hcu() { { fn_port "header" fn_port "Game" port udp @@ -1040,7 +1048,7 @@ fn_info_message_hcu() { } | column -s $'\t' -t } -fn_info_message_hw() { +fn_info_messages_hw() { { fn_port "header" fn_port "Game" port udp @@ -1048,7 +1056,7 @@ fn_info_message_hw() { } | column -s $'\t' -t } -fn_info_message_ins() { +fn_info_messages_ins() { { fn_port "header" fn_port "Game" port udp @@ -1059,7 +1067,7 @@ fn_info_message_ins() { } | column -s $'\t' -t } -fn_info_message_inss() { +fn_info_messages_inss() { { fn_port "header" fn_port "Game" port udp @@ -1068,7 +1076,7 @@ fn_info_message_inss() { } | column -s $'\t' -t } -fn_info_message_jc2() { +fn_info_messages_jc2() { { fn_port "header" fn_port "Game" port udp @@ -1076,7 +1084,7 @@ fn_info_message_jc2() { } | column -s $'\t' -t } -fn_info_message_jc3() { +fn_info_messages_jc3() { { fn_port "header" fn_port "Game" port udp @@ -1086,14 +1094,14 @@ fn_info_message_jc3() { } | column -s $'\t' -t } -fn_info_message_jk2() { +fn_info_messages_jk2() { { fn_port "header" fn_port "Game" port udp } | column -s $'\t' -t } -fn_info_message_kf() { +fn_info_messages_kf() { { fn_port "header" fn_port "Game" port udp @@ -1115,8 +1123,8 @@ fn_info_message_kf() { } | column -s $'\t' -t } -fn_info_message_kf2() { - fn_info_message_password_strip +fn_info_messages_kf2() { + fn_info_messages_password_strip { fn_port "header" fn_port "Game" port udp @@ -1134,7 +1142,7 @@ fn_info_message_kf2() { } | column -s $'\t' -t } -fn_info_message_mc() { +fn_info_messages_mc() { { fn_port "header" fn_port "Game" port tcp @@ -1143,7 +1151,7 @@ fn_info_message_mc() { } | column -s $'\t' -t } -fn_info_message_mcb() { +fn_info_messages_mcb() { { fn_port "header" fn_port "Game" port udp @@ -1151,7 +1159,7 @@ fn_info_message_mcb() { } | column -s $'\t' -t } -fn_info_message_mh() { +fn_info_messages_mh() { { fn_port "header" fn_port "Game" port udp @@ -1160,14 +1168,14 @@ fn_info_message_mh() { } | column -s $'\t' -t } -fn_info_message_mohaa() { +fn_info_messages_mohaa() { { fn_port "header" fn_port "Game" port udp } | column -s $'\t' -t } -fn_info_message_mom() { +fn_info_messages_mom() { { fn_port "header" fn_port "Game" port udp @@ -1175,7 +1183,7 @@ fn_info_message_mom() { } | column -s $'\t' -t } -fn_info_message_mta() { +fn_info_messages_mta() { { fn_port "header" fn_port "Game" port udp @@ -1186,14 +1194,14 @@ fn_info_message_mta() { } | column -s $'\t' -t } -fn_info_message_nec() { +fn_info_messages_nec() { { fn_port "header" fn_port "Game" port udp } | column -s $'\t' -t } -fn_info_message_ohd() { +fn_info_messages_ohd() { { fn_port "header" fn_port "Game" port udp @@ -1202,7 +1210,7 @@ fn_info_message_ohd() { } | column -s $'\t' -t } -fn_info_message_onset() { +fn_info_messages_onset() { { fn_port "header" fn_port "Game" port udp @@ -1211,7 +1219,7 @@ fn_info_message_onset() { } | column -s $'\t' -t } -fn_info_message_pc() { +fn_info_messages_pc() { { fn_port "header" fn_port "Game" port udp @@ -1229,7 +1237,7 @@ fn_info_message_pc() { } | column -s $'\t' -t } -fn_info_message_pc2() { +fn_info_messages_pc2() { { fn_port "header" fn_port "Game" port udp @@ -1238,7 +1246,7 @@ fn_info_message_pc2() { } | column -s $'\t' -t } -fn_info_message_ps() { +fn_info_messages_ps() { { fn_port "header" fn_port "Game" port udp @@ -1247,7 +1255,7 @@ fn_info_message_ps() { } | column -s $'\t' -t } -fn_info_message_pvr() { +fn_info_messages_pvr() { { fn_port "header" fn_port "Game" port udp @@ -1257,7 +1265,7 @@ fn_info_message_pvr() { } | column -s $'\t' -t } -fn_info_message_pz() { +fn_info_messages_pz() { { fn_port "header" fn_port "Game" port udp @@ -1265,28 +1273,28 @@ fn_info_message_pz() { } | column -s $'\t' -t } -fn_info_message_qw() { +fn_info_messages_qw() { { fn_port "header" fn_port "Game" port udp } | column -s $'\t' -t } -fn_info_message_q2() { +fn_info_messages_q2() { { fn_port "header" fn_port "Game" port udp } | column -s $'\t' -t } -fn_info_message_q3() { +fn_info_messages_q3() { { fn_port "header" fn_port "Game" port udp } | column -s $'\t' -t } -fn_info_message_ql() { +fn_info_messages_ql() { { fn_port "header" fn_port "Game" port udp @@ -1296,7 +1304,7 @@ fn_info_message_ql() { } | column -s $'\t' -t } -fn_info_message_ro() { +fn_info_messages_ro() { { fn_port "header" fn_port "Game" port udp @@ -1317,14 +1325,14 @@ fn_info_message_ro() { } | column -s $'\t' -t } -fn_info_message_rtcw() { +fn_info_messages_rtcw() { { fn_port "header" fn_port "Game" port udp } | column -s $'\t' -t } -fn_info_message_rust() { +fn_info_messages_rust() { { fn_port "header" fn_port "Game" port udp @@ -1334,7 +1342,7 @@ fn_info_message_rust() { } | column -s $'\t' -t } -fn_info_message_rw() { +fn_info_messages_rw() { { fn_port "header" fn_port "Game" port udp @@ -1343,7 +1351,7 @@ fn_info_message_rw() { } | column -s $'\t' -t } -fn_info_message_samp() { +fn_info_messages_samp() { { fn_port "header" fn_port "Game" port udp @@ -1351,7 +1359,7 @@ fn_info_message_samp() { } | column -s $'\t' -t } -fn_info_message_sb() { +fn_info_messages_sb() { { fn_port "header" fn_port "Game" port udp @@ -1360,7 +1368,7 @@ fn_info_message_sb() { } | column -s $'\t' -t } -fn_info_message_sbots() { +fn_info_messages_sbots() { { fn_port "header" fn_port "Game" port udp @@ -1368,15 +1376,15 @@ fn_info_message_sbots() { } | column -s $'\t' -t } -fn_info_message_scpsl() { +fn_info_messages_scpsl() { { fn_port "header" fn_port "Game" port tcp } | column -s $'\t' -t } -fn_info_message_sdtd() { - fn_info_message_password_strip +fn_info_messages_sdtd() { + fn_info_messages_password_strip { fn_port "header" fn_port "Game" port udp @@ -1403,7 +1411,7 @@ fn_info_message_sdtd() { } | column -s $'\t' -t } -fn_info_message_sf() { +fn_info_messages_sf() { { fn_port "header" fn_port "Game" port udp @@ -1412,7 +1420,7 @@ fn_info_message_sf() { } | column -s $'\t' -t } -fn_info_message_sof2() { +fn_info_messages_sof2() { { fn_port "header" fn_port "Game" port udp @@ -1420,7 +1428,7 @@ fn_info_message_sof2() { } | column -s $'\t' -t } -fn_info_message_sol() { +fn_info_messages_sol() { { fn_port "header" fn_port "Game" port udp @@ -1429,7 +1437,7 @@ fn_info_message_sol() { } | column -s $'\t' -t } -fn_info_message_prism3d() { +fn_info_messages_prism3d() { { fn_port "header" fn_port "Game" port udp @@ -1437,7 +1445,7 @@ fn_info_message_prism3d() { } | column -s $'\t' -t } -fn_info_message_source() { +fn_info_messages_source() { { fn_port "header" fn_port "Game" port udp @@ -1452,8 +1460,8 @@ fn_info_message_source() { } | column -s $'\t' -t } -fn_info_message_spark() { - fn_info_message_password_strip +fn_info_messages_spark() { + fn_info_messages_password_strip { fn_port "header" fn_port "Game" port udp @@ -1470,7 +1478,7 @@ fn_info_message_spark() { } | column -s $'\t' -t } -fn_info_message_squad() { +fn_info_messages_squad() { { fn_port "header" fn_port "Game" port udp @@ -1479,7 +1487,7 @@ fn_info_message_squad() { } | column -s $'\t' -t } -fn_info_message_st() { +fn_info_messages_st() { { fn_port "header" fn_port "Game" port udp @@ -1487,7 +1495,7 @@ fn_info_message_st() { } | column -s $'\t' -t } -fn_info_message_ti() { +fn_info_messages_ti() { { fn_port "header" fn_port "Game" port udp @@ -1496,7 +1504,7 @@ fn_info_message_ti() { } | column -s $'\t' -t } -fn_info_message_ts3() { +fn_info_messages_ts3() { { fn_port "header" fn_port "Voice" port udp @@ -1509,7 +1517,7 @@ fn_info_message_ts3() { } | column -s $'\t' -t } -fn_info_message_tw() { +fn_info_messages_tw() { { fn_port "header" fn_port "Game" port udp @@ -1517,7 +1525,7 @@ fn_info_message_tw() { } | column -s $'\t' -t } -fn_info_message_terraria() { +fn_info_messages_terraria() { { fn_port "header" fn_port "Game" port tcp @@ -1525,7 +1533,7 @@ fn_info_message_terraria() { } | column -s $'\t' -t } -fn_info_message_tu() { +fn_info_messages_tu() { { fn_port "header" fn_port "Game" port udp @@ -1534,7 +1542,7 @@ fn_info_message_tu() { } | column -s $'\t' -t } -fn_info_message_ut2k4() { +fn_info_messages_ut2k4() { { fn_port "header" fn_port "Game" port udp @@ -1554,7 +1562,7 @@ fn_info_message_ut2k4() { } | column -s $'\t' -t } -fn_info_message_unreal() { +fn_info_messages_unreal() { { fn_port "header" fn_port "Game" port udp @@ -1573,7 +1581,7 @@ fn_info_message_unreal() { } | column -s $'\t' -t } -fn_info_message_unt() { +fn_info_messages_unt() { { fn_port "header" fn_port "Game" port udp @@ -1582,7 +1590,7 @@ fn_info_message_unt() { } | column -s $'\t' -t } -fn_info_message_ut() { +fn_info_messages_ut() { { fn_port "header" fn_port "Game" port udp @@ -1590,8 +1598,8 @@ fn_info_message_ut() { } | column -s $'\t' -t } -fn_info_message_ut3() { - fn_info_message_password_strip +fn_info_messages_ut3() { + fn_info_messages_password_strip { fn_port "header" fn_port "Game" port udp @@ -1609,7 +1617,7 @@ fn_info_message_ut3() { } | column -s $'\t' -t } -fn_info_message_vh() { +fn_info_messages_vh() { { fn_port "header" fn_port "Game" port udp @@ -1617,21 +1625,21 @@ fn_info_message_vh() { } | column -s $'\t' -t } -fn_info_message_vints() { +fn_info_messages_vints() { { fn_port "header" fn_port "Game" port tcp } | column -s $'\t' -t } -fn_info_message_vpmc() { +fn_info_messages_vpmc() { { fn_port "header" fn_port "Game" port tcp } | column -s $'\t' -t } -fn_info_message_wet() { +fn_info_messages_wet() { { fn_port "header" fn_port "Game" port udp @@ -1639,7 +1647,7 @@ fn_info_message_wet() { } | column -s $'\t' -t } -fn_info_message_wf() { +fn_info_messages_wf() { { fn_port "header" fn_port "Game" port udp @@ -1647,7 +1655,7 @@ fn_info_message_wf() { } | column -s $'\t' -t } -fn_info_message_wurm() { +fn_info_messages_wurm() { { fn_port "header" fn_port "Game" port tcp @@ -1657,7 +1665,7 @@ fn_info_message_wurm() { } | column -s $'\t' -t } -fn_info_message_stn() { +fn_info_messages_stn() { { fn_port "header" fn_port "Game" port udp @@ -1665,186 +1673,188 @@ fn_info_message_stn() { } | column -s $'\t' -t } -fn_info_message_select_engine() { +fn_info_messages_select_engine() { # Display details depending on game or engine. if [ "${shortname}" == "ac" ]; then - fn_info_message_ac + fn_info_messages_ac elif [ "${shortname}" == "ark" ]; then - fn_info_message_ark + fn_info_messages_ark elif [ "${shortname}" == "arma3" ]; then - fn_info_message_arma3 + fn_info_messages_arma3 elif [ "${shortname}" == "armar" ]; then - fn_info_message_armar + fn_info_messages_armar elif [ "${shortname}" == "av" ]; then - fn_info_message_av + fn_info_messages_av elif [ "${shortname}" == "bf1942" ]; then - fn_info_message_bf1942 + fn_info_messages_bf1942 elif [ "${shortname}" == "bfv" ]; then - fn_info_message_bfv + fn_info_messages_bfv elif [ "${shortname}" == "bo" ]; then - fn_info_message_bo + fn_info_messages_bo elif [ "${shortname}" == "bt" ]; then - fn_info_message_bt + fn_info_messages_bt elif [ "${shortname}" == "btl" ]; then - fn_info_message_btl + fn_info_messages_btl elif [ "${shortname}" == "cd" ]; then fn_info_messages_cd elif [ "${shortname}" == "ck" ]; then fn_info_messages_ck + elif [ "${shortname}" == "cs2" ]; then + fn_info_messages_cs2 elif [ "${shortname}" == "csgo" ]; then - fn_info_message_csgo + fn_info_messages_csgo elif [ "${shortname}" == "cmw" ]; then - fn_info_message_cmw + fn_info_messages_cmw elif [ "${shortname}" == "cod" ]; then - fn_info_message_cod + fn_info_messages_cod elif [ "${shortname}" == "coduo" ]; then - fn_info_message_coduo + fn_info_messages_coduo elif [ "${shortname}" == "cod2" ]; then - fn_info_message_cod2 + fn_info_messages_cod2 elif [ "${shortname}" == "cod4" ]; then - fn_info_message_cod4 + fn_info_messages_cod4 elif [ "${shortname}" == "codwaw" ]; then - fn_info_message_codwaw + fn_info_messages_codwaw elif [ "${shortname}" == "col" ]; then - fn_info_message_col + fn_info_messages_col elif [ "${shortname}" == "ct" ]; then - fn_info_message_ct + fn_info_messages_ct elif [ "${shortname}" == "dayz" ]; then - fn_info_message_dayz + fn_info_messages_dayz elif [ "${shortname}" == "dodr" ]; then - fn_info_message_dodr + fn_info_messages_dodr elif [ "${shortname}" == "dst" ]; then - fn_info_message_dst + fn_info_messages_dst elif [ "${shortname}" == "eco" ]; then - fn_info_message_eco + fn_info_messages_eco elif [ "${shortname}" == "etl" ]; then - fn_info_message_etl + fn_info_messages_etl elif [ "${shortname}" == "fctr" ]; then - fn_info_message_fctr + fn_info_messages_fctr elif [ "${shortname}" == "hcu" ]; then - fn_info_message_hcu + fn_info_messages_hcu elif [ "${shortname}" == "hw" ]; then - fn_info_message_hw + fn_info_messages_hw elif [ "${shortname}" == "ins" ]; then - fn_info_message_ins + fn_info_messages_ins elif [ "${shortname}" == "inss" ]; then - fn_info_message_inss + fn_info_messages_inss elif [ "${shortname}" == "jc2" ]; then - fn_info_message_jc2 + fn_info_messages_jc2 elif [ "${shortname}" == "jc3" ]; then - fn_info_message_jc3 + fn_info_messages_jc3 elif [ "${shortname}" == "jk2" ]; then - fn_info_message_jk2 + fn_info_messages_jk2 elif [ "${shortname}" == "kf" ]; then - fn_info_message_kf + fn_info_messages_kf elif [ "${shortname}" == "kf2" ]; then - fn_info_message_kf2 + fn_info_messages_kf2 elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ] || [ "${shortname}" == "wmc" ]; then - fn_info_message_mc + fn_info_messages_mc elif [ "${shortname}" == "mcb" ]; then - fn_info_message_mcb + fn_info_messages_mcb elif [ "${shortname}" == "mh" ]; then - fn_info_message_mh + fn_info_messages_mh elif [ "${shortname}" == "mohaa" ]; then - fn_info_message_mohaa + fn_info_messages_mohaa elif [ "${shortname}" == "mom" ]; then - fn_info_message_mom + fn_info_messages_mom elif [ "${shortname}" == "mta" ]; then - fn_info_message_mta + fn_info_messages_mta elif [ "${shortname}" == "nec" ]; then - fn_info_message_nec + fn_info_messages_nec elif [ "${shortname}" == "ohd" ]; then - fn_info_message_ohd + fn_info_messages_ohd elif [ "${shortname}" == "onset" ]; then - fn_info_message_onset + fn_info_messages_onset elif [ "${shortname}" == "pc" ]; then - fn_info_message_pc + fn_info_messages_pc elif [ "${shortname}" == "pc2" ]; then - fn_info_message_pc2 + fn_info_messages_pc2 elif [ "${shortname}" == "ps" ]; then - fn_info_message_ps + fn_info_messages_ps elif [ "${shortname}" == "pvr" ]; then - fn_info_message_pvr + fn_info_messages_pvr elif [ "${shortname}" == "pz" ]; then - fn_info_message_pz + fn_info_messages_pz elif [ "${shortname}" == "q2" ]; then - fn_info_message_q2 + fn_info_messages_q2 elif [ "${shortname}" == "q3" ]; then - fn_info_message_q3 + fn_info_messages_q3 elif [ "${shortname}" == "ql" ]; then - fn_info_message_ql + fn_info_messages_ql elif [ "${shortname}" == "qw" ]; then - fn_info_message_qw + fn_info_messages_qw elif [ "${shortname}" == "ro" ]; then - fn_info_message_ro + fn_info_messages_ro elif [ "${shortname}" == "rtcw" ]; then - fn_info_message_rtcw + fn_info_messages_rtcw elif [ "${shortname}" == "samp" ]; then - fn_info_message_samp + fn_info_messages_samp elif [ "${shortname}" == "sb" ]; then - fn_info_message_sb + fn_info_messages_sb elif [ "${shortname}" == "sbots" ]; then - fn_info_message_sbots + fn_info_messages_sbots elif [ "${shortname}" == "scpsl" ] || [ "${shortname}" == "scpslsm" ]; then - fn_info_message_scpsl + fn_info_messages_scpsl elif [ "${shortname}" == "sdtd" ]; then - fn_info_message_sdtd + fn_info_messages_sdtd elif [ "${shortname}" == "sf" ]; then - fn_info_message_sf + fn_info_messages_sf elif [ "${shortname}" == "sof2" ]; then - fn_info_message_sof2 + fn_info_messages_sof2 elif [ "${shortname}" == "sol" ]; then - fn_info_message_sol + fn_info_messages_sol elif [ "${shortname}" == "squad" ]; then - fn_info_message_squad + fn_info_messages_squad elif [ "${shortname}" == "st" ]; then - fn_info_message_st + fn_info_messages_st elif [ "${shortname}" == "stn" ]; then - fn_info_message_stn + fn_info_messages_stn elif [ "${shortname}" == "terraria" ]; then - fn_info_message_terraria + fn_info_messages_terraria elif [ "${shortname}" == "ti" ]; then - fn_info_message_ti + fn_info_messages_ti elif [ "${shortname}" == "ts3" ]; then - fn_info_message_ts3 + fn_info_messages_ts3 elif [ "${shortname}" == "tu" ]; then - fn_info_message_tu + fn_info_messages_tu elif [ "${shortname}" == "tw" ]; then - fn_info_message_tw + fn_info_messages_tw elif [ "${shortname}" == "unt" ]; then - fn_info_message_unt + fn_info_messages_unt elif [ "${shortname}" == "vh" ]; then - fn_info_message_vh + fn_info_messages_vh elif [ "${shortname}" == "vints" ]; then - fn_info_message_vints + fn_info_messages_vints elif [ "${shortname}" == "rust" ]; then - fn_info_message_rust + fn_info_messages_rust elif [ "${shortname}" == "rw" ]; then - fn_info_message_rw + fn_info_messages_rw elif [ "${shortname}" == "ut" ]; then - fn_info_message_ut + fn_info_messages_ut elif [ "${shortname}" == "ut2k4" ]; then - fn_info_message_ut2k4 + fn_info_messages_ut2k4 elif [ "${shortname}" == "ut3" ]; then - fn_info_message_ut3 + fn_info_messages_ut3 elif [ "${shortname}" == "vpmc" ]; then - fn_info_message_vpmc + fn_info_messages_vpmc elif [ "${shortname}" == "wet" ]; then - fn_info_message_wet + fn_info_messages_wet elif [ "${shortname}" == "wf" ]; then - fn_info_message_wf + fn_info_messages_wf elif [ "${shortname}" == "wurm" ]; then - fn_info_message_wurm + fn_info_messages_wurm elif [ "${engine}" == "goldsrc" ]; then - fn_info_message_goldsrc + fn_info_messages_goldsrc elif [ "${engine}" == "prism3d" ]; then - fn_info_message_prism3d + fn_info_messages_prism3d elif [ "${engine}" == "source" ]; then - fn_info_message_source + fn_info_messages_source elif [ "${engine}" == "spark" ]; then - fn_info_message_spark + fn_info_messages_spark elif [ "${engine}" == "unreal" ]; then - fn_info_message_unreal + fn_info_messages_unreal else fn_print_error_nl "Unable to detect game server." fi diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index a8d97e661..59bcd90f3 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -346,6 +346,12 @@ elif [ "${shortname}" == "cs" ]; then fn_default_config_remote fn_set_config_vars 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 elif [ "${shortname}" == "cscz" ]; then array_configs+=(server.cfg) fn_fetch_default_config From c51734f59548924f2aee749e19fbb33fd99f6b82 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 28 Oct 2023 08:52:07 +0100 Subject: [PATCH 281/374] feat: monitor will now force an update if source servers request it --- lgsm/modules/alert.sh | 15 ++++++++++++++- lgsm/modules/command_monitor.sh | 6 +++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/lgsm/modules/alert.sh b/lgsm/modules/alert.sh index 4a34207e9..40288d234 100644 --- a/lgsm/modules/alert.sh +++ b/lgsm/modules/alert.sh @@ -107,9 +107,20 @@ fn_alert_update() { alertcolourdec="52480" } +fn_alert_update_request() { + fn_script_log_info "Sending alert: ${selfname} has requested an update and needs to be restarted." + alertaction="Updating" + alertemoji="🎉" + alertsound="1" + alertmessage="${selfname} has requested an update and needs to be restarted." + # Blue + alertcolourhex="#1e90ff" + alertcolourdec="2003199" +} + fn_alert_check_update() { fn_script_log_info "Sending alert: ${gamename} update available: ${remotebuildversion}" - alertaction="Checked for Update" + alertaction="Update available" alertemoji="🎉" alertsound="1" alertmessage="${gamename} update available: ${remotebuildversion}" @@ -199,6 +210,8 @@ 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}" == "check-update" ]; then fn_alert_check_update elif [ "${alert}" == "config" ]; then diff --git a/lgsm/modules/command_monitor.sh b/lgsm/modules/command_monitor.sh index 51a1e99bf..badc90510 100644 --- a/lgsm/modules/command_monitor.sh +++ b/lgsm/modules/command_monitor.sh @@ -153,10 +153,10 @@ 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: Monitor is restarting ${selfname} to apply update" - alert="update" + fn_script_log_info "Checking update: ${selfname} has requested an update and needs to be restarted" + alert="update-request" alert.sh - command_restart.sh + command_update.sh core_exit.sh fi fi From c0742b24823670a539aae30b6ab802ee13146d46 Mon Sep 17 00:00:00 2001 From: Pierre Payen Date: Sat, 28 Oct 2023 10:24:03 +0200 Subject: [PATCH 282/374] refactor: remove ansi sequence from creeol when ansi=off (#4352) When using "ansi"="off", the escape sequence \033[K is still present and tools that input from lgsm will get thoses bytes. This commit removes that. One side-effect if two prints are done without a line feed and the second is shorter than the first, then some unwanted character could remain. ``` echo -en "${creeol}foo/bar" echo -en "${creeol}foo" ``` * before : prints "foo" * after: prints "foo/bar" --- lgsm/modules/core_messages.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/core_messages.sh b/lgsm/modules/core_messages.sh index 929e942be..6488c02bc 100644 --- a/lgsm/modules/core_messages.sh +++ b/lgsm/modules/core_messages.sh @@ -10,6 +10,8 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # nl: new line: message is following by a new line. # eol: end of line: message is placed at the end of the current line. fn_ansi_loader() { + # carriage return. + creeol="\r" if [ "${ansi}" != "off" ]; then # echo colors default="\e[0m" @@ -29,9 +31,9 @@ fn_ansi_loader() { darkgrey="\e[90m" lightgrey="\e[37m" white="\e[97m" + # erase to end of line. + creeol+="\033[K" fi - # carriage return & erase to end of line. - creeol="\r\033[K" } fn_sleep_time() { From 35a535bfa1e6e4af4af20a642c90c55efc893b9c Mon Sep 17 00:00:00 2001 From: Renato <1917543+rainst@users.noreply.github.com> Date: Sat, 28 Oct 2023 19:25:55 +1100 Subject: [PATCH 283/374] feat(vh): add an additional config string for valheim world modifiers (#4341) * feat(vhserver): added additional config string for valheim world modifiers * added instructions on how modifiers are stored in the save files and how to go back to default * small typo --------- Co-authored-by: Daniel Gibbs --- .../config-lgsm/vhserver/_default.cfg | 31 +++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/lgsm/config-default/config-lgsm/vhserver/_default.cfg b/lgsm/config-default/config-lgsm/vhserver/_default.cfg index 084adf50c..4e3d23923 100644 --- a/lgsm/config-default/config-lgsm/vhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vhserver/_default.cfg @@ -22,11 +22,38 @@ backups="4" backupshort="7200" backuplong="43200" # If crossplay is empty, it's off. Fill with any text to make true -# Crossplay is currently not working on Linux dedicated servers, so for now the default is false (emtpy) +# Crossplay is currently not working on Linux dedicated servers, so for now the default is false (empty) crossplay="" +# INSTRUCTIONS FOR WORLD MODIFIERS (from Valheim Dedicated Server Manual.pdf located in serverfiles) +# World modifiers can only be set in the start parameters and can be a combination of the following +# PRESETS: +# Setting a preset will overwrite any other previous modifiers. +# Command line parameter: -preset +# Valid values: normal, casual, easy, hard, hardcore, immersive, hammer. +# MODIFIERS: +# This is set as a combination of key and value, if combined with a preset should be set after. +# Command line parameter: -modifier +# Valid keys and possible values: +# combat: veryeasy, easy, hard, veryhard +# deathPenalty: casual, veryeasy, easy, hard, hardcore +# resources: muchless, less, more, muchmore, most +# raids: none, muchless, less, more, muchmore +# portals: casual, hard, veryhard +# KEYS: +# Sets a world modifier checkbox key. +# Command line parameter: -setkey +# Valid values: nobuildcost, playerevents, passivemobs, nomap +# Example of a combination of modifiers where we set no raids, very hard portals and no map run: +# worldmodifiers="-modifier raids none -modifier portals veryhard -setkey nomap" +# NOTE: removing world modifiers will NOT reset them to default. the modifiers are stored in the world save file (.fwl) +# To go back to default you need to launch the server with the following parameter at least once: +#. worldmodifiers="-preset normal" + +worldmodifiers="" + ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-name '${servername}' -password ${serverpassword} -port ${port} -world ${worldname} -public ${public} -savedir '${savedir}' -logFile '${logFile}' -saveinterval ${saveinterval} -backups ${backups} -backupshort ${backupshort} -backuplong ${backuplong} ${crossplay:+-crossplay}" +startparameters="-name '${servername}' -password ${serverpassword} -port ${port} -world ${worldname} -public ${public} -savedir '${savedir}' -saveinterval ${saveinterval} -backups ${backups} -backupshort ${backupshort} -backuplong ${backuplong}${logFile:+ -logFile '${logFile}'}${crossplay:+ -crossplay}${worldmodifiers:+ ${worldmodifiers}}" #### LinuxGSM Settings #### From cfdfcc3d7f1bff6537718ef3e89844349e1e76be Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 28 Oct 2023 12:59:49 +0100 Subject: [PATCH 284/374] feat: dev-debug.log moved to /data/log if running in docker --- lgsm/modules/core_exit.sh | 2 ++ linuxgsm.sh | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lgsm/modules/core_exit.sh b/lgsm/modules/core_exit.sh index 496cde422..989a4c543 100644 --- a/lgsm/modules/core_exit.sh +++ b/lgsm/modules/core_exit.sh @@ -13,6 +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" fi fi } diff --git a/linuxgsm.sh b/linuxgsm.sh index 395285c7b..9f3611fed 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -15,7 +15,11 @@ # Debugging if [ -f ".dev-debug" ]; then - exec 5> dev-debug.log + if [ -f /.dockerenv ]; then + exec 5> /data/log/dev-debug.log + else + exec 5> dev-debug.log + fi BASH_XTRACEFD="5" set -x fi From aedfa77001f758d034571896d434d36a03622d83 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 28 Oct 2023 13:34:43 +0100 Subject: [PATCH 285/374] feat(monitor): check if details is running --- lgsm/modules/command_monitor.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/command_monitor.sh b/lgsm/modules/command_monitor.sh index badc90510..5f1ff77f6 100644 --- a/lgsm/modules/command_monitor.sh +++ b/lgsm/modules/command_monitor.sh @@ -52,6 +52,17 @@ fn_monitor_check_debug() { fi } +fn_monitor_check_details() { + if [ "$(pgrep -fcx -u "${USER}" "/bin/bash ./${selfname} details")" != "0" ] || [ "$(pgrep -fcx -u "${USER}" "/bin/bash ./${selfname} dt")" != "0" ]; then + fn_print_dots "Checking details: " + fn_print_checking_eol + fn_print_info "Checking details: Details is running: " + fn_print_info_eol_nl + fn_script_log_pass "Checking details: Details is running" + core_exit.sh + fi +} + fn_monitor_check_starting() { # Remove stale lockfile. if [ -f "${lockdir}/${selfname}-starting.lock" ]; then @@ -380,10 +391,11 @@ core_logs.sh info_game.sh # query pre-checks -fn_monitor_check_update_source -fn_monitor_check_update +fn_monitor_check_details fn_monitor_check_backup fn_monitor_check_debug +fn_monitor_check_update_source +fn_monitor_check_update fn_monitor_check_monitoring fn_monitor_check_starting fn_monitor_check_stopping From 67472a824fa1782396ca165871ba9d028e9c5985 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 29 Oct 2023 21:27:21 +0000 Subject: [PATCH 286/374] feat(new server): The Front (#4359) * add the front * config * appid * config * parameters * params * params * ports * update parameters * verbose * variable * fix * multihome * update ip addressing * add ip vars * info * add ft-icon * add missing tf --- .../config-lgsm/tfserver/_default.cfg | 202 ++++++++++++++++++ lgsm/data/almalinux-8.csv | 1 + lgsm/data/almalinux-9.csv | 1 + lgsm/data/centos-7.csv | 1 + lgsm/data/centos-8.csv | 1 + lgsm/data/centos-9.csv | 1 + lgsm/data/debian-10.csv | 1 + lgsm/data/debian-11.csv | 1 + lgsm/data/debian-12.csv | 1 + lgsm/data/debian-9.csv | 1 + lgsm/data/gameicons/tf-icon.png | Bin 0 -> 1828 bytes lgsm/data/rhel-7.csv | 1 + lgsm/data/rhel-8.csv | 1 + lgsm/data/rhel-9.csv | 1 + lgsm/data/rocky-8.csv | 1 + lgsm/data/rocky-9.csv | 1 + lgsm/data/serverlist.csv | 1 + lgsm/data/ubuntu-16.04.csv | 1 + lgsm/data/ubuntu-18.04.csv | 1 + lgsm/data/ubuntu-20.04.csv | 1 + lgsm/data/ubuntu-22.04.csv | 1 + lgsm/data/ubuntu-23.04.csv | 1 + lgsm/data/ubuntu-23.10.csv | 1 + lgsm/modules/command_dev_query_raw.sh | 10 + lgsm/modules/info_game.sh | 20 ++ lgsm/modules/info_messages.sh | 12 ++ 26 files changed, 265 insertions(+) create mode 100644 lgsm/config-default/config-lgsm/tfserver/_default.cfg create mode 100644 lgsm/data/gameicons/tf-icon.png diff --git a/lgsm/config-default/config-lgsm/tfserver/_default.cfg b/lgsm/config-default/config-lgsm/tfserver/_default.cfg new file mode 100644 index 000000000..b605365fe --- /dev/null +++ b/lgsm/config-default/config-lgsm/tfserver/_default.cfg @@ -0,0 +1,202 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! +# Copy settings from here and use them in either: +# common.cfg - applies settings to every instance. +# [instance].cfg - applies settings to a specific instance. + +#### Game Server Settings #### + +## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters +ip="0.0.0.0" +port="5001" +beaconport="5002" +shutdownport="5003" +queryport="27015" +adminlabel="true" # Enable admin icon. +allowsensitivewords="true" +altsavedirectoryname="${defaultmap}" +anticheat="true" +damageself="true" +damangeallies="true" +gamemode="0" # 0 = PvP; 1 = PvE +greenhand="true" +maxplayers="40" +maxqueuesize="50" +queuevalidtime="120" +saveinterval="300" +serveradmins="" # Use 17-digit Steam IDs separated by commas to grant admin privileges to players. +servername="LinuxGSM" +serverpassword="" +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}'" + +#### LinuxGSM Settings #### + +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + +## Notification Alerts +# (on|off) + +# Display IP | https://docs.linuxgsm.com/alerts#display-ip +displayip="" + +# More info | https://docs.linuxgsm.com/alerts#more-info +postalert="off" + +# Alert on Start/Stop/Restart +statusalert="off" + +# Discord Alerts | https://docs.linuxgsm.com/alerts/discord +discordalert="off" +discordwebhook="webhook" + +# Email Alerts | https://docs.linuxgsm.com/alerts/email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + +# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover +pushoveralert="off" +pushovertoken="accesstoken" +pushoveruserkey="userkey" + +# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat +rocketchatalert="off" +rocketchatwebhook="webhook" + +# Slack Alerts | https://docs.linuxgsm.com/alerts/slack +slackalert="off" +slackwebhook="webhook" + +# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram +# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +telegramapi="api.telegram.org" +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +curlcustomstring="" + +## Updating | https://docs.linuxgsm.com/commands/update +updateonstart="off" + +## Backup | https://docs.linuxgsm.com/commands/backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://docs.linuxgsm.com/features/logging +consolelogging="on" +logdays="7" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="5" + +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors +ansi="on" + +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time +sleeptime="0.5" + +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd +# Server appid +appid="2334200" +steamcmdforcewindows="no" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +betapassword="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="true" + +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode +# 1: tmux kill +# 2: CTRL+c +# 3: quit +# 4: quit 120s +# 5: stop +# 6: q +# 7: exit +# 8: 7 Days to Die +# 9: GoldSrc +# 10: Avorion +# 11: end +stopmode="2" + +## Query mode +# 1: session only +# 2: gamedig (gsquery fallback) +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Console type +consoleverbose="yes" +consoleinteract="no" + +## Game Server Details +# Do not edit +gamename="The Front" +engine="unreal4" +glibc="2.17" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}/ProjectWar" +executabledir="${systemdir}/Binaries/Linux" +executable="./TheFrontServer" +servercfgdir="${systemdir}/Saved/Config/LinuxServer" +servercfg="GameUserSettings.ini" +servercfgdefault="GameUserSettings.ini" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" +gamelogdir="${systemdir}/Saved/Logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index 4142c3c82..561b3c134 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -111,6 +111,7 @@ st,libxml2 stn sven terraria +tf tf2,libcurl.i686 tfc ti diff --git a/lgsm/data/almalinux-9.csv b/lgsm/data/almalinux-9.csv index 0e9ff15e2..64a9e0645 100644 --- a/lgsm/data/almalinux-9.csv +++ b/lgsm/data/almalinux-9.csv @@ -111,6 +111,7 @@ st,libxml2 stn sven terraria +tf tf2,libcurl.i686 tfc ti diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index 111bd9afa..a1b10095e 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -111,6 +111,7 @@ st,libxml2 stn sven terraria +tf tf2,libcurl.i686 tfc ti diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index 4142c3c82..561b3c134 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -111,6 +111,7 @@ st,libxml2 stn sven terraria +tf tf2,libcurl.i686 tfc ti diff --git a/lgsm/data/centos-9.csv b/lgsm/data/centos-9.csv index 0e9ff15e2..64a9e0645 100644 --- a/lgsm/data/centos-9.csv +++ b/lgsm/data/centos-9.csv @@ -111,6 +111,7 @@ st,libxml2 stn sven terraria +tf tf2,libcurl.i686 tfc ti diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index 0e9d67d03..c890739c5 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -111,6 +111,7 @@ st,libxml2-utils stn sven,libssl1.1:i386,zlib1g:i386 terraria +tf tf2,libcurl4-gnutls-dev:i386 tfc ti diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index 9a458349e..c265a1f4b 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -111,6 +111,7 @@ st,libxml2-utils stn sven,libssl1.1:i386,zlib1g:i386 terraria +tf tf2,libcurl4-gnutls-dev:i386 tfc ti diff --git a/lgsm/data/debian-12.csv b/lgsm/data/debian-12.csv index d0e56cf46..00351bde8 100644 --- a/lgsm/data/debian-12.csv +++ b/lgsm/data/debian-12.csv @@ -111,6 +111,7 @@ st,libxml2-utils stn sven,libssl3:i386,zlib1g:i386 terraria +tf tf2,libcurl4-gnutls-dev:i386 tfc ti diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index c8aceef1b..6fd3c21ee 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -111,6 +111,7 @@ st,libxml2-utils stn sven,libssl1.1:i386,zlib1g:i386 terraria +tf tf2,libcurl4-gnutls-dev:i386 tfc ti diff --git a/lgsm/data/gameicons/tf-icon.png b/lgsm/data/gameicons/tf-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ace42ff5b9dd532e75da9d0337d550dcdf2b97d1 GIT binary patch literal 1828 zcmV+<2iy3GP)r*j zBmn>b9XQ3eW<4INB2MOhLQdPr8C2N`n{7OoB_rw<{Y z2_bzB5QI2No-t0895ta7Cn}4|IUglu1`!h$D-9AKY)4ipB{FtPT3QJXIAo&`3m!=T z0jeQCWFHzt00D*>A{PS-OEHq_3PkA2pfY ztPw0wZo-HF4RZ+uPXGX885yY+FAV_{PbD*e7a0yXXKp%6D38%SB|c~{I)*?_P|p7^ zm)Qy&I6N&rN`})9M}B-pWqKJIHn!@4DK9XD$u)MlHYi4PA~OOPIsgtS4^NAQJY6oY z=o%S2Ybz=MG+;X&O9CBEmMu|>M1lYaSyz@^U9Uh45ITOnunR3DHeO(8xgj7zjzCsp zH9rt1Nn#TWmoG*DC^dB#DUA{ocQ80duJ9>Je>Y8rH#0$EH8OP;5G+!Wn;|Y?2plCT zGA|JZr5+_ESC&6@y@(AVhY%#2C^;*g+z=r%pCLI25=}Y)0E#q0dpAUAI8t{|Z(2H0 zFPpzlGfZeTM0GDzCv~$UWSm3B{197vPQCPEF;QF8{{R34#kag@000BuNklE=bKq{-#8$`3H3p5}`tKq>Q z0C*_VmvA~C%lZU^f#(!SlIcgD7Z8Ja2mzv(Kxpu>Dkieg?RZ*c#V(!RvXI7$I!jHBnyoy_R`b}7w)ISTL` z1ps0gq=DflA53r9(be^PT0{E1;gHc<2*woPf!{R*sxiiJ=7RLh|foTCB(0E*tHYA1Lv>bx^=mw=j@4H zlWBQ?7(@{u4F`$FqSu$43jOEG)vJwv{&lG5R7s%Kf-tXhn1PBZ;FPMi_I6+Y^~Q~V zJF<=!Zx8istqO8t;4_Xy^m?XRYgatK;iq8=jgr zd&QE%wAU*nK2Q$?Ck$Cx`-2}iR#UTX-_FMBWs_#Vwj}=5`C~%lKm*WXqkZ+7ulDTf zxqSTK+_^Pb&r~lP8|5i@v20;VX#f#Gn8v$u?V1nMn)kPS_W9z)jgJ>kdvf9ndCd)- z3!fchgBUP!Urh4q%2mzZgl_+!c-*+hBF9dQ%AHsLW@SopjN7FFNXi-iM%(-4^&fk> zr@j*zIcem`D9^m?ndOP8G2?RrXas9qVynBo{Jr{j=M233+^A7ebEYpk@Y1TyuLQdj zzxMF$u{@nG5d3=Z{c@5swz$$(X+-DW!Ibmy>0nKn90L zM;Ez^B1UK59**(w+u5TdBBFEL(cu=x3F){n40O3nCKHWEEDXaCC>bTA$rKi=s10000 Date: Sun, 29 Oct 2023 21:35:42 +0000 Subject: [PATCH 287/374] Release v23.6.0 --- lgsm/modules/core_modules.sh | 2 +- linuxgsm.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index 3d989f346..e851340da 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.5.3" +modulesversion="v23.6.0" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index 9f3611fed..5eb822143 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -24,7 +24,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.5.3" +version="v23.6.0" shortname="core" gameservername="core" commandname="CORE" From 64e8a50d0ba31c57cd968578cfc565dea28a0ad1 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 29 Oct 2023 22:59:51 +0000 Subject: [PATCH 288/374] fix(tf): remove server configs The Front only uses start parameters --- lgsm/config-default/config-lgsm/tfserver/_default.cfg | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lgsm/config-default/config-lgsm/tfserver/_default.cfg b/lgsm/config-default/config-lgsm/tfserver/_default.cfg index b605365fe..86994d8e0 100644 --- a/lgsm/config-default/config-lgsm/tfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tfserver/_default.cfg @@ -175,10 +175,6 @@ glibc="2.17" systemdir="${serverfiles}/ProjectWar" executabledir="${systemdir}/Binaries/Linux" executable="./TheFrontServer" -servercfgdir="${systemdir}/Saved/Config/LinuxServer" -servercfg="GameUserSettings.ini" -servercfgdefault="GameUserSettings.ini" -servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory backupdir="${lgsmdir}/backup" From 8830bad9a891d3a46a7c010f323c3f76b450e24c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 30 Oct 2023 21:05:32 +0000 Subject: [PATCH 289/374] Feature/stats change (#4363) * feat: update unsupprted distros and add comments to info_distro * remove tmux 1.6 code * add java and tmux version and change ram to int * tidy up ram requirements used data gathered from analytics --- lgsm/modules/check_deps.sh | 4 +- lgsm/modules/check_system_requirements.sh | 57 ++++--- lgsm/modules/command_debug.sh | 2 +- lgsm/modules/command_start.sh | 46 ++---- lgsm/modules/info_distro.sh | 184 +++++++++++----------- lgsm/modules/info_messages.sh | 8 +- lgsm/modules/info_stats.sh | 18 ++- 7 files changed, 154 insertions(+), 165 deletions(-) diff --git a/lgsm/modules/check_deps.sh b/lgsm/modules/check_deps.sh index 0f8304a18..b7b9f4758 100644 --- a/lgsm/modules/check_deps.sh +++ b/lgsm/modules/check_deps.sh @@ -349,8 +349,8 @@ fi # Will warn user if their distro is no longer supported by the vendor. if [ -n "${distrosupport}" ]; then if [ "${distrosupport}" == "unsupported" ]; then - fn_print_warning_nl "${distroname} is no longer supported by the vendor. Upgrading is recommended." - fn_script_log_warn "${distroname} is no longer supported by the vendor. Upgrading is recommended." + fn_print_warning_nl "${distroname} is no longer supported by the vendor or LinuxGSM. Upgrading is recommended." + fn_script_log_warn "${distroname} is no longer supported by the vendor or LinuxGSM. Upgrading is recommended." fi fi diff --git a/lgsm/modules/check_system_requirements.sh b/lgsm/modules/check_system_requirements.sh index 6932de4dc..bdf1a51c1 100644 --- a/lgsm/modules/check_system_requirements.sh +++ b/lgsm/modules/check_system_requirements.sh @@ -12,42 +12,57 @@ info_distro.sh # RAM requirements in megabytes for each game or engine. if [ "${shortname}" == "ark" ]; then - ramrequirementmb="4000" - ramrequirementgb="4" + ramrequirementgb="7" +elif [ "${shortname}" == "arma3" ]; then + ramrequirementgb="2" +elif [ "${shortname}" == "armar" ]; then + ramrequirementgb="3" elif [ "${shortname}" == "bt" ]; then - ramrequirementmb="1000" ramrequirementgb="1" -elif [ "${shortname}" == "mh" ]; then - ramrequirementmb="4000" - ramrequirementgb="4" -elif [ "${shortname}" == "arma3" ]; then - ramrequirementmb="1000" +elif [ "${shortname}" == "cc" ]; then ramrequirementgb="1" -elif [ "${shortname}" == "rust" ]; then - ramrequirementmb="4000" +elif [ "${shortname}" == "dayz" ]; then + ramrequirementgb="5" +elif [ "${shortname}" == "dodr" ]; then + ramrequirementgb="2" +elif [ "${shortname}" == "hw" ]; then + ramrequirementgb="3" +elif [ "${shortname}" == "mc" ]; then + ramrequirementgb="1" +elif [ "${shortname}" == "pmc" ]; then + ramrequirementgb="2" +elif [ "${shortname}" == "mh" ]; then ramrequirementgb="4" -elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ] || [ "${shortname}" == "wmc" ]; then - ramrequirementmb="1000" +elif [ "${shortname}" == "ns2" ] || [ "${shortname}" == "ns2c" ]; then ramrequirementgb="1" elif [ "${shortname}" == "ps" ]; then - ramrequirementmb="2000" ramrequirementgb="2" -elif [ "${shortname}" == "ns2" ] || [ "${shortname}" == "ns2c" ]; then - ramrequirementmb="1000" +elif [ "${shortname}" == "pvr" ]; then ramrequirementgb="1" +elif [ "${shortname}" == "pz" ]; then + ramrequirementgb="3" +elif [ "${shortname}" == "rust" ]; then + ramrequirementgb="9" +elif [ "${shortname}" == "sdtd" ]; then + ramrequirementgb="4" +elif [ "${shortname}" == "squad" ]; then + ramrequirementgb="2" elif [ "${shortname}" == "st" ]; then - ramrequirementmb="1000" ramrequirementgb="1" -elif [ "${shortname}" == "pvr" ]; then - ramrequirementmb="2000" +elif [ "${shortname}" == "stn" ]; then + ramrequirementgb="3" +elif [ "${shortname}" == "tu" ]; then + ramrequirementgb="2" +elif [ "${shortname}" == "vh" ]; then ramrequirementgb="2" +else + ramrequirementgb="0.5" fi # If the game or engine has a minimum RAM Requirement, compare it to system's available RAM. -if [ "${ramrequirementmb}" ]; then - if [ "${physmemtotalmb}" -lt "${ramrequirementmb}" ]; then +if [ "${ramrequirementgb}" ]; then + if [ "${physmemtotalgb}" -lt "${ramrequirementgb}" ]; then fn_print_dots "Checking RAM" - # Warn the user. fn_print_warn_nl "Checking RAM: ${ramrequirementgb}G required, ${physmemtotal} available" echo "* ${gamename} server may fail to run or experience poor performance." fn_sleep_time_5 diff --git a/lgsm/modules/command_debug.sh b/lgsm/modules/command_debug.sh index 495417c16..2e6c0e2e2 100644 --- a/lgsm/modules/command_debug.sh +++ b/lgsm/modules/command_debug.sh @@ -34,7 +34,7 @@ fn_print_header echo -e "${lightblue}Architecture:\t\t${default}${arch}" echo -e "${lightblue}Kernel:\t\t${default}${kernel}" echo -e "${lightblue}Hostname:\t\t${default}${HOSTNAME}" - echo -e "${lightblue}tmux:\t\t${default}${tmuxv}" + echo -e "${lightblue}tmux:\t\t${default}${tmuxversion}" echo -e "${lightblue}Avg Load:\t\t${default}${load}" echo -e "${lightblue}Free Memory:\t\t${default}${physmemfree}" echo -e "${lightblue}Free Disk:\t\t${default}${availspace}" diff --git a/lgsm/modules/command_start.sh b/lgsm/modules/command_start.sh index 345ede786..f38125a5e 100644 --- a/lgsm/modules/command_start.sh +++ b/lgsm/modules/command_start.sh @@ -73,47 +73,23 @@ fn_start_tmux() { touch "${consolelog}" # tmux compiled from source will return "master", therefore ignore it. - if [ "${tmuxv}" == "master" ]; then + if [ "${tmuxversion}" == "master" ]; then fn_script_log "tmux version: master (user compiled)" echo -e "tmux version: master (user compiled)" >> "${consolelog}" - if [ "${consolelogging}" == "on" ] || [ -z "${consolelogging}" ]; then - if [ "${logtimestamp}" == "on" ]; then - tmux -L "${socketname}" pipe-pane -o -t "${sessionname}" "exec bash -c \"cat | $addtimestamp\" >> '${consolelog}'" - else - tmux -L "${socketname}" pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'" - fi - fi + fi - elif [ -n "${tmuxv}" ]; then - # tmux pipe-pane not supported in tmux versions < 1.6. - if [ "${tmuxvdigit}" -lt "16" ]; then - echo -e "Console logging disabled: tmux => 1.6 required - https://linuxgsm.com/tmux-upgrade - Currently installed: $(tmux -V)" > "${consolelog}" - - # Console logging disabled: Bug in tmux 1.8 breaks logging. - elif [ "${tmuxvdigit}" -eq "18" ]; then - echo -e "Console logging disabled: Bug in tmux 1.8 breaks logging - https://linuxgsm.com/tmux-upgrade - Currently installed: $(tmux -V)" > "${consolelog}" - # Console logging enable or not set. - elif [ "${consolelogging}" == "on" ] || [ -z "${consolelogging}" ]; then - if [ "${logtimestamp}" == "on" ]; then - tmux -L "${socketname}" pipe-pane -o -t "${sessionname}" "exec bash -c \"cat | $addtimestamp\" >> '${consolelog}'" - else - tmux -L "${socketname}" pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'" - fi + # Enable console logging. + if [ "${consolelogging}" == "on" ] || [ -z "${consolelogging}" ]; then + if [ "${logtimestamp}" == "on" ]; then + tmux -L "${socketname}" pipe-pane -o -t "${sessionname}" "exec bash -c \"cat | $addtimestamp\" >> '${consolelog}'" + else + tmux -L "${socketname}" pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'" fi else - echo -e "Unable to detect tmux version" >> "${consolelog}" - fn_script_log_warn "Unable to detect tmux version" - fi - - # Console logging disabled. - if [ "${consolelogging}" == "off" ]; then echo -e "Console logging disabled in settings" >> "${consolelog}" - fn_script_log_info "Console logging disabled by user" + fn_script_log_info "Console logging disabled in settings" fi + fn_sleep_time_1 # If the server fails to start. @@ -123,7 +99,7 @@ fn_start_tmux() { fn_script_log_fail "Unable to start ${servername}" if [ -s "${lgsmlogdir}/.${selfname}-tmux-error.tmp" ]; then fn_print_fail_nl "Unable to start ${servername}: tmux error:" - fn_script_log_fail "Unable to start ${servername}: tmux error:" + fn_script_log_fail "Unable to start ${servername}: tmux error" echo -e "" echo -e "Command" fn_messages_separator diff --git a/lgsm/modules/info_distro.sh b/lgsm/modules/info_distro.sh index a5607ef45..828946139 100644 --- a/lgsm/modules/info_distro.sh +++ b/lgsm/modules/info_distro.sh @@ -21,114 +21,107 @@ fi ## Distro # Returns architecture, kernel and distro/os. -arch="$(uname -m)" -kernel="$(uname -r)" - -# Distro Name - Ubuntu 16.04 LTS -# Distro Version - 16.04 -# Distro ID - ubuntu -# Distro Codename - xenial +arch="$(uname -m)" # Architecture e.g. x86_64 +kernel="$(uname -r)" # Kernel e.g. 2.6.32-042stab120.16 # Gathers distro info from various sources filling in missing gaps. distro_info_array=(os-release lsb_release hostnamectl debian_version redhat-release) for distro_info in "${distro_info_array[@]}"; do if [ -f "/etc/os-release" ] && [ "${distro_info}" == "os-release" ]; then - distroname="$(grep "PRETTY_NAME" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')" - distroversion="$(grep "VERSION_ID" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')" - # Special var for rhel like distros to removed point in number e.g 8.4 to just 8. - distroversionrh="$(sed -nr 's/^VERSION_ID="([0-9]*).+?"/\1/p' /etc/os-release)" - distroid="$(grep "ID=" /etc/os-release | grep -v _ID | awk -F\= '{gsub(/"/,"",$2);print $2}')" - distroidlike="$(grep "ID_LIKE=" /etc/os-release | grep -v _ID | awk -F\= '{gsub(/"/,"",$2);print $2}')" - distrocodename="$(grep "VERSION_CODENAME" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')" + distroname="$(grep "PRETTY_NAME" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')" # e.g. Ubuntu 22.04.3 LTS + distroversion="$(grep "VERSION_ID" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')" # e.g. 22.04 + # Special var for rhel like distros to remove point in number e.g 8.4 to just 8. + if [[ "${distroidlike}" == *"rhel"* ]] || [ "${distroid}" == "rhel" ]; then + distroversionrh="$(sed -nr 's/^VERSION_ID="([0-9]*).+?"/\1/p' /etc/os-release)" # e.g. 8 + fi + distroid="$(grep "ID=" /etc/os-release | grep -v _ID | awk -F\= '{gsub(/"/,"",$2);print $2}')" # e.g. ubuntu + distroidlike="$(grep "ID_LIKE=" /etc/os-release | grep -v _ID | awk -F\= '{gsub(/"/,"",$2);print $2}')" # e.g. debian + distrocodename="$(grep "VERSION_CODENAME" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')" # e.g. jammy elif [ "$(command -v lsb_release 2> /dev/null)" ] && [ "${distro_info}" == "lsb_release" ]; then if [ -z "${distroname}" ]; then - distroname="$(lsb_release -sd)" + distroname="$(lsb_release -sd)" # e.g. Ubuntu 22.04.3 LTS elif [ -z "${distroversion}" ]; then - distroversion="$(lsb_release -sr)" + distroversion="$(lsb_release -sr)" # e.g. 22.04 elif [ -z "${distroid}" ]; then - distroid="$(lsb_release -si)" + distroid="$(lsb_release -si)" # e.g. Ubuntu elif [ -z "${distrocodename}" ]; then - distrocodename="$(lsb_release -sc)" + distrocodename="$(lsb_release -sc)" # e.g. jammy fi elif [ "$(command -v hostnamectl 2> /dev/null)" ] && [ "${distro_info}" == "hostnamectl" ]; then if [ -z "${distroname}" ]; then - distroname="$(hostnamectl | grep "Operating System" | sed 's/Operating System: //g')" + distroname="$(hostnamectl | grep "Operating System" | sed 's/Operating System: //g')" # e.g. Ubuntu 22.04.3 LTS fi elif [ -f "/etc/debian_version" ] && [ "${distro_info}" == "debian_version" ]; then if [ -z "${distroname}" ]; then - distroname="Debian $(cat /etc/debian_version)" + distroname="Debian $(cat /etc/debian_version)" # e.g. Debian bookworm/sid elif [ -z "${distroversion}" ]; then - distroversion="$(cat /etc/debian_version)" + distroversion="$(cat /etc/debian_version)" # e.g. bookworm/sid elif [ -z "${distroid}" ]; then distroid="debian" fi elif [ -f "/etc/redhat-release" ] && [ "${distro_info}" == "redhat-release" ]; then if [ -z "${distroname}" ]; then - distroname="$(cat /etc/redhat-release)" + distroname="$(cat /etc/redhat-release)" # e.g. Rocky Linux release 9.2 (Blue Onyx) elif [ -z "${distroversion}" ]; then - distroversion="$(rpm -qa \*-release | grep -Ei "oracle|redhat|centos|fedora" | cut -d"-" -f3)" + distroversion="$(rpm -qa \*-release | grep -Ei "oracle|redhat|centos|fedora|rocky|alma" | cut -d"-" -f3)" # e.g. 9.2 elif [ -z "${distroid}" ]; then - distroid="$(awk '{print $1}' /etc/redhat-release)" + distroid="$(awk '{print $1}' /etc/redhat-release)" # e.g. Rocky fi fi done # Get virtual environment type. if [ "$(command -v systemd-detect-virt 2> /dev/null)" ]; then - virtualenvironment="$(systemd-detect-virt)" + virtualenvironment="$(systemd-detect-virt)" # e.g. kvm fi -# Some RHEL based distros use 8.4 instead of just 8. -if [[ "${distroidlike}" == *"rhel"* ]] || [ "${distroid}" == "rhel" ]; then - distroversioncsv="${distroversionrh}" +# distroversioncsv is used for selecting the correct distro csv in data directory +if [ -n "${distroversionrh}" ]; then + distroversioncsv="${distroversionrh}" # e.g. 8 else - distroversioncsv="${distroversion}" + distroversioncsv="${distroversion}" # e.g. 22.04 fi # Check if distro supported by distro vendor. +# distro-info available in debian based distros. if [ "$(command -v distro-info 2> /dev/null)" ]; then distrosunsupported="$(distro-info --unsupported)" distrosunsupported_array=("${distrosunsupported}") for distrounsupported in "${distrosunsupported_array[@]}"; do if [ "${distrounsupported}" == "${distrocodename}" ]; then - distrosupport=unsupported + distrosupport="unsupported" break else - distrosupport=supported + distrosupport="supported" fi done -else - distrosupport=unknown +elif [[ "${distroidlike}" == *"rhel"* ]] || [ "${distroid}" == "rhel" ]; then + # RHEL/CentOS 7 EOL 2024-06-30. Will be unsupported after this date. + if [ "${distroversionrh}" -lt "8" ] && [ "$(date +%s)" -lt "1719705600" ]; then + distrosupport="unsupported" + else + distrosupport="supported" + fi fi ## Glibc version -# e.g: 1.17 -glibcversion="$(ldd --version | sed -n '1s/.* //p')" +glibcversion="$(ldd --version | sed -n '1s/.* //p')" # e.g: 2.17 ## tmux version -# e.g: tmux 1.6 -if [ ! "$(command -V tmux 2> /dev/null)" ]; then - tmuxv="${red}NOT INSTALLED!${default}" - tmuxvdigit="0" -else - tmuxvdigit="$(tmux -V | sed "s/tmux //" | sed -n '1 p' | tr -cd '[:digit:]')" - if [ "${tmuxvdigit}" -lt "16" ]; then - tmuxv="$(tmux -V) (>= 1.6 required for console log)" - else - tmuxv="$(tmux -V)" - fi +if [ "$(command -V tmux 2> /dev/null)" ]; then + tmuxversion="$(tmux -V | awk '{print $2}')" # e.g: tmux 3.3 fi if [ "$(command -V java 2> /dev/null)" ]; then - javaversion="$(java -version 2>&1 | grep "version")" + javaversion="$(java -version 2>&1 | grep "version")" # e.g: openjdk version "17.0.8.1" 2023-08-24 fi if [ "$(command -v mono 2> /dev/null)" ]; then - monoversion="$(mono --version 2>&1 | grep -Po '(?<=version )\d')" + monoversion="$(mono --version 2>&1 | grep -Po '(?<=version )\d')" # e.g: 6 fi if [ "$(command -v dotnet 2> /dev/null)" ]; then - dotnetversion="$(dotnet --list-runtimes | grep -E 'Microsoft\.NETCore\.App' | awk '{print $2}')" + dotnetversion="$(dotnet --list-runtimes | grep -E 'Microsoft\.NETCore\.App' | awk '{print $2}')" # e.g: 6.0.0 fi ## Uptime @@ -141,16 +134,16 @@ days="$((uptime / 60 / 60 / 24))" ### Performance information ## Average server load -load="$(uptime | awk -F 'load average: ' '{ print $2 }')" +load="$(uptime | awk -F 'load average: ' '{ print $2 }')" # e.g 0.01, 0.05, 0.11 ## CPU information -cpumodel="$(awk -F: '/model name/ {name=$2} END {print name}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//')" +cpumodel="$(awk -F: '/model name/ {name=$2} END {print name}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//')" # e.g Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz cpucores="$(awk -F: '/model name/ {core++} END {print core}' /proc/cpuinfo)" -cpufreqency="$(awk -F: '/cpu MHz/ {freq=$2} END {print freq}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//')" +cpufreqency="$(awk -F: '/cpu MHz/ {freq=$2} END {print freq}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//')" # e.g 2394.503 # CPU usage of the game server pid if [ -n "${gameserverpid}" ]; then - cpuused="$(ps --forest -o pcpu -g "${gameserverpid}" | awk '{s+=$1} END {print s}')" - cpuusedmhz="$(echo "${cpufreqency} * ${cpuused} / 100" | bc)" + cpuused="$(ps --forest -o pcpu -g "${gameserverpid}" | awk '{s+=$1} END {print s}')" # integer + cpuusedmhz="$(echo "${cpufreqency} * ${cpuused} / 100" | bc)" # integer fi ## Memory information @@ -161,36 +154,35 @@ if [ "$(command -v numfmt 2> /dev/null)" ]; then # Issue #2005 - Kernel 3.14+ contains MemAvailable which should be used. All others will be calculated. # get the raw KB values of these fields. - physmemtotalkb="$(grep MemTotal /proc/meminfo | awk '{print $2}')" - physmemfreekb="$(grep ^MemFree /proc/meminfo | awk '{print $2}')" - physmembufferskb="$(grep ^Buffers /proc/meminfo | awk '{print $2}')" - physmemcachedkb="$(grep ^Cached /proc/meminfo | awk '{print $2}')" - physmemreclaimablekb="$(grep ^SReclaimable /proc/meminfo | awk '{print $2}')" + physmemtotalkb="$(grep MemTotal /proc/meminfo | awk '{print $2}')" # integer + physmemfreekb="$(grep ^MemFree /proc/meminfo | awk '{print $2}')" # integer + physmembufferskb="$(grep ^Buffers /proc/meminfo | awk '{print $2}')" # integer + physmemcachedkb="$(grep ^Cached /proc/meminfo | awk '{print $2}')" # integer + physmemreclaimablekb="$(grep ^SReclaimable /proc/meminfo | awk '{print $2}')" # integer # check if MemAvailable Exists. if grep -q ^MemAvailable /proc/meminfo; then - physmemactualfreekb="$(grep ^MemAvailable /proc/meminfo | awk '{print $2}')" + physmemactualfreekb="$(grep ^MemAvailable /proc/meminfo | awk '{print $2}')" # integer else - physmemactualfreekb="$((physmemfreekb + physmembufferskb + physmemcachedkb))" + physmemactualfreekb="$((physmemfreekb + physmembufferskb + physmemcachedkb))" # integer fi # Available RAM and swap. - physmemtotalmb="$((physmemtotalkb / 1024))" - physmemtotal="$(numfmt --to=iec --from=iec --suffix=B "${physmemtotalkb}K")" - physmemfree="$(numfmt --to=iec --from=iec --suffix=B "${physmemactualfreekb}K")" - physmemused="$(numfmt --to=iec --from=iec --suffix=B "$((physmemtotalkb - physmemfreekb - physmembufferskb - physmemcachedkb - physmemreclaimablekb))K")" - physmemavailable="$(numfmt --to=iec --from=iec --suffix=B "${physmemactualfreekb}K")" - physmemcached="$(numfmt --to=iec --from=iec --suffix=B "$((physmemcachedkb + physmemreclaimablekb))K")" - - swaptotal="$(numfmt --to=iec --from=iec --suffix=B "$(grep ^SwapTotal /proc/meminfo | awk '{print $2}')K")" - swapfree="$(numfmt --to=iec --from=iec --suffix=B "$(grep ^SwapFree /proc/meminfo | awk '{print $2}')K")" - swapused="$(numfmt --to=iec --from=iec --suffix=B "$(($(grep ^SwapTotal /proc/meminfo | awk '{print $2}') - $(grep ^SwapFree /proc/meminfo | awk '{print $2}')))K")" + physmemtotalmb="$(((physmemtotalkb + 512) / 1024))" # integer # integer + physmemtotalgb="$(((physmemtotalmb + 512) / 1024))" # integer # integer + physmemtotal="$(numfmt --to=iec --from=iec --suffix=B "${physmemtotalkb}K")" # string + physmemfree="$(numfmt --to=iec --from=iec --suffix=B "${physmemactualfreekb}K")" # string + physmemused="$(numfmt --to=iec --from=iec --suffix=B "$((physmemtotalkb - physmemfreekb - physmembufferskb - physmemcachedkb - physmemreclaimablekb))K")" # string + physmemavailable="$(numfmt --to=iec --from=iec --suffix=B "${physmemactualfreekb}K")" # string + physmemcached="$(numfmt --to=iec --from=iec --suffix=B "$((physmemcachedkb + physmemreclaimablekb))K")" # string + + swaptotal="$(numfmt --to=iec --from=iec --suffix=B "$(grep ^SwapTotal /proc/meminfo | awk '{print $2}')K")" # string + swapfree="$(numfmt --to=iec --from=iec --suffix=B "$(grep ^SwapFree /proc/meminfo | awk '{print $2}')K")" # string + swapused="$(numfmt --to=iec --from=iec --suffix=B "$(($(grep ^SwapTotal /proc/meminfo | awk '{print $2}') - $(grep ^SwapFree /proc/meminfo | awk '{print $2}')))K")" # string # RAM usage of the game server pid - # MB if [ "${gameserverpid}" ]; then - memused="$(ps --forest -o rss -g "${gameserverpid}" | awk '{s+=$1} END {print s}' | awk '{$1/=1024;printf "%.0f",$1}{print $2}')" - # % - pmemused="$(ps --forest -o %mem -g "${gameserverpid}" | awk '{s+=$1} END {print s}')" + memusedmb="$(ps --forest -o rss -g "${gameserverpid}" | awk '{s+=$1} END {print s}' | awk '{$1/=1024;printf "%.0f",$1}{print $2}')" # integer + memusedpct="$(ps --forest -o %mem -g "${gameserverpid}" | awk '{s+=$1} END {print s}')" # integer fi else # Older distros will need to use free. @@ -203,32 +195,32 @@ else else humanreadable="-h" fi - physmemtotalmb="$(free -m | awk '/Mem:/ {print $2}')" - physmemtotal="$(free ${humanreadable} | awk '/Mem:/ {print $2}')" - physmemfree="$(free ${humanreadable} | awk '/Mem:/ {print $4}')" - physmemused="$(free ${humanreadable} | awk '/Mem:/ {print $3}')" + physmemtotalmb="$(free -m | awk '/Mem:/ {print $2}')" # string + physmemtotal="$(free ${humanreadable} | awk '/Mem:/ {print $2}')" # string + physmemfree="$(free ${humanreadable} | awk '/Mem:/ {print $4}')" # string + physmemused="$(free ${humanreadable} | awk '/Mem:/ {print $3}')" # string oldfree="$(free ${humanreadable} | awk '/cache:/')" if [ "${oldfree}" ]; then physmemavailable="n/a" physmemcached="n/a" else - physmemavailable="$(free ${humanreadable} | awk '/Mem:/ {print $7}')" - physmemcached="$(free ${humanreadable} | awk '/Mem:/ {print $6}')" + physmemavailable="$(free ${humanreadable} | awk '/Mem:/ {print $7}')" # string + physmemcached="$(free ${humanreadable} | awk '/Mem:/ {print $6}')" # string fi - swaptotal="$(free ${humanreadable} | awk '/Swap:/ {print $2}')" - swapused="$(free ${humanreadable} | awk '/Swap:/ {print $3}')" - swapfree="$(free ${humanreadable} | awk '/Swap:/ {print $4}')" + swaptotal="$(free ${humanreadable} | awk '/Swap:/ {print $2}')" # string + swapused="$(free ${humanreadable} | awk '/Swap:/ {print $3}')" # string + swapfree="$(free ${humanreadable} | awk '/Swap:/ {print $4}')" # string fi ### Disk information ## Available disk space on the partition. -filesystem="$(LC_ALL=C df -hP "${rootdir}" | tail -n 1 | awk '{print $1}')" -totalspace="$(LC_ALL=C df -hP "${rootdir}" | tail -n 1 | awk '{print $2}')" -usedspace="$(LC_ALL=C df -hP "${rootdir}" | tail -n 1 | awk '{print $3}')" -availspace="$(LC_ALL=C df -hP "${rootdir}" | tail -n 1 | awk '{print $4}')" +filesystem="$(LC_ALL=C df -hP "${rootdir}" | tail -n 1 | awk '{print $1}')" # string e.g /dev/sda +totalspace="$(LC_ALL=C df -hP "${rootdir}" | tail -n 1 | awk '{print $2}')" # string e.g 20G +usedspace="$(LC_ALL=C df -hP "${rootdir}" | tail -n 1 | awk '{print $3}')" # string e.g 15G +availspace="$(LC_ALL=C df -hP "${rootdir}" | tail -n 1 | awk '{print $4}')" # string e.g 5G ## LinuxGSM used space total. rootdirdu="$(du -sh "${rootdir}" 2> /dev/null | awk '{print $1}')" @@ -263,21 +255,21 @@ if [ -d "${backupdir}" ]; then # If there are backups in backup dir. if [ "$(find "${backupdir}" -name "*.tar.gz" | wc -l)" -ne "0" ]; then # number of backups. - backupcount="$(find "${backupdir}"/*.tar.gz | wc -l)" + backupcount="$(find "${backupdir}"/*.tar.gz | wc -l)" # integer # most recent backup. - lastbackup="$(ls -1t "${backupdir}"/*.tar.gz | head -1)" + lastbackup="$(ls -1t "${backupdir}"/*.tar.gz | head -1)" # string # date of most recent backup. - lastbackupdate="$(date -r "${lastbackup}")" + lastbackupdate="$(date -r "${lastbackup}")" # string # no of days since last backup. - lastbackupdaysago="$((($(date +'%s') - $(date -r "${lastbackup}" +'%s')) / 60 / 60 / 24))" + lastbackupdaysago="$((($(date +'%s') - $(date -r "${lastbackup}" +'%s')) / 60 / 60 / 24))" # integer # size of most recent backup. - lastbackupsize="$(du -h "${lastbackup}" | awk '{print $1}')" + lastbackupsize="$(du -h "${lastbackup}" | awk '{print $1}')" # string fi fi # Network Interface name -netint=$(${ipcommand} -o addr | grep "${ip}" | awk '{print $2}') -netlink=$(${ethtoolcommand} "${netint}" 2> /dev/null | grep Speed | awk '{print $2}') +netint=$(${ipcommand} -o addr | grep "${ip}" | awk '{print $2}') # e.g eth0 +netlink=$(${ethtoolcommand} "${netint}" 2> /dev/null | grep Speed | awk '{print $2}') # e.g 1000Mb/s # Sets the SteamCMD glibc requirement if the game server requirement is less or not required. if [ "${appid}" ]; then @@ -286,5 +278,5 @@ if [ "${appid}" ]; then fi fi -# Gather Port Info using ss +# Gather Port Info using ss. ssinfo="$(ss -tuplwn)" diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index 0b928aa55..926165b28 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -95,7 +95,7 @@ fn_info_messages_distro() { echo -e "${lightblue}Hostname:\t${default}${HOSTNAME}" echo -e "${lightblue}Environment:\t${default}${virtualenvironment}" echo -e "${lightblue}Uptime:\t${default}${days}d, ${hours}h, ${minutes}m" - echo -e "${lightblue}tmux:\t${default}${tmuxv}" + echo -e "${lightblue}tmux:\t${default}${tmuxversion}" echo -e "${lightblue}glibc:\t${default}${glibcversion}" if [ -n "${javaram}" ]; then echo -e "${lightblue}Java:\t${default}${javaversion}" @@ -191,10 +191,10 @@ fn_info_messages_gameserver_resource() { else echo -e "${lightblue}CPU Used:\t${red}unknown${default}" fi - if [ -n "${memused}" ]; then - echo -e "${lightblue}Mem Used:\t${default}${pmemused}%\t${memused}MB${default}" + if [ -n "${memusedmb}" ]; then + echo -e "${lightblue}Mem Used:\t${default}${memusedpct}%\t${memusedmb}MB${default}" else - echo -e "${lightblue}Mem Used:\t${default}${pmemused}\t${red}unknown${default}" + echo -e "${lightblue}Mem Used:\t${default}${memusedpct}\t${red}unknown${default}" fi else echo -e "${lightblue}CPU Used:\t${default}0%${default}" diff --git a/lgsm/modules/info_stats.sh b/lgsm/modules/info_stats.sh index 8f0119532..dcc247b59 100644 --- a/lgsm/modules/info_stats.sh +++ b/lgsm/modules/info_stats.sh @@ -54,7 +54,10 @@ uuidhardware=$(cat "/etc/machine-id") # nearest 100Mhz. cpuusedmhzroundup="$(((cpuusedmhz + 99) / 100 * 100))" # nearest 100MB -memusedroundup="$(((memused + 99) / 100 * 100))" +memusedmbroundup="$(((memusedmb + 99) / 100 * 100))" + +# Convert any commas to dots. +physmemtotal="${physmemtotal//,/.}" apisecret="A-OzP02TSMWt4_vHi6ZpUw" measurementid="G-0CR8V7EMT5" @@ -66,22 +69,25 @@ payload="{ { \"name\": \"LinuxGSM\", \"params\": { - \"cpuusedmhzroundup\": \"${cpuusedmhzroundup}MHz\", + \"cpuusedmhzroundup\": \"${cpuusedmhzroundup}\", \"diskused\": \"${serverfilesdu}\", \"distro\": \"${distroname}\", \"game\": \"${gamename}\", - \"memusedroundup\": \"${memusedroundup}MB\", - \"ramused\": \"${memusedroundup}MB\", + \"memusedmbroundup\": \"${memusedmbroundup}\", + \"ramused\": \"${memusedmbroundup}\", \"servercpu\": \"${cpumodel} ${cpucores} cores\", \"servercpufreq\": \"${cpufreqency} x${cpucores}\", \"serverdisk\": \"${totalspace}\", \"serverfilesdu\": \"${serverfilesdu}\", \"serverram\": \"${physmemtotal}\", + \"serverramgb\": \"${physmemtotalgb}\", \"uuidhardware\": \"${uuidhardware}\", \"uuidinstall\": \"${uuidinstall}\", \"uuidinstance\": \"${uuidinstance}\", \"version\": \"${version}\", - \"virtualenvironment\": \"${virtualenvironment}\" + \"virtualenvironment\": \"${virtualenvironment}\", + \"tmuxversion\": \"${tmuxversion}\", + \"java\": \"${javaversion}\" } } ] @@ -156,7 +162,7 @@ fn_script_log_info "* uuid-hardware: ${uuidhardware}" fn_script_log_info "* Game Name: ${gamename}" fn_script_log_info "* Distro Name: ${distroname}" fn_script_log_info "* Game Server CPU Used: ${cpuusedmhzroundup}MHz" -fn_script_log_info "* Game Server RAM Used: ${memusedroundup}MB" +fn_script_log_info "* Game Server RAM Used: ${memusedmbroundup}MB" fn_script_log_info "* Game Server Disk Used: ${serverfilesdu}" fn_script_log_info "* Server CPU Model: ${cpumodel}" fn_script_log_info "* Server CPU Frequency: ${cpufreqency}" From 118bb7a229766606ccc4a0d701cf5959b83e470f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 3 Nov 2023 21:26:28 +0000 Subject: [PATCH 290/374] feat(cs2): remove SteamCMD login credentials The commit removes the SteamCMD login credentials from the default configuration file for Counter-Strike 2 server. Valve has removed the login requirement for cs2 --- lgsm/config-default/config-lgsm/cs2server/_default.cfg | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lgsm/config-default/config-lgsm/cs2server/_default.cfg b/lgsm/config-default/config-lgsm/cs2server/_default.cfg index 820f80379..9ccb7a459 100644 --- a/lgsm/config-default/config-lgsm/cs2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cs2server/_default.cfg @@ -8,10 +8,6 @@ #### Game Server Settings #### -## SteamCMD Login | https://docs.linuxgsm.com/steamcmd#steamcmd-login -steamuser="username" -steampass='password' - ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters # https://docs.linuxgsm.com/game-servers/counter-strike-2 # [Game Modes] gametype gamemode gamemodeflags skirmishid mapgroup (you can mix these across all Game Modes except Danger Zone, but use only one) From dc74deadac27d7017618c8f99f866c22c1655f33 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 3 Nov 2023 21:27:38 +0000 Subject: [PATCH 291/374] Release v23.6.1 --- lgsm/modules/core_modules.sh | 2 +- linuxgsm.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index e851340da..de08c1998 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.6.0" +modulesversion="v23.6.1" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index 5eb822143..748656bcf 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -24,7 +24,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.6.0" +version="v23.6.1" shortname="core" gameservername="core" commandname="CORE" From 536c65cc5d820b936a2abfe6e988c0698ea6d956 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 5 Nov 2023 14:50:13 +0000 Subject: [PATCH 292/374] fix: correct consoleverbose settings --- lgsm/config-default/config-lgsm/colserver/_default.cfg | 2 +- lgsm/config-default/config-lgsm/ctserver/_default.cfg | 2 +- lgsm/config-default/config-lgsm/hcuserver/_default.cfg | 2 +- lgsm/config-default/config-lgsm/sampserver/_default.cfg | 4 ++-- lgsm/config-default/config-lgsm/wurmserver/_default.cfg | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lgsm/config-default/config-lgsm/colserver/_default.cfg b/lgsm/config-default/config-lgsm/colserver/_default.cfg index 63182f515..1c3b261e2 100644 --- a/lgsm/config-default/config-lgsm/colserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/colserver/_default.cfg @@ -136,7 +136,7 @@ querymode="2" querytype="protocol-valve" ## Console type -consoleverbose="no" +consoleverbose="yes" consoleinteract="no" ## Game Server Details diff --git a/lgsm/config-default/config-lgsm/ctserver/_default.cfg b/lgsm/config-default/config-lgsm/ctserver/_default.cfg index 74bd230c7..ea1ae5229 100644 --- a/lgsm/config-default/config-lgsm/ctserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ctserver/_default.cfg @@ -135,7 +135,7 @@ querymode="1" querytype="" ## Console type -consoleverbose="no" +consoleverbose="yes" consoleinteract="yes" ## Game Server Details diff --git a/lgsm/config-default/config-lgsm/hcuserver/_default.cfg b/lgsm/config-default/config-lgsm/hcuserver/_default.cfg index 225482c69..af819305c 100644 --- a/lgsm/config-default/config-lgsm/hcuserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hcuserver/_default.cfg @@ -150,7 +150,7 @@ querymode="1" querytype="" ## Console type -consoleverbose="no" +consoleverbose="yes" consoleinteract="no" ## Game Server Details diff --git a/lgsm/config-default/config-lgsm/sampserver/_default.cfg b/lgsm/config-default/config-lgsm/sampserver/_default.cfg index 1dbeaaccf..510b9a689 100644 --- a/lgsm/config-default/config-lgsm/sampserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sampserver/_default.cfg @@ -126,8 +126,8 @@ querymode="3" querytype="samp" ## Console type -consoleverbose="" -consoleinteract="" +consoleverbose="no" +consoleinteract="no" ## Game Server Details # Do not edit diff --git a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg index 5405be85a..b27783cf4 100644 --- a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg @@ -179,8 +179,8 @@ querymode="2" querytype="protocol-valve" ## Console type -consoleverbose="" -consoleinteract="" +consoleverbose="yes" +consoleinteract="no" ## Game Server Details # Do not edit From 00cc5364aca273a4df3ffcc1c7c84b2125dfe3a6 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 5 Nov 2023 21:28:20 +0000 Subject: [PATCH 293/374] fix(cs2): added some missing parameters The start parameters are still a work in progress but I have added some key ones that are missing. --- lgsm/config-default/config-lgsm/cs2server/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/cs2server/_default.cfg b/lgsm/config-default/config-lgsm/cs2server/_default.cfg index 9ccb7a459..4eca78e35 100644 --- a/lgsm/config-default/config-lgsm/cs2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cs2server/_default.cfg @@ -44,7 +44,7 @@ tickrate="64" gslt="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-dedicated +sv_setsteamaccount ${gslt} +map ${defaultmap} +game_type 0 +game_mode 1 +sv_logfile 1 -serverlogging +exec ${selfname}.cfg" +startparameters="-dedicated -ip ${ip} -port ${port} -maxplayers ${maxplayers} -tickrate ${tickrate} -serverlogging +sv_setsteamaccount ${gslt} +map ${defaultmap} +game_type ${gametype} +game_mode ${gamemode} +sv_game_mode_flags ${gamemodeflags} +sv_skirmish_id ${skirmishid} +sv_logfile 1 +exec ${selfname}.cfg" #### LinuxGSM Settings #### From 8472ae5664a91d96ebb1cd40f60baa1ccf5d3042 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 5 Nov 2023 21:28:50 +0000 Subject: [PATCH 294/374] Release v23.6.2 --- lgsm/modules/core_modules.sh | 2 +- linuxgsm.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index de08c1998..29249fb0b 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.6.1" +modulesversion="v23.6.2" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index 748656bcf..8e1d06235 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -24,7 +24,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.6.1" +version="v23.6.2" shortname="core" gameservername="core" commandname="CORE" From 283e6257a0a3e1a343cb273538e8a93e410c15ee Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 13 Nov 2023 23:59:21 +0000 Subject: [PATCH 295/374] feat: Update UE4/UE5 parameters and configs (#4378) * feat(ark): move rconport and maxplayers to config * feat(sbots): removed ? from parameters * feat(tu): shuffle parameters and use pascal case * feat(mom): Pascal Case parameters * add ohd configs * re order * sync with configs * feat(btl): standardise configs and parameters to match other ue4 games * standardise * feat(sf): upgrade to ue5 * add ram requirements to satisfactory * sf fix * tidy up parameters * update ark parameters * minor changes * updated the isle to UE5 * add game server docs * move log * tidy --- lgsm/config-default/config-lgsm/arkserver/_default.cfg | 5 ++--- lgsm/config-default/config-lgsm/btlserver/_default.cfg | 6 +++--- lgsm/config-default/config-lgsm/hcuserver/_default.cfg | 2 +- lgsm/config-default/config-lgsm/inssserver/_default.cfg | 6 +++--- lgsm/config-default/config-lgsm/mhserver/_default.cfg | 3 ++- lgsm/config-default/config-lgsm/momserver/_default.cfg | 3 ++- lgsm/config-default/config-lgsm/ohdserver/_default.cfg | 4 ++-- lgsm/config-default/config-lgsm/onsetserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/psserver/_default.cfg | 6 +----- lgsm/config-default/config-lgsm/pvrserver/_default.cfg | 5 +++-- lgsm/config-default/config-lgsm/sbotsserver/_default.cfg | 2 +- lgsm/config-default/config-lgsm/sfserver/_default.cfg | 7 ++++--- lgsm/config-default/config-lgsm/squadserver/_default.cfg | 4 ++-- lgsm/config-default/config-lgsm/tiserver/_default.cfg | 3 ++- lgsm/config-default/config-lgsm/tuserver/_default.cfg | 2 +- lgsm/config-default/config-lgsm/ut3server/_default.cfg | 2 +- lgsm/modules/check_system_requirements.sh | 2 ++ lgsm/modules/info_game.sh | 2 ++ lgsm/modules/info_messages.sh | 2 +- lgsm/modules/install_config.sh | 4 ++-- 20 files changed, 38 insertions(+), 33 deletions(-) diff --git a/lgsm/config-default/config-lgsm/arkserver/_default.cfg b/lgsm/config-default/config-lgsm/arkserver/_default.cfg index 7f38c974f..123749452 100644 --- a/lgsm/config-default/config-lgsm/arkserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/arkserver/_default.cfg @@ -12,14 +12,13 @@ ip="0.0.0.0" port="7777" queryport="27015" -rconport="27020" # Default Map: TheIsland, Ragnarok, CrystalIsles, Aberration_P, ScorchedEarth_P, TheCenter, Extinction, Valguero_P, Genesis, Gen2 defaultmap="TheIsland" altsavedirectoryname="${defaultmap}" -maxplayers="70" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="${defaultmap}?AltSaveDirectoryName=${altsavedirectoryname}?listen?MultiHome=${ip}?MaxPlayers=${maxplayers}?QueryPort=${queryport}?RCONPort=${rconport}?Port=${port} -automanagedmods -crossplay -PublicIPForEpic=${publicip}" +## Game Server Docs | https://ark.wiki.gg/wiki/Server_configuration +startparameters="${defaultmap}?AltSaveDirectoryName=${altsavedirectoryname} -MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -AutoManagedMods -Crossplay -PublicIPForEpic=${publicip} -log" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/btlserver/_default.cfg b/lgsm/config-default/config-lgsm/btlserver/_default.cfg index b6cf3da34..dcc49c61c 100644 --- a/lgsm/config-default/config-lgsm/btlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/btlserver/_default.cfg @@ -14,7 +14,7 @@ port="7777" queryport="7780" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="/Game/Maps/Final_Maps/Derailed?Game=/Script/ShooterGame.WartideGameMode?listen -log -broadcastip=\"${publicip}\" -PORT=${port} -QueryPort=${queryport} -defgameini=\"${servercfgfullpath}\"" +startparameters="-Port=${port} -QueryPort=${queryport} -BroadcastIp=${publicip} -log" #### LinuxGSM Settings #### @@ -157,8 +157,8 @@ systemdir="${serverfiles}/Battalion" executabledir="${systemdir}/Binaries/Linux" executable="./BattalionServer-Linux-Shipping" servercfgdir="${systemdir}/Saved/Config/LinuxServer" -servercfg="${selfname}.ini" -servercfgdefault="DefaultGame.ini" +servercfg="Game.ini" +servercfgdefault="Game.ini" servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory diff --git a/lgsm/config-default/config-lgsm/hcuserver/_default.cfg b/lgsm/config-default/config-lgsm/hcuserver/_default.cfg index af819305c..67deef669 100644 --- a/lgsm/config-default/config-lgsm/hcuserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hcuserver/_default.cfg @@ -17,7 +17,7 @@ queryport="27015" servername="LinuxGSM" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="${defaultmap}?Difficulty=1?Game=DM?MapList=KidsBedroom,Playground,Garden,Hallway_Simple,Bathroom,Hallway_Hard,Attic_Daytime,Shed,ToyPalace,Kitchen,Garage?MaxPlayers=${maxplayers}?WeaponTypes=7?TimeLimit=600?ScoreLimit=30?Teamplay -ServerName='${servername}' -Port=${port} -QueryPort=${queryport} -NOCONSOLE -unattended" +startparameters="${defaultmap}?MaxPlayers=${maxplayers} -ServerName='${servername}' -Port=${port} -QueryPort=${queryport}" ## Server Parameters for Plague mode #startparameters="${defaultmap}?Game=PL?MapList=KidsBedroom,Garden,Hallway_Simple,Attic_Daytime,Garage,Shed,Kitchen,Hallway_Hard,ToyPalace,Bathroom?MaxPlayers=${maxplayers}?WeaponTypes=7?TimeLimit=600 -ServerName='${servername}' -Port=${port} -QueryPort=${queryport} -NOCONSOLE -unattended" diff --git a/lgsm/config-default/config-lgsm/inssserver/_default.cfg b/lgsm/config-default/config-lgsm/inssserver/_default.cfg index 13addae47..8d14e79ea 100644 --- a/lgsm/config-default/config-lgsm/inssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/inssserver/_default.cfg @@ -15,8 +15,8 @@ queryport="27131" rconport="27015" rconpassword="" servername="LinuxGSM" -defaultmap="Canyon" -defaultscenario="Scenario_Crossing_Push_Security" +defaultmap="Oilfield" +defaultscenario="Scenario_Refinery_Push_Security" maxplayers="28" ## Game Server Login Token (GSLT): Optional @@ -25,7 +25,7 @@ maxplayers="28" gslt="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -## Parameter Docs | https://mod.io/g/insurgencysandstorm/r/server-admin-guide +## Game Server Docs | https://mod.io/g/insurgencysandstorm/r/server-admin-guide startparameters="${defaultmap}?Scenario=${defaultscenario}?MaxPlayers=${maxplayers} -Port=${port} -QueryPort=${queryport} -hostname='${servername}' -Rcon -RconPassword=${rconpassword} -RconListenPort=${rconport} -GSLTToken=${gslt} -log" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/mhserver/_default.cfg b/lgsm/config-default/config-lgsm/mhserver/_default.cfg index 846aed06e..399d7c96b 100644 --- a/lgsm/config-default/config-lgsm/mhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mhserver/_default.cfg @@ -17,7 +17,8 @@ queryport="27015" defaultmap="FFA_ThePit" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="Mordhau ${defaultmap} -log -MultiHome=${ip} -Port=${port} -BeaconPort=${beaconport} -QueryPort=${queryport} -GameIni=${servercfgfullpath}" +## Game Server Docs | https://mordhau.fandom.com/wiki/Dedicated_Server_Hosting_Guide +startparameters="Mordhau ${defaultmap} -MultiHome=${ip} -Port=${port} -BeaconPort=${beaconport} -QueryPort=${queryport} -GameIni=${servercfgfullpath} -log" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/momserver/_default.cfg b/lgsm/config-default/config-lgsm/momserver/_default.cfg index c075067f5..e9b743c00 100644 --- a/lgsm/config-default/config-lgsm/momserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/momserver/_default.cfg @@ -14,7 +14,8 @@ port="7777" beaconport="15000" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-port="${port}" -beaconport="${beaconport}" -MULTIHOME="${ip}"" +## Game Server Docs | https://memoriesofmars.fandom.com/wiki/Dedicated_Servers +startparameters="-MultiHome=${ip} -Port=${port} -BeaconPort=${beaconport} -log" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/ohdserver/_default.cfg b/lgsm/config-default/config-lgsm/ohdserver/_default.cfg index 58a42d3b3..9eaf0d4a5 100644 --- a/lgsm/config-default/config-lgsm/ohdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ohdserver/_default.cfg @@ -12,14 +12,14 @@ ip="0.0.0.0" port="7777" queryport="27005" +rconport="7778" servername="LinuxGSM" -serverpassword="" # Maps: risala, khafji_p, lamdong, montecassino, argonne defaultmap="AAS-TestMap" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="${defaultmap}?MaxPlayers=${maxplayers}?Password=${serverpassword} -Port=${port} -QueryPort=${queryport} -SteamServerName='${servername}' -log" +startparameters="${defaultmap}?MaxPlayers=${maxplayers} -MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -RconPort=${rconport} -SteamServerName='${servername}' -log" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/onsetserver/_default.cfg b/lgsm/config-default/config-lgsm/onsetserver/_default.cfg index b0f0d00bc..39fc4005c 100644 --- a/lgsm/config-default/config-lgsm/onsetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/onsetserver/_default.cfg @@ -9,6 +9,7 @@ #### Game Server Settings #### ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +## Game Server Docs | https://dev.playonset.com/wiki/DedicatedServer startparameters="--config ${servercfgfullpath}" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/psserver/_default.cfg b/lgsm/config-default/config-lgsm/psserver/_default.cfg index 143a3349d..e41dee19c 100644 --- a/lgsm/config-default/config-lgsm/psserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/psserver/_default.cfg @@ -10,15 +10,11 @@ ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" -maxplayers="40" port="10027" queryport="10037" -randommap="NONE" -reservedslots="0" -tickrate="50" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="MULTIHOME=${ip} RANDOM=${randommap} Port=${port} QueryPort=${queryport} FIXEDMAXPLAYERS=${maxplayers} FIXEDMAXTICKRATE=${tickrate} NumReservedSlots=${reservedslots}" +startparameters="-MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -log" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/pvrserver/_default.cfg b/lgsm/config-default/config-lgsm/pvrserver/_default.cfg index c84064900..2cffabe71 100644 --- a/lgsm/config-default/config-lgsm/pvrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pvrserver/_default.cfg @@ -17,7 +17,8 @@ defaultmap="datacenter" apikey="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="Pavlov ${defaultmap} -log -MultiHome=${ip} -Port=${port} ApiKey=${apikey}" +## Game Server Docs | http://pavlovwiki.com/index.php/Setting_up_a_dedicated_server +startparameters="Pavlov ${defaultmap} -MultiHome=${ip} -Port=${port} ApiKey=${apikey} -log" #### LinuxGSM Settings #### @@ -149,7 +150,7 @@ consoleinteract="no" ## Game Server Details # Do not edit gamename="Pavlov VR" -engine="unreal4" +engine="unreal5" glibc="2.17" #### Directories #### diff --git a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg index ef33b7f9a..3c6e3412e 100644 --- a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg @@ -15,7 +15,7 @@ defaultmap="StationKappa" servername="LinuxGSM" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="Port=${port}?QueryPort=${queryport} -startup_map ${defaultmap} -server_name \"${servername}\"" +startparameters="-MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -startup_map ${defaultmap} -server_name '${servername}'" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/sfserver/_default.cfg b/lgsm/config-default/config-lgsm/sfserver/_default.cfg index 4beb002f6..f889b4866 100644 --- a/lgsm/config-default/config-lgsm/sfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sfserver/_default.cfg @@ -15,7 +15,8 @@ beaconport="15000" port="7777" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="FactoryGame -multihome=${ip} -ServerQueryPort=${queryport} -BeaconPort=${beaconport} -Port=${port} -log -unattended" +## Game Server Docs | https://satisfactory.fandom.com/wiki/Dedicated_servers +startparameters="FactoryGame -MultiHome=${ip} -Port=${port} -ServerQueryPort=${queryport} -BeaconPort=${beaconport} -log" #### LinuxGSM Settings #### @@ -147,7 +148,7 @@ consoleinteract="no" ## Game Server Details # Do not edit gamename="Satisfactory" -engine="unreal4" +engine="unreal5" glibc="2.17" #### Directories #### @@ -156,7 +157,7 @@ glibc="2.17" ## Game Server Directories systemdir="${serverfiles}/FactoryGame" executabledir="${serverfiles}/Engine/Binaries/Linux" -executable="./UE4Server-Linux-Shipping" +executable="./UnrealServer-Linux-Shipping" servercfgdir="${systemdir}/Saved/Config/LinuxServer" servercfg="GameUserSettings.ini" servercfgdefault="GameUserSettings.ini" diff --git a/lgsm/config-default/config-lgsm/squadserver/_default.cfg b/lgsm/config-default/config-lgsm/squadserver/_default.cfg index 424d81f32..09c0e94b1 100644 --- a/lgsm/config-default/config-lgsm/squadserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/squadserver/_default.cfg @@ -11,10 +11,10 @@ ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters port="7787" queryport="27165" -randommap="ALWAYS" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="MULTIHOME=${ip} RANDOM=${randommap} Port=${port} QueryPort=${queryport}" +## Game Server Docs | https://squad.fandom.com/wiki/Dedicated_server +startparameters="-MultiHome=${ip} -Port=${port} -QueryPort=${queryport}" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/tiserver/_default.cfg b/lgsm/config-default/config-lgsm/tiserver/_default.cfg index dd3e1dd90..3141983c9 100644 --- a/lgsm/config-default/config-lgsm/tiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tiserver/_default.cfg @@ -14,6 +14,7 @@ port="7777" defaultmap="/Game/TheIsle/Maps/Game/Isla_Spiro/Isla_Spiro" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +## Game Server Docs | https://isle.fandom.com/wiki/The_Isle_Server_Settings_and_Configuration startparameters="${defaultmap} -Port=${port} -log" #### LinuxGSM Settings #### @@ -146,7 +147,7 @@ consoleinteract="no" ## Game Server Details # Do not edit gamename="The Isle" -engine="unreal4" +engine="unreal5" glibc="2.17" #### Directories #### diff --git a/lgsm/config-default/config-lgsm/tuserver/_default.cfg b/lgsm/config-default/config-lgsm/tuserver/_default.cfg index 086968e98..89c6712bd 100644 --- a/lgsm/config-default/config-lgsm/tuserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tuserver/_default.cfg @@ -19,7 +19,7 @@ queryport="27015" gslt="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-log -MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -TowerServerINI=${selfname}.ini" +startparameters="-MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -TowerServerINI=${selfname}.ini -log" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/ut3server/_default.cfg b/lgsm/config-default/config-lgsm/ut3server/_default.cfg index cdadca663..4f0b6a3a0 100644 --- a/lgsm/config-default/config-lgsm/ut3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut3server/_default.cfg @@ -29,7 +29,7 @@ gspassword="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters # List of game types and mutators: https://docs.linuxgsm.com/game-servers/unreal-tournament-3 -startparameters="server ${defaultmap}?Game=${game}?bIsDedicated=${isdedicated}?bIsLanMatch=${islanmatch}?bUsesStats=${usesstats}?bShouldAdvertise=${shouldadvertise}?PureServer=${pureserver}?bAllowJoinInProgress=${allowjoininprogress}?Mutator=${mutators}?ConfigSubDir=${selfname} -login=${gsusername} -password=${gspassword} -port=${port} -queryport=${queryport} -multihome=${ip} -nohomedir -unattended -log=${gamelog}" +startparameters="server ${defaultmap}?Game=${game}?bIsDedicated=${isdedicated}?bIsLanMatch=${islanmatch}?bUsesStats=${usesstats}?bShouldAdvertise=${shouldadvertise}?PureServer=${pureserver}?bAllowJoinInProgress=${allowjoininprogress}?Mutator=${mutators}?ConfigSubDir=${selfname} -login=${gsusername} -password=${gspassword} -multihome=${ip} -port=${port} -queryport=${queryport} -nohomedir -unattended -log=${gamelog}" #### LinuxGSM Settings #### diff --git a/lgsm/modules/check_system_requirements.sh b/lgsm/modules/check_system_requirements.sh index bdf1a51c1..5ffd0c8af 100644 --- a/lgsm/modules/check_system_requirements.sh +++ b/lgsm/modules/check_system_requirements.sh @@ -45,6 +45,8 @@ elif [ "${shortname}" == "rust" ]; then ramrequirementgb="9" elif [ "${shortname}" == "sdtd" ]; then ramrequirementgb="4" +elif [ "${shortname}" == "sf" ]; then + ramrequirementgb="12" elif [ "${shortname}" == "squad" ]; then ramrequirementgb="2" elif [ "${shortname}" == "st" ]; then diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index c75f1c239..0365660a6 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -287,6 +287,8 @@ fn_info_game_ac() { fn_info_game_ark() { if [ -f "${servercfgfullpath}" ]; then fn_info_game_ini "adminpassword" "ServerAdminPassword" + fn_info_game_ini "maxplayers" "MaxPlayers" + fn_info_game_ini "rconport" "RCONPort" fn_info_game_ini "servername" "SessionName" fn_info_game_ini "serverpassword" "ServerPassword" fi diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index 926165b28..abddf9fc6 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -674,7 +674,7 @@ fn_info_messages_ports_edit() { fi done # engines/games that require editing the start parameters. - local ports_edit_array=("av" "ck" "col" "cs2" "fctr" "goldsrc" "hcu" "hw" "iw3.0" "ioquake3" "qfusion" "rust" "scpsl" "scpslsm" "sol" "spark" "source" "unreal4" "arma3" "dayz" "unt" "vh") + local ports_edit_array=("av" "ck" "col" "cs2" "fctr" "goldsrc" "hcu" "hw" "iw3.0" "ioquake3" "qfusion" "rust" "scpsl" "scpslsm" "sf" "sol" "spark" "source" "unreal4" "arma3" "dayz" "unt" "vh") for port_edit in "${ports_edit_array[@]}"; do if [ "${engine}" == "${port_edit}" ] || [ "${gamename}" == "${port_edit}" ] || [ "${shortname}" == "${port_edit}" ]; then startparameterslocation="${configdirserver}" diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index 59bcd90f3..45773f63c 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -245,7 +245,7 @@ elif [ "${shortname}" == "bt" ]; then fn_list_config_locations elif [ "${shortname}" == "btl" ]; then fn_check_cfgdir - array_configs+=(DefaultGame.ini) + array_configs+=(Game.ini) fn_fetch_default_config fn_default_config_remote fn_set_config_vars @@ -484,7 +484,7 @@ elif [ "${shortname}" == "hldms" ]; then fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ohd" ]; then - array_configs+=(Game.ini) + array_configs+=(Admins.cfg Engine.ini Game.ini MapCycle.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars From c17c41139b7c9c2f22fe64a8d0d713bcb15dcdfa Mon Sep 17 00:00:00 2001 From: Sascha Moser <28950736+xopez@users.noreply.github.com> Date: Tue, 14 Nov 2023 01:01:08 +0100 Subject: [PATCH 296/374] fix(gmod): Remove authkey (#4370) Fixes #4369 --- lgsm/config-default/config-lgsm/gmodserver/_default.cfg | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg index 869628e8c..01ea819f2 100644 --- a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg @@ -19,8 +19,6 @@ tickrate="66" gamemode="sandbox" ## Workshop Parameters | https://wiki.facepunch.com/gmod/Workshop_for_Dedicated_Servers -# To get an API key visit - https://steamcommunity.com/dev/apikey -wsapikey="" wscollectionid="" ## Game Server Login Token (GSLT): Optional @@ -29,7 +27,7 @@ wscollectionid="" gslt="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game garrysmod -strictportbind -ip ${ip} -port ${port} -tickrate ${tickrate} +host_workshop_collection ${wscollectionid} -authkey ${wsapikey} +clientport ${clientport} +tv_port ${sourcetvport} +gamemode ${gamemode} +map ${defaultmap} +sv_setsteamaccount ${gslt} +servercfgfile ${servercfg} -maxplayers ${maxplayers} -disableluarefresh" +startparameters="-game garrysmod -strictportbind -ip ${ip} -port ${port} -tickrate ${tickrate} +host_workshop_collection ${wscollectionid} +clientport ${clientport} +tv_port ${sourcetvport} +gamemode ${gamemode} +map ${defaultmap} +sv_setsteamaccount ${gslt} +servercfgfile ${servercfg} -maxplayers ${maxplayers} -disableluarefresh" #### LinuxGSM Settings #### From efb8426ada187527b09a3fd6d414c43b2fb57b92 Mon Sep 17 00:00:00 2001 From: chris3081 Date: Tue, 14 Nov 2023 10:02:51 +1000 Subject: [PATCH 297/374] fix(vh): Change ValheimPlus repo and adjust fix_vh (#4373) Change ValheimPlus repo and adjust fix_vh to remove unstripped_contrib folder and comment out all references in scripts to that directory. --- lgsm/modules/fix_vh.sh | 6 ++++++ lgsm/modules/mods_list.sh | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lgsm/modules/fix_vh.sh b/lgsm/modules/fix_vh.sh index c642a1a57..ff02eaddd 100644 --- a/lgsm/modules/fix_vh.sh +++ b/lgsm/modules/fix_vh.sh @@ -17,6 +17,12 @@ if [ -f "${modsinstalledlistfullpath}" ]; then echo 'executable="./start_server_bepinex.sh"' >> "${configdirserver}/${selfname}.cfg" executable="./start_server_bepinex.sh" fi + if [ -d "${serverfiles}/unstripped_corlib" ]; then + rm -rf "${serverfiles}/unstripped_corlib" + fi + sed -i 's/^dllSearchPathOverride=unstripped_corlib/# &/' "${serverfiles}/doorstop_config.ini" + sed -i 's/^export DOORSTOP_CORLIB_OVERRIDE_PATH="$BASEDIR\/unstripped_corlib"/# &/' "${serverfiles}/start_game_bepinex.sh" + sed -i 's/^export DOORSTOP_CORLIB_OVERRIDE_PATH="${VALHEIM_PLUS_PATH}\/unstripped_corlib"/# &/' "${serverfiles}/start_server_bepinex.sh" fi # special exports for BepInEx if installed if grep -qE "^bepinexvh" "${modsinstalledlistfullpath}"; then diff --git a/lgsm/modules/mods_list.sh b/lgsm/modules/mods_list.sh index e093124e9..95ab63d99 100644 --- a/lgsm/modules/mods_list.sh +++ b/lgsm/modules/mods_list.sh @@ -200,7 +200,7 @@ mod_info_hwoxide=(MOD "hwoxide" "Oxide for Hurtworld" "${oxidehurtworldlatestlin mod_info_sdtdoxide=(MOD "sdtdoxide" "Oxide for 7 Days To Die" "${oxidesdtdlatestlink}" "Oxide.SevenDaysToDie.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "7 Days To Die;" "NOTGAMES" "https://umod.org/games/7-days-to-die" "Allows for the use of plugins") # ValheimPlus -mod_info_valheimplus=(MOD "valheimplus" "Valheim PLUS" "${valeimpluslatestlink}" "ValheimPlus.tar.gz" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Valheim;" "NOTGAMES" "https://github.com/valheimPlus/ValheimPlus" "Mod to improve Valheim gameplay") +mod_info_valheimplus=(MOD "valheimplus" "Valheim PLUS" "${valeimpluslatestlink}" "ValheimPlus.tar.gz" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Valheim;" "NOTGAMES" "https://github.com/Grantapher/ValheimPlus.git" "Mod to improve Valheim gameplay") # BepInEx Valheim mod_info_bepinexvh=(MOD "bepinexvh" "BepInEx Valheim" "${bepinexvhlatestlink}" "denikson-BepInExPack_Valheim.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Valheim;" "NOTGAMES" "https://valheim.thunderstore.io/package/denikson/BepInExPack_Valheim/" "Unity / XNA game patcher and plugin framework") From 38e309877759a0423b0ffe578e1e9653cbd75da6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 14 Nov 2023 00:03:13 +0000 Subject: [PATCH 298/374] build(deps): bump github/issue-labeler from 3.2 to 3.3 (#4375) Bumps [github/issue-labeler](https://github.com/github/issue-labeler) from 3.2 to 3.3. - [Release notes](https://github.com/github/issue-labeler/releases) - [Commits](https://github.com/github/issue-labeler/compare/v3.2...v3.3) --- updated-dependencies: - dependency-name: github/issue-labeler dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/labeler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 44beca03d..24174fb22 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Issue Labeler - uses: github/issue-labeler@v3.2 + uses: github/issue-labeler@v3.3 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" configuration-path: .github/labeler.yml From f80a1b69fd5a914c942aa18f083ad510656af328 Mon Sep 17 00:00:00 2001 From: Phillip Birmingham Date: Fri, 17 Nov 2023 16:03:25 -0600 Subject: [PATCH 299/374] fix(arma3server): remove quotes from around mod list in Arma3 server command line (#4288) * build(deps): bump github/issue-labeler from 3.1 to 3.2 (#4258) Bumps [github/issue-labeler](https://github.com/github/issue-labeler) from 3.1 to 3.2. - [Release notes](https://github.com/github/issue-labeler/releases) - [Commits](https://github.com/github/issue-labeler/compare/v3.1...v3.2) --- updated-dependencies: - dependency-name: github/issue-labeler dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * remove quotes from around modlist --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- lgsm/config-default/config-lgsm/arma3server/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/arma3server/_default.cfg b/lgsm/config-default/config-lgsm/arma3server/_default.cfg index f89b751ed..f50bf8342 100644 --- a/lgsm/config-default/config-lgsm/arma3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/arma3server/_default.cfg @@ -32,7 +32,7 @@ servermods="" bepath="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-ip=${ip} -port=${port} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} -mod='${mods}' -servermod=${servermods} -bepath=${bepath} -autoinit -loadmissiontomemory" +startparameters="-ip=${ip} -port=${port} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} -mod=${mods} -servermod=${servermods} -bepath=${bepath} -autoinit -loadmissiontomemory" #### LinuxGSM Settings #### From 8bc716b456ca34903979d55bf4999583d09c855f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 22 Nov 2023 11:42:52 +0000 Subject: [PATCH 300/374] fix(ark): remove -log parameter as deprecated --- lgsm/config-default/config-lgsm/arkserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/arkserver/_default.cfg b/lgsm/config-default/config-lgsm/arkserver/_default.cfg index 123749452..73b251731 100644 --- a/lgsm/config-default/config-lgsm/arkserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/arkserver/_default.cfg @@ -18,7 +18,7 @@ altsavedirectoryname="${defaultmap}" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters ## Game Server Docs | https://ark.wiki.gg/wiki/Server_configuration -startparameters="${defaultmap}?AltSaveDirectoryName=${altsavedirectoryname} -MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -AutoManagedMods -Crossplay -PublicIPForEpic=${publicip} -log" +startparameters="${defaultmap}?AltSaveDirectoryName=${altsavedirectoryname} -MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -AutoManagedMods -Crossplay -PublicIPForEpic=${publicip}" #### LinuxGSM Settings #### From c7aedf5a7782050a2c8124f03292683488085105 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 22 Nov 2023 15:16:35 +0000 Subject: [PATCH 301/374] fix(rust): add default-terminal setting for Oxide (#4383) * fix(rust): add default-terminal setting for Oxide This commit fixes issue #4268 by adding the line "set -g default-terminal "screen-256color"" to the ~/.tmux.conf file. This ensures compatibility with tmux version 3.3 or higher when running RustDedicated servers with Oxide.Rust.dll. * add gamelog to start parameters --- .../config-lgsm/rustserver/_default.cfg | 3 ++- lgsm/modules/fix_rust.sh | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/rustserver/_default.cfg b/lgsm/config-default/config-lgsm/rustserver/_default.cfg index e04577792..2652bc597 100644 --- a/lgsm/config-default/config-lgsm/rustserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rustserver/_default.cfg @@ -28,7 +28,7 @@ saveinterval="300" # Auto-save in seconds. tickrate="30" # default: 30, range: 15-100. ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-batchmode +app.listenip ${ip} +app.port ${appport} +server.ip ${ip} +server.port ${port} +server.queryport ${queryport} +server.tickrate ${tickrate} +server.hostname \"${servername}\" +server.identity \"${selfname}\" +server.gamemode ${gamemode} +server.level \"${serverlevel}\" +server.seed ${seed} +server.salt ${salt} +server.maxplayers ${maxplayers} +server.worldsize ${worldsize} +server.saveinterval ${saveinterval} +rcon.web ${rconweb} +rcon.ip ${ip} +rcon.port ${rconport} +rcon.password \"${rconpassword}\" -logfile" +startparameters="-batchmode +app.listenip ${ip} +app.port ${appport} +server.ip ${ip} +server.port ${port} +server.queryport ${queryport} +server.tickrate ${tickrate} +server.hostname \"${servername}\" +server.identity \"${selfname}\" +server.gamemode ${gamemode} +server.level \"${serverlevel}\" +server.seed ${seed} +server.salt ${salt} +server.maxplayers ${maxplayers} +server.worldsize ${worldsize} +server.saveinterval ${saveinterval} +rcon.web ${rconweb} +rcon.ip ${ip} +rcon.port ${rconport} +rcon.password \"${rconpassword}\" -logfile ${gamelog}" #### LinuxGSM Settings #### @@ -184,6 +184,7 @@ backupdir="${lgsmdir}/backup" gamelogdir="${logdir}/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" +gamelog="${gamelogdir}/${selfname}-game.log" lgsmlog="${lgsmlogdir}/${selfname}-script.log" consolelog="${consolelogdir}/${selfname}-console.log" alertlog="${lgsmlogdir}/${selfname}-alert.log" diff --git a/lgsm/modules/fix_rust.sh b/lgsm/modules/fix_rust.sh index 6d4cebc01..809b5b1df 100644 --- a/lgsm/modules/fix_rust.sh +++ b/lgsm/modules/fix_rust.sh @@ -30,3 +30,21 @@ if [ -f "${serverfiles}/carbon/tools/environment.sh" ]; then # shellcheck source=/dev/null source "${serverfiles}/carbon/tools/environment.sh" fi + +# fix for #4268 +# insert set -g default-terminal "screen-256color" into ~/.tmux.conf +if [ -f "${serverfiles}/RustDedicated_Data/Managed/Oxide.Rust.dll" ]; then + # tmux version is 3.3 or higher + tmuxvdigit="$(tmux -V | sed "s/tmux //" | sed -n '1 p' | tr -cd '[:digit:]')" + if [ "${tmuxvdigit}" -ge "33" ]; then + if [ ! -f "${HOME}/.tmux.conf" ]; then + touch "${HOME}/.tmux.conf" + fi + if ! grep -q "set -g default-terminal \"screen-256color\"" "${HOME}/.tmux.conf"; then + fixname="tmux screen-256color" + fn_fix_msg_start + echo "set -g default-terminal \"screen-256color\"" >> "${HOME}/.tmux.conf" + fn_fix_msg_end + fi + fi +fi From 2122a6b390b44c7cbacb3fa1fbcf3548b644eefd Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 22 Nov 2023 15:16:59 +0000 Subject: [PATCH 302/374] feat(backup): add tmpdir to backup exclusion (#4386) --- lgsm/modules/command_backup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/modules/command_backup.sh b/lgsm/modules/command_backup.sh index 55981e19e..e0ef3f0a1 100644 --- a/lgsm/modules/command_backup.sh +++ b/lgsm/modules/command_backup.sh @@ -126,7 +126,7 @@ fn_backup_compression() { core_exit.sh fi - tar -czf "${backupdir}/${backupname}.tar.gz" -C "${rootdir}" --exclude "${excludedir}" --exclude "${lockdir}" ./. + tar -czf "${backupdir}/${backupname}.tar.gz" -C "${rootdir}" --exclude "${excludedir}" --exclude "${lockdir}" --exclude "${tmpdir}" ./. local exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol From dea17e9d9ade814a2f963cec49411685eeb53fc0 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 24 Nov 2023 12:39:52 +0000 Subject: [PATCH 303/374] feat: add port command for DayZ server This commit adds a new port command for the DayZ server in the info_messages.sh file. The port command is used to retrieve information about the DayZ server's ports using the "enfMain" keyword. --- lgsm/modules/info_messages.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index abddf9fc6..59d876fcc 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -692,6 +692,8 @@ fn_info_messages_ports() { portcommand="ss -tuplwn | grep AvorionServer" elif [ "${shortname}" == "bf1942" ]; then portcommand="ss -tuplwn | grep bf1942_lnxded" + elif [ "${shortname}" == "dayz" ]; then + portcommand="ss -tuplwn | grep enfMain" elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "nec" ] || [ "${shortname}" == "pmc" ] || [ "${shortname}" == "vpmc" ] || [ "${shortname}" == "wmc" ]; then portcommand="ss -tuplwn | grep java" elif [ "${shortname}" == "terraria" ]; then From e78a9dfbd79e122d5fda08a79d1a44184d08fd8a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 24 Nov 2023 13:04:59 +0000 Subject: [PATCH 304/374] feat(dayz): enable Steam master server Enables the Steam master server in the default configuration file for DayZ servers. --- lgsm/config-default/config-lgsm/dayzserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/dayzserver/_default.cfg b/lgsm/config-default/config-lgsm/dayzserver/_default.cfg index ed9e8783c..0d5bf5e3e 100644 --- a/lgsm/config-default/config-lgsm/dayzserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dayzserver/_default.cfg @@ -128,7 +128,7 @@ steamcmdforcewindows="no" branch="" betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server -steammaster="false" +steammaster="true" ## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill From ef3114b5c083e5e444ebc177736c4a4ad20c1ea8 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 25 Nov 2023 01:18:33 +0000 Subject: [PATCH 305/374] fix(nmrih): add if statements for symlink fixes This commit fixes an issue where certain server files were missing. Symbolic links are now created for the following files if they do not already exist: vphysics.so, studiorender.so, soundemittersystem.so, shaderapiempty.so, scenefilecache.so, replay.so, and materialsystem.so. --- lgsm/modules/fix_nmrih.sh | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/lgsm/modules/fix_nmrih.sh b/lgsm/modules/fix_nmrih.sh index 83a5ad412..dfbb76d92 100644 --- a/lgsm/modules/fix_nmrih.sh +++ b/lgsm/modules/fix_nmrih.sh @@ -8,10 +8,24 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -ln -s "${serverfiles}/bin/vphysics_srv.so" "${serverfiles}/bin/vphysics.so" -ln -s "${serverfiles}/bin/studiorender_srv.so" "${serverfiles}/bin/studiorender.so" -ln -s "${serverfiles}/bin/soundemittersystem_srv.so" "${serverfiles}/bin/soundemittersystem.so" -ln -s "${serverfiles}/bin/shaderapiempty_srv.so" "${serverfiles}/bin/shaderapiempty.so" -ln -s "${serverfiles}/bin/scenefilecache_srv.so" "${serverfiles}/bin/scenefilecache.so" -ln -s "${serverfiles}/bin/replay_srv.so" "${serverfiles}/bin/replay.so" -ln -s "${serverfiles}/bin/materialsystem_srv.so" "${serverfiles}/bin/materialsystem.so" +if [ ! -f "${serverfiles}/bin/vphysics.so" ]; then + ln -s "${serverfiles}/bin/vphysics_srv.so" "${serverfiles}/bin/vphysics.so" +fi +if [ ! -f "${serverfiles}/bin/studiorender.so" ]; then + ln -s "${serverfiles}/bin/studiorender_srv.so" "${serverfiles}/bin/studiorender.so" +fi +if [ ! -f "${serverfiles}/bin/soundemittersystem.so" ]; then + ln -s "${serverfiles}/bin/soundemittersystem_srv.so" "${serverfiles}/bin/soundemittersystem.so" +fi +if [ ! -f "${serverfiles}/bin/shaderapiempty.so" ]; then + ln -s "${serverfiles}/bin/shaderapiempty_srv.so" "${serverfiles}/bin/shaderapiempty.so" +fi +if [ ! -f "${serverfiles}/bin/scenefilecache.so" ]; then + ln -s "${serverfiles}/bin/scenefilecache_srv.so" "${serverfiles}/bin/scenefilecache.so" +fi +if [ ! -f "${serverfiles}/bin/replay.so" ]; then + ln -s "${serverfiles}/bin/replay_srv.so" "${serverfiles}/bin/replay.so" +fi +if [ ! -f "${serverfiles}/bin/materialsystem.so" ]; then + ln -s "${serverfiles}/bin/materialsystem_srv.so" "${serverfiles}/bin/materialsystem.so" +fi From 6f811a5a19005b187fd7f7cc935c4a7bc7ab7215 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 25 Nov 2023 21:19:23 +0000 Subject: [PATCH 306/374] fix: only run extra steamcmd command if using GitHub Actions --- lgsm/modules/core_steamcmd.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lgsm/modules/core_steamcmd.sh b/lgsm/modules/core_steamcmd.sh index e628e44b9..326fecf70 100644 --- a/lgsm/modules/core_steamcmd.sh +++ b/lgsm/modules/core_steamcmd.sh @@ -179,7 +179,9 @@ fn_update_steamcmd_remotebuild() { fi # added as was failing GitHub Actions test. Running SteamCMD twice seems to fix it. - ${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +quit > /dev/null 2>&1 + if [ "${CI}" ]; then + ${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +quit > /dev/null 2>&1 + fi # password for branch not needed to check the buildid remotebuildversion=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed -e '/"branches"/,/^}/!d' | sed -n "/\"${branch}\"/,/}/p" | grep -m 1 buildid | tr -cd '[:digit:]') From 433444a1e7a5ea7baf4bd8023b80fdb4623d93d1 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 25 Nov 2023 21:19:44 +0000 Subject: [PATCH 307/374] fix: word change --- lgsm/modules/core_getopt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/modules/core_getopt.sh b/lgsm/modules/core_getopt.sh index 1003839ea..685e1ce8b 100644 --- a/lgsm/modules/core_getopt.sh +++ b/lgsm/modules/core_getopt.sh @@ -22,7 +22,7 @@ cmd_update_linuxgsm=("ul;update-lgsm;uf;update-modules" "command_update_linuxgsm cmd_test_alert=("ta;test-alert" "command_test_alert.sh" "Send a test alert.") cmd_monitor=("m;monitor" "command_monitor.sh" "Check server status and restart if crashed.") cmd_skeleton=("sk;skeleton" "command_skeleton.sh" "Create a skeleton directory.") -cmd_sponsor=("s;sponsor" "command_sponsor.sh" "Donation options.") +cmd_sponsor=("s;sponsor" "command_sponsor.sh" "Sponsorship options.") cmd_send=("sd;send" "command_send.sh" "Send command to game server console.") # Console servers only. cmd_console=("c;console" "command_console.sh" "Access server console.") From 9598fccdbd700426809a1bb9a02f8d7201c7aac4 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 25 Nov 2023 22:00:06 +0000 Subject: [PATCH 308/374] fix(install): non-free is now correctly detected (#4390) Debian has added non-free-firmware repo. This was being detected alongside non-free and causing issues with steamcmd installation. this fix ensures non-free is only detected. --- lgsm/modules/check_deps.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/modules/check_deps.sh b/lgsm/modules/check_deps.sh index b7b9f4758..f92a60840 100644 --- a/lgsm/modules/check_deps.sh +++ b/lgsm/modules/check_deps.sh @@ -252,7 +252,7 @@ fn_deps_detector() { elif [ "${deptocheck}" == "steamcmd" ] && [ -z "${appid}" ]; then array_deps_required=("${array_deps_required[@]/steamcmd/}") steamcmdstatus=1 - elif [ "${deptocheck}" == "steamcmd" ] && [ "${distroid}" == "debian" ] && ! grep -qE "^deb .*non-free" /etc/apt/sources.list; then + elif [ "${deptocheck}" == "steamcmd" ] && [ "${distroid}" == "debian" ] && ! grep -qE '[^deb]+non-free([^-]|$)' /etc/apt/sources.list; then array_deps_required=("${array_deps_required[@]/steamcmd/}") steamcmdstatus=1 # Java: Added for users using Oracle JRE to bypass check. From 3ebc5febbfeb156eded4f02e0ed9e37b05bf6fcb Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 25 Nov 2023 23:25:11 +0000 Subject: [PATCH 309/374] fix(kf): ensure newer steamclient.so is copied to serverfiles (#4391) * master server true * move samp fix to pre start * bug * fix(kf): ensure newer steamclient.so is copied to serverfiles will allow KF Server to how in steam game server list --- .../config-lgsm/kfserver/_default.cfg | 2 +- lgsm/modules/fix.sh | 4 +- lgsm/modules/fix_armar.sh | 2 +- lgsm/modules/fix_kf.sh | 129 ++++++++++++++---- 4 files changed, 109 insertions(+), 28 deletions(-) diff --git a/lgsm/config-default/config-lgsm/kfserver/_default.cfg b/lgsm/config-default/config-lgsm/kfserver/_default.cfg index 4aa128830..969c5c65c 100644 --- a/lgsm/config-default/config-lgsm/kfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/kfserver/_default.cfg @@ -121,7 +121,7 @@ steamcmdforcewindows="no" branch="" betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server -steammaster="false" +steammaster="true" ## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill diff --git a/lgsm/modules/fix.sh b/lgsm/modules/fix.sh index 2f8b5442a..280112728 100644 --- a/lgsm/modules/fix.sh +++ b/lgsm/modules/fix.sh @@ -52,8 +52,8 @@ fn_apply_fix() { fi } -apply_pre_start_fix=(arma3 armar ark av bt bo csgo cmw dst hw ins nmrih onset pvr rust rw sdtd sfc sof2 squad st tf2 terraria ts3 mcb mta unt vh wurm zmr) -apply_post_install_fix=(av kf kf2 ro samp ut2k4 ut ut3) +apply_pre_start_fix=(arma3 armar ark av bt bo csgo cmw dst hw ins kf nmrih onset pvr rust rw samp sdtd sfc sof2 squad st tf2 terraria ts3 mcb mta unt vh wurm zmr) +apply_post_install_fix=(av kf kf2 ro ut2k4 ut ut3) # validate registered fixes for safe development for fix in "${apply_pre_start_fix[@]}" "${apply_post_install_fix[@]}"; do diff --git a/lgsm/modules/fix_armar.sh b/lgsm/modules/fix_armar.sh index 6b68c2a63..ae2c08f33 100755 --- a/lgsm/modules/fix_armar.sh +++ b/lgsm/modules/fix_armar.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Resolves issues with Arma Reforger. -module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Fixes: Profile directory doesn't exist. # Issue Link: https://feedback.bistudio.com/T164845 diff --git a/lgsm/modules/fix_kf.sh b/lgsm/modules/fix_kf.sh index 1bec47a4b..e38b5883a 100644 --- a/lgsm/modules/fix_kf.sh +++ b/lgsm/modules/fix_kf.sh @@ -7,30 +7,111 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -echo -e "applying WebAdmin ROOst.css fix." -echo -e "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13" +# echo -e "applying WebAdmin ROOst.css fix." +# echo -e "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13" sed -i 's/none}/none;/g' "${serverfiles}/Web/ServerAdmin/ROOst.css" sed -i 's/underline}/underline;/g' "${serverfiles}/Web/ServerAdmin/ROOst.css" -fn_sleep_time -echo -e "applying WebAdmin CharSet fix." -echo -e "http://forums.tripwireinteractive.com/showpost.php?p=442340&postcount=1" +# echo -e "applying WebAdmin CharSet fix." +# echo -e "http://forums.tripwireinteractive.com/showpost.php?p=442340&postcount=1" sed -i 's/CharSet="iso-8859-1"/CharSet="utf-8"/g' "${systemdir}/UWeb.int" -fn_sleep_time -echo -e "applying server name fix." -fn_sleep_time -echo -e "forcing server restart..." -fn_sleep_time -exitbypass=1 -command_start.sh -fn_firstcommand_reset -fn_sleep_time_5 -exitbypass=1 -command_stop.sh -fn_firstcommand_reset -exitbypass=1 -command_start.sh -fn_firstcommand_reset -fn_sleep_time_5 -exitbypass=1 -command_stop.sh -fn_firstcommand_reset + +# get md5sum of steamclient.so +if [ -f "${serverfiles}/System/steamclient.so" ]; then + steamclientmd5=$(md5sum "${serverfiles}/System/steamclient.so" | awk '{print $1;}') +fi +#get md5sum of libtier0_s.so +if [ -f "${serverfiles}/System/libtier0_s.so" ]; then + libtier0_smd5=$(md5sum "${serverfiles}/System/libtier0_s.so" | awk '{print $1;}') +fi +#get md5sum of libvstdlib_s.so +if [ -f "${serverfiles}/System/libvstdlib_s.so" ]; then + libvstdlib_smd5=$(md5sum "${serverfiles}/System/libvstdlib_s.so" | awk '{print $1;}') +fi + +# get md5sum of steamclient.so from steamcmd +if [ -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" ]; then + steamcmdsteamclientmd5=$(md5sum "${HOME}/.steam/steamcmd/linux32/steamclient.so" | awk '{print $1;}') +elif [ -f "${steamcmddir}/linux32/steamclient.so" ]; then + steamcmdsteamclientmd5=$(md5sum "${steamcmddir}/linux32/steamclient.so" | awk '{print $1;}') +elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux32/steamclient.so" ]; then + steamcmdsteamclientmd5=$(md5sum "${HOME}/.local/share/Steam/steamcmd/linux32/steamclient.so" | awk '{print $1;}') +fi + +# get md5sum of libtier0_s.so from steamcmd +if [ -f "${HOME}/.steam/steamcmd/linux32/libtier0_s.so" ]; then + steamcmdlibtier0_smd5=$(md5sum "${HOME}/.steam/steamcmd/linux32/libtier0_s.so" | awk '{print $1;}') +elif [ -f "${steamcmddir}/linux32/libtier0_s.so" ]; then + steamcmdlibtier0_smd5=$(md5sum "${steamcmddir}/linux32/libtier0_s.so" | awk '{print $1;}') +elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux32/libtier0_s.so" ]; then + steamcmdlibtier0_smd5=$(md5sum "${HOME}/.local/share/Steam/steamcmd/linux32/libtier0_s.so" | awk '{print $1;}') +fi + +# get md5sum of libvstdlib_s.so from steamcmd +if [ -f "${HOME}/.steam/steamcmd/linux32/libvstdlib_s.so" ]; then + steamcmdlibvstdlib_smd5=$(md5sum "${HOME}/.steam/steamcmd/linux32/libvstdlib_s.so" | awk '{print $1;}') +elif [ -f "${steamcmddir}/linux32/libvstdlib_s.so" ]; then + steamcmdlibvstdlib_smd5=$(md5sum "${steamcmddir}/linux32/libvstdlib_s.so" | awk '{print $1;}') +elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux32/libvstdlib_s.so" ]; then + steamcmdlibvstdlib_smd5=$(md5sum "${HOME}/.local/share/Steam/steamcmd/linux32/libvstdlib_s.so" | awk '{print $1;}') +fi + +if [ ! -f "${serverfiles}/System/steamclient.so" ] || [ "${steamcmdsteamclientmd5}" != "${steamclientmd5}" ]; then + fixname="steamclient.so x86" + fn_fix_msg_start + if [ -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" ]; then + cp "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${serverfiles}/System/steamclient.so" + elif [ -f "${steamcmddir}/linux32/steamclient.so" ]; then + cp "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/System/steamclient.so" + elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux32/steamclient.so" ]; then + cp "${HOME}/.local/share/Steam/steamcmd/linux32/steamclient.so" "${serverfiles}/System/steamclient.so" + fi + fn_fix_msg_end +fi + +if [ ! -f "${serverfiles}/System/libtier0_s.so" ] || [ "${steamcmdlibtier0_smd5}" != "${libtier0_smd5}" ]; then + fixname="libtier0_s.so" + fn_fix_msg_start + if [ -f "${HOME}/.steam/steamcmd/linux32/libtier0_s.so" ]; then + cp "${HOME}/.steam/steamcmd/linux32/libtier0_s.so" "${serverfiles}/System/libtier0_s.so" + elif [ -f "${steamcmddir}/linux32/libtier0_s.so" ]; then + cp "${steamcmddir}/linux32/libtier0_s.so" "${serverfiles}/System/libtier0_s.so" + elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux32/libtier0_s.so" ]; then + cp "${HOME}/.local/share/Steam/steamcmd/linux32/libtier0_s.so" "${serverfiles}/System/libtier0_s.so" + fi + fn_fix_msg_end +fi + +if [ ! -f "${serverfiles}/System/libvstdlib_s.so" ] || [ "${steamcmdlibvstdlib_smd5}" != "${libvstdlib_smd5}" ]; then + fixname="libvstdlib_s.so" + fn_fix_msg_start + if [ -f "${HOME}/.steam/steamcmd/linux32/libvstdlib_s.so" ]; then + cp "${HOME}/.steam/steamcmd/linux32/libvstdlib_s.so" "${serverfiles}/System/libvstdlib_s.so" + elif [ -f "${steamcmddir}/linux32/libvstdlib_s.so" ]; then + cp "${steamcmddir}/linux32/libvstdlib_s.so" "${serverfiles}/System/libvstdlib_s.so" + elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux32/libvstdlib_s.so" ]; then + cp "${HOME}/.local/share/Steam/steamcmd/linux32/libvstdlib_s.so" "${serverfiles}/System/libvstdlib_s.so" + fi + fn_fix_msg_end +fi + +# if running install command +if [ "${commandname}" == "INSTALL" ]; then + echo -e "applying server name fix." + fn_sleep_time + echo -e "forcing server restart..." + fn_sleep_time + exitbypass=1 + command_start.sh + fn_firstcommand_reset + fn_sleep_time_5 + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + exitbypass=1 + command_start.sh + fn_firstcommand_reset + fn_sleep_time_5 + exitbypass=1 + command_stop.sh + fn_firstcommand_reset +fi From b59eeecb54a21f4db18e5fa4a90bf3ca54f0362a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 26 Nov 2023 23:44:06 +0000 Subject: [PATCH 310/374] feat(ns2): update start parameters to add mod server (#4396) also removed mod2 as no longer required as per NS2 dedi server docs --- lgsm/config-default/config-lgsm/ns2server/_default.cfg | 7 ++++--- lgsm/modules/info_game.sh | 7 ++++--- lgsm/modules/info_messages.sh | 1 + 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lgsm/config-default/config-lgsm/ns2server/_default.cfg b/lgsm/config-default/config-lgsm/ns2server/_default.cfg index 8cca4da81..c7c09c47d 100644 --- a/lgsm/config-default/config-lgsm/ns2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2server/_default.cfg @@ -13,18 +13,19 @@ ip="0.0.0.0" port="27015" defaultmap="ns2_summit" maxplayers="24" +maxspectators="0" servername="LinuxGSM" httpuser="admin" httppassword="admin" httpport="8080" -mods="" +modserverport="27031" serverpassword="" # Add the following line to the parms if you want a private server. Ensuring # that the password variable above is not left empty. -# -password \"${serverpassword}\" +# -password '${serverpassword}' ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-name \"${servername}\" -port ${port} -webadmin -webdomain ${ip} -webuser ${httpuser} -webpassword \"${httppassword}\" -webport ${httpport} -map ${defaultmap} -limit ${maxplayers} -config_path \"${servercfgdir}\" -logdir \"${gamelogdir}\" -modstorage \"${modstoragedir}\" -mods2 \"${mods}\"" +startparameters="-name '${servername}' -port ${port} -webadmin -webdomain ${ip} -webuser ${httpuser} -webpassword '${httppassword}' -webport ${httpport} -startmodserver -modserverport ${modserverport} -map ${defaultmap} -limit ${maxplayers} -speclimit ${maxspectators} -config_path '${servercfgdir}' -logdir '${gamelogdir}' -modstorage '${modstoragedir}'" #### LinuxGSM Settings #### diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 0365660a6..9f6bb7370 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -2033,14 +2033,15 @@ fn_info_game_source() { fn_info_game_spark() { defaultmap="${defaultmap:-"NOT SET"}" + httppassword="${httppassword:-"NOT SET"}" + httpport="${httpport:-"0"}" + httpuser="${httpuser:-"NOT SET"}" maxplayers="${maxplayers:-"0"}" + modserverport=${modserverport:-"0"} port="${port:-"0"}" queryport="$((port + 1))" servername="${servername:-"NOT SET"}" serverpassword="${serverpassword:-"NOT SET"}" - httpuser="${httpuser:-"NOT SET"}" - httppassword="${httppassword:-"NOT SET"}" - httpport="${httpport:-"0"}" } # Config Type: Custom (key-value pairs) diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index 59d876fcc..09dd4c2ad 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -1468,6 +1468,7 @@ fn_info_messages_spark() { fn_port "header" fn_port "Game" port udp fn_port "Query" queryport udp + fn_port "Mod Server" modserverport tcp fn_port "Web Interface" httpport tcp } | column -s $'\t' -t echo -e "" From 3961a22430308891a330f44938f353d5586117ec Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 27 Nov 2023 00:03:23 +0000 Subject: [PATCH 311/374] fix(q3): mapcycle now working correctly #3749 --- lgsm/config-default/config-lgsm/q3server/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/q3server/_default.cfg b/lgsm/config-default/config-lgsm/q3server/_default.cfg index 534bf2429..0a54d2852 100644 --- a/lgsm/config-default/config-lgsm/q3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/q3server/_default.cfg @@ -14,7 +14,7 @@ port="27960" defaultmap="q3dm17" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +set com_hunkMegs 32 +set net_ip ${ip} +set net_port ${port} +exec ${servercfg} +map ${defaultmap}" +startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +set com_hunkMegs 32 +set net_ip ${ip} +set net_port ${port} +map ${defaultmap} +exec ${servercfg}" #### LinuxGSM Settings #### From ddb61478f18dfdeb7a4bc7d0a8ee97232cd1e513 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 27 Nov 2023 14:14:32 +0000 Subject: [PATCH 312/374] fix: move exec to end of parameters idtech --- lgsm/config-default/config-lgsm/cod2server/_default.cfg | 2 +- lgsm/config-default/config-lgsm/cod4server/_default.cfg | 2 +- lgsm/config-default/config-lgsm/codserver/_default.cfg | 2 +- lgsm/config-default/config-lgsm/coduoserver/_default.cfg | 2 +- lgsm/config-default/config-lgsm/codwawserver/_default.cfg | 2 +- lgsm/config-default/config-lgsm/jk2server/_default.cfg | 2 +- lgsm/config-default/config-lgsm/mohaaserver/_default.cfg | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lgsm/config-default/config-lgsm/cod2server/_default.cfg b/lgsm/config-default/config-lgsm/cod2server/_default.cfg index 95b76ae1e..98ea0afb7 100644 --- a/lgsm/config-default/config-lgsm/cod2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod2server/_default.cfg @@ -15,7 +15,7 @@ defaultmap="mp_leningrad" maxplayers="20" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxplayers} +exec ${servercfg} +map ${defaultmap}" +startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxplayers} +map ${defaultmap} +exec ${servercfg}" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/cod4server/_default.cfg b/lgsm/config-default/config-lgsm/cod4server/_default.cfg index a93237894..cde7e0113 100644 --- a/lgsm/config-default/config-lgsm/cod4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod4server/_default.cfg @@ -15,7 +15,7 @@ defaultmap="mp_crossfire" maxplayers="32" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set fs_homepath ${serverfiles} +set sv_authorizemode "-1" +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxplayers} +exec ${servercfg} +map ${defaultmap}" +startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set fs_homepath ${serverfiles} +set sv_authorizemode "-1" +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxplayers} +map ${defaultmap} +exec ${servercfg}" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/codserver/_default.cfg b/lgsm/config-default/config-lgsm/codserver/_default.cfg index 6263d79b6..1c0a0902c 100644 --- a/lgsm/config-default/config-lgsm/codserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codserver/_default.cfg @@ -15,7 +15,7 @@ defaultmap="mp_neuville" maxplayers="20" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxplayers} +exec ${servercfg} +map ${defaultmap}" +startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxplayers} +map ${defaultmap} +exec ${servercfg}" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg index b7c6036b9..b3f89889f 100644 --- a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg @@ -15,7 +15,7 @@ defaultmap="mp_cassino" maxplayers="20" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxplayers} +exec ${servercfg} +map ${defaultmap}" +startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxplayers} +map ${defaultmap} +exec ${servercfg}" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg index 0820475f1..e906fcf07 100644 --- a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg @@ -15,7 +15,7 @@ defaultmap="mp_castle" maxplayers="20" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxplayers} +exec ${servercfg} +map ${defaultmap}" +startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxplayers} +map ${defaultmap} +exec ${servercfg}" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/jk2server/_default.cfg b/lgsm/config-default/config-lgsm/jk2server/_default.cfg index 4d49e4e7e..d14b052c2 100644 --- a/lgsm/config-default/config-lgsm/jk2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jk2server/_default.cfg @@ -18,7 +18,7 @@ port="27960" defaultmap="ffa_bespin" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set net_ip ${ip} +set net_port ${port} +exec ${servercfg} +map ${defaultmap}" +startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set net_ip ${ip} +set net_port ${port} +map ${defaultmap} +exec ${servercfg}" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg index a457832cf..a53e55bfc 100644 --- a/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg @@ -14,7 +14,7 @@ port="12203" defaultmap="dm/mohdm1" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set fs_outputpath ${gamelogdir} +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +exec ${servercfg} +map ${defaultmap}" +startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set fs_outputpath ${gamelogdir} +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +map ${defaultmap} +exec ${servercfg} " #### LinuxGSM Settings #### From 366701fe361b4869f14c7664cec373ed4ddf8eaf Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 29 Nov 2023 22:54:32 +0000 Subject: [PATCH 313/374] fix(ns2): adjusted player numbers for ranked --- lgsm/config-default/config-lgsm/ns2server/_default.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/config-default/config-lgsm/ns2server/_default.cfg b/lgsm/config-default/config-lgsm/ns2server/_default.cfg index c7c09c47d..32d0bcb20 100644 --- a/lgsm/config-default/config-lgsm/ns2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2server/_default.cfg @@ -12,8 +12,8 @@ ip="0.0.0.0" port="27015" defaultmap="ns2_summit" -maxplayers="24" -maxspectators="0" +maxplayers="20" +maxspectators="5" servername="LinuxGSM" httpuser="admin" httppassword="admin" From 6a56a18b1ff370292a33e82faaabe3532705b15e Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 29 Nov 2023 23:01:59 +0000 Subject: [PATCH 314/374] feat: added more checks for insecure passwords --- .../config-lgsm/inssserver/_default.cfg | 2 +- .../config-lgsm/ns2cserver/_default.cfg | 2 +- .../config-default/config-lgsm/ns2server/_default.cfg | 2 +- .../config-lgsm/wurmserver/_default.cfg | 2 +- lgsm/modules/check_config.sh | 11 +++++++++-- lgsm/modules/info_game.sh | 9 +-------- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lgsm/config-default/config-lgsm/inssserver/_default.cfg b/lgsm/config-default/config-lgsm/inssserver/_default.cfg index 8d14e79ea..d4d485d68 100644 --- a/lgsm/config-default/config-lgsm/inssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/inssserver/_default.cfg @@ -13,7 +13,7 @@ ip="0.0.0.0" port="27102" queryport="27131" rconport="27015" -rconpassword="" +rconpassword="CHANGE_ME" servername="LinuxGSM" defaultmap="Oilfield" defaultscenario="Scenario_Refinery_Push_Security" diff --git a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg index fb4686c1e..b285d8cb0 100644 --- a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg @@ -15,7 +15,7 @@ defaultmap="co_core" maxplayers="24" servername="LinuxGSM" httpuser="admin" -httppassword="admin" +httppassword="CHANGE_ME" httpport="8080" mods="" serverpassword="" diff --git a/lgsm/config-default/config-lgsm/ns2server/_default.cfg b/lgsm/config-default/config-lgsm/ns2server/_default.cfg index 32d0bcb20..41970a2f4 100644 --- a/lgsm/config-default/config-lgsm/ns2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2server/_default.cfg @@ -16,7 +16,7 @@ maxplayers="20" maxspectators="5" servername="LinuxGSM" httpuser="admin" -httppassword="admin" +httppassword="CHANGE_ME" httpport="8080" modserverport="27031" serverpassword="" diff --git a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg index b27783cf4..901417aaf 100644 --- a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg @@ -27,7 +27,7 @@ homekingdom="4" # Unlocks the admin commands from within the game, that can be used to change # the gameplay settings of the server, such as skill gain rate and field growth time. -adminpassword="ADMINPASSWORD" +adminpassword="CHANGE_ME" # If true the server will follow the rules from the Epic servers in Wurm Online. # For instance it will use the skill curve. diff --git a/lgsm/modules/check_config.sh b/lgsm/modules/check_config.sh index 42892a191..d8bfb5008 100644 --- a/lgsm/modules/check_config.sh +++ b/lgsm/modules/check_config.sh @@ -19,8 +19,15 @@ if [ "${shortname}" == "rust" ] && [ -v rconpassword ] && [ -z "${rconpassword}" fn_print_fail_nl "RCON password is not set" fn_script_log_warn "RCON password is not set" elif [ -v rconpassword ] && [ "${rconpassword}" == "CHANGE_ME" ]; then - fn_print_warn_nl "Default RCON Password detected" - fn_script_log_warn "Default RCON Password detected" + fn_print_warn_nl "Default RCON password detected" + fn_script_log_warn "Default RCON password detected" +elif [ -v httppassword ] && [ "${httppassword}" == "CHANGE_ME" ]; then + fn_print_warn_nl "Default Web password detected" + fn_script_log_warn "Default Web password detected" +elif [ -v adminpassword ] && [ "${adminpassword}" == "CHANGE_ME" ]; then + fn_print_warn_nl "Default Admin password detected" + fn_script_log_warn "Default Admin password detected" + fi if [ "${shortname}" == "vh" ] && [ -z "${serverpassword}" ]; then diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 9f6bb7370..cfa0a5c05 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -1832,14 +1832,7 @@ fn_info_game_rw() { # example: hostname "SERVERNAME" # filetypes: cfg fn_info_game_samp() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="unnamed server" - rconpassword="${unavailable}" - port="7777" - rconport="${port}" - maxplayers="50" - else + if [ -f "${servercfgfullpath}" ]; then servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/^rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') port=$(grep "port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') From ef6410efec1ffe2199bde982f7aea9d14da9338d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 30 Nov 2023 21:00:29 +0000 Subject: [PATCH 315/374] feat: deprecate crafting dead --- .../config-lgsm/cdserver/_default.cfg | 178 ------------------ lgsm/data/serverlist.csv | 1 - lgsm/modules/info_messages.sh | 4 +- lgsm/modules/install_config.sh | 6 - 4 files changed, 1 insertion(+), 188 deletions(-) delete mode 100644 lgsm/config-default/config-lgsm/cdserver/_default.cfg diff --git a/lgsm/config-default/config-lgsm/cdserver/_default.cfg b/lgsm/config-default/config-lgsm/cdserver/_default.cfg deleted file mode 100644 index 28deeb6e6..000000000 --- a/lgsm/config-default/config-lgsm/cdserver/_default.cfg +++ /dev/null @@ -1,178 +0,0 @@ -################################## -######## Default Settings ######## -################################## -# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! -# Copy settings from here and use them in either: -# common.cfg - applies settings to every instance. -# [instance].cfg - applies settings to a specific instance. - -#### Game Server Settings #### - -## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-batchmode -nographics" - -#### LinuxGSM Settings #### - -## LinuxGSM Stats -# Send useful stats to LinuxGSM developers. -# https://docs.linuxgsm.com/configuration/linuxgsm-stats -# (on|off) -stats="off" - -## Notification Alerts -# (on|off) - -# Display IP | https://docs.linuxgsm.com/alerts#display-ip -displayip="" - -# More info | https://docs.linuxgsm.com/alerts#more-info -postalert="off" - -# Alert on Start/Stop/Restart -statusalert="off" - -# Discord Alerts | https://docs.linuxgsm.com/alerts/discord -discordalert="off" -discordwebhook="webhook" - -# Email Alerts | https://docs.linuxgsm.com/alerts/email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify -gotifyalert="off" -gotifytoken="token" -gotifywebhook="webhook" - -# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt -iftttalert="off" -ifttttoken="accesstoken" -iftttevent="linuxgsm_alert" - -# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover -pushoveralert="off" -pushovertoken="accesstoken" -pushoveruserkey="userkey" - -# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat -rocketchatalert="off" -rocketchatwebhook="webhook" - -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - -# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram -# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". -telegramapi="api.telegram.org" -telegramalert="off" -telegramtoken="accesstoken" -telegramchatid="" -curlcustomstring="" - -## Updating | https://docs.linuxgsm.com/commands/update -updateonstart="off" - -## Backup | https://docs.linuxgsm.com/commands/backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://docs.linuxgsm.com/features/logging -consolelogging="on" -logdays="7" - -## Monitor | https://docs.linuxgsm.com/commands/monitor -# Query delay time -querydelay="1" - -## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors -ansi="on" - -#### Advanced Settings #### - -## Message Display Time | https://docs.linuxgsm.com/features/message-display-time -sleeptime="0.5" - -## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd -# Server appid -appid="685100" -steamcmdforcewindows="no" -# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch -branch="" -betapassword="" -# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server -steammaster="false" - -## Stop Mode | https://docs.linuxgsm.com/features/stop-mode -# 1: tmux kill -# 2: CTRL+c -# 3: quit -# 4: quit 120s -# 5: stop -# 6: q -# 7: exit -# 8: 7 Days to Die -# 9: GoldSrc -# 10: Avorion -# 11: end -stopmode="2" - -## Query mode -# 1: session only -# 2: gamedig (gsquery fallback) -# 3: gamedig -# 4: gsquery -# 5: tcp -querymode="1" -querytype="" - -## Console type -consoleverbose="yes" -consoleinteract="no" - -## Game Server Details -# Do not edit -gamename="Crafting Dead" -engine="unity3d" -glibc="2.15" - -#### Directories #### -# Edit with care - -## Game Server Directories -systemdir="${serverfiles}" -executabledir="${serverfiles}" -executable="./crafting_dead.x86_64" -servercfgdir="${systemdir}" -servercfg="properties.json" -servercfgdefault="properties.json" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${lgsmdir}/backup" - -## Logging Directories -[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" -gamelogdir="${systemdir}/logs" -lgsmlogdir="${logdir}/script" -consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${selfname}-script.log" -consolelog="${consolelogdir}/${selfname}-console.log" -alertlog="${lgsmlogdir}/${selfname}-alert.log" -postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" - -## Logs Naming -lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -## Log Parameters -logtimestamp="off" -logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 1dd6dda2c..20ea2e6c7 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -18,7 +18,6 @@ bs,bsserver,Blade Symphony,ubuntu-22.04 bt,btserver,Barotrauma,ubuntu-22.04 btl,btlserver,BATTALION: Legacy,ubuntu-20.04 cc,ccserver,Codename CURE,ubuntu-22.04 -cd,cdserver,Crafting Dead,ubuntu-22.04 ck,ckserver,Core Keeper,ubuntu-22.04 cmw,cmwserver,Chivalry: Medieval Warfare,ubuntu-22.04 cod,codserver,Call of Duty,ubuntu-22.04 diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index 09dd4c2ad..fe019da44 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -663,7 +663,7 @@ fn_info_messages_ports_edit() { startparameterslocation="${red}UNKNOWN${default}" # engines/games that require editing in the config file. - local ports_edit_array=("ac" "arma3" "armar" "bo" "bt" "cd" "ct" "dst" "eco" "idtech2" "idtech3" "idtech3_ql" "jc2" "jc3" "lwjgl2" "mcb" "nec" "pc" "pc2" "prism3d" "pz" "qw" "refractor" "renderware" "rw" "sb" "sdtd" "st" "stn" "ts3" "tw" "terraria" "unreal" "unreal2" "unreal3" "vints" "wurm") + local ports_edit_array=("ac" "arma3" "armar" "bo" "bt" "ct" "dst" "eco" "idtech2" "idtech3" "idtech3_ql" "jc2" "jc3" "lwjgl2" "mcb" "nec" "pc" "pc2" "prism3d" "pz" "qw" "refractor" "renderware" "rw" "sb" "sdtd" "st" "stn" "ts3" "tw" "terraria" "unreal" "unreal2" "unreal3" "vints" "wurm") for port_edit in "${ports_edit_array[@]}"; do if [ "${shortname}" == "ut3" ]; then startparameterslocation="${servercfgdir}/UTWeb.ini" @@ -1708,8 +1708,6 @@ fn_info_messages_select_engine() { fn_info_messages_bt elif [ "${shortname}" == "btl" ]; then fn_info_messages_btl - elif [ "${shortname}" == "cd" ]; then - fn_info_messages_cd elif [ "${shortname}" == "ck" ]; then fn_info_messages_ck elif [ "${shortname}" == "cs2" ]; then diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index 45773f63c..0e688b65d 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -286,12 +286,6 @@ elif [ "${shortname}" == "bmdm" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations -elif [ "${shortname}" == "cd" ]; then - array_configs+=(properties.json) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations elif [ "${shortname}" == "ck" ]; then array_configs+=(ServerConfig.json) fn_fetch_default_config From 746c413314c3ab1790c42623c542919b388c2707 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 30 Nov 2023 21:01:00 +0000 Subject: [PATCH 316/374] feat(ns2c): tidy parameters --- lgsm/config-default/config-lgsm/ns2cserver/_default.cfg | 2 +- lgsm/modules/info_game.sh | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg index b285d8cb0..5fa692c08 100644 --- a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg @@ -24,7 +24,7 @@ serverpassword="" # -password \"${serverpassword}\" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-name \"${servername}\" -port ${port} -webadmin -webdomain ${ip} -webuser ${httpuser} -webpassword \"${httppassword}\" -webport ${httpport} -map ${defaultmap} -limit ${maxplayers} -config_path \"${servercfgdir}\" -modstorage \"${modstoragedir}\" -mods \"${mods}\"" +startparameters="-name '${servername}' -port ${port} -webadmin -webdomain ${ip} -webuser ${httpuser} -webpassword '${httppassword}' -webport ${httpport} -map ${defaultmap} -limit ${maxplayers} -config_path '${servercfgdir}' -modstorage '${modstoragedir}' -mods '${mods}'" #### LinuxGSM Settings #### diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index cfa0a5c05..d22570716 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -2268,8 +2268,6 @@ elif [ "${shortname}" == "bt" ]; then fn_info_game_bt elif [ "${shortname}" == "btl" ]; then fn_info_game_btl -elif [ "${shortname}" == "cd" ]; then - fn_info_game_cd elif [ "${shortname}" == "ck" ]; then fn_info_game_ck elif [ "${shortname}" == "cmw" ]; then From 38079bac8418ae9c5b4bd20b62fac32a9e4daccc Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 30 Nov 2023 21:21:11 +0000 Subject: [PATCH 317/374] feat(new server): Quake 4 (#4398) --- .../config-lgsm/q4server/_default.cfg | 186 ++++++++++++++++++ lgsm/data/almalinux-8.csv | 1 + lgsm/data/almalinux-9.csv | 1 + lgsm/data/centos-7.csv | 1 + lgsm/data/centos-8.csv | 1 + lgsm/data/centos-9.csv | 1 + lgsm/data/debian-10.csv | 1 + lgsm/data/debian-11.csv | 1 + lgsm/data/debian-12.csv | 1 + lgsm/data/debian-9.csv | 1 + lgsm/data/gameicons/q4-icon.png | Bin 0 -> 786 bytes lgsm/data/rhel-7.csv | 1 + lgsm/data/rhel-8.csv | 1 + lgsm/data/rhel-9.csv | 1 + lgsm/data/rocky-8.csv | 1 + lgsm/data/rocky-9.csv | 1 + lgsm/data/serverlist.csv | 1 + lgsm/data/ubuntu-16.04.csv | 1 + lgsm/data/ubuntu-18.04.csv | 1 + lgsm/data/ubuntu-20.04.csv | 1 + lgsm/data/ubuntu-22.04.csv | 1 + lgsm/data/ubuntu-23.04.csv | 1 + lgsm/data/ubuntu-23.10.csv | 1 + lgsm/modules/info_game.sh | 21 ++ lgsm/modules/info_messages.sh | 14 ++ lgsm/modules/install_config.sh | 6 + lgsm/modules/install_server_files.sh | 9 +- 27 files changed, 256 insertions(+), 1 deletion(-) create mode 100644 lgsm/config-default/config-lgsm/q4server/_default.cfg create mode 100644 lgsm/data/gameicons/q4-icon.png diff --git a/lgsm/config-default/config-lgsm/q4server/_default.cfg b/lgsm/config-default/config-lgsm/q4server/_default.cfg new file mode 100644 index 000000000..ffd311e3c --- /dev/null +++ b/lgsm/config-default/config-lgsm/q4server/_default.cfg @@ -0,0 +1,186 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! +# Copy settings from here and use them in either: +# common.cfg - applies settings to every instance. +# [instance].cfg - applies settings to a specific instance. + +#### Game Server Settings #### + +## SteamCMD Login | https://docs.linuxgsm.com/steamcmd#steamcmd-login +steamuser="username" +steampass='password' + +## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters +port="28004" + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set net_port ${port} +exec ${servercfg}" + +#### LinuxGSM Settings #### + +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + +## Notification Alerts +# (on|off) + +# Display IP | https://docs.linuxgsm.com/alerts#display-ip +displayip="" + +# More info | https://docs.linuxgsm.com/alerts#more-info +postalert="off" + +# Alert on Start/Stop/Restart +statusalert="off" + +# Discord Alerts | https://docs.linuxgsm.com/alerts/discord +discordalert="off" +discordwebhook="webhook" + +# Email Alerts | https://docs.linuxgsm.com/alerts/email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + +# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover +pushoveralert="off" +pushovertoken="accesstoken" +pushoveruserkey="userkey" + +# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat +rocketchatalert="off" +rocketchatwebhook="webhook" + +# Slack Alerts | https://docs.linuxgsm.com/alerts/slack +slackalert="off" +slackwebhook="webhook" + +# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram +# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +telegramapi="api.telegram.org" +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +curlcustomstring="" + +## Updating | https://docs.linuxgsm.com/commands/update +updateonstart="off" + +## Backup | https://docs.linuxgsm.com/commands/backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://docs.linuxgsm.com/features/logging +consolelogging="on" +logdays="7" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="1" + +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors +ansi="on" + +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time +sleeptime="0.5" + +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd +# Server appid +appid="2210" +steamcmdforcewindows="yes" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +betapassword="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="false" + +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode +# 1: tmux kill +# 2: CTRL+c +# 3: quit +# 4: quit 120s +# 5: stop +# 6: q +# 7: exit +# 8: 7 Days to Die +# 9: GoldSrc +# 10: Avorion +# 11: end +stopmode="3" + +## Query mode +# 1: session only +# 2: gamedig (gsquery fallback) +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="quake4" + +## Console type +consoleverbose="yes" +consoleinteract="yes" + +## Game Server Details +# Do not edit +gamename="Quake 4" +engine="idtech3_ql" +glibc="2.15" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}" +executabledir="${serverfiles}" +executable="./quake4-dedicated" +servercfgdir="${systemdir}/q4base" +servercfg="${selfname}.cfg" +servercfgdefault="server.cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" +gamelogdir="${logdir}/server" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +gamelog="${gamelogdir}/${selfname}-game.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index 561b3c134..6427b1460 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -89,6 +89,7 @@ pvr,libcxx pz,java-11-openjdk rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/almalinux-9.csv b/lgsm/data/almalinux-9.csv index 64a9e0645..2b6ea075d 100644 --- a/lgsm/data/almalinux-9.csv +++ b/lgsm/data/almalinux-9.csv @@ -89,6 +89,7 @@ pvr,libcxx pz,java-11-openjdk rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index a1b10095e..2c876efc2 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -89,6 +89,7 @@ pvr,libcxx pz,java-11-openjdk rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index 561b3c134..6427b1460 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -89,6 +89,7 @@ pvr,libcxx pz,java-11-openjdk rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/centos-9.csv b/lgsm/data/centos-9.csv index 64a9e0645..2b6ea075d 100644 --- a/lgsm/data/centos-9.csv +++ b/lgsm/data/centos-9.csv @@ -89,6 +89,7 @@ pvr,libcxx pz,java-11-openjdk rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index c890739c5..e7e81b75e 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -89,6 +89,7 @@ pvr,libc++1 pz,openjdk-11-jre,rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index c265a1f4b..a40fd1c7b 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -89,6 +89,7 @@ pvr,libc++1 pz,openjdk-17-jre,rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/debian-12.csv b/lgsm/data/debian-12.csv index 00351bde8..5141290ff 100644 --- a/lgsm/data/debian-12.csv +++ b/lgsm/data/debian-12.csv @@ -89,6 +89,7 @@ pvr,libc++1 pz,openjdk-17-jre,rng-tools5 q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index 6fd3c21ee..6deebf592 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -89,6 +89,7 @@ pvr,libc++1 pz,openjdk-8-jre,rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/gameicons/q4-icon.png b/lgsm/data/gameicons/q4-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..dd4c2d7fa46d79571053be5e7b7df59fa20c09c3 GIT binary patch literal 786 zcmV+t1MU2YP)8F2MF0Q*1_lcO4FCcX00RgC0s#vJ1Oov81pop700jUD82}I= z0aIouXL~(7R0kI;0Vg^G9xwwjMGjeTB12OiV01T2Tq-(F3vGftM_m&b8WeesO?;C^ zP*F<|4ij5!K7Ec>E;bwVP8=Tq00L4;L_t(I%S}_;mg_1EGsb{TLheZ~(@s18|C3uz zd)7MXOG<>0WI@k+N?C}R$6*#JDJWlt8ac60_kiIPl07QNb`hA1KP+)yB9Dhh=TX5pX2rtO`?d`6G52j` zt_{9CclEds)wV_MmVM^_m|5nnUldaWKipCIwK(k?3m!uf60f(>ihuST0VqhbzN^%T z?^R^pBTOSO`iu){V(0wY8;Z2I*0ySr3x*~hJ35dtCQx^EgveMcyFN(sM$xAghz#dT zcZm;>`NVv3;^e27gc5k>o`dA{t%0x8*)g1lK&>bkemEs?gTd%Cix0%BQmg`CUa93$8N7F%J8 z9A@&jVMh6+CwG$RuI}+mh|c|q+W*eD)AOD~2sumkQ3c$7TmbVmEav<3A1ulqYgKzI Q5dZ)H07*qoM6N<$f}~SJ*8l(j literal 0 HcmV?d00001 diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index 8a748cda7..373992242 100644 --- a/lgsm/data/rhel-7.csv +++ b/lgsm/data/rhel-7.csv @@ -89,6 +89,7 @@ pvr,libcxx pz,java-11-openjdk rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index 561b3c134..6427b1460 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -89,6 +89,7 @@ pvr,libcxx pz,java-11-openjdk rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/rhel-9.csv b/lgsm/data/rhel-9.csv index 64a9e0645..2b6ea075d 100644 --- a/lgsm/data/rhel-9.csv +++ b/lgsm/data/rhel-9.csv @@ -89,6 +89,7 @@ pvr,libcxx pz,java-11-openjdk rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index 561b3c134..6427b1460 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -89,6 +89,7 @@ pvr,libcxx pz,java-11-openjdk rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/rocky-9.csv b/lgsm/data/rocky-9.csv index 64a9e0645..2b6ea075d 100644 --- a/lgsm/data/rocky-9.csv +++ b/lgsm/data/rocky-9.csv @@ -89,6 +89,7 @@ pvr,libcxx pz,java-11-openjdk rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 20ea2e6c7..16c1e812f 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -87,6 +87,7 @@ pvr,pvrserver,Pavlov VR,ubuntu-22.04 pz,pzserver,Project Zomboid,ubuntu-22.04 q2,q2server,Quake 2,ubuntu-22.04 q3,q3server,Quake 3: Arena,ubuntu-22.04 +q4,q4server,Quake 4,ubuntu-22.04 ql,qlserver,Quake Live,ubuntu-22.04 qw,qwserver,Quake World,ubuntu-22.04 ricochet,ricochetserver,Ricochet,ubuntu-22.04 diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index e91bec26d..b2c62f49f 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -89,6 +89,7 @@ pvr,libc++1 pz,openjdk-8-jre,rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index c890739c5..e7e81b75e 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -89,6 +89,7 @@ pvr,libc++1 pz,openjdk-11-jre,rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index e66eb7dc6..e751ad7e3 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -89,6 +89,7 @@ pvr,libc++1 pz,openjdk-17-jre,rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index ffc637ab7..dfbe3f3e4 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -89,6 +89,7 @@ pvr,libc++1 pz,openjdk-17-jre,rng-tools5 q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/ubuntu-23.04.csv b/lgsm/data/ubuntu-23.04.csv index 65e17bf1b..24b6ef39e 100644 --- a/lgsm/data/ubuntu-23.04.csv +++ b/lgsm/data/ubuntu-23.04.csv @@ -89,6 +89,7 @@ pvr,libc++1 pz,openjdk-17-jre,rng-tools5 q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/ubuntu-23.10.csv b/lgsm/data/ubuntu-23.10.csv index 65e17bf1b..24b6ef39e 100644 --- a/lgsm/data/ubuntu-23.10.csv +++ b/lgsm/data/ubuntu-23.10.csv @@ -89,6 +89,7 @@ pvr,libc++1 pz,openjdk-17-jre,rng-tools5 q2 q3 +q4 ql qw ricochet diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index d22570716..81767408d 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -1685,6 +1685,25 @@ fn_info_game_q3() { defaultmap="${defaultmap:-"NOT SET"}" } +# Config Type: QuakeC +# Comment: // or /* */ +# fn_info_game_quakec "SERVERNAME" +# Filetype: cfg +fn_info_game_q4() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_quakec "maxplayers" "sv_maxclients" + fn_info_game_quakec "rconpassword" "net_serverRemoteConsolePassword" + fn_info_game_quakec "servername" "si_name" + fn_info_game_quakec "serverpassword" "g_password" + fi + maxplayers="${maxplayers:-"0"}" + rconpassword="${rconpassword:-"NOT SET"}" + servername="${servername:-"NOT SET"}" + port="${port:-"0"}" + queryport="${port}" + defaultmap="${defaultmap:-"NOT SET"}" +} + # Config Type: QuakeC # Comment: // or /* */ # Example: set sv_hostname "SERVERNAME" @@ -2346,6 +2365,8 @@ elif [ "${shortname}" == "q2" ]; then fn_info_game_q2 elif [ "${shortname}" == "q3" ]; then fn_info_game_q3 +elif [ "${shortname}" == "q4" ]; then + fn_info_game_q4 elif [ "${shortname}" == "ql" ]; then fn_info_game_ql elif [ "${shortname}" == "qw" ]; then diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index fe019da44..1e3bfad4b 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -694,6 +694,8 @@ fn_info_messages_ports() { portcommand="ss -tuplwn | grep bf1942_lnxded" elif [ "${shortname}" == "dayz" ]; then portcommand="ss -tuplwn | grep enfMain" + elif [ "${shortname}" == "q4" ]; then + portcommand="ss -tuplwn | grep q4ded.x86" elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "nec" ] || [ "${shortname}" == "pmc" ] || [ "${shortname}" == "vpmc" ] || [ "${shortname}" == "wmc" ]; then portcommand="ss -tuplwn | grep java" elif [ "${shortname}" == "terraria" ]; then @@ -1286,6 +1288,7 @@ fn_info_messages_q2() { { fn_port "header" fn_port "Game" port udp + fn_port "Query" queryport udp } | column -s $'\t' -t } @@ -1293,6 +1296,15 @@ fn_info_messages_q3() { { fn_port "header" fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_messages_q4() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp } | column -s $'\t' -t } @@ -1792,6 +1804,8 @@ fn_info_messages_select_engine() { fn_info_messages_q2 elif [ "${shortname}" == "q3" ]; then fn_info_messages_q3 + elif [ "${shortname}" == "q4" ]; then + fn_info_messages_q3 elif [ "${shortname}" == "ql" ]; then fn_info_messages_ql elif [ "${shortname}" == "qw" ]; then diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index 0e688b65d..a163243dc 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -634,6 +634,12 @@ elif [ "${shortname}" == "q2" ]; then fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "q3" ]; then + array_configs+=(server.cfg) + fn_fetch_default_configs + 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 diff --git a/lgsm/modules/install_server_files.sh b/lgsm/modules/install_server_files.sh index 2763f470b..c5fe822ad 100644 --- a/lgsm/modules/install_server_files.sh +++ b/lgsm/modules/install_server_files.sh @@ -106,6 +106,13 @@ fn_install_server_files() { chmodx="nochmodx" run="norun" force="noforce" md5="b0e26d8919fe9313fb9d8ded2360f3db" + elif [ "${shortname}" == "q4" ]; then + remote_fileurl="http://linuxgsm.download/Quake4/quake4-1.4.2-x86-linuxded.tar.xz" + local_filedir="${tmpdir}" + local_filename="quake4-1.4.2-x86-linuxded.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="afe30b44f23c8ae2ce6f0f464473d8ba" elif [ "${shortname}" == "qw" ]; then remote_fileurl="http://linuxgsm.download/QuakeWorld/nquake.server.linux.190506.full.tar.xz" local_filedir="${tmpdir}" @@ -240,7 +247,7 @@ elif [ "${shortname}" == "vints" ]; then elif [ "${shortname}" == "ut99" ]; then fn_install_server_files update_ut99.sh -elif [ -z "${appid}" ] || [ "${shortname}" == "ahl" ] || [ "${shortname}" == "bb" ] || [ "${shortname}" == "ns" ] || [ "${shortname}" == "sfc" ] || [ "${shortname}" == "ts" ] || [ "${shortname}" == "vs" ] || [ "${shortname}" == "zmr" ]; then +elif [ -z "${appid}" ] || [ "${shortname}" == "ahl" ] || [ "${shortname}" == "bb" ] || [ "${shortname}" == "q4" ] || [ "${shortname}" == "ns" ] || [ "${shortname}" == "sfc" ] || [ "${shortname}" == "ts" ] || [ "${shortname}" == "vs" ] || [ "${shortname}" == "zmr" ]; then if [ "${shortname}" == "ut" ]; then install_eula.sh fi From f28a4e56886504c67fc77278ec3361c70ca87021 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 3 Dec 2023 00:08:53 +0000 Subject: [PATCH 318/374] fix(kf2): repair port parsing --- lgsm/modules/info_game.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 81767408d..418949678 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -489,7 +489,7 @@ fn_info_game_kf() { if [ -f "${servercfgfullpath}" ]; then fn_info_game_ini "adminpassword" "AdminPassword" fn_info_game_ini "httpenabled" "bEnabled" - fn_info_game_ini "httppassword" "httppasswordword" + fn_info_game_ini "httppassword" "AdminPassword" fn_info_game_ini "httpport" "ListenPort" fn_info_game_ini "httpuser" "AdminName" fn_info_game_ini "lanport" "LANServerPort" @@ -525,11 +525,11 @@ fn_info_game_kf2() { if [ -f "${servercfgfullpath}" ]; then fn_info_game_ini "adminpassword" "AdminPassword" fn_info_game_ini "httpport" "ListenPort" "${servercfgdir}/KFWeb.ini" - fn_info_game_ini "port" "Port" + fn_info_game_ini "port" "Port" "${servercfgdir}/LinuxServer-KFEngine.ini" fn_info_game_ini "servername" "ServerName" fn_info_game_ini "serverpassword" "GamePassword" - fn_info_game_ini "httpenabled" "bEnabled" - fn_info_game_ini "httppassword" "httppasswordword" + fn_info_game_ini "httpenabled" "bEnabled" "${servercfgdir}/KFWeb.ini" + fn_info_game_ini "httppassword" "AdminPassword" fi adminpassword="${adminpassword:-"NOT SET"}" defaultmap="${defaultmap:-"NOT SET"}" @@ -1751,7 +1751,7 @@ fn_info_game_ro() { if [ -f "${servercfgfullpath}" ]; then fn_info_game_ini "adminpassword" "AdminPassword" fn_info_game_ini "httpenabled" "bEnabled" - fn_info_game_ini "httppassword" "httppasswordword" + fn_info_game_ini "httppassword" "AdminPassword" fn_info_game_ini "httpport" "ListenPort" fn_info_game_ini "httpuser" "AdminName" fn_info_game_ini "lanport" "LANServerPort" From 5685ece4bc3dd2a1104388fd0fcf1388b636a219 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 3 Dec 2023 19:56:54 +0000 Subject: [PATCH 319/374] deprecate cd --- lgsm/data/almalinux-8.csv | 1 - lgsm/data/almalinux-9.csv | 1 - lgsm/data/centos-7.csv | 1 - lgsm/data/centos-8.csv | 1 - lgsm/data/centos-9.csv | 1 - lgsm/data/debian-10.csv | 1 - lgsm/data/debian-11.csv | 1 - lgsm/data/debian-12.csv | 1 - lgsm/data/debian-9.csv | 1 - lgsm/data/gameicons/cd-icon.png | Bin 2819 -> 0 bytes lgsm/data/rhel-7.csv | 1 - lgsm/data/rhel-8.csv | 1 - lgsm/data/rhel-9.csv | 1 - lgsm/data/rocky-8.csv | 1 - lgsm/data/rocky-9.csv | 1 - lgsm/data/ubuntu-16.04.csv | 1 - lgsm/data/ubuntu-18.04.csv | 1 - lgsm/data/ubuntu-20.04.csv | 1 - lgsm/data/ubuntu-22.04.csv | 1 - lgsm/data/ubuntu-23.04.csv | 1 - lgsm/data/ubuntu-23.10.csv | 1 - 21 files changed, 20 deletions(-) delete mode 100644 lgsm/data/gameicons/cd-icon.png diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index 6427b1460..dcfb14528 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -19,7 +19,6 @@ bs bt,libicu,dos2unix,libxml2 btl cc -cd ck,xorg-x11-server-Xvfb cmw cod,compat-libstdc++-33.i686 diff --git a/lgsm/data/almalinux-9.csv b/lgsm/data/almalinux-9.csv index 2b6ea075d..bcd93857b 100644 --- a/lgsm/data/almalinux-9.csv +++ b/lgsm/data/almalinux-9.csv @@ -19,7 +19,6 @@ bs bt,libicu,dos2unix,libxml2 btl cc -cd ck,xorg-x11-server-Xvfb cmw cod,compat-libstdc++-33.i686 diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index 2c876efc2..10500627e 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -19,7 +19,6 @@ bs bt,libicu,dos2unix,libxml2 btl cc -cd ck,xorg-x11-server-Xvfb cmw cod,compat-libstdc++-33.i686 diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index 6427b1460..dcfb14528 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -19,7 +19,6 @@ bs bt,libicu,dos2unix,libxml2 btl cc -cd ck,xorg-x11-server-Xvfb cmw cod,compat-libstdc++-33.i686 diff --git a/lgsm/data/centos-9.csv b/lgsm/data/centos-9.csv index 2b6ea075d..bcd93857b 100644 --- a/lgsm/data/centos-9.csv +++ b/lgsm/data/centos-9.csv @@ -19,7 +19,6 @@ bs bt,libicu,dos2unix,libxml2 btl cc -cd ck,xorg-x11-server-Xvfb cmw cod,compat-libstdc++-33.i686 diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index e7e81b75e..b2c646f9f 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -19,7 +19,6 @@ bs bt,libicu-dev,dos2unix,libxml2-utils btl cc -cd ck,xvfb,libxi6 cmw cod,libstdc++5:i386 diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index a40fd1c7b..70f0a3fbe 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -19,7 +19,6 @@ bs bt,libicu-dev,dos2unix,libxml2-utils btl cc -cd ck,xvfb,libxi6 cmw cod,libstdc++5:i386 diff --git a/lgsm/data/debian-12.csv b/lgsm/data/debian-12.csv index 5141290ff..e3466158d 100644 --- a/lgsm/data/debian-12.csv +++ b/lgsm/data/debian-12.csv @@ -19,7 +19,6 @@ bs bt,libicu-dev,dos2unix,libxml2-utils btl cc -cd ck,xvfb,libxi6 cmw cod,libstdc++5:i386 diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index 6deebf592..303bd51dc 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -19,7 +19,6 @@ bs bt,libicu-dev,dos2unix,libxml2-utils btl cc -cd ck,xvfb,libxi6 cmw cod,libstdc++5:i386 diff --git a/lgsm/data/gameicons/cd-icon.png b/lgsm/data/gameicons/cd-icon.png deleted file mode 100644 index dddd49f7c40781aa78c47fbbdb28e6d889e41c2a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2819 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 Tt|?&kn>i?BOJt#uYs7y6+R9E? diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index 373992242..f0a068399 100644 --- a/lgsm/data/rhel-7.csv +++ b/lgsm/data/rhel-7.csv @@ -19,7 +19,6 @@ bs bt,libicu,dos2unix,libxml2 btl cc -cd ck,xorg-x11-server-Xvfb cmw cod,compat-libstdc++-33.i686 diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index 6427b1460..dcfb14528 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -19,7 +19,6 @@ bs bt,libicu,dos2unix,libxml2 btl cc -cd ck,xorg-x11-server-Xvfb cmw cod,compat-libstdc++-33.i686 diff --git a/lgsm/data/rhel-9.csv b/lgsm/data/rhel-9.csv index 2b6ea075d..bcd93857b 100644 --- a/lgsm/data/rhel-9.csv +++ b/lgsm/data/rhel-9.csv @@ -19,7 +19,6 @@ bs bt,libicu,dos2unix,libxml2 btl cc -cd ck,xorg-x11-server-Xvfb cmw cod,compat-libstdc++-33.i686 diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index 6427b1460..dcfb14528 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -19,7 +19,6 @@ bs bt,libicu,dos2unix,libxml2 btl cc -cd ck,xorg-x11-server-Xvfb cmw cod,compat-libstdc++-33.i686 diff --git a/lgsm/data/rocky-9.csv b/lgsm/data/rocky-9.csv index 2b6ea075d..bcd93857b 100644 --- a/lgsm/data/rocky-9.csv +++ b/lgsm/data/rocky-9.csv @@ -19,7 +19,6 @@ bs bt,libicu,dos2unix,libxml2 btl cc -cd ck,xorg-x11-server-Xvfb cmw cod,compat-libstdc++-33.i686 diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index b2c62f49f..c8e10e48e 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -19,7 +19,6 @@ bs bt,libicu-dev,dos2unix,libxml2-utils btl cc -cd ck,xvfb,libxi6 cmw cod,libstdc++5:i386 diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index e7e81b75e..b2c646f9f 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -19,7 +19,6 @@ bs bt,libicu-dev,dos2unix,libxml2-utils btl cc -cd ck,xvfb,libxi6 cmw cod,libstdc++5:i386 diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index e751ad7e3..853b98f33 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -19,7 +19,6 @@ bs bt,libicu-dev,dos2unix,libxml2-utils btl cc -cd ck,xvfb,libxi6 cmw cod,libstdc++5:i386 diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index dfbe3f3e4..d42afde49 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -19,7 +19,6 @@ bs bt,libicu-dev,dos2unix,libxml2-utils btl cc -cd ck,xvfb,libxi6 cmw cod,libstdc++5:i386 diff --git a/lgsm/data/ubuntu-23.04.csv b/lgsm/data/ubuntu-23.04.csv index 24b6ef39e..ac4f05945 100644 --- a/lgsm/data/ubuntu-23.04.csv +++ b/lgsm/data/ubuntu-23.04.csv @@ -19,7 +19,6 @@ bs bt,libicu-dev,dos2unix,libxml2-utils btl cc -cd ck,xvfb,libxi6 cmw cod,libstdc++5:i386 diff --git a/lgsm/data/ubuntu-23.10.csv b/lgsm/data/ubuntu-23.10.csv index 24b6ef39e..ac4f05945 100644 --- a/lgsm/data/ubuntu-23.10.csv +++ b/lgsm/data/ubuntu-23.10.csv @@ -19,7 +19,6 @@ bs bt,libicu-dev,dos2unix,libxml2-utils btl cc -cd ck,xvfb,libxi6 cmw cod,libstdc++5:i386 From cb5bca9573d6036b0c1535a01126a7333517688d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 3 Dec 2023 20:17:03 +0000 Subject: [PATCH 320/374] lint --- lgsm/modules/fix_vh.sh | 10 +++++----- lgsm/modules/info_distro.sh | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lgsm/modules/fix_vh.sh b/lgsm/modules/fix_vh.sh index ff02eaddd..7c1455443 100644 --- a/lgsm/modules/fix_vh.sh +++ b/lgsm/modules/fix_vh.sh @@ -18,11 +18,11 @@ if [ -f "${modsinstalledlistfullpath}" ]; then executable="./start_server_bepinex.sh" fi if [ -d "${serverfiles}/unstripped_corlib" ]; then - rm -rf "${serverfiles}/unstripped_corlib" - fi - sed -i 's/^dllSearchPathOverride=unstripped_corlib/# &/' "${serverfiles}/doorstop_config.ini" - sed -i 's/^export DOORSTOP_CORLIB_OVERRIDE_PATH="$BASEDIR\/unstripped_corlib"/# &/' "${serverfiles}/start_game_bepinex.sh" - sed -i 's/^export DOORSTOP_CORLIB_OVERRIDE_PATH="${VALHEIM_PLUS_PATH}\/unstripped_corlib"/# &/' "${serverfiles}/start_server_bepinex.sh" + rm -rf "${serverfiles}/unstripped_corlib" + fi + sed -i "s/^dllSearchPathOverride=unstripped_corlib/# &/" "${serverfiles}/doorstop_config.ini" + sed -i "s/^export DOORSTOP_CORLIB_OVERRIDE_PATH="$BASEDIR\/unstripped_corlib"/# &/" "${serverfiles}/start_game_bepinex.sh" + sed -i "s/^export DOORSTOP_CORLIB_OVERRIDE_PATH="${VALHEIM_PLUS_PATH}\/unstripped_corlib"/# &/" "${serverfiles}/start_server_bepinex.sh" fi # special exports for BepInEx if installed if grep -qE "^bepinexvh" "${modsinstalledlistfullpath}"; then diff --git a/lgsm/modules/info_distro.sh b/lgsm/modules/info_distro.sh index 828946139..cb832a87b 100644 --- a/lgsm/modules/info_distro.sh +++ b/lgsm/modules/info_distro.sh @@ -28,15 +28,15 @@ kernel="$(uname -r)" # Kernel e.g. 2.6.32-042stab120.16 distro_info_array=(os-release lsb_release hostnamectl debian_version redhat-release) for distro_info in "${distro_info_array[@]}"; do if [ -f "/etc/os-release" ] && [ "${distro_info}" == "os-release" ]; then - distroname="$(grep "PRETTY_NAME" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')" # e.g. Ubuntu 22.04.3 LTS - distroversion="$(grep "VERSION_ID" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')" # e.g. 22.04 + distroname="$(grep "PRETTY_NAME" /etc/os-release | awk -F= '{gsub(/"/,"",$2);print $2}')" # e.g. Ubuntu 22.04.3 LTS + distroversion="$(grep "VERSION_ID" /etc/os-release | awk -F= '{gsub(/"/,"",$2);print $2}')" # e.g. 22.04 # Special var for rhel like distros to remove point in number e.g 8.4 to just 8. if [[ "${distroidlike}" == *"rhel"* ]] || [ "${distroid}" == "rhel" ]; then distroversionrh="$(sed -nr 's/^VERSION_ID="([0-9]*).+?"/\1/p' /etc/os-release)" # e.g. 8 fi - distroid="$(grep "ID=" /etc/os-release | grep -v _ID | awk -F\= '{gsub(/"/,"",$2);print $2}')" # e.g. ubuntu - distroidlike="$(grep "ID_LIKE=" /etc/os-release | grep -v _ID | awk -F\= '{gsub(/"/,"",$2);print $2}')" # e.g. debian - distrocodename="$(grep "VERSION_CODENAME" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')" # e.g. jammy + distroid="$(grep "ID=" /etc/os-release | grep -v _ID | awk -F= '{gsub(/"/,"",$2);print $2}')" # e.g. ubuntu + distroidlike="$(grep "ID_LIKE=" /etc/os-release | grep -v _ID | awk -F= '{gsub(/"/,"",$2);print $2}')" # e.g. debian + distrocodename="$(grep "VERSION_CODENAME" /etc/os-release | awk -F= '{gsub(/"/,"",$2);print $2}')" # e.g. jammy elif [ "$(command -v lsb_release 2> /dev/null)" ] && [ "${distro_info}" == "lsb_release" ]; then if [ -z "${distroname}" ]; then distroname="$(lsb_release -sd)" # e.g. Ubuntu 22.04.3 LTS From becff809317e7312085dc7eba35ecbe0afb57c7b Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 3 Dec 2023 20:28:30 +0000 Subject: [PATCH 321/374] Release v23.7.0 --- lgsm/modules/core_modules.sh | 2 +- linuxgsm.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index 29249fb0b..42bc04a72 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.6.2" +modulesversion="v23.7.0" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index 8e1d06235..73bcf638a 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -24,7 +24,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.6.2" +version="v23.7.0" shortname="core" gameservername="core" commandname="CORE" From 4b4c55948ead55ffdc54fb3bee68b95977cf49ff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 3 Dec 2023 20:33:21 +0000 Subject: [PATCH 322/374] build(deps): bump dessant/lock-threads from 4 to 5 (#4380) Bumps [dessant/lock-threads](https://github.com/dessant/lock-threads) from 4 to 5. - [Release notes](https://github.com/dessant/lock-threads/releases) - [Changelog](https://github.com/dessant/lock-threads/blob/main/CHANGELOG.md) - [Commits](https://github.com/dessant/lock-threads/compare/v4...v5) --- updated-dependencies: - dependency-name: dessant/lock-threads dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Daniel Gibbs --- .github/workflows/lock.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index 4883914f8..a4fdbf547 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Lock Threads - uses: dessant/lock-threads@v4 + uses: dessant/lock-threads@v5 with: github-token: ${{ secrets.GITHUB_TOKEN }} issue-comment: > From 10b6807edcbb666b94f41cbfc62e7d9ec323fb09 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 10 Dec 2023 20:02:05 +0000 Subject: [PATCH 323/374] fix: system requirements bug (#4407) * fix: added missing variable physmemtotalgb * fix: compare RAM requirement to system's available RAM allow numbers with decimal points to be compared --- lgsm/modules/check_system_requirements.sh | 2 +- lgsm/modules/info_distro.sh | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lgsm/modules/check_system_requirements.sh b/lgsm/modules/check_system_requirements.sh index 5ffd0c8af..0214cdc1a 100644 --- a/lgsm/modules/check_system_requirements.sh +++ b/lgsm/modules/check_system_requirements.sh @@ -63,7 +63,7 @@ fi # If the game or engine has a minimum RAM Requirement, compare it to system's available RAM. if [ "${ramrequirementgb}" ]; then - if [ "${physmemtotalgb}" -lt "${ramrequirementgb}" ]; then + if (($(echo "${physmemtotalgb} < ${ramrequirementgb}" | bc -l))); then fn_print_dots "Checking RAM" fn_print_warn_nl "Checking RAM: ${ramrequirementgb}G required, ${physmemtotal} available" echo "* ${gamename} server may fail to run or experience poor performance." diff --git a/lgsm/modules/info_distro.sh b/lgsm/modules/info_distro.sh index cb832a87b..a4e3521f8 100644 --- a/lgsm/modules/info_distro.sh +++ b/lgsm/modules/info_distro.sh @@ -195,15 +195,16 @@ else else humanreadable="-h" fi - physmemtotalmb="$(free -m | awk '/Mem:/ {print $2}')" # string + physmemtotalmb="$(free -m | awk '/Mem:/ {print $2}')" # integer + physmemtotalgb="$(free -m | awk '/Mem:/ {print $2}')" # integer physmemtotal="$(free ${humanreadable} | awk '/Mem:/ {print $2}')" # string physmemfree="$(free ${humanreadable} | awk '/Mem:/ {print $4}')" # string physmemused="$(free ${humanreadable} | awk '/Mem:/ {print $3}')" # string oldfree="$(free ${humanreadable} | awk '/cache:/')" if [ "${oldfree}" ]; then - physmemavailable="n/a" - physmemcached="n/a" + physmemavailable="n/a" # string + physmemcached="n/a" # string else physmemavailable="$(free ${humanreadable} | awk '/Mem:/ {print $7}')" # string physmemcached="$(free ${humanreadable} | awk '/Mem:/ {print $6}')" # string From 8bbb60202733683e945f14d6600969e1e0c3ba70 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 10 Dec 2023 20:03:10 +0000 Subject: [PATCH 324/374] Release v23.7.1 --- lgsm/modules/core_modules.sh | 2 +- linuxgsm.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index 42bc04a72..5a0543b9c 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.7.0" +modulesversion="v23.7.1" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index 73bcf638a..e3286d4f2 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -24,7 +24,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.7.0" +version="v23.7.1" shortname="core" gameservername="core" commandname="CORE" From b554c4eb211342b50986eba85d298c5a457ee287 Mon Sep 17 00:00:00 2001 From: Kalle Date: Fri, 19 Jan 2024 19:42:29 +0100 Subject: [PATCH 325/374] fix: quake2 and quake3 protocol query (#4410) Co-authored-by: Kalle Minkner --- lgsm/modules/query_gsquery.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/query_gsquery.py b/lgsm/modules/query_gsquery.py index 9fbb6a254..8da93ada4 100644 --- a/lgsm/modules/query_gsquery.py +++ b/lgsm/modules/query_gsquery.py @@ -10,13 +10,13 @@ import argparse import socket import sys -engine_types=('protocol-valve','protocol-quake3','protocol-quake3','protocol-gamespy1','protocol-unreal2','ut3','minecraft','minecraftbe','jc2mp','mumbleping','soldat','teeworlds') +engine_types=('protocol-valve','protocol-quake2','protocol-quake3','protocol-gamespy1','protocol-unreal2','ut3','minecraft','minecraftbe','jc2mp','mumbleping','soldat','teeworlds') class gsquery: server_response_timeout = 2 default_buffer_length = 1024 sourcequery=('protocol-valve','avalanche3.0','barotrauma','madness','quakelive','realvirtuality','refractor','source','goldsrc','spark','starbound','unity3d','unreal4','wurm') - idtech2query=('protocol-quake3','idtech2','quake','iw2.0') + idtech2query=('protocol-quake2','idtech2','quake','iw2.0') idtech3query=('protocol-quake3','iw3.0','ioquake3','qfusion') minecraftquery=('minecraft','lwjgl2') minecraftbequery=('minecraftbe',) From e53d2a27bf8c71a34f6d88b8363ae735b44e0359 Mon Sep 17 00:00:00 2001 From: Ryan Heath Date: Fri, 19 Jan 2024 10:42:43 -0800 Subject: [PATCH 326/374] Fix valheimplus updateurl and typo (#4438) --- lgsm/modules/mods_list.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/mods_list.sh b/lgsm/modules/mods_list.sh index 95ab63d99..bd6eaff24 100644 --- a/lgsm/modules/mods_list.sh +++ b/lgsm/modules/mods_list.sh @@ -97,7 +97,7 @@ oxiderustlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos oxidehurtworldlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/OxideMod/Oxide.Hurtworld/releases/latest | jq -r '.assets[].browser_download_url') oxidesdtdlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/OxideMod/Oxide.SevenDaysToDie/releases/latest | jq -r '.assets[]|select(.browser_download_url | contains("linux")) | .browser_download_url') # Valheim Plus -valeimpluslatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/valheimPlus/ValheimPlus/releases/latest | jq -r '.assets[]|select(.browser_download_url | contains("UnixServer.tar.gz")) | .browser_download_url') +valheimpluslatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/Grantapher/ValheimPlus/releases/latest | jq -r '.assets[]|select(.browser_download_url | contains("UnixServer.tar.gz")) | .browser_download_url') # Valheim BepInEx bepinexvhlatestlink=$(curl --connect-timeout 10 -sL "https://valheim.thunderstore.io/api/experimental/package/denikson/BepInExPack_Valheim/" -H "accept: application/json" | jq -r '.latest.download_url') @@ -200,7 +200,7 @@ mod_info_hwoxide=(MOD "hwoxide" "Oxide for Hurtworld" "${oxidehurtworldlatestlin mod_info_sdtdoxide=(MOD "sdtdoxide" "Oxide for 7 Days To Die" "${oxidesdtdlatestlink}" "Oxide.SevenDaysToDie.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "7 Days To Die;" "NOTGAMES" "https://umod.org/games/7-days-to-die" "Allows for the use of plugins") # ValheimPlus -mod_info_valheimplus=(MOD "valheimplus" "Valheim PLUS" "${valeimpluslatestlink}" "ValheimPlus.tar.gz" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Valheim;" "NOTGAMES" "https://github.com/Grantapher/ValheimPlus.git" "Mod to improve Valheim gameplay") +mod_info_valheimplus=(MOD "valheimplus" "Valheim PLUS" "${valheimpluslatestlink}" "ValheimPlus.tar.gz" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Valheim;" "NOTGAMES" "https://github.com/Grantapher/ValheimPlus.git" "Mod to improve Valheim gameplay") # BepInEx Valheim mod_info_bepinexvh=(MOD "bepinexvh" "BepInEx Valheim" "${bepinexvhlatestlink}" "denikson-BepInExPack_Valheim.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Valheim;" "NOTGAMES" "https://valheim.thunderstore.io/package/denikson/BepInExPack_Valheim/" "Unity / XNA game patcher and plugin framework") From e2bdefdf9a66042329436ed9188b9529465d17bf Mon Sep 17 00:00:00 2001 From: Dessa Date: Fri, 19 Jan 2024 19:43:43 +0100 Subject: [PATCH 327/374] chore: only run GitHub actions when on main account (#4433) the most prominent case being update-copyright-years-in-license-file altering commit history in forks depending on configuration (sometimes these type of PRs just auto-merge on forks, creating a merge conflict when they sync their fork for preparing a PR) additionally, some actions require secrets so they would fail anyway Co-authored-by: Daniel Gibbs --- .github/workflows/add-to-project.yml | 1 + .github/workflows/details-check.yml | 2 ++ .github/workflows/git-sync.yml | 1 + .github/workflows/labeler.yml | 2 ++ .github/workflows/lock.yml | 1 + .github/workflows/potential-duplicates.yml | 1 + .github/workflows/serverlist-validate.yml | 1 + .github/workflows/trigger-docker-build.yml | 2 ++ .github/workflows/update-check.yml | 1 + .github/workflows/update-copyright-years-in-license-file.yml | 1 + .github/workflows/version-check.yml | 1 + 11 files changed, 14 insertions(+) diff --git a/.github/workflows/add-to-project.yml b/.github/workflows/add-to-project.yml index e429645bf..0ddccb572 100644 --- a/.github/workflows/add-to-project.yml +++ b/.github/workflows/add-to-project.yml @@ -7,6 +7,7 @@ on: jobs: add-to-project: + if: github.repository_owner == 'GameServerManagers' runs-on: ubuntu-latest steps: - name: Add to Project diff --git a/.github/workflows/details-check.yml b/.github/workflows/details-check.yml index ce9b45996..d940cfbc8 100644 --- a/.github/workflows/details-check.yml +++ b/.github/workflows/details-check.yml @@ -10,6 +10,7 @@ concurrency: jobs: create-matrix: + if: github.repository_owner == 'GameServerManagers' runs-on: ubuntu-latest outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} @@ -28,6 +29,7 @@ jobs: echo -n "matrix=${shortnamearray}" >> $GITHUB_OUTPUT details-check: + if: github.repository_owner == 'GameServerManagers' needs: create-matrix continue-on-error: true runs-on: ubuntu-latest diff --git a/.github/workflows/git-sync.yml b/.github/workflows/git-sync.yml index 42ddd42e5..2f223f370 100644 --- a/.github/workflows/git-sync.yml +++ b/.github/workflows/git-sync.yml @@ -9,6 +9,7 @@ on: jobs: gitHub-to-bitbucket: + if: github.repository_owner == 'GameServerManagers' runs-on: ubuntu-latest steps: - name: SSH Agent diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 24174fb22..b8bf63084 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -11,6 +11,7 @@ permissions: jobs: issue-labeler: + if: github.repository_owner == 'GameServerManagers' runs-on: ubuntu-latest steps: - name: Issue Labeler @@ -22,6 +23,7 @@ jobs: include-title: 1 is-sponsor-label: + if: github.repository_owner == 'GameServerManagers' runs-on: ubuntu-latest steps: - name: Is Sponsor Label diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index a4fdbf547..ce00b840b 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -9,6 +9,7 @@ permissions: jobs: lock: + if: github.repository_owner == 'GameServerManagers' runs-on: ubuntu-latest steps: - name: Lock Threads diff --git a/.github/workflows/potential-duplicates.yml b/.github/workflows/potential-duplicates.yml index 3c7f4334c..ea0ba23fd 100644 --- a/.github/workflows/potential-duplicates.yml +++ b/.github/workflows/potential-duplicates.yml @@ -5,6 +5,7 @@ on: - opened jobs: potential-duplicates: + if: github.repository_owner == 'GameServerManagers' runs-on: ubuntu-latest steps: - name: Potential Duplicates diff --git a/.github/workflows/serverlist-validate.yml b/.github/workflows/serverlist-validate.yml index 931329571..f4a95a039 100644 --- a/.github/workflows/serverlist-validate.yml +++ b/.github/workflows/serverlist-validate.yml @@ -5,6 +5,7 @@ on: jobs: serverlist-validate: + if: github.repository_owner == 'GameServerManagers' runs-on: ubuntu-latest steps: - name: Checkout diff --git a/.github/workflows/trigger-docker-build.yml b/.github/workflows/trigger-docker-build.yml index 61ec91d39..ae66542de 100644 --- a/.github/workflows/trigger-docker-build.yml +++ b/.github/workflows/trigger-docker-build.yml @@ -6,6 +6,7 @@ on: jobs: trigger_build_docker-linuxgsm: + if: github.repository_owner == 'GameServerManagers' name: Trigger Build Docker LinuxGSM runs-on: ubuntu-latest steps: @@ -18,6 +19,7 @@ jobs: workflow_file_name: docker-publish.yml trigger_build_docker-gameserver: + if: github.repository_owner == 'GameServerManagers' name: Trigger Build Docker GameServer needs: trigger_build_docker-linuxgsm runs-on: ubuntu-latest diff --git a/.github/workflows/update-check.yml b/.github/workflows/update-check.yml index dfbc7dd58..b93fb2c47 100644 --- a/.github/workflows/update-check.yml +++ b/.github/workflows/update-check.yml @@ -10,6 +10,7 @@ concurrency: jobs: update-check: + if: github.repository_owner == 'GameServerManagers' continue-on-error: true runs-on: ubuntu-latest diff --git a/.github/workflows/update-copyright-years-in-license-file.yml b/.github/workflows/update-copyright-years-in-license-file.yml index 2d6d3eeeb..3301c9cb7 100644 --- a/.github/workflows/update-copyright-years-in-license-file.yml +++ b/.github/workflows/update-copyright-years-in-license-file.yml @@ -6,6 +6,7 @@ on: jobs: update-license-year: + if: github.repository_owner == 'GameServerManagers' runs-on: ubuntu-latest steps: - name: Checkout diff --git a/.github/workflows/version-check.yml b/.github/workflows/version-check.yml index a66eaca14..cfa7615bd 100644 --- a/.github/workflows/version-check.yml +++ b/.github/workflows/version-check.yml @@ -7,6 +7,7 @@ permissions: jobs: version-Check: + if: github.repository_owner == 'GameServerManagers' runs-on: ubuntu-latest steps: - name: Checkout From 2fff61f41a6ad0e0540d06db82e33c50b02a5145 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 19 Jan 2024 18:44:34 +0000 Subject: [PATCH 328/374] feat(cs2): update parameters and add workshop support (#4405) * feat(cs2): update config and parameter settings * remove serverlogging * add authkey for workshop * add cs2 label --- .github/labeler.yml | 6 ++-- .../config-lgsm/cs2server/_default.cfg | 32 ++----------------- lgsm/modules/info_game.sh | 8 ++--- 3 files changed, 9 insertions(+), 37 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 3da0d47ee..34ffd66f1 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -74,6 +74,8 @@ - "/(Barotrauma)/i" "game: Counter-Strike: Global Offensive": - "/(Counter-Strike: Global Offensive|CS:GO|csgo)/i" +"game: Counter-Strike 2": + - "/(Counter-Strike 2|CS2)/i" "game: Counter-Strike: Source": - "/(Counter-Strike: Source|CS:S)/i" "game: Counter-Strike 1.6": @@ -95,13 +97,13 @@ "game: Left 4 Dead 2": - "/(Left 4 Dead 2|L4D2)/i" "game: Minecraft": - - "/(minecraft)((?!bedrock).)*$/i" + - "/(Minecraft)((?!bedrock).)*$/i" "game: Minecraft Bedrock": - "/(Bedrock)/i" "game: Mumble": - "/(Mumble)/i" "game: Project Zomboid": - - "/(Project Zomboid)/i" + - "/(Project Zomboid|PZ)/i" "game: Quake 3": - "/(Quake 3|Q3A|q3)/i" "game: Rising World": diff --git a/lgsm/config-default/config-lgsm/cs2server/_default.cfg b/lgsm/config-default/config-lgsm/cs2server/_default.cfg index 4eca78e35..84679da01 100644 --- a/lgsm/config-default/config-lgsm/cs2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cs2server/_default.cfg @@ -10,41 +10,13 @@ ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters # https://docs.linuxgsm.com/game-servers/counter-strike-2 -# [Game Modes] gametype gamemode gamemodeflags skirmishid mapgroup (you can mix these across all Game Modes except Danger Zone, but use only one) -# Arms Race 1 0 0 0 mg_armsrace -# Boom! Headshot! 1 2 0 6 mg_skirmish_headshots -# Classic Casual 0 0 0 0 mg_casualsigma, mg_casualdelta -# Classic Competitive (Default) 0 1 0 0 mg_active, mg_reserves, mg_hostage, mg_de_dust2, ... -# Classic Competitive (Short Match) 0 1 32 0 mg_active, mg_reserves, mg_hostage, mg_de_dust2, ... -# Danger Zone 6 0 0 0 mg_dz_blacksite (map: dz_blacksite), mg_dz_sirocco (map: dz_sirocco) -# Deathmatch (Default) 1 2 0 0 mg_deathmatch -# Deathmatch (Free For All) 1 2 32 0 mg_deathmatch -# Deathmatch (Team vs Team) 1 2 4 0 mg_deathmatch -# Demolition 1 1 0 0 mg_demolition -# Flying Scoutsman 0 0 0 3 mg_skirmish_flyingscoutsman -# Hunter-Gatherers 1 2 0 7 mg_skirmish_huntergatherers -# Retakes 0 0 0 12 mg_skirmish_retakes -# Stab Stab Zap 0 0 0 1 mg_skirmish_stabstabzap -# Trigger Discipline 0 0 0 4 mg_skirmish_triggerdiscipline -# Wingman 0 2 0 0 mg_de_prime, mg_de_blagai, mg_de_vertigo, mg_de_inferno, mg_de_overpass, mg_de_cbble, mg_de_train, mg_de_shortnuke, mg_de_shortdust, mg_de_lake -gametype="0" -gamemode="1" -gamemodeflags="0" -skirmishid="0" -mapgroup="mg_active" ip="0.0.0.0" port="27015" -defaultmap="de_dust2" maxplayers="16" -tickrate="64" - -## Game Server Login Token (GSLT): Required -# GSLT is required for running a public server. -# More info: https://docs.linuxgsm.com/steamcmd/gslt -gslt="" +wsapikey="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-dedicated -ip ${ip} -port ${port} -maxplayers ${maxplayers} -tickrate ${tickrate} -serverlogging +sv_setsteamaccount ${gslt} +map ${defaultmap} +game_type ${gametype} +game_mode ${gamemode} +sv_game_mode_flags ${gamemodeflags} +sv_skirmish_id ${skirmishid} +sv_logfile 1 +exec ${selfname}.cfg" +startparameters="-dedicated -ip ${ip} -port ${port} -maxplayers ${maxplayers} -authkey ${wsapikey} +exec ${selfname}.cfg" #### LinuxGSM Settings #### diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 418949678..200e5fdad 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -1159,14 +1159,12 @@ fn_info_game_col() { fn_info_game_cs2() { if [ -f "${servercfgfullpath}" ]; then fn_info_game_valve_keyvalues "servername" "hostname" - fi - # Steamport can be between 26901-26910 and is normally automatically set. - # Some servers might support -steamport parameter to set - if [ "${steamport}" == "0" ] || [ -v "${steamport}" ]; then - steamport="$(echo "${ssinfo}" | grep "${srcdslinuxpid}" | awk '{print $5}' | grep ":269" | cut -d ":" -f2)" + fn_info_game_valve_keyvalues "defaultmap" "map" + fn_info_game_valve_keyvalues "password" "sv_password" fi defaultmap="${defaultmap:-"NOT SET"}" maxplayers="${maxplayers:-"0"}" + password="${password:-"NOT SET"}" port="${port:-"0"}" queryport="${port:-"0"}" servername="${servername:-"NOT SET"}" From b58016d896c46e772e7c6da25b839cbda7c8a2c6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 19 Jan 2024 18:45:44 +0000 Subject: [PATCH 329/374] docs(license): update copyright year(s) (#4432) Co-authored-by: Daniel Gibbs Co-authored-by: github-actions --- LICENSE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE.md b/LICENSE.md index 12352eafa..344a8fb48 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ # The MIT License (MIT) -Copyright (c) 2012-2023 Daniel Gibbs +Copyright (c) 2012-2024 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 From ae3deee7a8a31e9c56936c688ba736f2ed664432 Mon Sep 17 00:00:00 2001 From: JuliusZet Date: Fri, 19 Jan 2024 20:55:42 +0100 Subject: [PATCH 330/374] feat(rust): Add server browser tags to rustserver config (#4418) --- lgsm/config-default/config-lgsm/rustserver/_default.cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/rustserver/_default.cfg b/lgsm/config-default/config-lgsm/rustserver/_default.cfg index 2652bc597..071d9d008 100644 --- a/lgsm/config-default/config-lgsm/rustserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rustserver/_default.cfg @@ -26,9 +26,10 @@ maxplayers="50" worldsize="3000" # default: 3000, range: 1000-6000, map size in meters. saveinterval="300" # Auto-save in seconds. tickrate="30" # default: 30, range: 15-100. +tags="" # values: monthly, biweekly, weekly, vanilla, hardcore, softcore, pve, roleplay, creative, minigame, training, battlefield, broyale, builds, NA, SA, EU, WA, EA, OC, AF ( Doc: https://wiki.facepunch.com/rust/server-browser-tags ) ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-batchmode +app.listenip ${ip} +app.port ${appport} +server.ip ${ip} +server.port ${port} +server.queryport ${queryport} +server.tickrate ${tickrate} +server.hostname \"${servername}\" +server.identity \"${selfname}\" +server.gamemode ${gamemode} +server.level \"${serverlevel}\" +server.seed ${seed} +server.salt ${salt} +server.maxplayers ${maxplayers} +server.worldsize ${worldsize} +server.saveinterval ${saveinterval} +rcon.web ${rconweb} +rcon.ip ${ip} +rcon.port ${rconport} +rcon.password \"${rconpassword}\" -logfile ${gamelog}" +startparameters="-batchmode +app.listenip ${ip} +app.port ${appport} +server.ip ${ip} +server.port ${port} +server.queryport ${queryport} +server.tickrate ${tickrate} +server.hostname \"${servername}\" +server.identity \"${selfname}\" +server.gamemode ${gamemode} +server.level \"${serverlevel}\" +server.seed ${seed} +server.salt ${salt} +server.maxplayers ${maxplayers} +server.worldsize ${worldsize} +server.saveinterval ${saveinterval} +rcon.web ${rconweb} +rcon.ip ${ip} +rcon.port ${rconport} +rcon.password \"${rconpassword}\" +server.tags ${tags} -logfile ${gamelog}" #### LinuxGSM Settings #### From 9bad6cfea94b8afcd07326b898f8dc398f89339d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 21 Jan 2024 20:54:19 +0000 Subject: [PATCH 331/374] feat(new server): Palworld (#4449) * add palworld * add palworld * add palworld to ubuntu * add server to serverlist * rework _default.cfg for pwserver * fix servercfgdir for palworld * edit _default.cfg for pwserver * first try info_game.sh * debug info_game.sh * update info_game.sh * update info_game.sh * update info_game.sh * add package check for rhel, rocky, debian & ubuntu * add details port info * add details port change * improve _default.cfg for pwserver * improve _default.cfg for pwserver * fix issues mentioned in pr * change servername parameter for pwserver * add: steamport var for Palworld * fix: info_game for palworld * change: load palworld settings from serverconfig file & change unknow port * update ports info * change to binary file from .sh prevents issues with ss command --------- Co-authored-by: Daniel Gibbs add palworld game icon add missing pw --- .../config-lgsm/pwserver/_default.cfg | 185 ++++++++++++++++++ lgsm/data/almalinux-8.csv | 1 + lgsm/data/almalinux-9.csv | 1 + lgsm/data/centos-7.csv | 1 + lgsm/data/centos-8.csv | 1 + lgsm/data/centos-9.csv | 1 + lgsm/data/debian-10.csv | 5 +- lgsm/data/debian-11.csv | 1 + lgsm/data/debian-12.csv | 1 + lgsm/data/debian-9.csv | 1 + lgsm/data/gameicons/pw-icon.png | Bin 0 -> 2829 bytes lgsm/data/rhel-7.csv | 1 + lgsm/data/rhel-8.csv | 1 + lgsm/data/rhel-9.csv | 1 + lgsm/data/rocky-8.csv | 1 + lgsm/data/rocky-9.csv | 1 + lgsm/data/serverlist.csv | 1 + lgsm/data/ubuntu-16.04.csv | 1 + lgsm/data/ubuntu-18.04.csv | 1 + lgsm/data/ubuntu-20.04.csv | 1 + lgsm/data/ubuntu-22.04.csv | 1 + lgsm/data/ubuntu-23.04.csv | 1 + lgsm/data/ubuntu-23.10.csv | 1 + lgsm/modules/info_game.sh | 14 ++ lgsm/modules/info_messages.sh | 13 +- lgsm/modules/install_config.sh | 6 + 26 files changed, 240 insertions(+), 3 deletions(-) create mode 100644 lgsm/config-default/config-lgsm/pwserver/_default.cfg create mode 100644 lgsm/data/gameicons/pw-icon.png diff --git a/lgsm/config-default/config-lgsm/pwserver/_default.cfg b/lgsm/config-default/config-lgsm/pwserver/_default.cfg new file mode 100644 index 000000000..dffa99a0a --- /dev/null +++ b/lgsm/config-default/config-lgsm/pwserver/_default.cfg @@ -0,0 +1,185 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! +# Copy settings from here and use them in either: +# common.cfg - applies settings to every instance. +# [instance].cfg - applies settings to a specific instance. + +#### Game Server Settings #### + +## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters +servername="LinuxGSM" + +# Use game server config file to edit, used for port check script (workaround) +port="8211" + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +## Game Server Docs | https://tech.palworldgame.com/dedicated-server-guide#linux +startparameters="EpicApp=PalServer -useperfthreads -NoAsyncLoadingThread -UseMultithreadForDS -servername='${servername}'" + +#### LinuxGSM Settings #### + +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + +## Notification Alerts +# (on|off) + +# Display IP | https://docs.linuxgsm.com/alerts#display-ip +displayip="" + +# More info | https://docs.linuxgsm.com/alerts#more-info +postalert="off" + +# Alert on Start/Stop/Restart +statusalert="off" + +# Discord Alerts | https://docs.linuxgsm.com/alerts/discord +discordalert="off" +discordwebhook="webhook" + +# Email Alerts | https://docs.linuxgsm.com/alerts/email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + +# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover +pushoveralert="off" +pushovertoken="accesstoken" +pushoveruserkey="userkey" + +# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat +rocketchatalert="off" +rocketchatwebhook="webhook" + +# Slack Alerts | https://docs.linuxgsm.com/alerts/slack +slackalert="off" +slackwebhook="webhook" + +# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram +# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +telegramapi="api.telegram.org" +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +curlcustomstring="" + +## Updating | https://docs.linuxgsm.com/commands/update +updateonstart="off" + +## Backup | https://docs.linuxgsm.com/commands/backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://docs.linuxgsm.com/features/logging +consolelogging="on" +logdays="7" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="1" + +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors +ansi="on" + +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time +sleeptime="0.5" + +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd +# Server appid +appid="2394010" +steamcmdforcewindows="no" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +betapassword="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="false" + +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode +# 1: tmux kill +# 2: CTRL+c +# 3: quit +# 4: quit 120s +# 5: stop +# 6: q +# 7: exit +# 8: 7 Days to Die +# 9: GoldSrc +# 10: Avorion +# 11: end +stopmode="2" + +## Query mode +# 1: session only +# 2: gamedig (gsquery fallback) +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="1" +querytype="1" + +## Console type +consoleverbose="yes" +consoleinteract="no" + +## Game Server Details +# Do not edit +gamename="Palworld" +engine="unreal5" +glibc="2.17" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}/Pal" +executabledir="${systemdir}/Engine/Binaries/Linux" +executable="./PalServer-Linux" +servercfgdir="${serverfiles}/Pal/Saved/Config/LinuxServer" +servercfg="PalWorldSettings.ini" +servercfgdefault="PalWorldSettings.ini" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" +gamelogdir="${systemdir}/Saved/Logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index dcfb14528..53021ec30 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -85,6 +85,7 @@ pmc,java-17-openjdk ps,GConf2 pvkii pvr,libcxx +pw pz,java-11-openjdk rng-tools q2 q3 diff --git a/lgsm/data/almalinux-9.csv b/lgsm/data/almalinux-9.csv index bcd93857b..8f643487c 100644 --- a/lgsm/data/almalinux-9.csv +++ b/lgsm/data/almalinux-9.csv @@ -85,6 +85,7 @@ pmc,java-17-openjdk ps,GConf2 pvkii pvr,libcxx +pw pz,java-11-openjdk rng-tools q2 q3 diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index 10500627e..5315d8de0 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -85,6 +85,7 @@ pmc,java-11-openjdk ps,GConf2 pvkii pvr,libcxx +pw pz,java-11-openjdk rng-tools q2 q3 diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index dcfb14528..53021ec30 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -85,6 +85,7 @@ pmc,java-17-openjdk ps,GConf2 pvkii pvr,libcxx +pw pz,java-11-openjdk rng-tools q2 q3 diff --git a/lgsm/data/centos-9.csv b/lgsm/data/centos-9.csv index bcd93857b..8f643487c 100644 --- a/lgsm/data/centos-9.csv +++ b/lgsm/data/centos-9.csv @@ -85,6 +85,7 @@ pmc,java-17-openjdk ps,GConf2 pvkii pvr,libcxx +pw pz,java-11-openjdk rng-tools q2 q3 diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index b2c646f9f..a2d1ee665 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -1,8 +1,7 @@ -all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils -steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd ac ahl ahl2 +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils ark arma3 armar,libcurl4 @@ -85,6 +84,7 @@ pmc,openjdk-11-jre ps,libgconf-2-4 pvkii pvr,libc++1 +pw pz,openjdk-11-jre,rng-tools q2 q3 @@ -108,6 +108,7 @@ sof2 sol squad st,libxml2-utils +steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd stn sven,libssl1.1:i386,zlib1g:i386 terraria diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index 70f0a3fbe..bdf03879e 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -85,6 +85,7 @@ pmc,openjdk-17-jre ps,libgconf-2-4 pvkii pvr,libc++1 +pw pz,openjdk-17-jre,rng-tools q2 q3 diff --git a/lgsm/data/debian-12.csv b/lgsm/data/debian-12.csv index e3466158d..cc884a6f8 100644 --- a/lgsm/data/debian-12.csv +++ b/lgsm/data/debian-12.csv @@ -85,6 +85,7 @@ pmc,openjdk-17-jre ps,libgconf-2-4 pvkii pvr,libc++1 +pw pz,openjdk-17-jre,rng-tools5 q2 q3 diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index 303bd51dc..ccefafcc2 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -85,6 +85,7 @@ pmc,openjdk-8-jre ps,libgconf-2-4 pvkii pvr,libc++1 +pw pz,openjdk-8-jre,rng-tools q2 q3 diff --git a/lgsm/data/gameicons/pw-icon.png b/lgsm/data/gameicons/pw-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..1772c3bd92758c6fd1e43f3eb55b168bbd571772 GIT binary patch literal 2829 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 M9TV+JO}Dsz0Rk39s{jB1 literal 0 HcmV?d00001 diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index f0a068399..14cc292ac 100644 --- a/lgsm/data/rhel-7.csv +++ b/lgsm/data/rhel-7.csv @@ -9,6 +9,7 @@ armar,libcurl,openssl11-libs ats av bb +pw bb2,libcurl.i686 bd bf1942,ncurses-libs.i686 diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index dcfb14528..53021ec30 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -85,6 +85,7 @@ pmc,java-17-openjdk ps,GConf2 pvkii pvr,libcxx +pw pz,java-11-openjdk rng-tools q2 q3 diff --git a/lgsm/data/rhel-9.csv b/lgsm/data/rhel-9.csv index bcd93857b..8f643487c 100644 --- a/lgsm/data/rhel-9.csv +++ b/lgsm/data/rhel-9.csv @@ -85,6 +85,7 @@ pmc,java-17-openjdk ps,GConf2 pvkii pvr,libcxx +pw pz,java-11-openjdk rng-tools q2 q3 diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index dcfb14528..53021ec30 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -85,6 +85,7 @@ pmc,java-17-openjdk ps,GConf2 pvkii pvr,libcxx +pw pz,java-11-openjdk rng-tools q2 q3 diff --git a/lgsm/data/rocky-9.csv b/lgsm/data/rocky-9.csv index bcd93857b..8f643487c 100644 --- a/lgsm/data/rocky-9.csv +++ b/lgsm/data/rocky-9.csv @@ -85,6 +85,7 @@ pmc,java-17-openjdk ps,GConf2 pvkii pvr,libcxx +pw pz,java-11-openjdk rng-tools q2 q3 diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 16c1e812f..841dcbf42 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -84,6 +84,7 @@ pmc,pmcserver,PaperMC,ubuntu-22.04 ps,psserver,Post Scriptum,ubuntu-22.04 pvkii,pvkiiserver,Pirates Vikings & Knights II,ubuntu-22.04 pvr,pvrserver,Pavlov VR,ubuntu-22.04 +pw,pwserver,Palworld,ubuntu-22.04 pz,pzserver,Project Zomboid,ubuntu-22.04 q2,q2server,Quake 2,ubuntu-22.04 q3,q3server,Quake 3: Arena,ubuntu-22.04 diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index c8e10e48e..e50ea48c0 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -9,6 +9,7 @@ armar,libcurl4 ats av bb +pw bb2,libcurl4-gnutls-dev:i386 bd bf1942,libncurses5:i386,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index b2c646f9f..5294e6757 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -8,6 +8,7 @@ arma3 armar,libcurl4 ats av +pw bb bb2,libcurl4-gnutls-dev:i386 bd diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index 853b98f33..f864b0d0a 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -85,6 +85,7 @@ pmc,openjdk-17-jre ps,libgconf-2-4 pvkii pvr,libc++1 +pw pz,openjdk-17-jre,rng-tools q2 q3 diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index d42afde49..c010ac60a 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -85,6 +85,7 @@ pmc,openjdk-17-jre ps,libgconf-2-4 pvkii pvr,libc++1 +pw pz,openjdk-17-jre,rng-tools5 q2 q3 diff --git a/lgsm/data/ubuntu-23.04.csv b/lgsm/data/ubuntu-23.04.csv index ac4f05945..1a52e301e 100644 --- a/lgsm/data/ubuntu-23.04.csv +++ b/lgsm/data/ubuntu-23.04.csv @@ -85,6 +85,7 @@ pmc,openjdk-17-jre ps,libgconf-2-4 pvkii pvr,libc++1 +pw pz,openjdk-17-jre,rng-tools5 q2 q3 diff --git a/lgsm/data/ubuntu-23.10.csv b/lgsm/data/ubuntu-23.10.csv index ac4f05945..1a52e301e 100644 --- a/lgsm/data/ubuntu-23.10.csv +++ b/lgsm/data/ubuntu-23.10.csv @@ -85,6 +85,7 @@ pmc,openjdk-17-jre ps,libgconf-2-4 pvkii pvr,libc++1 +pw pz,openjdk-17-jre,rng-tools5 q2 q3 diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 200e5fdad..f456fb0bf 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -613,6 +613,18 @@ fn_info_game_pvr() { servername="${servername:-"NOT SET"}" } +# Config Type: ini +# Parameters: false +# Comment: ; or # +# Example: ServerName=SERVERNAME +# Filetype: cfg +fn_info_game_pw() { + servername="${servername:-"NOT SET"}" + port="${port:-"0"}" + steamport="27015" + unknownport="1985" +} + # Config Type: ini # Parameters: true # Comment: ; or # @@ -2357,6 +2369,8 @@ elif [ "${shortname}" == "ps" ]; then fn_info_game_ps elif [ "${shortname}" == "pvr" ]; then fn_info_game_pvr +elif [ "${shortname}" == "pw" ]; then + fn_info_game_pw elif [ "${shortname}" == "pz" ]; then fn_info_game_pz elif [ "${shortname}" == "q2" ]; then diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index 1e3bfad4b..f619c964e 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -674,7 +674,7 @@ fn_info_messages_ports_edit() { fi done # engines/games that require editing the start parameters. - local ports_edit_array=("av" "ck" "col" "cs2" "fctr" "goldsrc" "hcu" "hw" "iw3.0" "ioquake3" "qfusion" "rust" "scpsl" "scpslsm" "sf" "sol" "spark" "source" "unreal4" "arma3" "dayz" "unt" "vh") + local ports_edit_array=("av" "ck" "col" "cs2" "fctr" "goldsrc" "hcu" "hw" "iw3.0" "ioquake3" "pw" "qfusion" "rust" "scpsl" "scpslsm" "sf" "sol" "spark" "source" "unreal4" "arma3" "dayz" "unt" "vh") for port_edit in "${ports_edit_array[@]}"; do if [ "${engine}" == "${port_edit}" ] || [ "${gamename}" == "${port_edit}" ] || [ "${shortname}" == "${port_edit}" ]; then startparameterslocation="${configdirserver}" @@ -1269,6 +1269,15 @@ fn_info_messages_pvr() { } | column -s $'\t' -t } +fn_info_messages_pw() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Steam" steamport udp + fn_port "Unknown" unknownport tcp + } | column -s $'\t' -t +} + fn_info_messages_pz() { { fn_port "header" @@ -1798,6 +1807,8 @@ fn_info_messages_select_engine() { fn_info_messages_ps elif [ "${shortname}" == "pvr" ]; then fn_info_messages_pvr + elif [ "${shortname}" == "pw" ]; then + fn_info_messages_pw elif [ "${shortname}" == "pz" ]; then fn_info_messages_pz elif [ "${shortname}" == "q2" ]; then diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index a163243dc..a5a049913 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -604,6 +604,12 @@ elif [ "${shortname}" == "pvkii" ]; then fn_default_config_remote fn_set_config_vars 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 elif [ "${shortname}" == "pz" ]; then fn_check_cfgdir array_configs+=(server.ini) From 12b60d40e4b807adb16c440eb076d8267f14467d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 21 Jan 2024 20:59:24 +0000 Subject: [PATCH 332/374] Release v24.1.0 --- lgsm/modules/core_modules.sh | 2 +- linuxgsm.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index 5a0543b9c..b557986f9 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.7.1" +modulesversion="v24.1.0" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index e3286d4f2..5cffc1fcb 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -24,7 +24,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.7.1" +version="v24.1.0" shortname="core" gameservername="core" commandname="CORE" From cb2ced76d3b4d2c0ad51a8270f2360a03eebf80e Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 21 Jan 2024 21:29:29 +0000 Subject: [PATCH 333/374] fix(pw): correct executable location --- lgsm/config-default/config-lgsm/pwserver/_default.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/config-default/config-lgsm/pwserver/_default.cfg b/lgsm/config-default/config-lgsm/pwserver/_default.cfg index dffa99a0a..b3990ca7a 100644 --- a/lgsm/config-default/config-lgsm/pwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pwserver/_default.cfg @@ -156,8 +156,8 @@ glibc="2.17" ## Game Server Directories systemdir="${serverfiles}/Pal" -executabledir="${systemdir}/Engine/Binaries/Linux" -executable="./PalServer-Linux" +executabledir="${systemdir}/Binaries/Linux/" +executable="./PalServer-Linux-Test" servercfgdir="${serverfiles}/Pal/Saved/Config/LinuxServer" servercfg="PalWorldSettings.ini" servercfgdefault="PalWorldSettings.ini" From 12e7a5589e847a21b5d14f215087f8d381d5af7a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 21 Jan 2024 22:11:49 +0000 Subject: [PATCH 334/374] Release v21.4.1 --- lgsm/modules/core_modules.sh | 2 +- linuxgsm.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index b557986f9..7293d3720 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v24.1.0" +modulesversion="v24.1.1" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index 5cffc1fcb..d9ca99ada 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -24,7 +24,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v24.1.0" +version="v24.1.1" shortname="core" gameservername="core" commandname="CORE" From 3464d334b403b387fd0aa0939bdea5babf438c08 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 24 Jan 2024 16:57:42 +0000 Subject: [PATCH 335/374] fix: servername variable assignment for sf and unt The servername variable was incorrectly assigned using the selfname variable instead of the correct servername variable. This has been fixed to ensure accurate information is displayed for each game type. --- lgsm/modules/info_game.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index f456fb0bf..da7c62991 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -1978,7 +1978,7 @@ fn_info_game_sdtd() { # Config Type: Parameters (with an ini) fn_info_game_sf() { # Parameters - servername="${selfname:-"NOT SET"}" + servername="${servername:-"NOT SET"}" port="${port:-"0"}" queryport="${queryport:-"0"}" beaconport="${beaconport:-"0"}" @@ -2131,7 +2131,7 @@ fn_info_game_tw() { # Config Type: Parameters fn_info_game_unt() { - servername="${selfname:-"NOT SET"}" + servername="${servername:-"NOT SET"}" port="${port:-"0"}" queryport="${port}" steamport="$((port + 1))" From 78f4735a2ba203633ec36784e6470e0866c1cb53 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 24 Jan 2024 20:18:46 +0000 Subject: [PATCH 336/374] fix(stats): servers with sessin only checking will now show in stats game servers with session only checks were not showing up in stats. This includes the new Palworld server --- lgsm/modules/command_monitor.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lgsm/modules/command_monitor.sh b/lgsm/modules/command_monitor.sh index 5f1ff77f6..a18154948 100644 --- a/lgsm/modules/command_monitor.sh +++ b/lgsm/modules/command_monitor.sh @@ -214,6 +214,10 @@ fn_monitor_check_session() { fn_print_ok "Checking session: " fn_print_ok_eol_nl fn_script_log_pass "Checking session: OK" + # send LinuxGSM stats if monitor is OK. + if [ "${stats}" == "on" ] || [ "${stats}" == "y" ] && [ "${querymode}" == "1" ]; then + info_stats.sh + fi else fn_print_error "Checking session: " fn_print_fail_eol_nl From 08d7a8c87d895555200834501b2651119867a072 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 24 Jan 2024 20:19:13 +0000 Subject: [PATCH 337/374] Release v24.1.2 --- lgsm/modules/core_modules.sh | 2 +- linuxgsm.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index 7293d3720..62f3d8f4e 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v24.1.1" +modulesversion="v24.1.2" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index d9ca99ada..844aca991 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -24,7 +24,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v24.1.1" +version="v24.1.2" shortname="core" gameservername="core" commandname="CORE" From 64e9e8246214d50ef187f89750d4cb6d8572d9ad Mon Sep 17 00:00:00 2001 From: Armin <50357737+PlayMTL@users.noreply.github.com> Date: Sun, 4 Feb 2024 21:07:49 +0100 Subject: [PATCH 338/374] feat(pw): port & steamport setting for palworld (#4479) * fix: servername variable assignment for sf and unt The servername variable was incorrectly assigned using the selfname variable instead of the correct servername variable. This has been fixed to ensure accurate information is displayed for each game type. * add: port & steamport setting for palworld --------- Co-authored-by: Daniel Gibbs --- lgsm/config-default/config-lgsm/pwserver/_default.cfg | 5 +++-- lgsm/modules/info_game.sh | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lgsm/config-default/config-lgsm/pwserver/_default.cfg b/lgsm/config-default/config-lgsm/pwserver/_default.cfg index b3990ca7a..cd318aacc 100644 --- a/lgsm/config-default/config-lgsm/pwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pwserver/_default.cfg @@ -11,12 +11,13 @@ ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters servername="LinuxGSM" -# Use game server config file to edit, used for port check script (workaround) +# For community servers (serverlist) you need to change these settings (publicip & publicport) in the gameserver config file aswell port="8211" +steamport="27015" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters ## Game Server Docs | https://tech.palworldgame.com/dedicated-server-guide#linux -startparameters="EpicApp=PalServer -useperfthreads -NoAsyncLoadingThread -UseMultithreadForDS -servername='${servername}'" +startparameters="EpicApp=PalServer -useperfthreads -NoAsyncLoadingThread -UseMultithreadForDS -servername='${servername}' -port='${port}' -queryport='${steamport}'" #### LinuxGSM Settings #### diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index f456fb0bf..c5c5e5d7a 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -621,7 +621,7 @@ fn_info_game_pvr() { fn_info_game_pw() { servername="${servername:-"NOT SET"}" port="${port:-"0"}" - steamport="27015" + steamport="${steamport:-"0"}" unknownport="1985" } @@ -1978,7 +1978,7 @@ fn_info_game_sdtd() { # Config Type: Parameters (with an ini) fn_info_game_sf() { # Parameters - servername="${selfname:-"NOT SET"}" + servername="${servername:-"NOT SET"}" port="${port:-"0"}" queryport="${queryport:-"0"}" beaconport="${beaconport:-"0"}" @@ -2131,7 +2131,7 @@ fn_info_game_tw() { # Config Type: Parameters fn_info_game_unt() { - servername="${selfname:-"NOT SET"}" + servername="${servername:-"NOT SET"}" port="${port:-"0"}" queryport="${port}" steamport="$((port + 1))" From 8e9493b83c2e538c58ac71ff70ed6530aeed03f6 Mon Sep 17 00:00:00 2001 From: Awesomerly Date: Sun, 4 Feb 2024 15:08:34 -0500 Subject: [PATCH 339/374] chore: update Stripper:Source to latest version (#4474) * fix: servername variable assignment for sf and unt The servername variable was incorrectly assigned using the selfname variable instead of the correct servername variable. This has been fixed to ensure accurate information is displayed for each game type. * chore: update Stripper:Source to latest version --------- Co-authored-by: Daniel Gibbs --- lgsm/modules/mods_list.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lgsm/modules/mods_list.sh b/lgsm/modules/mods_list.sh index bd6eaff24..c9a316055 100644 --- a/lgsm/modules/mods_list.sh +++ b/lgsm/modules/mods_list.sh @@ -71,6 +71,12 @@ steamworksscrapeurl="https://users.alliedmods.net/~kyles/builds/SteamWorks" steamworkslatestfile=$(curl --connect-timeout 10 -sL ${steamworksscrapeurl} | grep -m 1 linux | cut -d '"' -f 4) steamworksdownloadurl="${steamworksscrapeurl}/${steamworkslatestfile}" steamworksurl="${steamworksdownloadurl}" +# Stripper:Source +stripperversion="1.2.2-git141" +stripperlatestfile="stripper-${stripperversion}-linux.tar.gz" +stripperdownloadurl="http://www.bailopan.net/stripper/snapshots/1.2/${stripperlatestfile}" +stripperurl="${stripperdownloadurl}" + # CS:GO Mods get5lastbuild=$(curl --connect-timeout 10 -sL https://api.github.com/repos/splewis/get5/releases/latest | jq '.assets[] |select(.browser_download_url | endswith(".tar.gz"))') get5latestfile=$(echo -e "${get5lastbuild}" | jq -r '.name') @@ -149,7 +155,7 @@ mod_info_ts_amxx=(MOD "amxmodxts" "AMX Mod X: The Specialists" "${amxxtsurl}" "$ mod_info_metamodsource=(MOD "metamodsource" "Metamod: Source" "${metamodsourceurl}" "${metamodsourcelatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/metamod/metaplugins.ini;" "source;" "GAMES" "NOTGAMES" "https://www.sourcemm.net" "Plugins Framework") mod_info_sourcemod=(MOD "sourcemod" "SourceMod" "${sourcemodurl}" "${sourcemodlatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "source;" "GAMES" "NOTGAMES" "http://www.sourcemod.net" "Admin Features (requires Metamod: Source)") mod_info_steamworks=(MOD "steamworks" "SteamWorks" "${steamworksurl}" "${steamworkslatestfile}" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/KyleSanderson/SteamWorks" "Exposing SteamWorks functions to SourcePawn") -mod_info_stripper=(MOD "stripper" "Stripper Source" "http://www.bailopan.net/stripper/snapshots/1.2/stripper-1.2.2-git129-linux.tar.gz" "stripper-1.2.2-git129-linux.tar.gz" "0" "LowercaseOff" "${systemdir}" "addons/stripper/maps;" "ENGINES" "Counter-Strike: Global Offensive;Counter-Strike: Source;Day of Defeat: Source;Half Life: Deathmatch;Half Life 2: Deathmatch;Insurgency;Left 4 Dead;Left 4 Dead 2;Nuclear Dawn;Team Fortress 2;" "NOTGAMES" "http://www.bailopan.net/stripper/" "Add or remove objects from map (requires MetaMod)") +mod_info_stripper=(MOD "stripper" "Stripper Source" "${stripperurl}" "${stripperlatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/stripper/maps;" "ENGINES" "Counter-Strike: Global Offensive;Counter-Strike: Source;Day of Defeat: Source;Half Life: Deathmatch;Half Life 2: Deathmatch;Insurgency;Left 4 Dead;Left 4 Dead 2;Nuclear Dawn;Team Fortress 2;" "NOTGAMES" "http://www.bailopan.net/stripper/" "Add or remove objects from map (requires MetaMod)") # CS:GO Mods mod_info_gokz=(MOD "gokz" "GOKZ" "${gokzlatestlink}" "${gokzlatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/KZGlobalTeam/gokz" "GOKZ ${gokzlatestversion} - Implements the KZ game mode (requires SourceMod and MetaMod)") From f60025181641aa77b47d9c697abcba4c2a402734 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 4 Feb 2024 20:13:54 +0000 Subject: [PATCH 340/374] chore: add branch filtering for workflow triggers This commit adds branch filtering to the "Details Check" and "Update Check" workflows. Now, these workflows will only be triggered on the "develop" branch. This change ensures that the workflows are executed in a controlled environment and reduces unnecessary executions on other branches. --- .github/workflows/details-check.yml | 2 ++ .github/workflows/update-check.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/details-check.yml b/.github/workflows/details-check.yml index d940cfbc8..5c5448885 100644 --- a/.github/workflows/details-check.yml +++ b/.github/workflows/details-check.yml @@ -3,6 +3,8 @@ name: Details Check on: workflow_dispatch: push: + branches: + - develop concurrency: group: details-check-${{ github.ref_name }} diff --git a/.github/workflows/update-check.yml b/.github/workflows/update-check.yml index b93fb2c47..932e3ea2a 100644 --- a/.github/workflows/update-check.yml +++ b/.github/workflows/update-check.yml @@ -3,6 +3,8 @@ name: Update Check on: workflow_dispatch: push: + branches: + - develop concurrency: group: update-check-${{ github.ref_name }} From 94849a1479a1a2f05ff4f130b15acb49dcaeb837 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 4 Feb 2024 20:17:02 +0000 Subject: [PATCH 341/374] Release v24.1.3 --- lgsm/modules/core_modules.sh | 2 +- linuxgsm.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index 62f3d8f4e..1afac30c7 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v24.1.2" +modulesversion="v24.1.3" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index 844aca991..1072101a0 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -24,7 +24,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v24.1.2" +version="v24.1.3" shortname="core" gameservername="core" commandname="CORE" From e997c94f7578cf552cecb9b8bd394054bc94fefb Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 10 Feb 2024 22:53:58 +0000 Subject: [PATCH 342/374] refactor: rename details-check-generate-matrix.sh The commit renames the file `detals-check-generate-matrix.sh` to `details-check-generate-matrix.sh`. This change ensures consistency and improves clarity in the codebase. --- ...heck-generate-matrix.sh => details-check-generate-matrix.sh} | 0 .github/workflows/details-check.yml | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{detals-check-generate-matrix.sh => details-check-generate-matrix.sh} (100%) diff --git a/.github/workflows/detals-check-generate-matrix.sh b/.github/workflows/details-check-generate-matrix.sh similarity index 100% rename from .github/workflows/detals-check-generate-matrix.sh rename to .github/workflows/details-check-generate-matrix.sh diff --git a/.github/workflows/details-check.yml b/.github/workflows/details-check.yml index 5c5448885..2a04dc6ac 100644 --- a/.github/workflows/details-check.yml +++ b/.github/workflows/details-check.yml @@ -21,7 +21,7 @@ jobs: uses: actions/checkout@v4 - name: Generate matrix with generate-matrix.sh - run: chmod +x .github/workflows/detals-check-generate-matrix.sh; .github/workflows/detals-check-generate-matrix.sh + run: chmod +x .github/workflows/details-check-generate-matrix.sh; .github/workflows/details-check-generate-matrix.sh - name: Set Matrix id: set-matrix From 40a79bd19874b12276bd2d8f36d874a5a7622d55 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 11 Feb 2024 01:20:19 +0000 Subject: [PATCH 343/374] fix(ti): update default map The default map in the tiserver configuration file has been updated from "/Game/TheIsle/Maps/Game/Isla_Spiro/Isla_Spiro" to "/Game/TheIsle/Maps/Game/Gateway/Gateway". This change ensures that the server starts with the correct default map. --- lgsm/config-default/config-lgsm/tiserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/tiserver/_default.cfg b/lgsm/config-default/config-lgsm/tiserver/_default.cfg index 3141983c9..96a3726fd 100644 --- a/lgsm/config-default/config-lgsm/tiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tiserver/_default.cfg @@ -11,7 +11,7 @@ ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" port="7777" -defaultmap="/Game/TheIsle/Maps/Game/Isla_Spiro/Isla_Spiro" +defaultmap="/Game/TheIsle/Maps/Game/Gateway/Gateway" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters ## Game Server Docs | https://isle.fandom.com/wiki/The_Isle_Server_Settings_and_Configuration From 72e330b2bad3d6b4beb764ffa90fb69a82d7bc10 Mon Sep 17 00:00:00 2001 From: MicLieg <38057464+MicLieg@users.noreply.github.com> Date: Wed, 21 Feb 2024 22:29:45 +0100 Subject: [PATCH 344/374] fix(check_deps): clarify to run the generated command as root (#4490) * fix: servername variable assignment for sf and unt The servername variable was incorrectly assigned using the selfname variable instead of the correct servername variable. This has been fixed to ensure accurate information is displayed for each game type. * fix(check_deps): clarify to run the generated command as root --------- Co-authored-by: Daniel Gibbs --- lgsm/modules/check_deps.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/modules/check_deps.sh b/lgsm/modules/check_deps.sh index f92a60840..df5cb9478 100644 --- a/lgsm/modules/check_deps.sh +++ b/lgsm/modules/check_deps.sh @@ -204,11 +204,11 @@ fn_install_missing_deps() { # If automatic dependency install is unavailable. if [ "${autodepinstall}" != "0" ]; then if [ "$(command -v apt 2> /dev/null)" ]; then - echo -e "${i386installcommand}sudo apt update; sudo apt install ${array_deps_missing[*]}" + echo -e " Run: '${green}${i386installcommand}sudo apt update; sudo apt install ${array_deps_missing[*]}${default}' as root to install missing dependencies." elif [ "$(command -v dnf 2> /dev/null)" ]; then - echo -e "sudo dnf install ${array_deps_missing[*]}" + echo -e " Run: '${green}sudo dnf install ${array_deps_missing[*]}${default}' as root to install missing dependencies." elif [ "$(command -v yum 2> /dev/null)" ]; then - echo -e "sudo yum install ${array_deps_missing[*]}" + echo -e " Run: '${green}sudo yum install ${array_deps_missing[*]}${default}' as root to install missing dependencies." fi fi From ab3404c188d1286282d085bd4b064010fd0ff201 Mon Sep 17 00:00:00 2001 From: Antonin CLAUZIER Date: Thu, 22 Feb 2024 01:30:15 +0400 Subject: [PATCH 345/374] feat(dayz): switch appid to stable release (#4502) * feat(dayzserver): switch appid to stable release * feat(dayzserver): add steam login --- lgsm/config-default/config-lgsm/dayzserver/_default.cfg | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/dayzserver/_default.cfg b/lgsm/config-default/config-lgsm/dayzserver/_default.cfg index 0d5bf5e3e..82901c2cd 100644 --- a/lgsm/config-default/config-lgsm/dayzserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dayzserver/_default.cfg @@ -8,6 +8,10 @@ #### Game Server Settings #### +## SteamCMD Login | https://docs.linuxgsm.com/steamcmd#steamcmd-login +steamuser="username" +steampass='password' + ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" port="2302" @@ -122,7 +126,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid -appid="1042420" +appid="223350" steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" From e281f5a64bc2adfec52c9a4918450ad5d2605547 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Feb 2024 21:31:15 +0000 Subject: [PATCH 346/374] build(deps): bump webfactory/ssh-agent from 0.8.0 to 0.9.0 (#4489) Bumps [webfactory/ssh-agent](https://github.com/webfactory/ssh-agent) from 0.8.0 to 0.9.0. - [Release notes](https://github.com/webfactory/ssh-agent/releases) - [Changelog](https://github.com/webfactory/ssh-agent/blob/master/CHANGELOG.md) - [Commits](https://github.com/webfactory/ssh-agent/compare/v0.8.0...v0.9.0) --- updated-dependencies: - dependency-name: webfactory/ssh-agent dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/git-sync.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/git-sync.yml b/.github/workflows/git-sync.yml index 2f223f370..544ba6892 100644 --- a/.github/workflows/git-sync.yml +++ b/.github/workflows/git-sync.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: SSH Agent - uses: webfactory/ssh-agent@v0.8.0 + uses: webfactory/ssh-agent@v0.9.0 with: ssh-private-key: ${{ secrets.BITBUCKET_SECRET }} From 1528cba08d55c76fc667afb98279e7077d6a56d0 Mon Sep 17 00:00:00 2001 From: BertBrenner <42405825+BertBrenner@users.noreply.github.com> Date: Wed, 21 Feb 2024 22:32:10 +0100 Subject: [PATCH 347/374] fix: distro.sh: line 100: [: : integer expression expected (#4486) * fix: servername variable assignment for sf and unt The servername variable was incorrectly assigned using the selfname variable instead of the correct servername variable. This has been fixed to ensure accurate information is displayed for each game type. * [FIX] #4465 --------- Co-authored-by: Daniel Gibbs --- lgsm/modules/info_distro.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/modules/info_distro.sh b/lgsm/modules/info_distro.sh index a4e3521f8..4465d6cdb 100644 --- a/lgsm/modules/info_distro.sh +++ b/lgsm/modules/info_distro.sh @@ -30,13 +30,13 @@ for distro_info in "${distro_info_array[@]}"; do if [ -f "/etc/os-release" ] && [ "${distro_info}" == "os-release" ]; then distroname="$(grep "PRETTY_NAME" /etc/os-release | awk -F= '{gsub(/"/,"",$2);print $2}')" # e.g. Ubuntu 22.04.3 LTS distroversion="$(grep "VERSION_ID" /etc/os-release | awk -F= '{gsub(/"/,"",$2);print $2}')" # e.g. 22.04 + distroid="$(grep "ID=" /etc/os-release | grep -v _ID | awk -F= '{gsub(/"/,"",$2);print $2}')" # e.g. ubuntu + distroidlike="$(grep "ID_LIKE=" /etc/os-release | grep -v _ID | awk -F= '{gsub(/"/,"",$2);print $2}')" # e.g. debian + distrocodename="$(grep "VERSION_CODENAME" /etc/os-release | awk -F= '{gsub(/"/,"",$2);print $2}')" # e.g. jammy # Special var for rhel like distros to remove point in number e.g 8.4 to just 8. if [[ "${distroidlike}" == *"rhel"* ]] || [ "${distroid}" == "rhel" ]; then distroversionrh="$(sed -nr 's/^VERSION_ID="([0-9]*).+?"/\1/p' /etc/os-release)" # e.g. 8 fi - distroid="$(grep "ID=" /etc/os-release | grep -v _ID | awk -F= '{gsub(/"/,"",$2);print $2}')" # e.g. ubuntu - distroidlike="$(grep "ID_LIKE=" /etc/os-release | grep -v _ID | awk -F= '{gsub(/"/,"",$2);print $2}')" # e.g. debian - distrocodename="$(grep "VERSION_CODENAME" /etc/os-release | awk -F= '{gsub(/"/,"",$2);print $2}')" # e.g. jammy elif [ "$(command -v lsb_release 2> /dev/null)" ] && [ "${distro_info}" == "lsb_release" ]; then if [ -z "${distroname}" ]; then distroname="$(lsb_release -sd)" # e.g. Ubuntu 22.04.3 LTS From e492e09fa69daef6ec27a12308b88638bdca924a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 21 Feb 2024 21:34:03 +0000 Subject: [PATCH 348/374] Release v24.1.4 --- lgsm/modules/core_modules.sh | 2 +- linuxgsm.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index 1afac30c7..70a452127 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v24.1.3" +modulesversion="v24.1.4" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index 1072101a0..e3c663754 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -24,7 +24,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v24.1.3" +version="v24.1.4" shortname="core" gameservername="core" commandname="CORE" From b5614f5cbfd1c41aa5bb3282273a996ed16ca626 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Feb 2024 21:40:54 +0000 Subject: [PATCH 349/374] build(deps): bump github/issue-labeler from 3.3 to 3.4 (#4478) Bumps [github/issue-labeler](https://github.com/github/issue-labeler) from 3.3 to 3.4. - [Release notes](https://github.com/github/issue-labeler/releases) - [Commits](https://github.com/github/issue-labeler/compare/v3.3...v3.4) --- updated-dependencies: - dependency-name: github/issue-labeler dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/labeler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index b8bf63084..4a946a861 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Issue Labeler - uses: github/issue-labeler@v3.3 + uses: github/issue-labeler@v3.4 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" configuration-path: .github/labeler.yml From 476ed02bec8da3d4fecb2e6bba956a298fe5e3f5 Mon Sep 17 00:00:00 2001 From: MicLieg <38057464+MicLieg@users.noreply.github.com> Date: Mon, 26 Feb 2024 14:57:55 +0100 Subject: [PATCH 350/374] feat(backup): add parallel backup creation using pigz (#4509) --- lgsm/data/almalinux-8.csv | 2 +- lgsm/data/almalinux-9.csv | 2 +- lgsm/data/centos-7.csv | 2 +- lgsm/data/centos-8.csv | 2 +- lgsm/data/centos-9.csv | 2 +- lgsm/data/debian-10.csv | 2 +- lgsm/data/debian-11.csv | 2 +- lgsm/data/debian-12.csv | 2 +- lgsm/data/debian-9.csv | 2 +- lgsm/data/rhel-7.csv | 2 +- lgsm/data/rhel-8.csv | 2 +- lgsm/data/rhel-9.csv | 2 +- lgsm/data/rocky-8.csv | 2 +- lgsm/data/rocky-9.csv | 2 +- lgsm/data/ubuntu-16.04.csv | 2 +- lgsm/data/ubuntu-18.04.csv | 2 +- lgsm/data/ubuntu-20.04.csv | 2 +- lgsm/data/ubuntu-22.04.csv | 2 +- lgsm/data/ubuntu-23.04.csv | 2 +- lgsm/data/ubuntu-23.10.csv | 2 +- lgsm/modules/check.sh | 2 +- lgsm/modules/command_backup.sh | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index 53021ec30..c156eb053 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz +all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,pigz,python36,tar,tmux,unzip,util-linux,wget,xz steamcmd,glibc.i686,libstdc++.i686 ac ahl diff --git a/lgsm/data/almalinux-9.csv b/lgsm/data/almalinux-9.csv index 8f643487c..faacfa915 100644 --- a/lgsm/data/almalinux-9.csv +++ b/lgsm/data/almalinux-9.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python3,tar,tmux,unzip,util-linux,wget,xz +all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,pigz,python3,tar,tmux,unzip,util-linux,wget,xz steamcmd,glibc.i686,libstdc++.i686 ac ahl diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index 5315d8de0..84df6f5c6 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python3,tar,tmux,unzip,util-linux,wget,xz +all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,pigz,python3,tar,tmux,unzip,util-linux,wget,xz steamcmd,glibc.i686,libstdc++.i686 ac ahl diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index 53021ec30..c156eb053 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz +all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,pigz,python36,tar,tmux,unzip,util-linux,wget,xz steamcmd,glibc.i686,libstdc++.i686 ac ahl diff --git a/lgsm/data/centos-9.csv b/lgsm/data/centos-9.csv index 8f643487c..faacfa915 100644 --- a/lgsm/data/centos-9.csv +++ b/lgsm/data/centos-9.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python3,tar,tmux,unzip,util-linux,wget,xz +all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,pigz,python3,tar,tmux,unzip,util-linux,wget,xz steamcmd,glibc.i686,libstdc++.i686 ac ahl diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index a2d1ee665..5f7f5f261 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -1,7 +1,7 @@ ac ahl ahl2 -all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,pigz,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils ark arma3 armar,libcurl4 diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index bdf03879e..3ecedd538 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,pigz,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd ac ahl diff --git a/lgsm/data/debian-12.csv b/lgsm/data/debian-12.csv index cc884a6f8..0ff8b391d 100644 --- a/lgsm/data/debian-12.csv +++ b/lgsm/data/debian-12.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat-openbsd,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat-openbsd,pigz,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd ac ahl diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index ccefafcc2..cb5eea4a1 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,pigz,python3,tar,tmux,unzip,util-linux,wget,xz-utils steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd ac ahl diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index 14cc292ac..2b3be410d 100644 --- a/lgsm/data/rhel-7.csv +++ b/lgsm/data/rhel-7.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz +all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,pigz,python36,tar,tmux,unzip,util-linux,wget,xz steamcmd,glibc.i686,libstdc++.i686 ac ahl diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index 53021ec30..c156eb053 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz +all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,pigz,python36,tar,tmux,unzip,util-linux,wget,xz steamcmd,glibc.i686,libstdc++.i686 ac ahl diff --git a/lgsm/data/rhel-9.csv b/lgsm/data/rhel-9.csv index 8f643487c..faacfa915 100644 --- a/lgsm/data/rhel-9.csv +++ b/lgsm/data/rhel-9.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python3,tar,tmux,unzip,util-linux,wget,xz +all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,pigz,python3,tar,tmux,unzip,util-linux,wget,xz steamcmd,glibc.i686,libstdc++.i686 ac ahl diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index 53021ec30..c156eb053 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz +all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,pigz,python36,tar,tmux,unzip,util-linux,wget,xz steamcmd,glibc.i686,libstdc++.i686 ac ahl diff --git a/lgsm/data/rocky-9.csv b/lgsm/data/rocky-9.csv index 8f643487c..faacfa915 100644 --- a/lgsm/data/rocky-9.csv +++ b/lgsm/data/rocky-9.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python3,tar,tmux,unzip,util-linux,wget,xz +all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,pigz,python3,tar,tmux,unzip,util-linux,wget,xz steamcmd,glibc.i686,libstdc++.i686 ac ahl diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index e50ea48c0..9d88fde5c 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,pigz,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd ac ahl diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index 5294e6757..a0b809b05 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,pigz,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd ac ahl diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index f864b0d0a..092792fa3 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,pigz,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd ac ahl diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index c010ac60a..21bab16cb 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,pigz,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd ac ahl diff --git a/lgsm/data/ubuntu-23.04.csv b/lgsm/data/ubuntu-23.04.csv index 1a52e301e..a29f403d7 100644 --- a/lgsm/data/ubuntu-23.04.csv +++ b/lgsm/data/ubuntu-23.04.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat-openbsd,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat-openbsd,pigz,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd ac ahl diff --git a/lgsm/data/ubuntu-23.10.csv b/lgsm/data/ubuntu-23.10.csv index 1a52e301e..a29f403d7 100644 --- a/lgsm/data/ubuntu-23.10.csv +++ b/lgsm/data/ubuntu-23.10.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat-openbsd,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat-openbsd,pigz,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd ac ahl diff --git a/lgsm/modules/check.sh b/lgsm/modules/check.sh index 1b8796e47..66b44aec3 100644 --- a/lgsm/modules/check.sh +++ b/lgsm/modules/check.sh @@ -54,7 +54,7 @@ for allowed_command in "${allowed_commands_array[@]}"; do fi done -allowed_commands_array=(DEBUG START) +allowed_commands_array=(BACKUP DEBUG START) for allowed_command in "${allowed_commands_array[@]}"; do if [ "${allowed_command}" == "${commandname}" ]; then check_deps.sh diff --git a/lgsm/modules/command_backup.sh b/lgsm/modules/command_backup.sh index e0ef3f0a1..a3e1bbe7f 100644 --- a/lgsm/modules/command_backup.sh +++ b/lgsm/modules/command_backup.sh @@ -126,7 +126,7 @@ fn_backup_compression() { core_exit.sh fi - tar -czf "${backupdir}/${backupname}.tar.gz" -C "${rootdir}" --exclude "${excludedir}" --exclude "${lockdir}" --exclude "${tmpdir}" ./. + tar --use-compress-program=pigz -cf "${backupdir}/${backupname}.tar.gz" -C "${rootdir}" --exclude "${excludedir}" --exclude "${lockdir}" --exclude "${tmpdir}" ./. local exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol From fce9f65d6a27516308d60ec6c5bcedd24fe3ed43 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 26 Feb 2024 15:55:12 +0000 Subject: [PATCH 351/374] feat(monitor): prepare for gamedig 5 (#4510) * feat: gamedig 5 * install gamedig in lgsm dir if node exists * and * use local gamedig version * local * palworld * pw query port * mbe * fix ro system system a * public ip * jc2m * fix(ti): update default map The default map in the tiserver configuration file has been updated from "/Game/TheIsle/Maps/Game/Isla_Spiro/Isla_Spiro" to "/Game/TheIsle/Maps/Game/Gateway/Gateway". This change ensures that the server starts with the correct default map. * fix: _default.cfg NOT SET * download package.json and run npm install * update samp * disable query for squad * correct name * feat: update querymode and querytype in server configs Changed querymode to 3 and set querytype to "eco" for ecoserver. Updated querymode to 2 and changed querytype to "protocol-valve" for sdtdserver. * feat: add new port command for bfv game Added a new port command for the "bfv" game in the info_messages script. * queryport eco * add eco rconport * adding message * if node 16 or above * rename to check_gamedig --- .../config-lgsm/ecoserver/_default.cfg | 4 +- .../config-lgsm/jc2server/_default.cfg | 2 +- .../config-lgsm/mcbserver/_default.cfg | 2 +- .../config-lgsm/pwserver/_default.cfg | 4 +- .../config-lgsm/sampserver/_default.cfg | 2 +- .../config-lgsm/sdtdserver/_default.cfg | 2 +- .../config-lgsm/squadserver/_default.cfg | 4 +- lgsm/modules/check.sh | 7 + lgsm/modules/check_gamedig.sh | 15 + lgsm/modules/check_ip.sh | 8 +- lgsm/modules/command_dev_query_raw.sh | 2 +- lgsm/modules/command_install.sh | 3 + lgsm/modules/command_monitor.sh | 2 +- lgsm/modules/command_update_linuxgsm.sh | 1 + lgsm/modules/core_modules.sh | 5 + lgsm/modules/fix.sh | 2 +- lgsm/modules/fix_ro.sh | 134 +++- lgsm/modules/info_game.sh | 4 + lgsm/modules/info_messages.sh | 4 + lgsm/modules/query_gamedig.sh | 13 +- lgsm/modules/query_gsquery.py | 40 +- package-lock.json | 639 ++++++++++++++++++ package.json | 5 +- 23 files changed, 839 insertions(+), 65 deletions(-) create mode 100644 lgsm/modules/check_gamedig.sh diff --git a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg index 470b43d06..794a6ed69 100644 --- a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg @@ -131,8 +131,8 @@ stopmode="2" # 3: gamedig # 4: gsquery # 5: tcp -querymode="1" -querytype="" +querymode="3" +querytype="eco" ## Console type consoleverbose="yes" diff --git a/lgsm/config-default/config-lgsm/jc2server/_default.cfg b/lgsm/config-default/config-lgsm/jc2server/_default.cfg index caa40d93a..da9b4f40a 100644 --- a/lgsm/config-default/config-lgsm/jc2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc2server/_default.cfg @@ -132,7 +132,7 @@ stopmode="2" # 4: gsquery # 5: tcp querymode="2" -querytype="jc2mp" +querytype="jc2m" ## Console type consoleverbose="yes" diff --git a/lgsm/config-default/config-lgsm/mcbserver/_default.cfg b/lgsm/config-default/config-lgsm/mcbserver/_default.cfg index 586575d10..db2bbf86d 100644 --- a/lgsm/config-default/config-lgsm/mcbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mcbserver/_default.cfg @@ -125,7 +125,7 @@ stopmode="5" # 4: gsquery # 5: tcp querymode="2" -querytype="minecraftbe" +querytype="mbe" ## Console type consoleverbose="yes" diff --git a/lgsm/config-default/config-lgsm/pwserver/_default.cfg b/lgsm/config-default/config-lgsm/pwserver/_default.cfg index cd318aacc..eaf5d775c 100644 --- a/lgsm/config-default/config-lgsm/pwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pwserver/_default.cfg @@ -139,8 +139,8 @@ stopmode="2" # 3: gamedig # 4: gsquery # 5: tcp -querymode="1" -querytype="1" +querymode="3" +querytype="palworld" ## Console type consoleverbose="yes" diff --git a/lgsm/config-default/config-lgsm/sampserver/_default.cfg b/lgsm/config-default/config-lgsm/sampserver/_default.cfg index 510b9a689..0888064ba 100644 --- a/lgsm/config-default/config-lgsm/sampserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sampserver/_default.cfg @@ -123,7 +123,7 @@ stopmode="2" # 4: gsquery # 5: tcp querymode="3" -querytype="samp" +querytype="gtasam" ## Console type consoleverbose="no" diff --git a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg index 61cd85a8a..24cd2c0ac 100644 --- a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg @@ -134,7 +134,7 @@ stopmode="8" # 3: gamedig # 4: gsquery # 5: tcp -querymode="5" +querymode="2" querytype="protocol-valve" ## Console type diff --git a/lgsm/config-default/config-lgsm/squadserver/_default.cfg b/lgsm/config-default/config-lgsm/squadserver/_default.cfg index 09c0e94b1..55bc2bf44 100644 --- a/lgsm/config-default/config-lgsm/squadserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/squadserver/_default.cfg @@ -136,8 +136,8 @@ stopmode="2" # 3: gamedig # 4: gsquery # 5: tcp -querymode="2" -querytype="protocol-valve" +querymode="1" +querytype="" ## Console type consoleverbose="yes" diff --git a/lgsm/modules/check.sh b/lgsm/modules/check.sh index 66b44aec3..2a63df3f3 100644 --- a/lgsm/modules/check.sh +++ b/lgsm/modules/check.sh @@ -99,3 +99,10 @@ for allowed_command in "${allowed_commands_array[@]}"; do check_system_requirements.sh fi done + +allowed_commands_array=(DETAILS MONITOR START STOP UPDATE VALIDATE POST-DETAILS) +for allowed_command in "${allowed_commands_array[@]}"; do + if [ "${allowed_command}" == "${commandname}" ]; then + check_gamedig.sh + fi +done diff --git a/lgsm/modules/check_gamedig.sh b/lgsm/modules/check_gamedig.sh new file mode 100644 index 000000000..4155e6a69 --- /dev/null +++ b/lgsm/modules/check_gamedig.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# LinuxGSM check_gamedig.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Installs nodejs and gamedig + +if [ "$(command -v node)" ] && [ "$(node -v | cut -d 'v' -f 2 | cut -d '.' -f 1)" -ge 16 ] && [ ! -f "${lgsmdir}/node_modules/gamedig/bin/gamedig.js" ]; then + echo -e "" + echo -e "${bold}${lightyellow}Installing Gamedig${default}" + fn_script_log_info "Installing Gamedig" + cd "${lgsmdir}" || exit + wget -N --no-check-certificate "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/${githubbranch}/package.json" + npm install +fi diff --git a/lgsm/modules/check_ip.sh b/lgsm/modules/check_ip.sh index 7671429cd..bf0418f74 100644 --- a/lgsm/modules/check_ip.sh +++ b/lgsm/modules/check_ip.sh @@ -38,25 +38,25 @@ function fn_is_valid_ip() { # If the IP variable has been set by user. if fn_is_valid_ip "${ip}"; then - queryips=("${ip}") + queryips=("${ip}" "${publicip}") httpip=("${ip}") telnetip=("${ip}") # If the game config has an IP set. elif fn_is_valid_ip "${configip}"; then - queryips=("${configip}") + queryips=("${configip}" "${publicip}") ip="${configip}" httpip=("${configip}") telnetip=("${configip}") # If there is only 1 server IP address. # Some IP details can automatically use the one IP. elif [ "${#current_ips[@]}" == "1" ]; then - queryips=("127.0.0.1" "${current_ips[@]}") + queryips=("127.0.0.1" "${current_ips[@]}" "${publicip}") ip="0.0.0.0" httpip=("${current_ips[@]}") telnetip=("${current_ips[@]}") # If no ip is set by the user and server has more than one IP. else - queryips=("127.0.0.1" "${current_ips[@]}") + queryips=("127.0.0.1" "${current_ips[@]}" "${publicip}") ip="0.0.0.0" httpip=("${ip}") telnetip=("${ip}") diff --git a/lgsm/modules/command_dev_query_raw.sh b/lgsm/modules/command_dev_query_raw.sh index 2314d75b4..ae49a1b85 100644 --- a/lgsm/modules/command_dev_query_raw.sh +++ b/lgsm/modules/command_dev_query_raw.sh @@ -207,7 +207,7 @@ echo -e "" echo -e "${lightgreen}Gamedig Raw Output${default}" fn_messages_separator echo -e "" -if [ ! "$(command -v gamedig 2> /dev/null)" ]; then +if [ ! "$(command -v gamedig 2> /dev/null)" ] || [ ! -f "${lgsmdir}/node_modules/gamedig/bin/gamedig.js" ]; then fn_print_failure_nl "gamedig not installed" fi if [ ! "$(command -v jq 2> /dev/null)" ]; then diff --git a/lgsm/modules/command_install.sh b/lgsm/modules/command_install.sh index e8cba7560..c3bf27c61 100644 --- a/lgsm/modules/command_install.sh +++ b/lgsm/modules/command_install.sh @@ -30,6 +30,9 @@ else install_server_files.sh fi + # Install gamedig + check_gamedig.sh + # Configuration. install_config.sh if [ -v gslt ]; then diff --git a/lgsm/modules/command_monitor.sh b/lgsm/modules/command_monitor.sh index a18154948..e9baf71e5 100644 --- a/lgsm/modules/command_monitor.sh +++ b/lgsm/modules/command_monitor.sh @@ -369,7 +369,7 @@ fn_monitor_loop() { for querymethod in "${query_methods_array[@]}"; do # Will check if gamedig is installed and bypass if not. if [ "${querymethod}" == "gamedig" ]; then - if [ "$(command -v gamedig 2> /dev/null)" ] && [ "$(command -v jq 2> /dev/null)" ]; then + if [ "$(command -v gamedig 2> /dev/null)" ] || [ -f "${lgsmdir}/node_modules/gamedig/bin/gamedig.js" ] && [ "$(command -v jq 2> /dev/null)" ]; then if [ -z "${monitorpass}" ]; then fn_monitor_query fi diff --git a/lgsm/modules/command_update_linuxgsm.sh b/lgsm/modules/command_update_linuxgsm.sh index 9cd66430c..d20204187 100644 --- a/lgsm/modules/command_update_linuxgsm.sh +++ b/lgsm/modules/command_update_linuxgsm.sh @@ -13,6 +13,7 @@ fn_firstcommand_set fn_print_dots "" check.sh info_distro.sh +info_game.sh fn_script_log_info "Updating LinuxGSM" diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index 70a452127..9852268f0 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -714,6 +714,11 @@ install_factorio_save.sh() { fn_fetch_module } +check_gamedig.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + install_dst_token.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module diff --git a/lgsm/modules/fix.sh b/lgsm/modules/fix.sh index 280112728..dbb8e3545 100644 --- a/lgsm/modules/fix.sh +++ b/lgsm/modules/fix.sh @@ -52,7 +52,7 @@ fn_apply_fix() { fi } -apply_pre_start_fix=(arma3 armar ark av bt bo csgo cmw dst hw ins kf nmrih onset pvr rust rw samp sdtd sfc sof2 squad st tf2 terraria ts3 mcb mta unt vh wurm zmr) +apply_pre_start_fix=(arma3 armar ark av bt bo csgo cmw dst hw ins kf nmrih onset pvr ro rust rw samp sdtd sfc sof2 squad st tf2 terraria ts3 mcb mta unt vh wurm zmr) apply_post_install_fix=(av kf kf2 ro ut2k4 ut ut3) # validate registered fixes for safe development diff --git a/lgsm/modules/fix_ro.sh b/lgsm/modules/fix_ro.sh index 72864d699..21663a9ea 100644 --- a/lgsm/modules/fix_ro.sh +++ b/lgsm/modules/fix_ro.sh @@ -3,37 +3,115 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Resolves issues with Red Orchestra. +# Description: Resolves issues with Red Orchestra: Ostfront 41-45. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -echo -e "applying webinterface ROOst.css fix." -echo -e "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13" +# echo -e "applying WebAdmin ROOst.css fix." +# echo -e "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13" sed -i 's/none}/none;/g' "${serverfiles}/Web/ServerAdmin/ROOst.css" sed -i 's/underline}/underline;/g' "${serverfiles}/Web/ServerAdmin/ROOst.css" -fn_sleep_time -echo -e "applying webinterface CharSet fix." -echo -e "http://forums.tripwireinteractive.com/showpost.php?p=442340&postcount=1" +# echo -e "applying WebAdmin CharSet fix." +# echo -e "http://forums.tripwireinteractive.com/showpost.php?p=442340&postcount=1" sed -i 's/CharSet="iso-8859-1"/CharSet="utf-8"/g' "${systemdir}/uweb.int" -fn_sleep_time -echo -e "applying Steam AppID fix." -sed -i 's/1210/1200/g' "${systemdir}/steam_appid.txt" -fn_sleep_time -echo -e "applying server name fix." -fn_sleep_time -echo -e "forcing server restart..." -fn_sleep_time -exitbypass=1 -command_start.sh -fn_firstcommand_reset -fn_sleep_time_5 -exitbypass=1 -command_stop.sh -fn_firstcommand_reset -exitbypass=1 -command_start.sh -fn_firstcommand_reset -fn_sleep_time_5 -exitbypass=1 -command_stop.sh -fn_firstcommand_reset + +# get md5sum of steamclient.so +if [ -f "${serverfiles}/system/steamclient.so" ]; then + steamclientmd5=$(md5sum "${serverfiles}/system/steamclient.so" | awk '{print $1;}') +fi +#get md5sum of libtier0_s.so +if [ -f "${serverfiles}/system/libtier0_s.so" ]; then + libtier0_smd5=$(md5sum "${serverfiles}/system/libtier0_s.so" | awk '{print $1;}') +fi +#get md5sum of libvstdlib_s.so +if [ -f "${serverfiles}/system/libvstdlib_s.so" ]; then + libvstdlib_smd5=$(md5sum "${serverfiles}/system/libvstdlib_s.so" | awk '{print $1;}') +fi + +# get md5sum of steamclient.so from steamcmd +if [ -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" ]; then + steamcmdsteamclientmd5=$(md5sum "${HOME}/.steam/steamcmd/linux32/steamclient.so" | awk '{print $1;}') +elif [ -f "${steamcmddir}/linux32/steamclient.so" ]; then + steamcmdsteamclientmd5=$(md5sum "${steamcmddir}/linux32/steamclient.so" | awk '{print $1;}') +elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux32/steamclient.so" ]; then + steamcmdsteamclientmd5=$(md5sum "${HOME}/.local/share/Steam/steamcmd/linux32/steamclient.so" | awk '{print $1;}') +fi + +# get md5sum of libtier0_s.so from steamcmd +if [ -f "${HOME}/.steam/steamcmd/linux32/libtier0_s.so" ]; then + steamcmdlibtier0_smd5=$(md5sum "${HOME}/.steam/steamcmd/linux32/libtier0_s.so" | awk '{print $1;}') +elif [ -f "${steamcmddir}/linux32/libtier0_s.so" ]; then + steamcmdlibtier0_smd5=$(md5sum "${steamcmddir}/linux32/libtier0_s.so" | awk '{print $1;}') +elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux32/libtier0_s.so" ]; then + steamcmdlibtier0_smd5=$(md5sum "${HOME}/.local/share/Steam/steamcmd/linux32/libtier0_s.so" | awk '{print $1;}') +fi + +# get md5sum of libvstdlib_s.so from steamcmd +if [ -f "${HOME}/.steam/steamcmd/linux32/libvstdlib_s.so" ]; then + steamcmdlibvstdlib_smd5=$(md5sum "${HOME}/.steam/steamcmd/linux32/libvstdlib_s.so" | awk '{print $1;}') +elif [ -f "${steamcmddir}/linux32/libvstdlib_s.so" ]; then + steamcmdlibvstdlib_smd5=$(md5sum "${steamcmddir}/linux32/libvstdlib_s.so" | awk '{print $1;}') +elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux32/libvstdlib_s.so" ]; then + steamcmdlibvstdlib_smd5=$(md5sum "${HOME}/.local/share/Steam/steamcmd/linux32/libvstdlib_s.so" | awk '{print $1;}') +fi + +if [ ! -f "${serverfiles}/system/steamclient.so" ] || [ "${steamcmdsteamclientmd5}" != "${steamclientmd5}" ]; then + fixname="steamclient.so x86" + fn_fix_msg_start + if [ -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" ]; then + cp "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${serverfiles}/system/steamclient.so" + elif [ -f "${steamcmddir}/linux32/steamclient.so" ]; then + cp "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/system/steamclient.so" + elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux32/steamclient.so" ]; then + cp "${HOME}/.local/share/Steam/steamcmd/linux32/steamclient.so" "${serverfiles}/system/steamclient.so" + fi + fn_fix_msg_end +fi + +if [ ! -f "${serverfiles}/system/libtier0_s.so" ] || [ "${steamcmdlibtier0_smd5}" != "${libtier0_smd5}" ]; then + fixname="libtier0_s.so" + fn_fix_msg_start + if [ -f "${HOME}/.steam/steamcmd/linux32/libtier0_s.so" ]; then + cp "${HOME}/.steam/steamcmd/linux32/libtier0_s.so" "${serverfiles}/system/libtier0_s.so" + elif [ -f "${steamcmddir}/linux32/libtier0_s.so" ]; then + cp "${steamcmddir}/linux32/libtier0_s.so" "${serverfiles}/system/libtier0_s.so" + elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux32/libtier0_s.so" ]; then + cp "${HOME}/.local/share/Steam/steamcmd/linux32/libtier0_s.so" "${serverfiles}/system/libtier0_s.so" + fi + fn_fix_msg_end +fi + +if [ ! -f "${serverfiles}/system/libvstdlib_s.so" ] || [ "${steamcmdlibvstdlib_smd5}" != "${libvstdlib_smd5}" ]; then + fixname="libvstdlib_s.so" + fn_fix_msg_start + if [ -f "${HOME}/.steam/steamcmd/linux32/libvstdlib_s.so" ]; then + cp "${HOME}/.steam/steamcmd/linux32/libvstdlib_s.so" "${serverfiles}/system/libvstdlib_s.so" + elif [ -f "${steamcmddir}/linux32/libvstdlib_s.so" ]; then + cp "${steamcmddir}/linux32/libvstdlib_s.so" "${serverfiles}/system/libvstdlib_s.so" + elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux32/libvstdlib_s.so" ]; then + cp "${HOME}/.local/share/Steam/steamcmd/linux32/libvstdlib_s.so" "${serverfiles}/system/libvstdlib_s.so" + fi + fn_fix_msg_end +fi + +# if running install command +if [ "${commandname}" == "INSTALL" ]; then + echo -e "applying server name fix." + fn_sleep_time + echo -e "forcing server restart..." + fn_sleep_time + exitbypass=1 + command_start.sh + fn_firstcommand_reset + fn_sleep_time_5 + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + exitbypass=1 + command_start.sh + fn_firstcommand_reset + fn_sleep_time_5 + exitbypass=1 + command_stop.sh + fn_firstcommand_reset +fi diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index c5c5e5d7a..e943a9d91 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -621,6 +621,7 @@ fn_info_game_pvr() { fn_info_game_pw() { servername="${servername:-"NOT SET"}" port="${port:-"0"}" + queryport="${port:-"0"}" steamport="${steamport:-"0"}" unknownport="1985" } @@ -1242,6 +1243,7 @@ fn_info_game_eco() { fn_info_game_json "httpport" ".WebServerPort" fn_info_game_json "maxplayers" ".MaxConnections" fn_info_game_json "port" ".GameServerPort" + fn_info_game_json "rconport" ".RconServerPort" fn_info_game_json "servername" ".Description" fn_info_game_json "serverpassword" ".Password" fn_info_game_json "tickrate" ".Rate" @@ -1250,6 +1252,8 @@ fn_info_game_eco() { httpport="${httpport:-"0"}" maxplayers="${maxplayers:-"0"}" port="${port:-"0"}" + queryport="${port:-"0"}" + rconport="${rconport:-"0"}" servername="${servername:-"NOT SET"}" serverpassword="${serverpassword:-"NOT SET"}" tickrate="${tickrate:-"0"}" diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index f619c964e..c5d03919c 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -692,6 +692,8 @@ fn_info_messages_ports() { portcommand="ss -tuplwn | grep AvorionServer" elif [ "${shortname}" == "bf1942" ]; then portcommand="ss -tuplwn | grep bf1942_lnxded" + elif [ "${shortname}" == "bfv" ]; then + portcommand="ss -tuplwn | grep bfv_linded" elif [ "${shortname}" == "dayz" ]; then portcommand="ss -tuplwn | grep enfMain" elif [ "${shortname}" == "q4" ]; then @@ -1015,7 +1017,9 @@ fn_info_messages_eco() { { fn_port "header" fn_port "Game" port udp + fn_port "Query" queryport udp fn_port "Web Interface" httpport tcp + fn_port "RCON" rconport tcp } | column -s $'\t' -t } diff --git a/lgsm/modules/query_gamedig.sh b/lgsm/modules/query_gamedig.sh index 28f70a3b7..efac18d45 100644 --- a/lgsm/modules/query_gamedig.sh +++ b/lgsm/modules/query_gamedig.sh @@ -10,7 +10,14 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Default query status to failure. Will be changed to 0 if query is successful. querystatus="2" # Check if gamedig and jq are installed. -if [ "$(command -v gamedig 2> /dev/null)" ] && [ "$(command -v jq 2> /dev/null)" ]; then + +if [ -f "${lgsmdir}/node_modules/gamedig/bin/gamedig.js" ]; then + gamedigbinary="${lgsmdir}/node_modules/gamedig/bin/gamedig.js" +else + gamedigbinary="gamedig" +fi + +if [ "$(command -v "${gamedigbinary}" 2> /dev/null)" ] && [ "$(command -v jq 2> /dev/null)" ]; then # will bypass query if server offline. check_status.sh @@ -20,8 +27,8 @@ if [ "$(command -v gamedig 2> /dev/null)" ] && [ "$(command -v jq 2> /dev/null)" queryport="${port}" fi # checks if query is working null = pass. - gamedigcmd=$(echo -e "gamedig --type \"${querytype}\" \"${queryip}:${queryport}\"|jq") - gamedigraw=$(gamedig --type "${querytype}" "${queryip}:${queryport}") + gamedigcmd=$(echo -e "${gamedigbinary} --type \"${querytype}\" \"${queryip}:${queryport}\"|jq") + gamedigraw=$(${gamedigbinary} --type "${querytype}" "${queryip}:${queryport}") querystatus=$(echo "${gamedigraw}" | jq '.error|length') if [ "${querytype}" == "teamspeak3" ]; then diff --git a/lgsm/modules/query_gsquery.py b/lgsm/modules/query_gsquery.py index 8da93ada4..788789f0a 100644 --- a/lgsm/modules/query_gsquery.py +++ b/lgsm/modules/query_gsquery.py @@ -10,23 +10,26 @@ import argparse import socket import sys -engine_types=('protocol-valve','protocol-quake2','protocol-quake3','protocol-gamespy1','protocol-unreal2','ut3','minecraft','minecraftbe','jc2mp','mumbleping','soldat','teeworlds') +engine_types = ('protocol-valve', 'protocol-quake2', 'protocol-quake3', 'protocol-gamespy1', + 'protocol-unreal2', 'ut3', 'minecraft', 'minecraftbe', 'jc2m', 'mumbleping', 'soldat', 'teeworlds') + class gsquery: server_response_timeout = 2 default_buffer_length = 1024 - sourcequery=('protocol-valve','avalanche3.0','barotrauma','madness','quakelive','realvirtuality','refractor','source','goldsrc','spark','starbound','unity3d','unreal4','wurm') - idtech2query=('protocol-quake2','idtech2','quake','iw2.0') - idtech3query=('protocol-quake3','iw3.0','ioquake3','qfusion') - minecraftquery=('minecraft','lwjgl2') - minecraftbequery=('minecraftbe',) - jc2mpquery=('jc2mp',) - mumblequery=('mumbleping',) - soldatquery=('soldat',) - twquery=('teeworlds',) - unrealquery=('protocol-gamespy1','unreal') - unreal2query=('protocol-unreal2','unreal2') - unreal3query=('ut3','unreal3') + sourcequery = ('protocol-valve', 'avalanche3.0', 'barotrauma', 'madness', 'quakelive', 'realvirtuality', + 'refractor', 'source', 'goldsrc', 'spark', 'starbound', 'unity3d', 'unreal4', 'wurm') + idtech2query = ('protocol-quake2', 'idtech2', 'quake', 'iw2.0') + idtech3query = ('protocol-quake3', 'iw3.0', 'ioquake3', 'qfusion') + minecraftquery = ('minecraft', 'lwjgl2') + minecraftbequery = ('minecraftbe',) + jc2mquery = ('jc2m',) + mumblequery = ('mumbleping',) + soldatquery = ('soldat',) + twquery = ('teeworlds',) + unrealquery = ('protocol-gamespy1', 'unreal') + unreal2query = ('protocol-unreal2', 'unreal2') + unreal3query = ('ut3', 'unreal3') def __init__(self, arguments): self.argument = arguments @@ -37,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' @@ -48,7 +51,8 @@ class gsquery: elif self.argument.engine in self.soldatquery: self.query_prompt_string = b'\x69\x00' elif self.argument.engine in self.twquery: - self.query_prompt_string = b'\x04\x00\x00\xff\xff\xff\xff\x05' + bytearray(511) + self.query_prompt_string = b'\x04\x00\x00\xff\xff\xff\xff\x05' + \ + bytearray(511) elif self.argument.engine in self.unrealquery: self.query_prompt_string = b'\x5C\x69\x6E\x66\x6F\x5C' elif self.argument.engine in self.unreal2query: @@ -74,7 +78,8 @@ class gsquery: connection = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) connection.settimeout(self.server_response_timeout) try: - self.connected = connection.connect((self.argument.address, int(self.argument.port))) + self.connected = connection.connect( + (self.argument.address, int(self.argument.port))) except socket.timeout: self.fatal_error('Request timed out', 1) except Exception: @@ -95,6 +100,7 @@ class gsquery: else: self.exit_success(str(self.response)) + def parse_args(): parser = argparse.ArgumentParser( description='Allows querying of various game servers.', @@ -142,10 +148,12 @@ def parse_args(): ) return parser.parse_args() + def main(): arguments = parse_args() server = gsquery(arguments) server.responding() + if __name__ == '__main__': main() diff --git a/package-lock.json b/package-lock.json index 669e4f59d..076a14533 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,17 +6,503 @@ "": { "name": "linuxgsm", "license": "MIT", + "dependencies": { + "gamedig": "^5.0.0-beta.2" + }, "devDependencies": { "prettier": "^3.0.3", "prettier-plugin-sh": "^0.13.1" } }, + "node_modules/@sindresorhus/is": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-5.6.0.tgz", + "integrity": "sha512-TV7t8GKYaJWsn00tFDqBw8+Uqmr8A0fRU1tvTQhyZzGv0sJCGRQL3JGMI3ucuKo3XIZdUP+Lx7/gh2t3lewy7g==", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sindresorhus/is?sponsor=1" + } + }, + "node_modules/@szmarczak/http-timer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz", + "integrity": "sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==", + "dependencies": { + "defer-to-connect": "^2.0.1" + }, + "engines": { + "node": ">=14.16" + } + }, + "node_modules/@types/http-cache-semantics": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", + "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==" + }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==" + }, + "node_modules/barse": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/barse/-/barse-0.4.3.tgz", + "integrity": "sha512-UEpvriJqAn8zuVinYICuKoPttZy3XxXEoqX/V2uYAL4zzJRuNzCK3+20nAu3YUIa2U7G53kf90wfBIp9/A+Odw==", + "dependencies": { + "readable-stream": "~1.0.2" + } + }, + "node_modules/boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==" + }, + "node_modules/cacheable-lookup": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz", + "integrity": "sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w==", + "engines": { + "node": ">=14.16" + } + }, + "node_modules/cacheable-request": { + "version": "10.2.14", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-10.2.14.tgz", + "integrity": "sha512-zkDT5WAF4hSSoUgyfg5tFIxz8XQK+25W/TLVojJTMKBaxevLBBtLxgqguAuVQB8PVW79FVjHcU+GJ9tVbDZ9mQ==", + "dependencies": { + "@types/http-cache-semantics": "^4.0.2", + "get-stream": "^6.0.1", + "http-cache-semantics": "^4.1.1", + "keyv": "^4.5.3", + "mimic-response": "^4.0.0", + "normalize-url": "^8.0.0", + "responselike": "^3.0.0" + }, + "engines": { + "node": ">=14.16" + } + }, + "node_modules/cheerio": { + "version": "1.0.0-rc.12", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.12.tgz", + "integrity": "sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==", + "dependencies": { + "cheerio-select": "^2.1.0", + "dom-serializer": "^2.0.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1", + "htmlparser2": "^8.0.1", + "parse5": "^7.0.0", + "parse5-htmlparser2-tree-adapter": "^7.0.0" + }, + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/cheeriojs/cheerio?sponsor=1" + } + }, + "node_modules/cheerio-select": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", + "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", + "dependencies": { + "boolbase": "^1.0.0", + "css-select": "^5.1.0", + "css-what": "^6.1.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/commander": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "engines": { + "node": ">= 6" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "node_modules/css-select": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", + "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^6.1.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "nth-check": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/css-what": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", + "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/decompress-response/node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/defer-to-connect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", + "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", + "engines": { + "node": ">=10" + } + }, + "node_modules/dom-serializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ] + }, + "node_modules/domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "dependencies": { + "domelementtype": "^2.3.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/domutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", + "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", + "dependencies": { + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/event-to-promise": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/event-to-promise/-/event-to-promise-0.7.0.tgz", + "integrity": "sha512-VOBBfyaADfe378ZzG0tgkzmsvzUyeU5arehrFzNRt5yaASUDshgctTwSrPI17ocAwR3+YftsxRClHF+GBKFByQ==", + "deprecated": "Use promise-toolbox/fromEvent instead" + }, + "node_modules/form-data-encoder": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-2.1.4.tgz", + "integrity": "sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw==", + "engines": { + "node": ">= 14.17" + } + }, + "node_modules/gamedig": { + "version": "5.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gamedig/-/gamedig-5.0.0-beta.2.tgz", + "integrity": "sha512-YsHoGdb6rXyzdErakd9eSJvUAZCa8Hy+nQpiWZMps158wOovsH35Yrr/Y9wCvn1FDm6NJnHhQYkvtk3zhlmKWQ==", + "dependencies": { + "cheerio": "^1.0.0-rc.12", + "gbxremote": "^0.2.1", + "got": "^13.0.0", + "iconv-lite": "^0.6.3", + "long": "^5.2.3", + "minimist": "^1.2.8", + "punycode": "^2.3.0", + "seek-bzip": "^2.0.0", + "varint": "^6.0.0" + }, + "bin": { + "gamedig": "bin/gamedig.js" + }, + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/gbxremote": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/gbxremote/-/gbxremote-0.2.1.tgz", + "integrity": "sha512-SMehu6Y6ndq2Qgp9VxAb8Np3f+UUD+RWoW2SAMaxzGS96rWXyr4T1GGkecO0HHtxeH1m7pEh4FJWB8a/6aM2XQ==", + "dependencies": { + "any-promise": "^1.1.0", + "barse": "~0.4.2", + "event-to-promise": "^0.7.0", + "string-to-stream": "^1.0.1", + "xmlrpc": "^1.3.1" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/got": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/got/-/got-13.0.0.tgz", + "integrity": "sha512-XfBk1CxOOScDcMr9O1yKkNaQyy865NbYs+F7dr4H0LZMVgCj2Le59k6PqbNHoL5ToeaEQUYh6c6yMfVcc6SJxA==", + "dependencies": { + "@sindresorhus/is": "^5.2.0", + "@szmarczak/http-timer": "^5.0.1", + "cacheable-lookup": "^7.0.0", + "cacheable-request": "^10.2.8", + "decompress-response": "^6.0.0", + "form-data-encoder": "^2.1.2", + "get-stream": "^6.0.1", + "http2-wrapper": "^2.1.10", + "lowercase-keys": "^3.0.0", + "p-cancelable": "^3.0.0", + "responselike": "^3.0.0" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sindresorhus/got?sponsor=1" + } + }, + "node_modules/htmlparser2": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", + "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1", + "entities": "^4.4.0" + } + }, + "node_modules/http-cache-semantics": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" + }, + "node_modules/http2-wrapper": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.1.tgz", + "integrity": "sha512-V5nVw1PAOgfI3Lmeaj2Exmeg7fenjhRUgz1lPSezy1CuhPYbgQtbQj4jZfEAEMlaL+vupsvhjqCyjzob0yxsmQ==", + "dependencies": { + "quick-lru": "^5.1.1", + "resolve-alpn": "^1.2.0" + }, + "engines": { + "node": ">=10.19.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==" + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + }, + "node_modules/lowercase-keys": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz", + "integrity": "sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mimic-response": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-4.0.0.tgz", + "integrity": "sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg==", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/mvdan-sh": { "version": "0.10.1", "resolved": "https://registry.npmjs.org/mvdan-sh/-/mvdan-sh-0.10.1.tgz", "integrity": "sha512-kMbrH0EObaKmK3nVRKUIIya1dpASHIEusM13S4V1ViHFuxuNxCo+arxoa6j/dbV22YBGjl7UKJm9QQKJ2Crzhg==", "dev": true }, + "node_modules/normalize-url": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.0.0.tgz", + "integrity": "sha512-uVFpKhj5MheNBJRTiMZ9pE/7hD1QTeEvugSJW/OmLzAp78PB5O6adfMNTvmfKhXBkvCzC+rqifWcVYpGFwTjnw==", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, + "node_modules/p-cancelable": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-3.0.0.tgz", + "integrity": "sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==", + "engines": { + "node": ">=12.20" + } + }, + "node_modules/parse5": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", + "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", + "dependencies": { + "entities": "^4.4.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parse5-htmlparser2-tree-adapter": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz", + "integrity": "sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==", + "dependencies": { + "domhandler": "^5.0.2", + "parse5": "^7.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, "node_modules/prettier": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", @@ -51,6 +537,87 @@ "prettier": "^3.0.0" } }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "node_modules/resolve-alpn": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", + "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==" + }, + "node_modules/responselike": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-3.0.0.tgz", + "integrity": "sha512-40yHxbNcl2+rzXvZuVkrYohathsSJlMTXKryG5y8uciHv1+xDLHQpgjG64JUO9nrEq2jGLH6IZ8BcZyw3wrweg==", + "dependencies": { + "lowercase-keys": "^3.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + }, + "node_modules/seek-bzip": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-2.0.0.tgz", + "integrity": "sha512-SMguiTnYrhpLdk3PwfzHeotrcwi8bNV4iemL9tx9poR/yeaMYwB9VzR1w7b57DuWpuqR8n6oZboi0hj3AxZxQg==", + "dependencies": { + "commander": "^6.0.0" + }, + "bin": { + "seek-bunzip": "bin/seek-bunzip", + "seek-table": "bin/seek-bzip-table" + } + }, "node_modules/sh-syntax": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/sh-syntax/-/sh-syntax-0.4.1.tgz", @@ -66,11 +633,83 @@ "url": "https://opencollective.com/unts" } }, + "node_modules/string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==" + }, + "node_modules/string-to-stream": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string-to-stream/-/string-to-stream-1.1.1.tgz", + "integrity": "sha512-QySF2+3Rwq0SdO3s7BAp4x+c3qsClpPQ6abAmb0DGViiSBAkT5kL6JT2iyzEVP+T1SmzHrQD1TwlP9QAHCc+Sw==", + "dependencies": { + "inherits": "^2.0.1", + "readable-stream": "^2.1.0" + } + }, + "node_modules/string-to-stream/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "node_modules/string-to-stream/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/string-to-stream/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, "node_modules/tslib": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "dev": true + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "node_modules/varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==" + }, + "node_modules/xmlbuilder": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-8.2.2.tgz", + "integrity": "sha512-eKRAFz04jghooy8muekqzo8uCSVNeyRedbuJrp0fovbLIi7wlsYtdUn3vBAAPq2Y3/0xMz2WMEUQ8yhVVO9Stw==", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/xmlrpc": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/xmlrpc/-/xmlrpc-1.3.2.tgz", + "integrity": "sha512-jQf5gbrP6wvzN71fgkcPPkF4bF/Wyovd7Xdff8d6/ihxYmgETQYSuTc+Hl+tsh/jmgPLro/Aro48LMFlIyEKKQ==", + "dependencies": { + "sax": "1.2.x", + "xmlbuilder": "8.2.x" + }, + "engines": { + "node": ">=0.8", + "npm": ">=1.0.0" + } } } } diff --git a/package.json b/package.json index 89bb70244..d4146ee20 100644 --- a/package.json +++ b/package.json @@ -20,5 +20,8 @@ "bugs": { "url": "https://github.com/GameServerManagers/LinuxGSM/issues" }, - "homepage": "https://github.com/GameServerManagers/LinuxGSM#readme" + "homepage": "https://github.com/GameServerManagers/LinuxGSM#readme", + "dependencies": { + "gamedig": "^5.0.0-beta.2" + } } From 1f50055f5ac0e0bed0ea01f82f82ef4dca3deec2 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 28 Feb 2024 22:05:42 +0000 Subject: [PATCH 352/374] feat: ignore .swp files when doing permissions check a .swp file is a temp file created by vim. If a file is being edited by a non linuxgsm user then this could cause a permissions issue. Adding this exception to prevent this issue --- lgsm/modules/check_permissions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/check_permissions.sh b/lgsm/modules/check_permissions.sh index 572b403cc..31c64cd17 100644 --- a/lgsm/modules/check_permissions.sh +++ b/lgsm/modules/check_permissions.sh @@ -14,12 +14,12 @@ fn_check_ownership() { fi fi if [ -d "${modulesdir}" ]; then - if [ "$(find "${modulesdir}" -not -user "$(whoami)" | wc -l)" -ne "0" ]; then + if [ "$(find "${modulesdir}" -not -name '*.swp' -not -user "$(whoami)" | wc -l)" -ne "0" ]; then funcownissue=1 fi fi if [ -d "${serverfiles}" ]; then - if [ "$(find "${serverfiles}" -not -user "$(whoami)" | wc -l)" -ne "0" ]; then + if [ "$(find "${serverfiles}" -not -name '*.swp' -not -user "$(whoami)" | wc -l)" -ne "0" ]; then filesownissue=1 fi fi From a2406a510c97b639dc20782d352855fbdc86fb12 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 28 Feb 2024 23:15:12 +0000 Subject: [PATCH 353/374] fix(hw): correct start parameter for addadmin --- lgsm/config-default/config-lgsm/hwserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/hwserver/_default.cfg b/lgsm/config-default/config-lgsm/hwserver/_default.cfg index ea18f00cf..a353064c8 100644 --- a/lgsm/config-default/config-lgsm/hwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hwserver/_default.cfg @@ -27,7 +27,7 @@ loadsave="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters # http://hurtworld.wikia.com/wiki/Hosting_A_Server -startparameters="-batchmode -nographics -logfile ${gamelog} -exec \"host ${port} ${defaultmap} ${loadsave};queryport ${queryport};maxplayers ${maxplayers};servername ${servername};creativemode ${creativemode};${admins}\"" +startparameters="-batchmode -nographics -logfile ${gamelog} -exec \"host ${port} ${defaultmap} ${loadsave};queryport ${queryport};maxplayers ${maxplayers};servername ${servername};creativemode ${creativemode};addadmin ${admins}\"" #### LinuxGSM Settings #### From c5ca762655b0821adf3a19cacebb6390fabd4ff4 Mon Sep 17 00:00:00 2001 From: MicLieg <38057464+MicLieg@users.noreply.github.com> Date: Sat, 2 Mar 2024 10:46:11 +0100 Subject: [PATCH 354/374] fix(pw): fix updated start parameters (#4516) * fix(pw): fix updated start parameters * fix(pw): remove unneeded RCON parameters --- lgsm/config-default/config-lgsm/pwserver/_default.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/config-default/config-lgsm/pwserver/_default.cfg b/lgsm/config-default/config-lgsm/pwserver/_default.cfg index eaf5d775c..03ad83d9e 100644 --- a/lgsm/config-default/config-lgsm/pwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pwserver/_default.cfg @@ -16,8 +16,8 @@ port="8211" steamport="27015" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -## Game Server Docs | https://tech.palworldgame.com/dedicated-server-guide#linux -startparameters="EpicApp=PalServer -useperfthreads -NoAsyncLoadingThread -UseMultithreadForDS -servername='${servername}' -port='${port}' -queryport='${steamport}'" +## Game Server Docs | https://tech.palworldgame.com/settings-and-operation/arguments +startparameters="-publiclobby -useperfthreads -NoAsyncLoadingThread -UseMultithreadForDS -servername='${servername}' -port='${port}' -queryport='${steamport}'" #### LinuxGSM Settings #### From cf5c6f9242c8ad882a1f173c04cc094f6c088df9 Mon Sep 17 00:00:00 2001 From: MicLieg <38057464+MicLieg@users.noreply.github.com> Date: Sat, 2 Mar 2024 10:46:11 +0100 Subject: [PATCH 355/374] fix(pw): fix updated start parameters (#4516) * fix(pw): fix updated start parameters * fix(pw): remove unneeded RCON parameters --- lgsm/config-default/config-lgsm/pwserver/_default.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/config-default/config-lgsm/pwserver/_default.cfg b/lgsm/config-default/config-lgsm/pwserver/_default.cfg index cd318aacc..a463c4b4d 100644 --- a/lgsm/config-default/config-lgsm/pwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pwserver/_default.cfg @@ -16,8 +16,8 @@ port="8211" steamport="27015" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -## Game Server Docs | https://tech.palworldgame.com/dedicated-server-guide#linux -startparameters="EpicApp=PalServer -useperfthreads -NoAsyncLoadingThread -UseMultithreadForDS -servername='${servername}' -port='${port}' -queryport='${steamport}'" +## Game Server Docs | https://tech.palworldgame.com/settings-and-operation/arguments +startparameters="-publiclobby -useperfthreads -NoAsyncLoadingThread -UseMultithreadForDS -servername='${servername}' -port='${port}' -queryport='${steamport}'" #### LinuxGSM Settings #### From 77414e158225ec58e2fc34f5e8430f4e06e285ba Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 2 Mar 2024 09:51:01 +0000 Subject: [PATCH 356/374] Release v24.1.5 --- lgsm/modules/core_modules.sh | 2 +- linuxgsm.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index 70a452127..8f1516563 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v24.1.4" +modulesversion="v24.1.5" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index e3c663754..c68f19dc2 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -24,7 +24,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v24.1.4" +version="v24.1.5" shortname="core" gameservername="core" commandname="CORE" From d7bb6d0f8fb783e5805e5c0835441da6378f87d0 Mon Sep 17 00:00:00 2001 From: MicLieg <38057464+MicLieg@users.noreply.github.com> Date: Mon, 4 Mar 2024 15:59:22 +0100 Subject: [PATCH 357/374] fix(info_game): add ip query timeout and backup api (#4524) --- lgsm/modules/info_game.sh | 57 ++++++++++++++++++++++++++++----------- 1 file changed, 42 insertions(+), 15 deletions(-) diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index e943a9d91..97f8da87e 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -2467,25 +2467,52 @@ fi # Cache public IP address for 24 hours if [ ! -f "${tmpdir}/publicip.json" ] || [ "$(find "${tmpdir}/publicip.json" -mmin +1440)" ]; then apiurl="http://ip-api.com/json" - publicipresponse=$(curl -s "${apiurl}") + fn_script_log_info "Querying ${apiurl} for public IP address" + + ipresponse=$(curl -s --max-time 3 "${apiurl}") # Attempt to query ip-api.com with a 3 second timeout exitcode=$? - # if curl passes add publicip to publicip.json - if [ "${exitcode}" == "0" ]; then - fn_script_log_pass "Getting public IP address" - echo "${publicipresponse}" > "${tmpdir}/publicip.json" - publicip="$(jq -r '.query' "${tmpdir}/publicip.json")" - country="$(jq -r '.country' "${tmpdir}/publicip.json")" - countrycode="$(jq -r '.countryCode' "${tmpdir}/publicip.json")" + + # Check if the first request was successfull + if [ "${exitcode}" -eq 0 ]; then + fn_script_log_pass "Queried ${apiurl} for public IP address" + + # Parse and reformat the response + publicip="$(echo "${ipresponse}" | jq -r '.query')" + country="$(echo "${ipresponse}" | jq -r '.country')" + countrycode="$(echo "${ipresponse}" | jq -r '.countryCode')" + # Construct a universal JSON format + echo "{\"ip\":\"${publicip}\",\"country\":\"${country}\",\"countryCode\":\"${countrycode}\",\"apiurl\":\"${apiurl}\"}" > "${tmpdir}/publicip.json" else - fn_script_log_warn "Unable to get public IP address" - publicip="NOT SET" - country="NOT SET" - countrycode="NOT SET" + # Fallback to myip.wtf if the initial request failed or timed out + apiurl="https://myip.wtf/json" + fn_script_log_pass "Querying ${apiurl} for public IP address" + + ipresponse=$(curl -s --max-time 3 "${apiurl}") # Attempt to query myip.wtf with a 3 second timeout as a backup + exitcode=$? + + # Check if the backup request was successfull + if [ "${exitcode}" -eq 0 ]; then + fn_script_log_pass "Queried ${apiurl} for public IP address" + + # Parse and reformat the response from myip.wtf + publicip="$(echo "${ipresponse}" | jq -r '.YourFuckingIPAddress')" + country="$(echo "${ipresponse}" | jq -r '.YourFuckingCountry')" + countrycode="$(echo "${ipresponse}" | jq -r '.YourFuckingCountryCode')" + # Construct a universal JSON format + echo "{\"ip\":\"${publicip}\",\"country\":\"${country}\",\"countryCode\":\"${countrycode}\",\"apiurl\":\"${apiurl}\"}" > "${tmpdir}/publicip.json" + else + fn_script_log_error "Unable to get public IP address" + publicip="NOT SET" + country="NOT SET" + countrycode="NOT SET" + fi fi else - publicip="$(jq -r '.query' "${tmpdir}/publicip.json")" - country="$(jq -r '.country' "${tmpdir}/publicip.json")" - countrycode="$(jq -r '.countryCode' "${tmpdir}/publicip.json")" + # Cached IP is still valid + fn_script_log_pass "Using cached IP as public IP address" + publicip="$(jq -r '.ip' "${tmpdir}/publicip.json")" + country="$(jq -r '.country' "${tmpdir}/publicip.json")" + countrycode="$(jq -r '.countryCode' "${tmpdir}/publicip.json")" fi # Alert IP address From 181c84508df0d3d327d92aacd8e3cca3f1faee5f Mon Sep 17 00:00:00 2001 From: MicLieg <38057464+MicLieg@users.noreply.github.com> Date: Fri, 8 Mar 2024 23:03:23 +0100 Subject: [PATCH 358/374] feat(alerts): add support for telegram thread/topic ids (#4526) --- lgsm/config-default/config-lgsm/acserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/ahl2server/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/ahlserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/arkserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/arma3server/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/armarserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/atsserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/avserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/bb2server/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/bbserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/bdserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/bf1942server/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/bfvserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/bmdmserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/boserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/bsserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/btlserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/btserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/ccserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/ckserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/cmwserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/cod2server/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/cod4server/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/codserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/coduoserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/codwawserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/colserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/cs2server/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/csczserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/csgoserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/csserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/cssserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/ctserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/dabserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/dayzserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/dmcserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/dodrserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/dodserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/dodsserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/doiserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/dstserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/dysserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/ecoserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/emserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/etlserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/ets2server/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/fctrserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/fofserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/gmodserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/hcuserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/hldmserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/hldmsserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/hwserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/insserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/inssserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/iosserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/jc2server/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/jc3server/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/jk2server/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/kf2server/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/kfserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/l4d2server/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/l4dserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/mcbserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/mcserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/mhserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/mohaaserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/momserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/mtaserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/ndserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/necserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/nmrihserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/ns2cserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/ns2server/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/nsserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/ohdserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/onsetserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/opforserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/pc2server/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/pcserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/pmcserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/psserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/pvrserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/pwserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/pzserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/q2server/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/q3server/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/q4server/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/qlserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/qwserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/ricochetserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/roserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/rtcwserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/rustserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/rwserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/sampserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/sbotsserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/sbserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/scpslserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/sdtdserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/sfcserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/sfserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/sof2server/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/solserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/squadserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/stnserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/stserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/svenserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/terrariaserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/tf2server/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/tfcserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/tfserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/tiserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/ts3server/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/tsserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/tuserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/twserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/untserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/ut2k4server/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/ut3server/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/ut99server/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/utserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/vhserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/vintsserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/vpmcserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/vsserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/wetserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/wfserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/wmcserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/wurmserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/zmrserver/_default.cfg | 4 +++- lgsm/config-default/config-lgsm/zpsserver/_default.cfg | 4 +++- lgsm/modules/alert_telegram.sh | 4 ++++ 136 files changed, 409 insertions(+), 135 deletions(-) diff --git a/lgsm/config-default/config-lgsm/acserver/_default.cfg b/lgsm/config-default/config-lgsm/acserver/_default.cfg index b3ad14caf..154f38c7b 100644 --- a/lgsm/config-default/config-lgsm/acserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/acserver/_default.cfg @@ -74,11 +74,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/ahl2server/_default.cfg b/lgsm/config-default/config-lgsm/ahl2server/_default.cfg index 086047093..a98c90701 100644 --- a/lgsm/config-default/config-lgsm/ahl2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ahl2server/_default.cfg @@ -82,11 +82,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/ahlserver/_default.cfg b/lgsm/config-default/config-lgsm/ahlserver/_default.cfg index fb7725e1f..04cc2e6f9 100644 --- a/lgsm/config-default/config-lgsm/ahlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ahlserver/_default.cfg @@ -77,11 +77,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/arkserver/_default.cfg b/lgsm/config-default/config-lgsm/arkserver/_default.cfg index 73b251731..8680c1bad 100644 --- a/lgsm/config-default/config-lgsm/arkserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/arkserver/_default.cfg @@ -79,11 +79,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/arma3server/_default.cfg b/lgsm/config-default/config-lgsm/arma3server/_default.cfg index f50bf8342..b0918ef3c 100644 --- a/lgsm/config-default/config-lgsm/arma3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/arma3server/_default.cfg @@ -93,11 +93,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/armarserver/_default.cfg b/lgsm/config-default/config-lgsm/armarserver/_default.cfg index 3637f469b..61103d332 100644 --- a/lgsm/config-default/config-lgsm/armarserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/armarserver/_default.cfg @@ -78,11 +78,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/atsserver/_default.cfg b/lgsm/config-default/config-lgsm/atsserver/_default.cfg index 9d8125a31..f6d165098 100644 --- a/lgsm/config-default/config-lgsm/atsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/atsserver/_default.cfg @@ -70,11 +70,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/avserver/_default.cfg b/lgsm/config-default/config-lgsm/avserver/_default.cfg index 5777198c8..7b225de1f 100644 --- a/lgsm/config-default/config-lgsm/avserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/avserver/_default.cfg @@ -70,11 +70,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/bb2server/_default.cfg b/lgsm/config-default/config-lgsm/bb2server/_default.cfg index c52c8c540..b9250cc5f 100644 --- a/lgsm/config-default/config-lgsm/bb2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bb2server/_default.cfg @@ -83,11 +83,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/bbserver/_default.cfg b/lgsm/config-default/config-lgsm/bbserver/_default.cfg index 2cfabab9c..99262d8e3 100644 --- a/lgsm/config-default/config-lgsm/bbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bbserver/_default.cfg @@ -77,11 +77,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/bdserver/_default.cfg b/lgsm/config-default/config-lgsm/bdserver/_default.cfg index 674fabb10..3c1769fb3 100644 --- a/lgsm/config-default/config-lgsm/bdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bdserver/_default.cfg @@ -77,11 +77,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg index 5bd576b22..30e2f957a 100644 --- a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg @@ -70,11 +70,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/bfvserver/_default.cfg b/lgsm/config-default/config-lgsm/bfvserver/_default.cfg index 66c4ef8fc..53aa36054 100644 --- a/lgsm/config-default/config-lgsm/bfvserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bfvserver/_default.cfg @@ -70,11 +70,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg index dfe04bcd8..e353d57b0 100644 --- a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg @@ -83,11 +83,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/boserver/_default.cfg b/lgsm/config-default/config-lgsm/boserver/_default.cfg index d6e2b4f4f..ae7912ab6 100644 --- a/lgsm/config-default/config-lgsm/boserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/boserver/_default.cfg @@ -75,11 +75,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/bsserver/_default.cfg b/lgsm/config-default/config-lgsm/bsserver/_default.cfg index b5f6017c0..d81cde16d 100644 --- a/lgsm/config-default/config-lgsm/bsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bsserver/_default.cfg @@ -87,11 +87,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/btlserver/_default.cfg b/lgsm/config-default/config-lgsm/btlserver/_default.cfg index dcc49c61c..28e8b95e3 100644 --- a/lgsm/config-default/config-lgsm/btlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/btlserver/_default.cfg @@ -75,11 +75,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/btserver/_default.cfg b/lgsm/config-default/config-lgsm/btserver/_default.cfg index c02b8c6ca..71c02c3fc 100644 --- a/lgsm/config-default/config-lgsm/btserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/btserver/_default.cfg @@ -70,11 +70,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/ccserver/_default.cfg b/lgsm/config-default/config-lgsm/ccserver/_default.cfg index a8cd9f6d2..66847b410 100644 --- a/lgsm/config-default/config-lgsm/ccserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ccserver/_default.cfg @@ -78,11 +78,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/ckserver/_default.cfg b/lgsm/config-default/config-lgsm/ckserver/_default.cfg index c662f3b04..f54d7cc7f 100644 --- a/lgsm/config-default/config-lgsm/ckserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ckserver/_default.cfg @@ -74,11 +74,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/cmwserver/_default.cfg b/lgsm/config-default/config-lgsm/cmwserver/_default.cfg index 29df71d95..776b06a1d 100644 --- a/lgsm/config-default/config-lgsm/cmwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/cmwserver/_default.cfg @@ -76,11 +76,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/cod2server/_default.cfg b/lgsm/config-default/config-lgsm/cod2server/_default.cfg index 98ea0afb7..9665a9ba8 100644 --- a/lgsm/config-default/config-lgsm/cod2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod2server/_default.cfg @@ -76,11 +76,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Backup | https://docs.linuxgsm.com/commands/backup diff --git a/lgsm/config-default/config-lgsm/cod4server/_default.cfg b/lgsm/config-default/config-lgsm/cod4server/_default.cfg index cde7e0113..f9787c352 100644 --- a/lgsm/config-default/config-lgsm/cod4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod4server/_default.cfg @@ -76,11 +76,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Backup | https://docs.linuxgsm.com/commands/backup diff --git a/lgsm/config-default/config-lgsm/codserver/_default.cfg b/lgsm/config-default/config-lgsm/codserver/_default.cfg index 1c0a0902c..8f1476ad3 100644 --- a/lgsm/config-default/config-lgsm/codserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codserver/_default.cfg @@ -76,11 +76,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Backup | https://docs.linuxgsm.com/commands/backup diff --git a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg index b3f89889f..c405966d4 100644 --- a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg @@ -76,11 +76,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Backup | https://docs.linuxgsm.com/commands/backup diff --git a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg index e906fcf07..ca0f002d3 100644 --- a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg @@ -76,11 +76,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Backup | https://docs.linuxgsm.com/commands/backup diff --git a/lgsm/config-default/config-lgsm/colserver/_default.cfg b/lgsm/config-default/config-lgsm/colserver/_default.cfg index 1c3b261e2..cd94e9b37 100644 --- a/lgsm/config-default/config-lgsm/colserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/colserver/_default.cfg @@ -71,11 +71,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/cs2server/_default.cfg b/lgsm/config-default/config-lgsm/cs2server/_default.cfg index 84679da01..a2df48244 100644 --- a/lgsm/config-default/config-lgsm/cs2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cs2server/_default.cfg @@ -77,11 +77,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/csczserver/_default.cfg b/lgsm/config-default/config-lgsm/csczserver/_default.cfg index 11d0da197..29001a098 100644 --- a/lgsm/config-default/config-lgsm/csczserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csczserver/_default.cfg @@ -77,11 +77,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg index 5efdd4942..29b3aea10 100644 --- a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg @@ -114,11 +114,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/csserver/_default.cfg b/lgsm/config-default/config-lgsm/csserver/_default.cfg index 2e53616bd..266448e74 100644 --- a/lgsm/config-default/config-lgsm/csserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csserver/_default.cfg @@ -77,11 +77,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/cssserver/_default.cfg b/lgsm/config-default/config-lgsm/cssserver/_default.cfg index 1af41c5fe..103c30897 100644 --- a/lgsm/config-default/config-lgsm/cssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/cssserver/_default.cfg @@ -83,11 +83,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/ctserver/_default.cfg b/lgsm/config-default/config-lgsm/ctserver/_default.cfg index ea1ae5229..ac87d7516 100644 --- a/lgsm/config-default/config-lgsm/ctserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ctserver/_default.cfg @@ -70,11 +70,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/dabserver/_default.cfg b/lgsm/config-default/config-lgsm/dabserver/_default.cfg index 62e3acf99..3d5015808 100644 --- a/lgsm/config-default/config-lgsm/dabserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dabserver/_default.cfg @@ -78,11 +78,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/dayzserver/_default.cfg b/lgsm/config-default/config-lgsm/dayzserver/_default.cfg index 82901c2cd..f09d23c23 100644 --- a/lgsm/config-default/config-lgsm/dayzserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dayzserver/_default.cfg @@ -93,11 +93,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/dmcserver/_default.cfg b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg index 5f56a842c..3d74fca4d 100644 --- a/lgsm/config-default/config-lgsm/dmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg @@ -77,11 +77,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/dodrserver/_default.cfg b/lgsm/config-default/config-lgsm/dodrserver/_default.cfg index 555a1a007..0565b94e9 100644 --- a/lgsm/config-default/config-lgsm/dodrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodrserver/_default.cfg @@ -76,11 +76,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/dodserver/_default.cfg b/lgsm/config-default/config-lgsm/dodserver/_default.cfg index 61700d621..e2419289a 100644 --- a/lgsm/config-default/config-lgsm/dodserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodserver/_default.cfg @@ -77,11 +77,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/dodsserver/_default.cfg b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg index 390f87b70..b6973f0a7 100644 --- a/lgsm/config-default/config-lgsm/dodsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg @@ -78,11 +78,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/doiserver/_default.cfg b/lgsm/config-default/config-lgsm/doiserver/_default.cfg index 6aa10ee9b..9a06b7b02 100644 --- a/lgsm/config-default/config-lgsm/doiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/doiserver/_default.cfg @@ -79,11 +79,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/dstserver/_default.cfg b/lgsm/config-default/config-lgsm/dstserver/_default.cfg index d757ea732..2c8de8bd4 100644 --- a/lgsm/config-default/config-lgsm/dstserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dstserver/_default.cfg @@ -80,11 +80,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/dysserver/_default.cfg b/lgsm/config-default/config-lgsm/dysserver/_default.cfg index eb1861c7d..fcb37c41a 100644 --- a/lgsm/config-default/config-lgsm/dysserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dysserver/_default.cfg @@ -83,11 +83,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg index 794a6ed69..c08f37072 100644 --- a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg @@ -70,11 +70,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/emserver/_default.cfg b/lgsm/config-default/config-lgsm/emserver/_default.cfg index 1610d0816..1762e5175 100644 --- a/lgsm/config-default/config-lgsm/emserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/emserver/_default.cfg @@ -83,11 +83,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/etlserver/_default.cfg b/lgsm/config-default/config-lgsm/etlserver/_default.cfg index 18d6d302f..11a408fb8 100644 --- a/lgsm/config-default/config-lgsm/etlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/etlserver/_default.cfg @@ -70,11 +70,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Backup | https://docs.linuxgsm.com/commands/backup diff --git a/lgsm/config-default/config-lgsm/ets2server/_default.cfg b/lgsm/config-default/config-lgsm/ets2server/_default.cfg index 24462bc45..6abe98fb3 100644 --- a/lgsm/config-default/config-lgsm/ets2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ets2server/_default.cfg @@ -70,11 +70,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/fctrserver/_default.cfg b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg index d77284d5e..284fafaec 100644 --- a/lgsm/config-default/config-lgsm/fctrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg @@ -77,11 +77,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/fofserver/_default.cfg b/lgsm/config-default/config-lgsm/fofserver/_default.cfg index 1f7ef0168..7ce630310 100644 --- a/lgsm/config-default/config-lgsm/fofserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/fofserver/_default.cfg @@ -78,11 +78,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg index 01ea819f2..2cc683d20 100644 --- a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg @@ -88,11 +88,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/hcuserver/_default.cfg b/lgsm/config-default/config-lgsm/hcuserver/_default.cfg index 67deef669..0925fe384 100644 --- a/lgsm/config-default/config-lgsm/hcuserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hcuserver/_default.cfg @@ -85,11 +85,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg index cdbbfb168..c429a6c8e 100644 --- a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg @@ -78,11 +78,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/hldmserver/_default.cfg b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg index f69d56c34..3bddb128e 100644 --- a/lgsm/config-default/config-lgsm/hldmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg @@ -77,11 +77,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg index 0baf4f955..74321c1f4 100644 --- a/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg @@ -78,11 +78,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/hwserver/_default.cfg b/lgsm/config-default/config-lgsm/hwserver/_default.cfg index a353064c8..7fe1a4969 100644 --- a/lgsm/config-default/config-lgsm/hwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hwserver/_default.cfg @@ -88,11 +88,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/insserver/_default.cfg b/lgsm/config-default/config-lgsm/insserver/_default.cfg index b41fb2491..cd1d13029 100644 --- a/lgsm/config-default/config-lgsm/insserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/insserver/_default.cfg @@ -84,11 +84,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/inssserver/_default.cfg b/lgsm/config-default/config-lgsm/inssserver/_default.cfg index d4d485d68..4049e5e11 100644 --- a/lgsm/config-default/config-lgsm/inssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/inssserver/_default.cfg @@ -87,11 +87,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/iosserver/_default.cfg b/lgsm/config-default/config-lgsm/iosserver/_default.cfg index bcc35e483..ff6764d0b 100644 --- a/lgsm/config-default/config-lgsm/iosserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/iosserver/_default.cfg @@ -78,11 +78,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/jc2server/_default.cfg b/lgsm/config-default/config-lgsm/jc2server/_default.cfg index da9b4f40a..5a82bbad9 100644 --- a/lgsm/config-default/config-lgsm/jc2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc2server/_default.cfg @@ -70,11 +70,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/jc3server/_default.cfg b/lgsm/config-default/config-lgsm/jc3server/_default.cfg index 9c902f476..62d9cd4ab 100644 --- a/lgsm/config-default/config-lgsm/jc3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc3server/_default.cfg @@ -70,11 +70,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/jk2server/_default.cfg b/lgsm/config-default/config-lgsm/jk2server/_default.cfg index d14b052c2..f238c45fe 100644 --- a/lgsm/config-default/config-lgsm/jk2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jk2server/_default.cfg @@ -79,11 +79,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/kf2server/_default.cfg b/lgsm/config-default/config-lgsm/kf2server/_default.cfg index 9ca4a096c..8f44458cd 100644 --- a/lgsm/config-default/config-lgsm/kf2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/kf2server/_default.cfg @@ -76,11 +76,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/kfserver/_default.cfg b/lgsm/config-default/config-lgsm/kfserver/_default.cfg index 969c5c65c..d9df57d3e 100644 --- a/lgsm/config-default/config-lgsm/kfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/kfserver/_default.cfg @@ -82,11 +82,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/l4d2server/_default.cfg b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg index 676a72360..a37ef4eb4 100644 --- a/lgsm/config-default/config-lgsm/l4d2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg @@ -77,11 +77,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/l4dserver/_default.cfg b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg index cf1f641ec..dc22bc871 100644 --- a/lgsm/config-default/config-lgsm/l4dserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg @@ -77,11 +77,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/mcbserver/_default.cfg b/lgsm/config-default/config-lgsm/mcbserver/_default.cfg index db2bbf86d..d7171a3f6 100644 --- a/lgsm/config-default/config-lgsm/mcbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mcbserver/_default.cfg @@ -73,11 +73,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/mcserver/_default.cfg b/lgsm/config-default/config-lgsm/mcserver/_default.cfg index b6f923ade..1288fab95 100644 --- a/lgsm/config-default/config-lgsm/mcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mcserver/_default.cfg @@ -79,11 +79,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/mhserver/_default.cfg b/lgsm/config-default/config-lgsm/mhserver/_default.cfg index 399d7c96b..197440ab2 100644 --- a/lgsm/config-default/config-lgsm/mhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mhserver/_default.cfg @@ -79,11 +79,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg index a53e55bfc..dfd87335c 100644 --- a/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg @@ -75,11 +75,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Backup | https://docs.linuxgsm.com/commands/backup diff --git a/lgsm/config-default/config-lgsm/momserver/_default.cfg b/lgsm/config-default/config-lgsm/momserver/_default.cfg index e9b743c00..5834670c9 100644 --- a/lgsm/config-default/config-lgsm/momserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/momserver/_default.cfg @@ -76,11 +76,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg index ff40ffa67..d1880ef89 100644 --- a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg @@ -73,11 +73,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Backup | https://docs.linuxgsm.com/commands/backup diff --git a/lgsm/config-default/config-lgsm/ndserver/_default.cfg b/lgsm/config-default/config-lgsm/ndserver/_default.cfg index fcf1caffb..249556af4 100644 --- a/lgsm/config-default/config-lgsm/ndserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ndserver/_default.cfg @@ -78,11 +78,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/necserver/_default.cfg b/lgsm/config-default/config-lgsm/necserver/_default.cfg index 993572b34..8062f8d5f 100644 --- a/lgsm/config-default/config-lgsm/necserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/necserver/_default.cfg @@ -73,11 +73,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg index f3b740a3b..8757caa6c 100644 --- a/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg @@ -83,11 +83,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg index 5fa692c08..2f8f47af5 100644 --- a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg @@ -85,11 +85,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/ns2server/_default.cfg b/lgsm/config-default/config-lgsm/ns2server/_default.cfg index 41970a2f4..9cec798da 100644 --- a/lgsm/config-default/config-lgsm/ns2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2server/_default.cfg @@ -86,11 +86,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/nsserver/_default.cfg b/lgsm/config-default/config-lgsm/nsserver/_default.cfg index c207a0a10..367878519 100644 --- a/lgsm/config-default/config-lgsm/nsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/nsserver/_default.cfg @@ -77,11 +77,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/ohdserver/_default.cfg b/lgsm/config-default/config-lgsm/ohdserver/_default.cfg index 9eaf0d4a5..26bc3a30c 100644 --- a/lgsm/config-default/config-lgsm/ohdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ohdserver/_default.cfg @@ -80,11 +80,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/onsetserver/_default.cfg b/lgsm/config-default/config-lgsm/onsetserver/_default.cfg index 39fc4005c..0103ef069 100644 --- a/lgsm/config-default/config-lgsm/onsetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/onsetserver/_default.cfg @@ -71,11 +71,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/opforserver/_default.cfg b/lgsm/config-default/config-lgsm/opforserver/_default.cfg index 8ba202b14..93d00fc5c 100644 --- a/lgsm/config-default/config-lgsm/opforserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/opforserver/_default.cfg @@ -77,11 +77,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/pc2server/_default.cfg b/lgsm/config-default/config-lgsm/pc2server/_default.cfg index b55447802..d4e6ce1d6 100644 --- a/lgsm/config-default/config-lgsm/pc2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/pc2server/_default.cfg @@ -74,11 +74,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/pcserver/_default.cfg b/lgsm/config-default/config-lgsm/pcserver/_default.cfg index 2c1514488..c36dfaac6 100644 --- a/lgsm/config-default/config-lgsm/pcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pcserver/_default.cfg @@ -70,11 +70,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/pmcserver/_default.cfg b/lgsm/config-default/config-lgsm/pmcserver/_default.cfg index 57838ad98..74e0e7e18 100644 --- a/lgsm/config-default/config-lgsm/pmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pmcserver/_default.cfg @@ -77,11 +77,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/psserver/_default.cfg b/lgsm/config-default/config-lgsm/psserver/_default.cfg index e41dee19c..80d991f94 100644 --- a/lgsm/config-default/config-lgsm/psserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/psserver/_default.cfg @@ -75,11 +75,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg index 0565f806a..1e2ca3660 100644 --- a/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg @@ -78,11 +78,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/pvrserver/_default.cfg b/lgsm/config-default/config-lgsm/pvrserver/_default.cfg index 2cffabe71..374da3dd1 100644 --- a/lgsm/config-default/config-lgsm/pvrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pvrserver/_default.cfg @@ -79,11 +79,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/pwserver/_default.cfg b/lgsm/config-default/config-lgsm/pwserver/_default.cfg index 03ad83d9e..e069ec1b1 100644 --- a/lgsm/config-default/config-lgsm/pwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pwserver/_default.cfg @@ -78,11 +78,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/pzserver/_default.cfg b/lgsm/config-default/config-lgsm/pzserver/_default.cfg index 5a34c04bc..f830d7cc4 100644 --- a/lgsm/config-default/config-lgsm/pzserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pzserver/_default.cfg @@ -74,11 +74,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/q2server/_default.cfg b/lgsm/config-default/config-lgsm/q2server/_default.cfg index b92c36c38..79820d650 100644 --- a/lgsm/config-default/config-lgsm/q2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/q2server/_default.cfg @@ -75,11 +75,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Backup | https://docs.linuxgsm.com/commands/backup diff --git a/lgsm/config-default/config-lgsm/q3server/_default.cfg b/lgsm/config-default/config-lgsm/q3server/_default.cfg index 0a54d2852..74b0d11f3 100644 --- a/lgsm/config-default/config-lgsm/q3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/q3server/_default.cfg @@ -75,11 +75,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Backup | https://docs.linuxgsm.com/commands/backup diff --git a/lgsm/config-default/config-lgsm/q4server/_default.cfg b/lgsm/config-default/config-lgsm/q4server/_default.cfg index ffd311e3c..d07828e9f 100644 --- a/lgsm/config-default/config-lgsm/q4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/q4server/_default.cfg @@ -77,11 +77,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/qlserver/_default.cfg b/lgsm/config-default/config-lgsm/qlserver/_default.cfg index 5d5614a02..84631b765 100644 --- a/lgsm/config-default/config-lgsm/qlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/qlserver/_default.cfg @@ -70,11 +70,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/qwserver/_default.cfg b/lgsm/config-default/config-lgsm/qwserver/_default.cfg index 63d554f27..620943c3e 100644 --- a/lgsm/config-default/config-lgsm/qwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/qwserver/_default.cfg @@ -74,11 +74,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Backup | https://docs.linuxgsm.com/commands/backup diff --git a/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg index 36845b0a2..bb1957de0 100644 --- a/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg @@ -77,11 +77,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/roserver/_default.cfg b/lgsm/config-default/config-lgsm/roserver/_default.cfg index 1a95add2a..c000f6181 100644 --- a/lgsm/config-default/config-lgsm/roserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/roserver/_default.cfg @@ -78,11 +78,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg b/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg index d62dcb048..9011bbced 100644 --- a/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg @@ -75,11 +75,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Backup | https://docs.linuxgsm.com/commands/backup diff --git a/lgsm/config-default/config-lgsm/rustserver/_default.cfg b/lgsm/config-default/config-lgsm/rustserver/_default.cfg index 071d9d008..cf609a84c 100644 --- a/lgsm/config-default/config-lgsm/rustserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rustserver/_default.cfg @@ -90,11 +90,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/rwserver/_default.cfg b/lgsm/config-default/config-lgsm/rwserver/_default.cfg index 9a798c66c..9523dd63b 100644 --- a/lgsm/config-default/config-lgsm/rwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rwserver/_default.cfg @@ -70,11 +70,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/sampserver/_default.cfg b/lgsm/config-default/config-lgsm/sampserver/_default.cfg index 0888064ba..870603bb0 100644 --- a/lgsm/config-default/config-lgsm/sampserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sampserver/_default.cfg @@ -74,11 +74,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Backup | https://docs.linuxgsm.com/commands/backup diff --git a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg index 3c6e3412e..82d651ec3 100644 --- a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg @@ -76,11 +76,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/sbserver/_default.cfg b/lgsm/config-default/config-lgsm/sbserver/_default.cfg index 6032abe06..3d06b4235 100644 --- a/lgsm/config-default/config-lgsm/sbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbserver/_default.cfg @@ -77,11 +77,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/scpslserver/_default.cfg b/lgsm/config-default/config-lgsm/scpslserver/_default.cfg index f00574bd8..237bbebe3 100644 --- a/lgsm/config-default/config-lgsm/scpslserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/scpslserver/_default.cfg @@ -75,11 +75,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg b/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg index bb26d6ca6..e54814df2 100644 --- a/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg @@ -75,11 +75,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg index 24cd2c0ac..0a091dae4 100644 --- a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg @@ -73,11 +73,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/sfcserver/_default.cfg b/lgsm/config-default/config-lgsm/sfcserver/_default.cfg index 40c5a0c18..831f92353 100644 --- a/lgsm/config-default/config-lgsm/sfcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sfcserver/_default.cfg @@ -78,11 +78,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/sfserver/_default.cfg b/lgsm/config-default/config-lgsm/sfserver/_default.cfg index f889b4866..65930bfc1 100644 --- a/lgsm/config-default/config-lgsm/sfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sfserver/_default.cfg @@ -77,11 +77,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/sof2server/_default.cfg b/lgsm/config-default/config-lgsm/sof2server/_default.cfg index 59fb8373b..e00afefa1 100644 --- a/lgsm/config-default/config-lgsm/sof2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/sof2server/_default.cfg @@ -75,11 +75,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Backup | https://docs.linuxgsm.com/commands/backup diff --git a/lgsm/config-default/config-lgsm/solserver/_default.cfg b/lgsm/config-default/config-lgsm/solserver/_default.cfg index 601018529..8581104dd 100644 --- a/lgsm/config-default/config-lgsm/solserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/solserver/_default.cfg @@ -74,11 +74,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/squadserver/_default.cfg b/lgsm/config-default/config-lgsm/squadserver/_default.cfg index 55bc2bf44..99b91b538 100644 --- a/lgsm/config-default/config-lgsm/squadserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/squadserver/_default.cfg @@ -75,11 +75,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/stnserver/_default.cfg b/lgsm/config-default/config-lgsm/stnserver/_default.cfg index 7bf2d7234..70c7d290c 100644 --- a/lgsm/config-default/config-lgsm/stnserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/stnserver/_default.cfg @@ -74,11 +74,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/stserver/_default.cfg b/lgsm/config-default/config-lgsm/stserver/_default.cfg index e245c57c0..2f2fe0ed4 100644 --- a/lgsm/config-default/config-lgsm/stserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/stserver/_default.cfg @@ -74,11 +74,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/svenserver/_default.cfg b/lgsm/config-default/config-lgsm/svenserver/_default.cfg index 11822d1f1..4cd97c50e 100644 --- a/lgsm/config-default/config-lgsm/svenserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/svenserver/_default.cfg @@ -77,11 +77,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg index 0fc6a06b2..fc0d291c9 100644 --- a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg @@ -77,11 +77,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/tf2server/_default.cfg b/lgsm/config-default/config-lgsm/tf2server/_default.cfg index 7d3164e0e..600249013 100644 --- a/lgsm/config-default/config-lgsm/tf2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/tf2server/_default.cfg @@ -83,11 +83,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg index 3334509a1..17787eef5 100644 --- a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg @@ -77,11 +77,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/tfserver/_default.cfg b/lgsm/config-default/config-lgsm/tfserver/_default.cfg index 86994d8e0..c6d9842b3 100644 --- a/lgsm/config-default/config-lgsm/tfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tfserver/_default.cfg @@ -94,11 +94,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/tiserver/_default.cfg b/lgsm/config-default/config-lgsm/tiserver/_default.cfg index 96a3726fd..4090d85c9 100644 --- a/lgsm/config-default/config-lgsm/tiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tiserver/_default.cfg @@ -76,11 +76,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/ts3server/_default.cfg b/lgsm/config-default/config-lgsm/ts3server/_default.cfg index 36c0d2bae..d132d5c57 100644 --- a/lgsm/config-default/config-lgsm/ts3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ts3server/_default.cfg @@ -70,11 +70,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/tsserver/_default.cfg b/lgsm/config-default/config-lgsm/tsserver/_default.cfg index 05189f90b..418727ae6 100644 --- a/lgsm/config-default/config-lgsm/tsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tsserver/_default.cfg @@ -77,11 +77,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/tuserver/_default.cfg b/lgsm/config-default/config-lgsm/tuserver/_default.cfg index 89c6712bd..ba22c5aa6 100644 --- a/lgsm/config-default/config-lgsm/tuserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tuserver/_default.cfg @@ -80,11 +80,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/twserver/_default.cfg b/lgsm/config-default/config-lgsm/twserver/_default.cfg index 6f9c2adb6..4d47cb2d1 100644 --- a/lgsm/config-default/config-lgsm/twserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/twserver/_default.cfg @@ -77,11 +77,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/untserver/_default.cfg b/lgsm/config-default/config-lgsm/untserver/_default.cfg index e76aefba4..a556c1758 100644 --- a/lgsm/config-default/config-lgsm/untserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/untserver/_default.cfg @@ -84,11 +84,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg index 709b9855a..ef8fab731 100644 --- a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg @@ -74,11 +74,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Backup | https://docs.linuxgsm.com/commands/backup diff --git a/lgsm/config-default/config-lgsm/ut3server/_default.cfg b/lgsm/config-default/config-lgsm/ut3server/_default.cfg index 4f0b6a3a0..1088d1f0c 100644 --- a/lgsm/config-default/config-lgsm/ut3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut3server/_default.cfg @@ -90,11 +90,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Backup | https://docs.linuxgsm.com/commands/backup diff --git a/lgsm/config-default/config-lgsm/ut99server/_default.cfg b/lgsm/config-default/config-lgsm/ut99server/_default.cfg index f4a3d8ecf..3343afc81 100644 --- a/lgsm/config-default/config-lgsm/ut99server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut99server/_default.cfg @@ -74,11 +74,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Backup | https://docs.linuxgsm.com/commands/backup diff --git a/lgsm/config-default/config-lgsm/utserver/_default.cfg b/lgsm/config-default/config-lgsm/utserver/_default.cfg index 0ffdd821f..299d2571a 100644 --- a/lgsm/config-default/config-lgsm/utserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/utserver/_default.cfg @@ -78,11 +78,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Backup | https://docs.linuxgsm.com/commands/backup diff --git a/lgsm/config-default/config-lgsm/vhserver/_default.cfg b/lgsm/config-default/config-lgsm/vhserver/_default.cfg index 4e3d23923..355c70824 100644 --- a/lgsm/config-default/config-lgsm/vhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vhserver/_default.cfg @@ -114,11 +114,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/vintsserver/_default.cfg b/lgsm/config-default/config-lgsm/vintsserver/_default.cfg index 1b64ae29d..a3bc472c4 100644 --- a/lgsm/config-default/config-lgsm/vintsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vintsserver/_default.cfg @@ -74,11 +74,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/vpmcserver/_default.cfg b/lgsm/config-default/config-lgsm/vpmcserver/_default.cfg index 09d6bf93f..28bc1b2ea 100644 --- a/lgsm/config-default/config-lgsm/vpmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vpmcserver/_default.cfg @@ -77,11 +77,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/vsserver/_default.cfg b/lgsm/config-default/config-lgsm/vsserver/_default.cfg index 0195393fd..c7976b384 100644 --- a/lgsm/config-default/config-lgsm/vsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vsserver/_default.cfg @@ -77,11 +77,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/wetserver/_default.cfg b/lgsm/config-default/config-lgsm/wetserver/_default.cfg index 4c3738909..b53a0674c 100644 --- a/lgsm/config-default/config-lgsm/wetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wetserver/_default.cfg @@ -70,11 +70,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Backup | https://docs.linuxgsm.com/commands/backup diff --git a/lgsm/config-default/config-lgsm/wfserver/_default.cfg b/lgsm/config-default/config-lgsm/wfserver/_default.cfg index 80ff4ba96..fb7211c8c 100644 --- a/lgsm/config-default/config-lgsm/wfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wfserver/_default.cfg @@ -75,11 +75,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/wmcserver/_default.cfg b/lgsm/config-default/config-lgsm/wmcserver/_default.cfg index f38976d6e..c9a0a5d52 100644 --- a/lgsm/config-default/config-lgsm/wmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wmcserver/_default.cfg @@ -77,11 +77,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg index 901417aaf..0141e7d7e 100644 --- a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg @@ -114,11 +114,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/zmrserver/_default.cfg b/lgsm/config-default/config-lgsm/zmrserver/_default.cfg index 1bcd5d4a7..391d83baf 100644 --- a/lgsm/config-default/config-lgsm/zmrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/zmrserver/_default.cfg @@ -78,11 +78,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/config-default/config-lgsm/zpsserver/_default.cfg b/lgsm/config-default/config-lgsm/zpsserver/_default.cfg index f4497786b..b5a7b3b93 100644 --- a/lgsm/config-default/config-lgsm/zpsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/zpsserver/_default.cfg @@ -83,11 +83,13 @@ slackwebhook="webhook" # Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram # You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update diff --git a/lgsm/modules/alert_telegram.sh b/lgsm/modules/alert_telegram.sh index 3b3ec9912..6f6426cb1 100644 --- a/lgsm/modules/alert_telegram.sh +++ b/lgsm/modules/alert_telegram.sh @@ -11,7 +11,9 @@ jsoninfo=$( cat << EOF { "chat_id": "${telegramchatid}", + "message_thread_id": "${telegramthreadid}", "parse_mode": "HTML", + "disable_notification": "${telegramdisablenotification}", "text": "${alerttitle}\n\nServer name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\nMore info\n${alerturl}\n\nServer Time\n$(date)", "disable_web_page_preview": "yes" } @@ -22,7 +24,9 @@ jsonnoinfo=$( cat << EOF { "chat_id": "${telegramchatid}", + "message_thread_id": "${telegramthreadid}", "parse_mode": "HTML", + "disable_notification": "${telegramdisablenotification}", "text": "${alerttitle}\n\nServer name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\nServer Time\n$(date)", "disable_web_page_preview": "yes" } From 9b62bdeb666766c4e0a6a061dd52cef9e0a2e1cd Mon Sep 17 00:00:00 2001 From: MicLieg <38057464+MicLieg@users.noreply.github.com> Date: Sat, 9 Mar 2024 12:40:52 +0100 Subject: [PATCH 359/374] feat(dev): add new developer command for parsing distro details (#4523) * feat(dev): add new developer command for parsing distro details * Updated details-check action to match new command name --- .github/workflows/details-check.yml | 2 +- lgsm/modules/command_dev_details.sh | 98 ----------- .../command_dev_parse_distro_details.sh | 114 +++++++++++++ .../modules/command_dev_parse_game_details.sh | 160 ++++++++++++++++++ lgsm/modules/core_getopt.sh | 5 +- lgsm/modules/core_modules.sh | 7 +- 6 files changed, 284 insertions(+), 102 deletions(-) delete mode 100644 lgsm/modules/command_dev_details.sh create mode 100644 lgsm/modules/command_dev_parse_distro_details.sh create mode 100644 lgsm/modules/command_dev_parse_game_details.sh diff --git a/.github/workflows/details-check.yml b/.github/workflows/details-check.yml index 2a04dc6ac..748a77991 100644 --- a/.github/workflows/details-check.yml +++ b/.github/workflows/details-check.yml @@ -83,7 +83,7 @@ jobs: run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server details - name: Detect details - run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server detect-details + run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server parse-game-details - name: Query Raw run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server query-raw diff --git a/lgsm/modules/command_dev_details.sh b/lgsm/modules/command_dev_details.sh deleted file mode 100644 index 93dae77bc..000000000 --- a/lgsm/modules/command_dev_details.sh +++ /dev/null @@ -1,98 +0,0 @@ -#!/bin/bash -# LinuxGSM command_dev_debug.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Dev only: Enables debugging log to be saved to dev-debug.log. - -if [ -f "config" ]; then - servercfgfullpath="config" -fi -if [ -f "clusterconfig" ]; then - clustercfgfullpath="clusterconfig" -fi - -info_game.sh - -carriagereturn=$(file -b "${servercfgfullpath}" | grep -q CRLF && echo "${red}CRLF${default}" || echo "${lightgreen}LF${default}") - -echo -e "" -echo -e "${bold}${lightgreen}Server Details${default}" -fn_messages_separator - -echo -e "" -echo -e "Game: ${gamename}" -echo -e "Config type: ${configtype}" -echo -e "Config file: ${servercfgfullpath}" -if [ -f "${clustercfgfullpath}" ]; then - echo -e "Cluster config file: ${clustercfgfullpath}" -fi -echo -e "Carriage Return: ${carriagereturn}" - -# Create an associative array of the server details. -declare -A server_details=( - ['Admin Password']="${adminpassword}" - ['API Port']="${apiport}" - ['Cave']="${cave}" - ['Cluster']="${cluster}" - ['Config IP']="${configip}" - ['Default Map']="${defaultmap}" - ['Game Mode']="${gamemode}" - ['Game Type']="${gametype}" - ['HTTP Enabled']="${httpenabled}" - ['HTTP IP']="${httpip}" - ['HTTP Password']="${httppassword}" - ['HTTP Port']="${httpport}" - ['HTTP User']="${httpuser}" - ['Internet IP']="${publicip}" - ['LAN Port']="${lanport}" - ['Master Port']="${masterport}" - ['Master']="${master}" - ['Maxplayers']="${maxplayers}" - ['OldQueryPortNumber']="${oldqueryportnumber}" - ['Port']="${port}" - ['Query Port']="${queryport}" - ['RCON Enabled']="${rconenabled}" - ['RCON Password']="${rconpassword}" - ['RCON Port']="${rconport}" - ['Reserved Slots']="${reservedslots}" - ['Server IP']="${ip}" - ['Server Password']="${serverpassword}" - ['Servername']="${servername}" - ['Shard']="${shard}" - ['Sharding']="${sharding}" - ['Steam Auth Port']="${steamauthport}" - ['Telnet Enabled']="${telnetenabled}" - ['Telnet IP']="${telnetip}" - ['Telnet Password']="${telnetpassword}" - ['Telnet Port']="${telnetport}" - ['Tickrate']="${tickrate}" - ['World Name']="${worldname}" - ['World Type']="${worldtype}" -) - -# Initialize a variable to keep track of missing server details. -missing_details="" - -# Loop through the server details and output them. -echo -e "" -echo -e "${bold}${lightgreen}Available Server Details${default}" -fn_messages_separator -for key in "${!server_details[@]}"; do - value=${server_details[$key]} - if [ -z "$value" ]; then - missing_details+="\n${key}" - else - echo -e "$key: $value " - fi -done - -# Output the missing server details if there are any. -if [ -n "$missing_details" ]; then - echo -e "" - echo -e "${lightgreen}Missing Server Details${default}" - fn_messages_separator - echo -e "${missing_details}" -fi - -core_exit.sh diff --git a/lgsm/modules/command_dev_parse_distro_details.sh b/lgsm/modules/command_dev_parse_distro_details.sh new file mode 100644 index 000000000..ca2bfd9ed --- /dev/null +++ b/lgsm/modules/command_dev_parse_distro_details.sh @@ -0,0 +1,114 @@ +#!/bin/bash +# LinuxGSM command_dev_parse_distro_details.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Display parsed distro details. + +check_ip.sh +check_status.sh +info_distro.sh + +# Create an associative array of the server details. +declare -A server_details=( + ['.NET Version']="${dotnetversion}" + ['Arch']="${arch}" + ['Backup Count']="${backupcount}" + ['Backup Last Date']="${lastbackupdate}" + ['Backup Last Days Ago']="${lastbackupdaysago}" + ['Backup Last Size']="${lastbackupsize}" + ['Backup Last']="${lastbackup}" + ['CPU Average Load']="${load}" + ['CPU Cores']="${cpucores}" + ['CPU Frequency']="${cpufreqency}" + ['CPU Model']="${cpumodel}" + ['Distro Codename']="${distrocodename}" + ['Distro ID Like']="${distroidlike}" + ['Distro ID']="${distroid}" + ['Distro Kernel']="${kernel}" + ['Distro Name']="${distroname}" + ['Distro Version CSV']="${distroversioncsv}" + ['Distro Version RH']="${distroversionrh}" + ['Distro Version']="${distroversion}" + ['Distro-Info Support']="${distrosupport}" + ['File System']="${filesystem}" + ['Game Server PID']="${gameserverpid}" + ['Gameserver CPU Used MHz']="${cpuusedmhz}" + ['Gameserver CPU Used']="${cpuused}" + ['Gameserver Mem Used MB']="${memusedmb}" + ['Gameserver Mem Used Pct']="${memusedpct}" + ['GLIBC Version']="${glibcversion}" + ['GLIBC']="${glibc}" + ['HLDS Linux PID']="${hldslinuxpid}" + ['Java Version']="${javaversion}" + ['Mono Version']="${monoversion}" + ['Network Interface']="${netint}" + ['Network Link Speed']="${netlink}" + ['Old Free']="${oldfree}" + ['Phys Mem Available']="${physmemavailable}" + ['Phys Mem Buffers KB']="${physmembufferskb}" + ['Phys Mem Cached']="${physmemcached}" + ['Phys Mem Free']="${physmemfree}" + ['Phys Mem Reclaimable KB']="${physmemreclaimablekb}" + ['Phys Mem Total GB']="${physmemtotalgb}" + ['Phys Mem Used']="${physmemused}" + ['Size Backup Dir']="${backupdirdu}" + ['Size Root Dir ']="${rootdirdu}" + ['Size Root Dir Excl. Backup']="${rootdirduexbackup}" + ['Size Serverfiles']="${serverfilesdu}" + ['SRCDS Linux PID']="${srcdslinuxpid}" + ['Storage Available']="${availspace}" + ['Storage Total']="${totalspace}" + ['Storage Used']="${usedspace}" + ['Swap Free']="${swapfree}" + ['Swap Total']="${swaptotal}" + ['Swap Used']="${swapused}" + ['Tmux Version']="${tmuxversion}" + ['Uptime Days']="${days}" + ['Uptime Hours']="${hours}" + ['Uptime Minutes']="${minutes}" + ['Uptime Total Seconds']="${uptime}" + ['Virtual Environment']="${virtualenvironment}" + # ['Distro Info Array']="${distro_info_array}" + # ['Distros Unsupported Array']="${distrosunsupported_array}" + # ['Distros Unsupported']="${distrosunsupported}" + # ['Human Readable']="${humanreadable}" + # ['Phys Mem Actual Free KB']="${physmemactualfreekb}" + # ['Phys Mem Cached KB']="${physmemcachedkb}" + # ['Phys Mem Free KB']="${physmemfreekb}" + # ['Phys Mem Total KB']="${physmemtotalkb}" + # ['Phys Mem Total MB']="${physmemtotalmb}" + # ['SS Info']="${ssinfo}" +) + +# Initialize variables to keep track of available and missing distro details. +available_details="" +missing_details="" + +# Loop through the distro details and store them. +for key in "${!server_details[@]}"; do + value=${server_details[$key]} + if [ -n "$value" ]; then + available_details+="${lightblue}${key}: ${default}${value}\n" + else + missing_details+="${key}\n" + fi +done + +# Sort and output the available distro details. +if [ -n "$available_details" ]; then + echo -e "" + echo -e "${bold}${lightgreen}Available Distro Details${default}" + fn_messages_separator + echo -e "${available_details}" | sort +fi + +# Sort and output the missing distro details. +if [ -n "$missing_details" ]; then + echo -e "" + echo -e "${lightgreen}Missing or unsupported Distro Details${default}" + fn_messages_separator + echo -e "${missing_details}" | sort +fi + +core_exit.sh diff --git a/lgsm/modules/command_dev_parse_game_details.sh b/lgsm/modules/command_dev_parse_game_details.sh new file mode 100644 index 000000000..f5d6d697d --- /dev/null +++ b/lgsm/modules/command_dev_parse_game_details.sh @@ -0,0 +1,160 @@ +#!/bin/bash +# LinuxGSM command_dev_parse_game_details.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Display parsed gameserver details. + +if [ -f "config" ]; then + servercfgfullpath="config" +fi +if [ -f "clusterconfig" ]; then + clustercfgfullpath="clusterconfig" +fi + +info_game.sh + +carriagereturn=$(file -b "${servercfgfullpath}" | grep -q CRLF && echo "${red}CRLF${default}" || echo "${lightgreen}LF${default}") + +echo -e "" +echo -e "${bold}${lightgreen}Server Details${default}" +fn_messages_separator + +echo -e "" +echo -e "${lightblue}Game: ${default}${gamename}" +echo -e "${lightblue}Config type: ${default}${configtype}" +echo -e "${lightblue}Config file: ${default}${servercfgfullpath}" +if [ -f "${clustercfgfullpath}" ]; then + echo -e "${lightblue}Cluster config file: ${default}${clustercfgfullpath}" +fi +echo -e "${lightblue}Carriage Return: ${default}${carriagereturn}" + +# Create an associative array of the server details. +declare -A server_details=( + ['Admin Password']="${adminpassword}" + ['Alert IP']="${alertip}" + ['API Port']="${apiport}" + ['App Port']="${appport}" + ['ASE']="${ase}" + ['Auth Token']="${authtoken}" + ['BattleEye Port']="${battleeyeport}" + ['Beacon Port']="${beaconport}" + ['Cave']="${cave}" + ['Client Port']="${clientport}" + ['Cluster']="${cluster}" + ['Config IP']="${configip}" + ['Creative Mode']="${creativemode}" + ['Custom Level URL']="${customlevelurl}" + ['DB Plugin']="${dbplugin}" + ['Default Map']="${defaultmap}" + ['Default Scenario']="${defaultscenario}" + ['Display Master Server']="${displaymasterserver}" + ['Epic Settings']="${epicsettings}" + ['File Port']="${fileport}" + ['Files Port']="${filesport}" + ['Game Mode']="${gamemode}" + ['Game Type']="${gametype}" + ['Home Kingdom']="${homekingdom}" + ['Home Server']="${homeserver}" + ['HTTP Enabled']="${httpenabled}" + ['HTTP IP']="${httpip}" + ['HTTP Password']="${httppassword}" + ['HTTP Port']="${httpport}" + ['HTTP User']="${httpuser}" + ['Internet IP']="${publicip}" + ['LAN Port']="${lanport}" + ['Login Server']="${loginserver}" + ['Master Port']="${masterport}" + ['Master Server']="${masterserver}" + ['Master']="${master}" + ['Max Players']="${maxplayers}" + ['Mod Server Port']="${modserverport}" + ['OldQueryPortNumber']="${oldqueryportnumber}" + ['Password']="${password}" + ['Port 401']="${port401}" + ['Port IPv6']="${portipv6}" + ['Port']="${port}" + ['Query Enabled']="${queryenabled}" + ['Query HTTP Port']="${queryhttpport}" + ['Query HTTPS Port']="${queryhttpsport}" + ['Query Mode']="${querymode}" + ['Query Port GS']="${queryportgs}" + ['Query Port']="${queryport}" + ['Query SSH Port']="${querysshport}" + ['Queue Enabled']="${queueenabled}" + ['Queue Port']="${queueport}" + ['Random Map']="${randommap}" + ['Raw Port']="${rawport}" + ['RC Password']="${rcpassword}" + ['RCON Enabled']="${rconenabled}" + ['RCON Password']="${rconpassword}" + ['RCON Port']="${rconport}" + ['RCON Web']="${rconweb}" + ['Reserved Slots']="${reservedslots}" + ['RMI Port']="${rmiport}" + ['RMI Reg Port']="${rmiregport}" + ['Salt']="${salt}" + ['Save Game Interval']="${savegameinterval}" + ['Save Interval']="${saveinterval}" + ['Secondary Port']="${port3}" + ['Seed']="${seed}" + ['Server Description']="${serverdescription}" + ['Server IP']="${ip}" + ['Server Level']="${serverlevel}" + ['Server Name']="${servername}" + ['Server Password Enabled']="${serverpasswordenabled}" + ['Server Password']="${serverpassword}" + ['Server Version']="${serverversion}" + ['Shard']="${shard}" + ['Sharding']="${sharding}" + ['Shutdown Port']="${shutdownport}" + ['Stats Port']="${statsport}" + ['Steam Auth Port']="${steamauthport}" + ['Steam Port']="${steamport}" + ['Steamworks Port']="${steamworksport}" + ['Telnet Enabled']="${telnetenabled}" + ['Telnet IP']="${telnetip}" + ['Telnet Password']="${telnetpass}" + ['Telnet Password']="${telnetpassword}" + ['Telnet Port']="${telnetport}" + ['Tickrate']="${tickrate}" + ['Unknown Port']="${unknownport}" + ['Version Count']="${versioncount}" + ['Voice Port']="${voiceport}" + ['Voice Unused Port']="${voiceunusedport}" + ['World Name']="${worldname}" + ['World Size']="${worldsize}" + ['World Type']="${worldtype}" +) + +# Initialize variables to keep track of available and missing server details. +available_details="" +missing_details="" + +# Loop through the server details and store them. +for key in "${!server_details[@]}"; do + value=${server_details[$key]} + if [ -n "$value" ]; then + available_details+="${lightblue}${key}: ${default}${value}\n" + else + missing_details+="${key}\n" + fi +done + +# Sort and output the available distro details. +if [ -n "$available_details" ]; then + echo -e "" + echo -e "${bold}${lightgreen}Available Distro Details${default}" + fn_messages_separator + echo -e "${available_details}" | sort +fi + +# Output the missing server details if there are any. +if [ -n "$missing_details" ]; then + echo -e "" + echo -e "${lightgreen}Missing or unsupported Server Details${default}" + fn_messages_separator + echo -e "${missing_details}" | sort +fi + +core_exit.sh diff --git a/lgsm/modules/core_getopt.sh b/lgsm/modules/core_getopt.sh index 685e1ce8b..cd3e57cb5 100644 --- a/lgsm/modules/core_getopt.sh +++ b/lgsm/modules/core_getopt.sh @@ -50,7 +50,8 @@ cmd_install_squad_license=("li;license" "install_squad_license.sh" "Add your Squ cmd_fastdl=("fd;fastdl" "command_fastdl.sh" "Build a FastDL directory.") # Dev commands. cmd_dev_debug=("dev;developer" "command_dev_debug.sh" "Enable developer Mode.") -cmd_dev_details=("ddt;detect-details" "command_dev_details.sh" "Display parsed details.") +cmd_dev_parse_game_details=("pgd;parse-game-details" "command_dev_parse_game_details.sh" "Display parsed gameserver details.") +cmd_dev_parse_distro_details=("pdd;parse-distro-details" "command_dev_parse_distro_details.sh" "Display parsed distro details.") cmd_dev_detect_deps=("dd;detect-deps" "command_dev_detect_deps.sh" "Detect required dependencies.") cmd_dev_detect_glibc=("dg;detect-glibc" "command_dev_detect_glibc.sh" "Detect required glibc.") cmd_dev_detect_ldd=("dl;detect-ldd" "command_dev_detect_ldd.sh" "Detect required dynamic dependencies.") @@ -146,7 +147,7 @@ currentopt+=("${cmd_install[@]}" "${cmd_auto_install[@]}") ## Developer commands. currentopt+=("${cmd_dev_debug[@]}") if [ -f ".dev-debug" ]; then - currentopt+=("${cmd_dev_details[@]}" "${cmd_dev_detect_deps[@]}" "${cmd_dev_detect_glibc[@]}" "${cmd_dev_detect_ldd[@]}" "${cmd_dev_query_raw[@]}" "${cmd_dev_clear_modules[@]}") + currentopt+=("${cmd_dev_parse_game_details[@]}" "${cmd_dev_parse_distro_details[@]}" "${cmd_dev_detect_deps[@]}" "${cmd_dev_detect_glibc[@]}" "${cmd_dev_detect_ldd[@]}" "${cmd_dev_query_raw[@]}" "${cmd_dev_clear_modules[@]}") fi ## Sponsor. diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index e1621f014..7ea0402e3 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -299,7 +299,12 @@ command_dev_debug.sh() { fn_fetch_module } -command_dev_details.sh() { +command_dev_parse_game_details.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + +command_dev_parse_distro_details.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module } From 7cc5b6b520d527a09d1eb08359e4545dcdc0ef3c Mon Sep 17 00:00:00 2001 From: Cristopfer Luis Date: Thu, 14 Mar 2024 12:38:01 -0300 Subject: [PATCH 360/374] feat(new server): humanitz (#4518) * feat: add config for humanitz * fix: pending changes required * fix: install config * bug --------- Co-authored-by: Daniel Gibbs --- .../config-lgsm/hzserver/_default.cfg | 184 ++++++++++++++++++ lgsm/data/almalinux-8.csv | 1 + lgsm/data/almalinux-9.csv | 1 + lgsm/data/centos-7.csv | 1 + lgsm/data/centos-8.csv | 1 + lgsm/data/centos-9.csv | 1 + lgsm/data/debian-10.csv | 1 + lgsm/data/debian-11.csv | 1 + lgsm/data/debian-12.csv | 1 + lgsm/data/debian-9.csv | 1 + lgsm/data/rhel-7.csv | 1 + lgsm/data/rhel-8.csv | 1 + lgsm/data/rhel-9.csv | 1 + lgsm/data/rocky-8.csv | 1 + lgsm/data/rocky-9.csv | 1 + lgsm/data/serverlist.csv | 1 + lgsm/data/ubuntu-16.04.csv | 1 + lgsm/data/ubuntu-18.04.csv | 1 + lgsm/data/ubuntu-20.04.csv | 1 + lgsm/data/ubuntu-22.04.csv | 1 + lgsm/data/ubuntu-23.04.csv | 1 + lgsm/data/ubuntu-23.10.csv | 1 + lgsm/modules/info_game.sh | 19 ++ lgsm/modules/info_messages.sh | 11 ++ lgsm/modules/install_config.sh | 3 + 25 files changed, 238 insertions(+) create mode 100644 lgsm/config-default/config-lgsm/hzserver/_default.cfg diff --git a/lgsm/config-default/config-lgsm/hzserver/_default.cfg b/lgsm/config-default/config-lgsm/hzserver/_default.cfg new file mode 100644 index 000000000..b610594e7 --- /dev/null +++ b/lgsm/config-default/config-lgsm/hzserver/_default.cfg @@ -0,0 +1,184 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! +# Copy settings from here and use them in either: +# common.cfg - applies settings to every instance. +# [instance].cfg - applies settings to a specific instance. + +#### Game Server Settings #### + +## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters +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}" + +#### LinuxGSM Settings #### + +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + +## Notification Alerts +# (on|off) + +# Display IP | https://docs.linuxgsm.com/alerts#display-ip +displayip="" + +# More info | https://docs.linuxgsm.com/alerts#more-info +postalert="off" + +# Alert on Start/Stop/Restart +statusalert="off" + +# Discord Alerts | https://docs.linuxgsm.com/alerts/discord +discordalert="off" +discordwebhook="webhook" + +# Email Alerts | https://docs.linuxgsm.com/alerts/email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + +# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover +pushoveralert="off" +pushovertoken="accesstoken" +pushoveruserkey="userkey" + +# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat +rocketchatalert="off" +rocketchatwebhook="webhook" + +# Slack Alerts | https://docs.linuxgsm.com/alerts/slack +slackalert="off" +slackwebhook="webhook" + +# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram +# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +telegramapi="api.telegram.org" +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +curlcustomstring="" + +## Updating | https://docs.linuxgsm.com/commands/update +updateonstart="off" + +## Backup | https://docs.linuxgsm.com/commands/backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://docs.linuxgsm.com/features/logging +consolelogging="on" +logdays="7" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="5" + +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors +ansi="on" + +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time +sleeptime="0.5" + +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd +# Server appid +appid="2728330" +steamcmdforcewindows="no" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="linuxbranch" +betapassword="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="true" + +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode +# 1: tmux kill +# 2: CTRL+c +# 3: quit +# 4: quit 120s +# 5: stop +# 6: q +# 7: exit +# 8: 7 Days to Die +# 9: GoldSrc +# 10: Avorion +# 11: end +stopmode="2" + +## Query mode +# 1: session only +# 2: gamedig (gsquery fallback) +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Console type +consoleverbose="no" +consoleinteract="no" + +## Game Server Details +# Do not edit +gamename="HumanitZ" +engine="unreal4" +glibc="2.17" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}/TSSGame" +executabledir="${systemdir}/Binaries/Linux" +executable="./TSSGameServer-Linux-Shipping" +servercfgdir="${systemdir}/Saved/Config/LinuxServer" +servercfg="GameUserSettings.ini" +servercfgdefault="GameUserSettings.ini" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" +gamelogdir="${systemdir}/Saved/Logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index c156eb053..e73fcfaa0 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -54,6 +54,7 @@ hl2dm hldm hldms hw,zlib-devel +hz ins inss ios diff --git a/lgsm/data/almalinux-9.csv b/lgsm/data/almalinux-9.csv index faacfa915..f5b5b5fc5 100644 --- a/lgsm/data/almalinux-9.csv +++ b/lgsm/data/almalinux-9.csv @@ -54,6 +54,7 @@ hl2dm hldm hldms hw,zlib-devel +hz ins inss ios diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index 84df6f5c6..a80043346 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -54,6 +54,7 @@ hl2dm hldm hldms hw,zlib-devel +hz ins inss ios diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index c156eb053..e73fcfaa0 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -54,6 +54,7 @@ hl2dm hldm hldms hw,zlib-devel +hz ins inss ios diff --git a/lgsm/data/centos-9.csv b/lgsm/data/centos-9.csv index faacfa915..f5b5b5fc5 100644 --- a/lgsm/data/centos-9.csv +++ b/lgsm/data/centos-9.csv @@ -54,6 +54,7 @@ hl2dm hldm hldms hw,zlib-devel +hz ins inss ios diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index 5f7f5f261..f5d63b026 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -53,6 +53,7 @@ hl2dm hldm hldms hw,lib32z1 +hz ins inss ios diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index 3ecedd538..97f5b978d 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -54,6 +54,7 @@ hl2dm hldm hldms hw,lib32z1 +hz ins inss ios diff --git a/lgsm/data/debian-12.csv b/lgsm/data/debian-12.csv index 0ff8b391d..e54d9b12b 100644 --- a/lgsm/data/debian-12.csv +++ b/lgsm/data/debian-12.csv @@ -54,6 +54,7 @@ hl2dm hldm hldms hw,lib32z1 +hz ins inss ios diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index cb5eea4a1..87b6dad91 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -54,6 +54,7 @@ hl2dm hldm hldms hw,lib32z1 +hz ins inss ios diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index 2b3be410d..3ecff6183 100644 --- a/lgsm/data/rhel-7.csv +++ b/lgsm/data/rhel-7.csv @@ -55,6 +55,7 @@ hl2dm hldm hldms hw,zlib-devel +hz ins inss ios diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index c156eb053..e73fcfaa0 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -54,6 +54,7 @@ hl2dm hldm hldms hw,zlib-devel +hz ins inss ios diff --git a/lgsm/data/rhel-9.csv b/lgsm/data/rhel-9.csv index faacfa915..f5b5b5fc5 100644 --- a/lgsm/data/rhel-9.csv +++ b/lgsm/data/rhel-9.csv @@ -54,6 +54,7 @@ hl2dm hldm hldms hw,zlib-devel +hz ins inss ios diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index c156eb053..e73fcfaa0 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -54,6 +54,7 @@ hl2dm hldm hldms hw,zlib-devel +hz ins inss ios diff --git a/lgsm/data/rocky-9.csv b/lgsm/data/rocky-9.csv index faacfa915..f5b5b5fc5 100644 --- a/lgsm/data/rocky-9.csv +++ b/lgsm/data/rocky-9.csv @@ -54,6 +54,7 @@ hl2dm hldm hldms hw,zlib-devel +hz ins inss ios diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 841dcbf42..ae270f965 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -53,6 +53,7 @@ hl2dm,hl2dmserver,Half-Life 2: Deathmatch,ubuntu-22.04 hldm,hldmserver,Half-Life: Deathmatch,ubuntu-22.04 hldms,hldmsserver,Half-Life Deathmatch: Source,ubuntu-22.04 hw,hwserver,Hurtworld,ubuntu-22.04 +hz,hzserver,Humanitz,ubuntu-22.04 ins,insserver,Insurgency,ubuntu-22.04 inss,inssserver,Insurgency: Sandstorm,ubuntu-22.04 ios,iosserver,IOSoccer,ubuntu-22.04 diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index 9d88fde5c..41dbd0bc5 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -55,6 +55,7 @@ hl2dm hldm hldms hw,lib32z1 +hz ins inss ios diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index a0b809b05..469c66705 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -55,6 +55,7 @@ hl2dm hldm hldms hw,lib32z1 +hz ins inss ios diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index 092792fa3..4a41435c2 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -54,6 +54,7 @@ hl2dm hldm hldms hw,lib32z1 +hz ins inss ios diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index 21bab16cb..323b82a08 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -54,6 +54,7 @@ hl2dm hldm hldms hw,lib32z1 +hz ins inss ios diff --git a/lgsm/data/ubuntu-23.04.csv b/lgsm/data/ubuntu-23.04.csv index a29f403d7..e249a2968 100644 --- a/lgsm/data/ubuntu-23.04.csv +++ b/lgsm/data/ubuntu-23.04.csv @@ -54,6 +54,7 @@ hl2dm hldm hldms hw,lib32z1 +hz ins inss ios diff --git a/lgsm/data/ubuntu-23.10.csv b/lgsm/data/ubuntu-23.10.csv index a29f403d7..e249a2968 100644 --- a/lgsm/data/ubuntu-23.10.csv +++ b/lgsm/data/ubuntu-23.10.csv @@ -54,6 +54,7 @@ hl2dm hldm hldms hw,lib32z1 +hz ins inss ios diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 97f8da87e..0725845a0 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -1328,6 +1328,23 @@ fn_info_game_hw() { creativemode="${creativemode:-"NOT SET"}" } +# Config Type: ini +# Parameters: true +# Comment: ; or # +# Example: ServerName=SERVERNAME +# Filetype: ini +fn_info_game_hz() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_ini "adminpassword" "AdminPassword" + fn_info_game_ini "servername" "ServerName" + fi + adminpass="${adminpassword:-"NOT SET"}" + port="${port:-"0"}" + queryport="${queryport:-"0"}" + rconport="$((port + 2))" + servername="${servername:-"NOT SET"}" +} + # Config Type: parameters # Parameters: true # Comment: @@ -2335,6 +2352,8 @@ elif [ "${shortname}" == "fctr" ]; then fn_info_game_fctr elif [ "${shortname}" == "hw" ]; then fn_info_game_hw +elif [ "${shortname}" == "hz" ]; then + fn_info_game_hz elif [ "${shortname}" == "inss" ]; then fn_info_game_inss elif [ "${shortname}" == "jc2" ]; then diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index c5d03919c..a1e8f52ac 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -1064,6 +1064,15 @@ fn_info_messages_hw() { } | column -s $'\t' -t } +fn_info_messages_hz() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "RCON" rconport tcp + } | column -s $'\t' -t +} + fn_info_messages_ins() { { fn_port "header" @@ -1771,6 +1780,8 @@ fn_info_messages_select_engine() { fn_info_messages_hcu elif [ "${shortname}" == "hw" ]; then fn_info_messages_hw + elif [ "${shortname}" == "hz" ]; then + fn_info_messages_hz elif [ "${shortname}" == "ins" ]; then fn_info_messages_ins elif [ "${shortname}" == "inss" ]; then diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index a5a049913..9b3146770 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -495,6 +495,9 @@ elif [ "${shortname}" == "hl2dm" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations +elif [ "${shortname}" == "hz" ]; then + # Config is generated on first run + : elif [ "${shortname}" == "ins" ]; then array_configs+=(server.cfg) fn_fetch_default_config From 9d489d56dc9028b54d6d09fa1a2a2d274be76a10 Mon Sep 17 00:00:00 2001 From: Josh Gelman Date: Sat, 23 Mar 2024 05:01:23 -0600 Subject: [PATCH 361/374] fear(wf): Update Warfork path (#4541) As of the latest update on Steam, the installation directory for Linux has been moved out of `Warfork.app/Contents/Resources/` Co-authored-by: Daniel Gibbs --- lgsm/config-default/config-lgsm/wfserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/wfserver/_default.cfg b/lgsm/config-default/config-lgsm/wfserver/_default.cfg index fb7211c8c..d59790ca5 100644 --- a/lgsm/config-default/config-lgsm/wfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wfserver/_default.cfg @@ -156,7 +156,7 @@ glibc="2.15" # Edit with care ## Game Server Directories -systemdir="${serverfiles}/Warfork.app/Contents/Resources" +systemdir="${serverfiles}" executabledir="${systemdir}" executable="./wf_server.x86_64" servercfgdir="${systemdir}/basewf" From 4fdf1f1af81e8549693759a6229279210c107204 Mon Sep 17 00:00:00 2001 From: Cristopfer Luis Date: Sat, 23 Mar 2024 08:01:57 -0300 Subject: [PATCH 362/374] fix: add humanitz icon (#4536) --- lgsm/data/gameicons/hz-icon.png | Bin 0 -> 2783 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 lgsm/data/gameicons/hz-icon.png diff --git a/lgsm/data/gameicons/hz-icon.png b/lgsm/data/gameicons/hz-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..7d2428669491e34cccea37d2311a988dac7027aa GIT binary patch literal 2783 zcmV<53Ly1~P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!T^W| zfa`m(r@`d!x@$wV%@UepmCrSPJHv6%?gnto2uUqO_Y4<(ii?3ZAH8aXSaV_7E^5Aw zHs8cdM@O5bp=PQuEFH@K8*ae~{4b#-;=3gofyM82zMska4$p^S2k>+sam7L2?x0@v zQ8xkv7B}H|Py+`Q&qAkTpkf=)Z2ijwrW^OTa0}Ca7ZP&c@>=PIBt$ifprsLvga`xJ zVF)jZ5hU>!#0}4Z;n*;3tAu4u;wvGTPNW6j_YnjELM|*9=?^tj`8!mGu&zcs2zVZM z?s|yBXwo2&hcW6wjKUY=Aqsk++cVK{RYYEuxl)0dXwXxQ;V@u@CZfNvd~;*8kGQs&5a>7{eR3}=Tq&h%3(WEG5>^ptL*&O9i+ z7bi%#0nhQ7FIiI7wipl71ToRp(T*E_dOcp=e*gzR{0Kk1WErgXDt15q1m4)YA0NK? zE^b_V9nPLT7rz)h5gQwG@j$)+kLHW9EBQJe4HjW*w3zQt!cC*!#t-_&uqbVyC*r2K zzQc;KxJi>X6_2GOArRw|0})F{uxZmK9R2hN4jud$E0!&XThlSI=S3X)%U^Ni;352M z%?2zAa;$62#>Qe4+oCZ%TpPhoWe`udkKvEzLTn+4b&1>8JAnTH$BrDu6)RT4VadET@fvXSGvMFA^=sB6s#P(T zJ2Zs%X=mcyk7UNgx7|!YpFpr6svs%2Axt253iI9oV3`jt--(}L} z%|@AoLO|TKdGlr*KYkqYxB99dl{Ne7D--zqGrl9SpR8Gj&JG2B!3qcz40I}3qH5Ss z4B^hJ}Pa6S^+sy!O!Q`VS>P*Cbj|3#+MVXQ;Et5~6>Kbmp^A3FS z_d{X}NmVZe)_qQg(t}sdKM||vF2MJaCQhc?=TWG7Qm$FJ&>9}}CVNW8 zkdr`@6;Ki=vy#at2IMLPEY|H^_uhkphd#l_^uo$3uP76A-zx{o=cC6z!?h$3R4Q0F zvx@Vz0ITXl7$2C2OOqaavua_C;TUC~$YP2d)v=n}B?$>ZNO{f~mM)5&B0CqO1(Q&E zf=`L{{1CU_eJ|d4_dWdWlYii{6_=xfO7_IF&*FnWe~80}50@e6>eO%{GyIxl5NmqI zu%Z~icdQ5tY9{&_#+)h{WNbnyjTh`WT?}y}rM!no*-LV^X+<7v>OjJhFboSm6JzPp zbMe@&=kU~?3G93QJ>2p8`?31k>+tZSJMsQIAK={suj0n>AEQtdtn8bE%bP>EFzvyq zPKc43hK5=}9x$)!taTF53%Z{>w+jj#%TENZ@Tsg0L*SC7kZ^4WXB+jwUGJ9vR4p5Ol#_U@g)#0xLuqlve0^VMrHPj#`ZcNiBWT{zVWO1Jm0G*hdF zfKAAuVJ+v}z^jon#JRL+dVsQCco`)*B>|tiW?4w{sTbXdqXOHv{|S3udKf4~FV9>LZJAIDkeT!d=H!mYpjH6FZo6V4b}fZ?i(#f;-% zMZ*vWjbVz}5HougE2)>V+u#^hu*YPqu!K1#peL4+>4Ne1ui}BVqCK19E`Xb=G1(Qap)XoyPeH`GDHy@;?Oe4 z3?E=y?h7~}^V;CGU>8iK1&i9|X&DNa9=Ca~1oZ@+dbMmuGV9eUDo3y!D_5+-m8-_F zZru$y`IOV3s}`DkpVlnQ<_JFDPBF}pdluEMiz3xzukYf7)Jw_k)B%-(p;8NEF#R6^ zk`WSgugOD)$=T3#eS{>C@m;s!m&W@IkA`go4rf2^KBbn3y4ATxX`BtGMIfaoB8EdG zUuF=|1RLv*c#@;R@WONHTUdNmReRmR*MmcaWCt8pk5`im| zdy0s7Bjo##?*v~VU{Oj9ogfL7$7tET5U5TO(0S0XLy0AOJ4tvfPr-EK28{@G8WaL8 l5< Date: Sat, 23 Mar 2024 11:02:24 +0000 Subject: [PATCH 363/374] build(deps): bump actions/add-to-project from 0.5.0 to 0.6.1 (#4538) Bumps [actions/add-to-project](https://github.com/actions/add-to-project) from 0.5.0 to 0.6.1. - [Release notes](https://github.com/actions/add-to-project/releases) - [Commits](https://github.com/actions/add-to-project/compare/v0.5.0...v0.6.1) --- updated-dependencies: - dependency-name: actions/add-to-project dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: Daniel Gibbs Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/add-to-project.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/add-to-project.yml b/.github/workflows/add-to-project.yml index 0ddccb572..ac2514b1d 100644 --- a/.github/workflows/add-to-project.yml +++ b/.github/workflows/add-to-project.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Add to Project - uses: actions/add-to-project@v0.5.0 + uses: actions/add-to-project@v0.6.1 with: project-url: https://github.com/orgs/GameServerManagers/projects/11 github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} From 57ebe2063572c1c160acef3ff86c3c921f45799e Mon Sep 17 00:00:00 2001 From: MicLieg <38057464+MicLieg@users.noreply.github.com> Date: Sat, 23 Mar 2024 12:02:58 +0100 Subject: [PATCH 364/374] fix(parse-details): change heading of output & add hint for creating new variables (#4531) * Added hint for new variables * Fixed heading of output --- lgsm/modules/command_dev_parse_game_details.sh | 4 ++-- lgsm/modules/info_distro.sh | 1 + lgsm/modules/info_game.sh | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/command_dev_parse_game_details.sh b/lgsm/modules/command_dev_parse_game_details.sh index f5d6d697d..4dcf33c2a 100644 --- a/lgsm/modules/command_dev_parse_game_details.sh +++ b/lgsm/modules/command_dev_parse_game_details.sh @@ -144,7 +144,7 @@ done # Sort and output the available distro details. if [ -n "$available_details" ]; then echo -e "" - echo -e "${bold}${lightgreen}Available Distro Details${default}" + echo -e "${bold}${lightgreen}Available Gameserver Details${default}" fn_messages_separator echo -e "${available_details}" | sort fi @@ -152,7 +152,7 @@ fi # Output the missing server details if there are any. if [ -n "$missing_details" ]; then echo -e "" - echo -e "${lightgreen}Missing or unsupported Server Details${default}" + echo -e "${lightgreen}Missing or unsupported Gameserver Details${default}" fn_messages_separator echo -e "${missing_details}" | sort fi diff --git a/lgsm/modules/info_distro.sh b/lgsm/modules/info_distro.sh index 4465d6cdb..adcdb759b 100644 --- a/lgsm/modules/info_distro.sh +++ b/lgsm/modules/info_distro.sh @@ -5,6 +5,7 @@ # Website: https://linuxgsm.com # Description: Variables providing useful info on the Operating System such as disk and performace info. # Used for command_details.sh, command_debug.sh and alert.sh. +# !Note: When adding variables to this script, ensure that they are also added to the command_dev_parse_distro_details.sh script. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 0725845a0..497a65f22 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -4,6 +4,7 @@ # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Gathers various game server information. +# !Note: When adding variables to this script, ensure that they are also added to the command_dev_parse_game_details.sh script. # shellcheck disable=SC2317 moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" From 06d9eda27fba2c63d1139aa04c5afa634ed0892e Mon Sep 17 00:00:00 2001 From: Silje Ljosland Bakke Date: Thu, 4 Apr 2024 11:37:28 +0200 Subject: [PATCH 365/374] fix(vh): update bepinexvh url to new url #4547 (#4548) --- lgsm/modules/mods_list.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/modules/mods_list.sh b/lgsm/modules/mods_list.sh index c9a316055..c13565004 100644 --- a/lgsm/modules/mods_list.sh +++ b/lgsm/modules/mods_list.sh @@ -105,7 +105,7 @@ oxidesdtdlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos # Valheim Plus valheimpluslatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/Grantapher/ValheimPlus/releases/latest | jq -r '.assets[]|select(.browser_download_url | contains("UnixServer.tar.gz")) | .browser_download_url') # Valheim BepInEx -bepinexvhlatestlink=$(curl --connect-timeout 10 -sL "https://valheim.thunderstore.io/api/experimental/package/denikson/BepInExPack_Valheim/" -H "accept: application/json" | jq -r '.latest.download_url') +bepinexvhlatestlink=$(curl --connect-timeout 10 -sL "https://thunderstore.io/api/experimental/package/denikson/BepInExPack_Valheim/" -H "accept: application/json" | jq -r '.latest.download_url') # Define mods information (required) From a2df0c49e98e690bb0cbd60517cf714ccfa7e674 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Apr 2024 10:39:31 +0100 Subject: [PATCH 366/374] build(deps): bump actions/add-to-project from 0.5.0 to 1.0.0 (#4546) Bumps [actions/add-to-project](https://github.com/actions/add-to-project) from 0.5.0 to 1.0.0. - [Release notes](https://github.com/actions/add-to-project/releases) - [Commits](https://github.com/actions/add-to-project/compare/v0.5.0...v1.0.0) --- updated-dependencies: - dependency-name: actions/add-to-project dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: Daniel Gibbs Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/add-to-project.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/add-to-project.yml b/.github/workflows/add-to-project.yml index ac2514b1d..e6f6ee9be 100644 --- a/.github/workflows/add-to-project.yml +++ b/.github/workflows/add-to-project.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Add to Project - uses: actions/add-to-project@v0.6.1 + uses: actions/add-to-project@v1.0.0 with: project-url: https://github.com/orgs/GameServerManagers/projects/11 github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} From 95c34edaf2c28624eaf681cf31d275a4e71db379 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 4 Apr 2024 10:46:59 +0100 Subject: [PATCH 367/374] fix(pw): change query mode to check only --- lgsm/config-default/config-lgsm/pwserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/pwserver/_default.cfg b/lgsm/config-default/config-lgsm/pwserver/_default.cfg index e069ec1b1..62429fec8 100644 --- a/lgsm/config-default/config-lgsm/pwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pwserver/_default.cfg @@ -141,7 +141,7 @@ stopmode="2" # 3: gamedig # 4: gsquery # 5: tcp -querymode="3" +querymode="1" querytype="palworld" ## Console type From 1387ee0dfdf837a677eedba898831fc576e15f28 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 4 Apr 2024 10:53:56 +0100 Subject: [PATCH 368/374] fix(vh): update binary name (#4551) --- lgsm/config-default/config-lgsm/pwserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/pwserver/_default.cfg b/lgsm/config-default/config-lgsm/pwserver/_default.cfg index 62429fec8..5e848264e 100644 --- a/lgsm/config-default/config-lgsm/pwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pwserver/_default.cfg @@ -160,7 +160,7 @@ glibc="2.17" ## Game Server Directories systemdir="${serverfiles}/Pal" executabledir="${systemdir}/Binaries/Linux/" -executable="./PalServer-Linux-Test" +executable="./PalServer-Linux-Shipping" servercfgdir="${serverfiles}/Pal/Saved/Config/LinuxServer" servercfg="PalWorldSettings.ini" servercfgdefault="PalWorldSettings.ini" From f439fa213e391d687a62384ae8c7e3995463e070 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 4 Apr 2024 11:02:01 +0100 Subject: [PATCH 369/374] Release v24.2.0 --- lgsm/modules/core_modules.sh | 2 +- linuxgsm.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index 7ea0402e3..6fda8c2ca 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v24.1.5" +modulesversion="v24.2.0" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index c68f19dc2..23ca9f88f 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -24,7 +24,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v24.1.5" +version="v24.2.0" shortname="core" gameservername="core" commandname="CORE" From dc6cbcea5025ab8bd47a69fab1af76be7c26d68e Mon Sep 17 00:00:00 2001 From: MicLieg <38057464+MicLieg@users.noreply.github.com> Date: Sun, 5 May 2024 22:55:52 +0200 Subject: [PATCH 370/374] fix(mcserver): change required jdk to 21 (#4562) * fix(mcserver): change required jdk to 21 * update java on other distros --------- Co-authored-by: Daniel Gibbs --- lgsm/data/almalinux-8.csv | 8 ++++---- lgsm/data/almalinux-9.csv | 12 ++++++------ lgsm/data/centos-7.csv | 2 +- lgsm/data/centos-8.csv | 2 +- lgsm/data/centos-9.csv | 4 ++-- lgsm/data/rhel-8.csv | 12 ++++++------ lgsm/data/rhel-9.csv | 12 ++++++------ lgsm/data/rocky-8.csv | 12 ++++++------ lgsm/data/rocky-9.csv | 12 ++++++------ lgsm/data/ubuntu-20.04.csv | 10 +++++----- lgsm/data/ubuntu-22.04.csv | 12 ++++++------ lgsm/data/ubuntu-23.04.csv | 2 +- lgsm/data/ubuntu-23.10.csv | 2 +- 13 files changed, 51 insertions(+), 51 deletions(-) diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index e73fcfaa0..4d6c05ca5 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -65,7 +65,7 @@ kf kf2 l4d l4d2 -mc,java-17-openjdk +mc,java-21-openjdk mcb,libnsl mh mohaa,compat-libstdc++-33.i686 @@ -82,7 +82,7 @@ onset,mariadb-connector-c opfor pc pc2 -pmc,java-17-openjdk +pmc,java-21-openjdk ps,GConf2 pvkii pvr,libcxx @@ -128,11 +128,11 @@ ut3 ut99 vh,glibc-devel vints,aspnetcore-runtime-7.0 -vpmc,java-17-openjdk +vpmc,java-21-openjdk vs wet wf -wmc,java-17-openjdk +wmc,java-21-openjdk wurm,xorg-x11-server-Xvfb zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/almalinux-9.csv b/lgsm/data/almalinux-9.csv index f5b5b5fc5..2cdd36575 100644 --- a/lgsm/data/almalinux-9.csv +++ b/lgsm/data/almalinux-9.csv @@ -65,7 +65,7 @@ kf kf2 l4d l4d2 -mc,java-17-openjdk +mc,java-21-openjdk mcb,libnsl mh mohaa,compat-libstdc++-33.i686 @@ -82,12 +82,12 @@ onset,mariadb-connector-c opfor pc pc2 -pmc,java-17-openjdk +pmc,java-21-openjdk ps,GConf2 pvkii pvr,libcxx pw -pz,java-11-openjdk rng-tools +pz,java-21-openjdk rng-tools q2 q3 q4 @@ -97,7 +97,7 @@ ricochet ro rtcw rust,zlib-devel -rw,java-11-openjdk +rw,java-21-openjdk samp sb sbots @@ -128,11 +128,11 @@ ut3 ut99 vh,glibc-devel vints,aspnetcore-runtime-7.0 -vpmc,java-17-openjdk +vpmc,java-21-openjdk vs wet wf -wmc,java-17-openjdk +wmc,java-21-openjdk wurm,xorg-x11-server-Xvfb zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index a80043346..df7422526 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -65,7 +65,7 @@ kf kf2 l4d l4d2 -mc,java-11-openjdk +mc,java-21-openjdk mcb,libnsl mh mohaa,compat-libstdc++-33.i686 diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index e73fcfaa0..831bc38e9 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -65,7 +65,7 @@ kf kf2 l4d l4d2 -mc,java-17-openjdk +mc,java-21-openjdk mcb,libnsl mh mohaa,compat-libstdc++-33.i686 diff --git a/lgsm/data/centos-9.csv b/lgsm/data/centos-9.csv index f5b5b5fc5..4d49ee66e 100644 --- a/lgsm/data/centos-9.csv +++ b/lgsm/data/centos-9.csv @@ -87,7 +87,7 @@ ps,GConf2 pvkii pvr,libcxx pw -pz,java-11-openjdk rng-tools +pz,java-21-openjdk rng-tools q2 q3 q4 @@ -97,7 +97,7 @@ ricochet ro rtcw rust,zlib-devel -rw,java-11-openjdk +rw,java-21-openjdk samp sb sbots diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index e73fcfaa0..a378694b2 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -65,7 +65,7 @@ kf kf2 l4d l4d2 -mc,java-17-openjdk +mc,java-21-openjdk mcb,libnsl mh mohaa,compat-libstdc++-33.i686 @@ -82,12 +82,12 @@ onset,mariadb-connector-c opfor pc pc2 -pmc,java-17-openjdk +pmc,java-21-openjdk ps,GConf2 pvkii pvr,libcxx pw -pz,java-11-openjdk rng-tools +pz,java-21-openjdk rng-tools q2 q3 q4 @@ -97,7 +97,7 @@ ricochet ro rtcw rust,zlib-devel -rw,java-11-openjdk +rw,java-21-openjdk samp sb sbots @@ -128,11 +128,11 @@ ut3 ut99 vh,glibc-devel vints,aspnetcore-runtime-7.0 -vpmc,java-17-openjdk +vpmc,java-21-openjdk vs wet wf -wmc,java-17-openjdk +wmc,java-21-openjdk wurm,xorg-x11-server-Xvfb zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/rhel-9.csv b/lgsm/data/rhel-9.csv index f5b5b5fc5..2cdd36575 100644 --- a/lgsm/data/rhel-9.csv +++ b/lgsm/data/rhel-9.csv @@ -65,7 +65,7 @@ kf kf2 l4d l4d2 -mc,java-17-openjdk +mc,java-21-openjdk mcb,libnsl mh mohaa,compat-libstdc++-33.i686 @@ -82,12 +82,12 @@ onset,mariadb-connector-c opfor pc pc2 -pmc,java-17-openjdk +pmc,java-21-openjdk ps,GConf2 pvkii pvr,libcxx pw -pz,java-11-openjdk rng-tools +pz,java-21-openjdk rng-tools q2 q3 q4 @@ -97,7 +97,7 @@ ricochet ro rtcw rust,zlib-devel -rw,java-11-openjdk +rw,java-21-openjdk samp sb sbots @@ -128,11 +128,11 @@ ut3 ut99 vh,glibc-devel vints,aspnetcore-runtime-7.0 -vpmc,java-17-openjdk +vpmc,java-21-openjdk vs wet wf -wmc,java-17-openjdk +wmc,java-21-openjdk wurm,xorg-x11-server-Xvfb zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index e73fcfaa0..a378694b2 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -65,7 +65,7 @@ kf kf2 l4d l4d2 -mc,java-17-openjdk +mc,java-21-openjdk mcb,libnsl mh mohaa,compat-libstdc++-33.i686 @@ -82,12 +82,12 @@ onset,mariadb-connector-c opfor pc pc2 -pmc,java-17-openjdk +pmc,java-21-openjdk ps,GConf2 pvkii pvr,libcxx pw -pz,java-11-openjdk rng-tools +pz,java-21-openjdk rng-tools q2 q3 q4 @@ -97,7 +97,7 @@ ricochet ro rtcw rust,zlib-devel -rw,java-11-openjdk +rw,java-21-openjdk samp sb sbots @@ -128,11 +128,11 @@ ut3 ut99 vh,glibc-devel vints,aspnetcore-runtime-7.0 -vpmc,java-17-openjdk +vpmc,java-21-openjdk vs wet wf -wmc,java-17-openjdk +wmc,java-21-openjdk wurm,xorg-x11-server-Xvfb zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/rocky-9.csv b/lgsm/data/rocky-9.csv index f5b5b5fc5..2cdd36575 100644 --- a/lgsm/data/rocky-9.csv +++ b/lgsm/data/rocky-9.csv @@ -65,7 +65,7 @@ kf kf2 l4d l4d2 -mc,java-17-openjdk +mc,java-21-openjdk mcb,libnsl mh mohaa,compat-libstdc++-33.i686 @@ -82,12 +82,12 @@ onset,mariadb-connector-c opfor pc pc2 -pmc,java-17-openjdk +pmc,java-21-openjdk ps,GConf2 pvkii pvr,libcxx pw -pz,java-11-openjdk rng-tools +pz,java-21-openjdk rng-tools q2 q3 q4 @@ -97,7 +97,7 @@ ricochet ro rtcw rust,zlib-devel -rw,java-11-openjdk +rw,java-21-openjdk samp sb sbots @@ -128,11 +128,11 @@ ut3 ut99 vh,glibc-devel vints,aspnetcore-runtime-7.0 -vpmc,java-17-openjdk +vpmc,java-21-openjdk vs wet wf -wmc,java-17-openjdk +wmc,java-21-openjdk wurm,xorg-x11-server-Xvfb zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index 4a41435c2..8d4cc6e52 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -65,7 +65,7 @@ kf kf2 l4d l4d2 -mc,openjdk-17-jre +mc,openjdk-21-jre mcb mh mohaa,libstdc++5:i386 @@ -82,12 +82,12 @@ onset,libmariadb-dev opfor pc pc2 -pmc,openjdk-17-jre +pmc,openjdk-21-jre ps,libgconf-2-4 pvkii pvr,libc++1 pw -pz,openjdk-17-jre,rng-tools +pz,openjdk-21-jre,rng-tools q2 q3 q4 @@ -97,7 +97,7 @@ ricochet ro rtcw rust,lib32z1 -rw,openjdk-17-jre +rw,openjdk-21-jre samp sb sbots @@ -132,7 +132,7 @@ vpmc,openjdk-11-jre vs wet wf -wmc,openjdk-17-jre +wmc,openjdk-21-jre wurm,xvfb zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index 323b82a08..67d28b5e9 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -65,7 +65,7 @@ kf kf2 l4d l4d2 -mc,openjdk-17-jre +mc,openjdk-21-jre mcb mh mohaa,libstdc++5:i386 @@ -82,12 +82,12 @@ onset,libmariadb-dev opfor pc pc2 -pmc,openjdk-17-jre +pmc,openjdk-21-jre ps,libgconf-2-4 pvkii pvr,libc++1 pw -pz,openjdk-17-jre,rng-tools5 +pz,openjdk-21-jre,rng-tools5 q2 q3 q4 @@ -97,7 +97,7 @@ ricochet ro rtcw rust,lib32z1 -rw,openjdk-17-jre +rw,openjdk-21-jre samp sb sbots @@ -128,11 +128,11 @@ ut3 ut99 vh,libc6-dev vints,aspnetcore-runtime-7.0 -vpmc,openjdk-17-jre +vpmc,openjdk-21-jre vs wet wf -wmc,openjdk-17-jre +wmc,openjdk-21-jre wurm,xvfb zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-23.04.csv b/lgsm/data/ubuntu-23.04.csv index e249a2968..8b2246402 100644 --- a/lgsm/data/ubuntu-23.04.csv +++ b/lgsm/data/ubuntu-23.04.csv @@ -65,7 +65,7 @@ kf kf2 l4d l4d2 -mc,openjdk-17-jre +mc,openjdk-21-jre mcb mh mohaa,libstdc++5:i386 diff --git a/lgsm/data/ubuntu-23.10.csv b/lgsm/data/ubuntu-23.10.csv index e249a2968..8b2246402 100644 --- a/lgsm/data/ubuntu-23.10.csv +++ b/lgsm/data/ubuntu-23.10.csv @@ -65,7 +65,7 @@ kf kf2 l4d l4d2 -mc,openjdk-17-jre +mc,openjdk-21-jre mcb mh mohaa,libstdc++5:i386 From 1c596972ff77d5de40e0a60f6f8459547ebcbf6a Mon Sep 17 00:00:00 2001 From: BertBrenner <42405825+BertBrenner@users.noreply.github.com> Date: Sun, 5 May 2024 22:56:07 +0200 Subject: [PATCH 371/374] Update update_mc.sh (#4563) If the executable variable is modified, fn_update_dl does not update minecraft_server.jar and which is used in fn_update_localbuild. In addition this creates a problem if a alternative executable is used to launch minecraft by overwriting it. Co-authored-by: Daniel Gibbs --- lgsm/modules/update_mc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/modules/update_mc.sh b/lgsm/modules/update_mc.sh index 4a0bdde37..40038ddeb 100644 --- a/lgsm/modules/update_mc.sh +++ b/lgsm/modules/update_mc.sh @@ -10,7 +10,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_dl() { # Download and extract files to serverfiles. fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "chmodx" "norun" "noforce" "nohash" - cp -f "${tmpdir}/${remotebuildfilename}" "${serverfiles}/${executable#./}" + cp -f "${tmpdir}/${remotebuildfilename}" "${serverfiles}/minecraft_server.jar" fn_clear_tmp } From c89cc62bb65b4b041919df8fdfc571df6b5c330f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 5 May 2024 21:56:23 +0100 Subject: [PATCH 372/374] build(deps): bump actions/add-to-project from 1.0.0 to 1.0.1 (#4558) Bumps [actions/add-to-project](https://github.com/actions/add-to-project) from 1.0.0 to 1.0.1. - [Release notes](https://github.com/actions/add-to-project/releases) - [Commits](https://github.com/actions/add-to-project/compare/v1.0.0...v1.0.1) --- updated-dependencies: - dependency-name: actions/add-to-project dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/add-to-project.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/add-to-project.yml b/.github/workflows/add-to-project.yml index e6f6ee9be..fb092b649 100644 --- a/.github/workflows/add-to-project.yml +++ b/.github/workflows/add-to-project.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Add to Project - uses: actions/add-to-project@v1.0.0 + uses: actions/add-to-project@v1.0.1 with: project-url: https://github.com/orgs/GameServerManagers/projects/11 github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} From 3da072cae4a8e6a96b69c39ca6fbe6e992b48663 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 5 May 2024 21:57:16 +0100 Subject: [PATCH 373/374] Release v24.2.1 --- lgsm/modules/core_modules.sh | 2 +- linuxgsm.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index 6fda8c2ca..f083a4893 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v24.2.0" +modulesversion="v24.2.1" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index 23ca9f88f..8db9a57c9 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -24,7 +24,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v24.2.0" +version="v24.2.1" shortname="core" gameservername="core" commandname="CORE" From 0b8a2237232d1948ebb49216bd17fadf687247e9 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 5 May 2024 23:32:04 +0100 Subject: [PATCH 374/374] feat(deps): add Ubuntu 24.04 --- lgsm/data/ubuntu-23.04.csv | 10 +-- lgsm/data/ubuntu-23.10.csv | 10 +-- lgsm/data/ubuntu-24.04.csv | 138 +++++++++++++++++++++++++++++++++++++ 3 files changed, 148 insertions(+), 10 deletions(-) create mode 100644 lgsm/data/ubuntu-24.04.csv diff --git a/lgsm/data/ubuntu-23.04.csv b/lgsm/data/ubuntu-23.04.csv index 8b2246402..1b50ed7ef 100644 --- a/lgsm/data/ubuntu-23.04.csv +++ b/lgsm/data/ubuntu-23.04.csv @@ -82,12 +82,12 @@ onset,libmariadb-dev opfor pc pc2 -pmc,openjdk-17-jre +pmc,openjdk-21-jre ps,libgconf-2-4 pvkii pvr,libc++1 pw -pz,openjdk-17-jre,rng-tools5 +pz,openjdk-21-jre,rng-tools5 q2 q3 q4 @@ -97,7 +97,7 @@ ricochet ro rtcw rust,lib32z1 -rw,openjdk-17-jre +rw,openjdk-21-jre samp sb sbots @@ -128,11 +128,11 @@ ut3 ut99 vh,libc6-dev vints,aspnetcore-runtime-7.0 -vpmc,openjdk-17-jre +vpmc,openjdk-21-jre vs wet wf -wmc,openjdk-17-jre +wmc,openjdk-21-jre wurm,xvfb zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-23.10.csv b/lgsm/data/ubuntu-23.10.csv index 8b2246402..1b50ed7ef 100644 --- a/lgsm/data/ubuntu-23.10.csv +++ b/lgsm/data/ubuntu-23.10.csv @@ -82,12 +82,12 @@ onset,libmariadb-dev opfor pc pc2 -pmc,openjdk-17-jre +pmc,openjdk-21-jre ps,libgconf-2-4 pvkii pvr,libc++1 pw -pz,openjdk-17-jre,rng-tools5 +pz,openjdk-21-jre,rng-tools5 q2 q3 q4 @@ -97,7 +97,7 @@ ricochet ro rtcw rust,lib32z1 -rw,openjdk-17-jre +rw,openjdk-21-jre samp sb sbots @@ -128,11 +128,11 @@ ut3 ut99 vh,libc6-dev vints,aspnetcore-runtime-7.0 -vpmc,openjdk-17-jre +vpmc,openjdk-21-jre vs wet wf -wmc,openjdk-17-jre +wmc,openjdk-21-jre wurm,xvfb zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-24.04.csv b/lgsm/data/ubuntu-24.04.csv new file mode 100644 index 000000000..1b50ed7ef --- /dev/null +++ b/lgsm/data/ubuntu-24.04.csv @@ -0,0 +1,138 @@ +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat-openbsd,pigz,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils +steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd +ac +ahl +ahl2 +ark +arma3 +armar,libcurl4 +ats +av +bb +bb2,libcurl4-gnutls-dev:i386 +bd +bf1942,libncurses5:i386,libtinfo5:i386 +bfv,libncurses5:i386,libstdc++5:i386 +bmdm,libncurses5:i386 +bo +bs +bt,libicu-dev,dos2unix,libxml2-utils +btl +cc +ck,xvfb,libxi6 +cmw +cod,libstdc++5:i386 +cod2,libstdc++5:i386 +cod4 +coduo,libstdc++5:i386 +codwaw +col +cs +cs2 +cscz +csgo +css,libtinfo5:i386 +ct +dab +dayz +dmc +dod +dodr +dods +doi +dst,libcurl4-gnutls-dev:i386 +dys +eco,libgdiplus +em +etl +ets2 +fctr +fof +gmod,libtinfo5:i386 +hcu +hl2dm +hldm +hldms +hw,lib32z1 +hz +ins +inss +ios +jc2 +jc3 +jk2 +kf +kf2 +l4d +l4d2 +mc,openjdk-21-jre +mcb +mh +mohaa,libstdc++5:i386 +mom +mta,libncursesw5,libxml2-utils +nd +nec +nmrih,libtinfo5:i386 +ns +ns2,speex,libtbb2 +ns2c,speex:i386,libtbb2 +ohd +onset,libmariadb-dev +opfor +pc +pc2 +pmc,openjdk-21-jre +ps,libgconf-2-4 +pvkii +pvr,libc++1 +pw +pz,openjdk-21-jre,rng-tools5 +q2 +q3 +q4 +ql +qw +ricochet +ro +rtcw +rust,lib32z1 +rw,openjdk-21-jre +samp +sb +sbots +scpsl,mono-complete +scpslsm,mono-complete +sdtd,telnet,expect,libxml2-utils +sf +sfc,libtinfo5:i386 +sof2 +sol +squad +st,libxml2-utils +stn +sven,libssl1.1:i386,zlib1g:i386 +terraria +tf +tf2,libcurl4-gnutls-dev:i386 +tfc +ti +ts +ts3 +tu +tw +unt +ut +ut2k4 +ut3 +ut99 +vh,libc6-dev +vints,aspnetcore-runtime-7.0 +vpmc,openjdk-21-jre +vs +wet +wf +wmc,openjdk-21-jre +wurm,xvfb +zmr,libtinfo5:i386 +zps,libtinfo5:i386