diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 2b339d122..e9f2d000b 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -30,17 +30,13 @@ body: label: Linux distro multiple: true options: + - Ubuntu 24.04 - Ubuntu 22.04 - Ubuntu 20.04 - - Ubuntu 18.04 - - Ubuntu 16.04 - Debian 12 - Debian 11 - - Debian 10 - - Debian 9 - RedHat 9 - RedHat 8 - - RedHat 7 - Other validations: required: true diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 45aced3d1..f1a8ccaf6 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -30,17 +30,13 @@ body: label: Linux distro multiple: true options: + - Ubuntu 24.04 - Ubuntu 22.04 - Ubuntu 20.04 - - Ubuntu 18.04 - - Ubuntu 16.04 - Debian 12 - Debian 11 - - Debian 10 - - Debian 9 - RedHat 9 - RedHat 8 - - RedHat 7 - Other validations: required: false diff --git a/.github/workflows/add-to-project.yml b/.github/workflows/add-to-project.yml index 0ddccb572..e0b06990f 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@v1.0.2 with: project-url: https://github.com/orgs/GameServerManagers/projects/11 github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} 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 d940cfbc8..f52d12c5a 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 }} @@ -19,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 @@ -66,6 +68,10 @@ jobs: else curl -f -o config "https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/main/${{ matrix.shortname }}/${{ steps.sets-servercfgname.outputs.servercfgname }}" fi + + - name: Pre-load LinuxGSM + run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server details + - name: Display config run: | if [ "${{ steps.sets-servercfgname.outputs.servercfgname }}" == "" ]; then @@ -81,7 +87,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/.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 }} 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 diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index ce00b840b..8a08284a4 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -1,11 +1,13 @@ name: Lock Threads on: + workflow_dispatch: schedule: - cron: "0 0 * * 1" permissions: issues: write pull-requests: write + discussions: write jobs: lock: diff --git a/.github/workflows/serverlist-validate-game-icons.sh b/.github/workflows/serverlist-validate-game-icons.sh index ca41892c9..2fdb0ff8f 100755 --- a/.github/workflows/serverlist-validate-game-icons.sh +++ b/.github/workflows/serverlist-validate-game-icons.sh @@ -1,6 +1,6 @@ #!/bin/bash -cd "lgsm/data" || exit +cd "${datadir}" || exit echo "" echo "Checking that all the game servers listed in serverlist.csv have a shortname-icon.png file" diff --git a/.github/workflows/serverlist-validate.sh b/.github/workflows/serverlist-validate.sh index 0c7634018..7d931372d 100755 --- a/.github/workflows/serverlist-validate.sh +++ b/.github/workflows/serverlist-validate.sh @@ -2,7 +2,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 +cd "${datadir}" || exit serverlistcount="$(tail -n +2 serverlist.csv | wc -l)" echo "serverlistcount: $serverlistcount" # get list of all csv files starting with ubunutu debian centos @@ -19,7 +19,7 @@ for csv in $csvlist; do fi done -# Compare all game servers listed in serverlist.csv to $shortname-icon.png files in lgsm/data/gameicons +# Compare all game servers listed in serverlist.csv to $shortname-icon.png files in ${datadir}/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 diff --git a/.github/workflows/update-check.yml b/.github/workflows/update-check.yml index b93fb2c47..2f2f7babc 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 }} @@ -11,12 +13,12 @@ concurrency: jobs: update-check: if: github.repository_owner == 'GameServerManagers' - continue-on-error: true runs-on: ubuntu-latest strategy: + fail-fast: false matrix: - shortname: [css, fctr, jk2, mc, mcb, mta, pmc, ts3, ut99, vints] + shortname: [css, fctr, jk2, mc, mcb, mta, pmc, ts3, ut99, vints, xnt] steps: - name: Download linuxgsm.sh diff --git a/LICENSE.md b/LICENSE.md index 344a8fb48..c8ab9fa34 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ # The MIT License (MIT) -Copyright (c) 2012-2024 Daniel Gibbs +Copyright (c) 2012-2025 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/README.md b/README.md index db89b8548..4075a4e3d 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ GitHub Workflow Status Discord SteamCMD - MIT License + MIT License

[LinuxGSM](https://linuxgsm.com) is the command-line tool for quick, simple deployment and management of Linux dedicated game servers. 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..2e8aed8f1 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 @@ -121,8 +123,8 @@ stopmode="3" # 3: gamedig # 4: gsquery # 5: tcp -querymode="1" -querytype="" +querymode="3" +querytype="protocol-gamespy2" ## Console type consoleverbose="yes" 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..dca9194f4 100644 --- a/lgsm/config-default/config-lgsm/cs2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cs2server/_default.cfg @@ -15,6 +15,11 @@ port="27015" maxplayers="16" wsapikey="" +## 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 -ip ${ip} -port ${port} -maxplayers ${maxplayers} -authkey ${wsapikey} +exec ${selfname}.cfg" @@ -77,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/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 0d5bf5e3e..f09d23c23 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" @@ -89,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 @@ -122,7 +128,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="" 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 470b43d06..0c18318e9 100644 --- a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg @@ -8,8 +8,11 @@ #### Game Server Settings #### +## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters +usertoken="" + ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-nogui" +startparameters="-nogui -userToken=${usertoken}" #### LinuxGSM Settings #### @@ -70,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 @@ -131,8 +136,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/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..7ce4dd073 100644 --- a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg @@ -9,6 +9,8 @@ #### Game Server Settings #### ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters +# Note that for HL2DM, maxplayers > 33 must be specified like so: +# maxplayers="101 -unrestricted_maxplayers" ip="0.0.0.0" port="27015" clientport="27005" @@ -78,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/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 ea18f00cf..7fe1a4969 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 #### @@ -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/hzserver/_default.cfg b/lgsm/config-default/config-lgsm/hzserver/_default.cfg new file mode 100644 index 000000000..98b6dda1e --- /dev/null +++ b/lgsm/config-default/config-lgsm/hzserver/_default.cfg @@ -0,0 +1,183 @@ +################################## +######## 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" + +## 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}" +servercfg="GameServerSettings.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/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 caa40d93a..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 @@ -132,7 +134,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/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..222ba9979 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 @@ -144,7 +146,7 @@ stopmode="2" # 4: gsquery # 5: tcp querymode="2" -querytype="protocol-unreal2" +querytype="protocol-valve" ## Console type consoleverbose="yes" 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 586575d10..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 @@ -125,7 +127,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/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/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 b3990ca7a..5e848264e 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}'" +## Game Server Docs | https://tech.palworldgame.com/settings-and-operation/arguments +startparameters="-publiclobby -useperfthreads -NoAsyncLoadingThread -UseMultithreadForDS -servername='${servername}' -port='${port}' -queryport='${steamport}'" #### LinuxGSM Settings #### @@ -77,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 @@ -139,7 +142,7 @@ stopmode="2" # 4: gsquery # 5: tcp querymode="1" -querytype="1" +querytype="palworld" ## Console type consoleverbose="yes" @@ -157,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" 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..0af49a0d4 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 @@ -140,7 +142,7 @@ stopmode="2" # 4: gsquery # 5: tcp querymode="2" -querytype="protocol-unreal2" +querytype="protocol-valve" ## Console type consoleverbose="yes" 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 510b9a689..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 @@ -123,7 +125,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/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 61cd85a8a..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 @@ -134,7 +136,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/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..d6ce41d82 100644 --- a/lgsm/config-default/config-lgsm/sfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sfserver/_default.cfg @@ -16,7 +16,7 @@ port="7777" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters ## Game Server Docs | https://satisfactory.fandom.com/wiki/Dedicated_servers -startparameters="FactoryGame -MultiHome=${ip} -Port=${port} -ServerQueryPort=${queryport} -BeaconPort=${beaconport} -log" +startparameters="FactoryGame -Port=${port} -ServerQueryPort=${queryport} -BeaconPort=${beaconport} -log" #### LinuxGSM Settings #### @@ -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 @@ -157,7 +159,7 @@ glibc="2.17" ## Game Server Directories systemdir="${serverfiles}/FactoryGame" executabledir="${serverfiles}/Engine/Binaries/Linux" -executable="./UnrealServer-Linux-Shipping" +executable="./FactoryServer-Linux-Shipping" servercfgdir="${systemdir}/Saved/Config/LinuxServer" servercfg="GameUserSettings.ini" servercfgdefault="GameUserSettings.ini" diff --git a/lgsm/config-default/config-lgsm/smserver/_default.cfg b/lgsm/config-default/config-lgsm/smserver/_default.cfg new file mode 100644 index 000000000..306179b9c --- /dev/null +++ b/lgsm/config-default/config-lgsm/smserver/_default.cfg @@ -0,0 +1,189 @@ +################################## +######## 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" +serverpassword="" +adminpassword="" +port="8777" +queryport="27015" +telnetport="18888" +maxplayers="50" +backupinterval="15" # Backup interval in minutes. +defaultmap="Level01_Main" + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="WS ${defaultmap} -MultiHome=${ip} -Port=${port} -EchoPort=${telnetport} -QueryPort=${queryport} -SteamServerName='${servername}' -PSW='${serverpassword}' -adminpsw='${adminpassword}' -MaxPlayers=${maxplayers} -initbackup -backupinterval=${backupinterval} -UTF8Output -forcepassthrough -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" + +# 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 all". +telegramapi="api.telegram.org" +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" +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="3017300" +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 +# 12: shutdown +# 13: soulmask +stopmode="13" + +## 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="Soulmask" +engine="unreal4" +glibc="2.17" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}/WS" +executabledir="${systemdir}/Binaries/Linux" +executable="./WSServer-Linux-Shipping" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" +gamelogdir="${systemdir}/WS/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/config-default/config-lgsm/sof2server/_default.cfg b/lgsm/config-default/config-lgsm/sof2server/_default.cfg index 59fb8373b..140773daf 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 @@ -140,7 +142,7 @@ glibc="2.1" # Edit with care ## Game Server Directories -systemdir="${serverfiles}/main" +systemdir="${serverfiles}/base" executabledir="${serverfiles}" executable="./sof2ded" servercfgdir="${systemdir}" 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/psserver/_default.cfg b/lgsm/config-default/config-lgsm/squad44server/_default.cfg similarity index 98% rename from lgsm/config-default/config-lgsm/psserver/_default.cfg rename to lgsm/config-default/config-lgsm/squad44server/_default.cfg index e41dee19c..80d991f94 100644 --- a/lgsm/config-default/config-lgsm/psserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/squad44server/_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/squadserver/_default.cfg b/lgsm/config-default/config-lgsm/squadserver/_default.cfg index 09c0e94b1..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 @@ -136,8 +138,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/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..e32bb2303 100644 --- a/lgsm/config-default/config-lgsm/stserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/stserver/_default.cfg @@ -9,11 +9,11 @@ #### Game Server Settings #### ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters -worldname="moon_save" +worldsave="moon_save" worldtype="Moon" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-LOADLATEST ${worldname} ${worldtype}" +startparameters="-LOAD ${worldsave} ${worldtype}" #### LinuxGSM Settings #### @@ -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..74fd359ab 100644 --- a/lgsm/config-default/config-lgsm/tf2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/tf2server/_default.cfg @@ -9,6 +9,8 @@ #### Game Server Settings #### ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters +# Note that for TF2, maxplayers > 33 must be specified like so: +# maxplayers="101 -unrestricted_maxplayers" ip="0.0.0.0" port="27015" clientport="27005" @@ -83,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/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..53fde059d 100644 --- a/lgsm/config-default/config-lgsm/tfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tfserver/_default.cfg @@ -25,7 +25,7 @@ greenhand="true" maxplayers="40" maxqueuesize="50" queuevalidtime="120" -saveinterval="300" +saveinterval="300" # Auto-save in seconds. serveradmins="" # Use 17-digit Steam IDs separated by commas to grant admin privileges to players. servername="LinuxGSM" serverpassword="" @@ -33,7 +33,7 @@ servertags="LinuxGSM" steamsocket="0" # Use Steam Socket. 0 = off; 1 = on. Use Steam Servers for network penetration. Enable this if you don't have a public IP but you want to allow players from outside your network to join your server. If disabled, only you and other players on your LAN can join. If you have a public IP, you do not need to enable this. ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="ProjectWar_Start?DedicatedServer?MaxPlayers=${maxplayers} -server -game -log -MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -BeaconPort=${beaconport} -ShutDownServicePort=${shutdownport} -ConfigServerName='${selfname}' -OutIPAddress=${publicip} -ServerTags='${servertags}' -UseSteamSocket=${steamsocket} -UserDir='${serverfiles}/${selfname}' -ServerName='${servername}' -EnableParallelCharacterMovementTickFunction -EnableParallelCharacterTickFunction -UseDynamicPhysicsScene -Game.PhysicsVehicle=false -ansimalloc -Game.MaxFrameRate=35 -MaxQueueSize=${maxqueuesize} -QueueValidTime=${queuevalidtime} -QueueThreshold=${maxplayers} -ServerFightModeType=${gamemode} -IsCanSelfDamage=${damageself} -IsCanFriendDamage=${damageallies} -SaveWorldInterval=${saveinterval} -GMOverlapRatio=2 -GreenHand=${greenhand} -SensitiveWords=${allowsensitivewords} -UseACE=${anticheat} -ServerAdminAccounts='${serveradmins}' -IsShowGmTitle=${adminlabel} -ServerPassword='${serverpassword}'" +startparameters="ProjectWar_Start?DedicatedServer?MaxPlayers=${maxplayers} -server -game -log -MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -BeaconPort=${beaconport} -ShutDownServicePort=${shutdownport} -ConfigServerName='${selfname}' -OutIPAddress=${publicip} -ServerTags='${servertags}' -UseSteamSocket=${steamsocket} -UserDir='${serverfiles}/${selfname}' -ServerName='${servername}' -EnableParallelCharacterMovementTickFunction -EnableParallelCharacterTickFunction -UseDynamicPhysicsScene -Game.PhysicsVehicle=false -ansimalloc -Game.MaxFrameRate=35 -MaxQueueSize=${maxqueuesize} -QueueValidTime=${queuevalidtime} -QueueThreshold=${maxplayers} -ServerFightModeType=${gamemode} -IsCanSelfDamage=${damageself} -IsCanFriendDamage=${damageallies} -SaveWorldInterval=${saveinterval} -GMOverlapRatio=2 -GreenHand=${greenhand} -SensitiveWords=${allowsensitivewords} -UseEAC=${anticheat} -ServerAdminAccounts='${serveradmins}' -IsShowGmTitle=${adminlabel} -ServerPassword='${serverpassword}'" #### LinuxGSM Settings #### @@ -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 3141983c9..4090d85c9 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 @@ -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..bacda7aaa 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 @@ -131,7 +133,7 @@ consoleinteract="no" ## Game Server Details # Do not edit gamename="TeamSpeak 3" -servername="TeamSpeak 3 Server" +servername="LinuxGSM" engine="null" glibc="2.17" 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..22817e40c 100644 --- a/lgsm/config-default/config-lgsm/ut3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut3server/_default.cfg @@ -22,8 +22,8 @@ usesstats="false" shouldadvertise="true" pureserver="1" allowjoininprogress="true" -# Required: GameSpy Username and password -# https://docs.linuxgsm.com/game-servers/unreal-tournament-3#server-gamespy-login +# Required: OpenSpy Username and password +# https://docs.linuxgsm.com/game-servers/unreal-tournament-3#server-openspy-login gsusername="" gspassword="" @@ -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..b027d0fca 100644 --- a/lgsm/config-default/config-lgsm/vhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vhserver/_default.cfg @@ -10,20 +10,17 @@ ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters servername="LinuxGSM" -# Minimum password length is 5. -serverpassword="" +serverpassword="" # Minimum password length is 5. port="2456" worldname="${selfname}" public="1" savedir="$HOME/.config/unity3d/IronGate/Valheim" logFile="" -saveinterval="1800" +saveinterval="1800" # Auto-save in seconds. 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 (empty) -crossplay="" +instanceid="1" # 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 @@ -53,7 +50,7 @@ crossplay="" 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}' -saveinterval ${saveinterval} -backups ${backups} -backupshort ${backupshort} -backuplong ${backuplong}${logFile:+ -logFile '${logFile}'}${crossplay:+ -crossplay}${worldmodifiers:+ ${worldmodifiers}}" +startparameters="-name '${servername}' -password ${serverpassword} -port ${port} -world ${worldname} -public ${public} -savedir '${savedir}' -saveinterval ${saveinterval} -backups ${backups} -backupshort ${backupshort} -backuplong ${backuplong} -crossplay -instanceid ${instanceid} ${logFile:+ -logFile '${logFile}'} ${worldmodifiers:+ ${worldmodifiers}}" #### LinuxGSM Settings #### @@ -114,11 +111,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..d59790ca5 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 @@ -154,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" 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/xntserver/_default.cfg b/lgsm/config-default/config-lgsm/xntserver/_default.cfg new file mode 100644 index 000000000..402e6188f --- /dev/null +++ b/lgsm/config-default/config-lgsm/xntserver/_default.cfg @@ -0,0 +1,171 @@ +################################## +######## 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 + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="-userdir ${systemdir}/${selfname}" + +#### 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 all". +telegramapi="api.telegram.org" +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" +curlcustomstring="" + +## 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="3" +querytype="xonotic" + +## Console type +consoleverbose="yes" +consoleinteract="yes" + +## Game Server Details +# Do not edit +gamename="Xonotic" +engine="unreal3" +glibc="2.29" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}" +executabledir="${systemdir}" +executable="./xonotic-linux64-dedicated" +servercfgdir="${systemdir}/${selfname}/data" +servercfg="server.cfg" +servercfgdefault="${systemdir}/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" +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/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/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index 53021ec30..08d91f8fc 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 @@ -54,6 +54,7 @@ hl2dm hldm hldms hw,zlib-devel +hz ins inss ios @@ -64,11 +65,10 @@ kf kf2 l4d l4d2 -mc,java-17-openjdk +mc,java-21-openjdk mcb,libnsl mh mohaa,compat-libstdc++-33.i686 -mom mta,ncurses-compat-libs,libxml2 nd nec @@ -81,7 +81,7 @@ onset,mariadb-connector-c opfor pc pc2 -pmc,java-17-openjdk +pmc,java-21-openjdk ps,GConf2 pvkii pvr,libcxx @@ -105,6 +105,7 @@ scpslsm sdtd,telnet,expect,libxml2 sf sfc,ncurses-libs.i686 +sm,telnet,expect sof2 sol squad @@ -125,13 +126,14 @@ ut ut2k4 ut3 ut99 -vh,glibc-devel -vints,aspnetcore-runtime-7.0 -vpmc,java-17-openjdk +vh,glibc-devel,libatomic,pulseaudio-libs-devel +vints,dotnet-runtime-7.0 +vpmc,java-21-openjdk vs wet wf -wmc,java-17-openjdk +wmc,java-21-openjdk wurm,xorg-x11-server-Xvfb +xnt zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/almalinux-9.csv b/lgsm/data/almalinux-9.csv index 8f643487c..a16722c2f 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 @@ -54,6 +54,7 @@ hl2dm hldm hldms hw,zlib-devel +hz ins inss ios @@ -64,11 +65,10 @@ kf kf2 l4d l4d2 -mc,java-17-openjdk +mc,java-21-openjdk mcb,libnsl mh mohaa,compat-libstdc++-33.i686 -mom mta,ncurses-compat-libs,libxml2 nd nec @@ -81,12 +81,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 @@ -96,7 +96,7 @@ ricochet ro rtcw rust,zlib-devel -rw,java-11-openjdk +rw,java-21-openjdk samp sb sbots @@ -105,6 +105,7 @@ scpslsm sdtd,telnet,expect,libxml2 sf sfc,ncurses-libs.i686 +sm,telnet,expect sof2 sol squad @@ -125,13 +126,14 @@ ut ut2k4 ut3 ut99 -vh,glibc-devel -vints,aspnetcore-runtime-7.0 -vpmc,java-17-openjdk +vh,glibc-devel,libatomic,pulseaudio-libs-devel +vints,dotnet-runtime-7.0 +vpmc,java-21-openjdk vs wet wf -wmc,java-17-openjdk +wmc,java-21-openjdk wurm,xorg-x11-server-Xvfb +xnt zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index 5315d8de0..7b467fa00 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 @@ -54,6 +54,7 @@ hl2dm hldm hldms hw,zlib-devel +hz ins inss ios @@ -64,11 +65,10 @@ kf kf2 l4d l4d2 -mc,java-11-openjdk +mc,java-21-openjdk mcb,libnsl mh mohaa,compat-libstdc++-33.i686 -mom mta,ncurses-libs,libxml2 nd nec @@ -105,6 +105,7 @@ scpslsm sdtd,telnet,expect,libxml2 sf sfc,ncurses-libs.i686 +sm,telnet,expect sof2 sol squad @@ -125,13 +126,14 @@ ut ut2k4 ut3 ut99 -vh,glibc-devel -vints,aspnetcore-runtime-7.0 +vh,glibc-devel,libatomic,pulseaudio-libs-devel +vints,dotnet-runtime-7.0 vpmc,java-11-openjdk vs wet wf wmc,java-11-openjdk wurm,xorg-x11-server-Xvfb +xnt zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index 53021ec30..4b9fd2133 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 @@ -54,6 +54,7 @@ hl2dm hldm hldms hw,zlib-devel +hz ins inss ios @@ -64,11 +65,10 @@ kf kf2 l4d l4d2 -mc,java-17-openjdk +mc,java-21-openjdk mcb,libnsl mh mohaa,compat-libstdc++-33.i686 -mom mta,ncurses-compat-libs,libxml2 nd nec @@ -105,6 +105,7 @@ scpslsm sdtd,telnet,expect,libxml2 sf sfc,ncurses-libs.i686 +sm,telnet,expect sof2 sol squad @@ -125,13 +126,14 @@ ut ut2k4 ut3 ut99 -vh,glibc-devel -vints,aspnetcore-runtime-7.0 +vh,glibc-devel,libatomic,pulseaudio-libs-devel +vints,dotnet-runtime-7.0 vpmc,java-17-openjdk vs wet wf wmc,java-17-openjdk wurm,xorg-x11-server-Xvfb +xnt zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/centos-9.csv b/lgsm/data/centos-9.csv index 8f643487c..c6ff3a272 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 @@ -54,6 +54,7 @@ hl2dm hldm hldms hw,zlib-devel +hz ins inss ios @@ -68,7 +69,6 @@ mc,java-17-openjdk mcb,libnsl mh mohaa,compat-libstdc++-33.i686 -mom mta,ncurses-compat-libs,libxml2 nd nec @@ -86,7 +86,7 @@ ps,GConf2 pvkii pvr,libcxx pw -pz,java-11-openjdk rng-tools +pz,java-21-openjdk rng-tools q2 q3 q4 @@ -96,7 +96,7 @@ ricochet ro rtcw rust,zlib-devel -rw,java-11-openjdk +rw,java-21-openjdk samp sb sbots @@ -105,6 +105,7 @@ scpslsm sdtd,telnet,expect,libxml2 sf sfc,ncurses-libs.i686 +sm,telnet,expect sof2 sol squad @@ -125,13 +126,14 @@ ut ut2k4 ut3 ut99 -vh,glibc-devel -vints,aspnetcore-runtime-7.0 +vh,glibc-devel,libatomic,pulseaudio-libs-devel +vints,dotnet-runtime-7.0 vpmc,java-17-openjdk vs wet wf wmc,java-17-openjdk wurm,xorg-x11-server-Xvfb +xnt zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index a2d1ee665..74d82e158 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 @@ -53,6 +53,7 @@ hl2dm hldm hldms hw,lib32z1 +hz ins inss ios @@ -67,7 +68,6 @@ mc,openjdk-11-jre mcb mh mohaa,libstdc++5:i386 -mom mta,libncursesw5,libxml2-utils nd nec @@ -81,7 +81,7 @@ opfor pc pc2 pmc,openjdk-11-jre -ps,libgconf-2-4 +squad44 pvkii pvr,libc++1 pw @@ -104,6 +104,7 @@ scpslsm,mono-complete sdtd,telnet,expect,libxml2-utils sf sfc,libtinfo5:i386 +sm,telnet,expect sof2 sol squad @@ -125,13 +126,14 @@ ut ut2k4 ut3 ut99 -vh,libc6-dev -vints,aspnetcore-runtime-7.0 +vh,libc6-dev,libatomic1,libpulse-dev +vints,dotnet-runtime-7.0 vpmc,openjdk-11-jre vs wet wf wmc,openjdk-11-jre wurm,xvfb +xnt zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index bdf03879e..33b7deaf9 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 @@ -54,6 +54,7 @@ hl2dm hldm hldms hw,lib32z1 +hz ins inss ios @@ -68,7 +69,6 @@ mc,openjdk-17-jre mcb mh mohaa,libstdc++5:i386 -mom mta,libncursesw5,libxml2-utils nd nec @@ -82,7 +82,7 @@ opfor pc pc2 pmc,openjdk-17-jre -ps,libgconf-2-4 +squad44 pvkii pvr,libc++1 pw @@ -105,6 +105,7 @@ scpslsm,mono-complete sdtd,telnet,expect,libxml2-utils sf sfc,libtinfo5:i386 +sm,telnet,expect sof2 sol squad @@ -125,13 +126,14 @@ ut ut2k4 ut3 ut99 -vh,libc6-dev -vints,aspnetcore-runtime-7.0 +vh,libc6-dev,libatomic1,libpulse-dev +vints,dotnet-runtime-7.0 vpmc,openjdk-11-jre vs wet wf wmc,openjdk-17-jre wurm,xvfb +xnt zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/debian-12.csv b/lgsm/data/debian-12.csv index cc884a6f8..06fd9e52c 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 @@ -54,6 +54,7 @@ hl2dm hldm hldms hw,lib32z1 +hz ins inss ios @@ -68,7 +69,6 @@ mc,openjdk-17-jre mcb mh mohaa,libstdc++5:i386 -mom mta,libncursesw5,libxml2-utils nd nec @@ -82,7 +82,7 @@ opfor pc pc2 pmc,openjdk-17-jre -ps,libgconf-2-4 +squad44 pvkii pvr,libc++1 pw @@ -105,6 +105,7 @@ scpslsm,mono-complete sdtd,telnet,expect,libxml2-utils sf sfc,libtinfo5:i386 +sm,telnet,expect sof2 sol squad @@ -125,13 +126,14 @@ ut ut2k4 ut3 ut99 -vh,libc6-dev -vints,aspnetcore-runtime-7.0 +vh,libc6-dev,libatomic1,libpulse-dev +vints,dotnet-runtime-7.0 vpmc,openjdk-17-jre vs wet wf wmc,openjdk-17-jre wurm,xvfb +xnt zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/debian-13.csv b/lgsm/data/debian-13.csv new file mode 100644 index 000000000..7d775040e --- /dev/null +++ b/lgsm/data/debian-13.csv @@ -0,0 +1,139 @@ +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-22-jre +mcb +mh +mohaa,libstdc++5:i386 +mta,libncursesw5,libxml2-utils +nd +nec +nmrih,libtinfo5:i386 +ns +ns2,speex,libtbb12 +ns2c,speex:i386,libtbb12 +ohd +onset,libmariadb-dev +opfor +pc +pc2 +pmc,openjdk-22-jre +squad44 +pvkii +pvr,libc++1 +pw +pz,openjdk-22-jre,rng-tools5 +q2 +q3 +q4 +ql +qw +ricochet +ro +rtcw +rust,lib32z1 +rw,openjdk-22-jre +samp +sb +sbots +scpsl,mono-complete +scpslsm,mono-complete +sdtd,telnet,expect,libxml2-utils +sf +sfc,libtinfo5:i386 +sm,telnet,expect +sof2 +sol +squad +st,libxml2-utils +stn +sven,libssl3:i386,zlib1g:i386 +terraria +tf +tf2,libcurl4-gnutls-dev:i386 +tfc +ti +ts +ts3 +tu +tw +unt +ut +ut2k4 +ut3 +ut99 +vh,libc6-dev,libatomic1,libpulse-dev +vints,dotnet-runtime-7.0 +vpmc,openjdk-21-jre +vs +wet +wf +wmc,openjdk21-jre +wurm,xvfb +xnt +zmr,libtinfo5:i386 +zps,libtinfo5:i386 diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index ccefafcc2..02acceacd 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 @@ -54,6 +54,7 @@ hl2dm hldm hldms hw,lib32z1 +hz ins inss ios @@ -68,7 +69,6 @@ mc,openjdk-8-jre mcb mh mohaa,libstdc++5:i386 -mom mta,libncursesw5,libxml2-utils nd nec @@ -82,7 +82,7 @@ opfor pc pc2 pmc,openjdk-8-jre -ps,libgconf-2-4 +squad44 pvkii pvr,libc++1 pw @@ -105,6 +105,7 @@ scpslsm,mono-complete sdtd,telnet,expect,libxml2-utils sf sfc,libtinfo5:i386 +sm,telnet,expect sof2 sol squad @@ -125,13 +126,14 @@ ut ut2k4 ut3 ut99 -vh,libc6-dev -vints,aspnetcore-runtime-7.0 +vh,libc6-dev,libatomic1,libpulse-dev +vints,dotnet-runtime-7.0 vpmc,openjdk-8-jre vs wet wf wmc,openjdk-8-jre wurm,xvfb +xnt zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/gameicons/hz-icon.png b/lgsm/data/gameicons/hz-icon.png new file mode 100644 index 000000000..7d2428669 Binary files /dev/null and b/lgsm/data/gameicons/hz-icon.png differ diff --git a/lgsm/data/gameicons/mom-icon.png b/lgsm/data/gameicons/mom-icon.png deleted file mode 100644 index 317b6010a..000000000 Binary files a/lgsm/data/gameicons/mom-icon.png and /dev/null differ diff --git a/lgsm/data/gameicons/sm-icon.png b/lgsm/data/gameicons/sm-icon.png new file mode 100644 index 000000000..7948e002d Binary files /dev/null and b/lgsm/data/gameicons/sm-icon.png differ diff --git a/lgsm/data/gameicons/xnt-icon.png b/lgsm/data/gameicons/xnt-icon.png new file mode 100644 index 000000000..f230eb407 Binary files /dev/null and b/lgsm/data/gameicons/xnt-icon.png differ diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index 14cc292ac..90c9df07e 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 @@ -55,6 +55,7 @@ hl2dm hldm hldms hw,zlib-devel +hz ins inss ios @@ -69,7 +70,6 @@ mc,java-11-openjdk mcb,libnsl mh mohaa,compat-libstdc++-33.i686 -mom mta,ncurses-libs,libxml2 nd nec @@ -105,6 +105,7 @@ scpslsm sdtd,telnet,expect,libxml2 sf sfc,ncurses-libs.i686 +sm,telnet,expect sof2 sol squad @@ -125,13 +126,14 @@ ut ut2k4 ut3 ut99 -vh,glibc-devel -vints,aspnetcore-runtime-7.0 +vh,glibc-devel,libatomic,pulseaudio-libs-devel +vints,dotnet-runtime-7.0 vpmc,java-11-openjdk vs wet wf wmc,java-11-openjdk wurm,xorg-x11-server-Xvfb +xnt zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index 53021ec30..0298bd0b0 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 @@ -54,6 +54,7 @@ hl2dm hldm hldms hw,zlib-devel +hz ins inss ios @@ -64,11 +65,10 @@ kf kf2 l4d l4d2 -mc,java-17-openjdk +mc,java-21-openjdk mcb,libnsl mh mohaa,compat-libstdc++-33.i686 -mom mta,ncurses-compat-libs,libxml2 nd nec @@ -81,12 +81,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 @@ -96,7 +96,7 @@ ricochet ro rtcw rust,zlib-devel -rw,java-11-openjdk +rw,java-21-openjdk samp sb sbots @@ -105,6 +105,7 @@ scpslsm sdtd,telnet,expect,libxml2 sf sfc,ncurses-libs.i686 +sm,telnet,expect sof2 sol squad @@ -125,13 +126,14 @@ ut ut2k4 ut3 ut99 -vh,glibc-devel -vints,aspnetcore-runtime-7.0 -vpmc,java-17-openjdk +vh,glibc-devel,libatomic,pulseaudio-libs-devel +vints,dotnet-runtime-7.0 +vpmc,java-21-openjdk vs wet wf -wmc,java-17-openjdk +wmc,java-21-openjdk wurm,xorg-x11-server-Xvfb +xnt zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/rhel-9.csv b/lgsm/data/rhel-9.csv index 8f643487c..a16722c2f 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 @@ -54,6 +54,7 @@ hl2dm hldm hldms hw,zlib-devel +hz ins inss ios @@ -64,11 +65,10 @@ kf kf2 l4d l4d2 -mc,java-17-openjdk +mc,java-21-openjdk mcb,libnsl mh mohaa,compat-libstdc++-33.i686 -mom mta,ncurses-compat-libs,libxml2 nd nec @@ -81,12 +81,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 @@ -96,7 +96,7 @@ ricochet ro rtcw rust,zlib-devel -rw,java-11-openjdk +rw,java-21-openjdk samp sb sbots @@ -105,6 +105,7 @@ scpslsm sdtd,telnet,expect,libxml2 sf sfc,ncurses-libs.i686 +sm,telnet,expect sof2 sol squad @@ -125,13 +126,14 @@ ut ut2k4 ut3 ut99 -vh,glibc-devel -vints,aspnetcore-runtime-7.0 -vpmc,java-17-openjdk +vh,glibc-devel,libatomic,pulseaudio-libs-devel +vints,dotnet-runtime-7.0 +vpmc,java-21-openjdk vs wet wf -wmc,java-17-openjdk +wmc,java-21-openjdk wurm,xorg-x11-server-Xvfb +xnt zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index 53021ec30..0298bd0b0 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 @@ -54,6 +54,7 @@ hl2dm hldm hldms hw,zlib-devel +hz ins inss ios @@ -64,11 +65,10 @@ kf kf2 l4d l4d2 -mc,java-17-openjdk +mc,java-21-openjdk mcb,libnsl mh mohaa,compat-libstdc++-33.i686 -mom mta,ncurses-compat-libs,libxml2 nd nec @@ -81,12 +81,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 @@ -96,7 +96,7 @@ ricochet ro rtcw rust,zlib-devel -rw,java-11-openjdk +rw,java-21-openjdk samp sb sbots @@ -105,6 +105,7 @@ scpslsm sdtd,telnet,expect,libxml2 sf sfc,ncurses-libs.i686 +sm,telnet,expect sof2 sol squad @@ -125,13 +126,14 @@ ut ut2k4 ut3 ut99 -vh,glibc-devel -vints,aspnetcore-runtime-7.0 -vpmc,java-17-openjdk +vh,glibc-devel,libatomic,pulseaudio-libs-devel +vints,dotnet-runtime-7.0 +vpmc,java-21-openjdk vs wet wf -wmc,java-17-openjdk +wmc,java-21-openjdk wurm,xorg-x11-server-Xvfb +xnt zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/rocky-9.csv b/lgsm/data/rocky-9.csv index 8f643487c..a16722c2f 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 @@ -54,6 +54,7 @@ hl2dm hldm hldms hw,zlib-devel +hz ins inss ios @@ -64,11 +65,10 @@ kf kf2 l4d l4d2 -mc,java-17-openjdk +mc,java-21-openjdk mcb,libnsl mh mohaa,compat-libstdc++-33.i686 -mom mta,ncurses-compat-libs,libxml2 nd nec @@ -81,12 +81,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 @@ -96,7 +96,7 @@ ricochet ro rtcw rust,zlib-devel -rw,java-11-openjdk +rw,java-21-openjdk samp sb sbots @@ -105,6 +105,7 @@ scpslsm sdtd,telnet,expect,libxml2 sf sfc,ncurses-libs.i686 +sm,telnet,expect sof2 sol squad @@ -125,13 +126,14 @@ ut ut2k4 ut3 ut99 -vh,glibc-devel -vints,aspnetcore-runtime-7.0 -vpmc,java-17-openjdk +vh,glibc-devel,libatomic,pulseaudio-libs-devel +vints,dotnet-runtime-7.0 +vpmc,java-21-openjdk vs wet wf -wmc,java-17-openjdk +wmc,java-21-openjdk wurm,xorg-x11-server-Xvfb +xnt zmr,ncurses-libs.i686 zps,ncurses-libs.i686 diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 841dcbf42..3b8121a26 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -1,136 +1,138 @@ shortname,gameservername,gamename,os -ac,acserver,Assetto Corsa,ubuntu-22.04 -ahl,ahlserver,Action Half-Life,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 -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 -bd,bdserver,Base Defense,ubuntu-22.04 +ac,acserver,Assetto Corsa,ubuntu-24.04 +ahl,ahlserver,Action Half-Life,ubuntu-24.04 +ahl2,ahl2server,Action: Source,ubuntu-24.04 +ark,arkserver,ARK: Survival Evolved,ubuntu-24.04 +arma3,arma3server,ARMA 3,ubuntu-24.04 +armar,armarserver,Arma Reforger,ubuntu-24.04 +ats,atsserver,American Truck Simulator,ubuntu-24.04 +av,avserver,Avorion,ubuntu-24.04 +bb,bbserver,BrainBread,ubuntu-24.04 +bb2,bb2server,BrainBread 2,ubuntu-24.04 +bd,bdserver,Base Defense,ubuntu-24.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 +bmdm,bmdmserver,Black Mesa: Deathmatch,ubuntu-24.04 +bo,boserver,Ballistic Overkill,ubuntu-24.04 +bs,bsserver,Blade Symphony,ubuntu-24.04 +bt,btserver,Barotrauma,ubuntu-24.04 btl,btlserver,BATTALION: Legacy,ubuntu-20.04 -cc,ccserver,Codename CURE,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 -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 -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 -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 -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 -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 -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 -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 -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 -ohd,ohdserver,Operation: Harsh Doorstop,ubuntu-22.04 +cc,ccserver,Codename CURE,ubuntu-24.04 +ck,ckserver,Core Keeper,ubuntu-24.04 +cmw,cmwserver,Chivalry: Medieval Warfare,ubuntu-24.04 +cod,codserver,Call of Duty,ubuntu-24.04 +cod2,cod2server,Call of Duty 2,ubuntu-24.04 +cod4,cod4server,Call of Duty 4,ubuntu-24.04 +coduo,coduoserver,Call of Duty: United Offensive,ubuntu-24.04 +codwaw,codwawserver,Call of Duty: World at War,ubuntu-24.04 +col,colserver,Colony Survival,ubuntu-24.04 +cs,csserver,Counter-Strike 1.6,ubuntu-24.04 +cs2,cs2server,Counter-Strike 2,ubuntu-24.04 +cscz,csczserver,Counter-Strike: Condition Zero,ubuntu-24.04 +csgo,csgoserver,Counter-Strike: Global Offensive,ubuntu-24.04 +css,cssserver,Counter-Strike: Source,ubuntu-24.04 +ct,ctserver,Craftopia,ubuntu-24.04 +dab,dabserver,Double Action: Boogaloo,ubuntu-24.04 +dayz,dayzserver,DayZ,ubuntu-24.04 +dmc,dmcserver,Deathmatch Classic,ubuntu-24.04 +dod,dodserver,Day of Defeat,ubuntu-24.04 +dodr,dodrserver,Day of Dragons,ubuntu-24.04 +dods,dodsserver,Day of Defeat: Source,ubuntu-24.04 +doi,doiserver,Day of Infamy,ubuntu-24.04 +dst,dstserver,Don't Starve Together,ubuntu-24.04 +dys,dysserver,Dystopia,ubuntu-24.04 +eco,ecoserver,Eco,ubuntu-24.04 +em,emserver,Empires Mod,ubuntu-24.04 +etl,etlserver,ET: Legacy,ubuntu-24.04 +ets2,ets2server,Euro Truck Simulator 2,ubuntu-24.04 +fctr,fctrserver,Factorio,ubuntu-24.04 +fof,fofserver,Fistful of Frags,ubuntu-24.04 +gmod,gmodserver,Garrys Mod,ubuntu-24.04 +hcu,hcuserver,HYPERCHARGE: Unboxed,ubuntu-24.04 +hl2dm,hl2dmserver,Half-Life 2: Deathmatch,ubuntu-24.04 +hldm,hldmserver,Half-Life: Deathmatch,ubuntu-24.04 +hldms,hldmsserver,Half-Life Deathmatch: Source,ubuntu-24.04 +hw,hwserver,Hurtworld,ubuntu-24.04 +hz,hzserver,Humanitz,ubuntu-24.04 +ins,insserver,Insurgency,ubuntu-24.04 +inss,inssserver,Insurgency: Sandstorm,ubuntu-24.04 +ios,iosserver,IOSoccer,ubuntu-24.04 +jc2,jc2server,Just Cause 2,ubuntu-24.04 +jc3,jc3server,Just Cause 3,ubuntu-24.04 +jk2,jk2server,Jedi Knight II: Jedi Outcast,ubuntu-24.04 +kf,kfserver,Killing Floor,ubuntu-24.04 +kf2,kf2server,Killing Floor 2,ubuntu-24.04 +l4d,l4dserver,Left 4 Dead,ubuntu-24.04 +l4d2,l4d2server,Left 4 Dead 2,ubuntu-24.04 +mc,mcserver,Minecraft,ubuntu-24.04 +mcb,mcbserver,Minecraft Bedrock,ubuntu-24.04 +mh,mhserver,MORDHAU,ubuntu-24.04 +mohaa,mohaaserver,Medal of Honor: Allied Assault,ubuntu-24.04 +mta,mtaserver,Multi Theft Auto,ubuntu-24.04 +nd,ndserver,Nuclear Dawn,ubuntu-24.04 +nec,necserver,Necesse,ubuntu-24.04 +nmrih,nmrihserver,No More Room in Hell,ubuntu-24.04 +ns,nsserver,Natural Selection,ubuntu-24.04 +ns2,ns2server,Natural Selection 2,ubuntu-24.04 +ns2c,ns2cserver,NS2: Combat,ubuntu-24.04 +ohd,ohdserver,Operation: Harsh Doorstop,ubuntu-24.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 -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 -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 -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 +opfor,opforserver,Opposing Force,ubuntu-24.04 +pc,pcserver,Project Cars,ubuntu-24.04 +pc2,pc2server,Project Cars 2,ubuntu-24.04 +pmc,pmcserver,PaperMC,ubuntu-24.04 +pvkii,pvkiiserver,Pirates Vikings & Knights II,ubuntu-24.04 +pvr,pvrserver,Pavlov VR,ubuntu-24.04 +pw,pwserver,Palworld,ubuntu-24.04 +pz,pzserver,Project Zomboid,ubuntu-24.04 +q2,q2server,Quake 2,ubuntu-24.04 +q3,q3server,Quake 3: Arena,ubuntu-24.04 +q4,q4server,Quake 4,ubuntu-24.04 +ql,qlserver,Quake Live,ubuntu-24.04 +qw,qwserver,Quake World,ubuntu-24.04 +ricochet,ricochetserver,Ricochet,ubuntu-24.04 +ro,roserver,Red Orchestra: Ostfront 41-45,ubuntu-24.04 +rtcw,rtcwserver,Return to Castle Wolfenstein,ubuntu-24.04 +rust,rustserver,Rust,ubuntu-24.04 +rw,rwserver,Rising World,ubuntu-24.04 +samp,sampserver,San Andreas Multiplayer,ubuntu-24.04 +sb,sbserver,Starbound,ubuntu-24.04 +sbots,sbotsserver,StickyBots,ubuntu-24.04 +scpsl,scpslserver,SCP: Secret Laboratory,ubuntu-24.04 +scpslsm,scpslsmserver,SCP: Secret Laboratory ServerMod,ubuntu-24.04 +sdtd,sdtdserver,7 Days to Die,ubuntu-24.04 +sf,sfserver,Satisfactory,ubuntu-24.04 +sfc,sfcserver,SourceForts Classic,ubuntu-24.04 +sm,smserver,Soulmask,ubuntu-24.04 +sof2,sof2server,Soldier Of Fortune 2: Gold Edition,ubuntu-24.04 +sol,solserver,Soldat,ubuntu-24.04 +squad,squadserver,Squad,ubuntu-24.04 +squad44,squad44server,Squad 44,ubuntu-24.04 +st,stserver,Stationeers,ubuntu-24.04 +stn,stnserver,Survive the Nights,ubuntu-24.04 sven,svenserver,Sven Co-op,ubuntu-20.04 -terraria,terrariaserver,Terraria,ubuntu-22.04 -tf,tfserver,The Front,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 +terraria,terrariaserver,Terraria,ubuntu-24.04 +tf,tfserver,The Front,ubuntu-24.04 +tf2,tf2server,Team Fortress 2,ubuntu-24.04 +tfc,tfcserver,Team Fortress Classic,ubuntu-24.04 +ti,tiserver,The Isle,ubuntu-24.04 +ts,tsserver,The Specialists,ubuntu-24.04 +ts3,ts3server,Teamspeak 3,ubuntu-24.04 +tu,tuserver,Tower Unite,ubuntu-24.04 +tw,twserver,Teeworlds,ubuntu-24.04 +unt,untserver,Unturned,ubuntu-24.04 +ut,utserver,Unreal Tournament,ubuntu-24.04 +ut2k4,ut2k4server,Unreal Tournament 2004,ubuntu-24.04 +ut3,ut3server,Unreal Tournament 3,ubuntu-24.04 +ut99,ut99server,Unreal Tournament 99,ubuntu-24.04 +vh,vhserver,Valheim,ubuntu-24.04 vints,vintsserver,Vintage Story,ubuntu-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 +vpmc,vpmcserver,Velocity Proxy MC,ubuntu-24.04 +vs,vsserver,Vampire Slayer,ubuntu-24.04 +wet,wetserver,Wolfenstein: Enemy Territory,ubuntu-24.04 +wf,wfserver,Warfork,ubuntu-24.04 +wmc,wmcserver,WaterfallMC,ubuntu-24.04 +wurm,wurmserver,Wurm Unlimited,ubuntu-24.04 +xnt,xntserver,Xonotic,ubuntu-24.04 +zmr,zmrserver,Zombie Master: Reborn,ubuntu-24.04 +zps,zpsserver,Zombie Panic! Source,ubuntu-24.04 diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index e50ea48c0..436bdecb8 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 @@ -55,6 +55,7 @@ hl2dm hldm hldms hw,lib32z1 +hz ins inss ios @@ -69,7 +70,6 @@ mc,openjdk-8-jre mcb mh mohaa,libstdc++5:i386 -mom mta nd nec @@ -83,7 +83,7 @@ opfor pc pc2 pmc,openjdk-8-jre -ps,libgconf-2-4 +squad44 pvkii pvr,libc++1 pz,openjdk-8-jre,rng-tools @@ -105,6 +105,7 @@ scpslsm,mono-complete sdtd,telnet,expect,libxml2-utils sf sfc,libtinfo5:i386 +sm,telnet,expect sof2 sol squad @@ -125,13 +126,14 @@ ut ut2k4 ut3 ut99 -vh,libc6-dev -vints,aspnetcore-runtime-7.0 +vh,libc6-dev,libatomic1,libpulse-dev +vints,dotnet-runtime-7.0 vpmc,openjdk-8-jre vs wet wf wmc,openjdk-8-jre wurm,xvfb +xnt zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index 5294e6757..3b24ff37f 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 @@ -55,6 +55,7 @@ hl2dm hldm hldms hw,lib32z1 +hz ins inss ios @@ -69,7 +70,6 @@ mc,openjdk-11-jre mcb mh mohaa,libstdc++5:i386 -mom mta,libncursesw5,libxml2-utils nd nec @@ -83,7 +83,7 @@ opfor pc pc2 pmc,openjdk-11-jre -ps,libgconf-2-4 +squad44 pvkii pvr,libc++1 pz,openjdk-11-jre,rng-tools @@ -105,6 +105,7 @@ scpslsm,mono-complete sdtd,telnet,expect,libxml2-utils sf sfc,libtinfo5:i386 +sm,telnet,expect sof2 sol squad @@ -125,13 +126,14 @@ ut ut2k4 ut3 ut99 -vh,libc6-dev -vints,aspnetcore-runtime-7.0 +vh,libc6-dev,libatomic1,libpulse-dev +vints,dotnet-runtime-7.0 vpmc,openjdk-11-jre vs wet wf wmc,openjdk-11-jre wurm,xvfb +xnt zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index f864b0d0a..f19436d6a 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 @@ -54,6 +54,7 @@ hl2dm hldm hldms hw,lib32z1 +hz ins inss ios @@ -64,11 +65,10 @@ kf kf2 l4d l4d2 -mc,openjdk-17-jre +mc,openjdk-21-jre mcb mh mohaa,libstdc++5:i386 -mom mta,libncursesw5,libxml2-utils nd nec @@ -81,12 +81,12 @@ onset,libmariadb-dev opfor pc pc2 -pmc,openjdk-17-jre -ps,libgconf-2-4 +pmc,openjdk-21-jre +squad44 pvkii pvr,libc++1 pw -pz,openjdk-17-jre,rng-tools +pz,openjdk-21-jre,rng-tools q2 q3 q4 @@ -96,7 +96,7 @@ ricochet ro rtcw rust,lib32z1 -rw,openjdk-17-jre +rw,openjdk-21-jre samp sb sbots @@ -105,6 +105,7 @@ scpslsm,mono-complete sdtd,telnet,expect,libxml2-utils sf sfc,libtinfo5:i386 +sm,telnet,expect sof2 sol squad @@ -125,13 +126,14 @@ ut ut2k4 ut3 ut99 -vh,libc6-dev -vints,aspnetcore-runtime-7.0 +vh,libc6-dev,libatomic1,libpulse-dev +vints,dotnet-runtime-7.0 vpmc,openjdk-11-jre vs wet wf -wmc,openjdk-17-jre +wmc,openjdk-21-jre wurm,xvfb +xnt zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index c010ac60a..f8a48ccce 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 @@ -54,6 +54,7 @@ hl2dm hldm hldms hw,lib32z1 +hz ins inss ios @@ -64,11 +65,10 @@ kf kf2 l4d l4d2 -mc,openjdk-17-jre +mc,openjdk-21-jre mcb mh mohaa,libstdc++5:i386 -mom mta,libncursesw5,libxml2-utils nd nec @@ -81,12 +81,12 @@ onset,libmariadb-dev opfor pc pc2 -pmc,openjdk-17-jre -ps,libgconf-2-4 +pmc,openjdk-21-jre +squad44 pvkii pvr,libc++1 pw -pz,openjdk-17-jre,rng-tools5 +pz,openjdk-21-jre,rng-tools5 q2 q3 q4 @@ -96,7 +96,7 @@ ricochet ro rtcw rust,lib32z1 -rw,openjdk-17-jre +rw,openjdk-21-jre samp sb sbots @@ -105,6 +105,7 @@ scpslsm,mono-complete sdtd,telnet,expect,libxml2-utils sf sfc,libtinfo5:i386 +sm,telnet,expect sof2 sol squad @@ -125,13 +126,14 @@ ut ut2k4 ut3 ut99 -vh,libc6-dev -vints,aspnetcore-runtime-7.0 -vpmc,openjdk-17-jre +vh,libc6-dev,libatomic1,libpulse-dev +vints,dotnet-runtime-7.0 +vpmc,openjdk-21-jre vs wet wf -wmc,openjdk-17-jre +wmc,openjdk-21-jre wurm,xvfb +xnt zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-23.04.csv b/lgsm/data/ubuntu-23.04.csv index 1a52e301e..c14964d2d 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 @@ -54,6 +54,7 @@ hl2dm hldm hldms hw,lib32z1 +hz ins inss ios @@ -64,11 +65,10 @@ kf kf2 l4d l4d2 -mc,openjdk-17-jre +mc,openjdk-21-jre mcb mh mohaa,libstdc++5:i386 -mom mta,libncursesw5,libxml2-utils nd nec @@ -81,12 +81,12 @@ onset,libmariadb-dev opfor pc pc2 -pmc,openjdk-17-jre -ps,libgconf-2-4 +pmc,openjdk-21-jre +squad44 pvkii pvr,libc++1 pw -pz,openjdk-17-jre,rng-tools5 +pz,openjdk-21-jre,rng-tools5 q2 q3 q4 @@ -96,7 +96,7 @@ ricochet ro rtcw rust,lib32z1 -rw,openjdk-17-jre +rw,openjdk-21-jre samp sb sbots @@ -105,6 +105,7 @@ scpslsm,mono-complete sdtd,telnet,expect,libxml2-utils sf sfc,libtinfo5:i386 +sm,telnet,expect sof2 sol squad @@ -125,13 +126,14 @@ ut ut2k4 ut3 ut99 -vh,libc6-dev -vints,aspnetcore-runtime-7.0 -vpmc,openjdk-17-jre +vh,libc6-dev,libatomic1,libpulse-dev +vints,dotnet-runtime-7.0 +vpmc,openjdk-21-jre vs wet wf -wmc,openjdk-17-jre +wmc,openjdk-21-jre wurm,xvfb +xnt zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-23.10.csv b/lgsm/data/ubuntu-23.10.csv index 1a52e301e..c14964d2d 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 @@ -54,6 +54,7 @@ hl2dm hldm hldms hw,lib32z1 +hz ins inss ios @@ -64,11 +65,10 @@ kf kf2 l4d l4d2 -mc,openjdk-17-jre +mc,openjdk-21-jre mcb mh mohaa,libstdc++5:i386 -mom mta,libncursesw5,libxml2-utils nd nec @@ -81,12 +81,12 @@ onset,libmariadb-dev opfor pc pc2 -pmc,openjdk-17-jre -ps,libgconf-2-4 +pmc,openjdk-21-jre +squad44 pvkii pvr,libc++1 pw -pz,openjdk-17-jre,rng-tools5 +pz,openjdk-21-jre,rng-tools5 q2 q3 q4 @@ -96,7 +96,7 @@ ricochet ro rtcw rust,lib32z1 -rw,openjdk-17-jre +rw,openjdk-21-jre samp sb sbots @@ -105,6 +105,7 @@ scpslsm,mono-complete sdtd,telnet,expect,libxml2-utils sf sfc,libtinfo5:i386 +sm,telnet,expect sof2 sol squad @@ -125,13 +126,14 @@ ut ut2k4 ut3 ut99 -vh,libc6-dev -vints,aspnetcore-runtime-7.0 -vpmc,openjdk-17-jre +vh,libc6-dev,libatomic1,libpulse-dev +vints,dotnet-runtime-7.0 +vpmc,openjdk-21-jre vs wet wf -wmc,openjdk-17-jre +wmc,openjdk-21-jre wurm,xvfb +xnt 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..bd220a501 --- /dev/null +++ b/lgsm/data/ubuntu-24.04.csv @@ -0,0 +1,139 @@ +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,libcurl4t64 +ats +av +bb +bb2,libcurl4-gnutls-dev:i386 +bd +bf1942 +bfv,libstdc++5:i386 +bmdm +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 +ct +dab +dayz +dmc +dod +dodr +dods +doi +dst,libcurl4-gnutls-dev:i386 +dys +eco,libgdiplus +em +etl +ets2 +fctr +fof +gmod +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 +mta,libxml2-utils +nd +nec +nmrih +ns +ns2,speex +ns2c,speex:i386 +ohd +onset,libmariadb-dev +opfor +pc +pc2 +pmc,openjdk-21-jre +ps +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 +sm,telnet,expect +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,libatomic1,libpulse-dev +vints,dotnet-runtime-7.0 +vpmc,openjdk-21-jre +vs +wet +wf +wmc,openjdk-21-jre +wurm,xvfb +xnt +zmr +zps diff --git a/lgsm/modules/alert.sh b/lgsm/modules/alert.sh index 40288d234..f2698e3b7 100644 --- a/lgsm/modules/alert.sh +++ b/lgsm/modules/alert.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM alert.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Overall module for managing alerts. diff --git a/lgsm/modules/alert_discord.sh b/lgsm/modules/alert_discord.sh index 54cf8a348..1440b6a96 100644 --- a/lgsm/modules/alert_discord.sh +++ b/lgsm/modules/alert_discord.sh @@ -1,34 +1,34 @@ #!/bin/bash # LinuxGSM alert_discord.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Sends Discord alert. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -jsoninfo=$( +json=$( cat << EOF { - "username": "LinuxGSM", - "avatar_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg", - "file": "content", - "embeds": [ - { - "author": { - "name": "LinuxGSM Alert", - "url": "", - "icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg" - }, - "title": "${alerttitle}", - "url": "", - "description": "", - "color": "${alertcolourdec}", - "type": "content", - "thumbnail": { - "url": "${alerticon}" - }, - "fields": [ + "username": "LinuxGSM", + "avatar_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg", + "file": "content", + "embeds": [ + { + "author": { + "name": "LinuxGSM Alert", + "url": "", + "icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg" + }, + "title": "${alerttitle}", + "url": "", + "description": "", + "color": "${alertcolourdec}", + "type": "content", + "thumbnail": { + "url": "${alerticon}" + }, + "fields": [ { "name": "Server Name", "value": "${servername}" @@ -37,112 +37,66 @@ jsoninfo=$( "name": "Information", "value": "${alertmessage}" }, - { - "name": "Game", - "value": "${gamename}", - "inline": true - }, - { - "name": "Server IP", - "value": "\`${alertip}:${port}\`", - "inline": true - }, - { - "name": "Hostname", - "value": "${HOSTNAME}", - "inline": true - }, + { + "name": "Game", + "value": "${gamename}", + "inline": true + }, + { + "name": "Server Time", + "value": "$(date)", + "inline": true + }, { "name": "More info", "value": "${alerturl}", "inline": true - }, - { - "name": "Server Time", - "value": "$(date)", - "inline": true - } - ], - "footer": { - "icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg", - "text": "Sent by LinuxGSM ${version}" - } - } - ] -} + } EOF ) -jsonnoinfo=$( - cat << EOF -{ - "username": "LinuxGSM", - "avatar_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg", - "file": "content", - "embeds": [ - { - "author": { - "name": "LinuxGSM Alert", - "url": "", - "icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg" - }, - "title": "${alerttitle}", - "url": "", - "description": "", - "color": "${alertcolourdec}", - "type": "content", - "thumbnail": { - "url": "${alerticon}" - }, - "fields": [ +if [ -n "${querytype}" ]; then + json+=$( + cat << EOF + , { - "name": "Server Name", - "value": "${servername}" - }, + "name": "Is my Game Server Online?", + "value": "https://ismygameserver.online/${imgsoquerytype}/${alertip}:${queryport}", + "inline": true + } +EOF + ) +fi + +if [ -n "${alerturl}" ]; then + json+=$( + cat << EOF + , { - "name": "Information", - "value": "${alertmessage}" - }, - { - "name": "Game", - "value": "${gamename}", - "inline": true - }, - { - "name": "Server IP", - "value": "\`${alertip}:${port}\`", - "inline": true - }, - { - "name": "Hostname", - "value": "${HOSTNAME}", - "inline": true - }, - { - "name": "Server Time", - "value": "$(date)", - "inline": true - } - ], - "footer": { + "name": "More info", + "value": "${alerturl}", + "inline": true + } +EOF + ) +fi + +json+=$( + cat << EOF + ], + "footer": { "icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg", - "text": "Sent by LinuxGSM ${version}" - } - } - ] + "text": "Sent by LinuxGSM ${version}" + } + } + ] } EOF ) fn_print_dots "Sending Discord alert" -if [ -z "${alerturl}" ]; then - json="${jsonnoinfo}" -else - json="${jsoninfo}" -fi - -discordsend=$(curl --connect-timeout 10 -sSL -H "Content-Type: application/json" -X POST -d "$(echo -n "${json}" | jq -c .)" "${discordwebhook}") +discordsend=$(curl --connect-timeout 3 -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}" diff --git a/lgsm/modules/alert_email.sh b/lgsm/modules/alert_email.sh index 6833d9670..aa13494d1 100644 --- a/lgsm/modules/alert_email.sh +++ b/lgsm/modules/alert_email.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM alert_email.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Sends email alert. @@ -15,7 +15,7 @@ else mail -s "${alerttitle}" "${email}" < "${alertlog}" fi exitcode=$? -if [ "${exitcode}" == "0" ]; then +if [ "${exitcode}" -ne 0 ]; then fn_print_ok_nl "Sending Email alert: ${email}" fn_script_log_pass "Sending Email alert: ${email}" else diff --git a/lgsm/modules/alert_gotify.sh b/lgsm/modules/alert_gotify.sh index 2ab6e9eb7..2f627c774 100644 --- a/lgsm/modules/alert_gotify.sh +++ b/lgsm/modules/alert_gotify.sh @@ -1,40 +1,46 @@ #!/bin/bash # LinuxGSM alert_gotify.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Sends Gotify alert. -module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -jsoninfo=$( +json=$( cat << EOF { "title": "${alerttitle}", - "message": "Server Name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\nMore info\n${alerturl}\n\nServer Time\n$(date)", - "priority": 5 -} + "message": "Server Name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\n EOF ) -jsonnoinfo=$( +if [ -n "${querytype}" ]; then + json+=$( + cat << EOF +Is my Game Server Online?\nhttps://ismygameserver.online/${imgsoquerytype}/${alertip}:${queryport}\n\n +EOF + ) +fi + +if [ -n "${alerturl}" ]; then + json+=$( + cat << EOF +More info\n${alerturl}\n\n +EOF + ) +fi + +json+=$( cat << EOF -{ - "title": "${alerttitle}", - "message": "Server Name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\nServer Time\n$(date)", +Server Time\n$(date)", "priority": 5 } EOF ) -if [ -z "${alerturl}" ]; then - json="${jsonnoinfo}" -else - json="${jsoninfo}" -fi - 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 .)") +gotifysend=$(curl --connect-timeout 3 -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" diff --git a/lgsm/modules/alert_ifttt.sh b/lgsm/modules/alert_ifttt.sh index 77932569b..aaae3b4e8 100644 --- a/lgsm/modules/alert_ifttt.sh +++ b/lgsm/modules/alert_ifttt.sh @@ -1,40 +1,46 @@ #!/bin/bash # LinuxGSM alert_ifttt.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Sends IFTTT alert. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -jsoninfo=$( +json=$( cat << EOF { "value1": "${selfname}", "value2": "${alerttitle}", - "value3": "Server Name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\nMore info\n${alerturl}\n\nServer Time\n$(date)" -} + "value3": "Server Name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\n EOF ) -jsonnoinfo=$( +if [ -n "${querytype}" ]; then + json+=$( + cat << EOF +Is my Game Server Online?\nhttps://ismygameserver.online/${imgsoquerytype}/${alertip}:${queryport}\n\n +EOF + ) +fi + +if [ -n "${alerturl}" ]; then + json+=$( + cat << EOF +More info\n${alerturl}\n\n +EOF + ) +fi + +json+=$( cat << EOF -{ - "value1": "${selfname}", - "value2": "${alerttitle}", - "value3": "Server Name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\nServer Time\n$(date)" +Server Time\n$(date)" } EOF ) -if [ -z "${alerturl}" ]; then - json="${jsonnoinfo}" -else - json="${jsoninfo}" -fi - 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") +iftttsend=$(curl --connect-timeout 3 -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}" diff --git a/lgsm/modules/alert_pushbullet.sh b/lgsm/modules/alert_pushbullet.sh index dedd43268..abdfa0bb2 100644 --- a/lgsm/modules/alert_pushbullet.sh +++ b/lgsm/modules/alert_pushbullet.sh @@ -1,42 +1,47 @@ #!/bin/bash # LinuxGSM alert_pushbullet.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Sends Pushbullet Messenger alert. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -jsoninfo=$( +json=$( cat << EOF { "channel_tag": "${channeltag}", "type": "note", "title": "${alerttitle}", - "body": "Server Name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\nMore info\n${alerturl}\n\nServer Time\n$(date)" -} + "body": "Server Name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\n EOF ) -jsonnoinfo=$( +if [ -n "${querytype}" ]; then + json+=$( + cat << EOF +Is my Game Server Online?\nhttps://ismygameserver.online/${imgsoquerytype}/${alertip}:${queryport}\n\n +EOF + ) +fi + +if [ -n "${alerturl}" ]; then + json+=$( + cat << EOF +More info\n${alerturl}\n\n +EOF + ) +fi + +json+=$( cat << EOF -{ - "channel_tag": "${channeltag}", - "type": "note", - "title": "${alerttitle}", - "body": "Server Name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\nServer Time\n$(date)" +Server Time\n$(date)" } EOF ) -if [ -z "${alerturl}" ]; then - json="${jsonnoinfo}" -else - json="${jsoninfo}" -fi - fn_print_dots "Sending Pushbullet alert" -pushbulletsend=$(curl --connect-timeout 10 -sSL -H "Access-Token: ${pushbullettoken}" -H "Content-Type: application/json" -X POST -d "$(echo -n "${json}" | jq -c .)" "https://api.pushbullet.com/v2/pushes" | grep "error_code") +pushbulletsend=$(curl --connect-timeout 3 -sSL -H "Access-Token: ${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}" diff --git a/lgsm/modules/alert_pushover.sh b/lgsm/modules/alert_pushover.sh index c436a4a91..8dc0ce2dc 100644 --- a/lgsm/modules/alert_pushover.sh +++ b/lgsm/modules/alert_pushover.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM alert_pushover.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Sends Pushover alert. @@ -22,12 +22,28 @@ else alertpriority="0" fi -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) +message=" Server name
${servername}

Information
${alertmessage}

Game
${gamename}

Server IP
${alertip}:${port}

Hostname
${HOSTNAME}

" + +if [ -n "${querytype}" ]; then + message+="Is my Game Server Online?
Check here

" +fi + +if [ -n "${alerturl}" ]; then + message+="More info
${alerturl}

" fi +message+="Server Time
$(date)" + +pushoversend=$(curl --connect-timeout 3 -sS \ + -F token="${pushovertoken}" \ + -F user="${pushoveruserkey}" \ + -F html="1" \ + -F sound="${alertsound}" \ + -F priority="${alertpriority}" \ + -F title="${alerttitle}" \ + -F message="${message}" \ + "https://api.pushover.net/1/messages.json" | grep errors) + if [ -n "${pushoversend}" ]; then fn_print_fail_nl "Sending Pushover alert: ${pushoversend}" fn_script_log_fail "Sending Pushover alert: ${pushoversend}" diff --git a/lgsm/modules/alert_rocketchat.sh b/lgsm/modules/alert_rocketchat.sh index 329111494..35bcf4928 100644 --- a/lgsm/modules/alert_rocketchat.sh +++ b/lgsm/modules/alert_rocketchat.sh @@ -1,13 +1,13 @@ #!/bin/bash # LinuxGSM alert_rocketchat.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Sends Rocketchat alert. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -jsoninfo=$( +json=$( cat << EOF { "alias": "LinuxGSM", @@ -64,7 +64,31 @@ jsoninfo=$( EOF ) -jsonnoinfo=$( +if [ -n "${querytype}" ]; then + json+=$( + cat << EOF + { + "short": false, + "title": "Is my Game Server Online?", + "value": "" + }, +EOF + ) +fi + +if [ -n "${alerturl}" ]; then + json+=$( + cat << EOF + { + "short": false, + "title": "More info", + "value": "${alerturl}" + }, +EOF + ) +fi + +json+=$( cat << EOF { "alias": "LinuxGSM", @@ -116,14 +140,8 @@ jsonnoinfo=$( 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}") +rocketchatsend=$(curl --connect-timeout 3 -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" diff --git a/lgsm/modules/alert_slack.sh b/lgsm/modules/alert_slack.sh index 728a564e0..0a1e9015e 100644 --- a/lgsm/modules/alert_slack.sh +++ b/lgsm/modules/alert_slack.sh @@ -1,13 +1,13 @@ #!/bin/bash # LinuxGSM alert_slack.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Sends Slack alert. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -jsonnoinfo=$( +json=$( cat << EOF { "attachments": [ @@ -87,7 +87,35 @@ jsonnoinfo=$( EOF ) -jsoninfo=$( +if [ -n "${querytype}" ]; then + json+=$( + cat << EOF + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "*Is my Game Server Online?*\n" + } + }, +EOF + ) +fi + +if [ -n "${alerturl}" ]; then + json+=$( + cat << EOF + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "*More info*\n<${alerturl}|${alerturl}>" + } + }, +EOF + ) +fi + +json+=$( cat << EOF { "attachments": [ @@ -174,15 +202,9 @@ jsoninfo=$( 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}") +slacksend=$(curl --connect-timeout 3 -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" diff --git a/lgsm/modules/alert_telegram.sh b/lgsm/modules/alert_telegram.sh index 3b3ec9912..d7c9b8447 100644 --- a/lgsm/modules/alert_telegram.sh +++ b/lgsm/modules/alert_telegram.sh @@ -1,42 +1,49 @@ #!/bin/bash # LinuxGSM alert_telegram.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Sends Telegram Messenger alert. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -jsoninfo=$( +json=$( cat << EOF { "chat_id": "${telegramchatid}", + "message_thread_id": "${telegramthreadid}", "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\nMore info\n${alerturl}\n\nServer Time\n$(date)", - "disable_web_page_preview": "yes" -} + "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\n EOF ) -jsonnoinfo=$( +if [ -n "${querytype}" ]; then + json+=$( + cat << EOF +Is my Game Server Online?\nCheck here\n\n +EOF + ) +fi + +if [ -n "${alerturl}" ]; then + json+=$( + cat << EOF +More info\n${alerturl}\n\n +EOF + ) +fi + +json+=$( 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)", +Server 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") +telegramsend=$(curl --connect-timeout 3 -sSL -H "Content-Type: application/json" -X POST -d "$(echo -n "${json}" | jq -c .)" ${curlcustomstring} "https://${telegramapi}/bot${telegramtoken}/sendMessage" | grep "error_code") if [ -n "${telegramsend}" ]; then fn_print_fail_nl "Sending Telegram alert: ${telegramsend}" diff --git a/lgsm/modules/check.sh b/lgsm/modules/check.sh index 1b8796e47..3922aec21 100644 --- a/lgsm/modules/check.sh +++ b/lgsm/modules/check.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM check.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Overall module for managing checks. # Runs checks that will either halt on or fix an issue. @@ -31,7 +31,7 @@ if [ "${commandname}" != "INSTALL" ] && [ "${commandname}" != "UPDATE-LGSM" ] && check_system_dir.sh fi -allowed_commands_array=(START DEBUG) +allowed_commands_array=(DEBUG RESTART START) for allowed_command in "${allowed_commands_array[@]}"; do if [ "${allowed_command}" == "${commandname}" ]; then check_executable.sh @@ -39,7 +39,7 @@ for allowed_command in "${allowed_commands_array[@]}"; do done if [ "$(whoami)" != "root" ]; then - allowed_commands_array=(DEBUG START INSTALL) + allowed_commands_array=(DEBUG RESTART START INSTALL) for allowed_command in "${allowed_commands_array[@]}"; do if [ "${allowed_command}" == "${commandname}" ]; then check_glibc.sh @@ -54,21 +54,21 @@ for allowed_command in "${allowed_commands_array[@]}"; do fi done -allowed_commands_array=(DEBUG START) +allowed_commands_array=(BACKUP DEBUG DETAILS RESTART START UPDATE) for allowed_command in "${allowed_commands_array[@]}"; do if [ "${allowed_command}" == "${commandname}" ]; then check_deps.sh fi done -allowed_commands_array=(CONSOLE DEBUG MONITOR START STOP) +allowed_commands_array=(CONSOLE DEBUG MONITOR RESTART START STOP) for allowed_command in "${allowed_commands_array[@]}"; do if [ "${allowed_command}" == "${commandname}" ]; then check_config.sh fi done -allowed_commands_array=(DEBUG DETAILS DEV-QUERY-RAW MONITOR POST_DETAILS START STOP POST-DETAILS) +allowed_commands_array=(DEBUG DETAILS DEV-QUERY-RAW MONITOR POST_DETAILS RESTART START STOP POST-DETAILS) for allowed_command in "${allowed_commands_array[@]}"; do if [ "${allowed_command}" == "${commandname}" ]; then if [ -z "${installflag}" ]; then @@ -77,7 +77,7 @@ for allowed_command in "${allowed_commands_array[@]}"; do fi done -allowed_commands_array=(DEBUG START UPDATE VALIDATE CHECK-UPDATE) +allowed_commands_array=(DEBUG RESTART START UPDATE VALIDATE CHECK-UPDATE) for allowed_command in "${allowed_commands_array[@]}"; do if [ "${allowed_command}" == "${commandname}" ]; then if [ "${appid}" ]; then @@ -86,16 +86,23 @@ for allowed_command in "${allowed_commands_array[@]}"; do fi done -allowed_commands_array=(CHANGE-PASSWORD DETAILS MONITOR START STOP UPDATE VALIDATE POST-DETAILS) +allowed_commands_array=(CHANGE-PASSWORD DETAILS MONITOR RESTART START STOP UPDATE VALIDATE POST-DETAILS) for allowed_command in "${allowed_commands_array[@]}"; do if [ "${allowed_command}" == "${commandname}" ]; then check_status.sh fi done -allowed_commands_array=(DEBUG START INSTALL) +allowed_commands_array=(DEBUG RESTART START INSTALL) for allowed_command in "${allowed_commands_array[@]}"; do if [ "${allowed_command}" == "${commandname}" ]; then check_system_requirements.sh fi done + +allowed_commands_array=(DETAILS MONITOR RESTART 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_config.sh b/lgsm/modules/check_config.sh index d8bfb5008..24bc1c37f 100644 --- a/lgsm/modules/check_config.sh +++ b/lgsm/modules/check_config.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM check_config.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Checks if the server config is missing and warns the user if needed. diff --git a/lgsm/modules/check_deps.sh b/lgsm/modules/check_deps.sh index f92a60840..5667876e5 100644 --- a/lgsm/modules/check_deps.sh +++ b/lgsm/modules/check_deps.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM check_deps.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Checks and installs missing dependencies. @@ -9,8 +9,8 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_install_dotnet_repo() { if [ "${distroid}" == "ubuntu" ]; then - # if package aspnetcore-runtime-7.0 is unavailable in ubuntu repos, add the microsoft repo. - if ! apt-cache show aspnetcore-runtime-7.0 > /dev/null 2>&1; then + # if package dotnet-runtime-7.0 is unavailable in ubuntu repos, add the microsoft repo. + if ! apt-cache show dotnet-runtime-7.0 > /dev/null 2>&1; then fn_fetch_file "https://packages.microsoft.com/config/ubuntu/${distroversion}/packages-microsoft-prod.deb" "" "" "" "/tmp" "packages-microsoft-prod.deb" "" "" "" "" sudo dpkg -i /tmp/packages-microsoft-prod.deb fi @@ -78,11 +78,12 @@ fn_install_mono_repo() { # Did Mono repo install correctly? if [ "${monoautoinstall}" != "1" ]; then - if [ $? != 0 ]; then + exitcode=$? + if [ "${exitcode}" -ne 0 ]; then fn_print_failure_nl "Unable to install Mono repository." fn_script_log_fail "Unable to install Mono repository." else - fn_print_complete_nl "Installing Mono repository completed." + fn_print_success_nl "Installing Mono repository completed." fn_script_log_pass "Installing Mono repository completed." fi fi @@ -113,13 +114,13 @@ fn_deps_email() { elif [ -d /etc/sendmail ]; then array_deps_required+=(sendmail) elif [ "$(command -v yum 2> /dev/null)" ] || [ "$(command -v dnf 2> /dev/null)" ]; then - array_deps_required+=(mailx postfix) + array_deps_required+=(s-nail postfix) elif [ "$(command -v apt 2> /dev/null)" ]; then array_deps_required+=(mailutils postfix) fi else if [ "$(command -v yum 2> /dev/null)" ] || [ "$(command -v dnf 2> /dev/null)" ]; then - array_deps_required+=(mailx postfix) + array_deps_required+=(s-nail postfix) elif [ "$(command -v apt 2> /dev/null)" ]; then array_deps_required+=(mailutils postfix) fi @@ -195,20 +196,21 @@ fn_install_missing_deps() { fi autodepinstall="$?" - # If auto install passes remove steamcmd install failure. + # If auto install passes, remove steamcmd install failure and set exit code to 0. if [ "${autodepinstall}" == "0" ]; then unset steamcmdfail + exitcode=0 fi fi # 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 @@ -225,7 +227,7 @@ fn_install_missing_deps() { else if [ "${commandname}" == "INSTALL" ]; then - fn_print_information_nl "Required dependencies already installed." + fn_print_skip2_nl "Required dependencies already installed." fn_script_log_info "Required dependencies already installed." fi fi @@ -233,7 +235,7 @@ fn_install_missing_deps() { fn_check_loop() { # Loop though required depenencies checking if they are installed. - for deptocheck in ${array_deps_required[*]}; do + for deptocheck in "${array_deps_required[@]}"; do fn_deps_detector done @@ -249,12 +251,15 @@ fn_deps_detector() { if [ "${deptocheck}" == "libsdl2-2.0-0:i386" ] && [ -z "${appid}" ]; then array_deps_required=("${array_deps_required[@]/libsdl2-2.0-0:i386/}") steamcmdstatus=1 + return elif [ "${deptocheck}" == "steamcmd" ] && [ -z "${appid}" ]; then array_deps_required=("${array_deps_required[@]/steamcmd/}") steamcmdstatus=1 + return elif [ "${deptocheck}" == "steamcmd" ] && [ "${distroid}" == "debian" ] && ! grep -qE '[^deb]+non-free([^-]|$)' /etc/apt/sources.list; then array_deps_required=("${array_deps_required[@]/steamcmd/}") steamcmdstatus=1 + return # Java: Added for users using Oracle JRE to bypass check. elif [[ ${deptocheck} == "openjdk"* ]] || [[ ${deptocheck} == "java"* ]]; then # Is java already installed? @@ -277,9 +282,9 @@ fn_deps_detector() { monoinstalled=false fi # .NET Core: A .NET Core repo needs to be installed. - elif [ "${deptocheck}" == "aspnetcore-runtime-7.0" ]; then + elif [ "${deptocheck}" == "dotnet-runtime-7.0" ]; then # .NET is not installed. - if [ -n "${dotnetversion}" ]; then + if dotnet --list-runtimes | grep -q "Microsoft.NETCore.App 7.0"; then depstatus=0 dotnetinstalled=true else @@ -317,7 +322,7 @@ 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 + for steamcmddeptocheck in "${array_deps_required_steamcmd[@]}"; do if [ "${deptocheck}" != "steamcmd" ] && [ "${deptocheck}" == "${steamcmddeptocheck}" ]; then steamcmdfail=1 fi @@ -360,7 +365,7 @@ if [ ! -f "${tmpdir}/dependency-no-check.tmp" ] && [ ! -f "${datadir}/${distroid # 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" + fn_fetch_file_github "lgsm/data" "${distroid}-${distroversioncsv}.csv" "${datadir}" "chmodx" "norun" "noforce" "nohash" fi fi diff --git a/lgsm/modules/check_executable.sh b/lgsm/modules/check_executable.sh index 91db68f1a..5959c61aa 100644 --- a/lgsm/modules/check_executable.sh +++ b/lgsm/modules/check_executable.sh @@ -1,19 +1,12 @@ #!/bin/bash # LinuxGSM check_executable.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Checks if server executable exists. 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 diff --git a/lgsm/modules/check_gamedig.sh b/lgsm/modules/check_gamedig.sh new file mode 100644 index 000000000..0942ac42a --- /dev/null +++ b/lgsm/modules/check_gamedig.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# LinuxGSM check_gamedig.sh module +# Author: Daniel Gibbs +# Contributors: https://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Installs nodejs and gamedig + +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +if [ "$(command -v node)" ] && [ "$(command -v npm)" ] && [ "$(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 + curl -L -o package.json "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/package.json" + npm install +elif [ "$(command -v node)" ] && [ "$(command -v npm)" ] && [ "$(node -v | cut -d 'v' -f 2 | cut -d '.' -f 1)" -ge 16 ]; then + cd "${lgsmdir}" || exit + curl -s -L -o package.json "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/package.json" + npm update > /dev/null 2>&1 +fi diff --git a/lgsm/modules/check_glibc.sh b/lgsm/modules/check_glibc.sh index 9da491bce..8b3d00658 100644 --- a/lgsm/modules/check_glibc.sh +++ b/lgsm/modules/check_glibc.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM check_glibc.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Checks if the server has the correct Glibc version. diff --git a/lgsm/modules/check_ip.sh b/lgsm/modules/check_ip.sh index 7671429cd..8f943c568 100644 --- a/lgsm/modules/check_ip.sh +++ b/lgsm/modules/check_ip.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM check_ip.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://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". @@ -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/check_last_update.sh b/lgsm/modules/check_last_update.sh index 166d80a17..2686c6507 100644 --- a/lgsm/modules/check_last_update.sh +++ b/lgsm/modules/check_last_update.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM check_last_update.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Checks Lockfile to see when last update happened. # Will reboot server if instance not rebooted since update. diff --git a/lgsm/modules/check_logs.sh b/lgsm/modules/check_logs.sh index 036eea5e4..36fb24036 100644 --- a/lgsm/modules/check_logs.sh +++ b/lgsm/modules/check_logs.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM check_logs.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Checks if log files exist. @@ -10,7 +10,7 @@ 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 + checklogs=true install_logs.sh } diff --git a/lgsm/modules/check_permissions.sh b/lgsm/modules/check_permissions.sh index 572b403cc..4004732f2 100644 --- a/lgsm/modules/check_permissions.sh +++ b/lgsm/modules/check_permissions.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM check_permissions.sh # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Checks ownership & permissions of scripts, files and directories. @@ -13,28 +13,33 @@ fn_check_ownership() { selfownissue=1 fi fi + if [ -d "${lgsmdir}" ]; then + if [ "$(find "${lgsmdir}" -not -user "$(whoami)" | wc -l)" -ne "0" ]; then + lgsmownissue=1 + 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 - if [ "${selfownissue}" == "1" ] || [ "${funcownissue}" == "1" ] || [ "${filesownissue}" == "1" ]; then + if [ "${selfownissue}" == "1" ] || [ "${lgsmownissue}" == "1" ] || [ "${filesownissue}" == "1" ]; then fn_print_fail_nl "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:" { - echo -e "User\tGroup\tFile\n" + echo -en "User\tGroup\tFile:" if [ "${selfownissue}" == "1" ]; then find "${rootdir}/${selfname}" -not -user "$(whoami)" -printf "%u\t%g\t%p\n" fi - if [ "${funcownissue}" == "1" ]; then - find "${modulesdir}" -not -user "$(whoami)" -printf "%u\t%g\t%p\n" + if [ "${lgsmownissue}" == "1" ]; then + find "${lgsmdir}" -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,27 +58,46 @@ fn_check_ownership() { } fn_check_permissions() { + # Check modules files are executable. 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_fail "Permissions issues found" + findnotexecutable="$(find "${modulesdir}" -type f -not -executable)" + findnotexecutablewc="$(find "${modulesdir}" -type f -not -executable | wc -l)" + if [ "${findnotexecutablewc}" -ne "0" ]; then + fn_print_error_nl "Permissions issues found" + fn_script_log_error "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 "${modulesdir}" -type f -not -executable -printf "%p\n" + echo -en "File:" + echo -en "${findnotexecutable}" } | column -s $'\t' -t | tee -a "${lgsmlog}" - if [ "${monitorflag}" == 1 ]; then - alert="permissions" - alert.sh + + # Attempt to make the files executable + fn_print_information_nl "Attempting to fix permissions issues" + fn_script_log_info "Attempting to fix permissions issues" + echo "${findnotexecutable}" | xargs chmod +x + + # Re-check if there are still non-executable files + findnotexecutable="$(find "${modulesdir}" -type f -not -executable)" + findnotexecutablewc="$(find "${modulesdir}" -type f -not -executable | wc -l)" + if [ "${findnotexecutablewc}" -ne "0" ]; then + fn_print_fail_nl "Failed to resolve permissions issues" + fn_script_log_fail "Failed to resolve permissions issues" + if [ "${monitorflag}" == 1 ]; then + alert="permissions" + alert.sh + fi + core_exit.sh + else + fn_print_ok_nl "Permissions issues resolved" + fn_script_log_pass "Permissions issues resolved" fi - core_exit.sh fi fi # Check rootdir permissions. - if [ "${rootdir}" ]; then - # Get permission numbers on directory under the form 775. + if [ -d "${rootdir}" ]; then + # Get permission numbers on directory should return 775. rootdirperm=$(stat -c %a "${rootdir}") # Grab the first and second digit for user and group permission. userrootdirperm="${rootdirperm:0:1}" @@ -92,6 +116,7 @@ fn_check_permissions() { core_exit.sh fi fi + # Check if executable is executable and attempt to fix it. # First get executable name. execname=$(basename "${executable}") @@ -141,7 +166,7 @@ fn_check_permissions() { fi } -## The following fn_sys_perm_* modules checks for permission errors in /sys directory. +## The following fn_sys_perm_* function checks for permission errors in /sys directory. # Checks for permission errors in /sys directory. fn_sys_perm_errors_detect() { diff --git a/lgsm/modules/check_root.sh b/lgsm/modules/check_root.sh index 8fe20764c..47825ddc9 100644 --- a/lgsm/modules/check_root.sh +++ b/lgsm/modules/check_root.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM check_root.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Checks if the user tried to run the script as root. diff --git a/lgsm/modules/check_status.sh b/lgsm/modules/check_status.sh index 906675e81..e017b89ec 100644 --- a/lgsm/modules/check_status.sh +++ b/lgsm/modules/check_status.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM check_status.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Checks the process status of the server. Either online or offline. diff --git a/lgsm/modules/check_steamcmd.sh b/lgsm/modules/check_steamcmd.sh index 5d14bb21f..0e7f5ce6c 100644 --- a/lgsm/modules/check_steamcmd.sh +++ b/lgsm/modules/check_steamcmd.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM check_steamcmd.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Checks if SteamCMD is installed correctly. diff --git a/lgsm/modules/check_system_dir.sh b/lgsm/modules/check_system_dir.sh index 2f57511fb..2b646835d 100644 --- a/lgsm/modules/check_system_dir.sh +++ b/lgsm/modules/check_system_dir.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM check_system_dir.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Checks if systemdir/serverfiles is accessible. diff --git a/lgsm/modules/check_system_requirements.sh b/lgsm/modules/check_system_requirements.sh index 0214cdc1a..39cef3a42 100644 --- a/lgsm/modules/check_system_requirements.sh +++ b/lgsm/modules/check_system_requirements.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM check_system_requirements.sh # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Checks RAM requirements. @@ -9,7 +9,11 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" info_distro.sh -# RAM requirements in megabytes for each game or engine. +if [[ "${arch}" != "x86_64" && "${arch}" != "i386" && "${arch}" != "i686" ]]; then + echo -e "${red}Error: Only x86 type architectures are supported. Detected architecture: ${arch}${default}" + fn_script_log_error "Only x86 type architectures are supported. Detected architecture: ${arch}" + core_exit.sh +fi if [ "${shortname}" == "ark" ]; then ramrequirementgb="7" @@ -35,7 +39,7 @@ elif [ "${shortname}" == "mh" ]; then ramrequirementgb="4" elif [ "${shortname}" == "ns2" ] || [ "${shortname}" == "ns2c" ]; then ramrequirementgb="1" -elif [ "${shortname}" == "ps" ]; then +elif [ "${shortname}" == "squad44" ]; then ramrequirementgb="2" elif [ "${shortname}" == "pvr" ]; then ramrequirementgb="1" @@ -49,6 +53,8 @@ elif [ "${shortname}" == "sf" ]; then ramrequirementgb="12" elif [ "${shortname}" == "squad" ]; then ramrequirementgb="2" +elif [ "${shortname}" == "sm" ]; then + ramrequirementgb="10" elif [ "${shortname}" == "st" ]; then ramrequirementgb="1" elif [ "${shortname}" == "stn" ]; then @@ -65,8 +71,9 @@ fi if [ "${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." + fn_print_warn_nl "Checking RAM: Minumum RAM requirements not met" + fn_print_nl "* ${ramrequirementgb}G is required, but only ${physmemtotal} is available." + fn_print_nl "* ${gamename} server may fail to run or experience poor performance." fn_sleep_time_5 fi fi diff --git a/lgsm/modules/check_tmuxception.sh b/lgsm/modules/check_tmuxception.sh index 8f1f94c73..fa0748c8b 100644 --- a/lgsm/modules/check_tmuxception.sh +++ b/lgsm/modules/check_tmuxception.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM check_config.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Checks if run from tmux or screen. diff --git a/lgsm/modules/check_version.sh b/lgsm/modules/check_version.sh index 5369fd832..b1e7f5584 100644 --- a/lgsm/modules/check_version.sh +++ b/lgsm/modules/check_version.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM command_version.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://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. diff --git a/lgsm/modules/command_backup.sh b/lgsm/modules/command_backup.sh index e0ef3f0a1..2c8f4bcda 100644 --- a/lgsm/modules/command_backup.sh +++ b/lgsm/modules/command_backup.sh @@ -1,12 +1,12 @@ #!/bin/bash # LinuxGSM command_backup.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Creates a .tar.gz file in the backup directory. commandname="BACKUP" -commandaction="Backing up" +commandaction="Backup" moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set @@ -115,7 +115,7 @@ 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_print_dots "Backup (${rootdirduexbackup}) ${backupname}.tar.gz, in progress ..." fn_script_log_info "Backup ${rootdirduexbackup} ${backupname}.tar.gz, in progress" excludedir=$(fn_backup_relpath) @@ -126,9 +126,9 @@ fn_backup_compression() { core_exit.sh fi - tar -czf "${backupdir}/${backupname}.tar.gz" -C "${rootdir}" --exclude "${excludedir}" --exclude "${lockdir}" --exclude "${tmpdir}" ./. - local exitcode=$? - if [ "${exitcode}" != 0 ]; then + tar --use-compress-program=pigz -hcf "${backupdir}/${backupname}.tar.gz" -C "${rootdir}" --exclude "${excludedir}" --exclude "${lockdir}" --exclude "${tmpdir}" ./. + exitcode=$? + if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol fn_script_log_fail "Backup in progress: FAIL" echo -e "${extractcmd}" | tee -a "${lgsmlog}" @@ -136,7 +136,7 @@ fn_backup_compression() { 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}')" + fn_print_ok_nl "Completed: ${italic}${backupname}.tar.gz${default}, total size $(du -sh "${backupdir}/${backupname}.tar.gz" | awk '{print $1}')" fn_script_log_pass "Backup created: ${backupname}.tar.gz, total size $(du -sh "${backupdir}/${backupname}.tar.gz" | awk '{print $1}')" alert="backup" alert.sh diff --git a/lgsm/modules/command_check_update.sh b/lgsm/modules/command_check_update.sh index 2e6855f7c..38f8b4ddc 100644 --- a/lgsm/modules/command_check_update.sh +++ b/lgsm/modules/command_check_update.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM command_check_update.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Handles updating of servers. @@ -32,6 +32,8 @@ elif [ "${shortname}" == "vints" ]; then update_vints.sh elif [ "${shortname}" == "ut99" ]; then update_ut99.sh +elif [ "${shortname}" == "xnt" ]; then + update_xnt.sh else update_steamcmd.sh fi diff --git a/lgsm/modules/command_console.sh b/lgsm/modules/command_console.sh index a5d49d7f2..6344088b3 100644 --- a/lgsm/modules/command_console.sh +++ b/lgsm/modules/command_console.sh @@ -1,18 +1,19 @@ #!/bin/bash # LinuxGSM command_console.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Gives access to the server tmux console. commandname="CONSOLE" -commandaction="Access console" +commandaction="Access Console" moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set -check.sh fn_print_header +check.sh + if [ "${consoleverbose}" == "yes" ]; then echo -e "* Verbose output: ${lightgreen}yes${default}" elif [ "${consoleverbose}" == "no" ]; then @@ -29,10 +30,10 @@ 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" +fn_print_information_nl "Press ${italic}\"CTRL+b\"${default} then ${italic}\"d\"${default} to exit console." +fn_print_warning_nl "Do ${underline}NOT${default} press CTRL+c to exit." echo -e "" +echo -e "${italic}https://docs.linuxgsm.com/commands/console${default}" if ! fn_prompt_yn "Continue?" Y; then exitcode=0 core_exit.sh diff --git a/lgsm/modules/command_debug.sh b/lgsm/modules/command_debug.sh index 2e6c0e2e2..a5dae7615 100644 --- a/lgsm/modules/command_debug.sh +++ b/lgsm/modules/command_debug.sh @@ -1,12 +1,12 @@ #!/bin/bash # LinuxGSM command_debug.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Runs the server without tmux and directly from the terminal. commandname="DEBUG" -commandaction="Debuging" +commandaction="Debugging" moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set @@ -24,11 +24,13 @@ fn_lockfile_trap() { core_exit.sh } +fn_print_header + 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}" @@ -121,9 +123,10 @@ 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: $?" +exitcode=$? +if [ "${exitcode}" -ne 0 ]; then + fn_print_error_nl "Server has stopped: exit code: ${exitcode}" + fn_script_log_error "Server has stopped: exit code: ${exitcode}" fn_print_error_nl "Press ENTER to exit debug mode" read -r else diff --git a/lgsm/modules/command_details.sh b/lgsm/modules/command_details.sh index ad55b1241..8de2ddeb5 100644 --- a/lgsm/modules/command_details.sh +++ b/lgsm/modules/command_details.sh @@ -1,12 +1,12 @@ #!/bin/bash # LinuxGSM command_details.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Displays server information. commandname="DETAILS" -commandaction="Viewing details" +commandaction="Display Details" moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set diff --git a/lgsm/modules/command_dev_clear_modules.sh b/lgsm/modules/command_dev_clear_modules.sh index bf19b2578..d6196ba74 100644 --- a/lgsm/modules/command_dev_clear_modules.sh +++ b/lgsm/modules/command_dev_clear_modules.sh @@ -1,12 +1,12 @@ #!/bin/bash # LinuxGSM command_dev_clear_modules.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Deletes the contents of the modules dir. commandname="DEV-CLEAR-MODULES" -commandaction="Clearing modules" +commandaction="Clear Modules" moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set diff --git a/lgsm/modules/command_dev_debug.sh b/lgsm/modules/command_dev_debug.sh index eb0356985..2b13b8c41 100644 --- a/lgsm/modules/command_dev_debug.sh +++ b/lgsm/modules/command_dev_debug.sh @@ -1,12 +1,12 @@ #!/bin/bash # LinuxGSM command_dev_debug.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://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" +commandaction="Developer Debug" moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_reset 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_detect_deps.sh b/lgsm/modules/command_dev_detect_deps.sh index 6215fb897..fca15f075 100644 --- a/lgsm/modules/command_dev_detect_deps.sh +++ b/lgsm/modules/command_dev_detect_deps.sh @@ -1,18 +1,16 @@ #!/bin/bash # LinuxGSM command_dev_detect_deps.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Detects dependencies the server binary requires. commandname="DEV-DETECT-DEPS" -commandaction="Developer detect deps" +commandaction="Dependency Checker" moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set -echo -e "" -echo -e "${bold}Dependencies Checker${default}" -fn_messages_separator +fn_print_header echo -e "Checking directory: " echo -e "${serverfiles}" if [ "$(command -v eu-readelf 2> /dev/null)" ]; then @@ -186,7 +184,7 @@ echo -e "${bold}Required Dependencies${default}" fn_messages_separator echo -e "${executable}" echo -e "" -echo -e "CentOS" +echo -e "${bold}CentOS" fn_messages_separator cat "${tmpdir}/.depdetect_centos_line" echo -e "" diff --git a/lgsm/modules/command_dev_detect_glibc.sh b/lgsm/modules/command_dev_detect_glibc.sh index 214adc88e..20398bd47 100644 --- a/lgsm/modules/command_dev_detect_glibc.sh +++ b/lgsm/modules/command_dev_detect_glibc.sh @@ -1,19 +1,17 @@ #!/bin/bash # LinuxGSM command_dev_detect_glibc.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://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" +commandaction="Detect Glibc Requirements" moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set -fn_messages_separator -echo -e "glibc Requirements Checker" -fn_messages_separator +fn_print_header if [ ! "$(command -v objdump 2> /dev/null)" ]; then fn_print_failure_nl "objdump is missing" @@ -48,17 +46,17 @@ for glibc_check_var in "${glibc_check_dir_array[@]}"; do 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) + glibcversion=$(objdump -T "${line}" 2> /dev/null | grep -oP "GLIBC[^ ]+" | grep -v GLIBCXX | sort | uniq | sort -r --version-sort | head -n 1 | sed 's/)$//') 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" + objdump -T "${line}" 2> /dev/null | grep -oP "GLIBC[^ ]+" | sed 's/)$//' >> "${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" + fn_print_nl "${bold}${lightyellow}${glibc_check_name} glibc Requirements" fn_messages_separator if [ -f "${tmpdir}/detect_glibc_files_${glibc_check_var}.tmp" ]; then echo -e "Required glibc" @@ -80,7 +78,7 @@ for glibc_check_var in "${glibc_check_dir_array[@]}"; do fi done echo -e "" -echo -e "Final glibc Requirement" +fn_print_nl "${bold}${lightyellow}Final glibc Requirement" 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 diff --git a/lgsm/modules/command_dev_detect_ldd.sh b/lgsm/modules/command_dev_detect_ldd.sh index af41bb522..62db24da0 100644 --- a/lgsm/modules/command_dev_detect_ldd.sh +++ b/lgsm/modules/command_dev_detect_ldd.sh @@ -1,19 +1,17 @@ #!/bin/bash # LinuxGSM command_dev_detect_ldd.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://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" +commandaction="Shared Object Dependencies Checker" moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set -fn_messages_separator -echo -e "Shared Object dependencies Checker" -fn_messages_separator +fn_print_header if [ -z "${serverfiles}" ]; then dir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") @@ -46,12 +44,12 @@ find "${serverfiles}" -type f -print0 \ done echo -e "" echo -e "" -echo -e "All" +fn_print_nl "${bold}${lightyellow}All${default}" fn_messages_separator cat "${tmpdir}/detect_ldd.tmp" echo -e "" -echo -e "Not Found" +fn_print_nl "${bold}${lightyellow}Not Found${default}" fn_messages_separator cat "${tmpdir}/detect_ldd_not_found.tmp" 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..dfb68ba2b --- /dev/null +++ b/lgsm/modules/command_dev_parse_distro_details.sh @@ -0,0 +1,121 @@ +#!/bin/bash +# LinuxGSM command_dev_parse_distro_details.sh module +# Author: Daniel Gibbs +# Contributors: https://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Display parsed distro details. + +commandname="DEV-PARSE-DISTRO-DETAILS" +commandaction="Parse Distro Details" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +fn_print_header + +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..7c0767eea --- /dev/null +++ b/lgsm/modules/command_dev_parse_game_details.sh @@ -0,0 +1,164 @@ +#!/bin/bash +# LinuxGSM command_dev_parse_game_details.sh module +# Author: Daniel Gibbs +# Contributors: https://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Display parsed gameserver details. + +commandname="DEV-PARSE-GAME-DETAILS" +commandaction="Parse Game Details" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +fn_print_header + +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}" + ['Port 401']="${port401}" + ['Port IPv6']="${portipv6}" + ['Port']="${port}" + ['Query Enabled']="${queryenabled}" + ['Query HTTP Port']="${httpqueryport}" + ['Query HTTPS Port']="${httpsqueryport}" + ['Query Mode']="${querymode}" + ['Query Port GS']="${gamespyqueryport}" + ['Query Port']="${queryport}" + ['Query SSH Port']="${sshqueryport}" + ['Queue Enabled']="${queueenabled}" + ['Queue Port']="${queueport}" + ['Random Map']="${randommap}" + ['Raw Port']="${rawport}" + ['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']="${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 Gameserver 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 Gameserver Details${default}" + fn_messages_separator + echo -e "${missing_details}" | sort +fi + +core_exit.sh diff --git a/lgsm/modules/command_dev_query_raw.sh b/lgsm/modules/command_dev_query_raw.sh index 2314d75b4..a27850df8 100644 --- a/lgsm/modules/command_dev_query_raw.sh +++ b/lgsm/modules/command_dev_query_raw.sh @@ -1,15 +1,17 @@ #!/bin/bash # LinuxGSM command_dev_query_raw.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Raw gamedig output of the server. commandname="DEV-QUERY-RAW" -commandaction="Developer query raw" +commandaction="Developer Query Raw" moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set +fn_print_header + check.sh info_game.sh info_distro.sh @@ -26,24 +28,24 @@ echo -e "Telnet IP: ${telnetip}" echo -e "Display IP: ${displayip}" echo -e "" -echo -e "${lightgreen}Query IP Addresses${default}" +echo -e "${bold}${lightyellow}Query IP Addresses${default}" 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 "${bold}${lightyellow}Game Server Ports${default}" fn_messages_separator { echo -e "${lightblue}Port Name \tPort Number \tStatus \tTCP \tUDP${default}" - if [ -v port ]; then + if [ -n "${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}" == "pvr" ]; then - if [ -v port401 ]; then + if [ -n "${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:" @@ -51,140 +53,140 @@ fn_messages_separator fi if [ "${shortname}" == "mcb" ]; then - if [ -v portipv6 ]; then + if [ -n "${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 + if [ -n "${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 apiport ]; then + if [ -n "${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 + if [ -n "${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 + if [ -n "${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 + if [ -n "${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 + if [ -n "${clientport}" ]; then echo -e "Client: \t${clientport} \t$(ss -tupl | grep -c "${clientport}") \t$(ss -tupl | grep "${clientport}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${clientport}" | grep udp | awk '{ print $2 }')" else echo -e "Client:" fi - if [ -v fileport ]; then + if [ -n "${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 + if [ -n "${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 + if [ -n "${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 httpport ]; then + if [ -n "${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 Interface:" fi - if [ -v masterport ]; then + if [ -n "${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 rawport ]; then + if [ -n "${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 rconport ]; then + if [ -n "${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 steamport ]; then + if [ -n "${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 steamworksport ]; then + if [ -n "${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 "Steamworks P2P:" fi - if [ -v steamauthport ]; then + if [ -n "${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 telnetport ]; then + if [ -n "${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 statsport ]; then + if [ -n "${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 - if [ -v sourcetvport ]; then + if [ -n "${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 udplinkport ]; then + if [ -n "${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 + if [ -n "${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 + if [ -n "${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):" @@ -192,51 +194,56 @@ fn_messages_separator } \ | column -s $'\t' -t + echo -e "" -echo -e "${lightgreen}SS Output${default}" +echo -e "${bold}${lightyellow}SS Output${default}" fn_messages_separator fn_info_messages_ports eval "${portcommand}" + echo -e "" -echo -e "${lightgreen}Query Port - Raw Output${default}" +echo -e "${bold}${lightyellow}Query Port (${queryport}) - Gamedig Output${default}" fn_messages_separator echo -e "" echo -e "PORT: ${port}" echo -e "QUERY PORT: ${queryport}" echo -e "" +echo -e "${lightgreen}Is My Game Server Online?${default}" +fn_messages_separator +echo -e "Game server status: https://ismygameserver.online/${imgsoquerytype}/${queryip}:${queryport}" +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 - fn_print_failure_nl "jq not installed" -fi for queryip in "${queryips[@]}"; do query_gamedig.sh - echo -e "${gamedigcmd}" + echo -e "${italic}${gamedigcmd}${default}" echo"" echo "${gamedigraw}" | jq done + echo -e "" -echo -e "${lightgreen}gsquery Raw Output${default}" +echo -e "${bold}${lightyellow}Query Port (${queryport}) - gsquery Output${default}" fn_messages_separator echo -e "" for queryip in "${queryips[@]}"; do - echo -e "./query_gsquery.py -a \"${queryip}\" -p \"${queryport}\" -e \"${querytype}\"" + echo -e "${italic}./query_gsquery.py -a \"${queryip}\" -p \"${queryport}\" -e \"${querytype}\"${default}" echo -e "" if [ ! -f "${modulesdir}/query_gsquery.py" ]; then fn_fetch_file_github "lgsm/modules" "query_gsquery.py" "${modulesdir}" "chmodx" "norun" "noforce" "nohash" fi "${modulesdir}"/query_gsquery.py -a "${queryip}" -p "${queryport}" -e "${querytype}" done + echo -e "" -echo -e "${lightgreen}TCP Raw Output${default}" +echo -e "${bold}${lightyellow}Query Port (${queryport}) - TCP Output${default}" fn_messages_separator echo -e "" for queryip in "${queryips[@]}"; do - echo -e "bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${queryport}''" + echo -e "${italic}bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${queryport}''${default}" echo -e "" timeout 3 bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${queryport}'' querystatus="$?" @@ -248,14 +255,14 @@ for queryip in "${queryips[@]}"; do fi done echo -e "" -echo -e "${lightgreen}Game Port - Raw Output${default}" +echo -e "${bold}${lightyellow}Game Port (${port}) - TCP Output${default}" fn_messages_separator echo -e "" echo -e "${lightgreen}TCP Raw Output${default}" fn_messages_separator echo -e "" for queryip in "${queryips[@]}"; do - echo -e "bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${port}''" + echo -e "${italic}bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${port}''${default}" echo -e "" timeout 3 bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${port}'' querystatus="$?" @@ -267,10 +274,10 @@ for queryip in "${queryips[@]}"; do fi done echo -e "" -echo -e "${lightgreen}Steam Master Server Response${default}" +echo -e "${bold}${lightyellow}Steam Master Server Response${default}" fn_messages_separator echo -e "" -echo -e "curl -m 3 -s https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${publicip}" +echo -e "${italic}curl -m 3 -s https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${publicip}${default}" echo -e "" echo -e "Response: ${displaymasterserver}" echo -e "" diff --git a/lgsm/modules/command_dev_ui.sh b/lgsm/modules/command_dev_ui.sh new file mode 100644 index 000000000..e7aa9975e --- /dev/null +++ b/lgsm/modules/command_dev_ui.sh @@ -0,0 +1,110 @@ +#!/bin/bash +# LinuxGSM command_dev_ui.sh module +# Author: Daniel Gibbs +# Contributors: https://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Dev only: Assist with UI development. + +commandname="DEV-DEBUG" +commandaction="Developer UI" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +fn_print_header + +# Load ANSI colors +fn_ansi_loader + +fn_print_nl "" +fn_print_nl "${lightgreen}Colours${default}" +fn_messages_separator +# Print supported colors +fn_print_nl "${default}default" +fn_print_nl "${black}black${default}" +fn_print_nl "${red}red${default}" +fn_print_nl "${lightred}lightred${default}" +fn_print_nl "${green}green${default}" +fn_print_nl "${lightgreen}lightgreen${default}" +fn_print_nl "${yellow}yellow${default}" +fn_print_nl "${lightyellow}lightyellow${default}" +fn_print_nl "${blue}blue${default}" +fn_print_nl "${lightblue}lightblue${default}" +fn_print_nl "${magenta}magenta${default}" +fn_print_nl "${lightmagenta}lightmagenta${default}" +fn_print_nl "${cyan}cyan${default}" +fn_print_nl "${lightcyan}lightcyan${default}" +fn_print_nl "${darkgrey}darkgrey${default}" +fn_print_nl "${lightgrey}lightgrey${default}" +fn_print_nl "${white}white${default}" +fn_print_nl "${bold}bold${default}" +fn_print_nl "${dim}dim${default}" +fn_print_nl "${italic}italic${default}" +fn_print_nl "${underline}underline${default}" +fn_print_nl "${reverse}reverse${default}" + +fn_print_nl "" +fn_print_nl "${lightgreen}Non Interactive UI Status Messages${default}" +fn_messages_separator +fn_print_nl "" +fn_print_nl "Print Message" +fn_print_nl "" +fn_print_nl "${lightgreen}Status Messages${default}" +fn_messages_separator +fn_print_dots_nl "Dots" +fn_print_ok_nl "OK" +fn_print_fail_nl "Fail" +fn_print_error_nl "Error" +fn_print_warn_nl "Warn" +fn_print_info_nl "Info" +fn_print_start_nl "Start" + +fn_print_nl "" +fn_print_nl "${lightgreen}Interactive UI Status Messages${default}" +fn_messages_separator +fn_print_success_nl +fn_print_failure_nl +fn_print_error2_nl +fn_print_warning_nl +fn_print_information_nl + +fn_print_nl "" +fn_print_nl "${lightgreen}EOL Status Messages${default}" +fn_messages_separator + +fn_print "Print yes message with eol" +fn_print_yes_eol_nl +fn_print "Print no message with eol" +fn_print_no_eol_nl +fn_print "Print ok message with eol" +fn_print_ok_eol_nl +fn_print "Print fail message with eol" +fn_print_fail_eol_nl +fn_print "Print error message with eol" +fn_print_error_eol_nl +fn_print "Print warn message with eol" +fn_print_wait_eol_nl +fn_print "Print info message with eol" +fn_print_warn_eol_nl +fn_print "Print querying message with eol" +fn_print_info_eol_nl +fn_print "Print checking message with eol" +fn_print_querying_eol_nl +fn_print "Print delay message with eol" +fn_print_checking_eol_nl +fn_print "Print canceled message with eol" +fn_print_delay_eol_nl +fn_print "Print removed message with eol" +fn_print_canceled_eol_nl +fn_print "Print update message with eol" +fn_print_removed_eol_nl +fn_print "Print skip message with eol" +fn_print_update_eol_nl +fn_print "Print skip message with eol" +fn_print_skip_eol_nl + +fn_print_nl "" +fn_print_nl "${lightgreen}Restart warning${default}" +fn_messages_separator +fn_print_restart_warning + +core_exit.sh diff --git a/lgsm/modules/command_fastdl.sh b/lgsm/modules/command_fastdl.sh index f9e9bd42f..3b8165444 100644 --- a/lgsm/modules/command_fastdl.sh +++ b/lgsm/modules/command_fastdl.sh @@ -1,9 +1,9 @@ #!/bin/bash # LinuxGSM command_fastdl.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Creates a FastDL directory. +# Description: Creates a Fastdl directory. commandname="FASTDL" commandaction="Fastdl" @@ -23,18 +23,18 @@ luafastdlfullpath="${luasvautorundir}/${luafastdlfile}" # Header fn_print_header -echo -e "More info: https://docs.linuxgsm.com/commands/fastdl" -echo -e "" +fn_print_nl "More info: ${italic}https://docs.linuxgsm.com/commands/fastdl" +fn_print_nl "" -# Prompts user for FastDL creation settings. -echo -e "${commandaction} setup" +# Prompts user for Fastdl creation settings. +fn_print_nl "${bold}${lightyellow}${commandaction} Setup" fn_messages_separator # 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 "" + fn_print_warning_nl "Fastdl directory already exists." + fn_print_nl "${fastdldir}" + fn_print_nl "" if fn_prompt_yn "Overwrite existing directory?" Y; then fn_script_log_info "Overwrite existing directory: YES" else @@ -56,18 +56,18 @@ fi # Clears any fastdl directory content. fn_clear_old_fastdl() { - # Clearing old FastDL. + # Clearing old Fastdl. if [ -d "${fastdldir}" ]; then - echo -en "clearing existing FastDL directory ${fastdldir}..." + fn_print "clearing existing Fastdl directory ${fastdldir}" rm -rf "${fastdldir:?}" exitcode=$? - if [ "${exitcode}" != 0 ]; then + if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl - fn_script_log_fail "Clearing existing FastDL directory ${fastdldir}" + fn_script_log_fail "Clearing existing Fastdl directory ${fastdldir}" core_exit.sh else fn_print_ok_eol_nl - fn_script_log_pass "Clearing existing FastDL directory ${fastdldir}" + fn_script_log_pass "Clearing existing Fastdl directory ${fastdldir}" fi fi } @@ -75,10 +75,10 @@ fn_clear_old_fastdl() { fn_fastdl_dirs() { # Check and create directories. if [ ! -d "${webdir}" ]; then - echo -en "creating web directory ${webdir}..." + fn_print "creating web directory ${webdir}" mkdir -p "${webdir}" exitcode=$? - if [ "${exitcode}" != 0 ]; then + if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl fn_script_log_fail "Creating web directory ${webdir}" core_exit.sh @@ -88,10 +88,10 @@ fn_fastdl_dirs() { fi fi if [ ! -d "${fastdldir}" ]; then - echo -en "creating fastdl directory ${fastdldir}..." + fn_print "creating fastdl directory ${fastdldir}" mkdir -p "${fastdldir}" exitcode=$? - if [ "${exitcode}" != 0 ]; then + if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl fn_script_log_fail "Creating fastdl directory ${fastdldir}" core_exit.sh @@ -118,7 +118,7 @@ fn_human_readable_file_size() { local precision="${2}" if [[ "${bytes}" == "1" ]]; then - echo -e "1 byte" + fn_print_nl "1 byte" else for item in "${abbrevs[@]}"; do local factor="${item%:*}" @@ -138,7 +138,7 @@ fn_fastdl_preview() { if [ -f "${tmpdir}/fastdl_files_to_compress.txt" ]; then rm -f "${tmpdir:?}/fastdl_files_to_compress.txt" fi - echo -e "analysing required files" + fn_print_nl "analysing required files" fn_script_log_info "Analysing required files" # Garry's Mod if [ "${shortname}" == "gmod" ]; then @@ -151,13 +151,13 @@ fn_fastdl_preview() { ((fileswc++)) tput rc tput el - echo -e "gathering ${allowed_extention} : ${fileswc}..." + fn_print "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 + fn_print_skip_eol_nl fi done # Source engine @@ -183,12 +183,12 @@ fn_fastdl_preview() { ((fileswc++)) tput rc tput el - echo -e "gathering ${directory} ${allowed_extention} : ${fileswc}..." + fn_print "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}..." + fn_print "gathering ${directory} ${allowed_extention} : ${fileswc}" if [ ${fileswc} != 0 ]; then fn_print_ok_eol_nl else @@ -199,7 +199,7 @@ fn_fastdl_preview() { done fi if [ -f "${tmpdir}/fastdl_files_to_compress.txt" ]; then - echo -e "calculating total file size..." + fn_print_nl "calculating total file size" fn_sleep_time_1 totalfiles=$(wc -l < "${tmpdir}/fastdl_files_to_compress.txt") # Calculates total file size. @@ -207,9 +207,9 @@ fn_fastdl_preview() { filesize=$(stat -c %s "${dufile}") filesizetotal=$((filesizetotal + filesize)) exitcode=$? - if [ "${exitcode}" != 0 ]; then + if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl - fn_script_log_fail "Calculating total file size." + fn_script_log_fail "Calculating total file size" core_exit.sh fi done < "${tmpdir}/fastdl_files_to_compress.txt" @@ -219,7 +219,7 @@ fn_fastdl_preview() { core_exit.sh fi - if [ "${engine}" == "source" ]; then + if [ "${engine}" == "source" ]; then echo -e "about to compress ${totalfiles} files, total size $(fn_human_readable_file_size "${filesizetotal}" 0)" elif [ "${engine}" == "goldsrc" ]; then echo -e "about to copy ${totalfiles} files, total size $(fn_human_readable_file_size "${filesizetotal}" 0)" @@ -243,10 +243,10 @@ fn_fastdl_gmod() { ((fileswc++)) tput rc tput el - echo -e "copying ${allowed_extention} : ${fileswc}..." + fn_print "copying ${allowed_extention} : ${fileswc}" cp --parents "${fastdlfile}" "${fastdldir}" exitcode=$? - if [ "${exitcode}" != 0 ]; then + if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl fn_script_log_fail "Copying ${fastdlfile} > ${fastdldir}" core_exit.sh @@ -258,12 +258,12 @@ fn_fastdl_gmod() { fn_print_ok_eol_nl fi done - # Correct addons directory structure for FastDL. + # Correct addons directory structure for Fastdl. if [ -d "${fastdldir}/addons" ]; then - echo -en "updating addons file structure..." + fn_print "updating addons file structure..." cp -Rf "${fastdldir}"/addons/*/* "${fastdldir}" exitcode=$? - if [ "${exitcode}" != 0 ]; then + if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl fn_script_log_fail "Updating addons file structure" core_exit.sh @@ -272,11 +272,11 @@ fn_fastdl_gmod() { fn_script_log_pass "Updating addons file structure" fi # Clear addons directory in fastdl. - echo -en "clearing addons dir from fastdl dir..." + fn_print "clearing addons dir from fastdl dir..." fn_sleep_time_1 rm -rf "${fastdldir:?}/addons" exitcode=$? - if [ "${exitcode}" != 0 ]; then + if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl fn_script_log_fail "Clearing addons dir from fastdl dir" core_exit.sh @@ -287,11 +287,11 @@ fn_fastdl_gmod() { 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_print "correcting DarkRP files..." fn_sleep_time_1 cp -Rf "${fastdldir}/lua/"* "${fastdldir}" exitcode=$? - if [ "${exitcode}" != 0 ]; then + if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl fn_script_log_fail "Correcting DarkRP files" core_exit.sh @@ -331,8 +331,8 @@ fn_fastdl_source() { ((fileswc++)) tput rc tput el - echo -e "copying ${directory} ${allowed_extention} : ${fileswc}..." - fn_sleep_time_1 + fn_print "copying ${directory} ${allowed_extention} : ${fileswc}" + fn_sleep_time # get relative path of file in the dir tmprelfilepath="${fastdlfile#"${systemdir}/"}" copytodir="${tmprelfilepath%/*}" @@ -342,7 +342,7 @@ fn_fastdl_source() { fi cp "${fastdlfile}" "${fastdldir}/${copytodir}" exitcode=$? - if [ "${exitcode}" != 0 ]; then + if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl fn_script_log_fail "Copying ${fastdlfile} > ${fastdldir}/${copytodir}" core_exit.sh @@ -360,8 +360,8 @@ fn_fastdl_source() { # Builds the fastdl directory content. fn_fastdl_build() { - # Copy all needed files for FastDL. - echo -e "copying files to ${fastdldir}" + # Copy all needed files for Fastdl. + fn_print_nl "copying files to ${fastdldir}" fn_script_log_info "Copying files to ${fastdldir}" if [ "${shortname}" == "gmod" ]; then fn_fastdl_gmod @@ -371,14 +371,14 @@ fn_fastdl_build() { fi } -# Generate lua file that will force download any file into the FastDL directory. +# 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}..." + fn_print "removing existing download enforcer: ${luafastdlfile}" rm -f "${luafastdlfullpath:?}" exitcode=$? - if [ "${exitcode}" != 0 ]; then + if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl fn_script_log_fail "Removing existing download enforcer ${luafastdlfullpath}" core_exit.sh @@ -389,14 +389,14 @@ fn_fastdl_gmod_dl_enforcer() { fi # Generate new one if user said yes. if [ "${luaresource}" == "on" ]; then - echo -en "creating new download enforcer: ${luafastdlfile}..." + fn_print "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 + if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl fn_script_log_fail "Creating new download enforcer ${luafastdlfullpath}" core_exit.sh @@ -407,21 +407,21 @@ fn_fastdl_gmod_dl_enforcer() { fi } -# Compresses FastDL files using bzip2. +# Compresses Fastdl files using bzip2. fn_fastdl_bzip2() { while read -r filetocompress; do - echo -en "\r\033[Kcompressing ${filetocompress}..." + fn_print "compressing ${filetocompress}" bzip2 -f "${filetocompress}" exitcode=$? - if [ "${exitcode}" != 0 ]; then + if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl fn_script_log_fail "Compressing ${filetocompress}" core_exit.sh else + fn_print_ok_eol_nl fn_script_log_pass "Compressing ${filetocompress}" fi done < <(find "${fastdldir:?}" \( -type f ! -name "*.bz2" \)) - fn_print_ok_eol_nl } check.sh @@ -434,9 +434,9 @@ if [ "${engine}" == "source" ]; then fn_fastdl_bzip2 fi # Finished message. -echo -e "FastDL files are located in:" -echo -e "${fastdldir}" -echo -e "FastDL completed" -fn_script_log_info "FastDL completed" +fn_print_nl "Fastdl files are located in:" +fn_print_nl "${fastdldir}" +fn_print_nl "Fastdl completed" +fn_script_log_info "Fastdl completed" core_exit.sh diff --git a/lgsm/modules/command_install.sh b/lgsm/modules/command_install.sh index e8cba7560..8dc9a77df 100644 --- a/lgsm/modules/command_install.sh +++ b/lgsm/modules/command_install.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM command_install.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Overall module for the installer. @@ -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_install_resources_mta.sh b/lgsm/modules/command_install_resources_mta.sh index 31a9165fd..7eca4fb97 100644 --- a/lgsm/modules/command_install_resources_mta.sh +++ b/lgsm/modules/command_install_resources_mta.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM command_install_resources_mta.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Installs the default resources for Multi Theft Auto. @@ -12,7 +12,7 @@ fn_firstcommand_set fn_install_resources() { echo -e "" - echo -e "${lightyellow}Installing Default Resources${default}" + echo -e "${bold}${lightyellow}Installing Default Resources${default}" 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}" diff --git a/lgsm/modules/command_mods_install.sh b/lgsm/modules/command_mods_install.sh index 80c61cb77..e76f3f1fa 100644 --- a/lgsm/modules/command_mods_install.sh +++ b/lgsm/modules/command_mods_install.sh @@ -1,12 +1,12 @@ #!/bin/bash # LinuxGSM command_mods_install.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://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" +commandaction="Installing Mods" moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set diff --git a/lgsm/modules/command_mods_remove.sh b/lgsm/modules/command_mods_remove.sh index 78320ec3e..589046b11 100644 --- a/lgsm/modules/command_mods_remove.sh +++ b/lgsm/modules/command_mods_remove.sh @@ -1,12 +1,12 @@ #!/bin/bash # LinuxGSM command_mods_uninstall.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://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" +commandaction="Removing Mods" moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set @@ -71,8 +71,8 @@ while [ "${modfileline}" -le "${modsfilelistsize}" ]; do if [ -f "${modinstalldir}/${currentfileremove}" ] || [ -d "${modinstalldir}/${currentfileremove}" ]; then rm -rf "${modinstalldir:?}/${currentfileremove:?}" - ((exitcode = $?)) - if [ "${exitcode}" != 0 ]; then + exitcode=$? + if [ "${exitcode}" -ne 0 ]; then fn_script_log_fail "Removing ${modinstalldir}/${currentfileremove}" break else @@ -88,7 +88,7 @@ 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 + if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl core_exit.sh else @@ -103,7 +103,7 @@ echo -en "removing ${modcommand}-files.txt..." fn_sleep_time_1 rm -rf "${modsdir:?}/${modcommand}-files.txt" exitcode=$? -if [ "${exitcode}" != 0 ]; then +if [ "${exitcode}" -ne 0 ]; then fn_script_log_fail "Removing ${modsdir}/${modcommand}-files.txt" fn_print_fail_eol_nl core_exit.sh @@ -118,7 +118,7 @@ fn_sleep_time_1 sed -i "/^${modcommand}$/d" "${modsinstalledlistfullpath}" exitcode=$? -if [ "${exitcode}" != 0 ]; then +if [ "${exitcode}" -ne 0 ]; then fn_script_log_fail "Removing ${modcommand} from ${modsinstalledlist}" fn_print_fail_eol_nl core_exit.sh diff --git a/lgsm/modules/command_mods_update.sh b/lgsm/modules/command_mods_update.sh index cd5c3b03f..10279b67b 100644 --- a/lgsm/modules/command_mods_update.sh +++ b/lgsm/modules/command_mods_update.sh @@ -1,12 +1,12 @@ #!/bin/bash # LinuxGSM command_mods_update.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://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" +commandaction="Updating Mods" moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set diff --git a/lgsm/modules/command_monitor.sh b/lgsm/modules/command_monitor.sh index a18154948..5fa3c3000 100644 --- a/lgsm/modules/command_monitor.sh +++ b/lgsm/modules/command_monitor.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM command_monitor.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Monitors server by checking for running processes # then passes to gamedig and gsquery. @@ -18,10 +18,10 @@ fn_monitor_check_monitoring() { 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_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 "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." @@ -31,10 +31,10 @@ fn_monitor_check_monitoring() { fn_monitor_check_install() { 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_dots "Checking installer" fn_print_checking_eol fn_script_log_info "Checking installer: CHECKING" - fn_print_info "Checking installer: LinuxGSM is installing: " + 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 @@ -43,9 +43,9 @@ fn_monitor_check_install() { fn_monitor_check_debug() { 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_dots "Checking debug" fn_print_checking_eol - fn_print_info "Checking debug: Debug is running: " + fn_print_info "Checking debug: Debug is running" fn_print_info_eol_nl fn_script_log_pass "Checking debug: Debug is running" core_exit.sh @@ -54,9 +54,9 @@ fn_monitor_check_debug() { 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_dots "Checking details" fn_print_checking_eol - fn_print_info "Checking details: Details is running: " + 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 @@ -67,9 +67,9 @@ 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_dots "Checking start" fn_print_checking_eol - fn_print_warn "Checking start: Removing stale lockfile: " + fn_print_warn "Checking start: Removing stale lockfile" fn_print_warn_eol_nl fn_script_log_warn "Checking start: Removing stale lockfile" rm -f "${lockdir:?}/${selfname}-starting.lock" @@ -77,9 +77,9 @@ fn_monitor_check_starting() { fi 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_dots "Checking start" fn_print_checking_eol - fn_print_info "Checking start: LinuxGSM is starting: " + fn_print_info "Checking start: LinuxGSM is starting" fn_print_info_eol_nl fn_script_log_info "Checking backup: LinuxGSM is starting" core_exit.sh @@ -90,9 +90,9 @@ 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_dots "Checking stop" fn_print_checking_eol - fn_print_warn "Checking stop: Removing stale lockfile: " + fn_print_warn "Checking stop: Removing stale lockfile" fn_print_warn_eol_nl fn_script_log_warn "Checking stop: Removing stale lockfile" rm -f "${lockdir:?}/${selfname}-stopping.lock" @@ -100,9 +100,9 @@ fn_monitor_check_stopping() { fi 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_dots "Checking stop" fn_print_checking_eol - fn_print_info "Checking stop: LinuxGSM is stopping: " + fn_print_info "Checking stop: LinuxGSM is stopping" fn_print_info_eol_nl fn_script_log_info "Checking backup: LinuxGSM is stopping" core_exit.sh @@ -113,9 +113,9 @@ 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_dots "Checking backup" fn_print_checking_eol - fn_print_warn "Checking backup: Removing stale lockfile: " + 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" @@ -123,9 +123,9 @@ fn_monitor_check_backup() { fi 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_dots "Checking backup" fn_print_checking_eol - fn_print_info "Checking backup: Backup is running: " + fn_print_info "Checking backup: Backup is running" fn_print_info_eol_nl fn_script_log_info "Checking backup: Backup is running" core_exit.sh @@ -136,9 +136,9 @@ 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_dots "Checking update" fn_print_checking_eol - fn_print_warn "Checking update: Removing stale lockfile: " + fn_print_warn "Checking update: Removing stale lockfile" fn_print_warn_eol_nl fn_script_log_warn "Checking update: Removing stale lockfile" rm -f "${lockdir:?}/update.lock" @@ -146,9 +146,9 @@ fn_monitor_check_update() { fi 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_dots "Checking update" fn_print_checking_eol - fn_print_info "Checking update: LinuxGSM is updating the game server: " + fn_print_info "Checking update: LinuxGSM is updating the game server" fn_print_info_eol_nl fn_script_log_pass "Checking update: LinuxGSM is updating the game server" core_exit.sh @@ -159,22 +159,22 @@ fn_monitor_check_update() { 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_dots "Checking update" fn_print_checking_eol fn_script_log_info "Checking update: CHECKING" - fn_print_ok "Checking update: " + fn_print_ok "Checking update" fn_print_ok_eol_nl fn_script_log_info "Checking update: ${selfname} has requested an update and needs to be restarted" alert="update-request" alert.sh - command_update.sh + command_restart.sh core_exit.sh fi fi } fn_monitor_check_session() { - fn_print_dots "Checking session: " + fn_print_dots "Checking session" fn_print_checking_eol fn_script_log_info "Checking session: CHECKING" # Tmux session width and height needs to be reviewed as may no longer be required. @@ -182,7 +182,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: There are PIDS with identical tmux sessions running: " + 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" @@ -192,7 +192,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: PIDS with the same tmux session and socket names are running: " + 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" @@ -202,7 +202,7 @@ fn_monitor_check_session() { 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 "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" @@ -211,7 +211,7 @@ fn_monitor_check_session() { command_restart.sh core_exit.sh elif [ "${status}" != "0" ]; then - fn_print_ok "Checking 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. @@ -219,7 +219,7 @@ fn_monitor_check_session() { info_stats.sh fi else - fn_print_error "Checking session: " + fn_print_error "Checking session" fn_print_fail_eol_nl fn_script_log_fail "Checking session: FAIL" alert="monitor-session" @@ -233,7 +233,7 @@ fn_monitor_check_session() { # Monitor will check queryport is set before continuing. fn_monitor_check_queryport() { if [ -z "${queryport}" ] || [ "${queryport}" == "0" ]; then - fn_print_dots "Checking port: " + fn_print_dots "Checking port" fn_print_checking_eol fn_script_log_info "Checking port: CHECKING" if [ -n "${rconenabled}" ] && [ "${rconenabled}" != "true" ] && [ "${shortname}" == "av" ]; then @@ -266,12 +266,12 @@ fn_monitor_query() { 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_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}-started.lock")" -gt "$(date "+%s" -d "${querydelay} mins ago")" ]; then - fn_print_ok "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: " + 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" @@ -293,7 +293,7 @@ fn_monitor_query() { if [ "${querystatus}" == "0" ]; then # Server query OK. - fn_print_ok "Querying port: ${querymethod}: ${queryip}:${queryport} : ${totalseconds}/${queryattempt}: " + 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 @@ -323,14 +323,14 @@ fn_monitor_query() { core_exit.sh else # Server query FAIL. - fn_print_fail "Querying port: ${querymethod}: ${queryip}:${queryport} : ${totalseconds}/${queryattempt}: " + 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 "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. @@ -344,7 +344,8 @@ 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}" + fn_print_wait_eol fn_sleep_time_1 totalseconds=$((totalseconds + 1)) if [ "${seconds}" == "15" ]; then @@ -369,7 +370,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_postdetails.sh b/lgsm/modules/command_postdetails.sh index 3bfed78ed..7f5f67304 100644 --- a/lgsm/modules/command_postdetails.sh +++ b/lgsm/modules/command_postdetails.sh @@ -1,25 +1,23 @@ #!/bin/bash # LinuxGSM command_postdetails.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Strips sensitive information out of Details output. commandname="POST-DETAILS" -commandaction="Posting details" +commandaction="Post Details" moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set -posttarget="https://termbin.com" - -# source all of the modules defined in the details command. -info_messages.sh - fn_bad_postdetailslog() { fn_print_fail_nl "Unable to create temporary file ${postdetailslog}." core_exit.sh } +# source all of the modules defined in the details command. +info_messages.sh + # Remove any existing postdetails.log file. if [ -f "${postdetailslog}" ]; then rm -f "${postdetailslog:?}" @@ -60,18 +58,27 @@ else fi fn_print_dots "termbin.com" -link=$(cat "${postdetailslog}" | nc termbin.com 9999 | tr -d '\n\0') -fn_print_ok_nl "termbin.com for 30D" -fn_script_log_pass "termbin.com for 30D" -pdurl="${link}" +link=$(cat "${postdetailslog}" | { + nc -w 3 termbin.com 9999 + echo $? > /tmp/nc_exit_status +} | tr -d '\n\0') +nc_exit_status=$(cat /tmp/nc_exit_status) +if [ "${nc_exit_status}" -ne 0 ]; then + fn_print_error_nl "Failed to post to termbin.com" + fn_script_log_error "Failed to post to termbin.com" +else + fn_print_ok_nl "termbin.com for 30D" + fn_script_log_pass "termbin.com for 30D" + pdurl="${link}" -if [ "${firstcommandname}" == "POST-DETAILS" ]; then - echo -e "" - echo -e "Please share the following url for support: " - echo -e "${pdurl}" + if [ "${firstcommandname}" == "POST-DETAILS" ]; then + echo -e "" + echo -e "Please share the following url for support: " + echo -e "${italic}${pdurl}${default}" + fi + fn_script_log_info "${pdurl}" + alerturl="${pdurl}" fi -fn_script_log_info "${pdurl}" -alerturl="${pdurl}" if [ -z "${exitbypass}" ]; then core_exit.sh diff --git a/lgsm/modules/command_restart.sh b/lgsm/modules/command_restart.sh index ed60a5555..0a7f9b5f0 100644 --- a/lgsm/modules/command_restart.sh +++ b/lgsm/modules/command_restart.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM command_restart.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Restarts the server. @@ -10,6 +10,7 @@ commandaction="Restarting" moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set +check.sh info_game.sh exitbypass=1 command_stop.sh diff --git a/lgsm/modules/command_send.sh b/lgsm/modules/command_send.sh index cf6a9f08a..de021599d 100644 --- a/lgsm/modules/command_send.sh +++ b/lgsm/modules/command_send.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM command_send.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Send command to the server tmux console. @@ -26,8 +26,8 @@ if [ "${status}" != "0" ]; then fi echo "" fn_print_dots "Sending command to console: \"${commandtosend}\"" - tmux -L "${socketname}" send-keys -t "${sessionname}" "${commandtosend}" ENTER fn_print_ok_nl "Sending command to console: \"${commandtosend}\"" + tmux -L "${socketname}" send-keys -t "${sessionname}" "${commandtosend}" ENTER fn_script_log_pass "Command \"${commandtosend}\" sent to console" else fn_print_error_nl "Server not running" diff --git a/lgsm/modules/command_skeleton.sh b/lgsm/modules/command_skeleton.sh index 48a6bd187..b9f51205a 100644 --- a/lgsm/modules/command_skeleton.sh +++ b/lgsm/modules/command_skeleton.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM command_skeleton.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Creates an copy of a game servers directorys. @@ -16,7 +16,7 @@ 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 +if [ "${exitcode}" -ne 0 ]; then fn_print_fail_nl "Creating skeleton directory" fn_script_log_fail "Creating skeleton directory" else diff --git a/lgsm/modules/command_sponsor.sh b/lgsm/modules/command_sponsor.sh index ea49a3099..1915aa328 100755 --- a/lgsm/modules/command_sponsor.sh +++ b/lgsm/modules/command_sponsor.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM command_sponsor.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Shows ways to sponsor. @@ -11,7 +11,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set fn_print_ascii_logo -echo -e "${lightyellow}Support LinuxGSM${default}" +echo -e "${bold}${lightyellow}Support LinuxGSM${default}" fn_messages_separator echo -e "" echo -e "Been using LinuxGSM?" diff --git a/lgsm/modules/command_start.sh b/lgsm/modules/command_start.sh index f38125a5e..a4e07b44b 100644 --- a/lgsm/modules/command_start.sh +++ b/lgsm/modules/command_start.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM command_start.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Starts the server. @@ -80,7 +80,8 @@ fn_start_tmux() { # Enable console logging. if [ "${consolelogging}" == "on" ] || [ -z "${consolelogging}" ]; then - if [ "${logtimestamp}" == "on" ]; then + # timestamp will break mcb update check. + if [ "${logtimestamp}" == "on" ] && [ "${shortname}" != "mcb" ]; 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}'" @@ -126,12 +127,12 @@ fn_start_tmux() { echo -e "" echo -e " usermod -G tty $(whoami)" echo -e "" - echo -e "https://linuxgsm.com/tmux-op-perm" + echo -e "${italic}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" + echo -e "${italic}https://linuxgsm.com/support" fn_script_log_info "https://linuxgsm.com/support" fi fi @@ -175,7 +176,7 @@ check.sh # 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_print_skip_nl "${servername} is already running" fn_script_log_error "${servername} is already running" if [ -z "${exitbypass}" ]; then # Remove starting lockfile when command ends. diff --git a/lgsm/modules/command_stop.sh b/lgsm/modules/command_stop.sh index 3d534317a..f1edc3544 100644 --- a/lgsm/modules/command_stop.sh +++ b/lgsm/modules/command_stop.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM command_stop.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Stops the server. @@ -20,7 +20,7 @@ fn_stop_graceful_ctrlc() { for seconds in {1..30}; do check_status.sh if [ "${status}" == "0" ]; then - fn_print_ok "Graceful: CTRL+c: ${seconds}: " + 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 @@ -52,7 +52,7 @@ fn_stop_graceful_cmd() { for ((seconds = 1; seconds <= ${2}; seconds++)); do check_status.sh if [ "${status}" == "0" ]; then - fn_print_ok "Graceful: sending \"${1}\": ${seconds}: " + 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 @@ -85,7 +85,7 @@ fn_stop_graceful_goldsrc() { fn_sleep_time_1 fn_print_dots "Graceful: sending \"quit\": ${seconds}" done - fn_print_ok "Graceful: sending \"quit\": ${seconds}: " + 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 @@ -96,8 +96,8 @@ 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 ' + if [ -z "${telnetpassword}" ] || [ "${telnetpassword}" == "NOT SET" ]; then + sdtdtelnetshutdown=$(expect -c ' proc abort {} { puts "Timeout or EOF\n" exit 1 @@ -111,14 +111,14 @@ fn_stop_graceful_sdtd_telnet() { puts "Completed.\n" ') else - sdtd_telnet_shutdown=$(expect -c ' + sdtdtelnetshutdown=$(expect -c ' proc abort {} { puts "Timeout or EOF\n" exit 1 } spawn telnet '"${telnetip}"' '"${telnetport}"' expect { - "password:" { send "'"${telnetpass}"'\r" } + "password:" { send "'"${telnetpassword}"'\r" } default abort } expect { @@ -143,8 +143,8 @@ fn_stop_graceful_sdtd() { 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") + completed=$(echo -en "\n ${sdtdtelnetshutdown}" | grep "Completed.") + refused=$(echo -en "\n ${sdtdtelnetshutdown}" | grep "Timeout or EOF") if [ "${refused}" ]; then fn_print_error "Graceful: telnet: ${telnetip}:${telnetport} : " fn_print_fail_eol_nl @@ -159,7 +159,7 @@ fn_stop_graceful_sdtd() { 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") + refused=$(echo -en "\n ${sdtdtelnetshutdown}" | grep "Timeout or EOF") if [ "${refused}" ]; then fn_print_ok "Graceful: telnet: ${telnetip}:${telnetport} : " fn_print_ok_eol_nl @@ -185,7 +185,7 @@ fn_stop_graceful_sdtd() { 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 ${sdtdtelnetshutdown}" | tee -a "${lgsmlog}" echo -en "\n\n" | tee -a "${lgsmlog}" fi else @@ -195,6 +195,95 @@ fn_stop_graceful_sdtd() { fi } +# Attempts graceful shutdown of Soulmask using telnet. +fn_stop_graceful_sm() { + 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_sm_telnet + completed=$(echo -en "\n ${smtelnetshutdown}" | grep "Completed.") + refused=$(echo -en "\n ${smtelnetshutdown}" | 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_sm_telnet + refused=$(echo -en "\n ${smtelnetshutdown}" | 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" + if [ "${statusalert}" == "on" ] && [ "${firstcommandname}" == "STOP" ]; then + alert="stopped" + alert.sh + fi + break + fi + fn_sleep_time_1 + fn_print_dots "Graceful: telnet: ${seconds}" + done + # If telnet shutdown fails, show it and stop + 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 ${smtelnetshutdown}" | 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 +} + +# telnet command for soulmask graceful shutdown. +fn_stop_graceful_sm_telnet() { + smtelnetshutdown=$(expect -c ' + proc abort {} { + puts "Timeout or EOF\n" + exit 1 + } + spawn telnet '"${telnetip}"' '"${telnetport}"' + expect { + "Hello:" { send "saveworld 1\r" } + default abort + } + expect { + "the world is saved." { send "quit 1\r" } + default abort + } + expect { + "World is closing..." {} + default abort + } + expect { eof } + puts "Completed.\n" + ') +} + # Attempts graceful shutdown by sending /save /stop. fn_stop_graceful_avorion() { fn_print_dots "Graceful: /save /stop" @@ -208,7 +297,7 @@ fn_stop_graceful_avorion() { for seconds in {1..30}; do check_status.sh if [ "${status}" == "0" ]; then - fn_print_ok "Graceful: /save /stop: ${seconds}: " + 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 @@ -253,6 +342,8 @@ fn_stop_graceful_select() { fn_stop_graceful_cmd "end" 30 elif [ "${stopmode}" == "12" ]; then fn_stop_graceful_cmd "shutdown" 30 + elif [ "${stopmode}" == "13" ]; then + fn_stop_graceful_sm fi } @@ -279,7 +370,7 @@ fn_stop_tmux() { # Checks if the server is already stopped. fn_stop_pre_check() { if [ "${status}" == "0" ]; then - fn_print_info_nl "${servername} is already stopped" + fn_print_skip_nl "${servername} is already stopped" fn_script_log_info "${servername} is already stopped" else # Select graceful shutdown. diff --git a/lgsm/modules/command_test_alert.sh b/lgsm/modules/command_test_alert.sh index 15f481391..becb365a3 100644 --- a/lgsm/modules/command_test_alert.sh +++ b/lgsm/modules/command_test_alert.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM command_test_alert.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Sends a test alert. diff --git a/lgsm/modules/command_ts3_server_pass.sh b/lgsm/modules/command_ts3_server_pass.sh index 0223a877c..f5fad684e 100644 --- a/lgsm/modules/command_ts3_server_pass.sh +++ b/lgsm/modules/command_ts3_server_pass.sh @@ -1,12 +1,12 @@ #!/bin/bash # LinuxGSM command_ts3_server_pass.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Changes TS3 serveradmin password. commandname="CHANGE-PASSWORD" -commandaction="Changing password" +commandaction="Changing Password" moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set diff --git a/lgsm/modules/command_update.sh b/lgsm/modules/command_update.sh index e1fcec97f..6bb30a4c8 100644 --- a/lgsm/modules/command_update.sh +++ b/lgsm/modules/command_update.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM command_update.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Handles updating of servers. @@ -33,6 +33,8 @@ elif [ "${shortname}" == "vints" ]; then update_vints.sh elif [ "${shortname}" == "ut99" ]; then update_ut99.sh +elif [ "${shortname}" == "xnt" ]; then + update_xnt.sh else update_steamcmd.sh fi diff --git a/lgsm/modules/command_update_linuxgsm.sh b/lgsm/modules/command_update_linuxgsm.sh index 9cd66430c..3299be509 100644 --- a/lgsm/modules/command_update_linuxgsm.sh +++ b/lgsm/modules/command_update_linuxgsm.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM command_update_linuxgsm.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Deletes the modules dir to allow re-downloading of modules from GitHub. @@ -13,16 +13,25 @@ fn_firstcommand_set fn_print_dots "" check.sh info_distro.sh +info_game.sh + +# Prevent github from using a cached version of the file if dev-debug is enabled. +if [ -f "${rootdir}/.dev-debug" ]; then + nocache="-H \"Cache-Control: no-cache\" -H \"Pragma: no-cache\"" +fi 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 + +curl ${nocache} --connect-timeout 3 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh" 1> /dev/null +exitcode=$? +if [ "${exitcode}" -ne "0" ]; then + curl ${nocache} --connect-timeout 3 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh" 1> /dev/null + exitcode=$? + if [ "${exitcode}" -ne "0" ]; then fn_print_fail_nl "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 @@ -36,62 +45,64 @@ else fi # Check linuxsm.sh -echo -en "checking ${remotereponame} linuxgsm.sh...\c" +echo -en "checking ${remotereponame} script [ ${italic}linuxgsm.sh${default} ]\c" if [ "${remotereponame}" == "GitHub" ]; then - curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh" 1> /dev/null + curl ${nocache} --connect-timeout 3 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh" 1> /dev/null else - curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh" 1> /dev/null + curl ${nocache} --connect-timeout 3 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh" 1> /dev/null fi -if [ $? != "0" ]; then +exitcode=$? +if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl fn_script_log_fail "Checking ${remotereponame} linuxgsm.sh" - fn_script_log_fail "Curl returned error: $?" + fn_script_log_fail "Curl returned error: ${exitcode}" 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")) + tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(curl ${nocache} --connect-timeout 3 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh")) else - tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(curl --connect-timeout 10 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh")) + tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(curl ${nocache} --connect-timeout 3 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh")) fi if [ "${tmp_script_diff}" != "" ]; then fn_print_update_eol_nl - fn_script_log_update "Checking ${remotereponame} linuxgsm.sh" + fn_script_log "Checking ${remotereponame} script 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" + fn_print_skip_eol_nl + fn_script_log_pass "Checking ${remotereponame} script 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" +echo -en "checking script [ ${italic}${selfname}${default} ]\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}" + fn_script_log "Checking script ${selfname}" + echo -en "backup ${selfname}\c" + fn_script_log_info "Backup script ${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 + exitcode=$? + if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl fn_script_log_fail "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 script${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" + echo -en "copying ${selfname}" fn_script_log_info "Copying ${selfname}" cp "${tmpdir}/linuxgsm.sh" "${rootdir}/${selfname}" sed -i "s+shortname=\"core\"+shortname=\"${shortname}\"+g" "${rootdir}/${selfname}" @@ -101,7 +112,8 @@ if [ "${script_diff}" != "" ]; then sed -i "s+githubrepo=\"LinuxGSM\"+githubrepo=\"${githubrepo}\"+g" "${rootdir}/${selfname}" sed -i "s+githubbranch=\"master\"+githubbranch=\"${githubbranch}\"+g" "${rootdir}/${selfname}" - if [ $? != "0" ]; then + exitcode=$? + if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl fn_script_log_fail "copying ${selfname}" core_exit.sh @@ -110,72 +122,74 @@ if [ "${script_diff}" != "" ]; then fn_script_log_pass "copying ${selfname}" fi else - fn_print_ok_eol_nl + fn_print_skip_eol_nl fn_script_log_info "Checking ${selfname}" fi # Check _default.cfg. -echo -en "checking ${remotereponame} config _default.cfg...\c" +echo -en "checking ${remotereponame} config [ ${italic}_default.cfg${default} ]\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 ${nocache} --connect-timeout 3 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg" 1> /dev/null else - curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg" 1> /dev/null + curl ${nocache} --connect-timeout 3 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg" 1> /dev/null fi -if [ $? != "0" ]; then +exitcode=$? +if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl fn_script_log_fail "Checking ${remotereponame} config _default.cfg" - fn_script_log_fail "Curl returned error: $?" + fn_script_log_fail "Curl returned error: ${exitcode}" 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")) + config_file_diff=$(diff "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" <(curl ${nocache} --connect-timeout 3 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg")) else - config_file_diff=$(diff "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" <(curl --connect-timeout 10 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg")) + config_file_diff=$(diff "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" <(curl ${nocache} --connect-timeout 3 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg")) fi if [ "${config_file_diff}" != "" ]; then fn_print_update_eol_nl - fn_script_log_update "Checking ${remotereponame} config _default.cfg" + fn_script_log "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_print_skip_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" + echo -en "checking ${remotereponame} config [ ${italic}${distroid}-${distroversioncsv}.csv${default} ]\c" fn_script_log_info "Checking ${remotereponame} ${distroid}-${distroversioncsv}.csv" if [ "${remotereponame}" == "GitHub" ]; then - curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv" 1> /dev/null + curl ${nocache} --connect-timeout 3 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv" 1> /dev/null else - curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv" 1> /dev/null + curl ${nocache} --connect-timeout 3 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv" 1> /dev/null fi - if [ $? != "0" ]; then + exitcode=$? + if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl fn_script_log_fail "Checking ${remotereponame} ${distroid}-${distroversioncsv}.csv" - fn_script_log_fail "Curl returned error: $?" + fn_script_log_fail "Curl returned error: ${exitcode}" 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")) + config_file_diff=$(diff "${datadir}/${distroid}-${distroversioncsv}.csv" <(curl ${nocache} --connect-timeout 3 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv")) else - config_file_diff=$(diff "${datadir}/${distroid}-${distroversioncsv}.csv" <(curl --connect-timeout 10 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv")) + config_file_diff=$(diff "${datadir}/${distroid}-${distroversioncsv}.csv" <(curl ${nocache} --connect-timeout 3 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv")) fi if [ "${config_file_diff}" != "" ]; then fn_print_update_eol_nl - fn_script_log_update "Checking ${remotereponame} ${distroid}-${distroversioncsv}.csv" + fn_script_log "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" + fn_fetch_file_github "${datadir}" "${distroid}-${distroversioncsv}.csv" "${datadir}" "nochmodx" "norun" "noforce" "nohash" else - fn_print_ok_eol_nl + fn_print_skip_eol_nl fn_script_log_pass "Checking ${remotereponame} ${distroid}-${distroversioncsv}.csv" fi fi @@ -187,14 +201,15 @@ if [ -n "${modulesdir}" ]; then 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" + echo -en "checking ${remotereponame} module [ ${italic}${modulefile}${default} ]\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 + curl ${nocache} --connect-timeout 3 -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 + curl ${nocache} --connect-timeout 3 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${modulefile}" 1> /dev/null fi - if [ $? != 0 ]; then + exitcode=$? + if [ "${exitcode}" -ne 0 ]; then fn_print_error_eol_nl fn_script_log_error "Checking ${remotereponame} module ${modulefile}" echo -en "removing module ${modulefile}...\c" @@ -209,19 +224,19 @@ if [ -n "${modulesdir}" ]; then 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}")) + module_file_diff=$(diff "${modulesdir}/${modulefile}" <(curl ${nocache} --connect-timeout 3 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${modulefile}")) else - module_file_diff=$(diff "${modulesdir}/${modulefile}" <(curl --connect-timeout 10 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${modulefile}")) + module_file_diff=$(diff "${modulesdir}/${modulefile}" <(curl ${nocache} --connect-timeout 3 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${modulefile}")) fi # results if [ "${module_file_diff}" != "" ]; then fn_print_update_eol_nl - fn_script_log_update "Checking ${remotereponame} module ${modulefile}" + fn_script_log "Checking ${remotereponame} module ${modulefile}" rm -rf "${modulesdir:?}/${modulefile}" fn_update_module else - fn_print_ok_eol_nl + fn_print_skip_eol_nl fn_script_log_pass "Checking ${remotereponame} module ${modulefile}" fi fi diff --git a/lgsm/modules/command_validate.sh b/lgsm/modules/command_validate.sh index d3511d7bb..30c20e96e 100644 --- a/lgsm/modules/command_validate.sh +++ b/lgsm/modules/command_validate.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM command_validate.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Runs a server validation. @@ -11,18 +11,18 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set fn_validate() { - fn_print_warn "Validate might overwrite some customised files" + fn_print_warn ": SteamCMD: 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}" + fn_print_warn ": SteamCMD: Validate might overwrite some customised files: ${totalseconds}" totalseconds=$((totalseconds - 1)) fn_sleep_time_1 if [ "${seconds}" == "0" ]; then break fi done - fn_print_warn_nl "Validate might overwrite some customised files" + fn_print_warn_nl ": SteamCMD: Validate might overwrite some customised files" date '+%s' > "${lockdir:?}/update.lock" fn_dl_steamcmd } diff --git a/lgsm/modules/command_wipe.sh b/lgsm/modules/command_wipe.sh index 378dae0ec..21023d17d 100644 --- a/lgsm/modules/command_wipe.sh +++ b/lgsm/modules/command_wipe.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM command_backup.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Wipes server data, useful after updates for some games like Rust. @@ -13,7 +13,7 @@ fn_firstcommand_set # Provides an exit code upon error. fn_wipe_exit_code() { exitcode=$? - if [ "${exitcode}" != 0 ]; then + if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl core_exit.sh else @@ -29,14 +29,14 @@ fn_wipe_files() { # 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_print "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_print_nl "no .map file(s) to remove" fn_sleep_time fn_script_log_pass "no .map file(s) to remove" fi @@ -44,14 +44,14 @@ fn_wipe_files() { # 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_print "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_print_nl "no .sav file(s) to remove" fn_script_log_pass "no .sav file(s) to remove" fn_sleep_time fi @@ -60,14 +60,14 @@ fn_wipe_files() { # 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_print "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_print_nl "no .db file(s) to remove" fn_sleep_time fn_script_log_pass "no .db file(s) to remove" fi @@ -104,13 +104,13 @@ fn_full_wipe_warning() { 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. +# If the seed is not defined by the user, generate a seed file. 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_print "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 @@ -120,21 +120,21 @@ fn_wipe_random_seed() { # 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: " + fn_print "* 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: " + fn_print "* 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: " + fn_print "* Change Procedural Map seed " if [ -n "${randomseed}" ]; then fn_print_yes_eol_nl else @@ -142,10 +142,9 @@ fn_wipe_details() { fi } -fn_print_dots "" check.sh fix_rust.sh - +fn_print_dots "" # 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 @@ -165,7 +164,7 @@ if [ -n "$(find "${serveridentitydir}" -type f -name "*.map")" ] || [ -n "$(find fn_firstcommand_reset fn_wipe_files fn_wipe_random_seed - fn_print_complete_nl "${wipetype}" + fn_print_success_nl "${wipetype}" fn_script_log_pass "${wipetype}" alert="wipe" alert.sh @@ -175,7 +174,7 @@ if [ -n "$(find "${serveridentitydir}" -type f -name "*.map")" ] || [ -n "$(find else fn_wipe_files fn_wipe_random_seed - fn_print_complete_nl "${wipetype}" + fn_print_success_nl "${wipetype}" fn_script_log_pass "${wipetype}" alert="wipe" alert.sh diff --git a/lgsm/modules/compress_unreal2_maps.sh b/lgsm/modules/compress_unreal2_maps.sh index f67ac7010..58824cbc7 100644 --- a/lgsm/modules/compress_unreal2_maps.sh +++ b/lgsm/modules/compress_unreal2_maps.sh @@ -1,12 +1,12 @@ #!/bin/bash # LinuxGSM compress_unreal2_maps.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Compresses unreal maps. commandname="MAP-COMPRESSOR" -commandaction="Compressing maps" +commandaction="Compressing Maps" moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set diff --git a/lgsm/modules/compress_ut99_maps.sh b/lgsm/modules/compress_ut99_maps.sh index 51bbd386a..885c32d9a 100644 --- a/lgsm/modules/compress_ut99_maps.sh +++ b/lgsm/modules/compress_ut99_maps.sh @@ -1,12 +1,12 @@ #!/bin/bash # LinuxGSM compress_ut99_maps.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Compresses unreal maps. commandname="MAP-COMPRESSOR" -commandaction="Compressing maps" +commandaction="Compressing Maps" moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set diff --git a/lgsm/modules/core_dl.sh b/lgsm/modules/core_dl.sh index caca0fc58..3b9ec9945 100644 --- a/lgsm/modules/core_dl.sh +++ b/lgsm/modules/core_dl.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM core_dl.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Deals with all downloads for LinuxGSM. @@ -20,6 +20,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_dl_steamcmd() { + remotelocation="SteamCMD" fn_print_start_nl "${remotelocation}" fn_script_log_info "${commandaction} ${selfname}: ${remotelocation}" if [ -n "${branch}" ]; then @@ -53,7 +54,7 @@ fn_dl_steamcmd() { rm -f "${steamcmdlog:?}" fi counter=0 - while [ "${counter}" == "0" ] || [ "${exitcode}" != "0" ]; do + while [ "${counter}" -eq 0 ] || [ "${exitcode}" -ne 0 ]; do counter=$((counter + 1)) # Select SteamCMD parameters # If GoldSrc (appid 90) servers. GoldSrc (appid 90) require extra commands. @@ -127,16 +128,19 @@ fn_dl_steamcmd() { 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" + elif [ -n "$(grep "0x6A6" "${steamcmdlog}" | tail -1)" ]; then + fn_print_error2_nl "${commandaction} ${selfname}: ${remotelocation}: Corrupt update files" + fn_script_log_error "${commandaction} ${selfname}: ${remotelocation}: Corrupt 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" + fn_print_nl "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}" -ne 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_print_success_nl "${commandaction} ${selfname}: ${remotelocation}" fn_script_log_pass "${commandaction} ${selfname}: ${remotelocation}" fi @@ -150,16 +154,16 @@ fn_dl_steamcmd() { # Emptys contents of the LinuxGSM tmpdir. fn_clear_tmp() { - echo -en "clearing LinuxGSM tmp directory..." + echo -en "clearing tmp directory [ ${italic}${tmpdir}${default} ]" if [ -d "${tmpdir}" ]; then rm -rf "${tmpdir:?}/"* - local exitcode=$? - if [ "${exitcode}" != 0 ]; then + exitcode=$? + if [ "${exitcode}" -ne 0 ]; then fn_print_error_eol_nl - fn_script_log_error "clearing LinuxGSM tmp directory" + fn_script_log_error "clearing tmp directory ${tmpdir}" else fn_print_ok_eol_nl - fn_script_log_pass "clearing LinuxGSM tmp directory" + fn_script_log_pass "clearing tmp directory ${tmpdir}" fi fi } @@ -251,13 +255,16 @@ fn_dl_extract() { fi elif [ "${mime}" == "application/zip" ]; then if [ -n "${extractsrc}" ]; then - extractcmd=$(unzip -qoj -d "${extractdest}" "${local_filedir}/${local_filename}" "${extractsrc}"/*) + temp_extractdir="${tmpdir}/Xonotic" + extractcmd=$(unzip -qo "${local_filedir}/${local_filename}" "${extractsrc}/*" -d "${temp_extractdir}") + find "${temp_extractdir}/${extractsrc}" -mindepth 1 -maxdepth 1 -exec mv -t "${extractdest}" {} + + rm -rf "${temp_extractdir}" else extractcmd=$(unzip -qo -d "${extractdest}" "${local_filedir}/${local_filename}") fi fi - local exitcode=$? - if [ "${exitcode}" != 0 ]; then + exitcode=$? + if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl fn_script_log_fail "Extracting ${local_filename}" if [ -f "${lgsmlog}" ]; then @@ -274,11 +281,11 @@ fn_dl_extract() { # Trap to remove file download if canceled before completed. fn_fetch_trap() { echo -e "" - echo -en "downloading ${local_filename}..." + echo -en "downloading ${local_filename}" fn_print_canceled_eol_nl fn_script_log_info "Downloading ${local_filename}...CANCELED" rm -f "${local_filedir:?}/${local_filename}" - echo -en "downloading ${local_filename}..." + echo -en "downloading ${local_filename}" fn_print_removed_eol_nl fn_script_log_info "Downloading ${local_filename}...REMOVED" core_exit.sh @@ -310,12 +317,12 @@ fn_check_file() { fileurl_name="${remote_fileurl_backup_name}" fi counter=$((counter + 1)) - echo -en "checking ${fileurl_name} ${remote_filename}...\c" + echo -e "checking ${fileurl_name} ${remote_filename}\c" curlcmd=$(curl --output /dev/null --silent --head --fail "${fileurl}" 2>&1) - local exitcode=$? + exitcode=$? # On first try will error. On second try will fail. - if [ "${exitcode}" != 0 ]; then + if [ "${exitcode}" -ne 0 ]; then if [ ${counter} -ge 2 ]; then fn_print_fail_eol_nl if [ -f "${lgsmlog}" ]; then @@ -376,6 +383,7 @@ fn_fetch_file() { 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}" @@ -390,21 +398,21 @@ fn_fetch_file() { 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) + curlcmd=(curl --connect-timeout 3 --fail -L -o "${local_filedir}/${local_filename}" --retry 2 -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.${randomint}.212 Safari/537.36") # 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}..." + echo -e "downloading file [ ${italic}${local_filename}${default} ]" fn_sleep_time - echo -en "\033[1K" "${curlcmd[@]}" --progress-bar "${fileurl}" 2>&1 - exitcode="$?" + exitcode=$? + echo -en "downloading file [ ${italic}${local_filename}${default} ]" else - echo -en "fetching ${fileurl_name} ${local_filename}...\c" + echo -en "fetching ${fileurl_name} [ ${italic}${local_filename}${default} ]\c" "${curlcmd[@]}" --silent --show-error "${fileurl}" 2>&1 - exitcode="$?" + exitcode=$? fi # Download will fail if downloads a html file. @@ -416,7 +424,7 @@ fn_fetch_file() { fi # On first try will error. On second try will fail. - if [ "${exitcode}" != 0 ]; then + if [ "${exitcode}" -ne 0 ]; then if [ ${counter} -ge 2 ]; then fn_print_fail_eol_nl if [ -f "${lgsmlog}" ]; then diff --git a/lgsm/modules/core_exit.sh b/lgsm/modules/core_exit.sh index 989a4c543..5f55dfcd1 100644 --- a/lgsm/modules/core_exit.sh +++ b/lgsm/modules/core_exit.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM core_exit.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Handles exiting of LinuxGSM by running and reporting an exit code. @@ -27,14 +27,14 @@ fi if [ "${exitbypass}" ]; then unset exitbypass -elif [ "${exitcode}" != "0" ]; then +elif [ "${exitcode}" -ne 0 ]; then # List LinuxGSM version in logs fn_script_log_info "LinuxGSM version: ${version}" - if [ "${exitcode}" == "1" ]; then + if [ "${exitcode}" -eq 1 ]; then fn_script_log_fail "${moduleselfname} exiting with code: ${exitcode}" - elif [ "${exitcode}" == "2" ]; then + elif [ "${exitcode}" -eq 2 ]; then fn_script_log_error "${moduleselfname} exiting with code: ${exitcode}" - elif [ "${exitcode}" == "3" ]; then + elif [ "${exitcode}" -eq 3 ]; then fn_script_log_warn "${moduleselfname} exiting with code: ${exitcode}" else # if exit code is not set assume error. @@ -45,7 +45,7 @@ elif [ "${exitcode}" != "0" ]; then # remove trap. trap - INT exit "${exitcode}" -elif [ "${exitcode}" ] && [ "${exitcode}" == "0" ]; then +elif [ "${exitcode}" ] && [ "${exitcode}" -eq 0 ]; then # List LinuxGSM version in logs fn_script_log_info "LinuxGSM version: ${version}" fn_script_log_pass "${moduleselfname} exiting with code: ${exitcode}" diff --git a/lgsm/modules/core_getopt.sh b/lgsm/modules/core_getopt.sh index e97eac0e8..8997ff3a0 100644 --- a/lgsm/modules/core_getopt.sh +++ b/lgsm/modules/core_getopt.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM core_getopt.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: getopt arguments. @@ -50,11 +50,13 @@ 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.") cmd_dev_query_raw=("qr;query-raw" "command_dev_query_raw.sh" "The raw output of gamedig and gsquery.") +cmd_dev_ui=("ui;ui" "command_dev_ui.sh" "Assist with UI development.") cmd_dev_clear_modules=("cm;clear-modules" "command_dev_clear_modules.sh" "Delete the contents of the modules dir.") ### Set specific opt here. @@ -146,7 +148,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_ui[@]}" "${cmd_dev_clear_modules[@]}") fi ## Sponsor. @@ -164,19 +166,19 @@ 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}" + fn_print_nl "Usage: $0 [option]" + fn_print_nl "" + fn_print_nl "LinuxGSM - ${gamename} - Version ${version}" + fn_print_nl "https://linuxgsm.com/${gameservername}" + fn_print_nl "" + fn_print_nl "${bold}${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]}" + fn_print_nl "${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 diff --git a/lgsm/modules/core_github.sh b/lgsm/modules/core_github.sh index 7290f9bdf..3b3a96c0f 100644 --- a/lgsm/modules/core_github.sh +++ b/lgsm/modules/core_github.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM core_github.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: core module file for updates via github @@ -23,7 +23,7 @@ fn_github_get_latest_release_version() { 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 3 "${githublatestreleaseurl}" | jq '.tag_name') # error if no version is there if [ -z "${githubreleaseversion}" ]; then diff --git a/lgsm/modules/core_legacy.sh b/lgsm/modules/core_legacy.sh index cf11e3a54..1d5bc430c 100644 --- a/lgsm/modules/core_legacy.sh +++ b/lgsm/modules/core_legacy.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM core_legacy.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Code for backwards compatability with older versions of LinuxGSM. @@ -35,6 +35,12 @@ if [ -n "${autosaveinterval}" ]; then saveinterval="${autosaveinterval}" fi +if [ "${shortname}" == "st" ]; then + if [ -n "${worldname}" ]; then + worldsave="${worldname}" + 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/lgsm/modules/core_logs.sh b/lgsm/modules/core_logs.sh index 3166041ae..7b435b563 100644 --- a/lgsm/modules/core_logs.sh +++ b/lgsm/modules/core_logs.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM core_logs.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Acts as a log rotator, removing old logs. diff --git a/lgsm/modules/core_messages.sh b/lgsm/modules/core_messages.sh index 6488c02bc..37c2e98b5 100644 --- a/lgsm/modules/core_messages.sh +++ b/lgsm/modules/core_messages.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM core_messages.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Defines on-screen messages such as [ OK ] and how script logs look. @@ -31,9 +31,17 @@ fn_ansi_loader() { darkgrey="\e[90m" lightgrey="\e[37m" white="\e[97m" - # erase to end of line. + # erase to end of line. creeol+="\033[K" fi + # carriage return & erase to end of line. + creeol="\r\033[K" + + bold="\e[1m" + dim="\e[2m" + italic="\e[3m" + underline="\e[4m" + reverse="\e[7m" } fn_sleep_time() { @@ -71,216 +79,141 @@ fn_script_log() { ## 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 + fn_script_log "PASS: ${1}" exitcode=0 } ## Feb 28 14:56:58 ut99-server: Monitor: 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}" - else - echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: FATAL: ${1}" >> "${lgsmlog}" - fi - fi + fn_script_log "FAIL: ${1}" 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 + fn_script_log "ERROR: ${1}" 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 + fn_script_log "WARN: ${1}" 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 + fn_script_log "INFO: ${1}" } # On-Screen - Automated functions ################################## -# [ .... ] -fn_print_dots() { +fn_print() { + echo -en "$*${default}" +} + +fn_print_nl() { + echo -e "$*${default}" +} + +# Helper function to print messages with a specific format and color +fn_print_message() { + local type="$1" + local color="$2" + local message="$3" if [ "${commandaction}" ]; then - echo -en "${creeol}[ .... ] ${commandaction} ${selfname}: $*" + echo -en "${bold}${creeol}[${color} ${type} ${default}]${default} ${commandaction} ${selfname}: ${message}${default}" else - echo -en "${creeol}[ .... ] $*" + echo -en "${bold}${cree}[${color} ${type} ${default}]${default} ${message}${default}" fi - fn_sleep_time_05 + fn_sleep_time } -fn_print_dots_nl() { +fn_print_message_nl() { + local type="$1" + local color="$2" + local message="$3" if [ "${commandaction}" ]; then - echo -e "${creeol}[ .... ] ${commandaction} ${selfname}: $*" + echo -e "${bold}${creeol}[${color} ${type} ${default}]${default} ${commandaction} ${selfname}: ${message}${default}" else - echo -e "${creeol}[ .... ] $*" + echo -e "${bold}${creeol}[${color} ${type} ${default}]${default} ${message}${default}" fi + fn_sleep_time +} + +# [ .... ] +fn_print_dots() { + fn_print_message "...." "${default}" "$*" + fn_sleep_time_05 +} + +fn_print_dots_nl() { + fn_print_message_nl "...." "${default}" "$*" fn_sleep_time_05 - 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_message " OK " "${green}" "$*" } 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" + fn_print_message_nl " OK " "${green}" "$*" } # [ 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_message "FAIL" "${red}" "$*" } 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" + fn_print_message_nl "FAIL" "${red}" "$*" } # [ 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_message "ERROR" "${red}" "$*" } 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" + fn_print_message_nl "ERROR" "${red}" "$*" } # [ 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_message "WARN" "${lightyellow}" "$*" } 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" + fn_print_message_nl "WARN" "${lightyellow}" "$*" } # [ 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_message "INFO" "${cyan}" "$*" } 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" + fn_print_message_nl "INFO" "${cyan}" "$*" +} + +# [ SKIP ] +fn_print_skip() { + fn_print_message "SKIP" "${cyan}" "$*" +} + +fn_print_skip_nl() { + fn_print_message_nl "SKIP" "${cyan}" "$*" } # [ 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_message "START" "${lightgreen}" "$*" } 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" + fn_print_message_nl "START" "${lightgreen}" "$*" } # On-Screen - Interactive messages @@ -304,63 +237,75 @@ fn_print_header() { fn_messages_separator } -# Complete! -fn_print_complete() { - echo -en "${green}Complete!${default} $*" +# Success! +fn_print_success() { + echo -en "${green}Success!${default} $*${default}" fn_sleep_time } -fn_print_complete_nl() { - echo -e "${green}Complete!${default} $*" +fn_print_success_nl() { + echo -e "${green}Success!${default} $*${default}" fn_sleep_time } # Failure! fn_print_failure() { - echo -en "${red}Failure!${default} $*" + echo -en "${red}Failure!${default} $*${default}" fn_sleep_time } fn_print_failure_nl() { - echo -e "${red}Failure!${default} $*" + echo -e "${red}Failure!${default} $*${default}" fn_sleep_time } # Error! fn_print_error2() { - echo -en "${red}Error!${default} $*" + echo -en "${red}Error!${default} $*${default}" fn_sleep_time } fn_print_error2_nl() { - echo -e "${red}Error!${default} $*" + echo -e "${red}Error!${default} $*${default}" fn_sleep_time } # Warning! fn_print_warning() { - echo -en "${lightyellow}Warning!${default} $*" + echo -en "${lightyellow}Warning!${default} $*${default}" fn_sleep_time } fn_print_warning_nl() { - echo -e "${lightyellow}Warning!${default} $*" + echo -e "${lightyellow}Warning!${default} $*${default}" fn_sleep_time } # Information! fn_print_information() { - echo -en "${cyan}Information!${default} $*" + echo -en "${cyan}Information!${default} $*${default}" fn_sleep_time } fn_print_information_nl() { - echo -e "${cyan}Information!${default} $*" + echo -e "${cyan}Information!${default} $*${default}" + fn_sleep_time +} + +# Skip! +fn_print_skip2() { + echo -en "${cyan}Skip!${default} $*${default}" + fn_sleep_time +} + +fn_print_skip2_nl() { + echo -e "${cyan}Skip!${default} $*${default}" fn_sleep_time } # Y/N Prompt fn_prompt_yn() { + echo -e "" local prompt="$1" local initial="$2" @@ -400,155 +345,166 @@ fn_prompt_message() { # YES fn_print_yes_eol() { - echo -en "${cyan}YES${default}" + echo -en " ... ${cyan}YES${default}" fn_sleep_time } fn_print_yes_eol_nl() { - echo -e "${cyan}YES${default}" + echo -e " ... ${cyan}YES${default}" fn_sleep_time } # NO fn_print_no_eol() { - echo -en "${red}NO${default}" + echo -en " ... ${red}NO${default}" fn_sleep_time } fn_print_no_eol_nl() { - echo -e "${red}NO${default}" + echo -e " ... ${red}NO${default}" fn_sleep_time } # OK fn_print_ok_eol() { - echo -en "${green}OK${default}" + echo -en " ... ${green}OK${default}" fn_sleep_time } fn_print_ok_eol_nl() { - echo -e "${green}OK${default}" + echo -e " ... ${green}OK${default}" fn_sleep_time } # FAIL fn_print_fail_eol() { - echo -en "${red}FAIL${default}" + echo -en " ... ${red}FAIL${default}" fn_sleep_time } fn_print_fail_eol_nl() { - echo -e "${red}FAIL${default}" + echo -e " ... ${red}FAIL${default}" fn_sleep_time } # ERROR fn_print_error_eol() { - echo -en "${red}ERROR${default}" + echo -en " ... ${red}ERROR${default}" fn_sleep_time } fn_print_error_eol_nl() { - echo -e "${red}ERROR${default}" + echo -e " ... ${red}ERROR${default}" fn_sleep_time } # WAIT fn_print_wait_eol() { - echo -en "${cyan}WAIT${default}" + echo -en " ... ${cyan}WAIT${default}" fn_sleep_time } fn_print_wait_eol_nl() { - echo -e "${cyan}WAIT${default}" + echo -e " ... ${cyan}WAIT${default}" fn_sleep_time } # WARN fn_print_warn_eol() { - echo -en "${lightyellow}WARN${default}" + echo -en " ... ${lightyellow}WARN${default}" fn_sleep_time } fn_print_warn_eol_nl() { - echo -e "${lightyellow}WARN${default}" + echo -e " ... ${lightyellow}WARN${default}" fn_sleep_time } # INFO fn_print_info_eol() { - echo -en "${cyan}INFO${default}" + echo -en " ... ${cyan}INFO${default}" fn_sleep_time } fn_print_info_eol_nl() { - echo -e "${cyan}INFO${default}" + echo -e " ... ${cyan}INFO${default}" fn_sleep_time } # QUERYING fn_print_querying_eol() { - echo -en "${cyan}QUERYING${default}" + echo -en " ... ${cyan}QUERYING${default}" fn_sleep_time_1 } fn_print_querying_eol_nl() { - echo -e "${cyan}QUERYING${default}" + echo -e " ... ${cyan}QUERYING${default}" fn_sleep_time_1 } # CHECKING fn_print_checking_eol() { - echo -en "${cyan}CHECKING${default}" + echo -en " ... ${cyan}CHECKING${default}" fn_sleep_time_1 } fn_print_checking_eol_nl() { - echo -e "${cyan}CHECKING${default}" + echo -e " ... ${cyan}CHECKING${default}" fn_sleep_time_1 } # DELAY fn_print_delay_eol() { - echo -en "${green}DELAY${default}" + echo -en " ... ${green}DELAY${default}" fn_sleep_time_1 } fn_print_delay_eol_nl() { - echo -e "${green}DELAY${default}" + echo -e " ... ${green}DELAY${default}" fn_sleep_time_1 } # CANCELED fn_print_canceled_eol() { - echo -en "${lightyellow}CANCELED${default}" + echo -en " ... ${lightyellow}CANCELED${default}" fn_sleep_time_1 } fn_print_canceled_eol_nl() { - echo -e "${lightyellow}CANCELED${default}" + echo -e " ... ${lightyellow}CANCELED${default}" fn_sleep_time_1 } # REMOVED fn_print_removed_eol() { - echo -en "${red}REMOVED${default}" + echo -en " ... ${red}REMOVED${default}" fn_sleep_time_1 } fn_print_removed_eol_nl() { - echo -e "${red}REMOVED${default}" + echo -e " ... ${red}REMOVED${default}" fn_sleep_time_1 } # UPDATE fn_print_update_eol() { - echo -en "${cyan}UPDATE${default}" + echo -en " ... ${lightblue}UPDATE${default}" fn_sleep_time } fn_print_update_eol_nl() { - echo -e "${cyan}UPDATE${default}" + echo -e " ... ${lightblue}UPDATE${default}" + fn_sleep_time +} + +# SKIP +fn_print_skip_eol() { + echo -en " ... ${cyan}SKIP${default}" + fn_sleep_time +} + +fn_print_skip_eol_nl() { + echo -e " ... ${cyan}SKIP${default}" fn_sleep_time } diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index 62f3d8f4e..e5e6d1e5d 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -1,14 +1,14 @@ #!/bin/bash # LinuxGSM core_modules.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://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="v24.1.2" +modulesversion="v25.1.6" # Core @@ -42,6 +42,11 @@ core_legacy.sh() { core_exit.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module + exitcode=$? + if [ "${exitcode}" -ne 0 ]; then + echo "fn_fetch_module failed, using fn_bootstrap_fetch_module instead." + fn_bootstrap_fetch_module + fi } core_getopt.sh() { @@ -299,7 +304,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 } @@ -319,6 +329,11 @@ command_dev_detect_ldd.sh() { fn_fetch_module } +command_dev_ui.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + command_dev_query_raw.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module @@ -441,6 +456,11 @@ fix_sfc.sh() { fn_fetch_module } +fix_sm.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + fix_st.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module @@ -521,6 +541,11 @@ fix_wurm.sh() { fn_fetch_module } +fix_xnt.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + fix_zmr.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module @@ -685,6 +710,11 @@ update_ut99.sh() { fn_fetch_module } +update_xnt.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + fn_update_modules.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module @@ -714,6 +744,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 @@ -806,6 +841,11 @@ if [ ! -d "${lockdir}" ]; then mkdir -p "${lockdir}" fi +# Creates data dir if missing +if [ ! -d "${datadir}" ]; then + mkdir -p "${datadir}" +fi + # if $USER id missing set to whoami if [ -z "${USER}" ]; then USER="$(whoami)" diff --git a/lgsm/modules/core_steamcmd.sh b/lgsm/modules/core_steamcmd.sh index 326fecf70..bf9790132 100644 --- a/lgsm/modules/core_steamcmd.sh +++ b/lgsm/modules/core_steamcmd.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM core_steamcmd.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Core modules for SteamCMD @@ -23,7 +23,7 @@ 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." + fn_print_nl " * Change steamuser=\"username\" to a valid steam login." if [ -d "${lgsmlogdir}" ]; then fn_script_log_fail "Steam login not set. Update steamuser in ${configdirserver}" fi @@ -44,15 +44,16 @@ fn_check_steamcmd() { # 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_print_nl "install SteamCMD" fn_install_steamcmd else - fn_print_warn_nl "SteamCMD is missing" - fn_script_log_warn "SteamCMD is missing" + fn_print_warn_nl "SteamCMD is not installed" + fn_script_log_warn "SteamCMD is not installed" fn_install_steamcmd fi elif [ "${commandname}" == "INSTALL" ]; then - fn_print_information "SteamCMD is already installed..." - fn_print_ok_eol_nl + fn_print "install SteamCMD" + fn_print_skip_eol_nl fi } @@ -128,7 +129,7 @@ fn_check_steamcmd_clear() { if [ "$(command -v steamcmd 2> /dev/null)" ] && [ -d "${rootdir}/steamcmd" ]; then rm -rf "${steamcmddir:?}" exitcode=$? - if [ "${exitcode}" != 0 ]; then + if [ "${exitcode}" -ne 0 ]; then fn_script_log_fail "Removing ${rootdir}/steamcmd" else fn_script_log_pass "Removing ${rootdir}/steamcmd" @@ -163,7 +164,7 @@ fn_update_steamcmd_localbuild() { } fn_update_steamcmd_remotebuild() { - # Get remote build info. + # Gets remote build info. if [ -d "${steamcmddir}" ]; then cd "${steamcmddir}" || exit fi @@ -182,8 +183,9 @@ fn_update_steamcmd_remotebuild() { 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:]') + remotebuildversion=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_request "${appid}" +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}" @@ -213,18 +215,18 @@ fn_update_steamcmd_compare() { # Create update lockfile. date '+%s' > "${lockdir:?}/update.lock" 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}" + fn_print "\n" + fn_print_nl "${bold}${underline}Update${default} available" + fn_print_nl "* Local build: ${red}${localbuild}${default}" + fn_print_nl "* Remote build: ${green}${remotebuildversion}${default}" if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" + fn_print_nl "* Branch: ${branch}" fi if [ -n "${betapassword}" ]; then - echo -e "* Branch password: ${betapassword}" + fn_print_nl "* Branch password: ${betapassword}" fi - echo -e "https://steamdb.info/app/${appid}/" - echo -en "\n" + fn_print_nl "${italic}https://steamdb.info/app/${appid}/history" + fn_print "\n" fn_script_log_info "Update available" fn_script_log_info "Local build: ${localbuild}" fn_script_log_info "Remote build: ${remotebuildversion}" @@ -263,18 +265,18 @@ fn_update_steamcmd_compare() { 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}" + fn_print "\n" + fn_print_nl "${bold}${underline}No update${default} available" + fn_print_nl "* Local build: ${green}${localbuild}${default}" + fn_print_nl "* Remote build: ${green}${remotebuildversion}${default}" if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" + fn_print_nl "* Branch: ${branch}" fi if [ -n "${betapassword}" ]; then - echo -e "* Branch password: ${betapassword}" + fn_print_nl "* Branch password: ${betapassword}" fi - echo -e "https://steamdb.info/app/${appid}/" - echo -en "\n" + fn_print_nl "https://steamdb.info/app/${appid}/history" + fn_print "\n" fn_script_log_info "No update available" fn_script_log_info "Local build: ${localbuild}" fn_script_log_info "Remote build: ${remotebuildversion}" @@ -308,9 +310,9 @@ fn_check_steamcmd_appmanifest() { if [ "${appmanifestfilewc}" -ge "2" ]; then fn_print_fail "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" + fn_print_nl "* Check user permissions" for appfile in ${appmanifestfile}; do - echo -e " ${appfile}" + fn_print_nl " ${appfile}" done core_exit.sh else @@ -364,63 +366,63 @@ fn_check_steamcmd_appmanifest() { 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" + fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "${datadir}/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" + fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "${datadir}/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" + fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "${datadir}/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" + fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "${datadir}/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" + fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_40.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "${datadir}/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" + fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_30.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "${datadir}/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" + fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "${datadir}/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" + fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "${datadir}/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" + fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_50.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "${datadir}/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" + fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_60.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "${datadir}/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" + fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_20.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "${datadir}/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" + fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "${datadir}/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" + fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "${datadir}/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash" fi fn_dl_steamcmd fi diff --git a/lgsm/modules/core_trap.sh b/lgsm/modules/core_trap.sh index ea6fce869..4b66b3937 100644 --- a/lgsm/modules/core_trap.sh +++ b/lgsm/modules/core_trap.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM core_trap.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Handles CTRL-C trap to give an exit code. diff --git a/lgsm/modules/fix.sh b/lgsm/modules/fix.sh index 280112728..f31030779 100644 --- a/lgsm/modules/fix.sh +++ b/lgsm/modules/fix.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Overall module for managing fixes. # Runs modules that will fix an issue. @@ -22,7 +22,8 @@ fn_fix_msg_start_nl() { } fn_fix_msg_end() { - if [ $? != 0 ]; then + exirtcode=$? + if [ "${exitcode}" -ne 0 ]; then fn_print_error_nl "Applying ${fixname} fix: ${gamename}" fn_script_log_error "Applying ${fixname} fix: ${gamename}" else @@ -52,7 +53,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 sm sof2 squad st tf2 terraria ts3 mcb mta unt vh wurm xnt zmr) apply_post_install_fix=(av kf kf2 ro ut2k4 ut ut3) # validate registered fixes for safe development @@ -79,7 +80,7 @@ fi 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 "${bold}${lightyellow}Applying Post-Install Fixes${default}" fn_messages_separator postinstall=1 fn_apply_fix "post install" "${shortname}" diff --git a/lgsm/modules/fix_ark.sh b/lgsm/modules/fix_ark.sh index 03e53380f..366d137dd 100644 --- a/lgsm/modules/fix_ark.sh +++ b/lgsm/modules/fix_ark.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_ark.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves issues with ARK: Survival Evolved. diff --git a/lgsm/modules/fix_arma3.sh b/lgsm/modules/fix_arma3.sh index b415b81d6..66f5ebe5d 100644 --- a/lgsm/modules/fix_arma3.sh +++ b/lgsm/modules/fix_arma3.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_arma3.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves issues with ARMA3. diff --git a/lgsm/modules/fix_armar.sh b/lgsm/modules/fix_armar.sh index ae2c08f33..c2bb8fbdb 100755 --- a/lgsm/modules/fix_armar.sh +++ b/lgsm/modules/fix_armar.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_armar.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves issues with Arma Reforger. diff --git a/lgsm/modules/fix_av.sh b/lgsm/modules/fix_av.sh index bfff59af6..ea225810c 100644 --- a/lgsm/modules/fix_av.sh +++ b/lgsm/modules/fix_av.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_av.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves issues with Avorion. diff --git a/lgsm/modules/fix_bo.sh b/lgsm/modules/fix_bo.sh index 24e76874e..5d74f27de 100644 --- a/lgsm/modules/fix_bo.sh +++ b/lgsm/modules/fix_bo.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_hw.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves issues with Ballistic Overkill. diff --git a/lgsm/modules/fix_bt.sh b/lgsm/modules/fix_bt.sh index 4d837a1ba..107c84458 100755 --- a/lgsm/modules/fix_bt.sh +++ b/lgsm/modules/fix_bt.sh @@ -1,11 +1,11 @@ #!/bin/bash # LinuxGSM fix_bt.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves issues with Barotrauma. -module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(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/modules/fix_cmw.sh b/lgsm/modules/fix_cmw.sh index a57c6c8cb..413bfbc33 100644 --- a/lgsm/modules/fix_cmw.sh +++ b/lgsm/modules/fix_cmw.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_cmw.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves issues with Chivalry: Medieval Warfare. diff --git a/lgsm/modules/fix_csgo.sh b/lgsm/modules/fix_csgo.sh index ea858ee3c..8f5550ab5 100644 --- a/lgsm/modules/fix_csgo.sh +++ b/lgsm/modules/fix_csgo.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_csgo.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves issues with Counter-Strike: Global Offensive. diff --git a/lgsm/modules/fix_dst.sh b/lgsm/modules/fix_dst.sh index ff963d342..2848fa5bb 100644 --- a/lgsm/modules/fix_dst.sh +++ b/lgsm/modules/fix_dst.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_dst.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves issues with Don't Starve Together. diff --git a/lgsm/modules/fix_hw.sh b/lgsm/modules/fix_hw.sh index 0e70b7195..c7d209bb6 100644 --- a/lgsm/modules/fix_hw.sh +++ b/lgsm/modules/fix_hw.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_hw.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves issues with Hurtworld. diff --git a/lgsm/modules/fix_ins.sh b/lgsm/modules/fix_ins.sh index cc79e3685..1d1423c6b 100644 --- a/lgsm/modules/fix_ins.sh +++ b/lgsm/modules/fix_ins.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_ins.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves issues with Insurgency. diff --git a/lgsm/modules/fix_kf.sh b/lgsm/modules/fix_kf.sh index e38b5883a..00b99e06c 100644 --- a/lgsm/modules/fix_kf.sh +++ b/lgsm/modules/fix_kf.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_kf.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves issues with Killing Floor. diff --git a/lgsm/modules/fix_kf2.sh b/lgsm/modules/fix_kf2.sh index cb4707414..495e9d70e 100644 --- a/lgsm/modules/fix_kf2.sh +++ b/lgsm/modules/fix_kf2.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_kf2.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves issues with Killing Floor 2. diff --git a/lgsm/modules/fix_mcb.sh b/lgsm/modules/fix_mcb.sh index 1e95bb4a8..bc84d84e1 100644 --- a/lgsm/modules/fix_mcb.sh +++ b/lgsm/modules/fix_mcb.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_mcb.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves various issues with Minecraft Bedrock. diff --git a/lgsm/modules/fix_mta.sh b/lgsm/modules/fix_mta.sh index 4e533eb51..2fff69691 100644 --- a/lgsm/modules/fix_mta.sh +++ b/lgsm/modules/fix_mta.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_mta.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves various issues with Multi Theft Auto. diff --git a/lgsm/modules/fix_nmrih.sh b/lgsm/modules/fix_nmrih.sh index dfbb76d92..4eb76c24e 100644 --- a/lgsm/modules/fix_nmrih.sh +++ b/lgsm/modules/fix_nmrih.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_nmrih.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://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/ diff --git a/lgsm/modules/fix_onset.sh b/lgsm/modules/fix_onset.sh index 7d644ef7b..6430e5d6b 100644 --- a/lgsm/modules/fix_onset.sh +++ b/lgsm/modules/fix_onset.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_onset.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves various issues with Onset. diff --git a/lgsm/modules/fix_pvr.sh b/lgsm/modules/fix_pvr.sh index 6d8727e33..e4409bc37 100644 --- a/lgsm/modules/fix_pvr.sh +++ b/lgsm/modules/fix_pvr.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_pvr.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves various issues with Pavlov VR. diff --git a/lgsm/modules/fix_ro.sh b/lgsm/modules/fix_ro.sh index 72864d699..8b9bee442 100644 --- a/lgsm/modules/fix_ro.sh +++ b/lgsm/modules/fix_ro.sh @@ -1,39 +1,117 @@ #!/bin/bash # LinuxGSM fix_ro.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://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/fix_rust.sh b/lgsm/modules/fix_rust.sh index 809b5b1df..80c790a59 100644 --- a/lgsm/modules/fix_rust.sh +++ b/lgsm/modules/fix_rust.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_rust.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves issues with Rust. @@ -11,7 +11,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" 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 the seed is not defined by the 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" diff --git a/lgsm/modules/fix_rw.sh b/lgsm/modules/fix_rw.sh index 17acf4def..dee15dedb 100644 --- a/lgsm/modules/fix_rw.sh +++ b/lgsm/modules/fix_rw.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_rw.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves issues with Rising World. diff --git a/lgsm/modules/fix_samp.sh b/lgsm/modules/fix_samp.sh index 0b5d0ab22..e193485d7 100644 --- a/lgsm/modules/fix_samp.sh +++ b/lgsm/modules/fix_samp.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_sfc.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves issue that the default rcon password is not changed. diff --git a/lgsm/modules/fix_sdtd.sh b/lgsm/modules/fix_sdtd.sh index 7988b0d67..2b4620687 100644 --- a/lgsm/modules/fix_sdtd.sh +++ b/lgsm/modules/fix_sdtd.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_sdtd.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves issues with 7 Days to Die. diff --git a/lgsm/modules/fix_sfc.sh b/lgsm/modules/fix_sfc.sh index 308f74b24..70e5d0484 100644 --- a/lgsm/modules/fix_sfc.sh +++ b/lgsm/modules/fix_sfc.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_sfc.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves issues with Source Forts Classic. diff --git a/lgsm/modules/fix_sm.sh b/lgsm/modules/fix_sm.sh new file mode 100644 index 000000000..d75ca8c78 --- /dev/null +++ b/lgsm/modules/fix_sm.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# LinuxGSM fix_sm.sh module +# Author: Daniel Gibbs +# Contributors: https://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves issues with Unturned. + +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/linux64" diff --git a/lgsm/modules/fix_sof2.sh b/lgsm/modules/fix_sof2.sh index 4e5b13624..45e3b299c 100644 --- a/lgsm/modules/fix_sof2.sh +++ b/lgsm/modules/fix_sof2.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_rust.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves issues with Soldier of Fortune 2. diff --git a/lgsm/modules/fix_squad.sh b/lgsm/modules/fix_squad.sh index 2fec57f0e..b9ee76a8d 100644 --- a/lgsm/modules/fix_squad.sh +++ b/lgsm/modules/fix_squad.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_squad.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves issues with Squad. diff --git a/lgsm/modules/fix_st.sh b/lgsm/modules/fix_st.sh index 4d100c6fc..bbd9890bd 100644 --- a/lgsm/modules/fix_st.sh +++ b/lgsm/modules/fix_st.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_rust.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves issues with Stationeers. diff --git a/lgsm/modules/fix_steamcmd.sh b/lgsm/modules/fix_steamcmd.sh index 2a2076072..0ba5c85b2 100644 --- a/lgsm/modules/fix_steamcmd.sh +++ b/lgsm/modules/fix_steamcmd.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_steamcmd.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves issues with SteamCMD. diff --git a/lgsm/modules/fix_terraria.sh b/lgsm/modules/fix_terraria.sh index dc734b6fd..0d45e257f 100644 --- a/lgsm/modules/fix_terraria.sh +++ b/lgsm/modules/fix_terraria.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_terraria.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves issues with Terraria. diff --git a/lgsm/modules/fix_tf2.sh b/lgsm/modules/fix_tf2.sh index fe7de8278..105026488 100644 --- a/lgsm/modules/fix_tf2.sh +++ b/lgsm/modules/fix_tf2.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_tf2.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves issues with Team Fortress 2. diff --git a/lgsm/modules/fix_ts3.sh b/lgsm/modules/fix_ts3.sh index 5c80aa15e..0f081cb37 100644 --- a/lgsm/modules/fix_ts3.sh +++ b/lgsm/modules/fix_ts3.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_ts3.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves issues with Teamspeak 3. diff --git a/lgsm/modules/fix_unt.sh b/lgsm/modules/fix_unt.sh index 9afdce337..dbe64ffd6 100644 --- a/lgsm/modules/fix_unt.sh +++ b/lgsm/modules/fix_unt.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_rust.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves issues with Unturned. diff --git a/lgsm/modules/fix_ut.sh b/lgsm/modules/fix_ut.sh index ded65ddad..3da5c068c 100644 --- a/lgsm/modules/fix_ut.sh +++ b/lgsm/modules/fix_ut.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_ut.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves issues with Unreal Tournament. diff --git a/lgsm/modules/fix_ut2k4.sh b/lgsm/modules/fix_ut2k4.sh index 5da1eee12..4b9d35011 100644 --- a/lgsm/modules/fix_ut2k4.sh +++ b/lgsm/modules/fix_ut2k4.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_ut2k4.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves issues with Unreal Tournament 2004. diff --git a/lgsm/modules/fix_ut3.sh b/lgsm/modules/fix_ut3.sh index 386833efc..aa5c5e464 100644 --- a/lgsm/modules/fix_ut3.sh +++ b/lgsm/modules/fix_ut3.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_ut2.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves issues with Unreal Tournament 3. diff --git a/lgsm/modules/fix_wurm.sh b/lgsm/modules/fix_wurm.sh index b6f5762f5..6f17ccd76 100644 --- a/lgsm/modules/fix_wurm.sh +++ b/lgsm/modules/fix_wurm.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_wurm.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves issues with Wurm Unlimited. diff --git a/lgsm/modules/fix_xnt.sh b/lgsm/modules/fix_xnt.sh new file mode 100644 index 000000000..44b51c5de --- /dev/null +++ b/lgsm/modules/fix_xnt.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# LinuxGSM fix_xnt.sh module +# Author: Daniel Gibbs +# Contributors: https://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Install Xonotic Default Config + +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +# Create the directory if it doesn't exist +if [ ! -d "${systemdir}/${selfname}/data" ]; then + mkdir -p "${systemdir}/${selfname}/data" +fi diff --git a/lgsm/modules/fix_zmr.sh b/lgsm/modules/fix_zmr.sh index a88d82f34..5b42eeccf 100644 --- a/lgsm/modules/fix_zmr.sh +++ b/lgsm/modules/fix_zmr.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM fix_sfc.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves issues with Zombie Master: Reborn. diff --git a/lgsm/modules/info_distro.sh b/lgsm/modules/info_distro.sh index a4e3521f8..67a9fd5df 100644 --- a/lgsm/modules/info_distro.sh +++ b/lgsm/modules/info_distro.sh @@ -1,10 +1,11 @@ #!/bin/bash # LinuxGSM info_distro.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://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. +# !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]}")")" @@ -28,15 +29,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 + 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 @@ -187,13 +188,10 @@ if [ "$(command -v numfmt 2> /dev/null)" ]; then 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 + if free -h > /dev/null 2>&1; then humanreadable="-h" + else + humanreadable="-m" fi physmemtotalmb="$(free -m | awk '/Mem:/ {print $2}')" # integer physmemtotalgb="$(free -m | awk '/Mem:/ {print $2}')" # integer diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index da7c62991..2819b65d1 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -1,9 +1,10 @@ #!/bin/bash # LinuxGSM info_game.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://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]}")")" @@ -495,12 +496,13 @@ fn_info_game_kf() { 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 "gamespyqueryport" "OldQueryPortNumber" fn_info_game_ini "servername" "ServerName" fn_info_game_ini "serverpassword" "GamePassword" fi adminpassword="${adminpassword:-"NOT SET"}" defaultmap="${defaultmap:-"NOT SET"}" + gamespyqueryport="${gamespyqueryport:-"0"}" # Gamespy Query Port httpenabled="${httpenabled:-"NOT SET"}" httppassword="${adminpassword}" httpport="${httpport:-"0"}" @@ -508,12 +510,11 @@ fn_info_game_kf() { lanport="${lanport:-"0"}" maxplayers="${maxplayers:-"0"}" port="${port:-"0"}" - queryport="$((port + 1))" - queryportgs="${queryportgs:-"0"}" + queryport=$((28902 + (port - 7757))) # Valve Query Port servername="${servername:-"NOT SET"}" serverpassword="${serverpassword:-"NOT SET"}" - steamport="28852" - steamworksport="20560" + steamport="20610" + unreal2queryport="$((port + 1))" # Unreal2 Query Port } # Config Type: ini @@ -621,7 +622,8 @@ fn_info_game_pvr() { fn_info_game_pw() { servername="${servername:-"NOT SET"}" port="${port:-"0"}" - steamport="27015" + queryport="${port:-"0"}" + steamport="${steamport:-"0"}" unknownport="1985" } @@ -671,7 +673,7 @@ fn_info_game_st() { saveinterval="${saveinterval:-"0"}" servername="${servername:-"NOT SET"}" serverpassword="${serverpassword:-"NOT SET"}" - worldname="${worldname:-"NOT SET"}" + worldsave="${worldsave:-"NOT SET"}" worldtype="${worldtype:-"NOT SET"}" } @@ -752,19 +754,19 @@ fn_info_game_ts3() { 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 "httpqueryport" "query_http_port" + fn_info_game_ini "httpsqueryport" "query_https_port" fn_info_game_ini "queryport" "query_port" - fn_info_game_ini "querysshport" "query_ssh_port" + fn_info_game_ini "sshqueryport" "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"}" + httpqueryport="${httpqueryport:-"0"}" + httpsqueryport="${httpsqueryport:-"0"}" queryport="${queryport:-"0"}" - querysshport="${querysshport:-"0"}" + sshqueryport="${sshqueryport:-"0"}" telnetport="${queryport}" } @@ -795,7 +797,7 @@ fn_info_game_ut99() { 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 "gamespyqueryport" "OldQueryPortNumber" fn_info_game_ini "servername" "ServerName" fn_info_game_ini "serverpassword" "GamePassword" fn_info_game_ini "httpenabled" "bEnabled" @@ -809,7 +811,7 @@ fn_info_game_ut99() { httpport="${httpport:-"0"}" port="${port:-"0"}" queryport="$((port + 1))" - queryportgs="${queryportgs:-"0"}" + gamespyqueryport="${gamespyqueryport:-"0"}" servername="${servername:-"NOT SET"}" serverpassword="${serverpassword:-"NOT SET"}" httpenabled="${httpenabled:-"0"}" @@ -855,7 +857,7 @@ fn_info_game_unreal2() { 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 "gamespyqueryport" "OldQueryPortNumber" fn_info_game_ini "servername" "ServerName" fn_info_game_ini "serverpassword" "GamePassword" fn_info_game_ini "httpenabled" "bEnabled" @@ -866,7 +868,7 @@ fn_info_game_unreal2() { httpport="${httpport:-"0"}" port="${port:-"0"}" queryport="$((port + 1))" - queryportgs="${queryportgs:-"0"}" + gamespyqueryport="${gamespyqueryport:-"0"}" servername="${servername:-"NOT SET"}" serverpassword="${serverpassword:-"NOT SET"}" httpenabled="${httpenabled:-"0"}" @@ -900,7 +902,7 @@ fn_info_game_ut2k4() { 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 "gamespyqueryport" "OldQueryPortNumber" fn_info_game_ini "servername" "ServerName" fn_info_game_ini "serverpassword" "GamePassword" fn_info_game_ini "httpenabled" "bEnabled" @@ -912,7 +914,7 @@ fn_info_game_ut2k4() { lanport="${lanport:-"0"}" port="${port:-"0"}" queryport="$((port + 1))" - queryportgs="${queryportgs:-"0"}" + gamespyqueryport="${gamespyqueryport:-"0"}" servername="${servername:-"NOT SET"}" serverpassword="${serverpassword:-"NOT SET"}" httpenabled="${httpenabled:-"0"}" @@ -934,6 +936,8 @@ fn_info_game_armar() { fn_info_game_json "queryport" ".a2s.port" fn_info_game_json "servername" ".game.name" fn_info_game_json "serverpassword" ".game.password" + fn_info_game_json "rconpassword" ".rcon.password" + fn_info_game_json "rconport" ".rcon.port" fi adminpassword="${adminpassword:-"NOT SET"}" battleeyeport="$((port + 4))" @@ -955,13 +959,14 @@ fn_info_game_bf1942() { 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 "queryport" "game.gameSpyPort" 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"}" port="${port:-"0"}" - queryport="22000" + queryport="${queryport:-"0"}" servername="${servername:-"NOT SET"}" serverpassword="${serverpassword:-"NOT SET"}" } @@ -978,11 +983,12 @@ fn_info_game_bfv() { 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" + fn_info_game_keyvalue_pairs_space "queryport" "game.gameSpyPort" fi configip="${configip:-"0.0.0.0"}" maxplayers="${maxplayers:-"0"}" port="${port:-"0"}" - queryport="22000" + queryport="${queryport:-"0"}" servername="${servername:-"NOT SET"}" serverpassword="${serverpassword:-"NOT SET"}" } @@ -1158,7 +1164,7 @@ fn_info_game_col() { maxplayers="${maxplayers:-"0"}" port="${port:-"0"}" queryport="${port:-"0"}" - rcpassword="${rconpassword:-"NOT SET"}" + rconpassword="${rconpassword:-"NOT SET"}" servername="${servername:-"NOT SET"}" serverpassword="${serverpassword:-"NOT SET"}" steamport="${steamport:-"0"}" @@ -1172,11 +1178,11 @@ fn_info_game_cs2() { if [ -f "${servercfgfullpath}" ]; then fn_info_game_valve_keyvalues "servername" "hostname" fn_info_game_valve_keyvalues "defaultmap" "map" - fn_info_game_valve_keyvalues "password" "sv_password" + fn_info_game_valve_keyvalues "serverpassword" "sv_password" fi defaultmap="${defaultmap:-"NOT SET"}" maxplayers="${maxplayers:-"0"}" - password="${password:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" port="${port:-"0"}" queryport="${port:-"0"}" servername="${servername:-"NOT SET"}" @@ -1242,6 +1248,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 +1257,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"}" @@ -1305,7 +1314,7 @@ fn_info_game_fctr() { # get server version if installed. local factoriobin="${executabledir}${executable:1}" if [ -f "${factoriobin}" ]; then - serverversion="$(${factoriobin} --version | grep "Version:" | awk '{print $2}')" + serverversion="$(${factoriobin} --version | grep -m 1 "Version:" | awk '{print $2}')" fi } @@ -1324,6 +1333,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: @@ -1488,24 +1514,6 @@ fn_info_game_mohaa() { serverpassword="${serverpassword:-"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 @@ -1757,6 +1765,11 @@ fn_info_game_qw() { servername="${servername:-"NOT SET"}" } +# Config Type: ini +# Parameters: true +# Comment: ; or # +# Example: ServerName=SERVERNAME +# Filetype: ini fn_info_game_ro() { if [ -f "${servercfgfullpath}" ]; then fn_info_game_ini "adminpassword" "AdminPassword" @@ -1767,7 +1780,6 @@ fn_info_game_ro() { 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 @@ -1780,12 +1792,11 @@ fn_info_game_ro() { lanport="${lanport:-"0"}" maxplayers="${maxplayers:-"0"}" port="${port:-"0"}" - queryport="$((port + 1))" - queryportgs="${queryportgs:-"0"}" + queryport=$((28902 + (port - 7757))) # Valve Query Port servername="${servername:-"NOT SET"}" serverpassword="${serverpassword:-"NOT SET"}" - steamport="28902" - steamworksport="20610" + steamport="20610" + unreal2queryport="$((port + 1))" # Unreal2 Query Port } # Config Type: QuakeC @@ -1966,7 +1977,7 @@ fn_info_game_sdtd() { 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 + if [ -z "${telnetpassword}" ]; then telnetip="127.0.0.1" fi telnetpass="${telnetpass:-"NOT SET"}" @@ -1984,6 +1995,19 @@ fn_info_game_sf() { beaconport="${beaconport:-"0"}" } +# Config Type: Parameters (with an ini) +fn_info_game_sm() { + servername="${servername:-"NOT SET"}" + adminpassword="${adminpassword:-"NOT SET"}" + port="${port:-"0"}" + queryport="${queryport:-"0"}" + maxplayers="${maxplayers:-"0"}" + # telnet config + telnetenabled=true + telnetip="127.0.0.1" + telnetport="${telnetport:-"0"}" +} + # Config Type: QuakeC # Comment: // or /* */ # Example: set sv_hostname "SERVERNAME" @@ -2225,6 +2249,23 @@ fn_info_game_wf() { servername="${servername:-"NOT SET"}" } +# Config Type: QuakeC +# Comment: // +# Filetype: cfg +fn_info_game_xnt() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_keyvalue_pairs_space "maxplayers" "maxplayers" + fn_info_game_keyvalue_pairs_space "port" "port" + fn_info_game_keyvalue_pairs_space "rconpassword" "rcon_password" + fn_info_game_keyvalue_pairs_space "servername" "hostname" + fi + maxplayers="${maxplayers:-"8"}" + port="${port:-"0"}" + queryport="${port}" + rconpassword="${rconpassword:-"NOT SET"}" + servername="${servername:-"NOT SET"}" +} + fn_info_game_wmc() { if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -2331,6 +2372,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 @@ -2351,8 +2394,6 @@ 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 @@ -2365,7 +2406,7 @@ elif [ "${shortname}" == "pc" ]; then fn_info_game_pc elif [ "${shortname}" == "pc2" ]; then fn_info_game_pc2 -elif [ "${shortname}" == "ps" ]; then +elif [ "${shortname}" == "squad44" ]; then fn_info_game_ps elif [ "${shortname}" == "pvr" ]; then fn_info_game_pvr @@ -2403,6 +2444,8 @@ elif [ "${shortname}" == "sdtd" ]; then fn_info_game_sdtd elif [ "${shortname}" == "sf" ]; then fn_info_game_sf +elif [ "${shortname}" == "sm" ]; then + fn_info_game_sm elif [ "${shortname}" == "sof2" ]; then fn_info_game_sof2 elif [ "${shortname}" == "sol" ]; then @@ -2457,29 +2500,58 @@ elif [ "${engine}" == "source" ] || [ "${engine}" == "goldsrc" ]; then fn_info_game_source elif [ "${engine}" == "unreal2" ]; then fn_info_game_unreal2 +elif [ "${shortname}" == "xnt" ]; then + fn_info_game_xnt fi # 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}") + 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")" + # 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 @@ -2508,11 +2580,11 @@ 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=${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)" + masterserver="$(curl --connect-timeout 3 -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 - 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)" + masterserver="$(curl --connect-timeout 3 -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 diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index f619c964e..4f1f00268 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -1,12 +1,35 @@ #!/bin/bash # LinuxGSM info_messages.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Defines server info messages for details and alerts. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +# Converts querytype to imgsoquerytype for use with ismygameserver.online urls +if [ -n "${querytype}" ]; then + if [ "${querytype}" == "protocol-valve" ]; then + imgsoquerytype="valve" + elif [ "${querytype}" == "protocol-gamespy1" ]; then + imgsoquerytype="gamespy" + elif [ "${querytype}" == "protocol-gamespy2" ]; then + imgsoquerytype="gamespy" + elif [ "${querytype}" == "protocol-gamespy3" ]; then + imgsoquerytype="gamespy" + elif [ "${querytype}" == "protocol-quake1" ]; then + imgsoquerytype="quake" + elif [ "${querytype}" == "protocol-quake2" ]; then + imgsoquerytype="quake" + elif [ "${querytype}" == "protocol-quake3" ]; then + imgsoquerytype="quake" + elif [ "${querytype}" == "protocol-unreal2" ]; then + imgsoquerytype="unrealtournament2004" + else + imgsoquerytype="${querytype}" + fi +fi + # Removes the passwords form all but details. fn_info_messages_password_strip() { if [ "${commandname}" != "DETAILS" ]; then @@ -30,8 +53,8 @@ fn_info_messages_password_strip() { httppassword="********" fi - if [ "${telnetpass}" ]; then - telnetpass="********" + if [ "${telnetpassword}" ]; then + telnetpassword="********" fi if [ "${wsapikey}" ]; then @@ -66,6 +89,11 @@ fn_info_messages_head() { echo -e "Hostname" echo -e "${HOSTNAME}" echo -e "" + if [ -n "${querytype}" ]; then + echo -e "Is my Game Server Online?" + echo -e "https://ismygameserver.online/${imgsoquerytype}/${alertip}:${queryport}" + echo -e "" + fi echo -e "Server Time" echo -e "$(date)" } @@ -132,7 +160,7 @@ fn_info_messages_server_resource() { echo -e "${bold}${lightyellow}Server Resource${default}" fn_messages_separator { - echo -e "${lightyellow}CPU\t${default}" + echo -e "${bold}${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" @@ -140,14 +168,14 @@ fn_info_messages_server_resource() { } | column -s $'\t' -t echo -e "" { - echo -e "${lightyellow}Memory\t${default}" + echo -e "${bold}${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 "${bold}${lightyellow}Storage${default}" echo -e "${lightblue}Filesystem:\t${default}${filesystem}" echo -e "${lightblue}Total:\t${default}${totalspace}" echo -e "${lightblue}Used:\t${default}${usedspace}" @@ -155,7 +183,7 @@ fn_info_messages_server_resource() { } | column -s $'\t' -t echo -e "" { - echo -e "${lightyellow}Network${default}" + echo -e "${bold}${lightyellow}Network${default}" if [ -n "${netint}" ]; then echo -e "${lightblue}Interface:\t${default}${netint}" fi @@ -203,7 +231,7 @@ fn_info_messages_gameserver_resource() { } | column -s $'\t' -t echo -e "" { - echo -e "${lightyellow}Storage${default}" + echo -e "${bold}${lightyellow}Storage${default}" echo -e "${lightblue}Total:\t${default}${rootdirdu}" echo -e "${lightblue}Serverfiles:\t${default}${serverfilesdu}" if [ -d "${backupdir}" ]; then @@ -292,7 +320,7 @@ fn_info_messages_gameserver() { echo -e "${lightblue}Server password:\t${default}${serverpassword}" fi - # Query enabled (Starbound) + # Query enabled (Starbound, Minecraft) if [ -n "${queryenabled}" ]; then echo -e "${lightblue}Query enabled:\t${default}${queryenabled}" fi @@ -483,6 +511,11 @@ fn_info_messages_gameserver() { echo -e "${lightblue}Version Count:\t${default}${versioncount}" fi + # backupinterval (Soulmask) + if [ -n "${backupinterval}" ]; then + echo -e "${lightblue}Backup Interval:\t${default}${backupinterval}" + fi + # Listed on Master server if [ -n "${displaymasterserver}" ]; then if [ "${displaymasterserver}" == "true" ]; then @@ -498,6 +531,11 @@ fn_info_messages_gameserver() { else echo -e "${lightblue}Status:\t${green}STARTED${default}" fi + + # ismygameserver.online + if [ -n "${querytype}" ]; then + echo -e "${lightblue}Query Check:\t${default}https://ismygameserver.online/${imgsoquerytype}/${alertip}:${queryport}" + fi } | column -s $'\t' -t echo -e "" } @@ -548,23 +586,39 @@ fn_info_messages_script() { fi # Discord alert - echo -e "${lightblue}Discord alert:\t${default}${discordalert}" + if [ "${discordalert}" == "on" ]; then + echo -e "${lightblue}Discord alert:\t${default}${discordalert}" + fi # Email alert - echo -e "${lightblue}Email alert:\t${default}${emailalert}" + if [ "${emailalert}" == "on" ]; then + echo -e "${lightblue}Email alert:\t${default}${emailalert}" + fi # Gotify alert - echo -e "${lightblue}Gotify alert:\t${default}${gotifyalert}" + if [ "${gotifyalert}" == "on" ]; then + echo -e "${lightblue}Gotify alert:\t${default}${gotifyalert}" + fi # IFTTT alert echo -e "${lightblue}IFTTT alert:\t${default}${iftttalert}" # Pushbullet alert - echo -e "${lightblue}Pushbullet alert:\t${default}${pushbulletalert}" + if [ "${pushbulletalert}" == "on" ]; then + echo -e "${lightblue}Pushbullet alert:\t${default}${pushbulletalert}" + fi # Pushover alert - echo -e "${lightblue}Pushover alert:\t${default}${pushoveralert}" + if [ "${pushoveralert}" == "on" ]; then + echo -e "${lightblue}Pushover alert:\t${default}${pushoveralert}" + fi # Rocketchat alert - echo -e "${lightblue}Rocketchat alert:\t${default}${rocketchatalert}" + if [ "${rocketchatalert}" == "on" ]; then + echo -e "${lightblue}Rocketchat alert:\t${default}${rocketchatalert}" + fi # Slack alert - echo -e "${lightblue}Slack alert:\t${default}${slackalert}" + if [ "${slackalert}" == "on" ]; then + echo -e "${lightblue}Slack alert:\t${default}${slackalert}" + fi # Telegram alert - echo -e "${lightblue}Telegram alert:\t${default}${telegramalert}" + if [ "${telegramalert}" == "on" ]; then + echo -e "${lightblue}Telegram alert:\t${default}${telegramalert}" + fi # Update on start if [ -n "${updateonstart}" ]; then @@ -663,7 +717,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" "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" "xnt" "wurm") for port_edit in "${ports_edit_array[@]}"; do if [ "${shortname}" == "ut3" ]; then startparameterslocation="${servercfgdir}/UTWeb.ini" @@ -692,6 +746,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 @@ -700,6 +756,8 @@ fn_info_messages_ports() { portcommand="ss -tuplwn | grep java" elif [ "${shortname}" == "terraria" ]; then portcommand="ss -tuplwn | grep Main" + elif [ "${shortname}" == "sm" ]; then + portcommand="ss -tuplwn | grep WSServer-Linux" elif [ "${engine}" == "source" ]; then portcommand="ss -tuplwn | grep srcds_linux" elif [ "${engine}" == "goldsrc" ]; then @@ -823,7 +881,7 @@ fn_info_messages_armar() { { fn_port "header" fn_port "Game" port udp - fn_port "Steam Query" queryport udp + fn_port "Query" queryport udp fn_port "BattleEye" battleeyeport tcp } | column -s $'\t' -t } @@ -1015,7 +1073,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 } @@ -1060,6 +1120,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" @@ -1109,11 +1178,11 @@ fn_info_messages_kf() { { fn_port "header" fn_port "Game" port udp - fn_port "Query" queryport udp - fn_port "Query (GameSpy)" queryportgs udp + fn_port "Query - Steam" queryport udp + fn_port "Query - Unreal 2" unreal2queryport udp + fn_port "Query - Gamespy" gamespyqueryport udp fn_port "Web Interface" httpport tcp fn_port "LAN" lanport udp - fn_port "Steamworks P2P" steamworksport udp fn_port "Steam" steamport udp } | column -s $'\t' -t echo -e "" @@ -1179,14 +1248,6 @@ fn_info_messages_mohaa() { } | column -s $'\t' -t } -fn_info_messages_mom() { - { - fn_port "header" - fn_port "Game" port udp - fn_port "Beacon" beaconport udp - } | column -s $'\t' -t -} - fn_info_messages_mta() { { fn_port "header" @@ -1331,11 +1392,12 @@ fn_info_messages_ro() { { fn_port "header" fn_port "Game" port udp - fn_port "Query" queryport udp + fn_port "Query - Steam" queryport udp + fn_port "Query - Unreal 2" unreal2queryport udp fn_port "Web Interface" httpport tcp fn_port "LAN" lanport udp - fn_port "Steamworks P2P" steamworksport udp fn_port "Steam" steamport udp + } | column -s $'\t' -t echo -e "" echo -e "${bold}${lightgreen}${servername} Web Interface${default}" @@ -1430,7 +1492,7 @@ fn_info_messages_sdtd() { { 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}" + echo -e "${lightblue}Telnet password:\t${default}${telnetpassword}" } | column -s $'\t' -t } @@ -1443,6 +1505,24 @@ fn_info_messages_sf() { } | column -s $'\t' -t } +fn_info_messages_sm() { + fn_info_messages_password_strip + { + fn_port "header" + fn_port "Game" port udp + fn_port "Game" port tcp + fn_port "Query" queryport udp + fn_port "Telnet" telnetport tcp + } | column -s $'\t' -t + echo -e "" + echo -e "${bold}${lightgreen}${gamename} Telnet${default}" + fn_messages_separator + { + echo -e "${lightblue}Telnet enabled:\t${default}${telnetenabled}" + echo -e "${lightblue}Telnet address:\t${default}${telnetip} ${telnetport}" + } | column -s $'\t' -t +} + fn_info_messages_sof2() { { fn_port "header" @@ -1475,7 +1555,7 @@ fn_info_messages_source() { fn_port "Query" queryport tcp fn_port "RCON" rconport tcp fn_port "SourceTV" sourcetvport udp - # Will not show if unaviable + # Will not show if unavailable if [ "${steamport}" == "0" ] || [ -v "${steamport}" ]; then fn_port "Steam" steamport udp fi @@ -1519,6 +1599,14 @@ fn_info_messages_st() { } | column -s $'\t' -t } +fn_info_messages_stn() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + fn_info_messages_ti() { { fn_port "header" @@ -1533,9 +1621,9 @@ fn_info_messages_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 "Query (SSH)" sshqueryport tcp + fn_port "Query (http)" httpqueryport tcp + fn_port "Query (https)" httpsqueryport tcp fn_port "File Transfer" fileport tcp fn_port "Telnet" telnetport tcp } | column -s $'\t' -t @@ -1570,7 +1658,7 @@ fn_info_messages_tf() { { fn_port "header" fn_port "Game" port udp - fn_port "Query" queryport tcp + fn_port "Query" queryport udp fn_port "Beacon" beaconport udp fn_port "Shutdown" shutdownport tcp } | column -s $'\t' -t @@ -1580,8 +1668,8 @@ fn_info_messages_ut2k4() { { fn_port "header" fn_port "Game" port udp - fn_port "Query" queryport udp - fn_port "Query (GameSpy)" queryportgs udp + fn_port "Query - Unreal 2" queryport udp + fn_port "Query - Gamespy" gamespyqueryport udp fn_port "Web Interface" httpport tcp fn_port "LAN" lanport udp } | column -s $'\t' -t @@ -1699,7 +1787,7 @@ fn_info_messages_wurm() { } | column -s $'\t' -t } -fn_info_messages_stn() { +fn_info_messages_xnt() { { fn_port "header" fn_port "Game" port udp @@ -1767,6 +1855,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 @@ -1789,8 +1879,6 @@ fn_info_messages_select_engine() { fn_info_messages_mh elif [ "${shortname}" == "mohaa" ]; then fn_info_messages_mohaa - elif [ "${shortname}" == "mom" ]; then - fn_info_messages_mom elif [ "${shortname}" == "mta" ]; then fn_info_messages_mta elif [ "${shortname}" == "nec" ]; then @@ -1803,7 +1891,7 @@ fn_info_messages_select_engine() { fn_info_messages_pc elif [ "${shortname}" == "pc2" ]; then fn_info_messages_pc2 - elif [ "${shortname}" == "ps" ]; then + elif [ "${shortname}" == "squad44" ]; then fn_info_messages_ps elif [ "${shortname}" == "pvr" ]; then fn_info_messages_pvr @@ -1837,6 +1925,8 @@ fn_info_messages_select_engine() { fn_info_messages_sdtd elif [ "${shortname}" == "sf" ]; then fn_info_messages_sf + elif [ "${shortname}" == "sm" ]; then + fn_info_messages_sm elif [ "${shortname}" == "sof2" ]; then fn_info_messages_sof2 elif [ "${shortname}" == "sol" ]; then @@ -1883,6 +1973,8 @@ fn_info_messages_select_engine() { fn_info_messages_wf elif [ "${shortname}" == "wurm" ]; then fn_info_messages_wurm + elif [ "${shortname}" == "xnt" ]; then + fn_info_messages_xnt elif [ "${engine}" == "goldsrc" ]; then fn_info_messages_goldsrc elif [ "${engine}" == "prism3d" ]; then diff --git a/lgsm/modules/info_stats.sh b/lgsm/modules/info_stats.sh index dcc247b59..c8a96552a 100644 --- a/lgsm/modules/info_stats.sh +++ b/lgsm/modules/info_stats.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM info_stats.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Collect optional Stats sent to LinuxGSM project. # Uses Google analytics. diff --git a/lgsm/modules/install_complete.sh b/lgsm/modules/install_complete.sh index 5a9873067..c84e35fe0 100644 --- a/lgsm/modules/install_complete.sh +++ b/lgsm/modules/install_complete.sh @@ -1,32 +1,31 @@ #!/bin/bash # LinuxGSM install_complete.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Prints installation completion message and hints. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" -fn_messages_separator -if [ "${exitcode}" == "1" ]; then +if [ "${exitcode}" -eq 1 ]; then echo -e "${bold}${red}Install Failed!${default}" fn_script_log_fail "Install Failed!" -elif [ "${exitcode}" == "2" ]; then +elif [ "${exitcode}" -eq 2 ]; then echo -e "${bold}${red}Install Completed with Errors!${default}}" fn_script_log_error "Install Completed with Errors!" -elif [ "${exitcode}" == "3" ]; then +elif [ "${exitcode}" -eq 3 ]; then echo -e "${bold}${lightyellow}Install Completed with Warnings!${default}}" fn_script_log_warn "Install Completed with Warnings!" -elif [ -z "${exitcode}" ] || [ "${exitcode}" == "0" ]; then +elif [ -z "${exitcode}" ] || [ "${exitcode}" -eq 0 ]; then echo -e "${bold}${green}Install Complete!${default}" fn_script_log_pass "Install Complete!" fi +fn_messages_separator -fn_script_log_info "Install Complete!" echo -e "" -echo -e "To start server type:" -echo -e "./${selfname} start" +echo -e "To start the ${gamename} server type:" +echo -e "${italic}./${selfname} start${default}" echo -e "" core_exit.sh diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index a5a049913..b73e7b4b2 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM install_config.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Creates default server configs. @@ -16,43 +16,76 @@ fn_check_cfgdir() { fi } -# Downloads default configs from Game-Server-Configs repo to lgsm/config-default. -fn_fetch_default_config() { +# Copys default configs from Game-Server-Configs repo to server config location. +fn_default_config_remote() { echo -e "" 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 "Downloading default configs from: ${italic}https://github.com/GameServerManagers/Game-Server-Configs${default}" echo -e "" 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 + # Downloads default configs from Game-Server-Configs repo to lgsm/config-default. fn_fetch_file "${githuburl}/${shortname}/${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." + # Every config is copied. if [ "${config}" == "${servercfgdefault}" ]; then mkdir -p "${servercfgdir}" - cp -nv "${lgsmdir}/config-default/config-game/${config}" "${servercfgfullpath}" + echo -en "copying config file [ ${italic}${servercfgfullpath}${default} ]" + changes+=$(cp -nv "${lgsmdir}/config-default/config-game/${config}" "${servercfgfullpath}") + exitcode=$? + if [ "${exitcode}" -ne 0 ]; then + fn_print_fail_eol_nl + fn_script_log_fail "copying config file ${servercfgfullpath}" + elif [ "${changes}" != "" ]; then + fn_print_ok_eol_nl + fn_script_log_pass "copying config file ${servercfgfullpath}" + else + fn_print_skip_eol_nl + fi elif [ "${shortname}" == "arma3" ] && [ "${config}" == "${networkcfgdefault}" ]; then mkdir -p "${servercfgdir}" - cp -nv "${lgsmdir}/config-default/config-game/${config}" "${networkcfgfullpath}" + echo -en "copying config file [ ${italic}${networkcfgfullpath}${default} ]" + changes+=$(cp -nv "${lgsmdir}/config-default/config-game/${config}" "${networkcfgfullpath}") + if [ "${exitcode}" -ne 0 ]; then + fn_print_fail_eol_nl + fn_script_log_fail "copying config file ${networkcfgdefault}" + elif [ "${changes}" != "" ]; then + fn_print_ok_eol_nl + fn_script_log_pass "copying config file ${networkcfgdefault}" + else + fn_print_skip_eol_nl + fi elif [ "${shortname}" == "dst" ] && [ "${config}" == "${clustercfgdefault}" ]; then - cp -nv "${lgsmdir}/config-default/config-game/${clustercfgdefault}" "${clustercfgfullpath}" + echo -en "copying config file [ ${italic}${clustercfgfullpath}${default} ]" + changes+=$(cp -nv "${lgsmdir}/config-default/config-game/${clustercfgdefault}" "${clustercfgfullpath}") + if [ "${exitcode}" -ne 0 ]; then + fn_print_fail_eol_nl + fn_script_log_fail "copying config file ${clustercfgfullpath}" + elif [ "${changes}" != "" ]; then + fn_print_ok_eol_nl + fn_script_log_pass "copying config file ${clustercfgfullpath}" + else + fn_print_skip_eol_nl + fi else - mkdir -p "${servercfgdir}" - cp -nv "${lgsmdir}/config-default/config-game/${config}" "${servercfgdir}/${config}" + echo -en "copying config file [ ${italic}${servercfgdir}/${config}${default} ]" + changes+=$(cp -nv "${lgsmdir}/config-default/config-game/${config}" "${servercfgdir}/${config}") + if [ "${exitcode}" -ne 0 ]; then + fn_print_fail_eol_nl + fn_script_log_fail "copying config file ${servercfgdir}/${config}" + elif [ "${changes}" != "" ]; then + fn_print_ok_eol_nl + fn_script_log_pass "copying config file ${servercfgdir}/${config}" + else + fn_print_skip_eol_nl + fi fi + + unset changes done - fn_sleep_time } # Copys local default config to server config location. @@ -62,14 +95,21 @@ fn_default_config_local() { 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 + + # Check if the directory for ${servercfgfullpath} exists, if not, create it + if [ ! -d "$(dirname "${servercfgfullpath}")" ]; then + mkdir -p "$(dirname "${servercfgfullpath}")" + fi + + echo -en "copying config file [ ${italic}${servercfgdefault}${default} ]: " + cp --update=none "${servercfgdir}/${servercfgdefault}" "${servercfgfullpath}" + exitcode=$? + if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol - fn_script_log_fail "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} ]" + fn_script_log_pass "copying config file [ ${servercfgdefault} ]: " fi } @@ -80,30 +120,48 @@ fn_set_config_vars() { if [ -f "${servercfgfullpath}" ]; then randomstring=$(tr -dc 'A-Za-z0-9_' < /dev/urandom 2> /dev/null | head -c 8 | xargs) servername="LinuxGSM" - rconpass="admin${randomstring}" - echo -e "changing hostname." - fn_script_log_info "Changing hostname." + adminpass="admin${randomstring}" + echo -en "setting hostname\c" + fn_script_log_info "setting 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}" + changes+=$(sed -i "s/SERVERNAME=SERVERNAME/SERVERNAME=${servername}/g w /dev/stdout" "${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}" + changes+=$(sed -i "s/SERVERNAME=\"SERVERNAME\"/SERVERNAME=\"${servername}\"/g w /dev/stdout" "${servercfgfullpath}") else - sed -i "s/SERVERNAME/${servername}/g" "${servercfgfullpath}" + changes+=$(sed -i "s/SERVERNAME/${servername}/g w /dev/stdout" "${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" + exitcode=$? + if [ "${exitcode}" -ne 0 ]; then + fn_print_fail_eol + fn_script_log_fail "setting hostname" + elif [ "${changes}" != "" ]; then + fn_print_ok_eol_nl + fn_script_log_pass "setting hostname" else - sed -i "s/ADMINPASSWORD/${rconpass}/g" "${servercfgfullpath}" + fn_print_skip_eol_nl fi + + echo -en "generating admin/rcon password\c" + fn_script_log_info "generating admin/rcon password" 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 + if [ "${shortname}" == "squad" ]; then + changes+=$(sed -i "s/ADMINPASSWORD/${adminpass}/g w /dev/stdout" "${servercfgdir}/Rcon.cfg") + else + changes+=$(sed -i "s/ADMINPASSWORD/${adminpass}/g w /dev/stdout" "${servercfgfullpath}") + fi + exitcode=$? + if [ "${exitcode}" -ne 0 ]; then + fn_print_fail_eol + fn_script_log_fail "generating admin/rcon password" + elif [ "${changes}" != "" ]; then + fn_print_ok_eol_nl + fn_script_log_pass "generating admin/rcon password" + else + fn_print_skip_eol_nl + fi + unset changes fi } @@ -157,22 +215,22 @@ fn_set_dst_config_vars() { echo -e "" } -# Lists local config file locations +# Lists local config locations fn_list_config_locations() { 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}" + echo -e "${gamename} config file: ${italic}${servercfgfullpath}${default}" elif [ -d "${servercfgfullpath}" ]; then - echo -e "Game Server Config Dir: ${servercfgfullpath}" + echo -e "${gamename} config directory: ${italic}${servercfgfullpath}" else - echo -e "Config file: ${red}${servercfgfullpath}${default} (${red}FILE MISSING${default})" + echo -e "${gamename} config: ${italic}${red}${servercfgfullpath}${default} (${red}CONFIG IS MISSING${default})" fi fi - echo -e "LinuxGSM Config: ${lgsmdir}/config-lgsm/${gameservername}" - echo -e "Documentation: https://docs.linuxgsm.com/configuration/game-server-config" + echo -e "LinuxGSM config: ${italic}${lgsmdir}/config-lgsm/${gameservername}${default}" + echo -e "Config documentation: ${italic}https://docs.linuxgsm.com/configuration${default}" } if [ "${shortname}" == "sdtd" ]; then @@ -180,254 +238,206 @@ if [ "${shortname}" == "sdtd" ]; then fn_list_config_locations elif [ "${shortname}" == "ac" ]; then 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 array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ahl2" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ark" ]; then - 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 - 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 - 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 - 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 array_configs+=(config.txt) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "bd" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "bt" ]; then - 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 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}" == "bf1942" ]; then array_configs+=(serversettings.con) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "bfv" ]; then array_configs+=(serversettings.con) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "bs" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "bb" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "bb2" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "bmdm" ]; then array_configs+=(server.cfg) - 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 fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "cod" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "coduo" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "cod2" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "cod4" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "codwaw" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "cc" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "col" ]; then array_configs+=(colserver.json) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "cs" ]; then array_configs+=(server.cfg) - fn_fetch_default_config 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 fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "csgo" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "css" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ct" ]; then array_configs+=(ServerSetting.ini) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "dayz" ]; then - 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 array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "dodr" ]; then array_configs+=(Game.ini) - fn_fetch_default_config fn_default_config_remote fn_list_config_locations elif [ "${shortname}" == "dods" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "doi" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "dmc" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "dst" ]; then - 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 array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "dys" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "eco" ]; then array_configs+=(Network.eco) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations @@ -436,197 +446,157 @@ elif [ "${shortname}" == "em" ]; then fn_list_config_locations elif [ "${shortname}" == "etl" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ets2" ]; then - 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 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 array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "gmod" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "hldm" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "hldms" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ohd" ]; then array_configs+=(Admins.cfg Engine.ini Game.ini MapCycle.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "opfor" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "hl2dm" ]; then array_configs+=(server.cfg) - fn_fetch_default_config 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 fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ios" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "jc2" ]; then array_configs+=(config.lua) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "jc3" ]; then array_configs+=(config.json) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "kf" ]; then array_configs+=(Default.ini) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "l4d" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "l4d2" ]; then 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 array_configs+=(server.properties) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "mcb" ]; then array_configs+=(server.properties) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "mohaa" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "mh" ]; then - 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 array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "nmrih" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "nd" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "mta" ]; then - 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 - array_configs+=(DedicatedServerConfig.cfg) - fn_fetch_default_config fn_default_config_remote - fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "pvr" ]; then - fn_check_cfgdir array_configs+=(Game.ini) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars elif [ "${shortname}" == "pvkii" ]; then array_configs+=(server.cfg) - fn_fetch_default_config 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) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "nec" ]; then - 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 array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations @@ -635,174 +605,148 @@ elif [ "${shortname}" == "pc2" ]; then fn_list_config_locations elif [ "${shortname}" == "q2" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote 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 fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ql" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "jk2" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars elif [ "${shortname}" == "qw" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ricochet" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "rtcw" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "rust" ]; then - 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 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 array_configs+=(GameUserSettings.ini) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "sol" ]; then array_configs+=(soldat.ini) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "sof2" ]; then 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 array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "squad" ]; then 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 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 + array_configs+=(setting.xml) fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "stn" ]; then 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 array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "tf2" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "tfc" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ti" ]; then 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 array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ts3" ]; then array_configs+=(ts3server.ini) - fn_fetch_default_config fn_default_config_remote fn_list_config_locations elif [ "${shortname}" == "tw" ]; then 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 array_configs+=(serverconfig.txt) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "tu" ]; then - 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 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 array_configs+=(UT2004.ini) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ut99" ]; then array_configs+=(Default.ini) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations @@ -814,42 +758,42 @@ elif [ "${shortname}" == "vints" ]; then : elif [ "${shortname}" == "vs" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "wet" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "wf" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "wmc" ]; then array_configs+=(config.yml) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "xnt" ]; then + fix_xnt.sh + array_configs+=(server.cfg) + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "wurm" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "zmr" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "zps" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations diff --git a/lgsm/modules/install_dst_token.sh b/lgsm/modules/install_dst_token.sh index 89ec00a90..93ac1b8a4 100644 --- a/lgsm/modules/install_dst_token.sh +++ b/lgsm/modules/install_dst_token.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM install_dst_token.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Configures Don't Starve Together cluster with given token. @@ -12,7 +12,7 @@ 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" +echo -e "${italic}https://linuxgsm.com/dst-auth-token" echo -e "" if [ -z "${autoinstall}" ]; then overwritetoken="true" diff --git a/lgsm/modules/install_eula.sh b/lgsm/modules/install_eula.sh index 7f7f95f35..f32a1931e 100644 --- a/lgsm/modules/install_eula.sh +++ b/lgsm/modules/install_eula.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM install_eula.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Gets user to accept the EULA. @@ -19,11 +19,11 @@ echo -e "" 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 "" +echo -e "${italic}${eulaurl}${default}" 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 diff --git a/lgsm/modules/install_factorio_save.sh b/lgsm/modules/install_factorio_save.sh index 589a9d8ed..5dfb4758c 100644 --- a/lgsm/modules/install_factorio_save.sh +++ b/lgsm/modules/install_factorio_save.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM install_factorio_save.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Creates the initial save file for Factorio. diff --git a/lgsm/modules/install_gslt.sh b/lgsm/modules/install_gslt.sh index aa8d89d33..e4e4dbad7 100644 --- a/lgsm/modules/install_gslt.sh +++ b/lgsm/modules/install_gslt.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM install_gslt.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Configures GSLT. @@ -11,17 +11,16 @@ echo -e "" echo -e "${bold}${lightyellow}Game Server Login Token${default}" fn_messages_separator if [ "${shortname}" == "csgo" ] || [ "${shortname}" == "css" ] || [ "${shortname}" == "nmrih" ] || [ "${shortname}" == "bs" ]; then - echo -e "GSLT is required to run a public ${gamename} server" + 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" + 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 "" +echo -e "More info: ${italic}https://docs.linuxgsm.com/steamcmd/gslt${default}" +fn_script_log_info "More info: https://docs.linuxgsm.com/steamcmd/gslt" echo -e "" if [ -z "${autoinstall}" ]; then if [ "${shortname}" != "tu" ]; then @@ -37,11 +36,10 @@ if [ -z "${autoinstall}" ]; then fi 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}." + echo -e "The GSLT can be changed by editing: ${italic}${servercfgdir}/${servercfg}${default}" + 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." + echo -e "The GSLT can be changed by editing: ${italic}${configdirserver}/${selfname}.cfg${default}" + 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_header.sh b/lgsm/modules/install_header.sh index a7f1f9ddb..8fad78d2c 100644 --- a/lgsm/modules/install_header.sh +++ b/lgsm/modules/install_header.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM install_header.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Prints installation header. diff --git a/lgsm/modules/install_logs.sh b/lgsm/modules/install_logs.sh index 294bc1e46..9e1b89dbd 100644 --- a/lgsm/modules/install_logs.sh +++ b/lgsm/modules/install_logs.sh @@ -1,99 +1,123 @@ #!/bin/bash # LinuxGSM install_logs.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Creates log directories. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -if [ "${checklogs}" != "1" ]; then +if [ -z "${checklogs}" ]; then echo -e "" echo -e "${bold}${lightyellow}Creating Log Directories${default}" fn_messages_separator fi -# 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 +echo -en "creating log directory [ ${italic}${logdir}${default} ]" +if [ ! -d "${logdir}" ]; then + if ! mkdir -p "${logdir}"; then + fn_print_fail_eol_nl + core_exit.sh + else + fn_print_ok_eol_nl + fi else - fn_print_ok_eol_nl + fn_print_skip_eol_nl fi -echo -en "creating LinuxGSM log: ${lgsmlog}..." -touch "${lgsmlog}" -if [ $? != 0 ]; then - fn_print_fail_eol_nl - core_exit.sh + +echo -en "creating script log directory [ ${italic}${lgsmlogdir}${default} ]" +if [ ! -d "${lgsmlogdir}" ]; then + if ! mkdir -p "${lgsmlogdir}"; then + fn_print_fail_eol_nl + core_exit.sh + else + fn_print_ok_eol_nl + fi else - fn_print_ok_eol_nl + fn_print_skip_eol_nl fi -# Create Console logs. -if [ "${consolelogdir}" ]; then - echo -en "installing console log dir: ${consolelogdir}..." - mkdir -p "${consolelogdir}" - if [ $? != 0 ]; then + +echo -en "creating script log [ ${italic}${lgsmlog}${default} ]" +if [ ! -f "${lgsmlog}" ]; then + if ! touch "${lgsmlog}"; 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 +else + fn_print_skip_eol_nl +fi + +echo -en "creating console log directory [ ${italic}${consolelogdir}${default} ]" +if [ ! -d "${consolelogdir}" ]; then + if ! mkdir -p "${consolelogdir}"; then fn_print_fail_eol_nl core_exit.sh else fn_print_ok_eol_nl fi +else + fn_print_skip_eol_nl fi -# Create Game logs. -if [ "${gamelogdir}" ] && [ ! -d "${gamelogdir}" ]; then - echo -en "installing game log dir: ${gamelogdir}..." - if ! mkdir -p "${gamelogdir}"; then +echo -en "creating console log [ ${italic}${consolelog}${default} ]" +if [ ! -f "${consolelog}" ]; then + if ! touch "${consolelog}"; then fn_print_fail_eol_nl core_exit.sh else fn_print_ok_eol_nl fi +else + fn_print_skip_eol_nl +fi + +if [ -n "${gamelogdir}" ]; then + echo -en "creating game log directory [ ${italic}${gamelogdir}${default} ]" + if [ ! -d "${gamelogdir}" ]; then + if ! mkdir -p "${gamelogdir}"; then + fn_print_fail_eol_nl + core_exit.sh + else + fn_print_ok_eol_nl + fi + else + fn_print_skip_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 [ -n "${gamelogdir}" ] && [ "${gamelogdir:0:${#logdir}}" != "${logdir}" ]; then + echo -en "creating symlink to game log directory [ ${italic}${logdir}/server -> ${gamelogdir}${default} ]" + # if path does not exist or does not match gamelogdir + if [ ! -h "${logdir}/server" ] || [ "$(readlink -f "${logdir}/server")" != "${gamelogdir}" ]; then if ! ln -nfs "${gamelogdir}" "${logdir}/server"; then fn_print_fail_eol_nl core_exit.sh else fn_print_ok_eol_nl fi + else + fn_print_skip_eol_nl fi fi # If server uses SteamCMD create a symbolic link to the Steam logs. if [ -d "${HOME}/.steam/steam/logs" ]; then + echo -en "creating symlink to steam log directory [ ${italic}${logdir}/steam -> ${HOME}/.steam/steam/logs${default} ]" 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 fn_print_ok_eol_nl fi + else + fn_print_skip_eol_nl fi fi fn_script_log_info "Logs installed" diff --git a/lgsm/modules/install_mta_resources.sh b/lgsm/modules/install_mta_resources.sh index bafdbdbf1..f13c39abd 100644 --- a/lgsm/modules/install_mta_resources.sh +++ b/lgsm/modules/install_mta_resources.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM install_mta_resources.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://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. diff --git a/lgsm/modules/install_retry.sh b/lgsm/modules/install_retry.sh index 1fc4bf36a..71417a73f 100644 --- a/lgsm/modules/install_retry.sh +++ b/lgsm/modules/install_retry.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM install_retry.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Asks for installation retry after failure. diff --git a/lgsm/modules/install_server_dir.sh b/lgsm/modules/install_server_dir.sh index 0703e0c54..318e4bc80 100644 --- a/lgsm/modules/install_server_dir.sh +++ b/lgsm/modules/install_server_dir.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM install_server_dir.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Creates the server directory. @@ -10,10 +10,16 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" echo -e "${bold}${lightyellow}Server Directory${default}" fn_messages_separator +echo -en "creating serverfiles directory [ ${italic}${serverfiles}${default} ]" + if [ -d "${serverfiles}" ]; then - fn_print_warning_nl "A server is already installed here." + fn_print_skip_eol_nl + echo -e "" + echo -e "${italic}A game server is already exists at this location.${default}" +else + fn_print_ok_eol_nl fi -pwd + if [ -z "${autoinstall}" ]; then if ! fn_prompt_yn "Continue?" Y; then exitcode=0 @@ -21,5 +27,5 @@ if [ -z "${autoinstall}" ]; then fi fi if [ ! -d "${serverfiles}" ]; then - mkdir -v "${serverfiles}" + mkdir "${serverfiles}" fi diff --git a/lgsm/modules/install_server_files.sh b/lgsm/modules/install_server_files.sh index c5fe822ad..c667a7fe4 100644 --- a/lgsm/modules/install_server_files.sh +++ b/lgsm/modules/install_server_files.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM install_server_files.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Installs server files. @@ -12,196 +12,224 @@ fn_install_server_files() { 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" + 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" + 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" + 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" + 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" + 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" + 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" + 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" + 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" + 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" + 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" + 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" + 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" + 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" + 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" + 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}" local_filename="nquake.server.linux.190506.full.tar.xz" - chmodx="nochmodx" run="norun" + 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" + 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" + 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" + 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" + 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" + 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" + 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" + 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" + remote_fileurl="http://linuxgsm.download/UnrealTournament3/UT3-linux-server-2.1-openspy.tar.xz" local_filedir="${tmpdir}" - local_filename="UT3-linux-server-2.1.tar.xz" - chmodx="nochmodx" run="norun" + local_filename="UT3-linux-server-2.1-openspy.tar.xz" + chmodx="nochmodx" + run="norun" force="noforce" - md5="8876cca61e3f83ea08db25208bde6ac6" + md5="f60b745613a8676666eb6a2450cbdc8e" 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" + 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" + chmodx="nochmodx" + run="norun" force="noforce" md5="581a333cc7eacda2f56d5a00fe11eafa" elif [ "${shortname}" == "samp" ]; then - remote_fileurl="https://files.sa-mp.com/samp037svr_R2-1.tar.gz" + remote_fileurl="https://files.samp-sc.com/samp037svr_R2-1.tar.gz" local_filedir="${tmpdir}" local_filename="samp037svr_R2-1.tar.gz" - chmodx="nochmodx" run="norun" + 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" + chmodx="nochmodx" + run="norun" force="noforce" md5="0188ae86dbc9376f11ae3032dba2d665" else @@ -210,8 +238,13 @@ fn_install_server_files() { fi fn_fetch_file "${remote_fileurl}" "" "" "" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" fn_dl_extract "${local_filedir}" "${local_filename}" "${serverfiles}" + fn_clear_tmp } +if [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ] || [ "${shortname}" == "ut" ]; then + install_eula.sh +fi + echo -e "" echo -e "${bold}${lightyellow}Installing ${gamename} Server${default}" fn_messages_separator @@ -226,12 +259,10 @@ fi if [ "${shortname}" == "ts3" ]; then update_ts3.sh elif [ "${shortname}" == "mc" ]; then - install_eula.sh update_mc.sh elif [ "${shortname}" == "mcb" ]; then update_mcb.sh elif [ "${shortname}" == "pmc" ]; then - install_eula.sh update_pmc.sh elif [ "${shortname}" == "wmc" ] || [ "${shortname}" == "vpmc" ]; then update_pmc.sh @@ -247,6 +278,8 @@ elif [ "${shortname}" == "vints" ]; then elif [ "${shortname}" == "ut99" ]; then fn_install_server_files update_ut99.sh +elif [ "${shortname}" == "xnt" ]; then + update_xnt.sh 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 @@ -256,7 +289,6 @@ fi if [ -z "${autoinstall}" ]; then 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 28f4456a5..7b7d2ca66 100644 --- a/lgsm/modules/install_squad_license.sh +++ b/lgsm/modules/install_squad_license.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM install_squad_license.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Configures the Squad server's license. @@ -14,7 +14,7 @@ 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 "https://squad.fandom.com/wiki/Server_licensing" +echo -e "${italic}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 "" diff --git a/lgsm/modules/install_stats.sh b/lgsm/modules/install_stats.sh index 40a13434d..16653578b 100644 --- a/lgsm/modules/install_stats.sh +++ b/lgsm/modules/install_stats.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM install_stats.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Enabled LinuxGSM Stats. @@ -13,6 +13,7 @@ fn_messages_separator 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}" +echo -e "" echo -e "The following info will be sent: " echo -e "* game server" echo -e "* distro" @@ -24,5 +25,6 @@ if [ -z "${autoinstall}" ]; then 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" + echo -e "" + echo -e "auto-install leaves stats off by default. Stats can be enabled in ${italic}common.cfg${default}" fi diff --git a/lgsm/modules/install_steamcmd.sh b/lgsm/modules/install_steamcmd.sh index 50599ebd5..475544a6a 100644 --- a/lgsm/modules/install_steamcmd.sh +++ b/lgsm/modules/install_steamcmd.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM install_steamcmd.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Downloads SteamCMD on install. diff --git a/lgsm/modules/install_ts3db.sh b/lgsm/modules/install_ts3db.sh index 464bd686a..584fbd7c0 100644 --- a/lgsm/modules/install_ts3db.sh +++ b/lgsm/modules/install_ts3db.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM install_ts3db.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Installs the database server MariaDB for TeamSpeak 3. @@ -11,8 +11,8 @@ 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 + exitcode=$? + if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl fn_script_log_fail "copying libmariadb.so.2" core_exit.sh diff --git a/lgsm/modules/install_ut2k4_key.sh b/lgsm/modules/install_ut2k4_key.sh index 6fbd2a838..2829da8d6 100644 --- a/lgsm/modules/install_ut2k4_key.sh +++ b/lgsm/modules/install_ut2k4_key.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM install_ut2k4_key.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Activates ut2k4 server with given key. @@ -12,7 +12,7 @@ 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" +echo -e "${italic}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" diff --git a/lgsm/modules/mods_core.sh b/lgsm/modules/mods_core.sh index 1b85a95b3..b88e0c05e 100644 --- a/lgsm/modules/mods_core.sh +++ b/lgsm/modules/mods_core.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM command_mods_install.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Core modules for mods list/install/update/remove @@ -57,8 +57,8 @@ fn_mod_lowercase() { # Finally we can rename the file mv "${src}" "${dst}" # Exit if it fails for any reason - local exitcode=$? - if [ "${exitcode}" != 0 ]; then + exitcode=$? + if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl core_exit.sh fi @@ -74,8 +74,8 @@ fn_mod_create_filelist() { fn_sleep_time # ${modsdir}/${modcommand}-files.txt. find "${extractdest}" -mindepth 1 -printf '%P\n' > "${modsdir}/${modcommand}-files.txt" - local exitcode=$? - if [ "${exitcode}" != 0 ]; then + exitcode=$? + if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl fn_script_log_fail "Building ${modsdir}/${modcommand}-files.txt" core_exit.sh @@ -94,8 +94,8 @@ fn_mod_copy_destination() { echo -en "copying ${modprettyname} to ${modinstalldir}..." fn_sleep_time cp -Rf "${extractdest}/." "${modinstalldir}/" - local exitcode=$? - if [ "${exitcode}" != 0 ]; then + exitcode=$? + if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl fn_script_log_fail "Copying ${modprettyname} to ${modinstalldir}" else @@ -132,8 +132,8 @@ fn_mod_tidy_files_list() { # Delete line(s) matching exactly. sed -i "/^${removefilevar}$/d" "${modsdir}/${modcommand}-files.txt" # Exit on error. - local exitcode=$? - if [ "${exitcode}" != 0 ]; then + exitcode=$? + if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl fn_script_log_fail "Error while tidying line: ${removefilevar} from: ${modsdir}/${modcommand}-files.txt" core_exit.sh @@ -388,7 +388,7 @@ fn_create_mods_dir() { echo -en "creating LinuxGSM mods data directory ${modsdir}..." mkdir -p "${modsdir}" exitcode=$? - if [ "${exitcode}" != 0 ]; then + if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl fn_script_log_fail "Creating mod download dir ${modsdir}" core_exit.sh @@ -402,7 +402,7 @@ fn_create_mods_dir() { echo -en "creating mods install directory ${modinstalldir}..." mkdir -p "${modinstalldir}" exitcode=$? - if [ "${exitcode}" != 0 ]; then + if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl fn_script_log_fail "Creating mod install directory ${modinstalldir}" core_exit.sh @@ -412,7 +412,7 @@ fn_create_mods_dir() { fi fi - # Create lgsm/data/${modsinstalledlist}. + # Create ${datadir}/${modsinstalledlist}. if [ ! -f "${modsinstalledlistfullpath}" ]; then touch "${modsinstalledlistfullpath}" fn_script_log_info "Created ${modsinstalledlistfullpath}" @@ -425,7 +425,7 @@ fn_mods_create_tmp_dir() { mkdir -p "${modstmpdir}" exitcode=$? echo -en "creating mod download directory ${modstmpdir}..." - if [ "${exitcode}" != 0 ]; then + if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl fn_script_log_fail "Creating mod download directory ${modstmpdir}" core_exit.sh @@ -442,7 +442,7 @@ fn_mods_clear_tmp_dir() { echo -en "clearing mod download directory ${modstmpdir}..." rm -rf "${modstmpdir:?}" exitcode=$? - if [ "${exitcode}" != 0 ]; then + if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl fn_script_log_fail "Clearing mod download directory ${modstmpdir}" core_exit.sh @@ -580,7 +580,7 @@ fn_mod_install_liblist_gam_file() { grep -q "addons/metamod/dlls/metamod.dll" "${modinstalldir}/liblist.gam" exitcode=$? # if replacement back didn't happen, error out. - if [ "${exitcode}" != 0 ]; then + if [ "${exitcode}" -ne 0 ]; then fn_script_log_fail "${logentry}" fn_print_fail_eol_nl else @@ -596,7 +596,7 @@ fn_mod_install_liblist_gam_file() { grep -q "addons/metamod/dlls/metamod.so" "${modinstalldir}/liblist.gam" exitcode=$? # if replacement back didn't happen, error out - if [ "${exitcode}" != 0 ]; then + if [ "${exitcode}" -ne 0 ]; then fn_script_log_fail "${logentry}" fn_print_fail_eol_nl else @@ -614,11 +614,11 @@ fn_mod_install_liblist_gam_file() { grep -q "addons/metamod/dlls/metamod.dylib" "${modinstalldir}/liblist.gam" exitcode=$? # if replacement back didn't happen, error out. - if [ "${exitcode}" != 0 ]; then + if [ "${exitcode}" -ne 0 ]; then fn_script_log_fail "${logentry}" fn_print_fail_eol_nl else - fn_script_log_pass ${logentry} + fn_script_log_pass "${logentry}" fn_print_ok_eol_nl fi fi @@ -638,11 +638,11 @@ fn_mod_remove_liblist_gam_file() { grep -q "${moddll}" "${modinstalldir}/liblist.gam" exitcode=$? # if replacement back didn't happen, error out. - if [ "${exitcode}" != 0 ]; then + if [ "${exitcode}" -ne 0 ]; then fn_script_log_fail "${logentry}" fn_print_fail_eol_nl else - fn_script_log_pass ${logentry} + fn_script_log_pass "${logentry}" fn_print_ok_eol_nl fi @@ -654,11 +654,11 @@ fn_mod_remove_liblist_gam_file() { grep -q "${modso}" "${modinstalldir}/liblist.gam" exitcode=$? # if replacement back didn't happen, error out - if [ "${exitcode}" != 0 ]; then + if [ "${exitcode}" -ne 0 ]; then fn_script_log_fail "${logentry}" fn_print_fail_eol_nl else - fn_script_log_pass ${logentry} + fn_script_log_pass "${logentry}" fn_print_ok_eol_nl fi @@ -672,11 +672,11 @@ fn_mod_remove_liblist_gam_file() { grep -q "${moddylib}" "${modinstalldir}/liblist.gam" # if replacement back didn't happen, error out. exitcode=$? - if [ "${exitcode}" != 0 ]; then + if [ "${exitcode}" -ne 0 ]; then fn_script_log_fail "${logentry}" fn_print_fail_eol_nl else - fn_script_log_pass ${logentry} + fn_script_log_pass "${logentry}" fn_print_ok_eol_nl fi fi @@ -691,15 +691,15 @@ fn_mod_install_amxmodx_file() { 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 + if [ "${exitcode}" -ne 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 + if [ "${exitcode}" -ne 0 ]; then fn_script_log_fail "${logentry}" fn_print_fail_eol_nl else - fn_script_log_pass ${logentry} + fn_script_log_pass "${logentry}" fn_print_ok_eol_nl fi fi @@ -707,12 +707,12 @@ fn_mod_install_amxmodx_file() { # 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 + if [ "${exitcode}" -ne 0 ]; then fn_script_log_fail "${logentry}" fn_print_fail_eol_nl core_exit.sh else - fn_script_log_pass ${logentry} + fn_script_log_pass "${logentry}" fn_print_ok_eol_nl fi fi @@ -726,17 +726,17 @@ fn_mod_remove_amxmodx_file() { 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 + if [ "${exitcode}" -eq 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 + if [ "${exitcode}" -ne 0 ]; then fn_script_log_fail "${logentry}" fn_print_fail_eol_nl else - fn_script_log_pass ${logentry} + fn_script_log_pass "${logentry}" fn_print_ok_eol_nl fi diff --git a/lgsm/modules/mods_list.sh b/lgsm/modules/mods_list.sh index bd6eaff24..89412e65d 100644 --- a/lgsm/modules/mods_list.sh +++ b/lgsm/modules/mods_list.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM mods_list.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://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; @@ -61,45 +61,51 @@ metamodsourcelatestfile=$(wget "${metamodsourcescrapeurl}" -q -O -) metamodsourcedownloadurl="https://www.metamodsource.net/latest.php?os=linux&version=${metamodsourceversion}" metamodsourceurl="${metamodsourcedownloadurl}" # Sourcemod -sourcemodversion="1.11" +sourcemodversion="1.12" 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) +steamworkslatestfile=$(curl --connect-timeout 3 -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"))') +get5lastbuild=$(curl --connect-timeout 3 -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[]') +csgopracticelatest=$(curl --connect-timeout 3 -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[]') +csgopuglatest=$(curl --connect-timeout 3 -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/') +gokzlatestversion=$(curl --connect-timeout 3 -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/') +movementapilatestversion=$(curl --connect-timeout 3 -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') +carbonrustlatestlink=$(curl --connect-timeout 3 -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') +oxiderustlatestlink=$(curl --connect-timeout 3 -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 3 -sL https://api.github.com/repos/OxideMod/Oxide.Hurtworld/releases/latest | jq -r '.assets[].browser_download_url') +oxidesdtdlatestlink=$(curl --connect-timeout 3 -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 -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') +valheimpluslatestlink=$(curl --connect-timeout 3 -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 3 -sL "https://thunderstore.io/api/experimental/package/denikson/BepInExPack_Valheim/" -H "accept: application/json" | jq -r '.latest.download_url') # Define mods information (required) @@ -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)") @@ -183,7 +189,6 @@ mod_info_spinnertool=(MOD "spinnertool" "Spinner Tool" "https://github.com/dvdvi mod_info_surfacefrictiontool=(MOD "surfacefrictiontool" "Surface Friction Tool" "https://github.com/dvdvideo1234/surfacefrictiontool/archive/master.zip" "surfacefrictiontool-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/SurfaceFrictionTool" "Controls the surface friction of a prop") mod_info_magneticdipole=(MOD "magneticdipole" "Magnetic Dipole" "https://github.com/dvdvideo1234/magneticdipole/archive/master.zip" "magneticdipole-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/MagneticDipole" "Magnet entity that runs forces on its poles. Supports wire") mod_info_environmentorganizer=(MOD "environmentorganizer" "Environment Organizer" "https://github.com/dvdvideo1234/environmentorganizer/archive/master.zip" "environmentorganizer-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/EnvironmentOrganizer" "Installs routines designed for server settings adjustment") -mod_info_precision_alignment=(MOD "precision-alignment" "Precision Alignment" "https://github.com/Mista-Tea/precision-alignment/archive/master.zip" "precision-alignment-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/Mista-Tea/precision-alignment" "Creates precise constraints and aligments") mod_info_improved_stacker=(MOD "improved-stacker" "Improved Stacker" "https://github.com/Mista-Tea/improved-stacker/archive/master.zip" "improved-stacker-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/Mista-Tea/improved-stacker" "Stacks entities in the direction chosen") mod_info_improved_weight=(MOD "improved-weight" "Improved Weight" "https://github.com/Mista-Tea/improved-weight/archive/master.zip" "improved-weight-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/Mista-Tea/improved-weight" "Weight tool but with more features") mod_info_improved_antinoclip=(MOD "improved-antinoclip" "Improved Antinoclip" "https://github.com/Mista-Tea/improved-antinoclip/archive/master.zip" "improved-antinoclip-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/Mista-Tea/improved-antinoclip" "Controls clipping trough an object") diff --git a/lgsm/modules/query_gamedig.sh b/lgsm/modules/query_gamedig.sh index 28f70a3b7..d8c3c6a7f 100644 --- a/lgsm/modules/query_gamedig.sh +++ b/lgsm/modules/query_gamedig.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM query_gamedig.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Querys a gameserver using node-gamedig. # https://github.com/gamedig/node-gamedig @@ -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 @@ -35,9 +42,7 @@ if [ "$(command -v gamedig 2> /dev/null)" ] && [ "$(command -v jq 2> /dev/null)" fi # numplayers. - if [ "${querytype}" == "minecraft" ]; then - gdplayers=$(echo "${gamedigraw}" | jq -re '.players | length-1') - elif [ "${querytype}" == "teamspeak3" ]; then + if [ "${querytype}" == "teamspeak3" ]; then gdplayers=$(echo "${gamedigraw}" | jq -re '.raw.virtualserver_clientsonline') else gdplayers=$(echo "${gamedigraw}" | jq -re '.players | length') diff --git a/lgsm/modules/query_gsquery.py b/lgsm/modules/query_gsquery.py index 8da93ada4..4dbde90dd 100644 --- a/lgsm/modules/query_gsquery.py +++ b/lgsm/modules/query_gsquery.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # LinuxGSM query_gsquery.py module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Allows querying of various game servers. @@ -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/lgsm/modules/update_fctr.sh b/lgsm/modules/update_fctr.sh index 8fb78ede3..3418c7424 100644 --- a/lgsm/modules/update_fctr.sh +++ b/lgsm/modules/update_fctr.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM update_fctr.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Handles updating of Factorio servers. @@ -20,7 +20,7 @@ fn_update_localbuild() { # Uses executable to get local build. if [ -d "${executabledir}" ]; then cd "${executabledir}" || exit - localbuild=$(${executable} --version | grep "Version:" | awk '{print $2}') + localbuild=$(${executable} --version | grep -m 1 "Version:" | awk '{print $2}') fi if [ -z "${localbuild}" ]; then fn_print_error "Checking local build: ${remotelocation}: missing local build info" @@ -34,7 +34,7 @@ fn_update_localbuild() { } fn_update_remotebuild() { - # Get remote build info. + # Gets remote build info. apiurl="https://factorio.com/get-download/${branch}/headless/${factorioarch}" remotebuildresponse=$(curl -s "${apiurl}") remotebuildversion=$(echo "${remotebuildresponse}" | grep -o '[0-9]\.[0-9]\{1,\}\.[0-9]\{1,\}' | head -1) diff --git a/lgsm/modules/update_jk2.sh b/lgsm/modules/update_jk2.sh index e2715c01c..5fdd54c65 100644 --- a/lgsm/modules/update_jk2.sh +++ b/lgsm/modules/update_jk2.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM update_jk2.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Handles updating of Jedi Knight 2 servers. @@ -31,7 +31,7 @@ fn_update_localbuild() { } fn_update_remotebuild() { - # Get remote build info. + # Gets remote build info. apiurl="https://api.github.com/repos/mvdevs/jk2mv/releases/latest" remotebuildresponse=$(curl -s "${apiurl}") remotebuildfilename=$(echo "${remotebuildresponse}" | jq -r '.assets[]|select(.browser_download_url | contains("dedicated.zip")) | .name') @@ -152,6 +152,12 @@ fn_update_compare() { # The location where the builds are checked and downloaded. remotelocation="github.com" +if [ ! "$(command -v jq 2> /dev/null)" ]; then + fn_print_fail_nl "jq is not installed" + fn_script_log_fail "jq is not installed" + core_exit.sh +fi + if [ "${firstcommandname}" == "INSTALL" ]; then fn_update_remotebuild fn_update_dl diff --git a/lgsm/modules/update_mc.sh b/lgsm/modules/update_mc.sh index 4a0bdde37..a9be77576 100644 --- a/lgsm/modules/update_mc.sh +++ b/lgsm/modules/update_mc.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM update_mc.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Handles updating of Minecraft: Java Edition servers. @@ -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 } @@ -34,7 +34,7 @@ fn_update_localbuild() { } fn_update_remotebuild() { - # Get remote build info. + # Gets remote build info. apiurl="https://launchermeta.mojang.com/mc/game/version_manifest.json" remotebuildresponse=$(curl -s "${apiurl}") # Latest release. @@ -167,6 +167,12 @@ fn_update_compare() { # The location where the builds are checked and downloaded. remotelocation="mojang.com" +if [ ! "$(command -v jq 2> /dev/null)" ]; then + fn_print_fail_nl "jq is not installed" + fn_script_log_fail "jq is not installed" + core_exit.sh +fi + if [ "${firstcommandname}" == "INSTALL" ]; then fn_update_remotebuild fn_update_dl diff --git a/lgsm/modules/update_mcb.sh b/lgsm/modules/update_mcb.sh index 7bd273d66..a8616c3b8 100644 --- a/lgsm/modules/update_mcb.sh +++ b/lgsm/modules/update_mcb.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM update_mcb.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Handles updating of Minecraft Bedrock servers. @@ -15,8 +15,8 @@ fn_update_dl() { else unzip -oq "${tmpdir}/bedrock_server.${remotebuildversion}.zip" -x "permissions.json" "server.properties" "allowlist.json" -d "${serverfiles}" fi - local exitcode=$? - if [ "${exitcode}" != 0 ]; then + exitcode=$? + if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol_nl fn_script_log_fail "Extracting ${local_filename}" if [ -f "${lgsmlog}" ]; then @@ -27,7 +27,9 @@ fn_update_dl() { core_exit.sh else fn_print_ok_eol_nl - fn_script_log_pass "Extracting ${local_filename}" + if [ -f "${lgsmlog}" ]; then + fn_script_log_pass "Extracting ${local_filename}" + fi fn_clear_tmp fi } @@ -36,7 +38,7 @@ fn_update_localbuild() { # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" # Uses log file to get local build. - localbuild=$(grep Version "${consolelogdir}"/* 2> /dev/null | tail -1 | sed 's/.*Version: //' | tr -d '\000-\011\013-\037') + localbuild=$(grep -hoP 'Version:\s*\K[\d.]+' "${consolelogdir}"/* 2> /dev/null | sort -V -r | head -n1) if [ -z "${localbuild}" ]; then fn_print_error "Checking local build: ${remotelocation}: missing local build info" fn_script_log_error "Missing local build info" @@ -49,15 +51,18 @@ fn_update_localbuild() { } fn_update_remotebuild() { - # Random number for userAgent - randomint=$(tr -dc 0-9 < /dev/urandom 2> /dev/null | head -c 4 | xargs) - # Get remote build info. - if [ "${mcversion}" == "latest" ]; then - remotebuildversion=$(curl -H "Accept-Encoding: identity" -H "Accept-Language: en" -Ls -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.${randomint}.212 Safari/537.36" "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*' | sed 's/.*\///' | grep -Eo "[.0-9]+[0-9]") + # Gets remote build info. + apiurl="https://net-secondary.web.minecraft-services.net/api/v1.0/download/links" + remotebuildresponse=$(curl -s "${apiurl}" | jq '.result.links[]') + # Latest preview. + if [ "${mcversion}" == "preview" ]; then + remotebuildurl=$(echo "${remotebuildresponse}" | jq -r 'select(.downloadType == "serverBedrockPreviewLinux") | .downloadUrl') + # Latest release. else - remotebuildversion="${mcversion}" + remotebuildurl=$(echo "${remotebuildresponse}" | jq -r 'select(.downloadType == "serverBedrockLinux") | .downloadUrl') fi - remotebuildurl="https://minecraft.azureedge.net/bin-linux/bedrock-server-${remotebuildversion}.zip" + remotebuildversion=$(echo "${remotebuildurl}" | grep -Eo "[.0-9]+[0-9]") + remotebuildfilename="bedrock-server-${remotebuildversion}.zip" if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" @@ -173,6 +178,12 @@ fn_update_compare() { # The location where the builds are checked and downloaded. remotelocation="minecraft.net" +if [ ! "$(command -v jq 2> /dev/null)" ]; then + fn_print_fail_nl "jq is not installed" + fn_script_log_fail "jq is not installed" + core_exit.sh +fi + if [ "${firstcommandname}" == "INSTALL" ]; then fn_update_remotebuild fn_update_dl diff --git a/lgsm/modules/update_mta.sh b/lgsm/modules/update_mta.sh index c6f7dfcb0..50a3fb895 100644 --- a/lgsm/modules/update_mta.sh +++ b/lgsm/modules/update_mta.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM update_mta.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Handles updating of Multi Theft Auto servers. @@ -34,7 +34,7 @@ fn_update_localbuild() { } fn_update_remotebuild() { - # Get remote build info. + # Gets remote build info. apiurl="https://linux.multitheftauto.com/revision/latest.txt" remotebuildresponse=$(curl -s "${apiurl}") remotebuildfilename="multitheftauto_linux_x64.tar.gz" @@ -160,6 +160,12 @@ fn_update_compare() { # The location where the builds are checked and downloaded. remotelocation="linux.mtasa.com" +if [ ! "$(command -v jq 2> /dev/null)" ]; then + fn_print_fail_nl "jq is not installed" + fn_script_log_fail "jq is not installed" + core_exit.sh +fi + if [ "${firstcommandname}" == "INSTALL" ]; then fn_update_remotebuild fn_update_dl diff --git a/lgsm/modules/update_pmc.sh b/lgsm/modules/update_pmc.sh index 5d44bee21..c38911d4e 100644 --- a/lgsm/modules/update_pmc.sh +++ b/lgsm/modules/update_pmc.sh @@ -1,11 +1,11 @@ #!/bin/bash # LinuxGSM update_pmc.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Handles updating of PaperMC and Waterfall servers. -module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_dl() { # Download and extract files to serverfiles. @@ -32,8 +32,8 @@ fn_update_localbuild() { } fn_update_remotebuild() { - # Get remote build info. - apiurl="https://papermc.io/api/v2/projects" + # Gets remote build info. + apiurl="https://api.papermc.io/v2/projects" # Get list of projects. remotebuildresponse=$(curl -s "${apiurl}") # Get list of Minecraft versions for project. @@ -177,6 +177,12 @@ fn_update_compare() { # The location where the builds are checked and downloaded. remotelocation="papermc.io" +if [ ! "$(command -v jq 2> /dev/null)" ]; then + fn_print_fail_nl "jq is not installed" + fn_script_log_fail "jq is not installed" + core_exit.sh +fi + if [ "${shortname}" == "pmc" ]; then paperproject="paper" elif [ "${shortname}" == "vpmc" ]; then diff --git a/lgsm/modules/update_steamcmd.sh b/lgsm/modules/update_steamcmd.sh index 20a85ab93..ccc8d6b36 100644 --- a/lgsm/modules/update_steamcmd.sh +++ b/lgsm/modules/update_steamcmd.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM update_steamcmd.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Handles updating using SteamCMD. diff --git a/lgsm/modules/update_ts3.sh b/lgsm/modules/update_ts3.sh index 1fa77f428..e1917e5e1 100644 --- a/lgsm/modules/update_ts3.sh +++ b/lgsm/modules/update_ts3.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM command_ts3.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Handles updating of Teamspeak 3 servers. @@ -31,7 +31,7 @@ fn_update_localbuild() { } fn_update_remotebuild() { - # Get remote build info. + # Gets remote build info. apiurl="https://www.teamspeak.com/versions/server.json" remotebuildresponse=$(curl -s "${apiurl}") @@ -171,6 +171,12 @@ fi # The location where the builds are checked and downloaded. remotelocation="teamspeak.com" +if [ ! "$(command -v jq 2> /dev/null)" ]; then + fn_print_fail_nl "jq is not installed" + fn_script_log_fail "jq is not installed" + core_exit.sh +fi + if [ "${firstcommandname}" == "INSTALL" ]; then fn_update_remotebuild fn_update_dl diff --git a/lgsm/modules/update_ut99.sh b/lgsm/modules/update_ut99.sh index 6d0be1941..bdfb96f0b 100644 --- a/lgsm/modules/update_ut99.sh +++ b/lgsm/modules/update_ut99.sh @@ -1,11 +1,11 @@ #!/bin/bash # LinuxGSM command_ut99.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Handles updating of Unreal Tournament 99 servers. -module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_dl() { # Download and extract files to serverfiles. @@ -32,7 +32,7 @@ fn_update_localbuild() { } fn_update_remotebuild() { - # Get remote build info. + # Gets remote build info. apiurl="https://api.github.com/repos/OldUnreal/UnrealTournamentPatches/releases/latest" remotebuildresponse=$(curl -s "${apiurl}") remotebuildfilename=$(echo "${remotebuildresponse}" | jq -r '.assets[]|select(.browser_download_url | contains("Linux-amd64")) | .name') @@ -153,6 +153,12 @@ fn_update_compare() { # The location where the builds are checked and downloaded. remotelocation="github.com" +if [ ! "$(command -v jq 2> /dev/null)" ]; then + fn_print_fail_nl "jq is not installed" + fn_script_log_fail "jq is not installed" + core_exit.sh +fi + if [ "${firstcommandname}" == "INSTALL" ]; then fn_update_remotebuild fn_update_dl diff --git a/lgsm/modules/update_vints.sh b/lgsm/modules/update_vints.sh index 403917e0c..4021af11a 100644 --- a/lgsm/modules/update_vints.sh +++ b/lgsm/modules/update_vints.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM update_vints.sh module # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Handles updating of Vintage Story servers. @@ -34,7 +34,7 @@ fn_update_localbuild() { } fn_update_remotebuild() { - # Get remote build info. + # Gets remote build info. apiurl="http://api.vintagestory.at/stable-unstable.json" remotebuildresponse=$(curl -s "${apiurl}") if [ "${branch}" == "stable" ]; then @@ -160,6 +160,12 @@ fn_update_compare() { # The location where the builds are checked and downloaded. remotelocation="vintagestory.at" +if [ ! "$(command -v jq 2> /dev/null)" ]; then + fn_print_fail_nl "jq is not installed" + fn_script_log_fail "jq is not installed" + core_exit.sh +fi + if [ "${firstcommandname}" == "INSTALL" ]; then fn_update_remotebuild fn_update_dl diff --git a/lgsm/modules/update_xnt.sh b/lgsm/modules/update_xnt.sh new file mode 100644 index 000000000..c00233aa7 --- /dev/null +++ b/lgsm/modules/update_xnt.sh @@ -0,0 +1,190 @@ +#!/bin/bash +# LinuxGSM command_xnt.sh module +# Author: Daniel Gibbs +# Contributors: https://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Handles updating of Xontic servers. + +moduleselfname="$(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}" "Xonotic" + fn_clear_tmp +} + +fn_update_localbuild() { + # Gets local build info. + fn_print_dots "Checking local build: ${remotelocation}" + check_status.sh + # Send version command to Xonotic server. + if [ "${status}" != "0" ]; then + tmux -L "${socketname}" send-keys -t "${sessionname}" "version" C-m > /dev/null 2>&1 + fn_sleep_time_1 + else + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + fn_sleep_time_5 + tmux -L "${socketname}" send-keys -t "${sessionname}" "version" C-m > /dev/null 2>&1 + command_stop.sh + fn_firstcommand_reset + fi + + # Uses log file to get local build. + localbuild=$(grep "SVQC version: xonotic-v" "${consolelogdir}"/* 2> /dev/null | tail -1 | sed 's/.*SVQC version: \(xonotic-v[0-9.]*\).*/\1/' | tr -d '\000-\011\013-\037') + 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() { + # Gets remote build info. + apiurl="https://api.github.com/repos/xonotic/xonotic/tags" + remotebuildresponse=$(curl -s "${apiurl}") + remotebuildtag=$(echo "${remotebuildresponse}" | jq -r '.[0].name') + remotebuildfilename=$(echo "${remotebuildtag}" | tr -d 'v') + remotebuildfilename="${remotebuildfilename}.zip" + remotebuildurl="https://dl.xonotic.org/${remotebuildfilename}" + + remotebuildversion="${remotebuildtag}" + + 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_fail "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_fail "Unable to get remote build" + core_exit.sh + fi + fi +} + +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" + 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 + date +%s > "${lockdir}/last-updated.lock" + 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 + fn_sleep_time_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 + 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 [ ! "$(command -v jq 2> /dev/null)" ]; then + fn_print_fail_nl "jq is not installed" + fn_script_log_fail "jq is not installed" + core_exit.sh +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/linuxgsm.sh b/linuxgsm.sh index 844aca991..6d6f7251f 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -24,7 +24,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v24.1.2" +version="v25.1.6" shortname="core" gameservername="core" commandname="CORE" @@ -70,6 +70,42 @@ core_modules.sh() { # Bootstrap # Fetches the core modules required before passed off to core_dl.sh. +fn_bootstrap_fetch_trap() { + echo -e "" + echo -en "downloading ${local_filename}" + fn_print_canceled_eol_nl + fn_script_log_info "Downloading ${local_filename}...CANCELED" + 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 +} + +# Fetches modules from the Git repo during first download. +fn_bootstrap_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}" +} + fn_bootstrap_fetch_file() { remote_fileurl="${1}" remote_fileurl_backup="${2}" @@ -80,7 +116,8 @@ fn_bootstrap_fetch_file() { chmodx="${7:-0}" run="${8:-0}" forcedl="${9:-0}" - md5="${10:-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. @@ -107,44 +144,54 @@ fn_bootstrap_fetch_file() { 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 --connect-timeout 10 -s --fail -L -o "${local_filedir}/${local_filename}" "${fileurl}" 2>&1) - - local exitcode=$? + trap fn_bootstrap_fetch_trap INT + curlcmd=(curl --connect-timeout 3 --fail -L -o "${local_filedir}/${local_filename}" --retry 2 -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.${randomint}.212 Safari/537.36") + + # 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 -e "downloading file [ ${local_filename} ]" + fn_sleep_time + "${curlcmd[@]}" --progress-bar "${fileurl}" 2>&1 + exitcode=$? + echo -en "downloading file [ ${local_filename} ]" + 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 [ -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 # On first try will error. On second try will fail. - if [ "${exitcode}" != 0 ]; then + if [ "${exitcode}" -ne 0 ]; then if [ ${counter} -ge 2 ]; then - echo -e "FAIL" + echo -e " ... FAIL" if [ -f "${lgsmlog}" ]; then - fn_script_log_fail "Downloading ${local_filename}" + fn_script_log_fail "Downloading ${local_filename}..." fn_script_log_fail "${fileurl}" fi core_exit.sh else - echo -e "ERROR" + echo -e " ... ERROR" 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 - echo -en "OK" - sleep 0.3 - echo -en "\033[2K\\r" + echo -en " ... OK" + sleep "0.1" + echo -e "\033\\r" 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. @@ -246,7 +293,8 @@ fn_install_menu_whiptail() { 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 + exitcode=$? + if [ "${exitcode}" -eq 0 ]; then eval "$resultvar=\"${OPTION}\"" else eval "$resultvar=" @@ -395,13 +443,14 @@ else fi if [ ! -f "${configdirserver}/_default.cfg" ]; then mkdir -p "${configdirserver}" - echo -en "copying _default.cfg...\c" + echo -en "copying _default.cfg\c" cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" - if [ $? != 0 ]; then - echo -e "FAIL" + exitcode=$? + if [ "${exitcode}" -ne 0 ]; then + echo -e " ... FAIL" exit 1 else - echo -e "OK" + echo -e " ... OK" fi else config_file_diff=$(diff -q "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg") @@ -409,11 +458,12 @@ else 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" - if [ $? != 0 ]; then + exitcode=$? + if [ "${exitcode}" -ne 0 ]; then echo -e "FAIL" exit 1 else - echo -e "OK" + echo -e " ... OK" fi fi fi diff --git a/package-lock.json b/package-lock.json index 669e4f59d..581f6ea8a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,9 +6,441 @@ "": { "name": "linuxgsm", "license": "MIT", + "dependencies": { + "gamedig": "^5.1.4" + }, "devDependencies": { - "prettier": "^3.0.3", - "prettier-plugin-sh": "^0.13.1" + "prettier": "^3.4.2", + "prettier-plugin-sh": "^0.14.0" + } + }, + "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.1.4", + "resolved": "https://registry.npmjs.org/gamedig/-/gamedig-5.1.4.tgz", + "integrity": "sha512-MgSbNVGh5QMdrmRTrZ3W7W6sC5/Mx+dMgTy2uZCKQ9vns9eFXkQj61Pw2Y2FNHNMMp4DXFSUMYAPJWLcR16Wwg==", + "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", + "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": { @@ -17,10 +449,63 @@ "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", - "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz", + "integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" @@ -33,9 +518,9 @@ } }, "node_modules/prettier-plugin-sh": { - "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==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/prettier-plugin-sh/-/prettier-plugin-sh-0.14.0.tgz", + "integrity": "sha512-hfXulj5+zEl/ulrO5kMuuTPKmXvOg0bnLHY1hKFNN/N+/903iZbNp8NyZBTsgI8dtkSgFfAEIQq0IQTyP1ZVFQ==", "dev": true, "dependencies": { "mvdan-sh": "^0.10.1", @@ -48,7 +533,80 @@ "url": "https://opencollective.com/unts" }, "peerDependencies": { - "prettier": "^3.0.0" + "prettier": "^3.0.3" + } + }, + "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/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": { @@ -66,11 +624,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..404356e5e 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,8 @@ "test": "tests" }, "devDependencies": { - "prettier": "^3.0.3", - "prettier-plugin-sh": "^0.13.1" + "prettier": "^3.4.2", + "prettier-plugin-sh": "^0.14.0" }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" @@ -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.1.4" + } }