From b02f1a436e6cb0d6759ed08edcc3fe98355b50de Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 17 Mar 2021 16:16:43 +0000 Subject: [PATCH 01/38] spaces --- lgsm/functions/check_deps.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh index 94e48e672..50109b2f6 100755 --- a/lgsm/functions/check_deps.sh +++ b/lgsm/functions/check_deps.sh @@ -350,7 +350,7 @@ fn_deps_build_debian(){ if [ "${shortname}" != "ts3" ]&&[ "${shortname}" != "mumble" ]&&[ "${shortname}" != "mc" ]&&[ "${shortname}" != "pmc" ]&&[ "${shortname}" != "wmc" ]&&[ "${engine}" != "renderware" ]; then if [ "${arch}" == "x86_64" ]; then # lib32gcc1 is now called lib32gcc-s1 in debian 11 - if { [ "${distroid}" == "debian" ]&&[ "${distroversion}" == "11" ]; }|| { [ "${distroid}" == "ubuntu" ]&&[ "${distroversion}" == "20.10" ]; } ||{ [ "${distroid}" == "pop" ]&&[ "${distroversion}" == "20.10" ]; }; then + if { [ "${distroid}" == "debian" ]&&[ "${distroversion}" == "11" ]; }||{ [ "${distroid}" == "ubuntu" ]&&[ "${distroversion}" == "20.10" ]; }||{ [ "${distroid}" == "pop" ]&&[ "${distroversion}" == "20.10" ]; }; then array_deps_required+=( lib32gcc-s1 lib32stdc++6 ) else array_deps_required+=( lib32gcc1 lib32stdc++6 ) From 85a6c47abc905cf1495b14923249ddecc4908005 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 10 Jun 2021 12:08:12 +0100 Subject: [PATCH 02/38] v21.2.4 --- linuxgsm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index c4df71037..7173fe0ba 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v21.2.3" +version="v21.2.4" shortname="core" gameservername="core" commandname="CORE" From a7f81ff4f6953e7c1fd912bc7b2ba47c681cdb17 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 7 Jul 2021 14:22:55 +0100 Subject: [PATCH 03/38] Update lock-threads v2.0.3 --- .github/workflows/lock.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index 63f0cf2db..bef7c74c6 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -8,7 +8,7 @@ jobs: lock: runs-on: ubuntu-latest steps: - - uses: dessant/lock-threads@v2 + - uses: dessant/lock-threads@v2.0.3 with: github-token: ${{ secrets.GITHUB_TOKEN }} issue-lock-comment: > From 1927d2587b40fd450afd6f500b1eaca1e6da4f9f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 7 Jul 2021 14:25:01 +0100 Subject: [PATCH 04/38] Update ssh-agent and git-sync dependencies --- .github/workflows/git-sync.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/git-sync.yml b/.github/workflows/git-sync.yml index a5a827096..4467acde2 100644 --- a/.github/workflows/git-sync.yml +++ b/.github/workflows/git-sync.yml @@ -12,12 +12,12 @@ jobs: runs-on: ubuntu-latest steps: - name: webfactory/ssh-agent - uses: webfactory/ssh-agent@v0.4.1 + uses: webfactory/ssh-agent@v0.5.3 with: ssh-private-key: ${{ secrets.BITBUCKET_SECRET }} - name: repo-sync - uses: wei/git-sync@v2.1.0 + uses: wei/git-sync@v3.0.0 with: ssh_private_key: ${{ secrets.BITBUCKET_SECRET }} source_repo: "https://github.com/GameServerManagers/LinuxGSM" From aabcd64554b5efbb601b590c6f308045eaf56f6c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 7 Jul 2021 14:26:46 +0100 Subject: [PATCH 05/38] Update LICENCE date --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 6fa6c795f..bda7cb6ee 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2012-2020 Daniel Gibbs +Copyright (c) 2012-2021 Daniel Gibbs Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 76f23e192a2909303076f840f3410a4a7eacc9bd Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 7 Jul 2021 15:03:23 +0100 Subject: [PATCH 06/38] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6f6f41c6f..341e0af57 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ LinuxGSM -[![LinuxGSM](https://img.shields.io/badge/-LinuxGSM-2b2b2b.svg?logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAACsAAABACAYAAACDbo5ZAAAGD0lEQVR4AcWYa2wUVRvHz75c2vJ2disXoUBEVIioRAx%2BMIFA1IRwUS6KCCiIKBrvhEYiiGm5iBgk8QOGEgUUDYTttmVZWFr2UmwURS6iYAoCtmisElSsdHdbkT7%2BTzoNy%2BGc2dm54C%2F5Rdkz85x%2FZ86ZOXOYXYhIg3Phx%2FA4PAcv6f%2Btg5vhHJjP3EcZsgsshufJHH%2FAJbDztQ7aG35J1vgCXn%2BtgvrgEbLHYei9FmE3kDOUuh10OGwjZ7gEh7kZ9gNyllK3gnrg7%2BQs56DHjbCDyB0GuRF2ArnDeDfCziF3mO1G2FfJHRa4EXYpuUOxG2GXkzuUuBH2TXKH5W6ELSV3eM%2BNsOUk5yQcAY8p2uvgSPitor3MjbB1UOQXOFBvHwpbhPYWOExvL4SNUOQ7p4P2JTlzhOPmCu0vCu1PQpE2WOhk2MdJjk9y7HNwP1wEPUJbAcmZ6WTYrYolnifbxZBiibnFySHQCkUaLdY7C0V4%2FT5OhF1JcuIW6%2B0lOcvsBi2Ezao3j8Ov7Quwj52w60jNKIs1R5GatVaDDoEXSU4D7GSxbidYT3IuwjusFK0mNUVMwaZNNbl%2B%2F87hoVCom0HthaQmnG3QB0lNPcxlCvz%2B0GtlZTuorCxYYlA%2FDzbY%2FnrAgV3hCVLzCDMgEAi9wMMi9IIM%2FUwnNXWwi5mwRaSmmmXA798xq%2F3Khp420VeE1LyS6eQeBhttSXgzywCCToIUCOyYZvKLOWWwkdfd6ORVpGYJM0F5efDe9mEQHGty2BWTmhVGO4PNBmOoKzMBxmo%2FhD25dWvljSbD5hjMkb9gT9lJq63Mzi1bKkbjloc7xBWtwiRrDASCVRi%2FRxA8if%2BvrawMTzYI%2FACpeUv2KFFtDcUyTKilCHcis8G1Ga7wHpLzG8wVFs1K7jaeUKHZfIxmkj9%2FM4S9x9RGiMEudo0QbCVu9Xqn5PWEwLUk5%2FP0iaXac53I0kAH9Sau4m54lo%2FdTMfyekLYKQZ7ub34AbMMlmw5irC2VYTN0fuVMYMf8JHxJ7L7YYXAlSRnI2%2F8RtH4siTsDMz%2BZ5yS15OEXUxyDjGD1%2BvEq8MG16CDzY6JepKwT6geYbzxb0XjGMl7vwGSgzZIwo4nOa1M8Yr9Afb%2Fj8L21%2FsXaeaNZ2A6KTiEASph%2F0vF80cn4tokqu79fzfCUk2vfF4%2FFdFGEjGPHvg2yWrsDG%2F4%2BqpZB8jPOiXjWk0y5iXdM3XhKUvxBTA9UvHuvNPh%2Bzb%2BWj10z6nwuHWBbQFMvNCjKnn7qd1jS%2Fnx9VX3b6jC%2BbwOr5eMe3%2B83IcW4%2F3qgT%2BUTbA9srGaiHsn8AKiF6Ld%2FxF%2FOx6eeAJXabvK78MTTornNMd6XJTVR7%2Fj9bBjhFxV%2FMc1kJOAy2AeA%2FgrV4mFVDZFCqm8rEJ6qysCAWqK9iaztRJRbWXa4moFTELOav7jY%2FqAvoXp0Gc9NX7bIZl17%2FZl0rC1wRLeno0NvP%2B0CTcYNnS8wW6CtzNANaxzKqo9hRNOQ8rGo7tmSsMe2zWdt2frqVRcm5s2fofCgawDNHRNxnyfqgsYez4y4ADCjRM9H73hsNWafILTQdaFiSTj%2BQ%2FxA6yH7d%2BCmR8XbYr0a7VTF2N4siSsb5qdos3R6%2FjGxpULFfw7EfORnbrI9TAToX0sD40%2F2ylcGdh2Rdhg%2BSf2gka9jRTqK9%2BGwgHz7RTfVbHxirDhivdthYUvMRX8aYAD9lstvi%2B0aDL2DUZ0eCBUNNVG0IP65FLTWqPdiqdC0koHTVXe7iyNRG23QotBEy1RbTAzQyrmnYUT2rLsoA13JpcB4eVC2daBM1g2JGLekmwf5On7EJfngfZTNnVSce8bFjaTmQdvs%2FXmO%2FJVpoXdx3RSUe9O00Fj3nUdy0RLgRHiHXOPGW1h2uKZ07c9rG%2Bxyefp23pQeyBIEQoavYlakrG8fnrY5yHn2fbxXzAgw7m8bT5zkkSk4C7cpmOK21esB%2FXAQ5DzFfTo43%2BF%2FDzf0eZ4wZ3MDSjMcvD6nIeOahGgia%2FyU3HforTPkWkwnakdn0cI9jqfbPjD%2FuQLJr6644snlgX%2FApOMoyd1R5%2FxAAAAAElFTkSuQmCC)](https://linuxgsm.com) [![Build Status](https://travis-ci.com/GameServerManagers/LinuxGSM.svg?branch=master)](https://travis-ci.com/GameServerManagers/LinuxGSM) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/d19c5234dc3743d8a8a14093711ca52d)](https://www.codacy.com/gh/GameServerManagers/LinuxGSM/dashboard?utm_source=github.com&utm_medium=referral&utm_content=GameServerManagers/LinuxGSM&utm_campaign=Badge_Grade) [![Backup Repo](https://github.com/GameServerManagers/LinuxGSM/workflows/Backup%20Repo/badge.svg)](https://bitbucket.org/GameServerManagers/linuxgsm) [![Discord](https://discordapp.com/api/guilds/127498813903601664/widget.png?style=shield)](https://linuxgsm.com/discord) [![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg?v=103)](https://github.com/GameServerManagers/LinuxGSM/blob/master/LICENSE) [![made-with-bash](https://img.shields.io/badge/-Made%20with%20Bash-1f425f.svg?logo=image%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw%2FeHBhY2tldCBiZWdpbj0i77u%2FIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8%2BIDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkE3MDg2QTAyQUZCMzExRTVBMkQxRDMzMkJDMUQ4RDk3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkE3MDg2QTAzQUZCMzExRTVBMkQxRDMzMkJDMUQ4RDk3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTcwODZBMDBBRkIzMTFFNUEyRDFEMzMyQkMxRDhEOTciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTcwODZBMDFBRkIzMTFFNUEyRDFEMzMyQkMxRDhEOTciLz4gPC9yZGY6RGVzY3JpcHRpb24%2BIDwvcmRmOlJERj4gPC94OnhtcG1ldGE%2BIDw%2FeHBhY2tldCBlbmQ9InIiPz6lm45hAAADkklEQVR42qyVa0yTVxzGn7d9Wy03MS2ii8s%2BeokYNQSVhCzOjXZOFNF4jx%2BMRmPUMEUEqVG36jo2thizLSQSMd4N8ZoQ8RKjJtooaCpK6ZoCtRXKpRempbTv5ey83bhkAUphz8fznvP8znn%2B%2F3NeEEJgNBoRRSmz0ub%2FfuxEacBg%2FDmYtiCjgo5NG2mBXq%2BH5I1ogMRk9Zbd%2BQU2e1ML6VPLOyf5tvBQ8yT1lG10imxsABm7SLs898GTpyYynEzP60hO3trHDKvMigUwdeaceacqzp7nOI4n0SSIIjl36ao4Z356OV07fSQAk6xJ3XGg%2BLCr1d1OYlVHp4eUHPnerU79ZA%2F1kuv1JQMAg%2BE4O2P23EumF3VkvHprsZKMzKwbRUXFEyTvSIEmTVbrysp%2BWr8wfQHGK6WChVa3bKUmdWou%2BjpArdGkzZ41c1zG%2Fu5uGH4swzd561F%2BuhIT4%2BLnSuPsv9%2BJKIpjNr9dXYOyk7%2FBZrcjIT4eCnoKgedJP4BEqhG77E3NKP31FO7cfQA5K0dSYuLgz2TwCWJSOBzG6crzKK%2BohNfni%2Bx6OMUMMNe%2Fgf7ocbw0v0acKg6J8Ql0q%2BT%2FAXR5PNi5dz9c71upuQqCKFAD%2BYhrZLEAmpodaHO3Qy6TI3NhBpbrshGtOWKOSMYwYGQM8nJzoFJNxP2HjyIQho4PewK6hBktoDcUwtIln4PjOWzflQ%2Be5yl0yCCYgYikTclGlxadio%2BBQCSiW1UXoVGrKYwH4RgMrjU1HAB4vR6LzWYfFUCKxfS8Ftk5qxHoCUQAUkRJaSEokkV6Y%2F%2BJUOC4hn6A39NVXVBYeNP8piH6HeA4fPbpdBQV5KOx0QaL1YppX3Jgk0TwH2Vg6S3u%2BdB91%2B%2FpuNYPYFl5uP5V7ZqvsrX7jxqMXR6ff3gCQSTzFI0a1TX3wIs8ul%2Bq4HuWAAiM39vhOuR1O1fQ2gT%2F26Z8Z5vrl2OHi9OXZn995nLV9aFfS6UC9JeJPfuK0NBohWpCHMSAAsFe74WWP%2BvT25wtP9Bpob6uGqqyDnOtaeumjRu%2ByFu36VntK%2FPA5umTJeUtPWZSU9BCgud661odVp3DZtkc7AnYR33RRC708PrVi1larW7XwZIjLnd7R6SgSqWSNjU1B3F72pz5TZbXmX5vV81Yb7Lg7XT%2FUXriu8XLVqw6c6XqWnBKiiYU%2BMt3wWF7u7i91XlSEITwSAZ%2FCzAAHsJVbwXYFFEAAAAASUVORK5CYII%3D)](https://www.gnu.org/software/bash/) +[![LinuxGSM](https://img.shields.io/badge/-LinuxGSM-2b2b2b.svg?logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAACsAAABACAYAAACDbo5ZAAAGD0lEQVR4AcWYa2wUVRvHz75c2vJ2disXoUBEVIioRAx%2BMIFA1IRwUS6KCCiIKBrvhEYiiGm5iBgk8QOGEgUUDYTttmVZWFr2UmwURS6iYAoCtmisElSsdHdbkT7%2BTzoNy%2BGc2dm54C%2F5Rdkz85x%2FZ86ZOXOYXYhIg3Phx%2FA4PAcv6f%2Btg5vhHJjP3EcZsgsshufJHH%2FAJbDztQ7aG35J1vgCXn%2BtgvrgEbLHYei9FmE3kDOUuh10OGwjZ7gEh7kZ9gNyllK3gnrg7%2BQs56DHjbCDyB0GuRF2ArnDeDfCziF3mO1G2FfJHRa4EXYpuUOxG2GXkzuUuBH2TXKH5W6ELSV3eM%2BNsOUk5yQcAY8p2uvgSPitor3MjbB1UOQXOFBvHwpbhPYWOExvL4SNUOQ7p4P2JTlzhOPmCu0vCu1PQpE2WOhk2MdJjk9y7HNwP1wEPUJbAcmZ6WTYrYolnifbxZBiibnFySHQCkUaLdY7C0V4%2FT5OhF1JcuIW6%2B0lOcvsBi2Ezao3j8Ov7Quwj52w60jNKIs1R5GatVaDDoEXSU4D7GSxbidYT3IuwjusFK0mNUVMwaZNNbl%2B%2F87hoVCom0HthaQmnG3QB0lNPcxlCvz%2B0GtlZTuorCxYYlA%2FDzbY%2FnrAgV3hCVLzCDMgEAi9wMMi9IIM%2FUwnNXWwi5mwRaSmmmXA798xq%2F3Khp420VeE1LyS6eQeBhttSXgzywCCToIUCOyYZvKLOWWwkdfd6ORVpGYJM0F5efDe9mEQHGty2BWTmhVGO4PNBmOoKzMBxmo%2FhD25dWvljSbD5hjMkb9gT9lJq63Mzi1bKkbjloc7xBWtwiRrDASCVRi%2FRxA8if%2BvrawMTzYI%2FACpeUv2KFFtDcUyTKilCHcis8G1Ga7wHpLzG8wVFs1K7jaeUKHZfIxmkj9%2FM4S9x9RGiMEudo0QbCVu9Xqn5PWEwLUk5%2FP0iaXac53I0kAH9Sau4m54lo%2FdTMfyekLYKQZ7ub34AbMMlmw5irC2VYTN0fuVMYMf8JHxJ7L7YYXAlSRnI2%2F8RtH4siTsDMz%2BZ5yS15OEXUxyDjGD1%2BvEq8MG16CDzY6JepKwT6geYbzxb0XjGMl7vwGSgzZIwo4nOa1M8Yr9Afb%2Fj8L21%2FsXaeaNZ2A6KTiEASph%2F0vF80cn4tokqu79fzfCUk2vfF4%2FFdFGEjGPHvg2yWrsDG%2F4%2BqpZB8jPOiXjWk0y5iXdM3XhKUvxBTA9UvHuvNPh%2Bzb%2BWj10z6nwuHWBbQFMvNCjKnn7qd1jS%2Fnx9VX3b6jC%2BbwOr5eMe3%2B83IcW4%2F3qgT%2BUTbA9srGaiHsn8AKiF6Ld%2FxF%2FOx6eeAJXabvK78MTTornNMd6XJTVR7%2Fj9bBjhFxV%2FMc1kJOAy2AeA%2FgrV4mFVDZFCqm8rEJ6qysCAWqK9iaztRJRbWXa4moFTELOav7jY%2FqAvoXp0Gc9NX7bIZl17%2FZl0rC1wRLeno0NvP%2B0CTcYNnS8wW6CtzNANaxzKqo9hRNOQ8rGo7tmSsMe2zWdt2frqVRcm5s2fofCgawDNHRNxnyfqgsYez4y4ADCjRM9H73hsNWafILTQdaFiSTj%2BQ%2FxA6yH7d%2BCmR8XbYr0a7VTF2N4siSsb5qdos3R6%2FjGxpULFfw7EfORnbrI9TAToX0sD40%2F2ylcGdh2Rdhg%2BSf2gka9jRTqK9%2BGwgHz7RTfVbHxirDhivdthYUvMRX8aYAD9lstvi%2B0aDL2DUZ0eCBUNNVG0IP65FLTWqPdiqdC0koHTVXe7iyNRG23QotBEy1RbTAzQyrmnYUT2rLsoA13JpcB4eVC2daBM1g2JGLekmwf5On7EJfngfZTNnVSce8bFjaTmQdvs%2FXmO%2FJVpoXdx3RSUe9O00Fj3nUdy0RLgRHiHXOPGW1h2uKZ07c9rG%2Bxyefp23pQeyBIEQoavYlakrG8fnrY5yHn2fbxXzAgw7m8bT5zkkSk4C7cpmOK21esB%2FXAQ5DzFfTo43%2BF%2FDzf0eZ4wZ3MDSjMcvD6nIeOahGgia%2FyU3HforTPkWkwnakdn0cI9jqfbPjD%2FuQLJr6644snlgX%2FApOMoyd1R5%2FxAAAAAElFTkSuQmCC)](https://linuxgsm.com) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/d19c5234dc3743d8a8a14093711ca52d)](https://www.codacy.com/gh/GameServerManagers/LinuxGSM/dashboard?utm_source=github.com&utm_medium=referral&utm_content=GameServerManagers/LinuxGSM&utm_campaign=Badge_Grade) [![Backup Repo](https://github.com/GameServerManagers/LinuxGSM/workflows/Backup%20Repo/badge.svg)](https://bitbucket.org/GameServerManagers/linuxgsm) [![Discord](https://discordapp.com/api/guilds/127498813903601664/widget.png?style=shield)](https://linuxgsm.com/discord) [![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg?v=103)](https://github.com/GameServerManagers/LinuxGSM/blob/master/LICENSE) [![made-with-bash](https://img.shields.io/badge/-Made%20with%20Bash-1f425f.svg?logo=image%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw%2FeHBhY2tldCBiZWdpbj0i77u%2FIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8%2BIDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkE3MDg2QTAyQUZCMzExRTVBMkQxRDMzMkJDMUQ4RDk3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkE3MDg2QTAzQUZCMzExRTVBMkQxRDMzMkJDMUQ4RDk3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTcwODZBMDBBRkIzMTFFNUEyRDFEMzMyQkMxRDhEOTciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTcwODZBMDFBRkIzMTFFNUEyRDFEMzMyQkMxRDhEOTciLz4gPC9yZGY6RGVzY3JpcHRpb24%2BIDwvcmRmOlJERj4gPC94OnhtcG1ldGE%2BIDw%2FeHBhY2tldCBlbmQ9InIiPz6lm45hAAADkklEQVR42qyVa0yTVxzGn7d9Wy03MS2ii8s%2BeokYNQSVhCzOjXZOFNF4jx%2BMRmPUMEUEqVG36jo2thizLSQSMd4N8ZoQ8RKjJtooaCpK6ZoCtRXKpRempbTv5ey83bhkAUphz8fznvP8znn%2B%2F3NeEEJgNBoRRSmz0ub%2FfuxEacBg%2FDmYtiCjgo5NG2mBXq%2BH5I1ogMRk9Zbd%2BQU2e1ML6VPLOyf5tvBQ8yT1lG10imxsABm7SLs898GTpyYynEzP60hO3trHDKvMigUwdeaceacqzp7nOI4n0SSIIjl36ao4Z356OV07fSQAk6xJ3XGg%2BLCr1d1OYlVHp4eUHPnerU79ZA%2F1kuv1JQMAg%2BE4O2P23EumF3VkvHprsZKMzKwbRUXFEyTvSIEmTVbrysp%2BWr8wfQHGK6WChVa3bKUmdWou%2BjpArdGkzZ41c1zG%2Fu5uGH4swzd561F%2BuhIT4%2BLnSuPsv9%2BJKIpjNr9dXYOyk7%2FBZrcjIT4eCnoKgedJP4BEqhG77E3NKP31FO7cfQA5K0dSYuLgz2TwCWJSOBzG6crzKK%2BohNfni%2Bx6OMUMMNe%2Fgf7ocbw0v0acKg6J8Ql0q%2BT%2FAXR5PNi5dz9c71upuQqCKFAD%2BYhrZLEAmpodaHO3Qy6TI3NhBpbrshGtOWKOSMYwYGQM8nJzoFJNxP2HjyIQho4PewK6hBktoDcUwtIln4PjOWzflQ%2Be5yl0yCCYgYikTclGlxadio%2BBQCSiW1UXoVGrKYwH4RgMrjU1HAB4vR6LzWYfFUCKxfS8Ftk5qxHoCUQAUkRJaSEokkV6Y%2F%2BJUOC4hn6A39NVXVBYeNP8piH6HeA4fPbpdBQV5KOx0QaL1YppX3Jgk0TwH2Vg6S3u%2BdB91%2B%2FpuNYPYFl5uP5V7ZqvsrX7jxqMXR6ff3gCQSTzFI0a1TX3wIs8ul%2Bq4HuWAAiM39vhOuR1O1fQ2gT%2F26Z8Z5vrl2OHi9OXZn995nLV9aFfS6UC9JeJPfuK0NBohWpCHMSAAsFe74WWP%2BvT25wtP9Bpob6uGqqyDnOtaeumjRu%2ByFu36VntK%2FPA5umTJeUtPWZSU9BCgud661odVp3DZtkc7AnYR33RRC708PrVi1larW7XwZIjLnd7R6SgSqWSNjU1B3F72pz5TZbXmX5vV81Yb7Lg7XT%2FUXriu8XLVqw6c6XqWnBKiiYU%2BMt3wWF7u7i91XlSEITwSAZ%2FCzAAHsJVbwXYFFEAAAAASUVORK5CYII%3D)](https://www.gnu.org/software/bash/) [LinuxGSM](https://linuxgsm.com) is the command-line tool for quick, simple deployment and management of Linux dedicated game servers. @@ -47,7 +47,7 @@ There are a various ways to get support, check out the [support](https://linuxgs ## :heart: Donate -If you would like to [donate](https://linuxgsm.com/donate) to the project there are several ways you can, via [GitHub Sponsors](https://github.com/sponsors/dgibbs64) and [PayPal](https://www.paypal.me/dgibbs64). I would like to thank everyone who has previously sent a donation. Since 2012 LinuxGSM has been steadily growing with new servers, features and improvements added regularly. +If you would like to [sponsor](https://linuxgsm.com/sponsor) to the project there are several ways you can, via [GitHub Sponsors](https://github.com/sponsors/dgibbs64) and [PayPal](https://www.paypal.me/dgibbs64). I would like to thank everyone who has previously sent a donation. Since 2012 LinuxGSM has been steadily growing with new servers, features and improvements added regularly. ## Contributors From ad91fb5be96a15ff9cb68967087ad08ae97c088c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 7 Jul 2021 15:04:06 +0100 Subject: [PATCH 07/38] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 341e0af57..baed33db1 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ Documentation is found at [linuxgsm.com](https://linuxgsm.com) and [docs.linuxgs There are a various ways to get support, check out the [support](https://linuxgsm.com/support/) page to the right support. -## :heart: Donate +## :heart: Sponsor If you would like to [sponsor](https://linuxgsm.com/sponsor) to the project there are several ways you can, via [GitHub Sponsors](https://github.com/sponsors/dgibbs64) and [PayPal](https://www.paypal.me/dgibbs64). I would like to thank everyone who has previously sent a donation. Since 2012 LinuxGSM has been steadily growing with new servers, features and improvements added regularly. From 45de90e000bffc7e78f46c7863b2055705d0f5e6 Mon Sep 17 00:00:00 2001 From: Claiyc Date: Sun, 1 Aug 2021 19:47:05 +0200 Subject: [PATCH 08/38] add lastoasis --- .../config-lgsm/loserver/_default.cfg | 184 ++++++++++++++++++ lgsm/data/serverlist.csv | 1 + lgsm/functions/info_messages.sh | 12 ++ lgsm/functions/info_parms.sh | 8 + 4 files changed, 205 insertions(+) create mode 100644 lgsm/config-default/config-lgsm/loserver/_default.cfg diff --git a/lgsm/config-default/config-lgsm/loserver/_default.cfg b/lgsm/config-default/config-lgsm/loserver/_default.cfg new file mode 100644 index 000000000..4bbdf27dd --- /dev/null +++ b/lgsm/config-default/config-lgsm/loserver/_default.cfg @@ -0,0 +1,184 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! +# Copy settings from here and use them in either: +# common.cfg - applies settings to every instance. +# [instance].cfg - applies settings to a specific instance. + +#### Game Server Settings #### + +## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters +servername="LinuxGSM" +ip="0.0.0.0" +port="7777" +queryport="27015" +customerkey="" +providerkey="" +slots="100" + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="-log -force_steamclient_link -messaging -NoLiveServer -EnableCheats -backendapiurloverride='backend.last-oasis.com' -identifier=${servername} -port=${port} -CustomerKey=${customerkey} -ProviderKey=${providerkey} -slots=${slots} -QueryPort=${queryport} -OverrideConnectionAddress=${ip}" + +#### LinuxGSM Settings #### + +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + +## Notification Alerts +# (on|off) + +# Display IP | https://docs.linuxgsm.com/alerts#display-ip +displayip="" + +# More info | https://docs.linuxgsm.com/alerts#more-info +postalert="off" + +# Discord Alerts | https://docs.linuxgsm.com/alerts/discord +discordalert="off" +discordwebhook="webhook" + +# Email Alerts | https://docs.linuxgsm.com/alerts/email +emailalert="off" +email="email@example.com" +emailfrom="" + +# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun +mailgunalert="off" +mailgunapiregion="us" +mailguntoken="accesstoken" +mailgundomain="example.com" +mailgunemailfrom="alert@example.com" +mailgunemail="email@myemail.com" + +# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover +pushoveralert="off" +pushovertoken="accesstoken" +pushoveruserkey="userkey" + +# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat +rocketchatalert="off" +rocketchatwebhook="webhook" +rocketchattoken="" + +# Slack Alerts | https://docs.linuxgsm.com/alerts/slack +slackalert="off" +slackwebhook="webhook" + +# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram +# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +telegramapi="api.telegram.org" +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +curlcustomstring="" + +## Updating | https://docs.linuxgsm.com/commands/update +updateonstart="off" + +## Backup | https://docs.linuxgsm.com/commands/backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://docs.linuxgsm.com/features/logging +consolelogging="on" +logdays="7" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="1" + +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors +ansi="on" + +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time +sleeptime="0.5" + +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd +# Server appid +appid="920720" +steamcmdforcewindows="no" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +betapassword="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="false" + +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode +# 1: tmux kill +# 2: CTRL+c +# 3: quit +# 4: quit 120s +# 5: stop +# 6: q +# 7: exit +# 8: 7 Days to Die +# 9: GoldSrc +# 10: Avorion +# 11: end +stopmode="2" + +## Query mode +# 1: session only +# 2: gamedig (gsquery fallback) +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="1" +querytype="" + +## Console type +consoleverbose="yes" +consoleinteract="no" + +## Game Server Details +# Do not edit +gamename="Last Oasis" +engine="unreal4" +glibc="2.17" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}/Mist" +executabledir="${systemdir}/Binaries/Linux" +executable="./MistServer-Linux-Shipping" +servercfgdir="${systemdir}/Saved/Config/LinuxServer" +servercfg="Game.ini" +servercfgdefault="Game.ini" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +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" \ No newline at end of file diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 687a3f63d..249f1616d 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -51,6 +51,7 @@ jc3,jc3server,Just Cause 3 jk2,jk2server,Jedi Knight II: Jedi Outcast kf,kfserver,Killing Floor kf2,kf2server,Killing Floor 2 +lo,loserver,Last Oasis l4d,l4dserver,Left 4 Dead l4d2,l4d2server,Left 4 Dead 2 mc,mcserver,Minecraft diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index 0c81175fe..d2ef50586 100755 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -950,6 +950,16 @@ fn_info_message_justcause3(){ } | column -s $'\t' -t } +fn_info_message_lo(){ + echo -e "netstat -atunp | grep MistServer" + echo -e "" + { + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" + echo -e "> Game\tINBOUND\t${port}\tudp" + echo -e "> Query\tINBOUND\t${queryport}\tudp" + } | column -s $'\t' -t +} + fn_info_message_minecraft(){ echo -e "netstat -atunp | grep java" echo -e "" @@ -1616,6 +1626,8 @@ fn_info_message_select_engine(){ fn_info_message_justcause2 elif [ "${shortname}" == "jc3" ]; then fn_info_message_justcause3 + elif [ "${shortname}" == "lo" ]; then + fn_info_message_lo elif [ "${shortname}" == "kf2" ]; then fn_info_message_kf2 elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "pmc" ]||[ "${shortname}" == "wmc" ]; then diff --git a/lgsm/functions/info_parms.sh b/lgsm/functions/info_parms.sh index 47148f4b3..9aee054cd 100755 --- a/lgsm/functions/info_parms.sh +++ b/lgsm/functions/info_parms.sh @@ -77,6 +77,12 @@ fn_info_parms_kf2(){ defaultmap=${defaultmap:-"NOT SET"} } +fn_info_parms_lo(){ + servername=${servername:-"NOT SET"} + port=${port:-"0"} + queryport=${queryport:-"0"} +} + fn_info_parms_mordhau(){ port=${port:-"0"} queryport=${queryport:-"0"} @@ -270,6 +276,8 @@ elif [ "${shortname}" == "jk2" ]; then fn_info_parms_jk2 elif [ "${shortname}" == "kf2" ]; then fn_info_parms_kf2 +elif [ "${shortname}" == "lo" ]; then + fn_info_parms_lo elif [ "${shortname}" == "mohaa" ]; then fn_info_parms_mohaa elif [ "${shortname}" == "mom" ]; then From be6ee5ea3e076278c43c90507c02b4c2de03a0bb Mon Sep 17 00:00:00 2001 From: Claiyc Date: Sun, 1 Aug 2021 20:21:50 +0200 Subject: [PATCH 09/38] add steamcmd login to loserver cfg --- lgsm/config-default/config-lgsm/loserver/_default.cfg | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lgsm/config-default/config-lgsm/loserver/_default.cfg b/lgsm/config-default/config-lgsm/loserver/_default.cfg index 4bbdf27dd..313e50a49 100644 --- a/lgsm/config-default/config-lgsm/loserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/loserver/_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 servername="LinuxGSM" ip="0.0.0.0" From 019431b009207e2bc287d4a6f0c5f2660612e7d0 Mon Sep 17 00:00:00 2001 From: Claiyc Date: Sun, 1 Aug 2021 21:31:10 +0200 Subject: [PATCH 10/38] add fix_lo.sh --- lgsm/functions/fix.sh | 2 ++ lgsm/functions/fix_lo.sh | 12 ++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 lgsm/functions/fix_lo.sh diff --git a/lgsm/functions/fix.sh b/lgsm/functions/fix.sh index 1b5e63db6..ce472e94c 100755 --- a/lgsm/functions/fix.sh +++ b/lgsm/functions/fix.sh @@ -106,6 +106,8 @@ if [ "${commandname}" == "INSTALL" ]; then fix_kf.sh elif [ "${shortname}" == "kf2" ]; then fix_kf2.sh + elif [ "${shortname}" == "lo" ]; then + fix_lo.sh elif [ "${shortname}" == "ro" ]; then fix_ro.sh elif [ "${shortname}" == "samp" ]; then diff --git a/lgsm/functions/fix_lo.sh b/lgsm/functions/fix_lo.sh new file mode 100644 index 000000000..70e0dbe1e --- /dev/null +++ b/lgsm/functions/fix_lo.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# LinuxGSM fix_lo.sh function +# Author: Daniel Gibbs +# Website: https://linuxgsm.com +# Description: Resolves startup issue with Last Oasis + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +local APPID_FILE = ${executabledir}/steam_appid.txt +if [! -f "${APPID_FILE}" ]; then + echo "903950" > ${APPID_FILE} +fi \ No newline at end of file From 24f2b6fcf229c32dec2cd70f71f65e1f8605ed9a Mon Sep 17 00:00:00 2001 From: Claiyc Date: Sun, 1 Aug 2021 21:47:00 +0200 Subject: [PATCH 11/38] fix: fix.sh --- lgsm/functions/fix.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/fix.sh b/lgsm/functions/fix.sh index ce472e94c..a4d19f663 100755 --- a/lgsm/functions/fix.sh +++ b/lgsm/functions/fix.sh @@ -94,7 +94,7 @@ fi # Fixes that are run on install only. if [ "${commandname}" == "INSTALL" ]; then - if [ "${shortname}" == "av" ]||[ "${shortname}" == "cmw" ]||[ "${shortname}" == "kf" ]||[ "${shortname}" == "kf2" ]||[ "${shortname}" == "onset" ]||[ "${shortname}" == "ro" ]||[ "${shortname}" == "samp" ]||[ "${shortname}" == "ut2k4" ]||[ "${shortname}" == "ut" ]||[ "${shortname}" == "ut3" ]; then + if [ "${shortname}" == "av" ]||[ "${shortname}" == "cmw" ]||[ "${shortname}" == "kf" ]||[ "${shortname}" == "kf2" ]||[ "${shortname}" == "lo" ]||[ "${shortname}" == "onset" ]||[ "${shortname}" == "ro" ]||[ "${shortname}" == "samp" ]||[ "${shortname}" == "ut2k4" ]||[ "${shortname}" == "ut" ]||[ "${shortname}" == "ut3" ]; then echo -e "" echo -e "${lightyellow}Applying Post-Install Fixes}${default}" echo -e "=================================" From a8a877171303e40b7dda3e3e700999db1edd2e4a Mon Sep 17 00:00:00 2001 From: Claiyc Date: Sun, 1 Aug 2021 21:55:49 +0200 Subject: [PATCH 12/38] fix: add fetch for fix_lo.sh --- lgsm/functions/core_functions.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 55b23a590..9c8dccef1 100755 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -381,6 +381,11 @@ functionfile="${FUNCNAME[0]}" fn_fetch_function } +fix_lo.sh(){ +functionfile="${FUNCNAME[0]}" +fn_fetch_function +} + fix_mcb.sh(){ functionfile="${FUNCNAME[0]}" fn_fetch_function From c8a5c2732e23b35da873b067f9df81a94b3f9d21 Mon Sep 17 00:00:00 2001 From: Claiyc Date: Sun, 1 Aug 2021 22:26:13 +0200 Subject: [PATCH 13/38] fix: fix_lo.sh --- lgsm/functions/fix_lo.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/fix_lo.sh b/lgsm/functions/fix_lo.sh index 70e0dbe1e..462005ddd 100644 --- a/lgsm/functions/fix_lo.sh +++ b/lgsm/functions/fix_lo.sh @@ -6,7 +6,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -local APPID_FILE = ${executabledir}/steam_appid.txt -if [! -f "${APPID_FILE}" ]; then +local APPID_FILE=${executabledir}/steam_appid.txt +if [ ! -f "${APPID_FILE}" ]; then echo "903950" > ${APPID_FILE} fi \ No newline at end of file From 746dbbd066e045dc46b36e7d079d6b175e22c207 Mon Sep 17 00:00:00 2001 From: Claiyc Date: Sun, 1 Aug 2021 22:39:46 +0200 Subject: [PATCH 14/38] fix: misspelling & fix_lo.sh --- lgsm/functions/fix.sh | 2 +- lgsm/functions/fix_lo.sh | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/fix.sh b/lgsm/functions/fix.sh index a4d19f663..b5cbcc77a 100755 --- a/lgsm/functions/fix.sh +++ b/lgsm/functions/fix.sh @@ -96,7 +96,7 @@ fi if [ "${commandname}" == "INSTALL" ]; then if [ "${shortname}" == "av" ]||[ "${shortname}" == "cmw" ]||[ "${shortname}" == "kf" ]||[ "${shortname}" == "kf2" ]||[ "${shortname}" == "lo" ]||[ "${shortname}" == "onset" ]||[ "${shortname}" == "ro" ]||[ "${shortname}" == "samp" ]||[ "${shortname}" == "ut2k4" ]||[ "${shortname}" == "ut" ]||[ "${shortname}" == "ut3" ]; then echo -e "" - echo -e "${lightyellow}Applying Post-Install Fixes}${default}" + echo -e "${lightyellow}Applying Post-Install Fixes${default}" echo -e "=================================" fn_sleep_time postinstall=1 diff --git a/lgsm/functions/fix_lo.sh b/lgsm/functions/fix_lo.sh index 462005ddd..c64a90b2d 100644 --- a/lgsm/functions/fix_lo.sh +++ b/lgsm/functions/fix_lo.sh @@ -2,11 +2,14 @@ # LinuxGSM fix_lo.sh function # Author: Daniel Gibbs # Website: https://linuxgsm.com -# Description: Resolves startup issue with Last Oasis +# Description: Resolves installation issue with Last Oasis functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" local APPID_FILE=${executabledir}/steam_appid.txt if [ ! -f "${APPID_FILE}" ]; then + fn_print_information "add ${APPID_FILE} to ${gamename} server." echo "903950" > ${APPID_FILE} +else + fn_print_information "${APPID_FILE} already exists. No action to be taken." fi \ No newline at end of file From 590bcbd6b344ae3b77f2733ebf152961ee5b06cc Mon Sep 17 00:00:00 2001 From: Claiyc Date: Sun, 1 Aug 2021 22:50:13 +0200 Subject: [PATCH 15/38] minor --- lgsm/functions/fix_lo.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/fix_lo.sh b/lgsm/functions/fix_lo.sh index c64a90b2d..608aa587f 100644 --- a/lgsm/functions/fix_lo.sh +++ b/lgsm/functions/fix_lo.sh @@ -8,8 +8,10 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" local APPID_FILE=${executabledir}/steam_appid.txt if [ ! -f "${APPID_FILE}" ]; then - fn_print_information "add ${APPID_FILE} to ${gamename} server." + fn_print_information "adding ${APPID_FILE} to ${gamename} server." + fn_sleep_time echo "903950" > ${APPID_FILE} else fn_print_information "${APPID_FILE} already exists. No action to be taken." + fn_sleep_time fi \ No newline at end of file From 49c3b09df91eeadf1a5e2e81d6bb02128a1a77ce Mon Sep 17 00:00:00 2001 From: Claiyc <58397976+Claiyc@users.noreply.github.com> Date: Sun, 1 Aug 2021 23:16:23 +0200 Subject: [PATCH 16/38] add doublequotes in fix_lo.sh --- lgsm/functions/fix_lo.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/fix_lo.sh b/lgsm/functions/fix_lo.sh index 608aa587f..466d6abd0 100644 --- a/lgsm/functions/fix_lo.sh +++ b/lgsm/functions/fix_lo.sh @@ -10,8 +10,8 @@ local APPID_FILE=${executabledir}/steam_appid.txt if [ ! -f "${APPID_FILE}" ]; then fn_print_information "adding ${APPID_FILE} to ${gamename} server." fn_sleep_time - echo "903950" > ${APPID_FILE} + echo "903950" > "${APPID_FILE}" else fn_print_information "${APPID_FILE} already exists. No action to be taken." fn_sleep_time -fi \ No newline at end of file +fi From 6521320df133cf4472d9b8aeb281e7719166934d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 31 Aug 2021 21:53:23 +0100 Subject: [PATCH 17/38] feat(info): refactor info modules (#3428) * add new details to queryraw * fix httpport ac server * correct info bug for bt1944server * added bt1944 to info_parms update info messages bt1944ports * steamport * raw port raw * message display * check_root bug * add more ports merge words * arma 3 improvements * master port * add arma3 ports * portnames * strip ./ from executable * exec * integrate ss * replace netstat with ss * port header headerr * remove inbound outbound * ark * shorten executable * change to port display * add info_distro * response * acserver improvements acserver ac * add assettocorsa query * ss * rawport * update av server exec merge av changes * av ports * av ss bug * av * avserver * remove port * port changes * listen * col * bt1944 * cmw cmw * cmw * changes * etl * add servers * hw * inss ins * add rcon to insserver * rcon * jc * jc3 minecraft * mcb * onset * Memories of mars * mumble * changes * steamport * tcp query * udp * fix * steamport * info_distro now required before parms * srcdslinuxopid * srcds_linux * hlds_linux * ins * date * ns2 * rising world rising world query port rising world javaram rising world a * rising world ports * portipv6 * add ports to query raw * add Rising World Query * fix rising world game mode * update 7 Days to Die * port3 * increased sdtd glibc to 2.27 * corrected starbound ports location * starbound * added new SteamCMD error code * Master server check if query raw * Stationeers * stationeers * webadmin * added extra query ports for ts3 a * add teamspeak3 query * add ts3 query details * ts3 version * queryport reverts back once gamedig finished * added telnetport to ts3 * fix TS3 bug causing shutdown when starting debug the fix was running and killing a running server * show start parameters for ts3 * tower unite * terraria * terraria * ss command in dev-query-raw info_messages.sh * ut4 and others * more updates * soldat * col vint * pvr query port tab * pvr query type tcp * pvr gameport+400 * changed to shortname * unreal99 * ut99 beacon * httpport * ut2k4 * kf * kf * bug * httpport * httpport * more kf ports * lan port * steammasterport * kf * ports * ports * ut2k4 * ut2k4 * lanport * lanport * ro * ro * kf2 * httpport * update naming * ut3 * ut3 * ut3 * mom * mom * reshuffle * sort list * function re-shuffle * merge info_parms and info_config into info_game.sh a * updated source filters * added ac to edit ports array * Revert "updated source filters" This reverts commit e8621eaed6d7b7f38fa3911858a4c28a0e4dcc18. * spaces * fix typo * tidy * re ordered ports edit array * added java * add bf1942 * Added Last Oasis * corrected pc function name * re ordered in alpha * space * remove space --- .../config-lgsm/acserver/_default.cfg | 2 +- .../config-lgsm/avserver/_default.cfg | 6 +- .../config-lgsm/csgoserver/_default.cfg | 1 + .../config-lgsm/inssserver/_default.cfg | 4 +- .../config-lgsm/pvrserver/_default.cfg | 2 +- .../config-lgsm/rwserver/_default.cfg | 4 +- .../config-lgsm/sdtdserver/_default.cfg | 2 +- .../config-lgsm/ts3server/_default.cfg | 2 +- lgsm/data/serverlist.csv | 2 +- lgsm/functions/alert.sh | 2 +- lgsm/functions/check_ip.sh | 3 +- lgsm/functions/check_root.sh | 3 + lgsm/functions/command_debug.sh | 9 +- lgsm/functions/command_details.sh | 6 +- lgsm/functions/command_dev_query_raw.sh | 208 +- lgsm/functions/command_monitor.sh | 5 +- lgsm/functions/command_postdetails.sh | 4 +- lgsm/functions/command_restart.sh | 2 +- lgsm/functions/command_start.sh | 10 +- lgsm/functions/command_stop.sh | 2 +- lgsm/functions/command_test_alert.sh | 2 +- lgsm/functions/core_dl.sh | 10 +- lgsm/functions/core_functions.sh | 11 +- lgsm/functions/fix_ts3.sh | 2 +- lgsm/functions/info_distro.sh | 10 +- .../{info_config.sh => info_game.sh} | 2258 ++++++++++------- lgsm/functions/info_messages.sh | 1130 ++++----- lgsm/functions/info_parms.sh | 332 --- lgsm/functions/query_gamedig.sh | 17 +- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 33 files changed, 2190 insertions(+), 1869 deletions(-) rename lgsm/functions/{info_config.sh => info_game.sh} (79%) mode change 100755 => 100644 delete mode 100755 lgsm/functions/info_parms.sh diff --git a/lgsm/config-default/config-lgsm/acserver/_default.cfg b/lgsm/config-default/config-lgsm/acserver/_default.cfg index 728671a7a..6dbcf68e6 100644 --- a/lgsm/config-default/config-lgsm/acserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/acserver/_default.cfg @@ -139,7 +139,7 @@ stopmode="2" # 4: gsquery # 5: tcp querymode="5" -querytype="" +querytype="assettocorsa" ## Console type consoleverbose="yes" diff --git a/lgsm/config-default/config-lgsm/avserver/_default.cfg b/lgsm/config-default/config-lgsm/avserver/_default.cfg index 17d670d0f..2eef21849 100644 --- a/lgsm/config-default/config-lgsm/avserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/avserver/_default.cfg @@ -9,7 +9,7 @@ #### Game Server Settings #### ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters -port="27000" + # https://steamidfinder.com adminsteamid="" if [ -n "${adminsteamid}" ]; then @@ -160,8 +160,8 @@ glibc="2.15" avdatapath="${serverfiles}/galaxy" avgalaxypath="${avdatapath}/${selfname}" systemdir="${serverfiles}" -executabledir="${systemdir}" -executable="./server.sh" +executabledir="${systemdir}/bin" +executable="./bin/AvorionServer" servercfgdir="${avgalaxypath}" servercfg="server.ini" servercfgdefault="server.ini" diff --git a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg index 28f3082b3..564ac84a3 100644 --- a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg @@ -26,6 +26,7 @@ ip="0.0.0.0" port="27015" clientport="27005" sourcetvport="27020" +steamport="26901" defaultmap="de_mirage" maxplayers="16" tickrate="64" diff --git a/lgsm/config-default/config-lgsm/inssserver/_default.cfg b/lgsm/config-default/config-lgsm/inssserver/_default.cfg index e9895b132..1dbc0889f 100644 --- a/lgsm/config-default/config-lgsm/inssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/inssserver/_default.cfg @@ -12,6 +12,8 @@ ip="0.0.0.0" port="27102" queryport="27131" +rconport="27015" +rconpassword="" servername="LinuxGSM Server" defaultmap="Canyon" defaultscenario="Scenario_Crossing_Push_Security" @@ -19,7 +21,7 @@ maxplayers="28" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters ## Parameter Docs | https://sandstorm-support.newworldinteractive.com/hc/en-us/articles/360049211072-Server-Admin-Guide -startparameters="${defaultmap}?Scenario=${defaultscenario}?MaxPlayers=${maxplayers} -Port=${port} -QueryPort=${queryport} -hostname='${servername}' -log" +startparameters="${defaultmap}?Scenario=${defaultscenario}?MaxPlayers=${maxplayers} -Port=${port} -QueryPort=${queryport} -hostname='${servername}' -Rcon -RconPassword=${rconpassword} -RconListenPort=${rconport} -log" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/pvrserver/_default.cfg b/lgsm/config-default/config-lgsm/pvrserver/_default.cfg index 3fa9a8864..ed65d0f2f 100644 --- a/lgsm/config-default/config-lgsm/pvrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pvrserver/_default.cfg @@ -139,7 +139,7 @@ stopmode="2" # 3: gamedig # 4: gsquery # 5: tcp -querymode="1" +querymode="5" querytype="" ## Console type diff --git a/lgsm/config-default/config-lgsm/rwserver/_default.cfg b/lgsm/config-default/config-lgsm/rwserver/_default.cfg index 3ff7bc137..0ff3726ba 100644 --- a/lgsm/config-default/config-lgsm/rwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rwserver/_default.cfg @@ -135,8 +135,8 @@ stopmode="3" # 3: gamedig # 4: gsquery # 5: tcp -querymode="1" -querytype="" +querymode="2" +querytype="protocol-valve" ## Console type consoleverbose="yes" diff --git a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg index d8ca86974..7c985a636 100644 --- a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg @@ -146,7 +146,7 @@ consoleinteract="no" # Do not edit gamename="7 Days To Die" engine="unity3d" -glibc="2.15" +glibc="2.27" #### Directories #### # Edit with care diff --git a/lgsm/config-default/config-lgsm/ts3server/_default.cfg b/lgsm/config-default/config-lgsm/ts3server/_default.cfg index 3bfaf5d10..694b0501f 100644 --- a/lgsm/config-default/config-lgsm/ts3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ts3server/_default.cfg @@ -123,7 +123,7 @@ stopmode="2" # 4: gsquery # 5: tcp querymode="5" -querytype="" +querytype="teamspeak3" ## Console type consoleverbose="yes" diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 249f1616d..524826a33 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -108,8 +108,8 @@ ut2k4,ut2k4server,Unreal Tournament 2004 ut3,ut3server,Unreal Tournament 3 ut99,ut99server,Unreal Tournament 99 vh,vhserver,Valheim -vs,vsserver,Vampire Slayer vints,vintsserver,Vintage Story +vs,vsserver,Vampire Slayer wet,wetserver,Wolfenstein: Enemy Territory wf,wfserver,Warfork wmc,wmcserver,WaterfallMC diff --git a/lgsm/functions/alert.sh b/lgsm/functions/alert.sh index 5fd999728..782c6e9a4 100755 --- a/lgsm/functions/alert.sh +++ b/lgsm/functions/alert.sh @@ -11,7 +11,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Used with email alerts. fn_alert_log(){ info_distro.sh - info_config.sh + info_game.sh info_messages.sh if [ -f "${alertlog}" ]; then rm -f "${alertlog:?}" diff --git a/lgsm/functions/check_ip.sh b/lgsm/functions/check_ip.sh index ae1b99b77..09b948ccd 100755 --- a/lgsm/functions/check_ip.sh +++ b/lgsm/functions/check_ip.sh @@ -8,8 +8,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -info_config.sh -info_parms.sh +info_game.sh if [ ! -f "/bin/ip" ]; then ipcommand="/sbin/ip" diff --git a/lgsm/functions/check_root.sh b/lgsm/functions/check_root.sh index 1eb6309cb..13942cbd4 100755 --- a/lgsm/functions/check_root.sh +++ b/lgsm/functions/check_root.sh @@ -12,6 +12,9 @@ if [ "$(whoami)" = "root" ]; then fn_print_fail_nl "Do NOT run this script as root!" if [ -d "${lgsmlogdir}" ]; then fn_script_log_fatal "${selfname} attempted to run as root." + else + # Forces exit code is log does not yet exist. + exitcode=1 fi core_exit.sh fi diff --git a/lgsm/functions/command_debug.sh b/lgsm/functions/command_debug.sh index aac203ac9..a9cceebdb 100755 --- a/lgsm/functions/command_debug.sh +++ b/lgsm/functions/command_debug.sh @@ -27,7 +27,7 @@ fn_lockfile_trap(){ check.sh fix.sh info_distro.sh -info_config.sh +info_game.sh # NOTE: Check if works with server without parms. Could be intergrated in to info_parms.sh. fn_print_header { @@ -104,7 +104,12 @@ echo "${port}" >> "${lockdir}/${selfname}.lock" fn_script_log_info "Lockfile generated" fn_script_log_info "${lockdir}/${selfname}.lock" -cd "${executabledir}" || exit +if [ "${shortname}" == "av" ]; then + cd "${systemdir}" || exit +else + cd "${executabledir}" || exit +fi + # Note: do not add double quotes to ${executable} ${startparameters}. if [ "${engine}" == "source" ]||[ "${engine}" == "goldsrc" ]; then ${executable} ${startparameters} -debug diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index 14765ca99..2daeeb2f7 100755 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -12,9 +12,8 @@ fn_firstcommand_set # Run checks and gathers details to display. check.sh -info_config.sh -info_parms.sh info_distro.sh +info_game.sh info_messages.sh if [ "${querymode}" == "2" ]||[ "${querymode}" == "3" ]; then for queryip in "${queryips[@]}"; do @@ -31,9 +30,10 @@ fn_info_message_gameserver fn_info_message_script fn_info_message_backup # Some game servers do not have parms. -if [ "${shortname}" != "ts3" ]&&[ "${shortname}" != "jc2" ]&&[ "${shortname}" != "dst" ]&&[ "${shortname}" != "pz" ]&&[ "${engine}" != "renderware" ]; then +if [ "${shortname}" != "jc2" ]&&[ "${shortname}" != "dst" ]&&[ "${shortname}" != "pz" ]&&[ "${engine}" != "renderware" ]; then fn_info_message_commandlineparms fi +fn_info_message_ports_edit fn_info_message_ports fn_info_message_select_engine fn_info_message_statusbottom diff --git a/lgsm/functions/command_dev_query_raw.sh b/lgsm/functions/command_dev_query_raw.sh index 7c2dd95f9..c9123ebcb 100755 --- a/lgsm/functions/command_dev_query_raw.sh +++ b/lgsm/functions/command_dev_query_raw.sh @@ -11,25 +11,204 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set check.sh -info_config.sh -info_parms.sh +info_game.sh +info_distro.sh +info_messages.sh echo -e "" -echo -e "Query Port - Raw Output" +echo -e "${lightgreen}Query IP Addresses${default}" echo -e "==================================================================" echo -e "" -echo -e "QUERY IP" for queryip in "${queryips[@]}"; do echo -e "${queryip}" done +echo -e "" +echo -e "${lightgreen}Game Server Ports${default}" +echo -e "==================================================================" +{ +echo -e "${lightblue}Port Name \tPort Number \tStatus \tTCP \tUDP${default}" +if [ -v port ]; then + echo -e "Game: \t${port} \t$(ss -tupl|grep ${port}|wc -l) \t$(ss -tupl|grep ${port}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${port}|grep udp|awk '{ print $2 }')" +else + echo -e "Game:" +fi +if [ "${shortname}" == "rw" ]; then + if [ -v port2 ]; then + echo -e "Game+1: \t${port2} \t$(ss -tupl|grep ${port}|wc -l) \t$(ss -tupl|grep ${port2}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${port2}|grep udp|awk '{ print $2 }')" + else + echo -e "Game+1:" + fi + + if [ -v port3 ]; then + echo -e "Game+2: \t${port3} \t$(ss -tupl|grep ${port}|wc -l) \t$(ss -tupl|grep ${port3}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${port3}|grep udp|awk '{ print $2 }')" + else + echo -e "Game+2:" + fi + + if [ -v port4 ]; then + echo -e "Game+3: \t${port4} \t$(ss -tupl|grep ${port}|wc -l) \t$(ss -tupl|grep ${port4}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${port4}|grep udp|awk '{ print $2 }')" + else + echo -e "Game+3:" + fi +fi + +if [ -v port401 ]; then + echo -e "Game+400: \t${port401} \t$(ss -tupl|grep ${port401}|wc -l) \t$(ss -tupl|grep ${port401}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${port401}|grep udp|awk '{ print $2 }')" +else + echo -e "Game+400:" +fi + +if [ -v portipv6 ]; then + echo -e "Game ipv6: \t${portipv6} \t$(ss -tupl|grep ${portipv6}|wc -l) \t$(ss -tupl|grep ${portipv6}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${portipv6}|grep udp|awk '{ print $2 }')" +else + echo -e "Game ipv6:" +fi + +if [ -v queryport ]; then + echo -e "Query: \t${queryport} \t$(ss -tupl|grep ${queryport}|wc -l) \t$(ss -tupl|grep ${queryport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${queryport}|grep udp|awk '{ print $2 }')" +else + echo -e "Query:" +fi + +if [ -v httpport ]; then + echo -e "HTTP: \t${httpport} \t$(ss -tupl|grep ${httpport}|wc -l) \t$(ss -tupl|grep ${httpport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${httpport}|grep udp|awk '{ print $2 }')" +else + echo -e "HTTP:" +fi + +if [ -v httpqueryport ]; then + echo -e "HTTP Query: \t${httpqueryport} \t$(ss -tupl|grep ${httpqueryport}|wc -l) \t$(ss -tupl|grep ${httpqueryport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${httpqueryport}|grep udp|awk '{ print $2 }')" +else + echo -e "HTTP Query:" +fi + + +if [ -v webadminport ]; then + echo -e "Web Admin: \t${webadminport} \t$(ss -tupl|grep ${webadminport}|wc -l) \t$(ss -tupl|grep ${webadminport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${webadminport}|grep udp|awk '{ print $2 }')" +else + echo -e "Web Admin:" +fi + +if [ -v clientport ]; then + echo -e "Client: \t${clientport} \t$(ss -tupl|grep ${clientport}|wc -l) \t$(ss -tupl|grep ${clientport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${clientport}|grep udp|awk '{ print $2 }')" +else + echo -e "Client:" +fi + +if [ -v rconport ]; then + echo -e "RCON: \t${rconport} \t$(ss -tupl|grep ${rconport}|wc -l) \t$(ss -tupl|grep ${rconport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${rconport}|grep udp|awk '{ print $2 }')" +else + echo -e "RCON:" +fi + +if [ -v rawport ]; then + echo -e "RAW UDP Socket: \t${rawport} \t$(ss -tupl|grep ${rawport}|wc -l) \t$(ss -tupl|grep ${rawport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${rawport}|grep udp|awk '{ print $2 }')" +else + echo -e "RAW UDP Socket:" +fi + +if [ -v masterport ]; then + echo -e "Game: Master: \t${masterport} \t$(ss -tupl|grep ${masterport}|wc -l) \t$(ss -tupl|grep ${masterport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${masterport}|grep udp|awk '{ print $2 }')" +else + echo -e "Game: Master:" +fi + +if [ -v steamport ]; then + echo -e "Steam: \t${steamport} \t$(ss -tupl|grep ${steamport}|wc -l) \t$(ss -tupl|grep ${steamport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${steamport}|grep udp|awk '{ print $2 }')" +else + echo -e "Steam:" +fi + +if [ -v steamauthport ]; then + echo -e "Steam: Auth: \t${steamauthport} \t$(ss -tupl|grep ${steamauthport}|wc -l) \t$(ss -tupl|grep ${steamauthport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${steamauthport}|grep udp|awk '{ print $2 }')" +else + echo -e "Steam: Auth:" +fi + +if [ -v steammasterport ]; then + echo -e "Steam: Master: \t${steammasterport} \t$(ss -tupl|grep ${steammasterport}|wc -l) \t$(ss -tupl|grep ${steammasterport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${steammasterport}|grep udp|awk '{ print $2 }')" +else + echo -e "Steam: Master:" +fi + +if [ -v steamqueryport ]; then + echo -e "Steam: Query: \t${steamqueryport} \t$(ss -tupl|grep ${steamqueryport}|wc -l) \t$(ss -tupl|grep ${steamqueryport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${steamqueryport}|grep udp|awk '{ print $2 }')" +else + echo -e "Steam: Query:" +fi +if [ -v beaconport ]; then + echo -e "Beacon: \t${beaconport} \t$(ss -tupl|grep ${beaconport}|wc -l) \t$(ss -tupl|grep ${beaconport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${beaconport}|grep udp|awk '{ print $2 }')" +else + echo -e "Beacon:" +fi + +if [ -v appport ]; then + echo -e "App: \t${appport} \t$(ss -tupl|grep ${appport}|wc -l) \t$(ss -tupl|grep ${appport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${appport}|grep udp|awk '{ print $2 }')" +else + echo -e "App:" +fi + +if [ -v telnetport ]; then + echo -e "Telnet: \t${telnetport} \t$(ss -tupl|grep ${telnetport}|wc -l) \t$(ss -tupl|grep ${telnetport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${telnetport}|grep udp|awk '{ print $2 }')" +else + echo -e "Telnet:" +fi + +if [ -v sourcetvport ]; then + echo -e "SourceTV: \t${sourcetvport} \t$(ss -tupl|grep ${sourcetvport}|wc -l) \t$(ss -tupl|grep ${sourcetvport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${sourcetvport}|grep udp|awk '{ print $2 }')" +else + echo -e "SourceTV:" +fi + +if [ -v fileport ]; then + echo -e "File: \t${fileport} \t$(ss -tupl|grep ${fileport}|wc -l) \t$(ss -tupl|grep ${fileport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${fileport}|grep udp|awk '{ print $2 }')" +else + echo -e "File:" +fi + +if [ -v udplinkport ]; then + echo -e "UDP Link: \t${udplinkport} \t$(ss -tupl|grep ${udplinkport}|wc -l) \t$(ss -tupl|grep ${udplinkport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${udplinkport}|grep udp|awk '{ print $2 }')" +else + echo -e "UDP Link:" +fi + +if [ -v voiceport ]; then + echo -e "Voice: \t${voiceport} \t$(ss -tupl|grep ${voiceport}|wc -l) \t$(ss -tupl|grep ${voiceport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${voiceport}|grep udp|awk '{ print $2 }')" +else + echo -e "Voice:" +fi + +if [ -v voiceunusedport ]; then + echo -e "Voice (Unused): \t${voiceunusedport} \t$(ss -tupl|grep ${voiceunusedport}|wc -l) \t$(ss -tupl|grep ${voiceunusedport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${voiceunusedport}|grep udp|awk '{ print $2 }')" +else + echo -e "Voice (Unused):" +fi + +if [ -v battleeyeport ]; then + echo -e "BattleEye: \t${battleeyeport} \t$(ss -tupl|grep ${battleeyeport}|wc -l) \t$(ss -tupl|grep ${battleeyeport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${battleeyeport}|grep udp|awk '{ print $2 }')" +else + echo -e "BattleEye:" +fi + +if [ -v statsport ]; then + echo -e "Stats: \t${battleeyeport} \t$(ss -tupl|grep ${statsport}|wc -l) \t$(ss -tupl|grep ${statsport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${statsport}|grep udp|awk '{ print $2 }')" +else + echo -e "Stats:" +fi + +} | column -s $'\t' -t +echo -e "" +echo -e "${lightgreen}SS Output${default}" echo -e "=================================" -echo -e "Ports" -echo -e "=================================" +fn_info_message_ports +echo -e "" +echo -e "${lightgreen}Query Port - Raw Output${default}" +echo -e "==================================================================" echo -e "" echo -e "PORT: ${port}" echo -e "QUERY PORT: ${queryport}" echo -e "" -echo -e "Gamedig Raw Output" +echo -e "${lightgreen}Gamedig Raw Output${default}" echo -e "=================================" echo -e "" if [ ! "$(command -v gamedig 2>/dev/null)" ]; then @@ -45,7 +224,7 @@ for queryip in "${queryips[@]}"; do echo "${gamedigraw}" | jq done echo -e "" -echo -e "gsquery Raw Output" +echo -e "${lightgreen}gsquery Raw Output${default}" echo -e "=================================" echo -e "" for queryip in "${queryips[@]}"; do @@ -57,7 +236,7 @@ for queryip in "${queryips[@]}"; do "${functionsdir}"/query_gsquery.py -a "${queryip}" -p "${queryport}" -e "${querytype}" done echo -e "" -echo -e "TCP Raw Output" +echo -e "${lightgreen}TCP Raw Output${default}" echo -e "=================================" echo -e "" for queryip in "${queryips[@]}"; do @@ -73,10 +252,10 @@ for queryip in "${queryips[@]}"; do fi done echo -e "" -echo -e "Game Port - Raw Output" +echo -e "${lightgreen}Game Port - Raw Output${default}" echo -e "==================================================================" echo -e "" -echo -e "TCP Raw Output" +echo -e "${lightgreen}TCP Raw Output${default}" echo -e "=================================" echo -e "" for queryip in "${queryips[@]}"; do @@ -91,5 +270,12 @@ for queryip in "${queryips[@]}"; do echo -e "TCP query FAIL" fi done +echo -e "" +echo -e "${lightgreen}Steam Master Server Response${default}" +echo -e "==================================================================" +echo -e "" +echo -e "Response: ${displaymasterserver}" +echo -e "" + exitcode=0 core_exit.sh diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index 3602bef93..3f4e397e2 100755 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -74,12 +74,10 @@ fn_monitor_check_queryport(){ fn_script_log_info "Checking port: CHECKING" if [ -n "${rconenabled}" ]&&[ "${rconenabled}" != "true" ]&&[ ${shortname} == "av" ]; then fn_print_warn "Checking port: Unable to query, rcon is not enabled" - fn_print_warn_eol_nl fn_script_log_warn "Checking port: Unable to query, rcon is not enabled" else fn_print_error "Checking port: Unable to query, queryport is not set" fn_script_log_error "Checking port: Unable to query, queryport is not set" - fn_print_error_eol_nl fi core_exit.sh fi @@ -227,8 +225,7 @@ fn_monitor_loop(){ monitorflag=1 check.sh core_logs.sh -info_config.sh -info_parms.sh +info_game.sh # query pre-checks fn_monitor_check_lockfile diff --git a/lgsm/functions/command_postdetails.sh b/lgsm/functions/command_postdetails.sh index fa2907b1e..f8b36fb61 100755 --- a/lgsm/functions/command_postdetails.sh +++ b/lgsm/functions/command_postdetails.sh @@ -31,8 +31,7 @@ if [ "${exitbypass}" ]; then else # Run checks and gathers details to display. check.sh - info_config.sh - info_parms.sh + info_game.sh info_distro.sh info_messages.sh for queryip in "${queryips[@]}" @@ -54,6 +53,7 @@ else if [ "${shortname}" != "jc2" ]&&[ "${shortname}" != "jc3" ]&&[ "${shortname}" != "dst" ]&&[ "${shortname}" != "pz" ]&&[ "${engine}" != "renderware" ]; then fn_info_message_commandlineparms fi + fn_info_message_ports_edit fn_info_message_ports fn_info_message_select_engine fn_info_message_statusbottom diff --git a/lgsm/functions/command_restart.sh b/lgsm/functions/command_restart.sh index 47a6b904c..3bf60c32c 100755 --- a/lgsm/functions/command_restart.sh +++ b/lgsm/functions/command_restart.sh @@ -10,7 +10,7 @@ commandaction="Restarting" functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set -info_config.sh +info_game.sh exitbypass=1 command_stop.sh command_start.sh diff --git a/lgsm/functions/command_start.sh b/lgsm/functions/command_start.sh index caa933320..58ecfcff7 100755 --- a/lgsm/functions/command_start.sh +++ b/lgsm/functions/command_start.sh @@ -72,7 +72,13 @@ fn_start_tmux(){ echo "${version}" >> "${lockdir}/${selfname}.lock" echo "${port}" >> "${lockdir}/${selfname}.lock" fn_reload_startparameters - cd "${executabledir}" || exit + + if [ "${shortname}" == "av" ]; then + cd "${systemdir}" || exit + else + cd "${executabledir}" || exit + fi + tmux new-session -d -x "${sessionwidth}" -y "${sessionheight}" -s "${sessionname}" "${preexecutable} ${executable} ${startparameters}" 2> "${lgsmlogdir}/.${selfname}-tmux-error.tmp" # Create logfile. @@ -185,7 +191,7 @@ fi if [ -z "${fixbypass}" ]; then fix.sh fi -info_config.sh +info_game.sh core_logs.sh # Will check for updates is updateonstart is yes. diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index f0a0bf92c..ef54b525c 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -269,7 +269,7 @@ fn_stop_pre_check(){ check.sh fn_print_dots "${servername}" -info_config.sh +info_game.sh fn_stop_pre_check # Remove lockfile. if [ -f "${lockdir}/${selfname}.lock" ]; then diff --git a/lgsm/functions/command_test_alert.sh b/lgsm/functions/command_test_alert.sh index 9397a445c..7fe61e48a 100755 --- a/lgsm/functions/command_test_alert.sh +++ b/lgsm/functions/command_test_alert.sh @@ -12,7 +12,7 @@ fn_firstcommand_set fn_print_dots "${servername}" check.sh -info_config.sh +info_game.sh alert="test" alert.sh diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index 2c8c269bf..9d80913a7 100755 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -92,9 +92,14 @@ fn_dl_steamcmd(){ if [ -n "$(grep -i "Error!" "${steamcmdlog}" | tail -1)" ]&&[ "$(grep -ic "Error!" "${steamcmdlog}")" -ge "${counter}" ] ; then # Not enough space. if [ -n "$(grep "0x202" "${steamcmdlog}" | tail -1)" ]; then - fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Not enough space to download server files" - fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Not enough space to download server files" + fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files" + fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files" core_exit.sh + # Not enough space. + elif [ -n "$(grep "0x212" "${steamcmdlog}" | tail -1)" ]; then + fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files" + fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files" + core_exit.sh # Need tp purchase game. elif [ -n "$(grep "No subscription" "${steamcmdlog}" | tail -1)" ]; then fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Steam account does not have a license for the required game" @@ -116,6 +121,7 @@ fn_dl_steamcmd(){ fn_script_log_error "${commandaction} ${selfname}: ${remotelocation}: Update required but not completed - check network" else fn_print_error2_nl "${commandaction} ${selfname}: ${remotelocation}: Unknown error occured" + echo -en "Please provide content log to LinuxGSM developers https://linuxgsm.com/steamcmd-error" fn_script_log_error "${commandaction} ${selfname}: ${remotelocation}: Unknown error occured" fi elif [ "${exitcode}" != "0" ]; then diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 59e6b20f5..dd82419a4 100755 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -513,17 +513,12 @@ fn_fetch_function # Info -info_stats.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function -} - -info_config.sh(){ +info_distro.sh(){ functionfile="${FUNCNAME[0]}" fn_fetch_function } -info_distro.sh(){ +info_game.sh(){ functionfile="${FUNCNAME[0]}" fn_fetch_function } @@ -538,7 +533,7 @@ functionfile="${FUNCNAME[0]}" fn_fetch_function } -info_parms.sh(){ +info_stats.sh(){ functionfile="${FUNCNAME[0]}" fn_fetch_function } diff --git a/lgsm/functions/fix_ts3.sh b/lgsm/functions/fix_ts3.sh index b1ed7d84b..021f03764 100755 --- a/lgsm/functions/fix_ts3.sh +++ b/lgsm/functions/fix_ts3.sh @@ -17,7 +17,7 @@ fi # Fixes: failed to register local accounting service: No such file or directory. accountingfile="/dev/shm/7gbhujb54g8z9hu43jre8" -if [ -f "${accountingfile}" ]; then +if [ -f "${accountingfile}" ]&&[ "${status}" == "0" ]; then # Check permissions for the file if the current user owns it, if not exit. if [ "$( stat -c %U ${accountingfile})" == "$(whoami)" ]; then fixname="Delete file ${accountingfile}" diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh index 7f0dc2b19..fdfc076ab 100755 --- a/lgsm/functions/info_distro.sh +++ b/lgsm/functions/info_distro.sh @@ -11,6 +11,11 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" ### Game Server pid if [ "${status}" == "1" ]; then gameserverpid=$(tmux list-sessions -F "#{session_name} #{pane_pid}" | grep "^${sessionname} " | awk '{print $NF}') + if [ "${engine}" == "source" ]; then + srcdslinuxpid=$(ps -ef | grep -v grep | grep "${gameserverpid}" | grep srcds_linux | awk '{print $2}') + elif [ "${engine}" == "goldsrc" ]; then + hldslinuxpid=$(ps -ef | grep -v grep | grep "${gameserverpid}" | grep hlds_linux | awk '{print $2}') + fi fi ### Distro information @@ -268,7 +273,7 @@ fi # Steam Master Server - checks if detected by master server. if [ "$(command -v jq 2>/dev/null)" ]; then if [ "${ip}" ]&&[ "${port}" ]; then - if [ "${steammaster}" == "true" ]; then + if [ "${steammaster}" == "true" ]||[ ${commandname} == "DEV-QUERY-RAW" ]; then # Will query server IP addresses first. for queryip in "${queryips[@]}"; do masterserver="$(curl --connect-timeout 10 -m 3 -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${queryip}':'${port}'&format=json' | jq '.response.servers[]|.addr' | wc -l 2>/dev/null)" @@ -292,3 +297,6 @@ if [ "${appid}" ]; then glibc="2.14" fi fi + +# Gather Port Info using ss +ssinfo="$(ss -tuplwn)" diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_game.sh old mode 100755 new mode 100644 similarity index 79% rename from lgsm/functions/info_config.sh rename to lgsm/functions/info_game.sh index 07960e290..2c3c52584 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_game.sh @@ -1,9 +1,9 @@ #!/bin/bash -# LinuxGSM info_config.sh module +# LinuxGSM info_game.sh module # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Gets specific details from config files. +# Description: Gathers various game server information. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" @@ -14,8 +14,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # grep -v "foo" filter out lines that contain foo # cut -f1 -d "/" remove everything after / - -fn_info_config_assettocorsa(){ +fn_info_game_ac(){ if [ ! -f "${servercfgfullpath}" ]; then httpport="${zero}" port="${zero}" @@ -25,7 +24,7 @@ fn_info_config_assettocorsa(){ else httpport=$(grep "HTTP_PORT" "${servercfgfullpath}" | tr -cd '[:digit:]') port=$(grep "TCP_PORT" "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport="${port}" + queryport="${httpport}" servername=$(grep "NAME" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/NAME//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| head -n 1) adminpassword=$(grep "ADMIN_PASSWORD" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/ADMIN_PASSWORD//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') @@ -39,87 +38,149 @@ fn_info_config_assettocorsa(){ fi } -fn_info_config_justcause2(){ +fn_info_game_ark(){ + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + adminpassword="${unavailable}" + serverpassword="${unavailable}" + else + servername=$(grep "SessionName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/SessionName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + adminpassword=$(grep "ServerAdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/ServerAdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' ) + serverpassword=$( grep "ServerPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/ServerPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + # Not Set + servername=${servername:-"NOT SET"} + adminpassword=${adminpassword:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + fi + + # Parameters + port=${port:-"0"} + queryport=${queryport:-"0"} + rconport=${rconport:-"0"} + rawport=$((port+1)) + maxplayers=${maxplayers:-"0"} +} + +fn_info_game_arma3(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" + adminpassword="${unavailable}" serverpassword="${unavailable}" maxplayers="${zero}" - port="${zero}" - queryport="${zero}" else - servername=$(grep "Name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/Name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverdescription=$(grep "Description" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/Description//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "Password" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') - port=$(grep "BindPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') - queryport="${port}" - configip=$(grep "BindIP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/BindIP//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - ipsetinconfig=1 - ipinconfigvar="BindIP" + servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + adminpassword=$(grep "passwordAdmin" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/passwordAdmin//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "maxPlayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') # Not Set servername=${servername:-"NOT SET"} + adminpassword=${adminpassword:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} maxplayers=${maxplayers:-"0"} - port=${port:-"0"} + fi + + # Parameters + port=${port:-"2302"} + voiceport=${port:-"2302"} + queryport=$((port+1)) + steammasterport=$((port+2)) + voiceunusedport=$((port+3)) + battleeyeport=$((port+4)) +} + +fn_info_game_av() { + if [ ! -f "${servercfgfullpath}" ]; then + maxplayers="${unavailable}" + servername="${unavailable}" + serverpassword="${unavailable}" + rconpassword="${unavailable}" + rconport="${unavailable}" + rconenabled="${unavailable}" + queryport="${unavailable}" + else + maxplayers=$(grep "maxPlayers=" "${servercfgfullpath}" | sed 's/maxPlayers=//') + servername=$(grep "name=" "${servercfgfullpath}" | sed 's/name=//') + serverpassword=$(grep "password=" "${servercfgfullpath}" | sed 's/password=//') + + port=$(grep "port=" "${servercfgfullpath}" | sed 's/port=//') + queryport=$((port+3)) + steamqueryport=$((port+20)) + steammasterport=$((port+21)) + rconport=$(grep "rconPort=" "${servercfgfullpath}" | sed 's/rconPort=//') + + rconpassword=$(grep "rconPassword=" "${servercfgfullpath}" | sed 's/rconPassword=//') + if [ -n "${rconpassword}" ]; then + rconenabled="true" + fi + + # Not set + maxplayers=${maxplayers:-"NOT SET"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + rconpassword=${rconpassword:-"NOT SET"} + rconport=${rconport:-"0"} + rconenabled=${rconenabled:-"false"} queryport=${queryport:-"0"} fi } -fn_info_config_justcause3(){ +fn_info_game_bf1942(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" - serverdescription="${unavailable}" serverpassword="${unavailable}" maxplayers="${zero}" port="${zero}" - queryPort="${zero}" - steamport="${zero}" - tickrate="${zero}" + queryport="${zero}" else - servername=$(grep "name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverdescription=$(grep "description" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/description//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "\"maxPlayers\"" "${servercfgfullpath}" | tr -cd '[:digit:]') - port=$(grep "\"port\"" "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport=$(grep "\"queryPort\"" "${servercfgfullpath}" | tr -cd '[:digit:]') - steamport=$(grep "\"steamPort\"" "${servercfgfullpath}" | tr -cd '[:digit:]') - tickrate=$(grep "\"maxTickRate\"" "${servercfgfullpath}" | tr -cd '[:digit:]') + servername=$(grep -E "^game.serverName " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverName //g' | tr -d '=\";,:' | xargs) + serverpassword=$(grep "game.serverPassword" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/game.serverPassword//g' | tr -d '=\";,:' | xargs) + maxplayers=$(grep "game.serverMaxPlayers" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') + port=$(grep "game.serverPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') + queryport="22000" - configip=$(grep "host" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/host//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + configip=$(grep "game.serverIP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverIP//g' | tr -d '=\";,:' | xargs) ipsetinconfig=1 - ipinconfigvar="host" + ipinconfigvar="game.serverIP" # Not Set servername=${servername:-"NOT SET"} - serverdescription=${serverdescription:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers=:-"0"} - port=${port=:-"0"} - queryport=${queryport=:-"0"} - steamport=${steamport=:-"0"} - tickrate=${tickrate=:-"0"} + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} fi } -fn_info_config_ark(){ +fn_info_game_bfv(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" - adminpassword="${unavailable}" serverpassword="${unavailable}" + maxplayers="${zero}" + port="${zero}" + queryport="${zero}" else - servername=$(grep "SessionName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/SessionName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - adminpassword=$(grep "ServerAdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/ServerAdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' ) - serverpassword=$( grep "ServerPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/ServerPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + servername=$(grep "game.serverName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverName//g' | tr -d '=\";,:' | xargs) + serverpassword=$(grep "game.serverPassword" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/game.serverPassword//g' | tr -d '=\";,:' | xargs) + maxplayers=$(grep "game.serverMaxPlayers" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') + port=$(grep "game.serverPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') + queryport="23000" + + configip=$(grep "game.serverIP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverIP//g' | tr -d '=\";,:' | xargs) + ipsetinconfig=1 + ipinconfigvar="game.serverIP" # Not Set servername=${servername:-"NOT SET"} - adminpassword=${adminpassword:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} fi } -fn_info_config_ballistic_overkill(){ +fn_info_game_bo(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" serverpassword="${unavailable}" @@ -130,7 +191,7 @@ fn_info_config_ballistic_overkill(){ servername=$(grep "ServerName=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') serverpassword=$(grep "Password=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') port=$(grep "ServerPort=" "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport=$((port + 1)) + queryport=$((port+1)) maxplayers=$(grep "MaxPlayers=" "${servercfgfullpath}" | tr -cd '[:digit:]') # Not Set @@ -142,7 +203,8 @@ fn_info_config_ballistic_overkill(){ fi } -fn_info_config_barotrauma(){ +fn_info_game_bt(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" serverpassword="${unavailable}" @@ -163,94 +225,53 @@ fn_info_config_barotrauma(){ queryport=${queryport:-"0"} maxplayers=${maxplayers:-"0"} fi -} -fn_info_config_battalion1944(){ - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - else - servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "Password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not Set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - fi + # Parameters + port=${port:-"0"} + queryport=${queryport:-"0"} } -fn_info_config_bf1942(){ +fn_info_game_bt1944(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" serverpassword="${unavailable}" - maxplayers="${zero}" - port="${zero}" - queryport="${zero}" + gamemode="${unavailable}" else - - servername=$(grep -E "^game.serverName " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverName //g' | tr -d '=\";,:' | xargs) - serverpassword=$(grep "game.serverPassword" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/game.serverPassword//g' | tr -d '=\";,:' | xargs) - maxplayers=$(grep "game.serverMaxPlayers" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') - port=$(grep "game.serverPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') - queryport="22000" - - configip=$(grep "game.serverIP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverIP//g' | tr -d '=\";,:' | xargs) - ipsetinconfig=1 - ipinconfigvar="game.serverIP" + servername=$(grep -m2 "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "Password" "${servercfgfullpath}" | grep -v "RCONPassword" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + gamemode=$(grep -m2 "PlayMode" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/PlayMode//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') # Not Set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} + gamemode=${gamemode:-"NOT SET"} fi -} - -fn_info_config_bfv(){ - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - port="${zero}" - queryport="${zero}" - else - - servername=$(grep "game.serverName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverName//g' | tr -d '=\";,:' | xargs) - serverpassword=$(grep "game.serverPassword" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/game.serverPassword//g' | tr -d '=\";,:' | xargs) - maxplayers=$(grep "game.serverMaxPlayers" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') - port=$(grep "game.serverPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') - queryport="23000" - - configip=$(grep "game.serverIP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverIP//g' | tr -d '=\";,:' | xargs) - ipsetinconfig=1 - ipinconfigvar="game.serverIP" - # Not Set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - fi + # Parameters + port=${port:-"0"} + rconport=$((port+2)) + queryport=${queryport:-"0"} } -fn_info_config_chivalry(){ +fn_info_game_cmw(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" serverpassword="${unavailable}" adminpassword="${unavailable}" - else + rconport="${unavailable}" + else servername=$(grep -E "^ServerName" "${servercfgfullpath}" | sed 's/^ServerName=//') - adminpassword=$(grep -E "^AdminPassword" "${servercfgfullpath}" | sed 's/^AdminPassword=//') + rconport=$(grep -E "^RConPort=" "${servercfgdir}/DefaultGame.ini" | tr -cd '[:digit:]') # Not Set servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - adminpassword=${adminpassword:-"NOT SET"} - port=${port:-"0"} + rconport=${port:-"0"} fi } -fn_info_config_cod(){ +fn_info_game_cod(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" rconpassword="${unavailable}" @@ -262,9 +283,15 @@ fn_info_config_cod(){ servername=${servername:-"NOT SET"} rconpassword=${rconpassword=:-"NOT SET"} fi + + # Parameters + defaultmap=${defaultmap:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + queryport=${port:-"0"} } -fn_info_config_cod2(){ +fn_info_game_cod2(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" rconpassword="${unavailable}" @@ -278,7 +305,7 @@ fn_info_config_cod2(){ fi } -fn_info_config_cod4(){ +fn_info_game_cod4(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" rconpassword="${unavailable}" @@ -292,7 +319,7 @@ fn_info_config_cod4(){ fi } -fn_info_config_codwaw(){ +fn_info_game_codwaw(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" rconpassword="${unavailable}" @@ -306,7 +333,31 @@ fn_info_config_codwaw(){ fi } -fn_info_config_dontstarve(){ +fn_info_game_col(){ + if [ -f "${servercfgfullpath}" ]; then + servername=$(jq -r '.ServerSettings.ServerName' "${servercfgfullpath}") + serverpassword=$(jq -r '.ServerSettings.ServerPassword' "${servercfgfullpath}") + maxplayers=$(jq -r '.ServerSettings.MaxPlayerCount' "${servercfgfullpath}") + port=$(jq -r '.ServerSettings.ServerGamePort' "${servercfgfullpath}") + steamport=$(jq -r '.ServerSettings.ServerSteamPort' "${servercfgfullpath}") + rconpassword=$(jq -r '.ServerSettings.RCONPassword' "${servercfgfullpath}") + configip=$(jq -r '.ServerSettings.ServerIP' "${servercfgfullpath}") + + # password not set + serverpassword=${serverpassword:-"NOT SET"} + queryport=${port:-"0"} + else + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"27004"} + steamport=${steamport:-"27005"} + rconpassword=${rconpassword:-"NOT SET"} + fi +} + +fn_info_game_dst(){ + # Config if [ ! -f "${clustercfgfullpath}" ]; then servername="${unavailable}" serverpassword="${unavailable}" @@ -337,21 +388,28 @@ fn_info_config_dontstarve(){ if [ ! -f "${servercfgfullpath}" ]; then port="${zero}" - steamauthenticationport="${zero}" - steammasterserverport="${zero}" + steamauthport="${zero}" + steammasterport="${zero}" else port=$(grep "server_port" "${servercfgfullpath}" | grep "^server_port" | grep -v "#" | tr -cd '[:digit:]') - steamauthenticationport=$(grep "authentication_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - steammasterserverport=$(grep "master_server_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + steamauthport=$(grep "authentication_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + steammasterport=$(grep "master_server_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') # Not Set port=${port:-"0"} - steamauthenticationport=${steamauthenticationport:-"0"} - steammasterserverport=${steammasterserverport:-"0"} + steamauthport=${steamauthport:-"0"} + steammasterport=${steammasterport:-"0"} fi + + # Parameters + sharding=${sharding:-"NOT SET"} + master=${master:-"NOT SET"} + shard=${shard:-"NOT SET"} + cluster=${cluster:-"NOT SET"} + cave=${cave:-"NOT SET"} } -fn_info_config_eco(){ +fn_info_game_eco(){ if [ ! -f "${servercfgfullpath}" ]; then configip="${unavailable}" servername="${unavailable}" @@ -379,7 +437,38 @@ fn_info_config_eco(){ fi } -fn_info_config_factorio(){ +fn_info_game_etl(){ + if [ ! -f "${servercfgfullpath}" ]; then + rconpassword="${unavailable}" + servername="${unavailable}" + serverpassword="${unavailable}" + maxplayers="${zero}" + port="${zero}" + queryport="${zero}" + else + port=$(grep "set net_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + queryport="${port}" + rconpassword=$(grep "set rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//g' -e '/^\//d' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + servername=$(grep "set sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "set g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "set sv_maxclients" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + + configip=$(grep "set net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set net_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + ipsetinconfig=1 + ipinconfigvar="set net_ip" + + # Not Set + rconpassword=${rconpassword:-"NOT SET"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"27960"} + queryport=${queryport:-"27960"} + fi +} + +fn_info_game_fctr(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then servername="Factorio Server" serverpassword="${unavailable}" @@ -403,790 +492,899 @@ fn_info_config_factorio(){ savegameinterval=${savegameinterval:-"0"} versioncount=${versioncount:-"0"} fi + + # Parameters + port=${port:-"0"} + rconport=${rconport:-"0"} + rconpassword=${rconpassword:-"NOT SET"} } -fn_info_config_minecraft(){ +fn_info_game_jc2(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" - rconpassword="${unavailable}" - rconport="${zero}" + serverpassword="${unavailable}" maxplayers="${zero}" port="${zero}" queryport="${zero}" - queryenabled="${unavailable}" - gamemode="${unavailable}" - gameworld="${unavailable}" else - servername=$(grep "motd" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/motd//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconpassword=$(grep "rcon.password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/rcon.password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconport=$(grep "rcon.port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - maxplayers=$(grep "max-players" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - port=$(grep "server-port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - queryport=$(grep "query.port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - if [ -z "${queryport}" ]; then - queryport=${port} - fi - queryenabled=$(grep "enable-query" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/enable-query//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - gamemode=$(grep "gamemode" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - gameworld=$(grep "level-name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/level-name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - configip=$(grep "server-ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/server-ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - ipsetinconfig=1 - ipinconfigvar="server-ip" - - # Not Set + servername=$(grep "Name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/Name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverdescription=$(grep "Description" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/Description//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "Password" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') + port=$(grep "BindPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') + queryport="${port}" + configip=$(grep "BindIP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/BindIP//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + ipsetinconfig=1 + ipinconfigvar="BindIP" + + # Not Set servername=${servername:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} - rconport=${rconport:-"NOT SET"} - maxplayers=${maxplayers:-"NOT SET"} - port=${port:-"NOT SET"} - queryport=${queryport:-"NOT SET"} - queryenabled="${queryenabled:-"NOT SET"}" - gamemode=${gamemode:-"NOT SET"} - gameworld=${gameworld:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + queryport=${queryport:-"0"} fi } -fn_info_config_minecraft_bedrock(){ +fn_info_game_hw(){ + servername=${servername:-"NOT SET"} + port=${port:-"0"} + queryport=${queryport:-"0"} + maxplayers=${maxplayers:-"0"} + defaultmap=${defaultmap:-"NOT SET"} + creativemode=${creativemode:-"NOT SET"} +} + +fn_info_game_inss(){ + # Parameters + port=${port:-"0"} + queryport=${queryport:-"0"} + rconport=${rconport:-"0"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + defaultmap=${defaultmap:-"NOT SET"} + defaultscenario=${defaultscenario:-"NOT SET"} + maxplayers=${maxplayers:-"0"} +} + +fn_info_game_jc3(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" + serverdescription="${unavailable}" + serverpassword="${unavailable}" maxplayers="${zero}" port="${zero}" - port6="${zero}" - queryport="${zero}" - gamemode="${unavailable}" - gameworld="${unavailable}" + queryPort="${zero}" + steamport="${zero}" + httpport="${zero}" + tickrate="${zero}" else - servername=$(grep "server-name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/server-name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "max-players" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - port=$(grep "server-port\b" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - port6=$(grep "server-portv6\b" "${servercfgfullpath}" | sed 's/v6//g' | grep -v "#" | tr -cd '[:digit:]') - queryport=${port} - gamemode=$(grep "gamemode" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/gamemode//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - gameworld=$(grep "level-name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/level-name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + servername=$(grep "name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverdescription=$(grep "description" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/description//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "\"maxPlayers\"" "${servercfgfullpath}" | tr -cd '[:digit:]') + port=$(grep "\"port\"" "${servercfgfullpath}" | tr -cd '[:digit:]') + queryport=$(grep "\"queryPort\"" "${servercfgfullpath}" | tr -cd '[:digit:]') + steamport=$(grep "\"steamPort\"" "${servercfgfullpath}" | tr -cd '[:digit:]') + httpport=$(grep "\"httpPort\"" "${servercfgfullpath}" | tr -cd '[:digit:]') + tickrate=$(grep "\"maxTickRate\"" "${servercfgfullpath}" | tr -cd '[:digit:]') + + configip=$(grep "host" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/host//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + ipsetinconfig=1 + ipinconfigvar="host" # Not Set servername=${servername:-"NOT SET"} - maxplayers=${maxplayers:-"NOT SET"} - port=${port:-"NOT SET"} - port6=${port6:-"NOT SET"} - queryport=${queryport:-"NOT SET"} - gamemode=${gamemode:-"NOT SET"} - gameworld=${gameworld:-"NOT SET"} + serverdescription=${serverdescription:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers=:-"0"} + port=${port=:-"0"} + queryport=${queryport=:-"0"} + steamport=${steamport=:-"0"} + httpport=${httpport=:-"0"} + tickrate=${tickrate=:-"0"} fi } -fn_info_config_mofm(){ +fn_info_game_jk2(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then + rconpassword="${unavailable}" servername="${unavailable}" serverpassword="${unavailable}" + maxplayers="${zero}" else - servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "ServerPassword" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/ServerPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + rconpassword=$(grep "seta rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta rconpassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + servername=$(grep "seta sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "seta g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "seta sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + serverversion=$(grep "seta mv_serverversion" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta mv_serverversion//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') # Not Set + rconpassword=${rconpassword:-"NOT SET"} servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} fi + + # Parameters + queryport="${port:-"0"}" } -fn_info_config_onset(){ +fn_info_game_kf(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" - maxplayers="${zero}" + serverpassword="${unavailable}" + adminpassword="${unavailable}" port="${zero}" - httpport="${zero}" queryport="${zero}" + queryportgs="${zero}" + steamport="${zero}" + steammasterport="${zero}" + lanport="${zero}" + httpport="${zero}" + webadminenabled="${unavailable}" + webadminuser="${unavailable}" + webadminpass="${unavailable}" else - servername=$(grep -v "servername_short" "${servercfgfullpath}" | grep "servername" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/servername//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' ) - maxplayers=$(grep "maxplayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - port=$(grep "port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - httpport=$((port-2)) - queryport=$((port-1)) + servername=$(sed -nr 's/^ServerName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + serverpassword=$(sed -nr 's/^GamePassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + adminpassword=$(sed -nr 's/^AdminPassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + port=$(sed -nr 's/^Port=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') + queryport=$((port+1)) + queryportgs=$(sed -nr 's/^OldQueryPortNumber=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') + steamport="20560" + steammasterport="28852" + lanport=$(grep "LANServerPort=" "${servercfgfullpath}" | tr -cd '[:digit:]') + httpport=$(sed -nr 's/^ListenPort=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') + webadminenabled=$(sed -nr 's/^bEnabled=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + webadminuser=$(sed -nr 's/^AdminName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + webadminpass="${adminpassword}" # Not Set servername=${servername:-"NOT SET"} - maxplayers=${maxplayers:-"NOT SET"} - port=${port:-"NOT SET"} - httpport=${httpport:-"NOT SET"} - queryport=${queryport:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + adminpassword=${adminpassword:-"NOT SET"} + port=${port:-"0"} + queryport=${queryport:-"0"} + queryportgs=${queryportgs:-"0"} + steamport=${steamport:-"0"} + steammasterport=${steammasterport:-"0"} + lanport=${lanport:-"0"} + httpport=${httpport:-"0"} + webadminenabled=${webadminenabled:-"NOT SET"} + webadminuser=${webadminuser:-"NOT SET"} + webadminpass=${webadminpass:-"NOT SET"} fi } -fn_info_config_mohaa(){ +fn_info_game_kf2(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then - rconpassword="${unavailable}" servername="${unavailable}" serverpassword="${unavailable}" - maxplayers="${zero}" + adminpassword="${unavailable}" + port="${unavailable}" + queryport="${unavailable}" + webadminenabled="${unavailable}" + httpport="${zero}" + webadminuser="${unavailable}" + webadminpass="${unavailable}" else - rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta rconpassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "GamePassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/GamePassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + adminpassword=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + port=$(grep "Port" "${servercfgdir}/LinuxServer-KFEngine.ini" | sed -e 's/^[ \t]*//g' | grep "^Port" | grep -v "#" | tr -cd '[:digit:]') + webadminenabled=$(grep "bEnabled" "${servercfgdir}/KFWeb.ini" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bEnabled//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + httpport=$(grep "ListenPort" "${servercfgdir}/KFWeb.ini" | grep -v "#" | tr -cd '[:digit:]') + webadminuser="Admin" + webadminpass=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') # Not Set - rconpassword=${rconpassword:-"NOT SET"} servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi -} - -#Post Scriptum: The bloody Seventh -fn_info_config_pstbs(){ - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - maxplayers="${unavailable}" - reservedslots="${unavailable}" - else - servername=$(grep "ServerName=" "${servercfgfullpath}" | sed -e 's/^[ \t]//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=";,:' | sed -e 's/^[ \t]//' -e 's/[ \t]*$//') - maxplayers=$(grep "MaxPlayers=" "${servercfgfullpath}" | tr -cd '[:digit:]') - reservedslots=$(grep "NumReservedSlots=" "${servercfgfullpath}" | tr -cd '[:digit:]') - fi - - if [ ! -f "${servercfgdir}/Rcon.cfg" ]; then - rconport=${unavailable} - rconpassword=${unavailable} - else - rconport=$(grep "Port=" "${servercfgdir}/Rcon.cfg" | tr -cd '[:digit:]') - rconpassword=$(grep "Password=" "${servercfgdir}/Rcon.cfg" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + adminpassword=${adminpassword:-"NOT SET"} + port=${port:-"0"} + webadminenabled=${webadminenabled:-"NOT SET"} + httpport=${webadminport:-"0"} + webadminuser=${webadminuser:-"NOT SET"} + webadminpass=${webadminpass:-"NOT SET"} fi - rconport=${rconport:-"0"} - if [ -z "${rconpassword}" ]||[ ${#rconpassword} == 1 ]; then - rconpassword="NOT SET" - fi - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - numreservedslots=${numreservedslots:-"0"} + # Parameters + queryport=${queryport:-"0"} + defaultmap=${defaultmap:-"NOT SET"} } -fn_info_config_projectcars(){ +fn_info_game_mc(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" - serverpassword="${unavailable}" + rconpassword="${unavailable}" + rconport="${zero}" maxplayers="${zero}" port="${zero}" queryport="${zero}" - steamport="${zero}" + queryenabled="${unavailable}" + gamemode="${unavailable}" + gameworld="${unavailable}" else - servername=$(grep "name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "password " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - port=$(grep "hostPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - queryport=$(grep "queryPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - steamport=$(grep "steamPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + servername=$(grep "motd" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/motd//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + rconpassword=$(grep "rcon.password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/rcon.password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + rconport=$(grep "rcon.port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + maxplayers=$(grep "max-players" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + port=$(grep "server-port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + queryport=$(grep "query.port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + if [ -z "${queryport}" ]; then + queryport=${port:-"0"} + fi + queryenabled=$(grep "enable-query" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/enable-query//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + gamemode=$(grep "gamemode" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + gameworld=$(grep "level-name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/level-name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + configip=$(grep "server-ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/server-ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + ipsetinconfig=1 + ipinconfigvar="server-ip" # Not Set servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} + rconpassword=${rconpassword:-"NOT SET"} + rconport=${rconport:-"NOT SET"} maxplayers=${maxplayers:-"NOT SET"} port=${port:-"NOT SET"} queryport=${queryport:-"NOT SET"} - steamport=${steamport:-"NOT SET"} + queryenabled="${queryenabled:-"NOT SET"}" + gamemode=${gamemode:-"NOT SET"} + gameworld=${gameworld:-"NOT SET"} fi } -fn_info_config_projectzomboid(){ +fn_info_game_mcb(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" - serverpassword="${unavailable}" - rconpassword="${unavailable}" maxplayers="${zero}" port="${zero}" + portipv6="${zero}" + queryport="${zero}" + gamemode="${unavailable}" gameworld="${unavailable}" else - servername=$(grep "PublicName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/PublicName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "Password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^Password" | sed -e '/^#/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconpassword=$(grep "RCONPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/RCONPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - port=$(grep "DefaultPort" "${servercfgfullpath}" | tr -cd '[:digit:]') - gameworld=$(grep "Map" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^Map" | sed -e '/^#/d' -e 's/Map//g' | tr -d '=\";' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + servername=$(grep "server-name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/server-name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "max-players" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + port=$(grep "server-port\b" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + portipv6=$(grep "server-portv6\b" "${servercfgfullpath}" | sed 's/v6//g' | grep -v "#" | tr -cd '[:digit:]') + queryport=${port:-"0"} + gamemode=$(grep "gamemode" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/gamemode//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + gameworld=$(grep "level-name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/level-name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') # Not Set servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} maxplayers=${maxplayers:-"NOT SET"} port=${port:-"NOT SET"} + portipv6=${portipv6:-"NOT SET"} + queryport=${queryport:-"NOT SET"} + gamemode=${gamemode:-"NOT SET"} gameworld=${gameworld:-"NOT SET"} fi } -fn_info_config_quakeworld(){ +fn_info_game_mh(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then - rconpassword="${unavailable}" servername="${unavailable}" serverpassword="${unavailable}" - maxplayers="${zero}" - port="${zero}" + rconpassword="${unavailable}" + maxplayers="${unavailable}" else - rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "/") - servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "/") - maxplayers=$(grep "maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + servername=$(grep "ServerName" "${servercfgfullpath}" | awk -F '=' '{print $2}') + serverpassword=$(grep "ServerPassword" "${servercfgfullpath}" | awk -F '=' '{print $2}') + rconpassword=$(grep "AdminPassword" "${servercfgfullpath}" | awk -F '=' '{print $2}') + maxplayers=$(grep "MaxSlots" "${servercfgfullpath}" | awk -F '=' '{print $2}') - # Not Set - rconpassword=${rconpassword:-"NOT SET"} + # Not set servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + rconpassword=${rconpassword:-"NOT SET"} maxplayers=${maxplayers:-"0"} fi + + # Parameters + port=${port:-"0"} + queryport=${queryport:-"0"} + beaconport=${beaconport:-"0"} } -fn_info_config_quake2(){ +fn_info_game_mohaa(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then rconpassword="${unavailable}" servername="${unavailable}" serverpassword="${unavailable}" maxplayers="${zero}" else - rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta rconpassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') # Not Set rconpassword=${rconpassword:-"NOT SET"} servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} maxplayers=${maxplayers:-"0"} fi + + # Parameters + port=${port:-"0"} + queryport=${port:-"0"} + defaultmap=${defaultmap:-"NOT SET"} } -fn_info_config_quake3(){ +fn_info_game_mom(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then - rconpassword="${unavailable}" servername="${unavailable}" serverpassword="${unavailable}" - maxplayers="${zero}" + maxplayer="${zero}" + defaultmap="${unavailable}" else - rconpassword=$(grep "zmq_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set zmq_rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "ServerPassword" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/ServerPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/MaxPlayers//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + defaultmap=$(grep "MapName" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/MapName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') # Not Set - rconpassword=${rconpassword:-"NOT SET"} servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} + maxplayer=${maxplayers:-"NOT SET"} + defaultmap=${defaultmap:-"NOT SET"} fi + + # Parameters + port=${port:-"7777"} + beaconport=${queryport:-"15000"} } -fn_info_config_jk2(){ +fn_info_game_mta(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then - rconpassword="${unavailable}" + configip="${zero}" + port="${unavailable}" + httpport="${unavailable}" + ase="${unavailable}" servername="${unavailable}" serverpassword="${unavailable}" maxplayers="${zero}" else - rconpassword=$(grep "seta rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta rconpassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - servername=$(grep "seta sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "seta g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "seta sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - serverversion=$(grep "seta mv_serverversion" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta mv_serverversion//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + port=$(grep -m 1 "serverport" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<" | tr -cd '[:digit:]') + httpport=$(grep -m 1 "httpport" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<" | tr -cd '[:digit:]') + servername=$(grep -m 1 "servername" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<") + serverpassword=$(grep -m 1 "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<") + maxplayers=$(grep -m 1 "maxplayers" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<" | tr -cd '[:digit:]') + ase=$(grep -m 1 "ase" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<" | tr -cd '[:digit:]') + if [ "${ase}" == "1" ]; then + ase="Enabled" + else + ase="Disabled" + fi + # configip=$(grep -m 1 "serverip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<") + # ipsetinconfig=1 + # ipinconfigvar="serverip" # Not Set - rconpassword=${rconpassword:-"NOT SET"} + port=${port:-"22003"} + httpport=${httpport:-"22005"} + ase=${ase:-"Disabled"} servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} maxplayers=${maxplayers:-"0"} fi + + # Parameters + queryport=$((port+123)) } -fn_info_config_quakelive(){ +fn_info_game_mumble(){ + if [ ! -f "${servercfgfullpath}" ]; then + port="64738" + queryport="${port}" + servername="Mumble" + else + port=$(grep "port" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^;/d' -e 's/port//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + queryport="${port}" + + configip=$(grep "host=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^;/d' -e 's/host=//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + ipsetinconfig=1 + ipinconfigvar="voice_ip" + + # Not Set + port=${port:-"64738"} + queryport=${queryport:-"64738"} + servername="Mumble Port ${port}" + fi +} + +fn_info_game_onset(){ if [ ! -f "${servercfgfullpath}" ]; then - rconpassword="${unavailable}" servername="${unavailable}" - serverpassword="${unavailable}" maxplayers="${zero}" port="${zero}" + httpport="${zero}" queryport="${zero}" - rconport="${zero}" - statsport="${zero}" else - rconpassword=$(grep "zmq_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set zmq_rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "sv_maxClients" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - port=$(grep "net_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - queryport="${port}" - rconport=$(grep "zmq_rcon_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - statsport=$(grep "zmq_stats_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - - configip=$(grep "set net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set net_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - ipsetinconfig=1 - ipinconfigvar="set net_ip" + servername=$(grep -v "servername_short" "${servercfgfullpath}" | grep "servername" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/servername//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' ) + maxplayers=$(grep "maxplayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + port=$(grep "port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + httpport=$((port-2)) + queryport=$((port-1)) # Not Set - rconpassword=${rconpassword:-"NOT SET"} servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - queryport=${queryport:-"0"} - rconport=${rconport:-"0"} - statsport=${statsport:-"0"} + maxplayers=${maxplayers:-"NOT SET"} + port=${port:-"NOT SET"} + httpport=${httpport:-"NOT SET"} + queryport=${queryport:-"NOT SET"} fi } -fn_info_config_realvirtuality(){ +fn_info_game_pc(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" - adminpassword="${unavailable}" serverpassword="${unavailable}" maxplayers="${zero}" + port="${zero}" + queryport="${zero}" + steamport="${zero}" else - servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - adminpassword=$(grep "passwordAdmin" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/passwordAdmin//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "maxPlayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + servername=$(grep "name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "password " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + port=$(grep "hostPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + queryport=$(grep "queryPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + steamport=$(grep "steamPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') # Not Set servername=${servername:-"NOT SET"} - adminpassword=${adminpassword:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"NOT SET"} + port=${port:-"NOT SET"} + queryport=${queryport:-"NOT SET"} + steamport=${steamport:-"NOT SET"} + fi +} + +fn_info_game_pstbs(){ + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + maxplayers="${unavailable}" + reservedslots="${unavailable}" + else + servername=$(grep "ServerName=" "${servercfgfullpath}" | sed -e 's/^[ \t]//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=";,:' | sed -e 's/^[ \t]//' -e 's/[ \t]*$//') + maxplayers=$(grep "MaxPlayers=" "${servercfgfullpath}" | tr -cd '[:digit:]') + reservedslots=$(grep "NumReservedSlots=" "${servercfgfullpath}" | tr -cd '[:digit:]') + fi + + if [ ! -f "${servercfgdir}/Rcon.cfg" ]; then + rconport=${unavailable} + rconpassword=${unavailable} + else + rconport=$(grep "Port=" "${servercfgdir}/Rcon.cfg" | tr -cd '[:digit:]') + rconpassword=$(grep "Password=" "${servercfgdir}/Rcon.cfg" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + fi + + rconport=${rconport:-"0"} + if [ -z "${rconpassword}" ]||[ ${#rconpassword} == 1 ]; then + rconpassword="NOT SET" + fi + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + numreservedslots=${numreservedslots:-"0"} +} + +fn_info_game_pvr(){ + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + maxplayers="${unavailable}" + else + servername=$(grep "ServerName" "${servercfgfullpath}" | awk -F '=' '{print $2}') + maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | awk -F '=' '{print $2}') + + # Not set + servername=${servername:-"NOT SET"} maxplayers=${maxplayers:-"0"} fi + + # Parameters + port=${port:-"0"} + port401=$((port+400)) + queryport=${port:-"0"} } -fn_info_config_risingworld(){ +fn_info_game_pz(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" + serverpassword="${unavailable}" rconpassword="${unavailable}" - rconport="${zero}" maxplayers="${zero}" port="${zero}" - gamemode="${unavailable}" gameworld="${unavailable}" else - servername=$(grep "server_name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/server_name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "server_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/server_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconport=$(grep "rcon_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - maxplayers=$(grep "settings_max_players" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - port=$(grep "server_port" "${servercfgfullpath}" | grep -v "database_mysql_server_port" | grep -v "#" | tr -cd '[:digit:]') - gamemode=$(grep "gamemode" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - gameworld=$(grep "server_world_name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/server_world_name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - javaram=$(grep "server_memory" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/server_memory//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - configip=$(grep "server_ip" "${servercfgfullpath}" | grep -v "database_mysql_server_ip" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/server_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - ipsetinconfig=1 - ipinconfigvar="server-ip" + servername=$(grep "PublicName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/PublicName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "Password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^Password" | sed -e '/^#/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + rconpassword=$(grep "RCONPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/RCONPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + port=$(grep "DefaultPort" "${servercfgfullpath}" | tr -cd '[:digit:]') + gameworld=$(grep "Map" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^Map" | sed -e '/^#/d' -e 's/Map//g' | tr -d '=\";' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') # Not Set servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} rconpassword=${rconpassword:-"NOT SET"} - rconport=${rconport:-"NOT SET"} maxplayers=${maxplayers:-"NOT SET"} port=${port:-"NOT SET"} - gamemode=${gamemode:-"NOT SET"} gameworld=${gameworld:-"NOT SET"} fi + + # Parameters + adminpassword=${adminpassword:-"NOT SET"} + queryport=${port:-"0"} } -fn_info_config_rtcw(){ +fn_info_game_q2(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then rconpassword="${unavailable}" servername="${unavailable}" serverpassword="${unavailable}" maxplayers="${zero}" else - rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') # Not Set rconpassword=${rconpassword:-"NOT SET"} servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} maxplayers=${maxplayers:-"0"} fi + + # Parameters + port=${port:-"0"} + queryport=${port:-"0"} + defaultmap=${defaultmap:-"NOT SET"} } -#StickyBots -fn_info_config_sbots(){ +fn_info_game_q3(){ if [ ! -f "${servercfgfullpath}" ]; then + rconpassword="${unavailable}" servername="${unavailable}" - maxplayers="${unavailable}" + serverpassword="${unavailable}" + maxplayers="${zero}" else - servername=$(grep "ServerName=" "${servercfgfullpath}" | sed -e 's/^[ \t]//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=";,:' | sed -e 's/^[ \t]//' -e 's/[ \t]*$//') - maxplayers=$(grep "MaxPlayers=" "${servercfgfullpath}" | tr -cd '[:digit:]') - fi + rconpassword=$(grep "zmq_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set zmq_rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} + # Not Set + rconpassword=${rconpassword:-"NOT SET"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + fi } -fn_info_config_sof2(){ +fn_info_game_ql(){ if [ ! -f "${servercfgfullpath}" ]; then rconpassword="${unavailable}" servername="${unavailable}" serverpassword="${unavailable}" maxplayers="${zero}" + port="${zero}" + queryport="${zero}" + rconport="${zero}" + statsport="${zero}" else - rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + rconpassword=$(grep "zmq_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set zmq_rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') serverpassword=$(grep "g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + maxplayers=$(grep "sv_maxClients" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + port=$(grep "net_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + queryport="${port}" + rconport=$(grep "zmq_rcon_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + statsport=$(grep "zmq_stats_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + + configip=$(grep "set net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set net_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + ipsetinconfig=1 + ipinconfigvar="set net_ip" # Not Set rconpassword=${rconpassword:-"NOT SET"} servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + queryport=${queryport:-"0"} + rconport=${rconport:-"0"} + statsport=${statsport:-"0"} fi } -fn_info_config_source(){ +fn_info_game_qw(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then + rconpassword="${unavailable}" servername="${unavailable}" serverpassword="${unavailable}" - rconpassword="${unavailable}" + maxplayers="${zero}" + port="${zero}" else - servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "sv_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/sv_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "/") + servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "/") + maxplayers=$(grep "maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') # Not Set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} rconpassword=${rconpassword:-"NOT SET"} + servername=${servername:-"NOT SET"} + maxplayers=${maxplayers:-"0"} fi + + # Parameters + port=${port:-"0"} + queryport=${port:-"0"} } -fn_info_config_starbound(){ +fn_info_game_ro(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" - queryenabled="${unavailable}" - rconenabled="${unavailable}" - rconpassword="${unavailable}" - port="21025" - queryport="21025" - rconport="21026" - maxplayers="8" + serverpassword="${unavailable}" + adminpassword="${unavailable}" + port="${zero}" + queryport="${zero}" + steamport="${zero}" + steammasterport="${zero}" + lanport="${zero}" + httpport="${zero}" + webadminenabled="${unavailable}" + webadminuser="${unavailable}" + webadminpass="${unavailable}" else - servername=$(grep "serverName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e 's/serverName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - queryenabled=$(grep "runQueryServer" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e 's/runQueryServer//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconenabled=$(grep "runRconServer" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e 's/runRconServer//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconpassword=$(grep "rconServerPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e 's/rconServerPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - port=$(grep "gameServerPort" "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport=$(grep "queryServerPort" "${servercfgfullpath}" | tr -cd '[:digit:]') - rconport=$(grep "rconServerPort" "${servercfgfullpath}" | tr -cd '[:digit:]') - maxplayers=$(grep "maxPlayers" "${servercfgfullpath}" | tr -cd '[:digit:]') + servername=$(sed -nr 's/^ServerName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + serverpassword=$(sed -nr 's/^GamePassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + adminpassword=$(sed -nr 's/^AdminPassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + port=$(sed -nr 's/^Port=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') + queryport=$((port+1)) + steamport="20610" + steammasterport="28902" + lanport=$(grep "LANServerPort=" "${servercfgfullpath}" | tr -cd '[:digit:]') + httpport=$(sed -nr 's/^ListenPort=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') + webadminenabled=$(sed -nr 's/^bEnabled=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + webadminuser=$(sed -nr 's/^AdminName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + webadminpass="${adminpassword}" # Not Set servername=${servername:-"NOT SET"} - queryenabled=${queryenabled:-"NOT SET"} - rconenabled=${rconenabled:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} - port=${port:-"21025"} - queryport=${queryport:-"21025"} - rconport=${rconport:-"21026"} - maxplayers=${maxplayers:-"8"} + serverpassword=${serverpassword:-"NOT SET"} + adminpassword=${adminpassword:-"NOT SET"} + port=${port:-"0"} + queryport=${queryport:-"0"} + steamport=${steamport:-"0"} + steammasterport=${steammasterport:-"0"} + lanport=${lanport:-"0"} + httpport=${httpport:-"0"} + webadminenabled=${webadminenabled:-"NOT SET"} + webadminuser=${webadminuser:-"NOT SET"} + webadminpass=${webadminpass:-"NOT SET"} fi } -fn_info_config_teamspeak3(){ +fn_info_game_rtcw(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then - dbplugin="${unavailable}" - port="9987" - queryport="10011" - fileport="30033" + rconpassword="${unavailable}" + servername="${unavailable}" + serverpassword="${unavailable}" + maxplayers="${zero}" else - dbplugin=$(grep "dbplugin=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/dbplugin=//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - port=$(grep "default_voice_port" "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport=$(grep "query_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - fileport=$(grep "filetransfer_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - - configip=$(grep "voice_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/voice_ip//g' | sed 's/,.*//' | tr -d '=\";,' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - ipsetinconfig=1 - ipinconfigvar="voice_ip" + rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') # Not Set - port=${port:-"9987"} - queryport=${queryport:-"10011"} - fileport=${fileport:-"30033"} + rconpassword=${rconpassword:-"NOT SET"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} fi + + # Parameters + port=${port:-"0"} + queryport=${port:-"0"} + defaultmap=${defaultmap:-"NOT SET"} +} + +fn_info_game_rust(){ + # Parameters + servername=${servername:-"NOT SET"} + port=${port:-"0"} + queryport=${port:-"0"} + appport=${appport:-"0"} + rconport=${rconport:-"0"} + gamemode=${gamemode:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + rconpassword=${rconpassword:-"NOT SET"} + rconweb=${rconweb:-"NOT SET"} + tickrate=${tickrate:-"0"} + saveinterval=${saveinterval:-"0"} + serverlevel=${serverlevel:-"NOT SET"} + worldsize=${worldsize:-"0"} } -fn_info_config_mumble(){ +fn_info_game_rw(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then - port="64738" - queryport="${port}" - servername="Mumble" + servername="${unavailable}" + rconpassword="${unavailable}" + rconport="${zero}" + maxplayers="${zero}" + port="${zero}" + port2="${zero}" + port3="${zero}" + port4="${zero}" + queryport="${zero}" + gamemode="${unavailable}" + gameworld="${unavailable}" else - port=$(grep "port" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^;/d' -e 's/port//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + servername=$(grep "server_name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/server_name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "server_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/server_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + rconport=$(grep "rcon_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + maxplayers=$(grep "settings_max_players" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + port=$(grep "server_port" "${servercfgfullpath}" | grep -v "database_mysql_server_port" | grep -v "#" | tr -cd '[:digit:]') + port2=$((port+1)) + port3=$((port+2)) + port4=$((port+3)) queryport="${port}" - - configip=$(grep "host=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^;/d' -e 's/host=//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + gamemode=$(grep "settings_default_gamemode=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/settings_default_gamemode//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + gameworld=$(grep "server_world_name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/server_world_name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + #javaram=$(grep "server_memory" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/server_memory//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + configip=$(grep "server_ip" "${servercfgfullpath}" | grep -v "database_mysql_server_ip" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/server_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') ipsetinconfig=1 - ipinconfigvar="voice_ip" + ipinconfigvar="server-ip" # Not Set - port=${port:-"64738"} - queryport=${queryport:-"64738"} - servername="Mumble Port ${port}" + servername=${servername:-"NOT SET"} + rconpassword=${rconpassword:-"NOT SET"} + rconport=${rconport:-"NOT SET"} + maxplayers=${maxplayers:-"NOT SET"} + port=${port:-"NOT SET"} + gamemode=${gamemode:-"NOT SET"} + gameworld=${gameworld:-"NOT SET"} fi + + # Parameters + servername=${servername:-"NOT SET"} + port=${port:-"0"} + httpqueryport=$((port-1)) } -fn_info_config_samp(){ +fn_info_game_samp(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then servername="unnamed server" serverpassword="${unavailable}" rconpassword="${unavailable}" port="7777" + rconport="${port}" maxplayers="50" else servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/^rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') port=$(grep "port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + rconport="${port}" maxplayers=$(grep "maxplayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') # Not Set servername=${servername:-"NOT SET"} rconpassword=${rconpassword:-"NOT SET"} - port=${port:-"8303"} + port=${port:-"7777"} + rconport="${port}" maxplayers=${maxplayers:-"12"} fi -} - -fn_info_config_teeworlds(){ - if [ ! -f "${servercfgfullpath}" ]; then - servername="unnamed server" - serverpassword="${unavailable}" - rconpassword="${unavailable}" - port="8303" - queryport="8303" - maxplayers="12" - else - servername=$(grep "sv_name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/^sv_name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^password" | sed -e '/^#/d' -e 's/^password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconpassword=$(grep "sv_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/^sv_rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - port=$(grep "sv_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - queryport="${port}" - maxplayers=$(grep "sv_max_clients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - - # Not Set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} - port=${port:-"8303"} - queryport=${port:-"8303"} - maxplayers=${maxplayers:-"12"} - fi -} - -fn_info_config_terraria(){ - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - port="${zero}" - gameworld="${unavailable}" - maxplayers="${zero}" - queryport="${zero}" - else - servername=$(grep "worldname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/worldname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - port=$(grep "port" "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport=${port:-"0"} - gameworld=$(grep "world=" "${servercfgfullpath}" | grep -v "//" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/world=//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "maxplayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - - # Not Set - servername=${servername:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} - gameworld=${gameworld:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi -} - -fn_info_config_towerunite(){ - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - maxplayers="${zero}" - else - servername=$(grep "ServerTitle" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/ServerTitle//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - - # Not Set - servername=${servername:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi -} -fn_info_config_unreal(){ - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - adminpassword="${unavailable}" - port="${zero}" - queryport="${zero}" - queryportgs="${zero}" - webadminenabled="${unavailable}" - webadminport="${zero}" - webadminuser="${unavailable}" - webadminpass="${unavailable}" - else - servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//') - serverpassword=$(grep "GamePassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/GamePassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//') - adminpassword=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//') - port=$(grep "Port" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^Port" | grep -v "#" | tr -cd '[:digit:]') - queryport=$((port + 1)) - queryportgs=$(grep "OldQueryPortNumber" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - webadminenabled=$(grep "bEnabled" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bEnabled//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//') - webadminport=$(grep "ListenPort" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - webadminuser=$(grep "AdminUsername" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminUsername//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//') - webadminpass=$(grep "UTServerAdmin.UTServerAdmin" "${servercfgfullpath}" -A 4 | grep "AdminPassword" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//') - # Not Set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - adminpassword=${adminpassword:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} - queryportgs=${queryportgs:-"0"} - webadminenabled=${webadminenabled:-"NOT SET"} - webadminport=${webadminport:-"0"} - webadminuser=${webadminuser:-"NOT SET"} - webadminpass=${webadminpass:-"NOT SET"} - fi + # Parameters + queryport=${port:-"0"} } -fn_info_config_unreal2(){ +fn_info_game_sb(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" - serverpassword="${unavailable}" - adminpassword="${unavailable}" - port="${zero}" - queryport="${zero}" - queryportgs="${zero}" - webadminenabled="${unavailable}" - webadminport="${zero}" - webadminuser="${unavailable}" - webadminpass="${unavailable}" + queryenabled="${unavailable}" + rconenabled="${unavailable}" + rconpassword="${unavailable}" + port="21025" + queryport="21025" + rconport="21026" + maxplayers="8" else - servername=$(sed -nr 's/^ServerName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - serverpassword=$(sed -nr 's/^GamePassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - adminpassword=$(sed -nr 's/^AdminPassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - port=$(sed -nr 's/^Port=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport=$((port + 1)) - queryportgs=$(sed -nr 's/^OldQueryPortNumber=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') - webadminenabled=$(sed -nr 's/^bEnabled=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - webadminport=$(sed -nr 's/^ListenPort=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') - webadminuser=$(sed -nr 's/^AdminName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') - webadminpass="${adminpassword}" + servername=$(grep "serverName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e 's/serverName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + queryenabled=$(grep "runQueryServer" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e 's/runQueryServer//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + rconenabled=$(grep "runRconServer" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e 's/runRconServer//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + rconpassword=$(grep "rconServerPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e 's/rconServerPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + port=$(grep "gameServerPort" "${servercfgfullpath}" | tr -cd '[:digit:]') + queryport=$(grep "queryServerPort" "${servercfgfullpath}" | tr -cd '[:digit:]') + rconport=$(grep "rconServerPort" "${servercfgfullpath}" | tr -cd '[:digit:]') + maxplayers=$(grep "maxPlayers" "${servercfgfullpath}" | tr -cd '[:digit:]') # Not Set servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - adminpassword=${adminpassword:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} - queryportgs=${queryportgs:-"0"} - webadminenabled=${webadminenabled:-"NOT SET"} - webadminport=${webadminport:-"0"} - webadminuser=${webadminuser:-"NOT SET"} - webadminpass=${webadminpass:-"NOT SET"} + queryenabled=${queryenabled:-"NOT SET"} + rconenabled=${rconenabled:-"NOT SET"} + rconpassword=${rconpassword:-"NOT SET"} + port=${port:-"21025"} + queryport=${queryport:-"21025"} + rconport=${rconport:-"21026"} + maxplayers=${maxplayers:-"8"} fi } -fn_info_config_unreal3(){ +fn_info_game_sbots(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" - serverpassword="${unavailable}" - adminpassword="${unavailable}" maxplayers="${unavailable}" - webadminenabled="${unavailable}" - webadminport="${zero}" - webadminuser="${unavailable}" - webadminpass="${unavailable}" else - servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "GamePassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/GamePassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - adminpassword=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - webadminenabled=$(grep "bEnabled" "${servercfgdir}/UTWeb.ini" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bEnabled//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - webadminport=$(grep "ListenPort" "${servercfgdir}/UTWeb.ini" | grep -v "#" | tr -cd '[:digit:]') - webadminuser="Admin" - webadminpass=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + servername=$(grep "ServerName=" "${servercfgfullpath}" | sed -e 's/^[ \t]//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=";,:' | sed -e 's/^[ \t]//' -e 's/[ \t]*$//') + maxplayers=$(grep "MaxPlayers=" "${servercfgfullpath}" | tr -cd '[:digit:]') # Not Set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} - adminpassword=${adminpassword:-"NOT SET"} - maxplayers=${maxplayers:-"NOT SET"} - webadminenabled=${webadminenabled:-"NOT SET"} - webadminport=${webadminport:-"0"} - webadminuser=${webadminuser:-"NOT SET"} - webadminpass=${webadminpass:-"NOT SET"} + maxplayers=${maxplayers:-"0"} fi -} - -fn_info_config_ut(){ - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - else - servername=$(grep "ServerName" "${servercfgfullpath}" | awk -F '=' '{print $2}') - # Not set - servername=${servername:-"NOT SET"} - fi + # Parameters + port=${port:-"0"} + queryport=${queryport:-"0"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + defaultmap=${defaultmap:-"NOT SET"} + maxplayers=${maxplayers:-"0"} } -fn_info_config_warfork(){ - if [ ! -f "${servercfgfullpath}" ]; then - rconpassword="${unavailable}" - servername="${unavailable}" - maxplayers="${zero}" - else - rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - - # Not Set - rconpassword=${rconpassword:-"NOT SET"} - servername=${servername:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - fi -} +fn_info_game_scpsl(){ + # Config + if [ -f "${servercfgfullpath}" ]; then + servername=$(sed -nr 's/^server_name: (.*)$/\1/p' "${servercfgfullpath}") + maxplayers=$(sed -nr 's/^max_players: (.*)$/\1/p' "${servercfgfullpath}") + configip=$(sed -nr 's/^ipv4_bind_ip: (.*)$/\1/p' "${servercfgfullpath}") + tickrate=$(sed -nr 's/^server_tickrate: (.*)$/\1/p' "${servercfgfullpath}") + adminpassword=$(sed -nr 's/^administrator_query_password: (.*)$/\1/p' "${servercfgfullpath}") -fn_info_config_kf2(){ - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - serverpassword="${unavailable}" - adminpassword="${unavailable}" - port="${unavailable}" - queryport="${unavailable}" - webadminenabled="${unavailable}" - webadminport="${zero}" - webadminuser="${unavailable}" - webadminpass="${unavailable}" + if [ "${adminpassword}" == "none" ]; then + adminpassword="NOT SET" + fi else - servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "GamePassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/GamePassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - adminpassword=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - port=$(grep "Port" "${servercfgdir}/LinuxServer-KFEngine.ini" | sed -e 's/^[ \t]*//g' | grep "^Port" | grep -v "#" | tr -cd '[:digit:]') - webadminenabled=$(grep "bEnabled" "${servercfgdir}/KFWeb.ini" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bEnabled//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - webadminport=$(grep "ListenPort" "${servercfgdir}/KFWeb.ini" | grep -v "#" | tr -cd '[:digit:]') - webadminuser="Admin" - webadminpass=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - # Not Set servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + configip=${configip:-"0.0.0.0"} + tickrate=${tickrate:-"NOT SET"} adminpassword=${adminpassword:-"NOT SET"} - port=${port:-"0"} - webadminenabled=${webadminenabled:-"NOT SET"} - webadminport=${webadminport:-"0"} - webadminuser=${webadminuser:-"NOT SET"} - webadminpass=${webadminpass:-"NOT SET"} fi + + # Parameters + queryport="${port:-"0"}" } -fn_info_config_sdtd(){ +fn_info_game_sdtd(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" serverpassword="${unavailable}" port="${zero}" + port3="${zero}" queryport="${zero}" webadminenabled="${unavailable}" webadminport="${zero}" @@ -1202,168 +1400,140 @@ fn_info_config_sdtd(){ servername=$(grep "ServerName" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") serverpassword=$(grep "ServerPassword" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") port=$(grep "ServerPort" "${servercfgfullpath}" | grep -Eo 'value="[0-9]+"' | tr -cd '[:digit:]') + port3=$((port+2)) queryport=${port:-"0"} - webadminenabled=$(grep "ControlPanelEnabled" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") webadminport=$(grep "ControlPanelPort" "${servercfgfullpath}" | tr -cd '[:digit:]') webadminpass=$(grep "ControlPanelPassword" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") - telnetenabled=$(grep "TelnetEnabled" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") - telnetport=$(grep "TelnetPort" "${servercfgfullpath}" | tr -cd '[:digit:]') - telnetpass=$(grep "TelnetPassword" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") - # Telnet IP will be localhost if no password is set - # check_ip will set the IP first. This will overwrite it. - if [ -z "${telnetpass}" ]; then - telnetip="127.0.0.1" - fi - maxplayers=$(grep "ServerMaxPlayerCount" "${servercfgfullpath}" | tr -cd '[:digit:]') - gamemode=$(grep "GameMode" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") - gameworld=$(grep "GameWorld" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") - - # Not Set - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} - webadminenabled=${webadminenabled:-"NOT SET"} - webadminport=${webadminport:-"0"} - webadminpass=${webadminpass:-"NOT SET"} - telnetenabled=${telnetenabled:-"NOT SET"} - telnetport=${telnetport:-"0"} - telnetpass=${telnetpass:-"NOT SET"} - maxplayers=${maxplayers:-"NOT SET"} - gamemode=${gamemode:-"NOT SET"} - gameworld=${gameworld:-"NOT SET"} - fi -} - -fn_info_config_mta(){ - if [ ! -f "${servercfgfullpath}" ]; then - configip="${zero}" - port="${unavailable}" - httpport="${unavailable}" - ase="${unavailable}" - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" - else - port=$(grep -m 1 "serverport" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<" | tr -cd '[:digit:]') - httpport=$(grep -m 1 "httpport" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<" | tr -cd '[:digit:]') - servername=$(grep -m 1 "servername" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<") - serverpassword=$(grep -m 1 "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<") - maxplayers=$(grep -m 1 "maxplayers" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<" | tr -cd '[:digit:]') - ase=$(grep -m 1 "ase" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<" | tr -cd '[:digit:]') - if [ "${ase}" == "1" ]; then - ase="Enabled" - else - ase="Disabled" + telnetenabled=$(grep "TelnetEnabled" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") + telnetport=$(grep "TelnetPort" "${servercfgfullpath}" | tr -cd '[:digit:]') + telnetpass=$(grep "TelnetPassword" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") + # Telnet IP will be localhost if no password is set + # check_ip will set the IP first. This will overwrite it. + if [ -z "${telnetpass}" ]; then + telnetip="127.0.0.1" fi - # configip=$(grep -m 1 "serverip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<") - # ipsetinconfig=1 - # ipinconfigvar="serverip" + maxplayers=$(grep "ServerMaxPlayerCount" "${servercfgfullpath}" | tr -cd '[:digit:]') + gamemode=$(grep "GameMode" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") + gameworld=$(grep "GameWorld" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") # Not Set - port=${port:-"22003"} - httpport=${httpport:-"22005"} - ase=${ase:-"Disabled"} servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + queryport=${queryport:-"0"} + webadminenabled=${webadminenabled:-"NOT SET"} + webadminport=${webadminport:-"0"} + webadminpass=${webadminpass:-"NOT SET"} + telnetenabled=${telnetenabled:-"NOT SET"} + telnetport=${telnetport:-"0"} + telnetpass=${telnetpass:-"NOT SET"} + maxplayers=${maxplayers:-"NOT SET"} + gamemode=${gamemode:-"NOT SET"} + gameworld=${gameworld:-"NOT SET"} fi } -fn_info_config_wolfensteinenemyterritory(){ +fn_info_game_sof2(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then rconpassword="${unavailable}" servername="${unavailable}" serverpassword="${unavailable}" maxplayers="${zero}" - port="${zero}" - queryport="${zero}" else - port=$(grep "set net_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - queryport="${port}" - rconpassword=$(grep "set zmq_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set zmq_rcon_password //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//g' -e '/^\//d' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - servername=$(grep "set sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "set g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "set sv_maxclients" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - - configip=$(grep "set net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set net_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - ipsetinconfig=1 - ipinconfigvar="set net_ip" + rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') # Not Set rconpassword=${rconpassword:-"NOT SET"} servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} maxplayers=${maxplayers:-"0"} - port=${port:-"27960"} - queryport=${queryport:-"27960"} fi + + # Parameters + port=${port:-"0"} + queryport=${port:-"0"} + defaultmap=${defaultmap:-"NOT SET"} } -fn_info_config_etlegacy(){ +fn_info_game_sol(){ if [ ! -f "${servercfgfullpath}" ]; then - rconpassword="${unavailable}" - servername="${unavailable}" - serverpassword="${unavailable}" - maxplayers="${zero}" + adminpassword="${unavailable}" + maxplayers="${unavailable}" port="${zero}" queryport="${zero}" + servername="${unavailable}" + serverpassword="${unavailable}" else - port=$(grep "set net_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + adminpassword=$(grep "Admin_Password=" "${servercfgfullpath}" | awk -F '=' '{print $2}') + maxplayers=$(grep "Max_Players=" "${servercfgfullpath}" | tr -cd '[:digit:]') + port=$(grep "Port=" "${servercfgfullpath}" | tr -cd '[:digit:]') queryport="${port}" - rconpassword=$(grep "set rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//g' -e '/^\//d' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - servername=$(grep "set sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "set g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "set sv_maxclients" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - - configip=$(grep "set net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set net_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - ipsetinconfig=1 - ipinconfigvar="set net_ip" + filesport=$((port+10)) + servername=$(grep "Server_Name=" "${servercfgfullpath}" | awk -F '=' '{print $2}') + serverpassword=$(grep "Game_Password=" "${servercfgfullpath}" | awk -F '=' '{print $2}') - # Not Set - rconpassword=${rconpassword:-"NOT SET"} + # Not set + adminpassword=${adminpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"23073"} + queryport=${queryport:-"23083"} servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"27960"} - queryport=${queryport:-"27960"} fi } -fn_info_config_wurmunlimited(){ +fn_info_game_source(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then - port="${zero}" - queryport="${zero}" - rconpassword="${unavailable}" servername="${unavailable}" serverpassword="${unavailable}" - adminpassword="${unavailable}" - maxplayers="${zero}" + rconpassword="${unavailable}" else - - port=$(grep "EXTERNALPORT=" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - queryport=$(grep "QUERYPORT=" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - servername=$(grep "SERVERNAME=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/SERVERNAME//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "SERVERPASSWORD=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/SERVERPASSWORD//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - adminpassword=$(grep "ADMINPWD=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/ADMINPWD//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "MAXPLAYERS=" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - - configip=$(grep "IP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/IP//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - ipsetinconfig=1 - ipinconfigvar="IP" + servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "sv_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/sv_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') # Not Set - port=${port:-"3724"} - queryport=${queryport:-"27017"} servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} - adminpassword=${adminpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} + rconpassword=${rconpassword:-"NOT SET"} fi + + # Parameters + defaultmap=${defaultmap:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + rconport=${port:-"0"} + queryport=${port:-"0"} + clientport=${clientport:-"0"} + # Steamport can be between 26901-26910 and is normaly automaticly set. + # Some servers might support -steamport parameter to set + if [ "${steamport}" == "0" ]||[ -z "${steamport}" ]; then + steamport="$(echo "${ssinfo}" | grep "${srcdslinuxpid}" | awk '{print $5}' | grep ":269" | cut -d ":" -f2)" + fi + steamport="${steamport:-"0"}" +} + +fn_info_game_spark(){ + defaultmap=${defaultmap:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + queryport=$((port+1)) + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + webadminuser=${webadminuser:-"NOT SET"} + webadminpass=${webadminpass:-"NOT SET"} + webadminport=${webadminport:-"0"} + # Commented out as displaying not set in details parameters + #mods=${mods:-"NOT SET"} } -fn_info_config_squad(){ +fn_info_game_squad(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" maxplayers="${unavailable}" @@ -1389,7 +1559,8 @@ fn_info_config_squad(){ maxplayers=${maxplayers:-"0"} } -fn_info_config_stationeers(){ +fn_info_game_st(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" serverpassword="${unavailable}" @@ -1407,165 +1578,379 @@ fn_info_config_stationeers(){ rconpassword=${rconpassword:-"NOT SET"} maxplayers=${maxplayers:-"0"} fi + + # Parameters + port=${port:-"0"} + queryport=${queryport:-"0"} + httpport=${port:-"0"} + worldtype=${worldtype:-"NOT SET"} + autosaveinterval=${autosaveinterval:-"0"} + clearinterval=${clearinterval:-"0"} + worldname=${worldname:-"NOT SET"} +} +fn_info_game_terraria(){ + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + port="${zero}" + gameworld="${unavailable}" + maxplayers="${zero}" + queryport="${zero}" + else + servername=$(grep "worldname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/worldname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + port=$(grep "port" "${servercfgfullpath}" | tr -cd '[:digit:]') + queryport=${port:-"0"} + gameworld=$(grep "world=" "${servercfgfullpath}" | grep -v "//" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/world=//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "maxplayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + + # Not Set + servername=${servername:-"NOT SET"} + port=${port:-"0"} + queryport=${queryport:-"0"} + gameworld=${gameworld:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + fi +} + +fn_info_game_ts3(){ + if [ ! -f "${servercfgfullpath}" ]; then + dbplugin="${unavailable}" + port="9987" + queryport="10011" + querysshport="10022" + queryhttpport="10080" + queryhttpsport="10443" + fileport="30033" + telnetport="10011" + else + dbplugin=$(grep "dbplugin=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/dbplugin=//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + port=$(grep "default_voice_port" "${servercfgfullpath}" | tr -cd '[:digit:]') + queryport=$(grep "query_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + querysshport=$(grep "query_ssh_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + queryhttpport=$(grep "query_http_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + queryhttpsport=$(grep "query_https_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + fileport=$(grep "filetransfer_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + telnetport="${queryport}" + + configip=$(grep "voice_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/voice_ip//g' | sed 's/,.*//' | tr -d '=\";,' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + ipsetinconfig=1 + ipinconfigvar="voice_ip" + + # Not Set + dbplugin=${dbplugin:-"NOT SET"} + port=${port:-"9987"} + queryport=${queryport:-"10011"} + querysshport=${querysshport:-"10022"} + queryhttpport=${queryhttpport:-"10080"} + queryhttpsport=${queryhttpsport:-"10443"} + fileport=${fileport:-"30033"} + telnetport=${telnetport:-"10011"} + fi } -fn_info_config_mordhau(){ +fn_info_game_tu(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" + maxplayers="${zero}" + else + servername=$(grep "ServerTitle" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/ServerTitle//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + + # Not Set + servername=${servername:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + fi + + # Parameters + port=${port:-"0"} + steamport=$((port+1)) + queryport=${queryport:-"0"} +} + +fn_info_game_tw(){ + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="unnamed server" serverpassword="${unavailable}" rconpassword="${unavailable}" - maxplayers="${unavailable}" + port="8303" + queryport="8303" + maxplayers="12" else - servername=$(grep "ServerName" "${servercfgfullpath}" | awk -F '=' '{print $2}') - serverpassword=$(grep "ServerPassword" "${servercfgfullpath}" | awk -F '=' '{print $2}') - rconpassword=$(grep "AdminPassword" "${servercfgfullpath}" | awk -F '=' '{print $2}') - maxplayers=$(grep "MaxSlots" "${servercfgfullpath}" | awk -F '=' '{print $2}') + servername=$(grep "sv_name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/^sv_name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^password" | sed -e '/^#/d' -e 's/^password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + rconpassword=$(grep "sv_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/^sv_rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + port=$(grep "sv_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + queryport="${port}" + maxplayers=$(grep "sv_max_clients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - # Not set + # Not Set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} rconpassword=${rconpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} + port=${port:-"8303"} + queryport=${port:-"8303"} + maxplayers=${maxplayers:-"12"} + fi + + # Parameters + queryport="${port:-"0"}" +} + +fn_info_game_unreal(){ + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + adminpassword="${unavailable}" + port="${zero}" + queryport="${zero}" + queryportgs="${zero}" + webadminenabled="${unavailable}" + webadminport="${zero}" + webadminuser="${unavailable}" + webadminpass="${unavailable}" + else + servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//') + serverpassword=$(grep "GamePassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/GamePassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//') + adminpassword=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//') + port=$(grep "Port" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^Port" | grep -v "#" | tr -cd '[:digit:]') + queryport=$((port+1)) + queryportgs=$(grep "OldQueryPortNumber" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + beaconport=$(grep "ServerBeaconPort" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + webadminenabled=$(grep "bEnabled" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bEnabled//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//') + httpport=$(grep "ListenPort" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + webadminuser=$(grep "AdminUsername" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminUsername//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//') + webadminpass=$(grep "UTServerAdmin.UTServerAdmin" "${servercfgfullpath}" -A 4 | grep "AdminPassword" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//') + + # Not Set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + adminpassword=${adminpassword:-"NOT SET"} + port=${port:-"0"} + queryport=${queryport:-"0"} + beaconport=${beaconport:-"8777"} + queryportgs=${queryportgs:-"0"} + webadminenabled=${webadminenabled:-"NOT SET"} + webadminport=${webadminport:-"0"} + webadminuser=${webadminuser:-"NOT SET"} + webadminpass=${webadminpass:-"NOT SET"} + fi + + # Parameters + defaultmap=${defaultmap:-"NOT SET"} +} + +fn_info_game_unreal2(){ + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + adminpassword="${unavailable}" + port="${zero}" + queryport="${zero}" + queryportgs="${zero}" + webadminenabled="${unavailable}" + webadminport="${zero}" + webadminuser="${unavailable}" + webadminpass="${unavailable}" + else + servername=$(sed -nr 's/^ServerName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + serverpassword=$(sed -nr 's/^GamePassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + adminpassword=$(sed -nr 's/^AdminPassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + port=$(sed -nr 's/^Port=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') + queryport=$((port+1)) + queryportgs=$(sed -nr 's/^OldQueryPortNumber=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') + webadminenabled=$(sed -nr 's/^bEnabled=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + webadminport=$(sed -nr 's/^ListenPort=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') + webadminuser=$(sed -nr 's/^AdminName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + webadminpass="${adminpassword}" + + # Not Set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + adminpassword=${adminpassword:-"NOT SET"} + port=${port:-"0"} + queryport=${queryport:-"0"} + queryportgs=${queryportgs:-"0"} + webadminenabled=${webadminenabled:-"NOT SET"} + webadminport=${webadminport:-"0"} + webadminuser=${webadminuser:-"NOT SET"} + webadminpass=${webadminpass:-"NOT SET"} fi + + # Parameters + defaultmap=${defaultmap:-"NOT SET"} } +fn_info_game_unt(){ + servername=${selfname:-"NOT SET"} + port=${port:-"0"} + queryport=$((port+1)) +} -fn_info_config_avorion() { +fn_info_game_ut(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then - maxplayers="${unavailable}" servername="${unavailable}" - serverpassword="${unavailable}" - rconpassword="${unavailable}" - rconport="${unavailable}" - rconenabled="${unavailable}" - queryport="${unavailable}" else - maxplayers=$(grep "maxPlayers=" "${servercfgfullpath}" | sed 's/maxPlayers=//') - servername=$(grep "name=" "${servercfgfullpath}" | sed 's/name=//') - serverpassword=$(grep "password=" "${servercfgfullpath}" | sed 's/password=//') - rconpassword=$(grep "rconPassword=" "${servercfgfullpath}" | sed 's/rconPassword=//') - rconport=$(grep "rconPort=" "${servercfgfullpath}" | sed 's/rconPort=//') - if [ -n "${rconpassword}" ]; then - rconenabled="true" - queryport="${rconport}" - fi + servername=$(grep "ServerName" "${servercfgfullpath}" | awk -F '=' '{print $2}') # Not set - maxplayers=${maxplayers:-"NOT SET"} servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} - rconport=${rconport:-"0"} - rconenabled=${rconenabled:-"false"} - queryport=${queryport:-"0"} fi + + # Parameters + port=${port:-"0"} + queryport=$((port+1)) } -fn_info_config_soldat(){ +fn_info_game_ut2k4(){ if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" adminpassword="${unavailable}" - maxplayers="${unavailable}" port="${zero}" queryport="${zero}" - servername="${unavailable}" - serverpassword="${unavailable}" + queryportgs="${zero}" + lanport="${zero}" + webadminenabled="${unavailable}" + httpport="${zero}" + webadminuser="${unavailable}" + webadminpass="${unavailable}" else - adminpassword=$(grep "Admin_Password=" "${servercfgfullpath}" | awk -F '=' '{print $2}') - maxplayers=$(grep "Max_Players=" "${servercfgfullpath}" | tr -cd '[:digit:]') - port=$(grep "Port=" "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport="${port}" - servername=$(grep "Server_Name=" "${servercfgfullpath}" | awk -F '=' '{print $2}') - serverpassword=$(grep "Game_Password=" "${servercfgfullpath}" | awk -F '=' '{print $2}') + servername=$(sed -nr 's/^ServerName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + serverpassword=$(sed -nr 's/^GamePassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + adminpassword=$(sed -nr 's/^AdminPassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + port=$(sed -nr 's/^Port=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') + queryport=$((port+1)) + queryportgs=$(sed -nr 's/^OldQueryPortNumber=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') + lanport=$(grep "LANServerPort=" "${servercfgfullpath}" | tr -cd '[:digit:]') + webadminenabled=$(sed -nr 's/^bEnabled=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + httpport=$(sed -nr 's/^ListenPort=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') + webadminuser=$(sed -nr 's/^AdminName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + webadminpass="${adminpassword}" - # Not set - adminpassword=${adminpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"23073"} - queryport=${queryport:-"23083"} + # Not Set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} + adminpassword=${adminpassword:-"NOT SET"} + port=${port:-"0"} + queryport=${queryport:-"0"} + queryportgs=${queryportgs:-"0"} + lanport=${lanport:-"0"} + webadminenabled=${webadminenabled:-"NOT SET"} + httpport=${httpport:-"0"} + webadminuser=${webadminuser:-"NOT SET"} + webadminpass=${webadminpass:-"NOT SET"} fi } -fn_info_config_pavlovvr(){ +fn_info_game_ut3(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" + serverpassword="${unavailable}" + adminpassword="${unavailable}" maxplayers="${unavailable}" + webadminenabled="${unavailable}" + webadminport="${zero}" + webadminuser="${unavailable}" + webadminpass="${unavailable}" else - servername=$(grep "ServerName" "${servercfgfullpath}" | awk -F '=' '{print $2}') - maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | awk -F '=' '{print $2}') + servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "GamePassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/GamePassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + adminpassword=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + webadminenabled=$(grep "bEnabled" "${servercfgdir}/UTWeb.ini" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bEnabled//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + webadminport=$(grep "ListenPort" "${servercfgdir}/UTWeb.ini" | grep -v "#" | tr -cd '[:digit:]') + webadminuser="Admin" + webadminpass=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - # Not set + # Not Set servername=${servername:-"NOT SET"} - maxplayers=${maxplayers:-"0"} + serverpassword=${serverpassword:-"NOT SET"} + adminpassword=${adminpassword:-"NOT SET"} + maxplayers=${maxplayers:-"NOT SET"} + webadminenabled=${webadminenabled:-"NOT SET"} + webadminport=${webadminport:-"0"} + webadminuser=${webadminuser:-"NOT SET"} + webadminpass=${webadminpass:-"NOT SET"} fi -} -fn_info_config_col(){ - if [ -f "${servercfgfullpath}" ]; then - servername=$(jq -r '.ServerSettings.ServerName' "${servercfgfullpath}") - serverpassword=$(jq -r '.ServerSettings.ServerPassword' "${servercfgfullpath}") - maxplayers=$(jq -r '.ServerSettings.MaxPlayerCount' "${servercfgfullpath}") - port=$(jq -r '.ServerSettings.ServerGamePort' "${servercfgfullpath}") - steamport=$(jq -r '.ServerSettings.ServerSteamPort' "${servercfgfullpath}") - rconpassword=$(jq -r '.ServerSettings.RCONPassword' "${servercfgfullpath}") - configip=$(jq -r '.ServerSettings.ServerIP' "${servercfgfullpath}") + # Parameters + port=${port:-"0"} + queryport=${queryport:-"0"} + defaultmap=${defaultmap:-"NOT SET"} +} - # password not set - serverpassword=${serverpassword:-"NOT SET"} - queryport=${port:-"0"} +fn_info_game_vh(){ + port=${port:-"0"} + if [ "${public}" != "0" ]; then + queryport=$((port+1)) else - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"27004"} - steamport=${steamport:-"27005"} - rconpassword=${rconpassword:-"NOT SET"} + querymode="1" fi + gameworld=${gameworld:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + servername=${servername:-"NOT SET"} } -fn_info_config_vintagestory(){ +fn_info_game_wet(){ if [ ! -f "${servercfgfullpath}" ]; then + rconpassword="${unavailable}" servername="${unavailable}" - maxplayers="${unavailable}" serverpassword="${unavailable}" - port="${unavailable}" - queryport="${unavailable}" - configip="${unavailable}" + maxplayers="${zero}" + port="${zero}" + queryport="${zero}" else - servername=$(jq -r '.ServerName' "${servercfgfullpath}") - maxplayers=$(jq -r '.MaxClients' "${servercfgfullpath}") - serverpassword=$(jq -r 'select(.Password != null) | .Password' "${servercfgfullpath}") - port=$(jq -r '.Port' "${servercfgfullpath}") - queryport=${port:-"0"} - configip=$(jq -r 'select(.Ip != null) | .Ip' "${servercfgfullpath}") + port=$(grep "set net_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + queryport="${port}" + rconpassword=$(grep "set zmq_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set zmq_rcon_password //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//g' -e '/^\//d' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + servername=$(grep "set sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "set g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "set sv_maxclients" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + + configip=$(grep "set net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set net_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + ipsetinconfig=1 + ipinconfigvar="set net_ip" + # Not Set + rconpassword=${rconpassword:-"NOT SET"} + servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} - configip=${configip:-"0.0.0.0"} + maxplayers=${maxplayers:-"0"} + port=${port:-"27960"} + queryport=${queryport:-"27960"} fi } -fn_info_config_scpsl(){ - if [ -f "${servercfgfullpath}" ]; then - servername=$(sed -nr 's/^server_name: (.*)$/\1/p' "${servercfgfullpath}") - maxplayers=$(sed -nr 's/^max_players: (.*)$/\1/p' "${servercfgfullpath}") - configip=$(sed -nr 's/^ipv4_bind_ip: (.*)$/\1/p' "${servercfgfullpath}") - tickrate=$(sed -nr 's/^server_tickrate: (.*)$/\1/p' "${servercfgfullpath}") - adminpassword=$(sed -nr 's/^administrator_query_password: (.*)$/\1/p' "${servercfgfullpath}") - - if [ "${adminpassword}" == "none" ]; then - adminpassword="NOT SET" - fi +fn_info_game_wf(){ + # Config + if [ ! -f "${servercfgfullpath}" ]; then + rconpassword="${unavailable}" + servername="${unavailable}" + maxplayers="${zero}" else + rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + + # Not Set + rconpassword=${rconpassword:-"NOT SET"} servername=${servername:-"NOT SET"} maxplayers=${maxplayers:-"0"} - configip=${configip:-"0.0.0.0"} - tickrate=${tickrate:-"NOT SET"} - adminpassword=${adminpassword:-"NOT SET"} fi + + # Parameters + port=${port:-"0"} + queryport="${port:-"0"}" + webadminport=${webadminport:-"0"} } -fn_info_config_waterfall(){ + +fn_info_game_wmc(){ if [ -f "${servercfgfullpath}" ]; then servername=$(sed -e '/^listeners:/,/^[a-z]/!d' "${servercfgfullpath}" | sed -nr 's/^[ ]+motd: (.*)$/\1/p' | tr -d "'" | sed 's/&1//') queryport=$(sed -nr 's/^[ -]+query_port: ([0-9]+)/\1/p' "${servercfgfullpath}") @@ -1587,132 +1972,183 @@ fn_info_config_waterfall(){ fi } +fn_info_game_wurm(){ + if [ ! -f "${servercfgfullpath}" ]; then + port="${zero}" + queryport="${zero}" + rconpassword="${unavailable}" + servername="${unavailable}" + serverpassword="${unavailable}" + adminpassword="${unavailable}" + maxplayers="${zero}" + else + + port=$(grep "EXTERNALPORT=" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + queryport=$(grep "QUERYPORT=" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + servername=$(grep "SERVERNAME=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/SERVERNAME//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "SERVERPASSWORD=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/SERVERPASSWORD//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + adminpassword=$(grep "ADMINPWD=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/ADMINPWD//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "MAXPLAYERS=" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + + configip=$(grep "IP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/IP//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + ipsetinconfig=1 + ipinconfigvar="IP" + + # Not Set + port=${port:-"3724"} + queryport=${queryport:-"27017"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + adminpassword=${adminpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + fi +} + +unavailable="${red}UNAVAILABLE${default}" +zero="${red}0${default}" + if [ "${shortname}" == "ac" ]; then - fn_info_config_assettocorsa + fn_info_game_ac elif [ "${shortname}" == "ark" ]; then - fn_info_config_ark + fn_info_game_ark +elif [ "${shortname}" == "arma3" ]; then + fn_info_game_arma3 elif [ "${shortname}" == "av" ]; then - fn_info_config_avorion + fn_info_game_av +elif [ "${shortname}" == "bf1942" ]; then + fn_info_game_bf1942 +elif [ "${shortname}" == "bfv" ]; then + fn_info_game_bfv elif [ "${shortname}" == "bo" ]; then - fn_info_config_ballistic_overkill + fn_info_game_bo elif [ "${shortname}" == "bt" ]; then - fn_info_config_barotrauma + fn_info_game_bt elif [ "${shortname}" == "bt1944" ]; then - fn_info_config_battalion1944 -elif [ "${shortname}" == "bf1942" ]; then - fn_info_config_bf1942 -elif [ "${shortname}" == "bfv" ]; then - fn_info_config_bfv + fn_info_game_bt1944 elif [ "${shortname}" == "cmw" ]; then - fn_info_config_chivalry + fn_info_game_cmw elif [ "${shortname}" == "cod" ]||[ "${shortname}" == "coduo" ]; then - fn_info_config_cod + fn_info_game_cod elif [ "${shortname}" == "cod2" ]; then - fn_info_config_cod2 + fn_info_game_cod2 elif [ "${shortname}" == "cod4" ]; then - fn_info_config_cod4 + fn_info_game_cod4 elif [ "${shortname}" == "codwaw" ]; then - fn_info_config_codwaw + fn_info_game_codwaw elif [ "${shortname}" == "col" ]; then - fn_info_config_col + fn_info_game_col elif [ "${shortname}" == "dst" ]; then - fn_info_config_dontstarve + fn_info_game_dst elif [ "${shortname}" == "eco" ]; then - fn_info_config_eco + fn_info_game_eco +elif [ "${shortname}" == "etl" ]; then + fn_info_game_etl elif [ "${shortname}" == "fctr" ]; then - fn_info_config_factorio + fn_info_game_fctr +elif [ "${shortname}" == "hw" ]; then + fn_info_game_hw +elif [ "${shortname}" == "inss" ]; then + fn_info_game_inss elif [ "${shortname}" == "jc2" ]; then - fn_info_config_justcause2 + fn_info_game_jc2 elif [ "${shortname}" == "jc3" ]; then - fn_info_config_justcause3 -elif [ "${shortname}" == "kf2" ]; then - fn_info_config_kf2 -elif [ "${shortname}" == "mohaa" ]; then - fn_info_config_mohaa -elif [ "${shortname}" == "mofm" ]; then - fn_info_config_mofm -elif [ "${shortname}" == "qw" ]; then - fn_info_config_quakeworld -elif [ "${shortname}" == "q2" ]; then - fn_info_config_quake2 -elif [ "${shortname}" == "q3" ]; then - fn_info_config_quake3 -elif [ "${shortname}" == "ql" ]; then - fn_info_config_quakelive + fn_info_game_jc3 elif [ "${shortname}" == "jk2" ]; then - fn_info_config_jk2 + fn_info_game_jk2 +elif [ "${shortname}" == "kf" ]; then + fn_info_game_kf +elif [ "${shortname}" == "kf2" ]; then + fn_info_game_kf2 elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "pmc" ]; then - fn_info_config_minecraft + fn_info_game_mc elif [ "${shortname}" == "mcb" ]; then - fn_info_config_minecraft_bedrock + fn_info_game_mcb +elif [ "${shortname}" == "mh" ]; then + fn_info_game_mh +elif [ "${shortname}" == "mohaa" ]; then + fn_info_game_mohaa +elif [ "${shortname}" == "mom" ]; then + fn_info_game_mom +elif [ "${shortname}" == "mta" ]; then + fn_info_game_mta +elif [ "${shortname}" == "mumble" ]; then + fn_info_game_mumble elif [ "${shortname}" == "onset" ]; then - fn_info_config_onset -elif [ "${shortname}" == "pstbs" ]; then - fn_info_config_pstbs + fn_info_game_onset elif [ "${shortname}" == "pc" ]; then - fn_info_config_projectcars + fn_info_game_pc +elif [ "${shortname}" == "pstbs" ]; then + fn_info_game_pstbs +elif [ "${shortname}" == "pvr" ];then + fn_info_game_pvr elif [ "${shortname}" == "pz" ]; then - fn_info_config_projectzomboid -elif [ "${shortname}" == "arma3" ]; then - fn_info_config_realvirtuality + fn_info_game_pz +elif [ "${shortname}" == "q2" ]; then + fn_info_game_q2 +elif [ "${shortname}" == "q3" ]; then + fn_info_game_q3 +elif [ "${shortname}" == "ql" ]; then + fn_info_game_ql +elif [ "${shortname}" == "qw" ]; then + fn_info_game_qw +elif [ "${shortname}" == "ro" ]; then + fn_info_game_ro elif [ "${shortname}" == "rtcw" ]; then - fn_info_config_rtcw + fn_info_game_rtcw +elif [ "${shortname}" == "rust" ]; then + fn_info_game_rust elif [ "${shortname}" == "rw" ]; then - fn_info_config_risingworld -elif [ "${shortname}" == "sol" ]; then - fn_info_config_soldat -elif [ "${shortname}" == "sof2" ]; then - fn_info_config_sof2 -elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsrc" ]; then - fn_info_config_source -elif [ "${shortname}" == "sb" ]; then - fn_info_config_starbound -elif [ "${shortname}" == "ts3" ]; then - fn_info_config_teamspeak3 -elif [ "${shortname}" == "mumble" ]; then - fn_info_config_mumble + fn_info_game_rw elif [ "${shortname}" == "samp" ]; then - fn_info_config_samp -elif [ "${shortname}" == "pstbs" ]; then - fn_info_config_sbots -elif [ "${shortname}" == "tw" ]; then - fn_info_config_teeworlds -elif [ "${shortname}" == "terraria" ]; then - fn_info_config_terraria -elif [ "${shortname}" == "tu" ]; then - fn_info_config_towerunite -elif [ "${engine}" == "unreal" ]; then - fn_info_config_unreal -elif [ "${engine}" == "unreal2" ]; then - fn_info_config_unreal2 -elif [ "${engine}" == "unreal3" ]; then - fn_info_config_unreal3 -elif [ "${shortname}" == "ut" ]; then - fn_info_config_ut + fn_info_game_samp +elif [ "${shortname}" == "sb" ]; then + fn_info_game_sb +elif [ "${shortname}" == "sbots" ]; then + fn_info_game_sbots elif [ "${shortname}" == "scpsl" ]||[ "${shortname}" == "scpslsm" ]; then - fn_info_config_scpsl + fn_info_game_scpsl elif [ "${shortname}" == "sdtd" ]; then - fn_info_config_sdtd -elif [ "${shortname}" == "wet" ]; then - fn_info_config_wolfensteinenemyterritory -elif [ "${shortname}" == "wf" ]; then - fn_info_config_warfork -elif [ "${shortname}" == "etl" ]; then - fn_info_config_etlegacy -elif [ "${shortname}" == "wurm" ]; then - fn_info_config_wurmunlimited -elif [ "${shortname}" == "mta" ]; then - fn_info_config_mta + fn_info_game_sdtd +elif [ "${shortname}" == "sof2" ]; then + fn_info_game_sof2 +elif [ "${shortname}" == "sol" ]; then + fn_info_game_sol +elif [ "${engine}" == "spark" ]; then + fn_info_game_spark elif [ "${shortname}" == "squad" ]; then - fn_info_config_squad + fn_info_game_squad elif [ "${shortname}" == "st" ]; then - fn_info_config_stationeers -elif [ "${shortname}" == "mh" ]; then - fn_info_config_mordhau -elif [ "${shortname}" == "pvr" ];then - fn_info_config_pavlovvr + fn_info_game_st +elif [ "${shortname}" == "terraria" ]; then + fn_info_game_terraria +elif [ "${shortname}" == "tu" ]; then + fn_info_game_tu +elif [ "${shortname}" == "tw" ]; then + fn_info_game_tw +elif [ "${shortname}" == "unt" ]; then + fn_info_game_unt +elif [ "${shortname}" == "ut" ]; then + fn_info_game_ut +elif [ "${shortname}" == "ut2k4" ]; then + fn_info_game_ut2k4 +elif [ "${shortname}" == "ut3" ]; then + fn_info_game_ut3 +elif [ "${shortname}" == "vh" ]; then + fn_info_game_vh elif [ "${shortname}" == "vints" ]; then - fn_info_config_vintagestory + fn_info_game_vints +elif [ "${shortname}" == "wet" ]; then + fn_info_game_wet +elif [ "${shortname}" == "wf" ]; then + fn_info_game_wf elif [ "${shortname}" == "wmc" ]; then - fn_info_config_waterfall + fn_info_game_wmc +elif [ "${shortname}" == "wurm" ]; then + fn_info_game_wurm +elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsrc" ]; then + fn_info_game_source +elif [ "${engine}" == "unreal" ]; then + fn_info_game_unreal +elif [ "${engine}" == "unreal2" ]; then + fn_info_game_unreal2 fi diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index d2ef50586..f68d12e4f 100755 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -92,7 +92,7 @@ fn_info_message_distro(){ echo -e "${lightyellow}Distro Details${default}" fn_messages_separator { - echo -e "${lightblue}Date:\t${default}${date}" + echo -e "${lightblue}Date:\t${default}$(date)" echo -e "${lightblue}Distro:\t${default}${distroname}" echo -e "${lightblue}Arch:\t${default}${arch}" echo -e "${lightblue}Kernel:\t${default}${kernel}" @@ -637,7 +637,7 @@ fn_info_message_commandlineparms(){ echo -e "${preexecutable} ${executable} ${startparameters}" } -fn_info_message_ports(){ +fn_info_message_ports_edit(){ # # Ports # ================================= @@ -650,18 +650,18 @@ fn_info_message_ports(){ startparameterslocation="${red}UNKNOWN${default}" # engines/games that require editing in the config file. - local ports_edit_array=( "avalanche2.0" "avalanche3.0" "Ballistic Overkill" "Barotrauma" "dontstarve" "Eco" "idtech2" "idtech3" "idtech3_ql" "lwjgl2" "Minecraft Bedrock" "Project Cars" "projectzomboid" "quake" "refractor" "realvirtuality" "renderware" "Stationeers" "teeworlds" "terraria" "unreal" "unreal2" "unreal3" "TeamSpeak 3" "Mumble" "7 Days To Die" "Vintage Story" "wurm") + local ports_edit_array=( "ac" "arma3" "bo" "bt" "dst" "eco" "idtech2" "idtech3" "idtech3_ql" "jc2" "jc3" "lwjgl2" "mcb" "mumble" "pc" "pz" "qw" "refractor" "renderware" "rw" "sb" "sdtd" "st" "ts3" "tw" "terraria" "unreal" "unreal2" "unreal3" "vints" "wurm") for port_edit in "${ports_edit_array[@]}"; do if [ "${shortname}" == "ut3" ]; then startparameterslocation="${servercfgdir}/UTWeb.ini" elif [ "${shortname}" == "kf2" ]; then startparameterslocation="${servercfgdir}/LinuxServer-KFEngine.ini\n${servercfgdir}/KFWeb.ini" - elif [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]; then + elif [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]||[ "${shortname}" == "${port_edit}" ]; then startparameterslocation="${servercfgfullpath}" fi done # engines/games that require editing the start parameters. - local ports_edit_array=( "Avorion" "col" "goldsrc" "Factorio" "Hurtworld" "iw3.0" "ioquake3" "qfusion" "Rust" "scpsl" "scpslsm" "Soldat" "spark" "source" "starbound" "unreal4" "realvirtuality" "Unturned" "vh" ) + local ports_edit_array=( "av" "col" "fctr" "goldsrc" "hw" "iw3.0" "ioquake3" "qfusion" "rust" "scpsl" "scpslsm" "sol" "spark" "source" "unreal4" "arma3" "unt" "vh" ) for port_edit in "${ports_edit_array[@]}"; do if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]||[ "${shortname}" == "${port_edit}" ]; then startparameterslocation="${configdirserver}" @@ -669,7 +669,27 @@ fn_info_message_ports(){ done echo -e "${startparameterslocation}" echo -e "" +} + +fn_info_message_ports(){ echo -e "${lightblue}Useful port diagnostic command:${default}" + if [ "${shortname}" == "av" ]; then + echo -e "ss -tuplwn | grep AvorionServer" + elif [ "${shortname}" == "bf1942" ]; then + echo -e "ss -tuplwn | grep bf1942_lnxded" + elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "pmc" ]||[ "${shortname}" == "rw" ]||[ "${shortname}" == "wmc" ]; then + echo -e "ss -tuplwn | grep java" + elif [ "${shortname}" == "terraria" ]; then + echo -e "ss -tuplwn | grep Main" + elif [ "${engine}" == "source" ]; then + echo -e "ss -tuplwn | grep srcds_linux" + elif [ "${engine}" == "goldsrc" ]; then + echo -e "ss -tuplwn | grep hlds_linux" + else + executableshort="$(echo "${executable//.\/}" | cut -c -15)" + echo -e "ss -tuplwn | grep ${executableshort}" + fi + echo -e "" } fn_info_message_statusbottom(){ @@ -728,477 +748,562 @@ fn_info_logs(){ # Engine/Game Specific details -fn_info_message_assettocorsa(){ - echo -e "netstat -atunp| grep acServer" - echo -e "" +# Function used to generate port info. by passing info to function. (Reduces repeating code) +# example output +# DESCRIPTION PORT PROTOCOL LISTEN +# Game 7777 udp 1 +# RAW UDP Socket 7778 udp 1 +# Query 27015 udp 1 +# RCON 27020 tcp 1 + +fn_port(){ + if [ "${1}" == "header" ]; then + echo -e "${lightblue}DESCRIPTION\tPORT\tPROTOCOL\tLISTEN${default}" + else + portname="${1}" + porttype="${2}" + portprotocol="${3}" + echo -e "${portname}\t${!porttype}\t${portprotocol}\t$(echo "${ssinfo}" | grep ${portprotocol} | grep ${!porttype} | wc -l)" + fi +} + +fn_info_message_ac(){ { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" - echo -e "> HTTP\tINBOUND\t${port}\tudp" + fn_port "header" + fn_port "Game" port udp + fn_port "Game" port tcp + fn_port "Query" queryport udp + fn_port "HTTP" httpport tcp } | column -s $'\t' -t } fn_info_message_ark(){ - echo -e "netstat -atunp | grep ShooterGame" - echo -e "" { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" - # Don't do arithmetics if ever the port wasn't a numeric value - if [ "${port}" -eq "${port}" ]; then - echo -e "> RAW\tINBOUND\t$((port+1))\tudp" - fi - echo -e "> Query\tINBOUND\t${queryport}\tudp" - echo -e "> RCON\tINBOUND\t${rconport}\ttcp" + fn_port "header" + fn_port "Game" port udp + fn_port "RAW UDP Socket" rawport udp + fn_port "Query" queryport udp + fn_port "RCON" rconport tcp } | column -s $'\t' -t } -fn_info_message_avorion() { - echo "netstat -atunp | grep Avorion" - echo -e "" +fn_info_message_arma3(){ { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" - echo -e "> Game\tINBOUND\t${port}\tudp" - echo -e "> RCON\tINBOUND\t${rconport}\ttcp" + fn_port "header" + fn_port "Game" port udp + fn_port "Voice" voiceport udp + fn_port "Query Steam" queryport udp + fn_port "Steam Master" steammasterport udp + fn_port "Voice (unused)" voiceunusedport udp + fn_port "BattleEye" battleeyeport udp } | column -s $'\t' -t } -fn_info_message_ballisticoverkill(){ - echo -e "netstat -atunp | grep BODS.x86" - echo -e "" +fn_info_message_av(){ { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game/RCON\tINBOUND\t${port}\tudp" - echo -e "> Query\tINBOUND\t${queryport}\tudp" + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "Steam Master" steammasterport udp + fn_port "Steam Query" steamqueryport udp + fn_port "RCON" rconport tcp } | column -s $'\t' -t } -fn_info_message_battalion1944(){ - echo -e "netstat -atunp | grep BattalionServ" - echo -e "" +fn_info_message_bf1942(){ { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" - # Don't do arithmetics if ever the port wasn't a numeric value - # unconfirmed - http://wiki.battaliongame.com/Community_Servers#Firewalls_.2F_Port_Forwarding - if [ "${port}" -eq "${port}" ]; then - echo -e "> Steam\tINBOUND\t$((port+1))\tudp" - echo -e "> Unused\tINBOUND\t$((port+2))\ttcp" - fi - echo -e "> Query\tINBOUND\t${queryport}\tudp" + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp } | column -s $'\t' -t } -fn_info_message_cod(){ - echo -e "netstat -atunp | grep cod_lnxded" - echo -e "" +fn_info_message_bfv(){ { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp } | column -s $'\t' -t } -fn_info_message_coduo(){ - echo -e "netstat -atunp | grep coduo_lnxded" - echo -e "" +fn_info_message_bo(){ { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp } | column -s $'\t' -t } -fn_info_message_chivalry(){ +fn_info_message_bt(){ + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_message_bt1944(){ + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "RCON" rconport tcp + } | column -s $'\t' -t +} + +fn_info_message_cmw(){ fn_info_message_password_strip - echo -e "netstat -atunp | grep UDKGame" - echo -e "" { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" - echo -e "> Query\tINBOUND\t${queryport}\tudp" - echo -e "> RCON\tINBOUND\t27960\ttcp" + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "RCON" rconport tcp + } | column -s $'\t' -t +} + +fn_info_message_cod(){ + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_message_coduo(){ + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp } | column -s $'\t' -t } fn_info_message_cod2(){ - echo -e "netstat -atunp | grep cod2_lnxded" - echo -e "" { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp } | column -s $'\t' -t } fn_info_message_cod4(){ - echo -e "netstat -atunp" - echo -e "" { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp } | column -s $'\t' -t } fn_info_message_codwaw(){ - echo -e "netstat -atunp | grep codwaw_lnxded" - echo -e "" { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_message_col(){ + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport tcp + fn_port "Steam" steamport tcp + } | column -s $'\t' -t +} + +fn_info_message_csgo(){ + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport tcp + fn_port "RCON" rconport tcp + fn_port "SourceTV" sourcetvport udp + fn_port "Client" clientport udp } | column -s $'\t' -t } fn_info_message_dst(){ - echo -e "netstat -atunp | grep dontstarve" - echo -e "" { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game: Server\tINBOUND\t${port}\tudp" - echo -e "> Game: Master\tINBOUND\t${masterport}\tudp" - echo -e "> Steam: Auth\tINBOUND\t${steamauthenticationport}\tudp" - echo -e "> Steam: Master\tINBOUND\t${steammasterserverport}\tudp" + fn_port "header" + fn_port "Game: Server" port udp + fn_port "Game: Master" masterport udp + fn_port "Steam: Auth" steamauthport udp + fn_port "Steam: Master" steammasterport udp } | column -s $'\t' -t } fn_info_message_eco(){ - echo -e "netstat -atunp | grep EcoServer" - echo -e "" { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" - echo -e "> Web Admin\tINBOUND\t${webadminport}\ttcp" + fn_port "header" + fn_port "Game" port udp + fn_port "Web Admin" webadminport tcp } | column -s $'\t' -t } - -fn_info_message_etlegacy(){ - echo -e "netstat -atunp | grep etlded" - echo -e "" +fn_info_message_etl(){ { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game/Query\tINBOUND\t${port}\tudp" + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp } | column -s $'\t' -t } -fn_info_message_factorio(){ - echo -e "netstat -atunp | grep factorio" - echo -e "" +fn_info_message_fctr(){ { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" - echo -e "> RCON\tINBOUND\t${rconport}\ttcp" + fn_port "header" + fn_port "Game" port udp + fn_port "RCON" rconport tcp } | column -s $'\t' -t } fn_info_message_goldsrc(){ - echo -e "netstat -atunp | grep hlds_linux" - echo -e "" { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game/RCON\tINBOUND\t${port}\ttcp/udp" - echo -e "< Client\tOUTBOUND\t${clientport}\tudp" + fn_port "header" + fn_port "Game" port udp + fn_port "Client" clientport udp } | column -s $'\t' -t } -fn_info_message_hurtworld(){ - echo -e "netstat -atunp | grep Hurtworld" - echo -e "" +fn_info_message_hw(){ { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game/RCON\tINBOUND\t${port}\tudp" - echo -e "> Query\tINBOUND\t${queryport}\tudp" + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_message_ins(){ + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport tcp + fn_port "RCON" rconport tcp + fn_port "SourceTV" sourcetvport udp + fn_port "Client" clientport udp } | column -s $'\t' -t } fn_info_message_inss(){ - echo -e "netstat -atunp | grep Insurgency" - echo -e "" { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" - echo -e "> Query\tINBOUND\t${queryport}\tudp" - if [ -n "${rconport}" ]; then - echo -e "> RCON\tINBOUND\t${rconport}\ttcp" - fi + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "RCON" rconport tcp } | column -s $'\t' -t } - fn_info_message_jk2(){ - echo -e "netstat -atunp | grep jk2mvded" - echo -e "" - { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" - echo -e "> Game\tINBOUND\t${port}\tudp" - } | column -s $'\t' -t - } +fn_info_message_jc2(){ + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_message_jc3(){ + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "Steam" steamport udp + fn_port "HTTP" httpport tcp + } | column -s $'\t' -t +} -fn_info_message_justcause2(){ - echo -e "netstat -atunp | grep Jcmp-Server" +fn_info_message_jk2(){ + { + fn_port "header" + fn_port "Game" port udp + } | column -s $'\t' -t +} + +fn_info_message_kf(){ + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "Query (GameSpy)" queryportgs udp + fn_port "Web Admin" webadminport tcp + fn_port "LAN" lanport udp + fn_port "Steam" steamport udp + fn_port "Steam Master" steammasterport udp + } | column -s $'\t' -t echo -e "" + echo -e "${lightgreen}${servername} Web Admin${default}" + fn_messages_separator { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" + echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}" + echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}" + echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}" + echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}" } | column -s $'\t' -t } -fn_info_message_justcause3(){ - echo -e "netstat -atunp | grep Server" +fn_info_message_kf2(){ + fn_info_message_password_strip + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "Web Admin" webadminport tcp + } | column -s $'\t' -t echo -e "" + echo -e "${lightgreen}${servername} Web Admin${default}" + fn_messages_separator { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" - echo -e "> Query\tINBOUND\t${queryport}\tudp" - echo -e "> Steam\tINBOUND\t${steamport}\tudp" + echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}" + echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}" + echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}" + echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}" } | column -s $'\t' -t } fn_info_message_lo(){ - echo -e "netstat -atunp | grep MistServer" - echo -e "" { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" - echo -e "> Query\tINBOUND\t${queryport}\tudp" + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp } | column -s $'\t' -t } -fn_info_message_minecraft(){ - echo -e "netstat -atunp | grep java" - echo -e "" +fn_info_message_mc(){ { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\ttcp" - echo -e "> Query\tINBOUND\t${queryport}\tudp" - echo -e "> Rcon\tINBOUND\t${rconport}\ttcp" + fn_port "header" + fn_port "Game" port tcp + fn_port "Query" queryport udp + fn_port "RCON" rconport tcp } | column -s $'\t' -t } -fn_info_message_minecraft_bedrock(){ - echo -e "netstat -atunp | grep bedrock_serv" - echo -e "" +fn_info_message_mcb(){ { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" - echo -e "> Game\tINBOUND\t${port6}\tudp6" + fn_port "header" + fn_port "Game" port udp + fn_port "Game" portipv6 udp6 } | column -s $'\t' -t } -fn_info_message_onset(){ - echo -e "netstat -atunp | grep OnsetServer" - echo -e "" +fn_info_message_mh(){ { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" - echo -e "> Query\tINBOUND\t${queryport}\tudp" - echo -e "> HTTP\tINBOUND\t${httpport}\ttcp" + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "Beacon" beaconport udp } | column -s $'\t' -t } fn_info_message_mohaa(){ - echo -e "netstat -atunp | grep mohaa_lnxded" - echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" - echo -e "> Game\tINBOUND\t${port}\tudp" + fn_port "header" + fn_port "Game" port udp } | column -s $'\t' -t } fn_info_message_mom(){ - echo -e "netstat -atunp | grep MemoriesOfMar" - echo -e "" { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" - echo -e "> BeaconPort\tINBOUND\t${beaconport}\tudp" + fn_port "header" + fn_port "Game" port udp + fn_port "Beacon" beaconport udp } | column -s $'\t' -t } -fn_info_message_mumble(){ - echo -e "netstat -atunp | grep murmur" - echo -e "" +fn_info_message_mta(){ { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Voice\tINBOUND\t${port}\tudp" - echo -e "> ServerQuery\tINBOUND\t${port}\ttcp" + fn_port "header" + fn_port "Game" port udp + if [ "${ase}" == "Enabled" ]; then + fn_port "Query" queryport udp + fi + fn_port "HTTP" httpport tcp } | column -s $'\t' -t } -fn_info_message_pstbs(){ - echo -e "netstat -atunp | grep PostScriptum" - echo -e "" + +fn_info_message_mumble(){ { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" - echo -e "> Query\tINBOUND\t${queryport}\tudp" - echo -e "> RCON\tINBOUND\t${rconport}\ttcp" + fn_port "header" + fn_port "Voice" port udp + fn_port "Query" queryport tcp } | column -s $'\t' -t } -fn_info_message_projectcars(){ - echo -e "netstat -atunp | grep DedicatedS" - echo -e "" +fn_info_message_onset(){ { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" - echo -e "> Query\tINBOUND\t${queryport}\tudp" - echo -e "> Steam\tINBOUND\t${steamport}\tudp" + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "HTTP" httpport tcp } | column -s $'\t' -t } -fn_info_message_projectzomboid(){ - echo -e "netstat -atunp | grep ProjectZomb" - echo -e "" +fn_info_message_pc(){ { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game/Query\tINBOUND\t${port}\tudp" + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "Steam" steamport udp } | column -s $'\t' -t } -fn_info_message_quake(){ - echo -e "netstat -atunp | grep mvdsv" - echo -e "" +fn_info_message_pstbs(){ { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "RCON" rconport tcp } | column -s $'\t' -t } -fn_info_message_quake2(){ - echo -e "netstat -atunp | grep quake2" - echo -e "" +fn_info_message_pvr(){ { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" + fn_port "header" + fn_port "Game" port udp + fn_port "Game" port tcp + fn_port "Game+400" port401 udp + fn_port "Query" queryport tcp } | column -s $'\t' -t } -fn_info_message_quake3(){ - echo -e "netstat -atunp | grep q3ded" - echo -e "" +fn_info_message_pz(){ { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp } | column -s $'\t' -t } -fn_info_message_quakelive(){ - echo -e "netstat -atunp | grep qzeroded" - echo -e "" - if [ -z "${port}" ]||[ -z "${rconport}" ]||[ -z "${statsport}" ]; then - echo -e "${red}ERROR!${default} Missing/commented ports in ${servercfg}." - echo -e "" - fi +fn_info_message_qw(){ { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game/Query\tINBOUND\t${port}\tudp" - echo -e "> Rcon\tINBOUND\t${rconport}\tudp" - echo -e "> Stats\tINBOUND\t${statsport}\tudp" + fn_port "header" + fn_port "Game" port udp } | column -s $'\t' -t } -fn_info_message_arma3(){ - echo -e "netstat -atunp | grep arma3server" - echo -e "" - # Default port - if [ -z "${port}" ]; then - port="2302" - fi +fn_info_message_q2(){ { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" - # Don't do arithmetics if ever the port wasn't a numeric value - if [ "${port}" -eq "${port}" ]; then - echo -e "> Query Steam\tINBOUND\t$((port+1))\tudp" - echo -e "> Steam: Master traffic\tINBOUND\t$((port+2))\tudp" - echo -e "> Undocumented Port\tINBOUND\t$((port+3))\tudp" - fi + fn_port "header" + fn_port "Game" port udp } | column -s $'\t' -t } -fn_info_message_bf1942(){ - echo -e "netstat -atunp | grep bf1942_lnxd" - echo -e "" +fn_info_message_q3(){ { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game/Query\tINBOUND\t${port}\tudp" - echo -e "> Query Steam\tINBOUND\t${queryport}\tudp" + fn_port "header" + fn_port "Game" port udp } | column -s $'\t' -t } -fn_info_message_bfv(){ - echo -e "netstat -atunp | grep bfv_linded" - echo -e "" +fn_info_message_ql(){ { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" - echo -e "> Query\tINBOUND\t${queryport}\tudp" + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "RCON" rconport tcp + fn_port "Stats" statsport udp } | column -s $'\t' -t } -fn_info_message_risingworld(){ - echo -e "netstat -atunp | grep java" +fn_info_message_ro(){ + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "Web Admin" webadminport tcp + fn_port "LAN" lanport udp + fn_port "Steam" steamport udp + fn_port "Steam Master" steammasterport udp + } | column -s $'\t' -t echo -e "" + echo -e "${lightgreen}${servername} Web Admin${default}" + fn_messages_separator { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game/Query\tINBOUND\t${port}\ttcp/udp" - echo -e "> Query HTTP\tINBOUND\t${httpqueryport}\ttcp" - echo -e "> RCON\tINBOUND\t${rconport}\ttcp" + echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}" + echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}" + echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}" + echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}" } | column -s $'\t' -t } fn_info_message_rtcw(){ - echo -e "netstat -atunp | grep iowolfded" - echo -e "" { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" + fn_port "header" + fn_port "Game" port udp } | column -s $'\t' -t } fn_info_message_rust(){ - echo -e "netstat -atunp | grep Rust" - echo -e "" { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game/Query\tINBOUND\t${port}\tudp" - echo -e "> RCON\tINBOUND\t${rconport}\ttcp" - echo -e "> App\tINBOUND\t${appport}\ttcp" + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "RCON" rconport tcp + fn_port "App" appport tcp + } | column -s $'\t' -t +} + +fn_info_message_rw(){ + { + fn_port "header" + fn_port "Game" port udp + fn_port "Game+1" port2 udp + fn_port "Game+2" port3 udp + fn_port "Game+3" port4 udp + fn_port "Game+1" port2 tcp + fn_port "Game+2" port3 tcp + fn_port "Game+3" port4 tcp + fn_port "Query" queryport tcp + fn_port "Query HTTP" httpqueryport tcp + fn_port "RCON" rconport tcp } | column -s $'\t' -t } fn_info_message_samp(){ - echo -e "netstat -atunp | grep samp03svr" - echo -e "" { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game/RCON\tINBOUND\t${port}\ttcp/udp" + fn_port "header" + fn_port "Game" port udp + fn_port "RCON" rconport udp + } | column -s $'\t' -t +} + +fn_info_message_sb(){ + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport tcp + fn_port "RCON" rconport tcp } | column -s $'\t' -t } fn_info_message_sbots(){ - echo -e "netstat -atunp | grep blank1" - echo -e "" { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" - echo -e "> Query\tINBOUND\t${queryport}\tudp" + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_message_scpsl(){ + { + fn_port "header" + fn_port "Game" port tcp } | column -s $'\t' -t } fn_info_message_sdtd(){ fn_info_message_password_strip - echo -e "netstat -atunp | grep 7DaysToDie" - echo -e "" { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game/RCON\tINBOUND\t${port}\tudp" - echo -e "> Query\tINBOUND\t${queryport}\tudp" - echo -e "> Web Admin\tINBOUND\t${webadminport}\ttcp" - echo -e "> Telnet\tINBOUND\t${telnetport}\ttcp" + fn_port "header" + fn_port "Game" port udp + fn_port "Game+2" port3 udp + fn_port "Query" queryport tcp + fn_port "Web Admin" webadminport tcp + fn_port "Telnet" telnetport tcp } | column -s $'\t' -t echo -e "" echo -e "${lightgreen}${gamename} Web Admin${default}" fn_messages_separator { echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}" - echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}" + echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}/index.html" + echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}" echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}" } | column -s $'\t' -t echo -e "" @@ -1212,37 +1317,44 @@ fn_info_message_sdtd(){ } fn_info_message_sof2(){ - echo -e "netstat -atunp | grep sof2ded" - echo -e "" { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game/Query\tINBOUND\t${port}\tudp" + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp } | column -s $'\t' -t } +fn_info_message_sol(){ + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "Files" filesport tcp + } | column -s $'\t' -t +} fn_info_message_source(){ - echo -e "netstat -atunp | grep srcds_linux" - echo -e "" { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game/RCON\tINBOUND\t${port}\ttcp/udp" - echo -e "> SourceTV\tINBOUND\t${sourcetvport}\tudp" - echo -e "< Client\tOUTBOUND\t${clientport}\tudp" + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport tcp + fn_port "RCON" rconport tcp + fn_port "SourceTV" sourcetvport udp + # not manualy set by default more research needed + fn_port "Steam" steamport udp + fn_port "Client" clientport udp } | column -s $'\t' -t } fn_info_message_spark(){ fn_info_message_password_strip - echo -e "netstat -atunp | grep server_linux" - echo -e "" { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game/RCON\tINBOUND\t${port}\tudp" - echo -e "> Query\tINBOUND\t${queryport}\tudp" - echo -e "> Web Admin\tINBOUND\t${webadminport}\ttcp" + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "Web Admin" webadminport tcp } | column -s $'\t' -t echo -e "" - echo -e "${lightgreen}${servername} Web Admin${default}" + echo -e "${lightgreen}${gamename} Web Admin${default}" fn_messages_separator { echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}/index.html" @@ -1252,107 +1364,75 @@ fn_info_message_spark(){ } fn_info_message_squad(){ - echo -e "netstat -atunp | grep SquadServer" - echo -e "" { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" - echo -e "> Query\tINBOUND\t${queryport}\tudp" - echo -e "> RCON\tINBOUND\t${rconport}\ttcp" + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "RCON" rconport tcp } | column -s $'\t' -t } -fn_info_message_starbound(){ - echo -e "netstat -atunp | grep starbound" - echo -e "" +fn_info_message_st(){ { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\ttcp" - echo -e "> Query\tINBOUND\t${queryport}\ttcp" - echo -e "> RCON\tINBOUND\t${rconport}\ttcp" + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "Web Admin" webadminport tcp } | column -s $'\t' -t -} - -fn_info_message_stationeers(){ - echo -e "netstat -atunp | grep rocketstation" echo -e "" + echo -e "${lightgreen}${gamename} Web Admin${default}" + fn_messages_separator { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\ttcp" - echo -e "> Query\tINBOUND\t${queryport}\ttcp" + echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}" } | column -s $'\t' -t } -fn_info_message_teamspeak3(){ - echo -e "netstat -atunp | grep ts3server" - echo -e "" +fn_info_message_ts3(){ { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Voice\tINBOUND\t${port}\tudp" - echo -e "> ServerQuery\tINBOUND\t${queryport}\ttcp" - echo -e "> File transfer\tINBOUND\t${fileport}\ttcp" + fn_port "header" + fn_port "Voice" port udp + fn_port "Query" queryport tcp + fn_port "Query (SSH)" querysshport tcp + fn_port "Query (http)" queryhttpport tcp + fn_port "Query (https)" queryhttpsport tcp + fn_port "File Transfer" fileport tcp + fn_port "Telnet" telnetport tcp } | column -s $'\t' -t } -fn_info_message_teeworlds(){ - echo -e "netstat -atunp | grep teeworlds" - echo -e "" +fn_info_message_tw(){ { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\Query\tINBOUND\t${port}\ttcp" + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp } | column -s $'\t' -t } fn_info_message_terraria(){ - echo -e "netstat -atunp | grep Terraria" - echo -e "" { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\ttcp" + fn_port "header" + fn_port "Game" port tcp + fn_port "Query" queryport tcp } | column -s $'\t' -t } -fn_info_message_towerunite(){ - echo -e "netstat -atunp | grep TowerServer" - echo -e "" +fn_info_message_tu(){ { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\ttcp" - # Don't do arithmetics if ever the port wasn't a numeric value - if [ "${port}" -eq "${port}" ]; then - echo -e "> Steam\tINBOUND\t$((port+1))\tudp" - fi - echo -e "> Query\tINBOUND\t${queryport}\tudp" + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "Steam" steamport udp } | column -s $'\t' -t } fn_info_message_unreal(){ fn_info_message_password_strip - echo -e "netstat -atunp | grep ucc-bin" - echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL\tINI VARIABLE" - echo -e "> Game\tINBOUND\t${port}\tudp\tPort=${port}" - echo -e "> Query\tINBOUND\t${queryport}\tudp" - if [ "${engine}" == "unreal" ]; then - echo -e "< UdpLink Port (random)\tOUTBOUND\t${udplinkport}+\tudp" - fi - if [ "${engine}" != "unreal" ]&&[ "${appid}" != "223250" ]; then - echo -e "> Query (GameSpy)\tINBOUND\t${queryportgs}\tudp\tOldQueryPortNumber=${queryportgs}" - fi - if [ "${appid}" == "215360" ]; then - echo -e "< Master server\tOUTBOUND\t28852\ttcp/udp" - else - echo -e "< Master server\tOUTBOUND\t28900/28902\ttcp/udp" - fi - if [ "${appid}" ]; then - if [ "${appid}" == "223250" ]; then - echo -e "> Steam\tINBOUND\t20610\tudp" - else - echo -e "> Steam\tINBOUND\t20660\tudp" - fi - fi - echo -e "> Web Admin\tINBOUND\t${webadminport}\ttcp\tListenPort=${webadminport}" + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "LAN Beacon" beaconport udp + fn_port "Web Admin" webadminport tcp } | column -s $'\t' -t echo -e "" echo -e "${lightgreen}${servername} Web Admin${default}" @@ -1365,18 +1445,14 @@ fn_info_message_unreal(){ } | column -s $'\t' -t } -fn_info_message_unreal2(){ - fn_info_message_password_strip - echo -e "netstat -atunp | grep ucc-bin" - echo -e "" +fn_info_message_ut2k4(){ { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL\tINI VARIABLE" - echo -e "> Game\tINBOUND\t${port}\tudp\tPort=${port}" - echo -e "> Query\tINBOUND\t${queryport}\tudp" - if [ "${appid}" != "223250" ]; then - echo -e "> Query (GameSpy)\tINBOUND\t${queryportgs}\tudp\tOldQueryPortNumber=${queryportgs}" - fi - echo -e "> Web Admin\tINBOUND\t${webadminport}\ttcp\tListenPort=${webadminport}" + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "Query (GameSpy)" queryportgs udp + fn_port "Web Admin" webadminport tcp + fn_port "LAN" lanport udp } | column -s $'\t' -t echo -e "" echo -e "${lightgreen}${servername} Web Admin${default}" @@ -1389,15 +1465,14 @@ fn_info_message_unreal2(){ } | column -s $'\t' -t } -fn_info_message_unreal3(){ +fn_info_message_unreal(){ fn_info_message_password_strip - echo -e "netstat -atunp | grep ut3-bin" - echo -e "" { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" - echo -e "> Query\tINBOUND\t${queryport}\tudp" - echo -e "> Web Admin\tINBOUND\t${webadminport}\ttcp\tListenPort=${webadminport}" + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "LAN Beacon" beaconport udp + fn_port "Web Admin" webadminport tcp } | column -s $'\t' -t echo -e "" echo -e "${lightgreen}${servername} Web Admin${default}" @@ -1410,45 +1485,29 @@ fn_info_message_unreal3(){ } | column -s $'\t' -t } -fn_info_message_unturned(){ - echo -e "netstat -atunp | grep Unturned" - echo -e "" +fn_info_message_unt(){ { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" - echo -e "> Query\tINBOUND\t${queryport}\tudp" + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp } | column -s $'\t' -t } fn_info_message_ut(){ - echo -e "netstat -atunp | grep UE4Server" - echo -e "" { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp } | column -s $'\t' -t } -fn_info_message_vh(){ - echo -e "netstat -atunp | grep valheim" - echo -e "" - { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" - echo -e "> Query\tINBOUND\t${queryport}\tudp" - } | column -s $'\t' -t -} - -fn_info_message_kf2(){ +fn_info_message_ut3(){ fn_info_message_password_strip - echo -e "netstat -atunp | grep KFGame" - echo -e "" { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\ttcp\tPort=${port}" - echo -e "> Query\tINBOUND\t${queryport}\tudp" - echo -e "> Steam\tINBOUND\t20560\tudp" - echo -e "> Web Admin\tINBOUND\t${webadminport}\ttcp\tListenPort=${webadminport}" + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "Web Admin" webadminport tcp } | column -s $'\t' -t echo -e "" echo -e "${lightgreen}${servername} Web Admin${default}" @@ -1461,141 +1520,69 @@ fn_info_message_kf2(){ } | column -s $'\t' -t } -fn_info_message_wolfensteinenemyterritory(){ - echo -e "netstat -atunp | grep etded" - echo -e "" - { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game/Query\tINBOUND\t${port}\tudp" - } | column -s $'\t' -t -} - - -fn_info_message_wurmunlimited(){ - echo -e "netstat -atunp | grep WurmServer" - echo -e "" - { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\ttcp" - echo -e "> Query\tINBOUND\t${queryport}\tudp" - } | column -s $'\t' -t -} - -fn_info_message_mta(){ - echo -e "netstat -atunp | grep mta-server" - echo -e "" - { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game/Query\tINBOUND\t${port}\tudp" - echo -e "> HTTP Server\tINBOUND\t${httpport}\ttcp" - if [ "${ase}" == "Enabled" ]; then - echo -e "> Query Port\tOUTBOUND\t${queryport}\tudp" - fi - } | column -s $'\t' -t -} - -fn_info_message_mordhau(){ - echo -e "netstat -atunp | grep Mord" - echo -e "" - { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" - echo -e "> BeaconPort\tINBOUND\t${beaconport}\tudp" - echo -e "> Query\tINBOUND\t${queryport}\tudp" - } | column -s $'\t' -t -} - -fn_info_message_barotrauma(){ - echo -e "netstat -atunp | grep /./Server.bin" - echo -e "" - { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" - echo -e "> Query\tINBOUND\t$((port+1))\tudp" - } | column -s $'\t' -t -} - -fn_info_message_soldat() { - echo -e "netstat -atunp | grep soldat" - echo -e "" - { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" - echo -e "> Query\tINBOUND\t${queryport}\tudp" - echo -e "> FILES\tINBOUND\t$((port+10))\ttcp" - } | column -s $'\t' -t -} - -fn_info_message_warfork(){ - echo -e "netstat -atunp | grep wf_server" - echo -e "" +fn_info_message_vh(){ { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" - echo -e "> HTTP\tINBOUND\t${httpport}\ttcp" + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp } | column -s $'\t' -t } -fn_info_message_pavlovvr(){ - echo "netstat -atunp | grep Pavlov" - echo -e "" +fn_info_message_vints(){ { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" - echo -e "> Game\tINBOUND\t${port}\tudp" - echo -e "> Game\tINBOUND\t$((port+400))\tudp" + fn_port "header" + fn_port "Game" port tcp } | column -s $'\t' -t } -fn_info_message_colony(){ - echo -e "netstat -atunp | grep colonyserv" - echo -e "" +fn_info_message_wet(){ { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" - echo -e "> Steam\tINBOUND\t${steamport}\tudp" + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp } | column -s $'\t' -t } -fn_info_message_vintagestory(){ - echo "netstat -atunp | grep cli" - echo -e "" +fn_info_message_wf(){ { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" - echo -e "> Game\tINBOUND\t${port}\tTCP" + fn_port "header" + fn_port "Game" port udp + fn_port "HTTP" httpport tcp } | column -s $'\t' -t } -fn_info_message_scpsl(){ - echo -e "netstat -atunp | grep SCPSL" - echo -e "" +fn_info_message_wurm(){ { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game\tINBOUND\t${port}\tudp" + fn_port "header" + fn_port "Game" port tcp + fn_port "Query" queryport udp } | column -s $'\t' -t } fn_info_message_select_engine(){ # Display details depending on game or engine. if [ "${shortname}" == "ac" ]; then - fn_info_message_assettocorsa + fn_info_message_ac elif [ "${shortname}" == "ark" ]; then fn_info_message_ark - elif [ "${shortname}" == "av" ]; then - fn_info_message_avorion elif [ "${shortname}" == "arma3" ]; then fn_info_message_arma3 + elif [ "${shortname}" == "av" ]; then + fn_info_message_av elif [ "${shortname}" == "bf1942" ]; then fn_info_message_bf1942 elif [ "${shortname}" == "bfv" ]; then fn_info_message_bfv elif [ "${shortname}" == "bo" ]; then - fn_info_message_ballisticoverkill + fn_info_message_bo elif [ "${shortname}" == "bt" ]; then - fn_info_message_barotrauma + fn_info_message_bt elif [ "${shortname}" == "bt1944" ]; then - fn_info_message_battalion1944 + fn_info_message_bt1944 + elif [ "${shortname}" == "csgo" ]; then + fn_info_message_csgo elif [ "${shortname}" == "cmw" ]; then - fn_info_message_chivalry + fn_info_message_cmw elif [ "${shortname}" == "cod" ]; then fn_info_message_cod elif [ "${shortname}" == "coduo" ]; then @@ -1607,107 +1594,117 @@ fn_info_message_select_engine(){ elif [ "${shortname}" == "codwaw" ]; then fn_info_message_codwaw elif [ "${shortname}" == "col" ]; then - fn_info_message_colony + fn_info_message_col elif [ "${shortname}" == "dst" ]; then fn_info_message_dst elif [ "${shortname}" == "eco" ]; then fn_info_message_eco elif [ "${shortname}" == "etl" ]; then - fn_info_message_etlegacy + fn_info_message_etl elif [ "${shortname}" == "fctr" ]; then - fn_info_message_factorio + fn_info_message_fctr elif [ "${shortname}" == "hw" ]; then - fn_info_message_hurtworld + fn_info_message_hw + elif [ "${shortname}" == "ins" ]; then + fn_info_message_ins elif [ "${shortname}" == "inss" ]; then fn_info_message_inss - elif [ "${shortname}" == "jk2" ]; then - fn_info_message_jk2 elif [ "${shortname}" == "jc2" ]; then - fn_info_message_justcause2 + fn_info_message_jc2 elif [ "${shortname}" == "jc3" ]; then - fn_info_message_justcause3 - elif [ "${shortname}" == "lo" ]; then - fn_info_message_lo + fn_info_message_jc3 + elif [ "${shortname}" == "jk2" ]; then + fn_info_message_jk2 + elif [ "${shortname}" == "kf" ]; then + fn_info_message_kf elif [ "${shortname}" == "kf2" ]; then fn_info_message_kf2 + elif [ "${shortname}" == "lo" ]; then + fn_info_message_lo elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "pmc" ]||[ "${shortname}" == "wmc" ]; then - fn_info_message_minecraft + fn_info_message_mc elif [ "${shortname}" == "mcb" ]; then - fn_info_message_minecraft_bedrock + fn_info_message_mcb elif [ "${shortname}" == "mh" ]; then - fn_info_message_mordhau + fn_info_message_mh elif [ "${shortname}" == "mohaa" ]; then fn_info_message_mohaa elif [ "${shortname}" == "mta" ]; then fn_info_message_mta elif [ "${shortname}" == "mumble" ]; then fn_info_message_mumble - elif [ "${shortname}" == "onset" ]; then - fn_info_message_onset elif [ "${shortname}" == "mom" ]; then fn_info_message_mom - elif [ "${shortname}" == "pz" ]; then - fn_info_message_projectzomboid + elif [ "${shortname}" == "onset" ]; then + fn_info_message_onset + elif [ "${shortname}" == "pc" ]; then + fn_info_message_pc elif [ "${shortname}" == "pstbs" ]; then fn_info_message_pstbs - elif [ "${shortname}" == "pc" ]; then - fn_info_message_projectcars - elif [ "${shortname}" == "qw" ]; then - fn_info_message_quake + elif [ "${shortname}" == "pvr" ]; then + fn_info_message_pvr + elif [ "${shortname}" == "pz" ]; then + fn_info_message_pz elif [ "${shortname}" == "q2" ]; then - fn_info_message_quake2 + fn_info_message_q2 elif [ "${shortname}" == "q3" ]; then - fn_info_message_quake3 + fn_info_message_q3 elif [ "${shortname}" == "ql" ]; then - fn_info_message_quakelive + fn_info_message_ql + elif [ "${shortname}" == "qw" ]; then + fn_info_message_qw + elif [ "${shortname}" == "ro" ]; then + fn_info_message_ro + elif [ "${shortname}" == "rtcw" ]; then + fn_info_message_rtcw elif [ "${shortname}" == "samp" ]; then fn_info_message_samp + elif [ "${shortname}" == "sb" ]; then + fn_info_message_sb + elif [ "${shortname}" == "sbots" ]; then + fn_info_message_sbots elif [ "${shortname}" == "scpsl" ]||[ "${shortname}" == "scpslsm" ]; then fn_info_message_scpsl elif [ "${shortname}" == "sdtd" ]; then fn_info_message_sdtd - elif [ "${shortname}" == "squad" ]; then - fn_info_message_squad - elif [ "${shortname}" == "st" ]; then - fn_info_message_stationeers elif [ "${shortname}" == "sof2" ]; then fn_info_message_sof2 elif [ "${shortname}" == "sol" ]; then - fn_info_message_soldat - elif [ "${shortname}" == "sb" ]; then - fn_info_message_starbound - elif [ "${shortname}" == "sbots" ]; then - fn_info_message_sbots + fn_info_message_sol + elif [ "${shortname}" == "squad" ]; then + fn_info_message_squad + elif [ "${shortname}" == "st" ]; then + fn_info_message_st elif [ "${shortname}" == "terraria" ]; then fn_info_message_terraria elif [ "${shortname}" == "ts3" ]; then - fn_info_message_teamspeak3 + fn_info_message_ts3 elif [ "${shortname}" == "tu" ]; then - fn_info_message_towerunite + fn_info_message_tu elif [ "${shortname}" == "tw" ]; then - fn_info_message_teeworlds + fn_info_message_tw elif [ "${shortname}" == "unt" ]; then - fn_info_message_unturned - elif [ "${shortname}" == "ut" ]; then - fn_info_message_ut + fn_info_message_unt elif [ "${shortname}" == "vh" ]; then fn_info_message_vh - elif [ "${shortname}" == "rtcw" ]; then - fn_info_message_rtcw - elif [ "${shortname}" == "pvr" ]; then - fn_info_message_pavlovvr + elif [ "${shortname}" == "vints" ]; then + fn_info_message_vints elif [ "${shortname}" == "rust" ]; then fn_info_message_rust - elif [ "${shortname}" == "vints" ]; then - fn_info_message_vintagestory - elif [ "${shortname}" == "wf" ]; then - fn_info_message_warfork - elif [ "${shortname}" == "wurm" ]; then - fn_info_message_wurmunlimited elif [ "${shortname}" == "rw" ]; then - fn_info_message_risingworld + fn_info_message_rw + elif [ "${shortname}" == "ut" ]; then + fn_info_message_ut + elif [ "${shortname}" == "ut2k4" ]; then + fn_info_message_ut2k4 + elif [ "${shortname}" == "ut3" ]; then + fn_info_message_ut3 elif [ "${shortname}" == "wet" ]; then - fn_info_message_wolfensteinenemyterritory + fn_info_message_wet + elif [ "${shortname}" == "wf" ]; then + fn_info_message_wf + elif [ "${shortname}" == "wurm" ]; then + fn_info_message_wurm elif [ "${engine}" == "goldsrc" ]; then fn_info_message_goldsrc elif [ "${engine}" == "source" ]; then @@ -1716,10 +1713,7 @@ fn_info_message_select_engine(){ fn_info_message_spark elif [ "${engine}" == "unreal" ]; then fn_info_message_unreal - elif [ "${engine}" == "unreal2" ]; then - fn_info_message_unreal2 - elif [ "${engine}" == "unreal3" ]; then - fn_info_message_unreal3 + else fn_print_error_nl "Unable to detect server engine." fi diff --git a/lgsm/functions/info_parms.sh b/lgsm/functions/info_parms.sh deleted file mode 100755 index 9aee054cd..000000000 --- a/lgsm/functions/info_parms.sh +++ /dev/null @@ -1,332 +0,0 @@ -#!/bin/bash -# LinuxGSM info_parms.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: If specific parms are not set then this will be displayed in details. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -## Examples of filtering to get info from config files -# sed 's/foo//g' - remove foo -# tr -cd '[:digit:]' leave only digits -# tr -d '=\"; ' remove selected charectors =\"; -# grep -v "foo" filter out lines that contain foo - -unavailable="${red}UNAVAILABLE${default}" -zero="${red}0${default}" - -fn_info_parms_ark(){ - port=${port:-"0"} - queryport=${queryport:-"0"} - rconport=${rconport:-"0"} - maxplayers=${maxplayers:-"0"} -} - -fn_info_parms_barotrauma(){ - port=${port:-"0"} - queryport=${queryport:-"0"} -} - -fn_info_parms_cod(){ - defaultmap=${defaultmap:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - queryport=${port:-"0"} -} - -fn_info_parms_dst(){ - sharding=${sharding:-"NOT SET"} - master=${master:-"NOT SET"} - shard=${shard:-"NOT SET"} - cluster=${cluster:-"NOT SET"} - cave=${cave:-"NOT SET"} -} - -fn_info_parms_factorio(){ - port=${port:-"0"} - rconport=${rconport:-"0"} - rconpassword=${rconpassword:-"NOT SET"} -} - -fn_info_parms_hurtworld(){ - servername=${servername:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} - maxplayers=${maxplayers:-"0"} - defaultmap=${defaultmap:-"NOT SET"} - creativemode=${creativemode:-"NOT SET"} -} - -fn_info_parms_inss(){ - port=${port:-"0"} - queryport=${queryport:-"0"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - defaultmap=${defaultmap:-"NOT SET"} - defaultscenario=${defaultscenario:-"NOT SET"} - maxplayers=${maxplayers:-"0"} -} - -fn_info_parms_jk2(){ - queryport=${port} -} - -fn_info_parms_kf2(){ - queryport=${queryport:-"0"} - defaultmap=${defaultmap:-"NOT SET"} -} - -fn_info_parms_lo(){ - servername=${servername:-"NOT SET"} - port=${port:-"0"} - queryport=${queryport:-"0"} -} - -fn_info_parms_mordhau(){ - port=${port:-"0"} - queryport=${queryport:-"0"} - beaconport=${beaconport:-"0"} -} - -fn_info_parms_mohaa(){ - port=${port:-"0"} - queryport=${port:-"0"} - defaultmap=${defaultmap:-"NOT SET"} -} - -fn_info_parms_mom(){ - port=${port:-"7777"} - beaconport=${queryport:-"15000"} -} - -fn_info_parms_mta(){ - queryport=$((port + 123)) -} - -fn_info_parms_projectzomboid(){ - adminpassword=${adminpassword:-"NOT SET"} - queryport=${port:-"0"} -} - -fn_info_parms_quakeworld(){ - port=${port:-"0"} - queryport=${port:-"0"} -} - -fn_info_parms_quake2(){ - port=${port:-"0"} - queryport=${port:-"0"} - defaultmap=${defaultmap:-"NOT SET"} -} - -fn_info_parms_realvirtuality(){ - port=${port:-"0"} - queryport=$((port + 1)) -} - -fn_info_parms_risingworld(){ - servername=${servername:-"NOT SET"} - port=${port:-"0"} - httpqueryport=$((port - 1)) -} - -fn_info_parms_rtcw(){ - port=${port:-"0"} - queryport="${port:-"0"}" - defaultmap=${defaultmap:-"NOT SET"} -} - -fn_info_parms_rust(){ - servername=${servername:-"NOT SET"} - port=${port:-"0"} - queryport=${port:-"0"} - appport=${appport:-"0"} - rconport=${rconport:-"0"} - gamemode=${gamemode:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - rconpassword=${rconpassword:-"NOT SET"} - rconweb=${rconweb:-"NOT SET"} - tickrate=${tickrate:-"0"} - saveinterval=${saveinterval:-"0"} - serverlevel=${serverlevel:-"NOT SET"} - worldsize=${worldsize:-"0"} -} - -fn_info_parms_samp(){ - queryport=${port:-"0"} -} - -fn_info_parms_sof2(){ - port=${port:-"0"} - defaultmap=${defaultmap:-"NOT SET"} -} - -fn_info_parms_source(){ - defaultmap=${defaultmap:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - queryport=${port:-"0"} - clientport=${clientport:-"0"} -} - -fn_info_parms_spark(){ - defaultmap=${defaultmap:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - queryport=$((port + 1)) - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - webadminuser=${webadminuser:-"NOT SET"} - webadminpass=${webadminpass:-"NOT SET"} - webadminport=${webadminport:-"0"} - mods=${mods:-"NOT SET"} -} - -fn_info_parms_stickybots(){ - port=${port:-"0"} - queryport=${queryport:-"0"} - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - defaultmap=${defaultmap:-"NOT SET"} - maxplayers=${maxplayers:-"0"} -} - -fn_info_parms_sof2(){ - port=${port:-"0"} - queryport=${port:-"0"} - defaultmap=${defaultmap:-"NOT SET"} -} - -fn_info_parms_towerunite(){ - port=${port:-"0"} - queryport=${queryport:-"0"} -} - -fn_info_parms_teeworlds(){ - queryport=${port:-"0"} -} - -fn_info_parms_pavlovvr(){ - port=${port:-"0"} - queryport=${queryport:-"0"} -} - -fn_info_parms_unreal(){ - defaultmap=${defaultmap:-"NOT SET"} - queryport=$((port + 1)) -} - -fn_info_parms_unreal2(){ - defaultmap=${defaultmap:-"NOT SET"} - queryport=$((port + 1)) -} - -fn_info_parms_unreal3(){ - port=${port:-"0"} - queryport=${queryport:-"0"} - defaultmap=${defaultmap:-"NOT SET"} -} - -fn_info_parms_unturned(){ - servername=${selfname:-"NOT SET"} - port=${port:-"0"} - queryport=$((port + 1)) -} - -fn_info_parms_ut(){ - port=${port:-"0"} -} - -fn_info_parms_vh(){ - port=${port:-"0"} - if [ "${public}" != "0" ]; then - queryport=$((port + 1)) - else - querymode="1" - fi - gameworld=${gameworld:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - servername=${servername:-"NOT SET"} -} - -fn_info_parms_wf(){ - port=${port:-"0"} - queryport="${port:-"0"}" - webadminport=${webadminport:-"0"} -} - -fn_info_parms_queryport(){ - queryport="${port:-"0"}" -} - -if [ "${shortname}" == "ark" ]; then - fn_info_parms_ark -elif [ "${shortname}" == "arma3" ]; then - fn_info_parms_realvirtuality -elif [ "${shortname}" == "bt" ]; then - fn_info_parms_barotrauma -elif [ "${shortname}" == "cod" ]||[ "${shortname}" == "coduo" ]||[ "${engine}" == "iw2.0" ]||[ "${engine}" == "iw3.0" ]; then - fn_info_parms_cod -elif [ "${shortname}" == "fctr" ]; then - fn_info_parms_factorio -elif [ "${shortname}" == "inss" ]; then - fn_info_parms_inss -elif [ "${shortname}" == "jk2" ]; then - fn_info_parms_jk2 -elif [ "${shortname}" == "kf2" ]; then - fn_info_parms_kf2 -elif [ "${shortname}" == "lo" ]; then - fn_info_parms_lo -elif [ "${shortname}" == "mohaa" ]; then - fn_info_parms_mohaa -elif [ "${shortname}" == "mom" ]; then - fn_info_parms_mom -elif [ "${shortname}" == "pz" ]; then - fn_info_parms_projectzomboid -elif [ "${shortname}" == "pvr" ]; then - fn_info_parms_pavlovvr -elif [ "${shortname}" == "qw" ]; then - fn_info_parms_quakeworld -elif [ "${shortname}" == "q2" ]||[ "${shortname}" == "q3" ]; then - fn_info_parms_quake2 -elif [ "${shortname}" == "rtcw" ]; then - fn_info_parms_rtcw -elif [ "${shortname}" == "rust" ]; then - fn_info_parms_rust -elif [ "${shortname}" == "samp" ]; then - fn_info_parms_samp -elif [ "${shortname}" == "rw" ]; then - fn_info_parms_risingworld -elif [ "${shortname}" == "sof2" ]; then - fn_info_parms_sof2 -elif [ "${shortname}" == "sbots" ]; then - fn_info_parms_stickybots -elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsrc" ]; then - fn_info_parms_source -elif [ "${engine}" == "spark" ]; then - fn_info_parms_spark -elif [ "${shortname}" == "tu" ]; then - fn_info_parms_towerunite -elif [ "${shortname}" == "tw" ]; then - fn_info_parms_teeworlds -elif [ "${shortname}" == "vh" ]; then - fn_info_parms_vh -elif [ "${shortname}" == "mh" ]; then - fn_info_parms_mordhau -elif [ "${shortname}" == "mta" ]; then - fn_info_parms_mta -elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then - fn_info_parms_unreal -elif [ "${engine}" == "unreal3" ]; then - fn_info_parms_unreal3 -elif [ "${shortname}" == "unt" ]; then - fn_info_parms_unturned -elif [ "${shortname}" == "ut" ]; then - fn_info_parms_ut -elif [ "${shortname}" == "wf" ]; then - fn_info_parms_wf -# for servers that have a missing queryport from the config -elif [ "${shortname}" == "scpsl" ]||[ "${shortname}" == "scpslsm" ]; then - fn_info_parms_queryport -fi diff --git a/lgsm/functions/query_gamedig.sh b/lgsm/functions/query_gamedig.sh index 123d8c86c..32b70aac2 100755 --- a/lgsm/functions/query_gamedig.sh +++ b/lgsm/functions/query_gamedig.sh @@ -14,6 +14,10 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; # will bypass query if server offline. check_status.sh if [ "${status}" != "0" ]; then + # GameDig requires you use the voice port when querying. + if [ "${querytype}" == "teamspeak3" ]; then + queryport="${port}" + fi # checks if query is working null = pass. gamedigcmd=$(echo -e "gamedig --type \"${querytype}\" --host \"${queryip}\" --query_port \"${queryport}\"|jq") gamedigraw=$(gamedig --type "${querytype}" --host "${queryip}" --query_port "${queryport}") @@ -25,6 +29,10 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; querystatus=$(echo "${gamedigraw}" | jq '.error|length') fi + if [ "${querytype}" == "teamspeak3" ]; then + fn_info_game_ts3 + fi + # server name. gdname=$(echo "${gamedigraw}" | jq -re '.name') if [ "${gdname}" == "null" ]; then @@ -34,6 +42,8 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; # numplayers. if [ "${querytype}" == "minecraft" ]; then gdplayers=$(echo "${gamedigraw}" | jq -re '.players | length-1') + elif [ "${querytype}" == "teamspeak3" ]; then + gdplayers=$(echo "${gamedigraw}" | jq -re '.raw.virtualserver_clientsonline') else gdplayers=$(echo "${gamedigraw}" | jq -re '.players | length') fi @@ -70,7 +80,12 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; fi # server version. - gdversion=$(echo "${gamedigraw}" | jq -re '.raw.version') + if [ "${querytype}" == "teamspeak3" ]; then + dversion=$(echo "${gamedigraw}" | jq -re '.raw.virtualserver_version') + else + gdversion=$(echo "${gamedigraw}" | jq -re '.raw.version') + fi + if [ "${gdversion}" == "null" ]||[ "${gdversion}" == "0" ]; then unset gdversion fi diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index 9b47f763d..ef62e9724 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -923,7 +923,7 @@ echo -e "" echo -e "5.0 - Monitor Tests" echo -e "==================================================================" echo -e "" -info_config.sh +info_game.sh echo -e "Server IP - Port: ${ip}:${port}" echo -e "Server IP - Query Port: ${ip}:${queryport}" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index da0fd91ce..474d45f06 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -1082,7 +1082,7 @@ echo -e "" echo -e "5.0 - Monitor Tests" echo -e "==================================================================" echo -e "" -info_config.sh +info_game.sh echo -e "Server IP - Port: ${ip}:${port}" echo -e "Server IP - Query Port: ${ip}:${queryport}" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 501b64a43..b6d6217cd 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -945,7 +945,7 @@ echo -e "" echo -e "5.0 - Monitor Tests" echo -e "==================================================================" echo -e "" -info_config.sh +info_game.sh echo -e "Server IP - Port: ${ip}:${port}" echo -e "Server IP - Query Port: ${ip}:${queryport}" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index b9941598a..6d2b5d95f 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -922,7 +922,7 @@ echo -e "" echo -e "5.0 - Monitor Tests" echo -e "==================================================================" echo -e "" -info_config.sh +info_game.sh echo -e "Server IP - Port: ${ip}:${port}" echo -e "Server IP - Query Port: ${ip}:${queryport}" From dd3f554f1f2e7771b710e8c8a2a36e7cb4f7e4fa Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 4 Sep 2021 21:57:59 +0100 Subject: [PATCH 18/38] feat(stats): allow stats on which alerts are being used (#3550) * add alert stats and deprecate old analytics id * fix executable name with ss command * el in summary * updated ea name * prevent steamport from showing if not available steamport fix * remove non existent module --- lgsm/functions/core_functions.sh | 5 ---- lgsm/functions/info_game.sh | 5 ++-- lgsm/functions/info_messages.sh | 11 ++++---- lgsm/functions/info_stats.sh | 46 ++++++++++++++++++++++---------- 4 files changed, 40 insertions(+), 27 deletions(-) diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index dd82419a4..067ccff54 100755 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -523,11 +523,6 @@ functionfile="${FUNCNAME[0]}" fn_fetch_function } -info_gamedig.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function -} - info_messages.sh(){ functionfile="${FUNCNAME[0]}" fn_fetch_function diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index 2c3c52584..4b45ab417 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -1511,12 +1511,11 @@ fn_info_game_source(){ rconport=${port:-"0"} queryport=${port:-"0"} clientport=${clientport:-"0"} - # Steamport can be between 26901-26910 and is normaly automaticly set. + # Steamport can be between 26901-26910 and is normaly automatically set. # Some servers might support -steamport parameter to set - if [ "${steamport}" == "0" ]||[ -z "${steamport}" ]; then + if [ "${steamport}" == "0" ]||[ -v "${steamport}" ]; then steamport="$(echo "${ssinfo}" | grep "${srcdslinuxpid}" | awk '{print $5}' | grep ":269" | cut -d ":" -f2)" fi - steamport="${steamport:-"0"}" } fn_info_game_spark(){ diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index f68d12e4f..984db5b80 100755 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -686,7 +686,7 @@ fn_info_message_ports(){ elif [ "${engine}" == "goldsrc" ]; then echo -e "ss -tuplwn | grep hlds_linux" else - executableshort="$(echo "${executable//.\/}" | cut -c -15)" + executableshort="$(basename "${executable}" | cut -c -15)" echo -e "ss -tuplwn | grep ${executableshort}" fi echo -e "" @@ -1339,8 +1339,10 @@ fn_info_message_source(){ fn_port "Query" queryport tcp fn_port "RCON" rconport tcp fn_port "SourceTV" sourcetvport udp - # not manualy set by default more research needed - fn_port "Steam" steamport udp + # Will not show if unaviable + if [ "${steamport}" == "0" ]||[ -z "${steamport}" ]; then + fn_port "Steam" steamport udp + fi fn_port "Client" clientport udp } | column -s $'\t' -t } @@ -1713,8 +1715,7 @@ fn_info_message_select_engine(){ fn_info_message_spark elif [ "${engine}" == "unreal" ]; then fn_info_message_unreal - else - fn_print_error_nl "Unable to detect server engine." + fn_print_error_nl "Unable to detect game server." fi } diff --git a/lgsm/functions/info_stats.sh b/lgsm/functions/info_stats.sh index 211208717..03bebe420 100755 --- a/lgsm/functions/info_stats.sh +++ b/lgsm/functions/info_stats.sh @@ -62,40 +62,34 @@ memusedroundup="$(((memused + 99) / 100 * 100))" # Hardware Property - UA-165287622-3 ## Distro. -curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=distro" -d "ea=${distroname}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=distro" -d "ea=${distroname}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=distro" -d "ea=${distroname}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=distro" -d "ea=${distroname}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 ## Game Server Name. -curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=game" -d "ea=${gamename}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=game" -d "ea=${gamename}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=game" -d "ea=${gamename}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=game" -d "ea=${gamename}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 ## LinuxGSM Version. -curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=version" -d "ea=${version}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=version" -d "ea=${version}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=version" -d "ea=${version}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=version" -d "ea=${version}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 ## CPU usage of a game server. if [ -n "${cpuusedmhzroundup}" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=cpuused" -d "ea=${cpuusedmhzroundup}MHz" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=cpuused" -d "ea=${cpuusedmhzroundup}MHz" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=cpuused" -d "ea=${cpuusedmhzroundup}MHz" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=cpuused" -d "ea=${cpuusedmhzroundup}MHz" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 fi ## Ram usage of a game server. if [ -n "${memusedroundup}" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=ramused" -d "ea=${memusedroundup}MB" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=ramused" -d "ea=${memusedroundup}MB" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=ramused" -d "ea=${memusedroundup}MB" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=ramused" -d "ea=${memusedroundup}MB" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 fi ## Disk usage of a game server. if [ -n "${serverfilesdu}" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=diskused" -d "ea=${serverfilesdu}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=diskused" -d "ea=${serverfilesdu}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=diskused" -d "ea=${serverfilesdu}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=diskused" -d "ea=${serverfilesdu}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 @@ -103,7 +97,6 @@ fi ## CPU Model. if [ -n "${cpumodel}" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=servercpu" -d "ea=${cpumodel} ${cpucores} cores" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=servercpu" -d "ea=${cpumodel} ${cpucores} cores" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=servercpu" -d "ea=${cpumodel} ${cpucores} cores" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=servercpu" -d "ea=${cpumodel} ${cpucores} cores" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 @@ -112,7 +105,6 @@ fi ## CPU Frequency. if [ -n "${cpufreqency}" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=servercpufreq" -d "ea=${cpufreqency} x${cpucores}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=servercpufreq" -d "ea=${cpufreqency} x${cpucores}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=servercpufreq" -d "ea=${cpufreqency} x${cpucores}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=servercpufreq" -d "ea=${cpufreqency} x${cpucores}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 @@ -120,7 +112,6 @@ fi ## Server RAM. if [ -n "${physmemtotal}" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=serverram" -d "ea=${physmemtotal}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=serverram" -d "ea=${physmemtotal}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=serverram" -d "ea=${physmemtotal}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=serverram" -d "ea=${physmemtotal}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 @@ -128,17 +119,44 @@ fi ## Server Disk. if [ -n "${totalspace}" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=serverdisk" -d "ea=${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=serverdisk" -d "ea=${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=serverdisk" -d "ea=${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=serverdisk" -d "ea=${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 fi +## Alert Stats. +if [ "${discordalert}" == "on" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=Discord" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +fi +if [ "${emailalert}" == "on" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=Email" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +fi +if [ "${iftttalert}" == "on" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=IFTTT" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +fi +if [ "${mailgunalert}" == "on" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=Mailgun" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +fi +if [ "${pushbulletalert}" == "on" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=Pushbullet" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +fi +if [ "${pushoveralert}" == "on" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=Pushover" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +fi +if [ "${rocketchatalert}" == "on" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=Rocket Chat" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +fi +if [ "${slackalert}" == "on" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=Slack" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +fi +if [ "${telegramalert}" == "on" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=alert" -d "ea=Telegram" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +fi + ## Summary Stats -curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=summary" -d "ea=GAME: ${gamename} | DISTRO: ${distroname} | CPU MODEL: ${cpumodel} ${cpucores} cores | RAM: ${physmemtotal} | DISK: ${totalspace}" -d "v=1" > /dev/null 2>&1 -curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=summary" -d "ea=GAME: ${gamename} | DISTRO: ${distroname} | CPU MODEL: ${cpumodel} ${cpucores} cores | RAM: ${physmemtotal} | DISK: ${totalspace}" -d "v=1" > /dev/null 2>&1 -curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=summary" -d "ea=GAME: ${gamename} | DISTRO: ${distroname} | CPU MODEL: ${cpumodel} ${cpucores} cores | RAM: ${physmemtotal} | DISK: ${totalspace}" -d "v=1" > /dev/null 2>&1 -curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=summary" -d "ea=GAME: ${gamename} | DISTRO: ${distroname} | CPU MODEL: ${cpumodel} ${cpucores} cores | RAM: ${physmemtotal} | DISK: ${totalspace}" -d "v=1" > /dev/null 2>&1 +curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=summary" -d "ea=GAME: ${gamename} | DISTRO: ${distroname} | CPU MODEL: ${cpumodel} ${cpucores} cores | RAM: ${physmemtotal} | DISK: ${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=summary" -d "ea=GAME: ${gamename} | DISTRO: ${distroname} | CPU MODEL: ${cpumodel} ${cpucores} cores | RAM: ${physmemtotal} | DISK: ${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=summary" -d "ea=GAME: ${gamename} | DISTRO: ${distroname} | CPU MODEL: ${cpumodel} ${cpucores} cores | RAM: ${physmemtotal} | DISK: ${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 fn_script_log_info "Send LinuxGSM stats" fn_script_log_info "* uuid-${selfname}: ${uuidinstance}" From 9b325c7c265c3e87fef998a6b953372509ab13af Mon Sep 17 00:00:00 2001 From: AnthonyAMC Date: Sat, 4 Sep 2021 17:00:51 -0400 Subject: [PATCH 19/38] fix(perms): corrects tab (#3531) Removes erroneous TAB character. Fixes #3530 --- lgsm/functions/check_permissions.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/functions/check_permissions.sh b/lgsm/functions/check_permissions.sh index d4421dba1..4c8fda389 100755 --- a/lgsm/functions/check_permissions.sh +++ b/lgsm/functions/check_permissions.sh @@ -31,13 +31,13 @@ fn_check_ownership(){ { echo -e "User\tGroup\tFile\n" if [ "${selfownissue}" == "1" ]; then - find "${rootdir}/${selfname}" -not -user "$(whoami)" -printf "%u\t\t%g\t%p\n" + find "${rootdir}/${selfname}" -not -user "$(whoami)" -printf "%u\t%g\t%p\n" fi if [ "${funcownissue}" == "1" ]; then - find "${functionsdir}" -not -user "$(whoami)" -printf "%u\t\t%g\t%p\n" + find "${functionsdir}" -not -user "$(whoami)" -printf "%u\t%g\t%p\n" fi if [ "${filesownissue}" == "1" ]; then - find "${serverfiles}" -not -user "$(whoami)" -printf "%u\t\t%g\t%p\n" + find "${serverfiles}" -not -user "$(whoami)" -printf "%u\t%g\t%p\n" fi } | column -s $'\t' -t | tee -a "${lgsmlog}" From d9367755097f14834bf91492db64dabb6e9aea54 Mon Sep 17 00:00:00 2001 From: Christian Date: Sun, 5 Sep 2021 14:06:46 +0200 Subject: [PATCH 20/38] fix(mordhau): add config to startparameters (#3421) --- lgsm/config-default/config-lgsm/mhserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/mhserver/_default.cfg b/lgsm/config-default/config-lgsm/mhserver/_default.cfg index bb4847c00..fd8b8b1d0 100644 --- a/lgsm/config-default/config-lgsm/mhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mhserver/_default.cfg @@ -17,7 +17,7 @@ queryport="27015" defaultmap="FFA_ThePit" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="Mordhau ${defaultmap} -log -MultiHome=${ip} -Port=${port} -BeaconPort=${beaconport} -QueryPort=${queryport}" +startparameters="Mordhau ${defaultmap} -log -MultiHome=${ip} -Port=${port} -BeaconPort=${beaconport} -QueryPort=${queryport} -GameIni=${servercfgfullpath}" #### LinuxGSM Settings #### From 436c87de1918e92dc1558cfe8d29f663a33a2453 Mon Sep 17 00:00:00 2001 From: jamiew0w Date: Tue, 14 Sep 2021 21:20:10 +0000 Subject: [PATCH 21/38] feat(alerts): add Gotify support to alerts (#3509) * added gotify to default configs * added gotify to info_messages.sh * added gotify to core_function.sh * added gotify to alerts.sh * core of alert_gotify.sh * fixed unterminated string in default configs * fixed mistakes in alert_gotify.sh * fixed bad quoting in alert_gotify.sh * first working version, gotify does not like emojis * added back curl options * added catch for $gotifywebhook to alert.sh * tabs over spaces * standardised json * message Co-authored-by: Daniel Gibbs --- .../config-lgsm/acserver/_default.cfg | 5 ++++ .../config-lgsm/ahl2server/_default.cfg | 5 ++++ .../config-lgsm/ahlserver/_default.cfg | 5 ++++ .../config-lgsm/arkserver/_default.cfg | 5 ++++ .../config-lgsm/arma3server/_default.cfg | 5 ++++ .../config-lgsm/avserver/_default.cfg | 5 ++++ .../config-lgsm/bb2server/_default.cfg | 5 ++++ .../config-lgsm/bbserver/_default.cfg | 5 ++++ .../config-lgsm/bdserver/_default.cfg | 5 ++++ .../config-lgsm/bf1942server/_default.cfg | 5 ++++ .../config-lgsm/bfvserver/_default.cfg | 5 ++++ .../config-lgsm/bmdmserver/_default.cfg | 5 ++++ .../config-lgsm/boserver/_default.cfg | 5 ++++ .../config-lgsm/bsserver/_default.cfg | 5 ++++ .../config-lgsm/bt1944server/_default.cfg | 5 ++++ .../config-lgsm/btserver/_default.cfg | 5 ++++ .../config-lgsm/ccserver/_default.cfg | 5 ++++ .../config-lgsm/cmwserver/_default.cfg | 5 ++++ .../config-lgsm/cod2server/_default.cfg | 5 ++++ .../config-lgsm/cod4server/_default.cfg | 5 ++++ .../config-lgsm/codserver/_default.cfg | 5 ++++ .../config-lgsm/coduoserver/_default.cfg | 5 ++++ .../config-lgsm/codwawserver/_default.cfg | 5 ++++ .../config-lgsm/colserver/_default.cfg | 5 ++++ .../config-lgsm/csczserver/_default.cfg | 5 ++++ .../config-lgsm/csgoserver/_default.cfg | 5 ++++ .../config-lgsm/csserver/_default.cfg | 5 ++++ .../config-lgsm/cssserver/_default.cfg | 5 ++++ .../config-lgsm/dabserver/_default.cfg | 5 ++++ .../config-lgsm/dmcserver/_default.cfg | 5 ++++ .../config-lgsm/dodserver/_default.cfg | 5 ++++ .../config-lgsm/dodsserver/_default.cfg | 5 ++++ .../config-lgsm/doiserver/_default.cfg | 5 ++++ .../config-lgsm/dstserver/_default.cfg | 5 ++++ .../config-lgsm/dysserver/_default.cfg | 5 ++++ .../config-lgsm/ecoserver/_default.cfg | 5 ++++ .../config-lgsm/emserver/_default.cfg | 5 ++++ .../config-lgsm/etlserver/_default.cfg | 5 ++++ .../config-lgsm/fctrserver/_default.cfg | 5 ++++ .../config-lgsm/fofserver/_default.cfg | 5 ++++ .../config-lgsm/gmodserver/_default.cfg | 5 ++++ .../config-lgsm/hl2dmserver/_default.cfg | 5 ++++ .../config-lgsm/hldmserver/_default.cfg | 5 ++++ .../config-lgsm/hldmsserver/_default.cfg | 5 ++++ .../config-lgsm/hwserver/_default.cfg | 5 ++++ .../config-lgsm/insserver/_default.cfg | 5 ++++ .../config-lgsm/inssserver/_default.cfg | 5 ++++ .../config-lgsm/iosserver/_default.cfg | 5 ++++ .../config-lgsm/jc2server/_default.cfg | 5 ++++ .../config-lgsm/jc3server/_default.cfg | 5 ++++ .../config-lgsm/jk2server/_default.cfg | 5 ++++ .../config-lgsm/kf2server/_default.cfg | 5 ++++ .../config-lgsm/kfserver/_default.cfg | 5 ++++ .../config-lgsm/l4d2server/_default.cfg | 5 ++++ .../config-lgsm/l4dserver/_default.cfg | 5 ++++ .../config-lgsm/mcbserver/_default.cfg | 5 ++++ .../config-lgsm/mcserver/_default.cfg | 5 ++++ .../config-lgsm/mhserver/_default.cfg | 5 ++++ .../config-lgsm/mohaaserver/_default.cfg | 5 ++++ .../config-lgsm/momserver/_default.cfg | 5 ++++ .../config-lgsm/mtaserver/_default.cfg | 5 ++++ .../config-lgsm/mumbleserver/_default.cfg | 5 ++++ .../config-lgsm/ndserver/_default.cfg | 5 ++++ .../config-lgsm/nmrihserver/_default.cfg | 5 ++++ .../config-lgsm/ns2cserver/_default.cfg | 5 ++++ .../config-lgsm/ns2server/_default.cfg | 5 ++++ .../config-lgsm/nsserver/_default.cfg | 5 ++++ .../config-lgsm/onsetserver/_default.cfg | 5 ++++ .../config-lgsm/opforserver/_default.cfg | 5 ++++ .../config-lgsm/pcserver/_default.cfg | 5 ++++ .../config-lgsm/pmcserver/_default.cfg | 5 ++++ .../config-lgsm/pstbsserver/_default.cfg | 5 ++++ .../config-lgsm/pvkiiserver/_default.cfg | 5 ++++ .../config-lgsm/pvrserver/_default.cfg | 5 ++++ .../config-lgsm/pzserver/_default.cfg | 5 ++++ .../config-lgsm/q2server/_default.cfg | 5 ++++ .../config-lgsm/q3server/_default.cfg | 5 ++++ .../config-lgsm/qlserver/_default.cfg | 5 ++++ .../config-lgsm/qwserver/_default.cfg | 5 ++++ .../config-lgsm/ricochetserver/_default.cfg | 5 ++++ .../config-lgsm/roserver/_default.cfg | 5 ++++ .../config-lgsm/rtcwserver/_default.cfg | 5 ++++ .../config-lgsm/rustserver/_default.cfg | 5 ++++ .../config-lgsm/rwserver/_default.cfg | 5 ++++ .../config-lgsm/sampserver/_default.cfg | 5 ++++ .../config-lgsm/sbotsserver/_default.cfg | 5 ++++ .../config-lgsm/sbserver/_default.cfg | 5 ++++ .../config-lgsm/scpslserver/_default.cfg | 5 ++++ .../config-lgsm/scpslsmserver/_default.cfg | 5 ++++ .../config-lgsm/sdtdserver/_default.cfg | 5 ++++ .../config-lgsm/sfcserver/_default.cfg | 5 ++++ .../config-lgsm/sof2server/_default.cfg | 5 ++++ .../config-lgsm/solserver/_default.cfg | 5 ++++ .../config-lgsm/squadserver/_default.cfg | 5 ++++ .../config-lgsm/stserver/_default.cfg | 5 ++++ .../config-lgsm/svenserver/_default.cfg | 5 ++++ .../config-lgsm/terrariaserver/_default.cfg | 5 ++++ .../config-lgsm/tf2server/_default.cfg | 5 ++++ .../config-lgsm/tfcserver/_default.cfg | 5 ++++ .../config-lgsm/ts3server/_default.cfg | 5 ++++ .../config-lgsm/tsserver/_default.cfg | 5 ++++ .../config-lgsm/tuserver/_default.cfg | 5 ++++ .../config-lgsm/twserver/_default.cfg | 5 ++++ .../config-lgsm/untserver/_default.cfg | 5 ++++ .../config-lgsm/ut2k4server/_default.cfg | 5 ++++ .../config-lgsm/ut3server/_default.cfg | 5 ++++ .../config-lgsm/ut99server/_default.cfg | 5 ++++ .../config-lgsm/utserver/_default.cfg | 5 ++++ .../config-lgsm/vhserver/_default.cfg | 5 ++++ .../config-lgsm/vintsserver/_default.cfg | 5 ++++ .../config-lgsm/vsserver/_default.cfg | 5 ++++ .../config-lgsm/wetserver/_default.cfg | 5 ++++ .../config-lgsm/wfserver/_default.cfg | 5 ++++ .../config-lgsm/wmcserver/_default.cfg | 5 ++++ .../config-lgsm/wurmserver/_default.cfg | 5 ++++ .../config-lgsm/zmrserver/_default.cfg | 5 ++++ .../config-lgsm/zpsserver/_default.cfg | 5 ++++ lgsm/functions/alert.sh | 15 ++++++++++ lgsm/functions/alert_discord.sh | 7 +---- lgsm/functions/alert_gotify.sh | 29 +++++++++++++++++++ lgsm/functions/alert_ifttt.sh | 2 +- lgsm/functions/alert_pushbullet.sh | 2 +- lgsm/functions/alert_rocketchat.sh | 7 +---- lgsm/functions/alert_slack.sh | 7 +---- lgsm/functions/alert_telegram.sh | 2 +- lgsm/functions/core_functions.sh | 5 ++++ lgsm/functions/info_messages.sh | 3 ++ 127 files changed, 643 insertions(+), 21 deletions(-) create mode 100644 lgsm/functions/alert_gotify.sh diff --git a/lgsm/config-default/config-lgsm/acserver/_default.cfg b/lgsm/config-default/config-lgsm/acserver/_default.cfg index 6dbcf68e6..3b6776ef7 100644 --- a/lgsm/config-default/config-lgsm/acserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/acserver/_default.cfg @@ -43,6 +43,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ahl2server/_default.cfg b/lgsm/config-default/config-lgsm/ahl2server/_default.cfg index 533d827f1..a2552a95d 100644 --- a/lgsm/config-default/config-lgsm/ahl2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ahl2server/_default.cfg @@ -49,6 +49,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ahlserver/_default.cfg b/lgsm/config-default/config-lgsm/ahlserver/_default.cfg index 931d3bd4b..046aa0c11 100644 --- a/lgsm/config-default/config-lgsm/ahlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ahlserver/_default.cfg @@ -44,6 +44,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/arkserver/_default.cfg b/lgsm/config-default/config-lgsm/arkserver/_default.cfg index 57635b6d3..ea8b917af 100644 --- a/lgsm/config-default/config-lgsm/arkserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/arkserver/_default.cfg @@ -47,6 +47,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/arma3server/_default.cfg b/lgsm/config-default/config-lgsm/arma3server/_default.cfg index 7b338811a..1cdfe239a 100644 --- a/lgsm/config-default/config-lgsm/arma3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/arma3server/_default.cfg @@ -60,6 +60,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/avserver/_default.cfg b/lgsm/config-default/config-lgsm/avserver/_default.cfg index 2eef21849..76101b2a9 100644 --- a/lgsm/config-default/config-lgsm/avserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/avserver/_default.cfg @@ -45,6 +45,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/bb2server/_default.cfg b/lgsm/config-default/config-lgsm/bb2server/_default.cfg index 800379706..1e566b88b 100644 --- a/lgsm/config-default/config-lgsm/bb2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bb2server/_default.cfg @@ -50,6 +50,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/bbserver/_default.cfg b/lgsm/config-default/config-lgsm/bbserver/_default.cfg index 9576c708f..118f65547 100644 --- a/lgsm/config-default/config-lgsm/bbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bbserver/_default.cfg @@ -44,6 +44,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/bdserver/_default.cfg b/lgsm/config-default/config-lgsm/bdserver/_default.cfg index f1ae81a1f..eef61562c 100644 --- a/lgsm/config-default/config-lgsm/bdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bdserver/_default.cfg @@ -44,6 +44,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg index 12f9ea76c..c6da048f9 100644 --- a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg @@ -37,6 +37,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/bfvserver/_default.cfg b/lgsm/config-default/config-lgsm/bfvserver/_default.cfg index f8d7994e2..9acc98e5b 100644 --- a/lgsm/config-default/config-lgsm/bfvserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bfvserver/_default.cfg @@ -37,6 +37,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg index 2921250d7..bd8145df3 100644 --- a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg @@ -50,6 +50,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/boserver/_default.cfg b/lgsm/config-default/config-lgsm/boserver/_default.cfg index dd779cd6a..f2c2a3b03 100644 --- a/lgsm/config-default/config-lgsm/boserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/boserver/_default.cfg @@ -43,6 +43,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/bsserver/_default.cfg b/lgsm/config-default/config-lgsm/bsserver/_default.cfg index 8a9af8b1a..41ab3fba7 100644 --- a/lgsm/config-default/config-lgsm/bsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bsserver/_default.cfg @@ -54,6 +54,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/bt1944server/_default.cfg b/lgsm/config-default/config-lgsm/bt1944server/_default.cfg index aa4785985..78032cfe0 100644 --- a/lgsm/config-default/config-lgsm/bt1944server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bt1944server/_default.cfg @@ -42,6 +42,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/btserver/_default.cfg b/lgsm/config-default/config-lgsm/btserver/_default.cfg index dd695ec70..11e175c18 100644 --- a/lgsm/config-default/config-lgsm/btserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/btserver/_default.cfg @@ -37,6 +37,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ccserver/_default.cfg b/lgsm/config-default/config-lgsm/ccserver/_default.cfg index c9ceb5f5f..10ba0f8af 100644 --- a/lgsm/config-default/config-lgsm/ccserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ccserver/_default.cfg @@ -45,6 +45,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/cmwserver/_default.cfg b/lgsm/config-default/config-lgsm/cmwserver/_default.cfg index da790a356..435bde1ea 100644 --- a/lgsm/config-default/config-lgsm/cmwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/cmwserver/_default.cfg @@ -43,6 +43,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/cod2server/_default.cfg b/lgsm/config-default/config-lgsm/cod2server/_default.cfg index 611a8a086..fca571d93 100644 --- a/lgsm/config-default/config-lgsm/cod2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod2server/_default.cfg @@ -43,6 +43,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/cod4server/_default.cfg b/lgsm/config-default/config-lgsm/cod4server/_default.cfg index 30dfbd177..8389feb3c 100644 --- a/lgsm/config-default/config-lgsm/cod4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod4server/_default.cfg @@ -43,6 +43,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/codserver/_default.cfg b/lgsm/config-default/config-lgsm/codserver/_default.cfg index 7e22c1707..34883c0a1 100644 --- a/lgsm/config-default/config-lgsm/codserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codserver/_default.cfg @@ -43,6 +43,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg index 19ba2098b..3b922967d 100644 --- a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg @@ -43,6 +43,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg index 427237992..58dec3f7a 100644 --- a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg @@ -43,6 +43,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/colserver/_default.cfg b/lgsm/config-default/config-lgsm/colserver/_default.cfg index 85a1aab06..b9bd78594 100644 --- a/lgsm/config-default/config-lgsm/colserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/colserver/_default.cfg @@ -38,6 +38,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/csczserver/_default.cfg b/lgsm/config-default/config-lgsm/csczserver/_default.cfg index 5edbaee9c..61767765b 100644 --- a/lgsm/config-default/config-lgsm/csczserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csczserver/_default.cfg @@ -44,6 +44,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg index 564ac84a3..ae82d2a94 100644 --- a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg @@ -71,6 +71,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/csserver/_default.cfg b/lgsm/config-default/config-lgsm/csserver/_default.cfg index a72d3b3cd..83a6101da 100644 --- a/lgsm/config-default/config-lgsm/csserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csserver/_default.cfg @@ -44,6 +44,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/cssserver/_default.cfg b/lgsm/config-default/config-lgsm/cssserver/_default.cfg index a8b6b122b..e06da982c 100644 --- a/lgsm/config-default/config-lgsm/cssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/cssserver/_default.cfg @@ -50,6 +50,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/dabserver/_default.cfg b/lgsm/config-default/config-lgsm/dabserver/_default.cfg index 61050282e..377ab85ff 100644 --- a/lgsm/config-default/config-lgsm/dabserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dabserver/_default.cfg @@ -45,6 +45,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/dmcserver/_default.cfg b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg index 335ba7b56..b8d7d382c 100644 --- a/lgsm/config-default/config-lgsm/dmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg @@ -44,6 +44,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/dodserver/_default.cfg b/lgsm/config-default/config-lgsm/dodserver/_default.cfg index 1e87b20b6..12076ed80 100644 --- a/lgsm/config-default/config-lgsm/dodserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodserver/_default.cfg @@ -44,6 +44,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/dodsserver/_default.cfg b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg index 87caa5a69..b938891db 100644 --- a/lgsm/config-default/config-lgsm/dodsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg @@ -45,6 +45,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/doiserver/_default.cfg b/lgsm/config-default/config-lgsm/doiserver/_default.cfg index 2099d2296..f1eac4968 100644 --- a/lgsm/config-default/config-lgsm/doiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/doiserver/_default.cfg @@ -46,6 +46,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/dstserver/_default.cfg b/lgsm/config-default/config-lgsm/dstserver/_default.cfg index 766b3a706..fa6c79315 100644 --- a/lgsm/config-default/config-lgsm/dstserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dstserver/_default.cfg @@ -48,6 +48,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/dysserver/_default.cfg b/lgsm/config-default/config-lgsm/dysserver/_default.cfg index 59d36fa9f..8ac508ca9 100644 --- a/lgsm/config-default/config-lgsm/dysserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dysserver/_default.cfg @@ -50,6 +50,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg index d99a754d2..db4669132 100644 --- a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg @@ -37,6 +37,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/emserver/_default.cfg b/lgsm/config-default/config-lgsm/emserver/_default.cfg index 6e782cc24..f10a8a437 100644 --- a/lgsm/config-default/config-lgsm/emserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/emserver/_default.cfg @@ -50,6 +50,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/etlserver/_default.cfg b/lgsm/config-default/config-lgsm/etlserver/_default.cfg index dec02d4b3..488fe649a 100644 --- a/lgsm/config-default/config-lgsm/etlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/etlserver/_default.cfg @@ -37,6 +37,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/fctrserver/_default.cfg b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg index b6d1fcd34..9f010510e 100644 --- a/lgsm/config-default/config-lgsm/fctrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg @@ -45,6 +45,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/fofserver/_default.cfg b/lgsm/config-default/config-lgsm/fofserver/_default.cfg index 736d78ca8..3c2adf8af 100644 --- a/lgsm/config-default/config-lgsm/fofserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/fofserver/_default.cfg @@ -45,6 +45,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg index ed8b2f8e8..1f569df9c 100644 --- a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg @@ -57,6 +57,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg index 6c268b108..3b2b69a58 100644 --- a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg @@ -45,6 +45,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/hldmserver/_default.cfg b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg index 361c1f7b7..f595afc2a 100644 --- a/lgsm/config-default/config-lgsm/hldmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg @@ -44,6 +44,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg index 127519b40..59aada076 100644 --- a/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg @@ -45,6 +45,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/hwserver/_default.cfg b/lgsm/config-default/config-lgsm/hwserver/_default.cfg index 793e3d77c..1d54b8eb2 100644 --- a/lgsm/config-default/config-lgsm/hwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hwserver/_default.cfg @@ -56,6 +56,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/insserver/_default.cfg b/lgsm/config-default/config-lgsm/insserver/_default.cfg index 6dbf464ce..c7adf3e65 100644 --- a/lgsm/config-default/config-lgsm/insserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/insserver/_default.cfg @@ -51,6 +51,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/inssserver/_default.cfg b/lgsm/config-default/config-lgsm/inssserver/_default.cfg index 1dbc0889f..66678d284 100644 --- a/lgsm/config-default/config-lgsm/inssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/inssserver/_default.cfg @@ -49,6 +49,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/iosserver/_default.cfg b/lgsm/config-default/config-lgsm/iosserver/_default.cfg index 6ba806960..c81bc4002 100644 --- a/lgsm/config-default/config-lgsm/iosserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/iosserver/_default.cfg @@ -45,6 +45,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/jc2server/_default.cfg b/lgsm/config-default/config-lgsm/jc2server/_default.cfg index d57520398..01043a35e 100644 --- a/lgsm/config-default/config-lgsm/jc2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc2server/_default.cfg @@ -37,6 +37,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/jc3server/_default.cfg b/lgsm/config-default/config-lgsm/jc3server/_default.cfg index 46ab112a4..a1aacafb5 100644 --- a/lgsm/config-default/config-lgsm/jc3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc3server/_default.cfg @@ -37,6 +37,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/jk2server/_default.cfg b/lgsm/config-default/config-lgsm/jk2server/_default.cfg index a6bf4f7b1..700ba8fbb 100644 --- a/lgsm/config-default/config-lgsm/jk2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jk2server/_default.cfg @@ -46,6 +46,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/kf2server/_default.cfg b/lgsm/config-default/config-lgsm/kf2server/_default.cfg index 5617a4cf5..a60bbd1a2 100644 --- a/lgsm/config-default/config-lgsm/kf2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/kf2server/_default.cfg @@ -43,6 +43,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/kfserver/_default.cfg b/lgsm/config-default/config-lgsm/kfserver/_default.cfg index d1a672dcc..74ffea9af 100644 --- a/lgsm/config-default/config-lgsm/kfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/kfserver/_default.cfg @@ -49,6 +49,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/l4d2server/_default.cfg b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg index 5d947eca0..4fb938983 100644 --- a/lgsm/config-default/config-lgsm/l4d2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg @@ -44,6 +44,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/l4dserver/_default.cfg b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg index 0f1b2f4a4..838a65efb 100644 --- a/lgsm/config-default/config-lgsm/l4dserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg @@ -44,6 +44,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/mcbserver/_default.cfg b/lgsm/config-default/config-lgsm/mcbserver/_default.cfg index d5ad3b59f..8ccd2e658 100644 --- a/lgsm/config-default/config-lgsm/mcbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mcbserver/_default.cfg @@ -37,6 +37,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/mcserver/_default.cfg b/lgsm/config-default/config-lgsm/mcserver/_default.cfg index 6cbdd8e15..fd7b8a71e 100644 --- a/lgsm/config-default/config-lgsm/mcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mcserver/_default.cfg @@ -46,6 +46,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/mhserver/_default.cfg b/lgsm/config-default/config-lgsm/mhserver/_default.cfg index fd8b8b1d0..81ab22a95 100644 --- a/lgsm/config-default/config-lgsm/mhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mhserver/_default.cfg @@ -45,6 +45,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg index 9ab26b75a..a9f5fc840 100644 --- a/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg @@ -42,6 +42,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/momserver/_default.cfg b/lgsm/config-default/config-lgsm/momserver/_default.cfg index c4f469c61..a19d077fe 100644 --- a/lgsm/config-default/config-lgsm/momserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/momserver/_default.cfg @@ -43,6 +43,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg index 027aa8cef..ac7d4e939 100644 --- a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg @@ -41,6 +41,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg b/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg index 0fe4ffabc..fdb06bfe8 100644 --- a/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg @@ -37,6 +37,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ndserver/_default.cfg b/lgsm/config-default/config-lgsm/ndserver/_default.cfg index ee43d1f5d..9653eb52b 100644 --- a/lgsm/config-default/config-lgsm/ndserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ndserver/_default.cfg @@ -45,6 +45,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg index c3594cec8..5f412cd4d 100644 --- a/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg @@ -50,6 +50,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg index f6e717698..73cf810f1 100644 --- a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg @@ -52,6 +52,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ns2server/_default.cfg b/lgsm/config-default/config-lgsm/ns2server/_default.cfg index a4b93ad93..2d7a64cbe 100644 --- a/lgsm/config-default/config-lgsm/ns2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2server/_default.cfg @@ -56,6 +56,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/nsserver/_default.cfg b/lgsm/config-default/config-lgsm/nsserver/_default.cfg index 6ef66dc68..4292b1f2a 100644 --- a/lgsm/config-default/config-lgsm/nsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/nsserver/_default.cfg @@ -44,6 +44,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/onsetserver/_default.cfg b/lgsm/config-default/config-lgsm/onsetserver/_default.cfg index fc795cc6a..172953609 100644 --- a/lgsm/config-default/config-lgsm/onsetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/onsetserver/_default.cfg @@ -37,6 +37,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/opforserver/_default.cfg b/lgsm/config-default/config-lgsm/opforserver/_default.cfg index ccd430e6f..d10367f63 100644 --- a/lgsm/config-default/config-lgsm/opforserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/opforserver/_default.cfg @@ -44,6 +44,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/pcserver/_default.cfg b/lgsm/config-default/config-lgsm/pcserver/_default.cfg index 231948872..cb82ffca5 100644 --- a/lgsm/config-default/config-lgsm/pcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pcserver/_default.cfg @@ -37,6 +37,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/pmcserver/_default.cfg b/lgsm/config-default/config-lgsm/pmcserver/_default.cfg index 8369b782c..704d63ff3 100644 --- a/lgsm/config-default/config-lgsm/pmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pmcserver/_default.cfg @@ -44,6 +44,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg index 2a8a9cbc6..80a066b2f 100644 --- a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg @@ -47,6 +47,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg index 7003c4a8e..1689af811 100644 --- a/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg @@ -45,6 +45,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/pvrserver/_default.cfg b/lgsm/config-default/config-lgsm/pvrserver/_default.cfg index ed65d0f2f..45a2b8fbd 100644 --- a/lgsm/config-default/config-lgsm/pvrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pvrserver/_default.cfg @@ -44,6 +44,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/pzserver/_default.cfg b/lgsm/config-default/config-lgsm/pzserver/_default.cfg index 720db40d5..a9dfb40b2 100644 --- a/lgsm/config-default/config-lgsm/pzserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pzserver/_default.cfg @@ -41,6 +41,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/q2server/_default.cfg b/lgsm/config-default/config-lgsm/q2server/_default.cfg index cc11f34a8..ea1061a70 100644 --- a/lgsm/config-default/config-lgsm/q2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/q2server/_default.cfg @@ -42,6 +42,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/q3server/_default.cfg b/lgsm/config-default/config-lgsm/q3server/_default.cfg index e7c003815..5621dec15 100644 --- a/lgsm/config-default/config-lgsm/q3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/q3server/_default.cfg @@ -42,6 +42,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/qlserver/_default.cfg b/lgsm/config-default/config-lgsm/qlserver/_default.cfg index 69ed4d662..c2c0d0f24 100644 --- a/lgsm/config-default/config-lgsm/qlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/qlserver/_default.cfg @@ -37,6 +37,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/qwserver/_default.cfg b/lgsm/config-default/config-lgsm/qwserver/_default.cfg index 7f5484895..9435b2199 100644 --- a/lgsm/config-default/config-lgsm/qwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/qwserver/_default.cfg @@ -41,6 +41,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg index 93a9a8432..d36a4c1f2 100644 --- a/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg @@ -44,6 +44,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/roserver/_default.cfg b/lgsm/config-default/config-lgsm/roserver/_default.cfg index 36ad5d5e8..58e3f4fe9 100644 --- a/lgsm/config-default/config-lgsm/roserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/roserver/_default.cfg @@ -45,6 +45,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg b/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg index 54571e2af..847c8a1dd 100644 --- a/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg @@ -42,6 +42,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/rustserver/_default.cfg b/lgsm/config-default/config-lgsm/rustserver/_default.cfg index c956b492c..7be5cd21d 100644 --- a/lgsm/config-default/config-lgsm/rustserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rustserver/_default.cfg @@ -55,6 +55,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/rwserver/_default.cfg b/lgsm/config-default/config-lgsm/rwserver/_default.cfg index 0ff3726ba..f1c09e189 100644 --- a/lgsm/config-default/config-lgsm/rwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rwserver/_default.cfg @@ -40,6 +40,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/sampserver/_default.cfg b/lgsm/config-default/config-lgsm/sampserver/_default.cfg index d1add1c0e..6883fe589 100644 --- a/lgsm/config-default/config-lgsm/sampserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sampserver/_default.cfg @@ -41,6 +41,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg index 438a37e0a..6805d6395 100644 --- a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg @@ -45,6 +45,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/sbserver/_default.cfg b/lgsm/config-default/config-lgsm/sbserver/_default.cfg index 03093c44c..13815fbcb 100644 --- a/lgsm/config-default/config-lgsm/sbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbserver/_default.cfg @@ -44,6 +44,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/scpslserver/_default.cfg b/lgsm/config-default/config-lgsm/scpslserver/_default.cfg index 871d8d18c..ac948d864 100644 --- a/lgsm/config-default/config-lgsm/scpslserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/scpslserver/_default.cfg @@ -42,6 +42,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg b/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg index 7a4c80253..285bd0a49 100644 --- a/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg @@ -42,6 +42,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg index 7c985a636..bd922057b 100644 --- a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg @@ -40,6 +40,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/sfcserver/_default.cfg b/lgsm/config-default/config-lgsm/sfcserver/_default.cfg index 8dc17afb9..5b1071a3b 100644 --- a/lgsm/config-default/config-lgsm/sfcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sfcserver/_default.cfg @@ -45,6 +45,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/sof2server/_default.cfg b/lgsm/config-default/config-lgsm/sof2server/_default.cfg index 36922b437..094754914 100644 --- a/lgsm/config-default/config-lgsm/sof2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/sof2server/_default.cfg @@ -42,6 +42,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/solserver/_default.cfg b/lgsm/config-default/config-lgsm/solserver/_default.cfg index 6ce6ce1cf..820492509 100644 --- a/lgsm/config-default/config-lgsm/solserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/solserver/_default.cfg @@ -41,6 +41,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/squadserver/_default.cfg b/lgsm/config-default/config-lgsm/squadserver/_default.cfg index a4d8496d8..1adfe68e0 100644 --- a/lgsm/config-default/config-lgsm/squadserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/squadserver/_default.cfg @@ -42,6 +42,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/stserver/_default.cfg b/lgsm/config-default/config-lgsm/stserver/_default.cfg index c58182cdd..8c0f0dbf9 100644 --- a/lgsm/config-default/config-lgsm/stserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/stserver/_default.cfg @@ -47,6 +47,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/svenserver/_default.cfg b/lgsm/config-default/config-lgsm/svenserver/_default.cfg index 1d7b97c7f..f8feb47f4 100644 --- a/lgsm/config-default/config-lgsm/svenserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/svenserver/_default.cfg @@ -44,6 +44,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg index 27306d89e..c0aaea6c6 100644 --- a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg @@ -44,6 +44,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/tf2server/_default.cfg b/lgsm/config-default/config-lgsm/tf2server/_default.cfg index 72f79304d..16ab36696 100644 --- a/lgsm/config-default/config-lgsm/tf2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/tf2server/_default.cfg @@ -50,6 +50,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg index a9339fda9..b22c10a7c 100644 --- a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg @@ -44,6 +44,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ts3server/_default.cfg b/lgsm/config-default/config-lgsm/ts3server/_default.cfg index 694b0501f..f676309d0 100644 --- a/lgsm/config-default/config-lgsm/ts3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ts3server/_default.cfg @@ -37,6 +37,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/tsserver/_default.cfg b/lgsm/config-default/config-lgsm/tsserver/_default.cfg index b9ad02e2b..c1c99b24a 100644 --- a/lgsm/config-default/config-lgsm/tsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tsserver/_default.cfg @@ -44,6 +44,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/tuserver/_default.cfg b/lgsm/config-default/config-lgsm/tuserver/_default.cfg index c0a119abe..5fdfd6447 100644 --- a/lgsm/config-default/config-lgsm/tuserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tuserver/_default.cfg @@ -47,6 +47,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/twserver/_default.cfg b/lgsm/config-default/config-lgsm/twserver/_default.cfg index c8a53240e..791c93da5 100644 --- a/lgsm/config-default/config-lgsm/twserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/twserver/_default.cfg @@ -44,6 +44,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/untserver/_default.cfg b/lgsm/config-default/config-lgsm/untserver/_default.cfg index 507005e58..e57f08f57 100644 --- a/lgsm/config-default/config-lgsm/untserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/untserver/_default.cfg @@ -43,6 +43,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg index cba690fd7..b3ca481cd 100644 --- a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg @@ -41,6 +41,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ut3server/_default.cfg b/lgsm/config-default/config-lgsm/ut3server/_default.cfg index 727e79df7..49cd6b7d5 100644 --- a/lgsm/config-default/config-lgsm/ut3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut3server/_default.cfg @@ -57,6 +57,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/ut99server/_default.cfg b/lgsm/config-default/config-lgsm/ut99server/_default.cfg index c0bb5619a..205e8a1d7 100644 --- a/lgsm/config-default/config-lgsm/ut99server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut99server/_default.cfg @@ -41,6 +41,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/utserver/_default.cfg b/lgsm/config-default/config-lgsm/utserver/_default.cfg index ed19edd39..6b6603221 100644 --- a/lgsm/config-default/config-lgsm/utserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/utserver/_default.cfg @@ -45,6 +45,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/vhserver/_default.cfg b/lgsm/config-default/config-lgsm/vhserver/_default.cfg index 096faf2a4..286be4787 100644 --- a/lgsm/config-default/config-lgsm/vhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vhserver/_default.cfg @@ -46,6 +46,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/vintsserver/_default.cfg b/lgsm/config-default/config-lgsm/vintsserver/_default.cfg index 42b6c42fa..7009f02cb 100644 --- a/lgsm/config-default/config-lgsm/vintsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vintsserver/_default.cfg @@ -41,6 +41,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/vsserver/_default.cfg b/lgsm/config-default/config-lgsm/vsserver/_default.cfg index dace8b1ab..a441abd01 100644 --- a/lgsm/config-default/config-lgsm/vsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vsserver/_default.cfg @@ -44,6 +44,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/wetserver/_default.cfg b/lgsm/config-default/config-lgsm/wetserver/_default.cfg index 296b7bd16..012b2df1c 100644 --- a/lgsm/config-default/config-lgsm/wetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wetserver/_default.cfg @@ -37,6 +37,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/wfserver/_default.cfg b/lgsm/config-default/config-lgsm/wfserver/_default.cfg index 5bb63c67f..eeedf5f18 100644 --- a/lgsm/config-default/config-lgsm/wfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wfserver/_default.cfg @@ -42,6 +42,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/wmcserver/_default.cfg b/lgsm/config-default/config-lgsm/wmcserver/_default.cfg index b0df8cbfd..229d7bef5 100644 --- a/lgsm/config-default/config-lgsm/wmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wmcserver/_default.cfg @@ -44,6 +44,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg index 49b342436..a70fa371f 100644 --- a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg @@ -38,6 +38,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/zmrserver/_default.cfg b/lgsm/config-default/config-lgsm/zmrserver/_default.cfg index b5bfa3359..4b87f9172 100644 --- a/lgsm/config-default/config-lgsm/zmrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/zmrserver/_default.cfg @@ -45,6 +45,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/zpsserver/_default.cfg b/lgsm/config-default/config-lgsm/zpsserver/_default.cfg index bf3c26e22..a5fc616cf 100644 --- a/lgsm/config-default/config-lgsm/zpsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/zpsserver/_default.cfg @@ -50,6 +50,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/functions/alert.sh b/lgsm/functions/alert.sh index 782c6e9a4..c62c65556 100755 --- a/lgsm/functions/alert.sh +++ b/lgsm/functions/alert.sh @@ -141,6 +141,21 @@ elif [ -z "${email}" ]&&[ "${commandname}" == "TEST-ALERT" ]; then fn_script_log_error "Email not set" fi +if [ "${gotifyalert}" == "on" ]&&[ -n "${gotifyalert}" ]; then + alert_gotify.sh +elif [ "${gotifyalert}" != "on" ]&&[ "${commandname}" == "TEST-ALERT" ]; then + fn_print_warn_nl "Gotify alerts not enabled" + fn_script_log_warn "Gotify alerts not enabled" +elif [ -z "${gotifytoken}" ]&&[ "${commandname}" == "TEST-ALERT" ]; then + fn_print_error_nl "Gotify token not set" + echo -e "* https://docs.linuxgsm.com/alerts/gotify" + fn_script_error "Gotify token not set" +elif [ -z "${gotifywebhook}" ]&&[ "${commandname}" == "TEST-ALERT" ]; then + fn_print_error_nl "Gotify webhook not set" + echo -e "* https://docs.linuxgsm.com/alerts/gotify" + fn_script_error "Gotify webhook not set" +fi + if [ "${iftttalert}" == "on" ]&&[ -n "${iftttalert}" ]; then alert_ifttt.sh elif [ "${iftttalert}" != "on" ]&&[ "${commandname}" == "TEST-ALERT" ]; then diff --git a/lgsm/functions/alert_discord.sh b/lgsm/functions/alert_discord.sh index 1d047b60b..9db56da3f 100755 --- a/lgsm/functions/alert_discord.sh +++ b/lgsm/functions/alert_discord.sh @@ -7,11 +7,6 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -if ! command -v jq > /dev/null; then - fn_print_fail_nl "Sending Discord alert: jq is missing." - fn_script_log_fatal "Sending Discord alert: jq is missing." -fi - json=$(cat < /dev/null; then - fn_print_fail_nl "Sending Rocketchat alert: jq is missing." - fn_script_log_fatal "Sending Rocketchat alert: jq is missing." -fi - json=$(cat < /dev/null; then - fn_print_fail_nl "Sending Slack alert: jq is missing." - fn_script_log_fatal "Sending Slack alert: jq is missing." -fi - json=$(cat < Date: Mon, 20 Sep 2021 22:10:11 +0200 Subject: [PATCH 22/38] feat(dodr): Day of Dragons (#3351) * feat(dodr): add new server * updated query * update info Co-authored-by: Daniel Gibbs --- .../config-lgsm/dodrserver/_default.cfg | 181 ++++++++++++++++++ lgsm/data/serverlist.csv | 1 + lgsm/functions/info_game.sh | 13 ++ lgsm/functions/install_config.sh | 6 + 4 files changed, 201 insertions(+) create mode 100644 lgsm/config-default/config-lgsm/dodrserver/_default.cfg diff --git a/lgsm/config-default/config-lgsm/dodrserver/_default.cfg b/lgsm/config-default/config-lgsm/dodrserver/_default.cfg new file mode 100644 index 000000000..00f2c11f5 --- /dev/null +++ b/lgsm/config-default/config-lgsm/dodrserver/_default.cfg @@ -0,0 +1,181 @@ +################################## +######## 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" +ip="0.0.0.0" +port="7777" +queryport="27015" + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="-MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -SteamServerName='${servername}' -log" + +#### LinuxGSM Settings #### + +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + +## Notification Alerts +# (on|off) + +# Display IP | https://docs.linuxgsm.com/alerts#display-ip +displayip="" + +# More info | https://docs.linuxgsm.com/alerts#more-info +postalert="off" + +# Discord Alerts | https://docs.linuxgsm.com/alerts/discord +discordalert="off" +discordwebhook="webhook" + +# Email Alerts | https://docs.linuxgsm.com/alerts/email +emailalert="off" +email="email@example.com" +emailfrom="" + +# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun +mailgunalert="off" +mailgunapiregion="us" +mailguntoken="accesstoken" +mailgundomain="example.com" +mailgunemailfrom="alert@example.com" +mailgunemail="email@myemail.com" + +# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover +pushoveralert="off" +pushovertoken="accesstoken" +pushoveruserkey="userkey" + +# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat +rocketchatalert="off" +rocketchatwebhook="webhook" +rocketchattoken="" + +# Slack Alerts | https://docs.linuxgsm.com/alerts/slack +slackalert="off" +slackwebhook="webhook" + +# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram +# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +telegramapi="api.telegram.org" +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +curlcustomstring="" + +## Updating | https://docs.linuxgsm.com/commands/update +updateonstart="off" + +## Backup | https://docs.linuxgsm.com/commands/backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://docs.linuxgsm.com/features/logging +consolelogging="on" +logdays="7" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="1" + +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors +ansi="on" + +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time +sleeptime="0.5" + +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd +# Server appid +appid="1088320" +steamcmdforcewindows="no" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +betapassword="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="false" + +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode +# 1: tmux kill +# 2: CTRL+c +# 3: quit +# 4: quit 120s +# 5: stop +# 6: q +# 7: exit +# 8: 7 Days to Die +# 9: GoldSrc +# 10: Avorion +# 11: end +stopmode="2" + +## Query mode +# 1: session only +# 2: gamedig (gsquery fallback) +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Console type +consoleverbose="yes" +consoleinteract="no" + +## Game Server Details +# Do not edit +gamename="Day of Dragons" +engine="unreal4" +glibc="2.17" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}/Dragons" +executabledir="${systemdir}/Binaries/Linux" +executable="./DragonsServer-Linux-Shipping" +servercfgdir="${systemdir}/Saved/Config/LinuxServer" +servercfg="Game.ini" +servercfgdefault="Game.ini" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/Saved/Logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 524826a33..ce3d2e85d 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -29,6 +29,7 @@ css,cssserver,Counter-Strike: Source dab,dabserver,Double Action: Boogaloo dmc,dmcserver,Deathmatch Classic dod,dodserver,Day of Defeat +dodr,dodrserver,Day of Dragons dods,dodsserver,Day of Defeat: Source doi,doiserver,Day of Infamy dst,dstserver,Don't Starve Together diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index 4b45ab417..295daa55d 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -356,6 +356,17 @@ fn_info_game_col(){ fi } +fn_info_game_dodr(){ + if [ ! -f "${servercfgfullpath}" ]; then + maxplayers="${zero}" + else + maxplayers=$(sed -nr 's/^iServerMaxPlayers=(.*)$/\1/p' "${servercfgfullpath}") + + # Not Set + maxplayers=${maxplayers:-"NOT SET"} + fi +} + fn_info_game_dst(){ # Config if [ ! -f "${clustercfgfullpath}" ]; then @@ -2036,6 +2047,8 @@ elif [ "${shortname}" == "codwaw" ]; then fn_info_game_codwaw elif [ "${shortname}" == "col" ]; then fn_info_game_col +elif [ "${shortname}" == "dodr" ]; then + fn_info_game_dodr elif [ "${shortname}" == "dst" ]; then fn_info_game_dst elif [ "${shortname}" == "eco" ]; then diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 9b5ef01cd..73e45929e 100755 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -359,6 +359,12 @@ elif [ "${shortname}" == "dod" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations +elif [ "${shortname}" == "dodr" ]; then + gamedirname="DayOfDragons" + array_configs+=( Game.ini ) + fn_fetch_default_config + fn_default_config_remote + fn_list_config_locations elif [ "${shortname}" == "dods" ]; then gamedirname="DayOfDefeatSource" array_configs+=( server.cfg ) From eaefc57131cd4a114c797d5b49b7f271d5cfdc63 Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 20 Sep 2021 23:52:34 +0200 Subject: [PATCH 23/38] feat(newserver): Survive the Nights (#3427) * feat(newserver): Survive the Nights * add gotify * update info_config * verbose console * added missing dodr stuff Co-authored-by: Daniel Gibbs --- .../config-lgsm/dodrserver/_default.cfg | 5 + .../config-lgsm/stnserver/_default.cfg | 186 ++++++++++++++++++ lgsm/data/serverlist.csv | 1 + lgsm/functions/info_game.sh | 18 ++ lgsm/functions/info_messages.sh | 22 ++- lgsm/functions/install_config.sh | 7 + 6 files changed, 238 insertions(+), 1 deletion(-) create mode 100644 lgsm/config-default/config-lgsm/stnserver/_default.cfg diff --git a/lgsm/config-default/config-lgsm/dodrserver/_default.cfg b/lgsm/config-default/config-lgsm/dodrserver/_default.cfg index 00f2c11f5..3bf88cf46 100644 --- a/lgsm/config-default/config-lgsm/dodrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodrserver/_default.cfg @@ -43,6 +43,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" diff --git a/lgsm/config-default/config-lgsm/stnserver/_default.cfg b/lgsm/config-default/config-lgsm/stnserver/_default.cfg new file mode 100644 index 000000000..339d1ee22 --- /dev/null +++ b/lgsm/config-default/config-lgsm/stnserver/_default.cfg @@ -0,0 +1,186 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! +# Copy settings from here and use them in either: +# common.cfg - applies settings to every instance. +# [instance].cfg - applies settings to a specific instance. + +#### Game Server Settings #### +maxplayers="20" +# Regions: USA: 0, EU: 1, AUS: 2 +region="0" + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +# Edit with care | https://colonysurvival.gamepedia.com/Dedicated_Server#Installation_.28Linux.29 +startparameters="-mc ${maxplayers} -r ${region}" + +#### LinuxGSM Settings #### + +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + +## Notification Alerts +# (on|off) + +# Display IP | https://docs.linuxgsm.com/alerts#display-ip +displayip="" + +# More info | https://docs.linuxgsm.com/alerts#more-info +postalert="off" + +# Discord Alerts | https://docs.linuxgsm.com/alerts/discord +discordalert="off" +discordwebhook="webhook" + +# Email Alerts | https://docs.linuxgsm.com/alerts/email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + +# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun +mailgunalert="off" +mailgunapiregion="us" +mailguntoken="accesstoken" +mailgundomain="example.com" +mailgunemailfrom="alert@example.com" +mailgunemail="email@myemail.com" + +# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover +pushoveralert="off" +pushovertoken="accesstoken" +pushoveruserkey="userkey" + +# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat +rocketchatalert="off" +rocketchatwebhook="webhook" +rocketchattoken="" + +# Slack Alerts | https://docs.linuxgsm.com/alerts/slack +slackalert="off" +slackwebhook="webhook" + +# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram +# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +telegramapi="api.telegram.org" +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +curlcustomstring="" + +## Updating | https://docs.linuxgsm.com/commands/update +updateonstart="off" + +## Backup | https://docs.linuxgsm.com/commands/backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://docs.linuxgsm.com/features/logging +consolelogging="on" +logdays="7" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="1" + +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors +ansi="on" + +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time +sleeptime="0.5" + +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd +# Server appid +appid="1502300" +steamcmdforcewindows="no" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +betapassword="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="false" + +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode +# 1: tmux kill +# 2: CTRL+c +# 3: quit +# 4: quit 120s +# 5: stop +# 6: q +# 7: exit +# 8: 7 Days to Die +# 9: GoldSrc +# 10: Avorion +# 11: end +stopmode="2" + +## Query mode +# 1: session only +# 2: gamedig (gsquery fallback) +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Console type +consoleverbose="yes" +consoleinteract="no" + +## Game Server Details +# Do not edit +gamename="Survive the Nights" +engine="unity3d" +glibc="2.15" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}" +executabledir="${serverfiles}" +executable="./Server_Linux_x64" +servercfgdir="${systemdir}/Config" +servercfg="ServerConfig.txt" +servercfgdefault="ServerConfig.txt" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${serverfiles}" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +gamelog="${gamelogdir}/${selfname}-game.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" + +## Logs Naming +gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" +lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index ce3d2e85d..4bad355a6 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -95,6 +95,7 @@ sof2,sof2server,Soldier Of Fortune 2: Gold Edition sol,solserver,Soldat squad,squadserver,Squad st,stserver,Stationeers +stn,stnserver,Survive the Nights sven,svenserver,Sven Co-op terraria,terrariaserver,Terraria tf2,tf2server,Team Fortress 2 diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index 295daa55d..5f460c68e 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -1621,6 +1621,22 @@ fn_info_game_terraria(){ fi } +fn_info_game_stn(){ + if [ -f "${servercfgfullpath}" ]; then + servername=$(sed -nr 's/^ServerName="(.*)"/\1/p' "${servercfgfullpath}") + configip=$(sed -nr 's/^ServerIP=([0-9]+)/\1/p' "${servercfgfullpath}") + port=$(sed -nr 's/^ServerPort=([0-9]+)/\1/p' "${servercfgfullpath}") + serverpassword=$(sed -nr 's/^ServerPassword=(.*)$/\1/p' "${servercfgfullpath}") + queryport=$((port + 1)) + else + servername="${unavailable}" + configip=${configip:-"0.0.0.0"} + port="${zero}" + queryport="${zero}" + serverpassword=${serverpassword:-"NOT SET"} + fi +} + fn_info_game_ts3(){ if [ ! -f "${servercfgfullpath}" ]; then dbplugin="${unavailable}" @@ -2131,6 +2147,8 @@ elif [ "${shortname}" == "squad" ]; then fn_info_game_squad elif [ "${shortname}" == "st" ]; then fn_info_game_st +elif [ "${shortname}" == "stn" ]; then + fn_info_game_stn elif [ "${shortname}" == "terraria" ]; then fn_info_game_terraria elif [ "${shortname}" == "tu" ]; then diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index c6f0f99f0..eb1724560 100755 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -653,7 +653,7 @@ fn_info_message_ports_edit(){ startparameterslocation="${red}UNKNOWN${default}" # engines/games that require editing in the config file. - local ports_edit_array=( "ac" "arma3" "bo" "bt" "dst" "eco" "idtech2" "idtech3" "idtech3_ql" "jc2" "jc3" "lwjgl2" "mcb" "mumble" "pc" "pz" "qw" "refractor" "renderware" "rw" "sb" "sdtd" "st" "ts3" "tw" "terraria" "unreal" "unreal2" "unreal3" "vints" "wurm") + local ports_edit_array=( "ac" "arma3" "bo" "bt" "dst" "eco" "idtech2" "idtech3" "idtech3_ql" "jc2" "jc3" "lwjgl2" "mcb" "mumble" "pc" "pz" "qw" "refractor" "renderware" "rw" "sb" "sdtd" "st" "stn" "ts3" "tw" "terraria" "unreal" "unreal2" "unreal3" "vints" "wurm") for port_edit in "${ports_edit_array[@]}"; do if [ "${shortname}" == "ut3" ]; then startparameterslocation="${servercfgdir}/UTWeb.ini" @@ -924,6 +924,14 @@ fn_info_message_csgo(){ } | column -s $'\t' -t } +fn_info_message_dodr(){ + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + fn_info_message_dst(){ { fn_port "header" @@ -1564,6 +1572,14 @@ fn_info_message_wurm(){ } | column -s $'\t' -t } +fn_info_message_stn(){ + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + fn_info_message_select_engine(){ # Display details depending on game or engine. if [ "${shortname}" == "ac" ]; then @@ -1600,6 +1616,8 @@ fn_info_message_select_engine(){ fn_info_message_codwaw elif [ "${shortname}" == "col" ]; then fn_info_message_col + elif [ "${shortname}" == "dodr" ]; then + fn_info_message_dodr elif [ "${shortname}" == "dst" ]; then fn_info_message_dst elif [ "${shortname}" == "eco" ]; then @@ -1680,6 +1698,8 @@ fn_info_message_select_engine(){ fn_info_message_squad elif [ "${shortname}" == "st" ]; then fn_info_message_st + elif [ "${shortname}" == "stn" ]; then + fn_info_message_stn elif [ "${shortname}" == "terraria" ]; then fn_info_message_terraria elif [ "${shortname}" == "ts3" ]; then diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 73e45929e..96ae7a1ea 100755 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -723,6 +723,13 @@ elif [ "${shortname}" == "st" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations +elif [ "${shortname}" == "stn" ]; then + gamedirname="SurvivetheNights" + array_configs+=( ServerConfig.txt ServerUsers.txt TpPresets.json UserPermissions.json ) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "sven" ]; then gamedirname="SvenCoop" array_configs+=( server.cfg ) From 37bf70f7c2e4bcd9d52769c70f28aa803a979e52 Mon Sep 17 00:00:00 2001 From: Deyan Dobromirov Date: Tue, 21 Sep 2021 01:28:55 +0300 Subject: [PATCH 24/38] feat(mods): More Gmod addons utilising the installer (#3401) * feat: More Gmod addons by utilizing the installer * feat: Update the global array * feat: Laser STool addition * fix: updated the laser STool with the correct *.zip path --- lgsm/functions/mods_list.sh | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/mods_list.sh b/lgsm/functions/mods_list.sh index 3863dfe47..35a302fc0 100755 --- a/lgsm/functions/mods_list.sh +++ b/lgsm/functions/mods_list.sh @@ -147,12 +147,28 @@ mod_info_utime=( MOD "utime" "UTime" "https://github.com/TeamUlysses/utime/archi mod_info_uclip=( MOD "uclip" "UClip" "https://github.com/TeamUlysses/uclip/archive/master.zip" "uclip-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://ulyssesmod.net" "An alternative to noclip" ) mod_info_acf=( MOD "acf" "Armoured Combat Framework" "https://github.com/nrlulz/ACF/archive/master.zip" "acf-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "acf-master/lua/acf/shared/guns;" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/nrlulz/ACF" "Realistic Wepons & Engines" ) mod_info_acf_missiles=( MOD "acfmissiles" "ACF Missiles" "https://github.com/Bubbus/ACF-Missiles/archive/master.zip" "acf-missiles-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/Bubbus/ACF-Missiles" "More missiles for ACF" ) -mod_info_advdupe2=( MOD "advdupe2" "Advanced Duplicator 2" "https://github.com/wiremod/advdupe2/archive/master.zip" "advdupe2-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://www.wiremod.com" "Save your constructions" ) +mod_info_advdupe2=( MOD "advdupe2" "Advanced Duplicator 2" "https://github.com/wiremod/advdupe2/archive/master.zip" "advdupe2-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://www.wiremod.com" "Save your constructions. Second version" ) mod_info_pac3=( MOD "pac3" "PAC3" "https://github.com/CapsAdmin/pac3/archive/master.zip" "pac3-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/CapsAdmin/pac3" "Advanced player model customization" ) mod_info_wiremod=( MOD "wiremod" "Wiremod" "https://github.com/wiremod/wire/archive/master.zip" "wire-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/wiremod/wire" "Base Wiremod Addon") mod_info_wiremodextras=( MOD "wiremod-extras" "Wiremod Extras" "https://github.com/wiremod/wire-extras/archive/master.zip" "wire-extras-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/wiremod/wire-extras/" "Addition to Wiremod, Extra Content") +mod_info_advduplicator=( MOD "advdupe1" "Advanced Duplicator 1" "https://github.com/wiremod/advduplicator/archive/master.zip" "advduplicator-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/wiremod/advduplicator" "Save your constructions. First version" ) +mod_info_trackassemblytool=( MOD "trackassemblytool" "Track Assembly Tool" "https://github.com/dvdvideo1234/trackassemblytool/archive/master.zip" "trackassemblytool-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/TrackAssemblyTool" "Assembles segmented track. Supports wire" ) +mod_info_physpropertiesadv=( MOD "physpropertiesadv" "Phys Properties Adv" "https://github.com/dvdvideo1234/physpropertiesadv/archive/master.zip" "physpropertiesadv-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/PhysPropertiesAdv" "Advanced configurable properties" ) +mod_info_controlsystemse2=( MOD "controlsystemse2" "Control Systems E2" "https://github.com/dvdvideo1234/controlsystemse2/archive/master.zip" "controlsystemse2-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/ControlSystemsE2" "PID controllers and fast traces for E2. Minor included in wire-extas" ) +mod_info_e2pistontiming=( MOD "e2pistontiming" "E2 Piston Timing" "https://github.com/dvdvideo1234/e2pistontiming/archive/master.zip" "e2pistontiming-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/E2PistonTiming" "Routine driven piston engine timings for E2" ) +mod_info_propcannontool=( MOD "propcannontool" "Prop Cannon Tool" "https://github.com/dvdvideo1234/propcannontool/archive/master.zip" "propcannontool-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/PropCannonTool" "Cannon entity that can fire props. Supports wire" ) +mod_info_gearassemblytool=( MOD "gearassemblytool" "Gear Assembly Tool" "https://github.com/dvdvideo1234/gearassemblytool/archive/master.zip" "gearassemblytool-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/GearAssemblyTool" "Assembles segmented gearbox" ) +mod_info_spinnertool=( MOD "spinnertool" "Spinner Tool" "https://github.com/dvdvideo1234/spinnertool/archive/master.zip" "spinnertool-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/SpinnerTool" "Torque lever controlled spinner. Supports wire" ) +mod_info_surfacefrictiontool=( MOD "surfacefrictiontool" "Surface Friction Tool" "https://github.com/dvdvideo1234/surfacefrictiontool/archive/master.zip" "surfacefrictiontool-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/SurfaceFrictionTool" "Controls the surface friction of a prop" ) +mod_info_magneticdipole=( MOD "magneticdipole" "Magnetic Dipole" "https://github.com/dvdvideo1234/magneticdipole/archive/master.zip" "magneticdipole-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/MagneticDipole" "Magnet entity that runs forces on its poles. Supports wire" ) +mod_info_environmentorganizer=( MOD "environmentorganizer" "Environment Organizer" "https://github.com/dvdvideo1234/environmentorganizer/archive/master.zip" "environmentorganizer-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/EnvironmentOrganizer" "Installs routines designed for server settings adjustment" ) +mod_info_precision_alignment=( MOD "precision-alignment" "Precision Alignment" "https://github.com/Mista-Tea/precision-alignment/archive/master.zip" "precision-alignment-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/Mista-Tea/precision-alignment" "Creates precise constraints and aligments" ) +mod_info_improved_stacker=( MOD "improved-stacker" "Improved Stacker" "https://github.com/Mista-Tea/improved-stacker/archive/master.zip" "improved-stacker-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/Mista-Tea/improved-stacker" "Stacks entities in the direction chosen" ) +mod_info_improved_weight=( MOD "improved-weight" "Improved Weight" "https://github.com/Mista-Tea/improved-weight/archive/master.zip" "improved-weight-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/Mista-Tea/improved-weight" "Weight tool but with more features" ) +mod_info_improved_antinoclip=( MOD "improved-antinoclip" "Improved Antinoclip" "https://github.com/Mista-Tea/improved-antinoclip/archive/master.zip" "improved-antinoclip-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/Mista-Tea/improved-antinoclip" "Controls clipping trough an object" ) mod_info_darkrp=( MOD "darkrp" "DarkRP" "https://github.com/FPtje/DarkRP/archive/master.zip" "darkrp-master.zip" "0" "LowercaseOn" "${systemdir}/gamemodes" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://darkrp.com" "Most popular gamemode" ) mod_info_darkrpmodification=( MOD "darkrpmodification" "DarkRP Modification" "https://github.com/FPtje/darkrpmodification/archive/master.zip" "darkrpmodification-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "NOUPDATE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://darkrp.com" "Customize DarkRP settings" ) +mod_info_laserstool=( MOD "laserstool" "Laser STool" "https://github.com/dvdvideo1234/laserstool/archive/main.zip" "laserstool-main.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/LaserSTool" "Scripted tool that spawns laser entities, simulates light rays and even kill players" ) # Oxidemod mod_info_rustoxide=( MOD "rustoxide" "Oxide for Rust" "${oxiderustlatestlink}" "Oxide.Rust-linux.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Rust;" "NOTGAMES" "https://umod.org/games/rust" "Allows for the use of plugins" ) @@ -160,4 +176,4 @@ mod_info_hwoxide=( MOD "hwoxide" "Oxide for Hurtworld" "${oxidehurtworldlatestli mod_info_sdtdoxide=( MOD "sdtdoxide" "Oxide for 7 Days To Die" "${oxidesdtdlatestlink}" "Oxide.SevenDaysToDie.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "7 Days To Die;" "NOTGAMES" "https://umod.org/games/7-days-to-die" "Allows for the use of plugins" ) # REQUIRED: Set all mods info into the global array -mods_global_array=( "${mod_info_metamod[@]}" "${mod_info_base_amxx[@]}" "${mod_info_cs_amxx[@]}" "${mod_info_dod_amxx[@]}" "${mod_info_tfc_amxx[@]}" "${mod_info_ns_amxx[@]}" "${mod_info_ts_amxx[@]}" "${mod_info_metamodsource[@]}" "${mod_info_sourcemod[@]}" "${mod_info_steamworks[@]}" "${mod_info_gokz[@]}" "${mod_info_ttt[@]}" "${mod_info_get5[@]}" "${mod_info_pug[@]}" "${mod_info_ulib[@]}" "${mod_info_ulx[@]}" "${mod_info_utime[@]}" "${mod_info_uclip[@]}" "${mod_info_acf[@]}" "${mod_info_acf_missiles[@]}" "${mod_info_acf_sweps[@]}" "${mod_info_advdupe2[@]}" "${mod_info_pac3[@]}" "${mod_info_wiremod[@]}" "${mod_info_wiremodextras[@]}" "${mod_info_darkrp[@]}" "${mod_info_darkrpmodification[@]}" "${mod_info_rustoxide[@]}" "${mod_info_hwoxide[@]}" "${mod_info_sdtdoxide[@]}" ) +mods_global_array=( "${mod_info_metamod[@]}" "${mod_info_base_amxx[@]}" "${mod_info_cs_amxx[@]}" "${mod_info_dod_amxx[@]}" "${mod_info_tfc_amxx[@]}" "${mod_info_ns_amxx[@]}" "${mod_info_ts_amxx[@]}" "${mod_info_metamodsource[@]}" "${mod_info_sourcemod[@]}" "${mod_info_steamworks[@]}" "${mod_info_gokz[@]}" "${mod_info_ttt[@]}" "${mod_info_get5[@]}" "${mod_info_pug[@]}" "${mod_info_ulib[@]}" "${mod_info_ulx[@]}" "${mod_info_utime[@]}" "${mod_info_uclip[@]}" "${mod_info_acf[@]}" "${mod_info_acf_missiles[@]}" "${mod_info_acf_sweps[@]}" "${mod_info_advdupe2[@]}" "${mod_info_pac3[@]}" "${mod_info_wiremod[@]}" "${mod_info_wiremodextras[@]}" "${mod_info_darkrp[@]}" "${mod_info_darkrpmodification[@]}" "${mod_info_rustoxide[@]}" "${mod_info_hwoxide[@]}" "${mod_info_sdtdoxide[@]}" "${mod_info_advduplicator[@]}" "${mod_info_trackassemblytool[@]}" "${mod_info_physpropertiesadv[@]}" "${mod_info_controlsystemse2[@]}" "${mod_info_e2pistontiming[@]}" "${mod_info_propcannontool[@]}" "${mod_info_gearassemblytool[@]}" "${mod_info_spinnertool[@]}" "${mod_info_surfacefrictiontool[@]}" "${mod_info_magneticdipole[@]}" "${mod_info_environmentorganizer[@]}" "${mod_info_precision_alignment[@]}" "${mod_info_improved_stacker[@]}" "${mod_info_improved_weight[@]}" "${mod_info_improved_antinoclip[@]}" "${mod_info_laserstool[@]}" ) From 5ca18033532f4f4a3c54f1d23d189c494599ef5e Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 22 Sep 2021 22:11:46 +0200 Subject: [PATCH 25/38] fix(cod4): Improve servername and rcon password parsing (#3564) * fix(cod4): Improve servername and rcon password parsing * further improvements to info_game Co-authored-by: Daniel Gibbs --- .../config-lgsm/pstbsserver/_default.cfg | 1 - lgsm/functions/info_game.sh | 501 +++++++++++------- lgsm/functions/info_messages.sh | 5 + 3 files changed, 314 insertions(+), 193 deletions(-) mode change 100755 => 100644 lgsm/functions/info_messages.sh diff --git a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg index 80a066b2f..9478ad42c 100644 --- a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg @@ -14,7 +14,6 @@ port="10027" queryport="10037" rconport="21114" randommap="NONE" -#servername="LinuxGSM Server" maxplayers="40" reservedslots="0" diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index 5f460c68e..e67bd93bf 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -15,6 +15,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # cut -f1 -d "/" remove everything after / fn_info_game_ac(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then httpport="${zero}" port="${zero}" @@ -28,7 +29,7 @@ fn_info_game_ac(){ servername=$(grep "NAME" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/NAME//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| head -n 1) adminpassword=$(grep "ADMIN_PASSWORD" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/ADMIN_PASSWORD//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - # Not Set + # Not set httpport=${httpport:-"0"} port=${port:-"0"} queryport=${queryport:-"0"} @@ -49,7 +50,7 @@ fn_info_game_ark(){ adminpassword=$(grep "ServerAdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/ServerAdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' ) serverpassword=$( grep "ServerPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/ServerPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - # Not Set + # Not set servername=${servername:-"NOT SET"} adminpassword=${adminpassword:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} @@ -76,7 +77,7 @@ fn_info_game_arma3(){ serverpassword=$(grep "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') maxplayers=$(grep "maxPlayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - # Not Set + # Not set servername=${servername:-"NOT SET"} adminpassword=${adminpassword:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} @@ -93,19 +94,22 @@ fn_info_game_arma3(){ } fn_info_game_av() { + # Config if [ ! -f "${servercfgfullpath}" ]; then maxplayers="${unavailable}" servername="${unavailable}" serverpassword="${unavailable}" - rconpassword="${unavailable}" - rconport="${unavailable}" + port=${zero} + queryport=${zero} + steamqueryport=${zero} + steammasterport=${zero} + rconport=${zero} rconenabled="${unavailable}" - queryport="${unavailable}" + rconpassword="${unavailable}" else maxplayers=$(grep "maxPlayers=" "${servercfgfullpath}" | sed 's/maxPlayers=//') servername=$(grep "name=" "${servercfgfullpath}" | sed 's/name=//') serverpassword=$(grep "password=" "${servercfgfullpath}" | sed 's/password=//') - port=$(grep "port=" "${servercfgfullpath}" | sed 's/port=//') queryport=$((port+3)) steamqueryport=$((port+20)) @@ -121,14 +125,18 @@ fn_info_game_av() { maxplayers=${maxplayers:-"NOT SET"} servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} - rconport=${rconport:-"0"} - rconenabled=${rconenabled:-"false"} + port=${zero} queryport=${queryport:-"0"} + steamqueryport=${steamqueryport:-"0"} + steammasterport=${steammasterport:-"0"} + rconport=${rconport:-"0"} + rconenabled=${rconenabled:-"NOT SET"} + rconpassword=${rconpassword:-"NOT SET"} fi } fn_info_game_bf1942(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" serverpassword="${unavailable}" @@ -141,20 +149,20 @@ fn_info_game_bf1942(){ maxplayers=$(grep "game.serverMaxPlayers" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') port=$(grep "game.serverPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') queryport="22000" - configip=$(grep "game.serverIP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverIP//g' | tr -d '=\";,:' | xargs) - ipsetinconfig=1 - ipinconfigvar="game.serverIP" - # Not Set + # Not set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} maxplayers=${maxplayers:-"0"} port=${port:-"0"} + queryport=${queryport:-"0"} + configip=${configip:-"0.0.0.0"} fi } fn_info_game_bfv(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" serverpassword="${unavailable}" @@ -167,20 +175,20 @@ fn_info_game_bfv(){ maxplayers=$(grep "game.serverMaxPlayers" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') port=$(grep "game.serverPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') queryport="23000" - configip=$(grep "game.serverIP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverIP//g' | tr -d '=\";,:' | xargs) - ipsetinconfig=1 - ipinconfigvar="game.serverIP" - # Not Set + # Not set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} maxplayers=${maxplayers:-"0"} port=${port:-"0"} + queryport=${queryport:-"0"} + configip=${configip:-"0.0.0.0"} fi } fn_info_game_bo(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" serverpassword="${unavailable}" @@ -194,7 +202,7 @@ fn_info_game_bo(){ queryport=$((port+1)) maxplayers=$(grep "MaxPlayers=" "${servercfgfullpath}" | tr -cd '[:digit:]') - # Not Set + # Not set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} port=${port:-"0"} @@ -225,10 +233,6 @@ fn_info_game_bt(){ queryport=${queryport:-"0"} maxplayers=${maxplayers:-"0"} fi - - # Parameters - port=${port:-"0"} - queryport=${queryport:-"0"} } fn_info_game_bt1944(){ @@ -242,7 +246,7 @@ fn_info_game_bt1944(){ serverpassword=$(grep "Password" "${servercfgfullpath}" | grep -v "RCONPassword" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') gamemode=$(grep -m2 "PlayMode" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/PlayMode//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - # Not Set + # Not set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} gamemode=${gamemode:-"NOT SET"} @@ -250,24 +254,35 @@ fn_info_game_bt1944(){ # Parameters port=${port:-"0"} - rconport=$((port+2)) queryport=${queryport:-"0"} + rconport=$((port+2)) } fn_info_game_cmw(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then + adminpassword="${unavailable}" + rconport=${zero} servername="${unavailable}" serverpassword="${unavailable}" - adminpassword="${unavailable}" - rconport="${unavailable}" + else - servername=$(grep -E "^ServerName" "${servercfgfullpath}" | sed 's/^ServerName=//') + adminpassword=$(grep -E "^adminpassword=" "${servercfgfullpath}" | tr -cd '[:digit:]') rconport=$(grep -E "^RConPort=" "${servercfgdir}/DefaultGame.ini" | tr -cd '[:digit:]') + servername=$(grep -E "^ServerName" "${servercfgfullpath}" | sed 's/^ServerName=//') + serverpassword=$(grep -E "^GamePassword" "${servercfgfullpath}" | sed 's/^ServerName=//') - # Not Set + # Not set + adminpassword=${adminpassword:-"NOT SET"} + rconport=${rconport:-"0"} servername=${servername:-"NOT SET"} - rconport=${port:-"0"} + serverpassword=${serverpassword:-"NOT SET"} fi + + # Parameters + defaultmap=${defaultmap:-"NOT SET"} + port=${port:-"0"} + queryport=${queryport:-"0"} } fn_info_game_cod(){ @@ -279,7 +294,7 @@ fn_info_game_cod(){ servername=$(grep "sv_hostname " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | xargs) rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - # Not Set + # Not set servername=${servername:-"NOT SET"} rconpassword=${rconpassword=:-"NOT SET"} fi @@ -288,10 +303,10 @@ fn_info_game_cod(){ defaultmap=${defaultmap:-"NOT SET"} maxplayers=${maxplayers:-"0"} port=${port:-"0"} - queryport=${port:-"0"} } -fn_info_game_cod2(){ +fn_info_game_coduo(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" rconpassword="${unavailable}" @@ -299,13 +314,22 @@ fn_info_game_cod2(){ servername=$(grep "sv_hostname " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | xargs) rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - # Not Set + # Not set servername=${servername:-"NOT SET"} rconpassword=${rconpassword=:-"NOT SET"} fi + + # Parameters + defaultmap=${defaultmap:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + queryport=${port:-"28960"} } -fn_info_game_cod4(){ + + +fn_info_game_cod2(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" rconpassword="${unavailable}" @@ -313,13 +337,43 @@ fn_info_game_cod4(){ servername=$(grep "sv_hostname " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | xargs) rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - # Not Set + # Not set + servername=${servername:-"NOT SET"} + rconpassword=${rconpassword=:-"NOT SET"} + fi + + # Parameters + defaultmap=${defaultmap:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + queryport=${port:-"28960"} +} + +fn_info_game_cod4(){ + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + rconpassword="${unavailable}" + else + servername=$(sed -nr 's/^set\s*sv_hostname\s*"(.*)".*/\1/p' "${servercfgfullpath}") + rconpassword=$(sed -nr 's/^set\s*rcon_password\s*"(.*)"\s*\/.*/\1/p' "${servercfgfullpath}") + queryport=${port:-"28960"} + + # Not set servername=${servername:-"NOT SET"} rconpassword=${rconpassword=:-"NOT SET"} + queryport=${queryport:-"28960"} fi + + # Parameters + defaultmap=${defaultmap:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + queryport=${port:-"28960"} } fn_info_game_codwaw(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" rconpassword="${unavailable}" @@ -327,44 +381,65 @@ fn_info_game_codwaw(){ servername=$(grep "sv_hostname " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | xargs) rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - # Not Set + # Not set servername=${servername:-"NOT SET"} rconpassword=${rconpassword=:-"NOT SET"} fi + + # Parameters + defaultmap=${defaultmap:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + queryport=${port:-"28960"} } fn_info_game_col(){ - if [ -f "${servercfgfullpath}" ]; then + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + maxplayers="${unavailable}" + port="${zero}" + queryport="${zero}" + steamport="${zero}" + rconpassword="${unavailable}" + else servername=$(jq -r '.ServerSettings.ServerName' "${servercfgfullpath}") serverpassword=$(jq -r '.ServerSettings.ServerPassword' "${servercfgfullpath}") maxplayers=$(jq -r '.ServerSettings.MaxPlayerCount' "${servercfgfullpath}") port=$(jq -r '.ServerSettings.ServerGamePort' "${servercfgfullpath}") + queryport=${port:-"0"} steamport=$(jq -r '.ServerSettings.ServerSteamPort' "${servercfgfullpath}") rconpassword=$(jq -r '.ServerSettings.RCONPassword' "${servercfgfullpath}") configip=$(jq -r '.ServerSettings.ServerIP' "${servercfgfullpath}") - # password not set - serverpassword=${serverpassword:-"NOT SET"} - queryport=${port:-"0"} - else + # Not set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} maxplayers=${maxplayers:-"0"} port=${port:-"27004"} + queryport=${queryport:-"0"} steamport=${steamport:-"27005"} rconpassword=${rconpassword:-"NOT SET"} + configip=${configip:-"0.0.0.0"} fi } fn_info_game_dodr(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then maxplayers="${zero}" else maxplayers=$(sed -nr 's/^iServerMaxPlayers=(.*)$/\1/p' "${servercfgfullpath}") - # Not Set + # Not set maxplayers=${maxplayers:-"NOT SET"} fi + + # Parameters + servername=${servername:-"NOT SET"} + port=${port:-"7777"} + queryport=${queryport:-"27015"} } fn_info_game_dst(){ @@ -383,18 +458,16 @@ fn_info_game_dst(){ gamemode=$(grep "game_mode" "${clustercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/game_mode//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') tickrate=$(grep "tick_rate" "${clustercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') masterport=$(grep "master_port" "${clustercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - configip=$(grep "bind_ip" "${clustercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bind_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - ipsetinconfig=1 - ipinconfigvar="bind_ip" - # Not Set + # Not set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} maxplayers=${maxplayers:-"0"} gamemode=${gamemode:-"NOT SET"} tickrate=${tickrate:-"0"} masterport=${masterport:-"0"} + configip=${configip:-"0.0.0.0"} fi if [ ! -f "${servercfgfullpath}" ]; then @@ -406,7 +479,7 @@ fn_info_game_dst(){ steamauthport=$(grep "authentication_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') steammasterport=$(grep "master_server_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - # Not Set + # Not set port=${port:-"0"} steamauthport=${steamauthport:-"0"} steammasterport=${steammasterport:-"0"} @@ -421,8 +494,8 @@ fn_info_game_dst(){ } fn_info_game_eco(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then - configip="${unavailable}" servername="${unavailable}" serverpassword="${unavailable}" maxplayers="${zero}" @@ -438,17 +511,19 @@ fn_info_game_eco(){ port=$(jq -r '.GameServerPort' "${servercfgfullpath}") webadminport=$(jq -r '.WebServerPort' "${servercfgfullpath}") - # Not Set - configip=${configip:-"NOT SET"} + # Not set + configip=${configip:-"0.0.0.0"} servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} maxplayers=${maxplayers=:-"0"} + tickrate=${tickrate=:-"0"} port=${port=:-"0"} webadminport=${webadminport=:-"0"} fi } fn_info_game_etl(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then rconpassword="${unavailable}" servername="${unavailable}" @@ -463,18 +538,16 @@ fn_info_game_etl(){ servername=$(grep "set sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') serverpassword=$(grep "set g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') maxplayers=$(grep "set sv_maxclients" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - configip=$(grep "set net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set net_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - ipsetinconfig=1 - ipinconfigvar="set net_ip" - # Not Set + # Not set rconpassword=${rconpassword:-"NOT SET"} servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} maxplayers=${maxplayers:-"0"} port=${port:-"27960"} queryport=${queryport:-"27960"} + configip=${configip:-"0.0.0.0"} fi } @@ -484,7 +557,7 @@ fn_info_game_fctr(){ servername="Factorio Server" serverpassword="${unavailable}" maxplayers="${zero}" - authtoken=${authtoken:-"NOT SET"} + authtoken="${unavailable}" savegameinterval="${unavailable}" versioncount="${unavailable}" else @@ -495,7 +568,7 @@ fn_info_game_fctr(){ savegameinterval=$(jq -r '.autosave_interval' "${servercfgfullpath}") versioncount=$(jq -r '.autosave_slots' "${servercfgfullpath}") - # Not Set + # Not set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} maxplayers=${maxplayers:-"0"} @@ -511,8 +584,10 @@ fn_info_game_fctr(){ } fn_info_game_jc2(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" + serverdescription="${unavailable}" serverpassword="${unavailable}" maxplayers="${zero}" port="${zero}" @@ -525,19 +600,20 @@ fn_info_game_jc2(){ port=$(grep "BindPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') queryport="${port}" configip=$(grep "BindIP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/BindIP//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - ipsetinconfig=1 - ipinconfigvar="BindIP" - # Not Set + # Not set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} + serverdescription=${serverdescription:-"NOT SET"} maxplayers=${maxplayers:-"0"} port=${port:-"0"} queryport=${queryport:-"0"} + configip=${configip:-"0.0.0.0"} fi } fn_info_game_hw(){ + # Parameters servername=${servername:-"NOT SET"} port=${port:-"0"} queryport=${queryport:-"0"} @@ -559,6 +635,7 @@ fn_info_game_inss(){ } fn_info_game_jc3(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" serverdescription="${unavailable}" @@ -579,12 +656,9 @@ fn_info_game_jc3(){ steamport=$(grep "\"steamPort\"" "${servercfgfullpath}" | tr -cd '[:digit:]') httpport=$(grep "\"httpPort\"" "${servercfgfullpath}" | tr -cd '[:digit:]') tickrate=$(grep "\"maxTickRate\"" "${servercfgfullpath}" | tr -cd '[:digit:]') - configip=$(grep "host" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/host//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - ipsetinconfig=1 - ipinconfigvar="host" - # Not Set + # Not set servername=${servername:-"NOT SET"} serverdescription=${serverdescription:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} @@ -594,6 +668,7 @@ fn_info_game_jc3(){ steamport=${steamport=:-"0"} httpport=${httpport=:-"0"} tickrate=${tickrate=:-"0"} + configip=${configip:-"0.0.0.0"} fi } @@ -604,6 +679,7 @@ fn_info_game_jk2(){ servername="${unavailable}" serverpassword="${unavailable}" maxplayers="${zero}" + serverversion="${unavailable}" else rconpassword=$(grep "seta rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta rconpassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') servername=$(grep "seta sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') @@ -611,18 +687,22 @@ fn_info_game_jk2(){ maxplayers=$(grep "seta sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') serverversion=$(grep "seta mv_serverversion" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta mv_serverversion//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - # Not Set + # Not set rconpassword=${rconpassword:-"NOT SET"} servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} maxplayers=${maxplayers:-"0"} + serverversion=${serverversion:-"NOT SET"} fi # Parameters - queryport="${port:-"0"}" + port=${port:-"0"} + queryport=${port} + defaultmap=${defaultmap:-"NOT SET"} } fn_info_game_kf(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" serverpassword="${unavailable}" @@ -652,7 +732,7 @@ fn_info_game_kf(){ webadminuser=$(sed -nr 's/^AdminName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') webadminpass="${adminpassword}" - # Not Set + # Not set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} adminpassword=${adminpassword:-"NOT SET"} @@ -667,6 +747,9 @@ fn_info_game_kf(){ webadminuser=${webadminuser:-"NOT SET"} webadminpass=${webadminpass:-"NOT SET"} fi + + # Parameters + defaultmap=${defaultmap:-"NOT SET"} } fn_info_game_kf2(){ @@ -675,8 +758,8 @@ fn_info_game_kf2(){ servername="${unavailable}" serverpassword="${unavailable}" adminpassword="${unavailable}" - port="${unavailable}" - queryport="${unavailable}" + port=${zero} + queryport=${zero} webadminenabled="${unavailable}" httpport="${zero}" webadminuser="${unavailable}" @@ -691,7 +774,7 @@ fn_info_game_kf2(){ webadminuser="Admin" webadminpass=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - # Not Set + # Not set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} adminpassword=${adminpassword:-"NOT SET"} @@ -708,6 +791,7 @@ fn_info_game_kf2(){ } fn_info_game_mc(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" rconpassword="${unavailable}" @@ -726,17 +810,14 @@ fn_info_game_mc(){ port=$(grep "server-port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') queryport=$(grep "query.port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') if [ -z "${queryport}" ]; then - queryport=${port:-"0"} + queryport=${port} fi queryenabled=$(grep "enable-query" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/enable-query//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') gamemode=$(grep "gamemode" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') gameworld=$(grep "level-name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/level-name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - configip=$(grep "server-ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/server-ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - ipsetinconfig=1 - ipinconfigvar="server-ip" - # Not Set + # Not set servername=${servername:-"NOT SET"} rconpassword=${rconpassword:-"NOT SET"} rconport=${rconport:-"NOT SET"} @@ -746,10 +827,12 @@ fn_info_game_mc(){ queryenabled="${queryenabled:-"NOT SET"}" gamemode=${gamemode:-"NOT SET"} gameworld=${gameworld:-"NOT SET"} + configip=${configip:-"0.0.0.0"} fi } fn_info_game_mcb(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" maxplayers="${zero}" @@ -763,11 +846,11 @@ fn_info_game_mcb(){ maxplayers=$(grep "max-players" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') port=$(grep "server-port\b" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') portipv6=$(grep "server-portv6\b" "${servercfgfullpath}" | sed 's/v6//g' | grep -v "#" | tr -cd '[:digit:]') - queryport=${port:-"0"} + queryport=${port} gamemode=$(grep "gamemode" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/gamemode//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') gameworld=$(grep "level-name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/level-name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - # Not Set + # Not set servername=${servername:-"NOT SET"} maxplayers=${maxplayers:-"NOT SET"} port=${port:-"NOT SET"} @@ -817,7 +900,7 @@ fn_info_game_mohaa(){ serverpassword=$(grep "g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') maxplayers=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - # Not Set + # Not set rconpassword=${rconpassword:-"NOT SET"} servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} @@ -843,7 +926,7 @@ fn_info_game_mom(){ maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/MaxPlayers//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') defaultmap=$(grep "MapName" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/MapName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - # Not Set + # Not set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} maxplayer=${maxplayers:-"NOT SET"} @@ -858,15 +941,16 @@ fn_info_game_mom(){ fn_info_game_mta(){ # Config if [ ! -f "${servercfgfullpath}" ]; then - configip="${zero}" - port="${unavailable}" - httpport="${unavailable}" + port=${zero} + queryport=${zero} + httpport=${zero} ase="${unavailable}" servername="${unavailable}" serverpassword="${unavailable}" maxplayers="${zero}" else port=$(grep -m 1 "serverport" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<" | tr -cd '[:digit:]') + queryport=$((port+123)) httpport=$(grep -m 1 "httpport" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<" | tr -cd '[:digit:]') servername=$(grep -m 1 "servername" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<") serverpassword=$(grep -m 1 "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<") @@ -877,12 +961,10 @@ fn_info_game_mta(){ else ase="Disabled" fi - # configip=$(grep -m 1 "serverip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's///g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<") - # ipsetinconfig=1 - # ipinconfigvar="serverip" - # Not Set + # Not set port=${port:-"22003"} + queryport=${queryport:-"2326"} httpport=${httpport:-"22005"} ase=${ase:-"Disabled"} servername=${servername:-"NOT SET"} @@ -890,11 +972,10 @@ fn_info_game_mta(){ maxplayers=${maxplayers:-"0"} fi - # Parameters - queryport=$((port+123)) } fn_info_game_mumble(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then port="64738" queryport="${port}" @@ -902,19 +983,18 @@ fn_info_game_mumble(){ else port=$(grep "port" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^;/d' -e 's/port//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') queryport="${port}" - configip=$(grep "host=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^;/d' -e 's/host=//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - ipsetinconfig=1 - ipinconfigvar="voice_ip" - # Not Set + # Not set port=${port:-"64738"} queryport=${queryport:-"64738"} servername="Mumble Port ${port}" + configip=${configip:-"0.0.0.0"} fi } fn_info_game_onset(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" maxplayers="${zero}" @@ -928,7 +1008,7 @@ fn_info_game_onset(){ httpport=$((port-2)) queryport=$((port-1)) - # Not Set + # Not set servername=${servername:-"NOT SET"} maxplayers=${maxplayers:-"NOT SET"} port=${port:-"NOT SET"} @@ -938,6 +1018,7 @@ fn_info_game_onset(){ } fn_info_game_pc(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" serverpassword="${unavailable}" @@ -953,7 +1034,7 @@ fn_info_game_pc(){ queryport=$(grep "queryPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') steamport=$(grep "steamPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - # Not Set + # Not set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} maxplayers=${maxplayers:-"NOT SET"} @@ -964,6 +1045,7 @@ fn_info_game_pc(){ } fn_info_game_pstbs(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" maxplayers="${unavailable}" @@ -972,6 +1054,11 @@ fn_info_game_pstbs(){ servername=$(grep "ServerName=" "${servercfgfullpath}" | sed -e 's/^[ \t]//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=";,:' | sed -e 's/^[ \t]//' -e 's/[ \t]*$//') maxplayers=$(grep "MaxPlayers=" "${servercfgfullpath}" | tr -cd '[:digit:]') reservedslots=$(grep "NumReservedSlots=" "${servercfgfullpath}" | tr -cd '[:digit:]') + + # Not set + servername=${servername:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + reservedslots=${reservedslots:-"0"} fi if [ ! -f "${servercfgdir}/Rcon.cfg" ]; then @@ -980,16 +1067,21 @@ fn_info_game_pstbs(){ else rconport=$(grep "Port=" "${servercfgdir}/Rcon.cfg" | tr -cd '[:digit:]') rconpassword=$(grep "Password=" "${servercfgdir}/Rcon.cfg" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + # Not set + rconport=${rconport:-"0"} + if [ -z "${rconpassword}" ]||[ ${#rconpassword} == 1 ]; then + rconpassword="NOT SET" + fi fi + # Parameters + port=${port:-"0"} + queryport=${port:-"0"} rconport=${rconport:-"0"} - if [ -z "${rconpassword}" ]||[ ${#rconpassword} == 1 ]; then - rconpassword="NOT SET" - fi - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} + randommap=${randommap:-"NOT SET"} maxplayers=${maxplayers:-"0"} - numreservedslots=${numreservedslots:-"0"} + reservedslots=${reservedslots:-"0"} } fn_info_game_pvr(){ @@ -1020,6 +1112,7 @@ fn_info_game_pz(){ rconpassword="${unavailable}" maxplayers="${zero}" port="${zero}" + queryport="${zero}" gameworld="${unavailable}" else servername=$(grep "PublicName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/PublicName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') @@ -1027,20 +1120,22 @@ fn_info_game_pz(){ rconpassword=$(grep "RCONPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/RCONPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') port=$(grep "DefaultPort" "${servercfgfullpath}" | tr -cd '[:digit:]') + queryport=${port} gameworld=$(grep "Map" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^Map" | sed -e '/^#/d' -e 's/Map//g' | tr -d '=\";' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - # Not Set + # Not set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} rconpassword=${rconpassword:-"NOT SET"} - maxplayers=${maxplayers:-"NOT SET"} - port=${port:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + queryport=${queryport:-"0"} gameworld=${gameworld:-"NOT SET"} fi # Parameters adminpassword=${adminpassword:-"NOT SET"} - queryport=${port:-"0"} + } fn_info_game_q2(){ @@ -1048,14 +1143,13 @@ fn_info_game_q2(){ if [ ! -f "${servercfgfullpath}" ]; then rconpassword="${unavailable}" servername="${unavailable}" - serverpassword="${unavailable}" maxplayers="${zero}" else rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') maxplayers=$(grep "maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - # Not Set + # Not set rconpassword=${rconpassword:-"NOT SET"} servername=${servername:-"NOT SET"} maxplayers=${maxplayers:-"0"} @@ -1063,11 +1157,12 @@ fn_info_game_q2(){ # Parameters port=${port:-"0"} - queryport=${port:-"0"} + queryport=${port} defaultmap=${defaultmap:-"NOT SET"} } fn_info_game_q3(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then rconpassword="${unavailable}" servername="${unavailable}" @@ -1079,15 +1174,21 @@ fn_info_game_q3(){ serverpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') maxplayers=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - # Not Set + # Not set rconpassword=${rconpassword:-"NOT SET"} servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} maxplayers=${maxplayers:-"0"} fi + + # Parameters + port=${port:-"0"} + queryport=${port} + defaultmap=${defaultmap:-"NOT SET"} } fn_info_game_ql(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then rconpassword="${unavailable}" servername="${unavailable}" @@ -1103,15 +1204,12 @@ fn_info_game_ql(){ serverpassword=$(grep "g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') maxplayers=$(grep "sv_maxClients" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') port=$(grep "net_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - queryport="${port}" + queryport=${port} rconport=$(grep "zmq_rcon_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') statsport=$(grep "zmq_stats_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - configip=$(grep "set net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set net_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - ipsetinconfig=1 - ipinconfigvar="set net_ip" - # Not Set + # Not set rconpassword=${rconpassword:-"NOT SET"} servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} @@ -1120,6 +1218,7 @@ fn_info_game_ql(){ queryport=${queryport:-"0"} rconport=${rconport:-"0"} statsport=${statsport:-"0"} + configip=${configip:-"0.0.0.0"} fi } @@ -1136,7 +1235,7 @@ fn_info_game_qw(){ servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "/") maxplayers=$(grep "maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - # Not Set + # Not set rconpassword=${rconpassword:-"NOT SET"} servername=${servername:-"NOT SET"} maxplayers=${maxplayers:-"0"} @@ -1144,10 +1243,11 @@ fn_info_game_qw(){ # Parameters port=${port:-"0"} - queryport=${port:-"0"} + queryport=${port} } fn_info_game_ro(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" serverpassword="${unavailable}" @@ -1175,7 +1275,7 @@ fn_info_game_ro(){ webadminuser=$(sed -nr 's/^AdminName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') webadminpass="${adminpassword}" - # Not Set + # Not set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} adminpassword=${adminpassword:-"NOT SET"} @@ -1189,6 +1289,9 @@ fn_info_game_ro(){ webadminuser=${webadminuser:-"NOT SET"} webadminpass=${webadminpass:-"NOT SET"} fi + + # Parameters + defaultmap=${defaultmap:-"NOT SET"} } fn_info_game_rtcw(){ @@ -1204,7 +1307,7 @@ fn_info_game_rtcw(){ serverpassword=$(grep "g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') maxplayers=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - # Not Set + # Not set rconpassword=${rconpassword:-"NOT SET"} servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} @@ -1231,13 +1334,17 @@ fn_info_game_rust(){ tickrate=${tickrate:-"0"} saveinterval=${saveinterval:-"0"} serverlevel=${serverlevel:-"NOT SET"} + customlevelurl=${customlevelurl:-"NOT SET"} worldsize=${worldsize:-"0"} + seed=${seed:-"0"} + salt=${salt:-"0"} } fn_info_game_rw(){ # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" + serverpassword="${unavailable}" rconpassword="${unavailable}" rconport="${zero}" maxplayers="${zero}" @@ -1259,34 +1366,33 @@ fn_info_game_rw(){ port3=$((port+2)) port4=$((port+3)) queryport="${port}" + httpqueryport=$((port-1)) gamemode=$(grep "settings_default_gamemode=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/settings_default_gamemode//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') gameworld=$(grep "server_world_name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/server_world_name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - #javaram=$(grep "server_memory" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/server_memory//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') configip=$(grep "server_ip" "${servercfgfullpath}" | grep -v "database_mysql_server_ip" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/server_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - ipsetinconfig=1 - ipinconfigvar="server-ip" - # Not Set + # Not set servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} rconpassword=${rconpassword:-"NOT SET"} rconport=${rconport:-"NOT SET"} maxplayers=${maxplayers:-"NOT SET"} - port=${port:-"NOT SET"} + port=${port:-"0"} + port2=${port2:-"0"} + port3=${port3:-"0"} + port4=${port4:-"0"} + queryport=${queryport:-"0"} + httpqueryport=${httpport:-"0"} gamemode=${gamemode:-"NOT SET"} gameworld=${gameworld:-"NOT SET"} + configip=${configip:-"0.0.0.0"} fi - - # Parameters - servername=${servername:-"NOT SET"} - port=${port:-"0"} - httpqueryport=$((port-1)) } fn_info_game_samp(){ # Config if [ ! -f "${servercfgfullpath}" ]; then servername="unnamed server" - serverpassword="${unavailable}" rconpassword="${unavailable}" port="7777" rconport="${port}" @@ -1295,22 +1401,22 @@ fn_info_game_samp(){ servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/^rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') port=$(grep "port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - rconport="${port}" + queryport=${port} + rconport=${port} maxplayers=$(grep "maxplayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - # Not Set + # Not set servername=${servername:-"NOT SET"} rconpassword=${rconpassword:-"NOT SET"} port=${port:-"7777"} - rconport="${port}" + queryport=${port:-"7777"} + rconport=${rconport:-"7777"} maxplayers=${maxplayers:-"12"} fi - - # Parameters - queryport=${port:-"0"} } fn_info_game_sb(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" queryenabled="${unavailable}" @@ -1330,7 +1436,7 @@ fn_info_game_sb(){ rconport=$(grep "rconServerPort" "${servercfgfullpath}" | tr -cd '[:digit:]') maxplayers=$(grep "maxPlayers" "${servercfgfullpath}" | tr -cd '[:digit:]') - # Not Set + # Not set servername=${servername:-"NOT SET"} queryenabled=${queryenabled:-"NOT SET"} rconenabled=${rconenabled:-"NOT SET"} @@ -1351,9 +1457,8 @@ fn_info_game_sbots(){ servername=$(grep "ServerName=" "${servercfgfullpath}" | sed -e 's/^[ \t]//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=";,:' | sed -e 's/^[ \t]//' -e 's/[ \t]*$//') maxplayers=$(grep "MaxPlayers=" "${servercfgfullpath}" | tr -cd '[:digit:]') - # Not Set + # Not set servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} maxplayers=${maxplayers:-"0"} fi @@ -1374,10 +1479,6 @@ fn_info_game_scpsl(){ configip=$(sed -nr 's/^ipv4_bind_ip: (.*)$/\1/p' "${servercfgfullpath}") tickrate=$(sed -nr 's/^server_tickrate: (.*)$/\1/p' "${servercfgfullpath}") adminpassword=$(sed -nr 's/^administrator_query_password: (.*)$/\1/p' "${servercfgfullpath}") - - if [ "${adminpassword}" == "none" ]; then - adminpassword="NOT SET" - fi else servername=${servername:-"NOT SET"} maxplayers=${maxplayers:-"0"} @@ -1387,10 +1488,12 @@ fn_info_game_scpsl(){ fi # Parameters - queryport="${port:-"0"}" + port=${port:-"0"} + queryport=${port} } fn_info_game_sdtd(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" serverpassword="${unavailable}" @@ -1428,7 +1531,7 @@ fn_info_game_sdtd(){ gamemode=$(grep "GameMode" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") gameworld=$(grep "GameWorld" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") - # Not Set + # Not set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} port=${port:-"0"} @@ -1458,7 +1561,7 @@ fn_info_game_sof2(){ serverpassword=$(grep "g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') maxplayers=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - # Not Set + # Not set rconpassword=${rconpassword:-"NOT SET"} servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} @@ -1467,11 +1570,12 @@ fn_info_game_sof2(){ # Parameters port=${port:-"0"} - queryport=${port:-"0"} + queryport=${port} defaultmap=${defaultmap:-"NOT SET"} } fn_info_game_sol(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then adminpassword="${unavailable}" maxplayers="${unavailable}" @@ -1509,7 +1613,7 @@ fn_info_game_source(){ serverpassword=$(grep "sv_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/sv_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - # Not Set + # Not set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} rconpassword=${rconpassword:-"NOT SET"} @@ -1544,12 +1648,16 @@ fn_info_game_spark(){ } fn_info_game_squad(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" maxplayers="${unavailable}" else servername=$(grep "ServerName=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') maxplayers=$(grep "MaxPlayers=" "${servercfgfullpath}" | tr -cd '[:digit:]') + + servername=${servername:-"NOT SET"} + maxplayers=${maxplayers:-"0"} fi if [ ! -f "${servercfgdir}/Rcon.cfg" ]; then @@ -1558,15 +1666,17 @@ fn_info_game_squad(){ else rconport=$(grep "Port=" "${servercfgdir}/Rcon.cfg" | tr -cd '[:digit:]') rconpassword=$(grep "Password=" "${servercfgdir}/Rcon.cfg" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - fi - rconport=${rconport:-"0"} - if [ -z "${rconpassword}" ]||[ ${#rconpassword} == 1 ]; then - rconpassword="NOT SET" + rconport=${rconport:-"0"} + if [ -z "${rconpassword}" ]||[ ${#rconpassword} == 1 ]; then + rconpassword="NOT SET" + fi + fi - servername=${servername:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - maxplayers=${maxplayers:-"0"} + + # Parameters + port=${port:-"0"} + queryport=${port:-"0"} } fn_info_game_st(){ @@ -1582,7 +1692,7 @@ fn_info_game_st(){ rconpassword=$(grep "RCONPASSWORD" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/RCONPASSWORD//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') maxplayers=$(grep "MAXPLAYER" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/MAXPLAYER//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - # Not Set + # Not set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} rconpassword=${rconpassword:-"NOT SET"} @@ -1598,7 +1708,9 @@ fn_info_game_st(){ clearinterval=${clearinterval:-"0"} worldname=${worldname:-"NOT SET"} } + fn_info_game_terraria(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" port="${zero}" @@ -1612,7 +1724,7 @@ fn_info_game_terraria(){ gameworld=$(grep "world=" "${servercfgfullpath}" | grep -v "//" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/world=//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') maxplayers=$(grep "maxplayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - # Not Set + # Not set servername=${servername:-"NOT SET"} port=${port:-"0"} queryport=${queryport:-"0"} @@ -1622,6 +1734,7 @@ fn_info_game_terraria(){ } fn_info_game_stn(){ + # Config if [ -f "${servercfgfullpath}" ]; then servername=$(sed -nr 's/^ServerName="(.*)"/\1/p' "${servercfgfullpath}") configip=$(sed -nr 's/^ServerIP=([0-9]+)/\1/p' "${servercfgfullpath}") @@ -1638,6 +1751,7 @@ fn_info_game_stn(){ } fn_info_game_ts3(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then dbplugin="${unavailable}" port="9987" @@ -1656,12 +1770,9 @@ fn_info_game_ts3(){ queryhttpsport=$(grep "query_https_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') fileport=$(grep "filetransfer_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') telnetport="${queryport}" - configip=$(grep "voice_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/voice_ip//g' | sed 's/,.*//' | tr -d '=\";,' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - ipsetinconfig=1 - ipinconfigvar="voice_ip" - # Not Set + # Not set dbplugin=${dbplugin:-"NOT SET"} port=${port:-"9987"} queryport=${queryport:-"10011"} @@ -1670,6 +1781,7 @@ fn_info_game_ts3(){ queryhttpsport=${queryhttpsport:-"10443"} fileport=${fileport:-"30033"} telnetport=${telnetport:-"10011"} + configip=${configip:-"0.0.0.0"} fi } @@ -1682,7 +1794,7 @@ fn_info_game_tu(){ servername=$(grep "ServerTitle" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/ServerTitle//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - # Not Set + # Not set servername=${servername:-"NOT SET"} maxplayers=${maxplayers:-"0"} fi @@ -1710,7 +1822,7 @@ fn_info_game_tw(){ queryport="${port}" maxplayers=$(grep "sv_max_clients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - # Not Set + # Not set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} rconpassword=${rconpassword:-"NOT SET"} @@ -1718,12 +1830,9 @@ fn_info_game_tw(){ queryport=${port:-"8303"} maxplayers=${maxplayers:-"12"} fi - - # Parameters - queryport="${port:-"0"}" } -fn_info_game_unreal(){ +fn_info_game_ut99(){ # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -1749,7 +1858,7 @@ fn_info_game_unreal(){ webadminuser=$(grep "AdminUsername" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminUsername//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//') webadminpass=$(grep "UTServerAdmin.UTServerAdmin" "${servercfgfullpath}" -A 4 | grep "AdminPassword" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//') - # Not Set + # Not set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} adminpassword=${adminpassword:-"NOT SET"} @@ -1792,7 +1901,7 @@ fn_info_game_unreal2(){ webadminuser=$(sed -nr 's/^AdminName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') webadminpass="${adminpassword}" - # Not Set + # Not set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} adminpassword=${adminpassword:-"NOT SET"} @@ -1810,6 +1919,7 @@ fn_info_game_unreal2(){ } fn_info_game_unt(){ + # Parameters servername=${selfname:-"NOT SET"} port=${port:-"0"} queryport=$((port+1)) @@ -1831,7 +1941,8 @@ fn_info_game_ut(){ queryport=$((port+1)) } -fn_info_game_ut2k4(){ +fn_info_game_unreal2k4(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" serverpassword="${unavailable}" @@ -1857,7 +1968,7 @@ fn_info_game_ut2k4(){ webadminuser=$(sed -nr 's/^AdminName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') webadminpass="${adminpassword}" - # Not Set + # Not set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} adminpassword=${adminpassword:-"NOT SET"} @@ -1893,7 +2004,7 @@ fn_info_game_ut3(){ webadminuser="Admin" webadminpass=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - # Not Set + # Not set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} adminpassword=${adminpassword:-"NOT SET"} @@ -1911,7 +2022,9 @@ fn_info_game_ut3(){ } fn_info_game_vh(){ + # Parameters port=${port:-"0"} + # Query port only enabled if public server if [ "${public}" != "0" ]; then queryport=$((port+1)) else @@ -1923,6 +2036,7 @@ fn_info_game_vh(){ } fn_info_game_wet(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then rconpassword="${unavailable}" servername="${unavailable}" @@ -1937,18 +2051,16 @@ fn_info_game_wet(){ servername=$(grep "set sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') serverpassword=$(grep "set g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') maxplayers=$(grep "set sv_maxclients" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - configip=$(grep "set net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set net_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - ipsetinconfig=1 - ipinconfigvar="set net_ip" - # Not Set + # Not set rconpassword=${rconpassword:-"NOT SET"} servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} maxplayers=${maxplayers:-"0"} port=${port:-"27960"} queryport=${queryport:-"27960"} + configip=${configip:-"0.0.0.0"} fi } @@ -1963,7 +2075,7 @@ fn_info_game_wf(){ servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') maxplayers=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - # Not Set + # Not set rconpassword=${rconpassword:-"NOT SET"} servername=${servername:-"NOT SET"} maxplayers=${maxplayers:-"0"} @@ -1977,28 +2089,35 @@ fn_info_game_wf(){ fn_info_game_wmc(){ - if [ -f "${servercfgfullpath}" ]; then + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + maxplayers="${zero}" + port="${zero}" + queryport="${zero}" + queryenabled="${unavailable}" + else servername=$(sed -e '/^listeners:/,/^[a-z]/!d' "${servercfgfullpath}" | sed -nr 's/^[ ]+motd: (.*)$/\1/p' | tr -d "'" | sed 's/&1//') queryport=$(sed -nr 's/^[ -]+query_port: ([0-9]+)/\1/p' "${servercfgfullpath}") queryenabled=$(sed -nr 's/^[ ]+query_enabled: (.*)$/\1/p' "${servercfgfullpath}") port=$(sed -nr 's/^[ ]+host: [0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:([0-9]+)/\1/p' "${servercfgfullpath}") - # the normal max_players does only show in on the client side and has no effect how many players can connect + # the normal max_players does only show in on the client side and has no effect how many players can connect. maxplayers=$(sed -nr 's/^player_limit: ([-]*[0-9])/\1/p' "${servercfgfullpath}") configip=$(sed -nr 's/^[ ]+host: ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+):[0-9]+/\1/p' "${servercfgfullpath}") if [ "${maxplayers}" == "-1" ]||[ "${maxplayers}" == "0" ]; then maxplayers="UNLIMITED" fi - else - servername="${unavailable}" - maxplayers="${zero}" - port="${zero}" - queryport="${zero}" - queryenabled="${unavailable}" + + # Not set + servername=${servername:-"NOT SET"} + queryport=${rconpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + configip=${configip:-"0.0.0.0"} fi } fn_info_game_wurm(){ + # Config if [ ! -f "${servercfgfullpath}" ]; then port="${zero}" queryport="${zero}" @@ -2008,19 +2127,15 @@ fn_info_game_wurm(){ adminpassword="${unavailable}" maxplayers="${zero}" else - port=$(grep "EXTERNALPORT=" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') queryport=$(grep "QUERYPORT=" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') servername=$(grep "SERVERNAME=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/SERVERNAME//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') serverpassword=$(grep "SERVERPASSWORD=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/SERVERPASSWORD//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') adminpassword=$(grep "ADMINPWD=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/ADMINPWD//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') maxplayers=$(grep "MAXPLAYERS=" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - configip=$(grep "IP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/IP//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - ipsetinconfig=1 - ipinconfigvar="IP" - # Not Set + # Not set port=${port:-"3724"} queryport=${queryport:-"27017"} servername=${servername:-"NOT SET"} @@ -2053,7 +2168,9 @@ elif [ "${shortname}" == "bt1944" ]; then fn_info_game_bt1944 elif [ "${shortname}" == "cmw" ]; then fn_info_game_cmw -elif [ "${shortname}" == "cod" ]||[ "${shortname}" == "coduo" ]; then +elif [ "${shortname}" == "cod" ]; then + fn_info_game_cod +elif [ "${shortname}" == "coduo" ]; then fn_info_game_cod elif [ "${shortname}" == "cod2" ]; then fn_info_game_cod2 @@ -2160,9 +2277,11 @@ elif [ "${shortname}" == "unt" ]; then elif [ "${shortname}" == "ut" ]; then fn_info_game_ut elif [ "${shortname}" == "ut2k4" ]; then - fn_info_game_ut2k4 + fn_info_game_unreal2k4 elif [ "${shortname}" == "ut3" ]; then fn_info_game_ut3 +elif [ "${shortname}" == "ut99" ]; then + fn_info_game_ut99 elif [ "${shortname}" == "vh" ]; then fn_info_game_vh elif [ "${shortname}" == "vints" ]; then @@ -2177,8 +2296,6 @@ elif [ "${shortname}" == "wurm" ]; then fn_info_game_wurm elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsrc" ]; then fn_info_game_source -elif [ "${engine}" == "unreal" ]; then - fn_info_game_unreal elif [ "${engine}" == "unreal2" ]; then fn_info_game_unreal2 fi diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh old mode 100755 new mode 100644 index eb1724560..9a143f8e7 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -339,6 +339,11 @@ fn_info_message_gameserver(){ fi fi + # Reverved Slots + if [ -n "${statspassword}" ]; then + echo -e "${lightblue}Reserved Slots:\t${default}${reservedslots}" + fi + # Bots if [ -n "${gdbots}" ]; then echo -e "${lightblue}Bots:\t${default}${gdbots}" From b94c451d79f5f92cb3e4e11c3ac8c0fea0693f1a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 22 Sep 2021 22:15:42 +0100 Subject: [PATCH 26/38] Revert "add lastoasis" This reverts commit 45de90e000bffc7e78f46c7863b2055705d0f5e6. --- .../config-lgsm/loserver/_default.cfg | 188 ------------------ lgsm/data/serverlist.csv | 1 - 2 files changed, 189 deletions(-) delete mode 100644 lgsm/config-default/config-lgsm/loserver/_default.cfg diff --git a/lgsm/config-default/config-lgsm/loserver/_default.cfg b/lgsm/config-default/config-lgsm/loserver/_default.cfg deleted file mode 100644 index 313e50a49..000000000 --- a/lgsm/config-default/config-lgsm/loserver/_default.cfg +++ /dev/null @@ -1,188 +0,0 @@ -################################## -######## Default Settings ######## -################################## -# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! -# Copy settings from here and use them in either: -# common.cfg - applies settings to every instance. -# [instance].cfg - applies settings to a specific instance. - -#### Game Server Settings #### - -## SteamCMD Login | https://docs.linuxgsm.com/steamcmd#steamcmd-login -steamuser="username" -steampass='password' - -## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters -servername="LinuxGSM" -ip="0.0.0.0" -port="7777" -queryport="27015" -customerkey="" -providerkey="" -slots="100" - -## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-log -force_steamclient_link -messaging -NoLiveServer -EnableCheats -backendapiurloverride='backend.last-oasis.com' -identifier=${servername} -port=${port} -CustomerKey=${customerkey} -ProviderKey=${providerkey} -slots=${slots} -QueryPort=${queryport} -OverrideConnectionAddress=${ip}" - -#### LinuxGSM Settings #### - -## LinuxGSM Stats -# Send useful stats to LinuxGSM developers. -# https://docs.linuxgsm.com/configuration/linuxgsm-stats -# (on|off) -stats="off" - -## Notification Alerts -# (on|off) - -# Display IP | https://docs.linuxgsm.com/alerts#display-ip -displayip="" - -# More info | https://docs.linuxgsm.com/alerts#more-info -postalert="off" - -# Discord Alerts | https://docs.linuxgsm.com/alerts/discord -discordalert="off" -discordwebhook="webhook" - -# Email Alerts | https://docs.linuxgsm.com/alerts/email -emailalert="off" -email="email@example.com" -emailfrom="" - -# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt -iftttalert="off" -ifttttoken="accesstoken" -iftttevent="linuxgsm_alert" - -# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun -mailgunalert="off" -mailgunapiregion="us" -mailguntoken="accesstoken" -mailgundomain="example.com" -mailgunemailfrom="alert@example.com" -mailgunemail="email@myemail.com" - -# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover -pushoveralert="off" -pushovertoken="accesstoken" -pushoveruserkey="userkey" - -# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat -rocketchatalert="off" -rocketchatwebhook="webhook" -rocketchattoken="" - -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - -# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram -# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". -telegramapi="api.telegram.org" -telegramalert="off" -telegramtoken="accesstoken" -telegramchatid="" -curlcustomstring="" - -## Updating | https://docs.linuxgsm.com/commands/update -updateonstart="off" - -## Backup | https://docs.linuxgsm.com/commands/backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://docs.linuxgsm.com/features/logging -consolelogging="on" -logdays="7" - -## Monitor | https://docs.linuxgsm.com/commands/monitor -# Query delay time -querydelay="1" - -## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors -ansi="on" - -#### Advanced Settings #### - -## Message Display Time | https://docs.linuxgsm.com/features/message-display-time -sleeptime="0.5" - -## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd -# Server appid -appid="920720" -steamcmdforcewindows="no" -# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch -branch="" -betapassword="" -# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server -steammaster="false" - -## Stop Mode | https://docs.linuxgsm.com/features/stop-mode -# 1: tmux kill -# 2: CTRL+c -# 3: quit -# 4: quit 120s -# 5: stop -# 6: q -# 7: exit -# 8: 7 Days to Die -# 9: GoldSrc -# 10: Avorion -# 11: end -stopmode="2" - -## Query mode -# 1: session only -# 2: gamedig (gsquery fallback) -# 3: gamedig -# 4: gsquery -# 5: tcp -querymode="1" -querytype="" - -## Console type -consoleverbose="yes" -consoleinteract="no" - -## Game Server Details -# Do not edit -gamename="Last Oasis" -engine="unreal4" -glibc="2.17" - -#### Directories #### -# Edit with care - -## Game Server Directories -systemdir="${serverfiles}/Mist" -executabledir="${systemdir}/Binaries/Linux" -executable="./MistServer-Linux-Shipping" -servercfgdir="${systemdir}/Saved/Config/LinuxServer" -servercfg="Game.ini" -servercfgdefault="Game.ini" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${lgsmdir}/backup" - -## Logging Directories -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" \ No newline at end of file diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 4bad355a6..e5e290efc 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -52,7 +52,6 @@ jc3,jc3server,Just Cause 3 jk2,jk2server,Jedi Knight II: Jedi Outcast kf,kfserver,Killing Floor kf2,kf2server,Killing Floor 2 -lo,loserver,Last Oasis l4d,l4dserver,Left 4 Dead l4d2,l4d2server,Left 4 Dead 2 mc,mcserver,Minecraft From 0ed9783a13e0f7f780267d8e1bc79b7ebaa19133 Mon Sep 17 00:00:00 2001 From: KillahInstinct1 Date: Thu, 23 Sep 2021 23:49:44 +0200 Subject: [PATCH 27/38] feat(mods): Added Dhooks, Movement API and Cleaner for GOKZ (#3511) Co-authored-by: Daniel Gibbs --- lgsm/functions/mods_list.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/mods_list.sh b/lgsm/functions/mods_list.sh index 35a302fc0..382ed8c1f 100755 --- a/lgsm/functions/mods_list.sh +++ b/lgsm/functions/mods_list.sh @@ -139,6 +139,9 @@ mod_info_gokz=( MOD "gokz" "GOKZ" "https://bitbucket.org/kztimerglobalteam/gokz/ mod_info_ttt=( MOD "ttt" "Trouble in Terrorist Town" "https://csgottt.com/downloads/ttt-latest-dev-${sourcemodversion}.zip" "ttt-latest.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/Bara/TroubleinTerroristTown" "Implements the TTT game mode (requires SourceMod and MetaMod)" ) mod_info_get5=( MOD "get5" "Get 5" "${get5url}" "${get5latestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/get5" "Plugin for competitive matches/scrims (requires SourceMod and MetaMod)" ) mod_info_pug=( MOD "pug" "PUG" "${csgopuglatestlink}" "${csgopuglatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/csgo-pug-setup" "plugin for setting up private pug/10man games" ) +mod_info_dhook=( MOD "dhook" "dhook" "https://forums.alliedmods.net/attachment.php?attachmentid=190123&d=1625050030" "dhooks-2.2.0d17.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://forums.alliedmods.net/showpost.php?p=2588686&postcount=589" "DHooks 2.2.0 - Required for GOKZ" ) +mod_info_movement=( MOD "movementapi" "movementapi" "https://github.com/danzayau/MovementAPI/releases/download/2.1.0/MovementAPI-v2.1.0.zip" "MovementAPI-v2.1.0.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/danzayau/MovementAPI" "Movement API 2.1.0 - Required for GOKZ" ) +mod_info_cleaner=( MOD "cleaner" "cleaner" "https://github.com/e54385991/console-cleaner/archive/refs/heads/master.zip" "console-cleaner.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/e54385991/console-cleaner" "Console Cleaner - Optional for GOKZ" ) # Garry's Mod Addons mod_info_ulib=( MOD "ulib" "ULib" "https://codeload.github.com/TeamUlysses/ulib/zip/master" "ulib-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://ulyssesmod.net" "Complete Framework" ) @@ -176,4 +179,4 @@ mod_info_hwoxide=( MOD "hwoxide" "Oxide for Hurtworld" "${oxidehurtworldlatestli mod_info_sdtdoxide=( MOD "sdtdoxide" "Oxide for 7 Days To Die" "${oxidesdtdlatestlink}" "Oxide.SevenDaysToDie.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "7 Days To Die;" "NOTGAMES" "https://umod.org/games/7-days-to-die" "Allows for the use of plugins" ) # REQUIRED: Set all mods info into the global array -mods_global_array=( "${mod_info_metamod[@]}" "${mod_info_base_amxx[@]}" "${mod_info_cs_amxx[@]}" "${mod_info_dod_amxx[@]}" "${mod_info_tfc_amxx[@]}" "${mod_info_ns_amxx[@]}" "${mod_info_ts_amxx[@]}" "${mod_info_metamodsource[@]}" "${mod_info_sourcemod[@]}" "${mod_info_steamworks[@]}" "${mod_info_gokz[@]}" "${mod_info_ttt[@]}" "${mod_info_get5[@]}" "${mod_info_pug[@]}" "${mod_info_ulib[@]}" "${mod_info_ulx[@]}" "${mod_info_utime[@]}" "${mod_info_uclip[@]}" "${mod_info_acf[@]}" "${mod_info_acf_missiles[@]}" "${mod_info_acf_sweps[@]}" "${mod_info_advdupe2[@]}" "${mod_info_pac3[@]}" "${mod_info_wiremod[@]}" "${mod_info_wiremodextras[@]}" "${mod_info_darkrp[@]}" "${mod_info_darkrpmodification[@]}" "${mod_info_rustoxide[@]}" "${mod_info_hwoxide[@]}" "${mod_info_sdtdoxide[@]}" "${mod_info_advduplicator[@]}" "${mod_info_trackassemblytool[@]}" "${mod_info_physpropertiesadv[@]}" "${mod_info_controlsystemse2[@]}" "${mod_info_e2pistontiming[@]}" "${mod_info_propcannontool[@]}" "${mod_info_gearassemblytool[@]}" "${mod_info_spinnertool[@]}" "${mod_info_surfacefrictiontool[@]}" "${mod_info_magneticdipole[@]}" "${mod_info_environmentorganizer[@]}" "${mod_info_precision_alignment[@]}" "${mod_info_improved_stacker[@]}" "${mod_info_improved_weight[@]}" "${mod_info_improved_antinoclip[@]}" "${mod_info_laserstool[@]}" ) +mods_global_array=( "${mod_info_metamod[@]}" "${mod_info_base_amxx[@]}" "${mod_info_cs_amxx[@]}" "${mod_info_dod_amxx[@]}" "${mod_info_tfc_amxx[@]}" "${mod_info_ns_amxx[@]}" "${mod_info_ts_amxx[@]}" "${mod_info_metamodsource[@]}" "${mod_info_sourcemod[@]}" "${mod_info_steamworks[@]}" "${mod_info_gokz[@]}" "${mod_info_ttt[@]}" "${mod_info_get5[@]}" "${mod_info_pug[@]}" "${mod_info_dhook[@]}" "${mod_info_movement[@]}" "${mod_info_cleaner[@]}" "${mod_info_ulib[@]}" "${mod_info_ulx[@]}" "${mod_info_utime[@]}" "${mod_info_uclip[@]}" "${mod_info_acf[@]}" "${mod_info_acf_missiles[@]}" "${mod_info_acf_sweps[@]}" "${mod_info_advdupe2[@]}" "${mod_info_pac3[@]}" "${mod_info_wiremod[@]}" "${mod_info_wiremodextras[@]}" "${mod_info_darkrp[@]}" "${mod_info_darkrpmodification[@]}" "${mod_info_rustoxide[@]}" "${mod_info_hwoxide[@]}" "${mod_info_sdtdoxide[@]}" "${mod_info_advduplicator[@]}" "${mod_info_trackassemblytool[@]}" "${mod_info_physpropertiesadv[@]}" "${mod_info_controlsystemse2[@]}" "${mod_info_e2pistontiming[@]}" "${mod_info_propcannontool[@]}" "${mod_info_gearassemblytool[@]}" "${mod_info_spinnertool[@]}" "${mod_info_surfacefrictiontool[@]}" "${mod_info_magneticdipole[@]}" "${mod_info_environmentorganizer[@]}" "${mod_info_precision_alignment[@]}" "${mod_info_improved_stacker[@]}" "${mod_info_improved_weight[@]}" "${mod_info_improved_antinoclip[@]}" "${mod_info_laserstool[@]}" ) From ef3f7527179457acba8993018c56458f35aa85df Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 23 Sep 2021 23:39:26 +0100 Subject: [PATCH 28/38] fix(arma3): resolve arma3 debug not working (#3409) * use eval in debug --- lgsm/functions/command_debug.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/lgsm/functions/command_debug.sh b/lgsm/functions/command_debug.sh index a9cceebdb..b6ab14fe8 100755 --- a/lgsm/functions/command_debug.sh +++ b/lgsm/functions/command_debug.sh @@ -112,17 +112,12 @@ fi # Note: do not add double quotes to ${executable} ${startparameters}. if [ "${engine}" == "source" ]||[ "${engine}" == "goldsrc" ]; then - ${executable} ${startparameters} -debug -elif [ "${shortname}" == "arma3" ]; then - # Arma3 requires semicolons in the module list, which need to - # be escaped for regular (tmux) loading, but need to be - # stripped when loading straight from the console. - ${executable} ${parms//\\;/;} + eval "${executable} ${startparameters} -debug" elif [ "${engine}" == "quake" ]; then - ${executable} ${startparameters} -condebug + eval "${executable} ${startparameters} -condebug" else # shellcheck disable=SC2086 - ${preexecutable} ${executable} ${startparameters} + eval "${preexecutable} ${executable} ${startparameters}" fi fn_lockfile_trap From bb5300300c8f73a1cce39c3273f2bedff2223ac8 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 24 Sep 2021 20:50:30 +0100 Subject: [PATCH 29/38] fix(ip): improvements to ip command usage (#3570) --- lgsm/functions/check_ip.sh | 21 ++++++++++++++++----- lgsm/functions/info_distro.sh | 4 ++-- tests/tests_jc2server.sh | 6 +++--- tests/tests_mcserver.sh | 12 ++++++------ 4 files changed, 27 insertions(+), 16 deletions(-) diff --git a/lgsm/functions/check_ip.sh b/lgsm/functions/check_ip.sh index 09b948ccd..0dafbbcdc 100755 --- a/lgsm/functions/check_ip.sh +++ b/lgsm/functions/check_ip.sh @@ -10,11 +10,22 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" info_game.sh -if [ ! -f "/bin/ip" ]; then - ipcommand="/sbin/ip" -else - ipcommand="ip" -fi +ip_commands_array=( "/bin/ip" "/usr/sbin/ip" "ip") +for ip_command in "${ip_commands_array[@]}"; do + if [ "$(command -v ${ip_command} 2>/dev/null)" ]; then + ipcommand="${ip_command}" + break + fi +done + +ethtool_commands_array=( "/bin/ethtool" "/usr/sbin/ethtool" "ethtool") +for ethtool_command in "${ethtool_commands_array[@]}"; do + if [ "$(command -v ${ethtool_command} 2>/dev/null)" ]; then + ethtoolcommand="${ethtool_command}" + break + fi +done + getip=$(${ipcommand} -o -4 addr | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | sort -u | grep -v 127.0.0) getipwc=$(${ipcommand} -o -4 addr | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | sort -u | grep -vc 127.0.0) diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh index fdfc076ab..eda17f8d1 100755 --- a/lgsm/functions/info_distro.sh +++ b/lgsm/functions/info_distro.sh @@ -234,8 +234,8 @@ if [ -d "${backupdir}" ]; then fi # Network Interface name -netint=$(ip -o addr | grep "${ip}" | awk '{print $2}') -netlink=$(ethtool "${netint}" 2>/dev/null| grep Speed | awk '{print $2}') +netint=$(${ipcommand} -o addr | grep "${ip}" | awk '{print $2}') +netlink=$(${ethtoolcommand} "${netint}" 2>/dev/null| grep Speed | awk '{print $2}') # External IP address if [ -z "${extip}" ]; then diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 474d45f06..246ee76cd 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -1070,10 +1070,10 @@ echo -e "=================================" echo -e "Description:" echo -e "Inserting Travis IP in to config." echo -e "Allows monitor to work" -if [ "$(ip -o -4 addr|grep eth0)" ]; then - travisip=$(ip -o -4 addr | grep eth0 | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | grep -v 127.0.0) +if [ "$(${ipcommand}-o -4 addr|grep eth0)" ]; then + travisip=$(${ipcommand}-o -4 addr | grep eth0 | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | grep -v 127.0.0) else - travisip=$(ip -o -4 addr | grep ens | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | sort -u | grep -v 127.0.0) + travisip=$(${ipcommand}-o -4 addr | grep ens | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | sort -u | grep -v 127.0.0) fi sed -i "/BindIP/c\BindIP = \"${travisip}\"," "${serverfiles}/config.lua" echo -e "IP: ${travisip}" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index b6d6217cd..783580872 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -933,10 +933,10 @@ echo -e "=================================" echo -e "Description:" echo -e "Inserting Travis IP in to config." echo -e "Allows monitor to work" -if [ "$(ip -o -4 addr|grep eth0)" ]; then - travisip=$(ip -o -4 addr | grep eth0 | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | grep -v 127.0.0) +if [ "$(${ipcommand}-o -4 addr|grep eth0)" ]; then + travisip=$(${ipcommand}-o -4 addr | grep eth0 | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | grep -v 127.0.0) else - travisip=$(ip -o -4 addr | grep ens | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | sort -u | grep -v 127.0.0) + travisip=$(${ipcommand}-o -4 addr | grep ens | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | sort -u | grep -v 127.0.0) fi sed -i "/server-ip=/c\server-ip=${travisip}" "${serverfiles}/server.properties" echo -e "IP: ${travisip}" @@ -1167,10 +1167,10 @@ echo -e "=================================" echo -e "Description:" echo -e "Inserting Travis IP in to config." echo -e "Allows monitor to work" -if [ "$(ip -o -4 addr|grep eth0)" ]; then - travisip=$(ip -o -4 addr | grep eth0 | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | grep -v 127.0.0) +if [ "$(${ipcommand}-o -4 addr|grep eth0)" ]; then + travisip=$(${ipcommand}-o -4 addr | grep eth0 | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | grep -v 127.0.0) else - travisip=$(ip -o -4 addr | grep ens | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | sort -u | grep -v 127.0.0) + travisip=$(${ipcommand}-o -4 addr | grep ens | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | sort -u | grep -v 127.0.0) fi sed -i "/server-ip=/c\server-ip=${travisip}" "${serverfiles}/server.properties" echo -e "IP: ${travisip}" From 74acd2dc8a303676601558c3282353c27f43d4c3 Mon Sep 17 00:00:00 2001 From: Christian Date: Fri, 24 Sep 2021 22:24:51 +0200 Subject: [PATCH 30/38] feat(valheim): add support for Valheim Plus mod (#3346) --- lgsm/functions/check_deps.sh | 6 ++++++ lgsm/functions/core_getopt.sh | 2 +- lgsm/functions/fix_vh.sh | 14 ++++++++++++++ lgsm/functions/mods_list.sh | 11 ++++++++--- 4 files changed, 29 insertions(+), 4 deletions(-) diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh index 722a0a4da..0e18b9f32 100755 --- a/lgsm/functions/check_deps.sh +++ b/lgsm/functions/check_deps.sh @@ -465,6 +465,9 @@ fn_deps_build_debian(){ # Pavlov VR elif [ "${shortname}" == "pvr" ]; then array_deps_required+=( libc++1 ) + # Valheim ( for Plus mod) + elif [ "${shortname}" == "vh" ]; then + array_deps_required+=( libc6-dev ) fi # check if system is a lxc container and the hostname dependency. @@ -577,6 +580,9 @@ fn_deps_build_redhat(){ # Pavlov VR elif [ "${shortname}" == "pvr" ]; then array_deps_required+=( libcxx ) + # Valheim ( for Plus mod ) + elif [ "${shortname}" == "vh" ]; then + array_deps_required+=( glibc-devel ) fi # check if system is a lxc container and the hostname dependency. diff --git a/lgsm/functions/core_getopt.sh b/lgsm/functions/core_getopt.sh index ea3c84f6d..9594fa5ae 100755 --- a/lgsm/functions/core_getopt.sh +++ b/lgsm/functions/core_getopt.sh @@ -134,7 +134,7 @@ if [ "${shortname}" == "squad" ]; then fi ## Mods commands. -if [ "${engine}" == "source" ]||[ "${shortname}" == "rust" ]||[ "${shortname}" == "hq" ]||[ "${shortname}" == "sdtd" ]||[ "${shortname}" == "cs" ]||[ "${shortname}" == "dod" ]||[ "${shortname}" == "tfc" ]||[ "${shortname}" == "ns" ]||[ "${shortname}" == "ts" ]||[ "${shortname}" == "hldm" ]; then +if [ "${engine}" == "source" ]||[ "${shortname}" == "rust" ]||[ "${shortname}" == "hq" ]||[ "${shortname}" == "sdtd" ]||[ "${shortname}" == "cs" ]||[ "${shortname}" == "dod" ]||[ "${shortname}" == "tfc" ]||[ "${shortname}" == "ns" ]||[ "${shortname}" == "ts" ]||[ "${shortname}" == "hldm" ]||[ "${shortname}" == "vh" ]; then currentopt+=( "${cmd_mods_install[@]}" "${cmd_mods_remove[@]}" "${cmd_mods_update[@]}" ) fi diff --git a/lgsm/functions/fix_vh.sh b/lgsm/functions/fix_vh.sh index 551bd878f..9b672a5b3 100755 --- a/lgsm/functions/fix_vh.sh +++ b/lgsm/functions/fix_vh.sh @@ -7,3 +7,17 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" export LD_LIBRARY_PATH=./linux64:$LD_LIBRARY_PATH + +# special check if Valheim Plus is installed +modsdir="${lgsmdir}/mods" +modsinstalledlistfullpath="${modsdir}/installed-mods.txt" +if [ -f "${modsinstalledlistfullpath}" ]; then + if grep -qE "^valheimplus" "${modsinstalledlistfullpath}" + then + if ! grep -qE "^executable=\"./start_server_bepinex.sh\"" "${configdirserver}/${selfname}.cfg" + then + echo 'executable="./start_server_bepinex.sh"' >> "${configdirserver}/${selfname}.cfg" + executeable="./start_server_bepinex.sh" + fi + fi +fi diff --git a/lgsm/functions/mods_list.sh b/lgsm/functions/mods_list.sh index 382ed8c1f..fc9d921d6 100755 --- a/lgsm/functions/mods_list.sh +++ b/lgsm/functions/mods_list.sh @@ -83,6 +83,8 @@ csgopuglatestlink=$(echo -e "${csgopuglatest}" | jq -r '.browser_download_url') oxiderustlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/OxideMod/Oxide.Rust/releases/latest | jq -r '.assets[]|select(.browser_download_url | contains("linux")) | .browser_download_url') oxidehurtworldlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/OxideMod/Oxide.Hurtworld/releases/latest | jq -r '.assets[].browser_download_url') oxidesdtdlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/OxideMod/Oxide.SevenDaysToDie/releases/latest | jq -r '.assets[]|select(.browser_download_url | contains("linux")) | .browser_download_url' ) +# Valheim Plus +valeimpluslatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/valheimPlus/ValheimPlus/releases/latest | jq -r '.assets[]|select(.browser_download_url | contains("UnixServer.tar.gz")) | .browser_download_url') # Define mods information (required) @@ -140,8 +142,8 @@ mod_info_ttt=( MOD "ttt" "Trouble in Terrorist Town" "https://csgottt.com/downlo mod_info_get5=( MOD "get5" "Get 5" "${get5url}" "${get5latestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/get5" "Plugin for competitive matches/scrims (requires SourceMod and MetaMod)" ) mod_info_pug=( MOD "pug" "PUG" "${csgopuglatestlink}" "${csgopuglatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/csgo-pug-setup" "plugin for setting up private pug/10man games" ) mod_info_dhook=( MOD "dhook" "dhook" "https://forums.alliedmods.net/attachment.php?attachmentid=190123&d=1625050030" "dhooks-2.2.0d17.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://forums.alliedmods.net/showpost.php?p=2588686&postcount=589" "DHooks 2.2.0 - Required for GOKZ" ) -mod_info_movement=( MOD "movementapi" "movementapi" "https://github.com/danzayau/MovementAPI/releases/download/2.1.0/MovementAPI-v2.1.0.zip" "MovementAPI-v2.1.0.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/danzayau/MovementAPI" "Movement API 2.1.0 - Required for GOKZ" ) -mod_info_cleaner=( MOD "cleaner" "cleaner" "https://github.com/e54385991/console-cleaner/archive/refs/heads/master.zip" "console-cleaner.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/e54385991/console-cleaner" "Console Cleaner - Optional for GOKZ" ) +mod_info_movement=( MOD "movementapi" "movementapi" "https://github.com/danzayau/MovementAPI/releases/download/2.1.0/MovementAPI-v2.1.0.zip" "MovementAPI-v2.1.0.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/danzayau/MovementAPI" "Movement API 2.1.0 - Required for GOKZ" ) +mod_info_cleaner=( MOD "cleaner" "cleaner" "https://github.com/e54385991/console-cleaner/archive/refs/heads/master.zip" "console-cleaner.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/e54385991/console-cleaner" "Console Cleaner - Optional for GOKZ" ) # Garry's Mod Addons mod_info_ulib=( MOD "ulib" "ULib" "https://codeload.github.com/TeamUlysses/ulib/zip/master" "ulib-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://ulyssesmod.net" "Complete Framework" ) @@ -178,5 +180,8 @@ mod_info_rustoxide=( MOD "rustoxide" "Oxide for Rust" "${oxiderustlatestlink}" " mod_info_hwoxide=( MOD "hwoxide" "Oxide for Hurtworld" "${oxidehurtworldlatestlink}" "Oxide.Hurtworld.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Hurtworld;" "NOTGAMES" "https://umod.org/games/hurtworld" "Allows for the use of plugins" ) mod_info_sdtdoxide=( MOD "sdtdoxide" "Oxide for 7 Days To Die" "${oxidesdtdlatestlink}" "Oxide.SevenDaysToDie.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "7 Days To Die;" "NOTGAMES" "https://umod.org/games/7-days-to-die" "Allows for the use of plugins" ) +# ValheimPlus +mod_info_valheimplus=( MOD "valheimplus" "Valheim PLUS" "${valeimpluslatestlink}" "ValheimPlus.tar.gz" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Valheim;" "NOTGAMES" "https://github.com/valheimPlus/ValheimPlus" "Mod to improve Valheim gameplay") + # REQUIRED: Set all mods info into the global array -mods_global_array=( "${mod_info_metamod[@]}" "${mod_info_base_amxx[@]}" "${mod_info_cs_amxx[@]}" "${mod_info_dod_amxx[@]}" "${mod_info_tfc_amxx[@]}" "${mod_info_ns_amxx[@]}" "${mod_info_ts_amxx[@]}" "${mod_info_metamodsource[@]}" "${mod_info_sourcemod[@]}" "${mod_info_steamworks[@]}" "${mod_info_gokz[@]}" "${mod_info_ttt[@]}" "${mod_info_get5[@]}" "${mod_info_pug[@]}" "${mod_info_dhook[@]}" "${mod_info_movement[@]}" "${mod_info_cleaner[@]}" "${mod_info_ulib[@]}" "${mod_info_ulx[@]}" "${mod_info_utime[@]}" "${mod_info_uclip[@]}" "${mod_info_acf[@]}" "${mod_info_acf_missiles[@]}" "${mod_info_acf_sweps[@]}" "${mod_info_advdupe2[@]}" "${mod_info_pac3[@]}" "${mod_info_wiremod[@]}" "${mod_info_wiremodextras[@]}" "${mod_info_darkrp[@]}" "${mod_info_darkrpmodification[@]}" "${mod_info_rustoxide[@]}" "${mod_info_hwoxide[@]}" "${mod_info_sdtdoxide[@]}" "${mod_info_advduplicator[@]}" "${mod_info_trackassemblytool[@]}" "${mod_info_physpropertiesadv[@]}" "${mod_info_controlsystemse2[@]}" "${mod_info_e2pistontiming[@]}" "${mod_info_propcannontool[@]}" "${mod_info_gearassemblytool[@]}" "${mod_info_spinnertool[@]}" "${mod_info_surfacefrictiontool[@]}" "${mod_info_magneticdipole[@]}" "${mod_info_environmentorganizer[@]}" "${mod_info_precision_alignment[@]}" "${mod_info_improved_stacker[@]}" "${mod_info_improved_weight[@]}" "${mod_info_improved_antinoclip[@]}" "${mod_info_laserstool[@]}" ) +mods_global_array=( "${mod_info_metamod[@]}" "${mod_info_base_amxx[@]}" "${mod_info_cs_amxx[@]}" "${mod_info_dod_amxx[@]}" "${mod_info_tfc_amxx[@]}" "${mod_info_ns_amxx[@]}" "${mod_info_ts_amxx[@]}" "${mod_info_metamodsource[@]}" "${mod_info_sourcemod[@]}" "${mod_info_steamworks[@]}" "${mod_info_gokz[@]}" "${mod_info_ttt[@]}" "${mod_info_get5[@]}" "${mod_info_pug[@]}" "${mod_info_dhook[@]}" "${mod_info_movement[@]}" "${mod_info_cleaner[@]}" "${mod_info_ulib[@]}" "${mod_info_ulx[@]}" "${mod_info_utime[@]}" "${mod_info_uclip[@]}" "${mod_info_acf[@]}" "${mod_info_acf_missiles[@]}" "${mod_info_acf_sweps[@]}" "${mod_info_advdupe2[@]}" "${mod_info_pac3[@]}" "${mod_info_wiremod[@]}" "${mod_info_wiremodextras[@]}" "${mod_info_darkrp[@]}" "${mod_info_darkrpmodification[@]}" "${mod_info_rustoxide[@]}" "${mod_info_hwoxide[@]}" "${mod_info_sdtdoxide[@]}" "${mod_info_advduplicator[@]}" "${mod_info_trackassemblytool[@]}" "${mod_info_physpropertiesadv[@]}" "${mod_info_controlsystemse2[@]}" "${mod_info_e2pistontiming[@]}" "${mod_info_propcannontool[@]}" "${mod_info_gearassemblytool[@]}" "${mod_info_spinnertool[@]}" "${mod_info_surfacefrictiontool[@]}" "${mod_info_magneticdipole[@]}" "${mod_info_environmentorganizer[@]}" "${mod_info_precision_alignment[@]}" "${mod_info_improved_stacker[@]}" "${mod_info_improved_weight[@]}" "${mod_info_improved_antinoclip[@]}" "${mod_info_laserstool[@]}" "${mod_info_valheimplus[@]}" ) From f289ebe560e152e8c8c017b680733b757cf77b35 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 24 Sep 2021 23:18:11 +0100 Subject: [PATCH 31/38] feat(install): dependency refactor (#3568) * adding data files * adding old code back in * added csv download code * added debian 11 * distro detection bug * file github * adding url checking * check url * check dl * file_url to fileurl * remove infinite loop * correct message * adding file checking * impove dep checking logic for unsupported distros * logic * add missing dep menu * using update_steamcmd.sh * added remote location * download csv file * download * logic * more logic * speed up dependency loop * message type change * remove legacy code * command only listed on install * remove nl * remove check requirement on stop * missing vints vints * add debian based servers * eco * add centos8 * mono changes * correct centos8 csv * centos 8 fixes * almalinux-8.4 * add centos 7 and rocky 8 * add dnf and email deps * add steamcmd requirements * steamcmd requirements * dependencysteamcmd * prevent masterserver from checking more than once per command * uniq sort dependency array * re-word of mono repo install * prevent too many steam api querys * java and mono check logic * unset depstatus * mono status * java versions * java wildcard * depstatus * bug * add dodr * remove i386 command if not needed * added rhel * 8.4 to just 8 * added Valheim Plus requriements --- lgsm/data/almalinux-8.csv | 120 +++++ lgsm/data/centos-7.csv | 120 +++++ lgsm/data/centos-8.csv | 120 +++++ lgsm/data/debian-10.csv | 120 +++++ lgsm/data/debian-11.csv | 120 +++++ lgsm/data/debian-9.csv | 120 +++++ lgsm/data/rhel-7.csv | 120 +++++ lgsm/data/rhel-8.csv | 120 +++++ lgsm/data/rocky-8.csv | 120 +++++ lgsm/data/ubuntu-16.04.csv | 120 +++++ lgsm/data/ubuntu-18.04.csv | 120 +++++ lgsm/data/ubuntu-20.04.csv | 121 +++++ lgsm/data/ubuntu-21.04.csv | 120 +++++ lgsm/functions/check.sh | 2 +- lgsm/functions/check_deps.sh | 705 ++++++++----------------- lgsm/functions/core_dl.sh | 146 +++-- lgsm/functions/info_distro.sh | 194 +++---- lgsm/functions/info_game.sh | 21 + lgsm/functions/install_config.sh | 1 - lgsm/functions/install_server_dir.sh | 1 - lgsm/functions/install_server_files.sh | 1 + 21 files changed, 2011 insertions(+), 621 deletions(-) create mode 100644 lgsm/data/almalinux-8.csv create mode 100644 lgsm/data/centos-7.csv create mode 100644 lgsm/data/centos-8.csv create mode 100644 lgsm/data/debian-10.csv create mode 100644 lgsm/data/debian-11.csv create mode 100644 lgsm/data/debian-9.csv create mode 100644 lgsm/data/rhel-7.csv create mode 100644 lgsm/data/rhel-8.csv create mode 100644 lgsm/data/rocky-8.csv create mode 100644 lgsm/data/ubuntu-16.04.csv create mode 100644 lgsm/data/ubuntu-18.04.csv create mode 100644 lgsm/data/ubuntu-20.04.csv create mode 100644 lgsm/data/ubuntu-21.04.csv diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv new file mode 100644 index 000000000..f72d74b7b --- /dev/null +++ b/lgsm/data/almalinux-8.csv @@ -0,0 +1,120 @@ +all,epel-release,curl,wget,util-linux,python36,file,tar,gzip,bzip2,unzip,xz,binutils,bc,jq,tmux,nmap-ncat,cpio,hostname +ac +ahl +ahl2 +ark +arma3 +av +bb +bb2,libcurl.i686 +bd +bf1942,ncurses-libs.i686 +bfv,compat-libstdc++-33.i686,glibc.i686 +bmdm,ncurses-libs.i686 +bo +bs +bt,libicu +bt1944 +cc +cmw +cod,compat-libstdc++-33.i686 +cod2,compat-libstdc++-33.i686 +cod4 +coduo,compat-libstdc++-33.i686 +codwaw +col +cs +cscz +csgo +css,ncurses-libs.i686 +dab +dmc +dod +dodr +dods +doi +dst,libcurl.i686 +dys +eco,libgdiplus +em +etl +fctr +fof +gmod,ncurses-libs.i686 +hl2dm +hldm +hldms +hw,zlib-devel +ins +inss +ios +jc2 +jc3 +jk2 +kf +kf2 +lo +l4d +l4d2 +mc,java-11-openjdk +mcb,libnsl +mh +mohaa,compat-libstdc++-33.i686 +mom +mta +mumble +nd +nmrih,ncurses-libs.i686 +ns +ns2,speex,tbb +ns2c,speex.i686,tbb.i686 +onset,mariadb-connector-c +opfor +pc +pmc,java-11-openjdk +pstbs,GConf2 +pvkii +pvr,libcxx +pz,java-11-openjdk rng-tools +q2 +q3 +ql +qw +ricochet +ro +rtcw +rust,zlib-devel +rw,java-11-openjdk +samp +sb +sbots +scpsl +scpslsm +sdtd,telnet,expect +sfc,ncurses-libs.i686 +sof2 +sol +squad +st +sven +terraria +tf2,libcurl.i686 +tfc +ts +ts3 +tu +tw +unt +ut +ut2k4 +ut3 +ut99 +vh,glibc-devel +vs +vints,mono-complete +wet +wf +wmc,java-11-openjdk +wurm,xorg-x11-server-Xvfb +zmr,ncurses-libs.i686 +zps,ncurses-libs.i686 diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv new file mode 100644 index 000000000..f72d74b7b --- /dev/null +++ b/lgsm/data/centos-7.csv @@ -0,0 +1,120 @@ +all,epel-release,curl,wget,util-linux,python36,file,tar,gzip,bzip2,unzip,xz,binutils,bc,jq,tmux,nmap-ncat,cpio,hostname +ac +ahl +ahl2 +ark +arma3 +av +bb +bb2,libcurl.i686 +bd +bf1942,ncurses-libs.i686 +bfv,compat-libstdc++-33.i686,glibc.i686 +bmdm,ncurses-libs.i686 +bo +bs +bt,libicu +bt1944 +cc +cmw +cod,compat-libstdc++-33.i686 +cod2,compat-libstdc++-33.i686 +cod4 +coduo,compat-libstdc++-33.i686 +codwaw +col +cs +cscz +csgo +css,ncurses-libs.i686 +dab +dmc +dod +dodr +dods +doi +dst,libcurl.i686 +dys +eco,libgdiplus +em +etl +fctr +fof +gmod,ncurses-libs.i686 +hl2dm +hldm +hldms +hw,zlib-devel +ins +inss +ios +jc2 +jc3 +jk2 +kf +kf2 +lo +l4d +l4d2 +mc,java-11-openjdk +mcb,libnsl +mh +mohaa,compat-libstdc++-33.i686 +mom +mta +mumble +nd +nmrih,ncurses-libs.i686 +ns +ns2,speex,tbb +ns2c,speex.i686,tbb.i686 +onset,mariadb-connector-c +opfor +pc +pmc,java-11-openjdk +pstbs,GConf2 +pvkii +pvr,libcxx +pz,java-11-openjdk rng-tools +q2 +q3 +ql +qw +ricochet +ro +rtcw +rust,zlib-devel +rw,java-11-openjdk +samp +sb +sbots +scpsl +scpslsm +sdtd,telnet,expect +sfc,ncurses-libs.i686 +sof2 +sol +squad +st +sven +terraria +tf2,libcurl.i686 +tfc +ts +ts3 +tu +tw +unt +ut +ut2k4 +ut3 +ut99 +vh,glibc-devel +vs +vints,mono-complete +wet +wf +wmc,java-11-openjdk +wurm,xorg-x11-server-Xvfb +zmr,ncurses-libs.i686 +zps,ncurses-libs.i686 diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv new file mode 100644 index 000000000..f72d74b7b --- /dev/null +++ b/lgsm/data/centos-8.csv @@ -0,0 +1,120 @@ +all,epel-release,curl,wget,util-linux,python36,file,tar,gzip,bzip2,unzip,xz,binutils,bc,jq,tmux,nmap-ncat,cpio,hostname +ac +ahl +ahl2 +ark +arma3 +av +bb +bb2,libcurl.i686 +bd +bf1942,ncurses-libs.i686 +bfv,compat-libstdc++-33.i686,glibc.i686 +bmdm,ncurses-libs.i686 +bo +bs +bt,libicu +bt1944 +cc +cmw +cod,compat-libstdc++-33.i686 +cod2,compat-libstdc++-33.i686 +cod4 +coduo,compat-libstdc++-33.i686 +codwaw +col +cs +cscz +csgo +css,ncurses-libs.i686 +dab +dmc +dod +dodr +dods +doi +dst,libcurl.i686 +dys +eco,libgdiplus +em +etl +fctr +fof +gmod,ncurses-libs.i686 +hl2dm +hldm +hldms +hw,zlib-devel +ins +inss +ios +jc2 +jc3 +jk2 +kf +kf2 +lo +l4d +l4d2 +mc,java-11-openjdk +mcb,libnsl +mh +mohaa,compat-libstdc++-33.i686 +mom +mta +mumble +nd +nmrih,ncurses-libs.i686 +ns +ns2,speex,tbb +ns2c,speex.i686,tbb.i686 +onset,mariadb-connector-c +opfor +pc +pmc,java-11-openjdk +pstbs,GConf2 +pvkii +pvr,libcxx +pz,java-11-openjdk rng-tools +q2 +q3 +ql +qw +ricochet +ro +rtcw +rust,zlib-devel +rw,java-11-openjdk +samp +sb +sbots +scpsl +scpslsm +sdtd,telnet,expect +sfc,ncurses-libs.i686 +sof2 +sol +squad +st +sven +terraria +tf2,libcurl.i686 +tfc +ts +ts3 +tu +tw +unt +ut +ut2k4 +ut3 +ut99 +vh,glibc-devel +vs +vints,mono-complete +wet +wf +wmc,java-11-openjdk +wurm,xorg-x11-server-Xvfb +zmr,ncurses-libs.i686 +zps,ncurses-libs.i686 diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv new file mode 100644 index 000000000..f352a05a2 --- /dev/null +++ b/lgsm/data/debian-10.csv @@ -0,0 +1,120 @@ +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,jq,python3,tar,tmux,util-linux,netcat,unzip,xz-utils,lib32gcc1,lib32stdc++6,hostname +ac +ahl +ahl2 +ark +arma3 +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 +bt1944 +cc +cmw +cod,libstdc++5:i386 +cod2,libstdc++5:i386 +cod4 +coduo,libstdc++5:i386 +codwaw +col +cs +cscz +csgo +css,libtinfo5:i386 +dab +dmc +dod +dodr +dods +doi +dst,libcurl4-gnutls-dev:i386 +dys +eco,libgdiplus +em +etl +fctr +fof +gmod,libtinfo5:i386 +hl2dm +hldm +hldms +hw,lib32z1 +ins +inss +ios +jc2 +jc3 +jk2 +kf +kf2 +lo +l4d +l4d2 +mc,openjdk-11-jre +mcb +mh +mohaa,libstdc++5:i386 +mom +mta +mumble +nd +nmrih,libtinfo5:i386 +ns +ns2,speex,libtbb2 +ns2c,speex:i386,libtbb2 +onset +opfor +pc +pmc,openjdk-11-jre +pstbs,libgconf-2-4 +pvkii +pvr,libc++1 +pz +q2 +q3 +ql +qw +ricochet +ro +rtcw +rust,lib32z1 +rw,openjdk-11-jre +samp +sb +sbots +scpsl,mono-complete +scpslsm,mono-complete +sdtd,telnet,expect +sfc,libtinfo5:i386 +sof2 +sol +squad +st +sven,libssl1.1:i386,zlib1g:i386 +terraria +tf2,libcurl4-gnutls-dev:i386 +tfc +ts +ts3 +tu +tw +unt +ut +ut2k4 +ut3 +ut99 +vh,libc6-dev +vs +vints,mono-complete +wet +wf +wmc,openjdk-11-jre +wurm,xvfb +zmr,libtinfo5:i386 +zps,libtinfo5:i386 diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv new file mode 100644 index 000000000..146e9fc2c --- /dev/null +++ b/lgsm/data/debian-11.csv @@ -0,0 +1,120 @@ +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,jq,python3,tar,tmux,util-linux,netcat,unzip,xz-utils,lib32gcc-s1,lib32stdc++6,hostname +ac +ahl +ahl2 +ark +arma3 +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 +bt1944 +cc +cmw +cod,libstdc++5:i386 +cod2,libstdc++5:i386 +cod4 +coduo,libstdc++5:i386 +codwaw +col +cs +cscz +csgo +css,libtinfo5:i386 +dab +dmc +dod +dodr +dods +doi +dst,libcurl4-gnutls-dev:i386 +dys +eco,libgdiplus +em +etl +fctr +fof +gmod,libtinfo5:i386 +hl2dm +hldm +hldms +hw,lib32z1 +ins +inss +ios +jc2 +jc3 +jk2 +kf +kf2 +lo +l4d +l4d2 +mc,openjdk-16-jre +mcb +mh +mohaa,libstdc++5:i386 +mom +mta +mumble +nd +nmrih,libtinfo5:i386 +ns +ns2,speex,libtbb2 +ns2c,speex:i386,libtbb2 +onset +opfor +pc +pmc,openjdk-16-jre +pstbs,libgconf-2-4 +pvkii +pvr,libc++1 +pz +q2 +q3 +ql +qw +ricochet +ro +rtcw +rust,lib32z1 +rw,openjdk-16-jre +samp +sb +sbots +scpsl,mono-complete +scpslsm,mono-complete +sdtd,telnet,expect +sfc,libtinfo5:i386 +sof2 +sol +squad +st +sven,libssl1.1:i386,zlib1g:i386 +terraria +tf2,libcurl4-gnutls-dev:i386 +tfc +ts +ts3 +tu +tw +unt +ut +ut2k4 +ut3 +ut99 +vh,libc6-dev +vs +vints,mono-complete +wet +wf +wmc,openjdk-16-jre +wurm,xvfb +zmr,libtinfo5:i386 +zps,libtinfo5:i386 diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv new file mode 100644 index 000000000..0b40d2340 --- /dev/null +++ b/lgsm/data/debian-9.csv @@ -0,0 +1,120 @@ +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,jq,python3,tar,tmux,util-linux,netcat,unzip,xz-utils,lib32gcc1,lib32stdc++6,hostname +ac +ahl +ahl2 +ark +arma3 +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 +bt1944 +cc +cmw +cod,libstdc++5:i386 +cod2,libstdc++5:i386 +cod4 +coduo,libstdc++5:i386 +codwaw +col +cs +cscz +csgo +css,libtinfo5:i386 +dab +dmc +dod +dodr +dods +doi +dst,libcurl4-gnutls-dev:i386 +dys +eco,libgdiplus +em +etl +fctr +fof +gmod,libtinfo5:i386 +hl2dm +hldm +hldms +hw,lib32z1 +ins +inss +ios +jc2 +jc3 +jk2 +kf +kf2 +lo +l4d +l4d2 +mc,openjdk-8-jre +mcb +mh +mohaa,libstdc++5:i386 +mom +mta +mumble +nd +nmrih,libtinfo5:i386 +ns +ns2,speex,libtbb2 +ns2c,speex:i386,libtbb2 +onset +opfor +pc +pmc,openjdk-8-jre +pstbs,libgconf-2-4 +pvkii +pvr,libc++1 +pz +q2 +q3 +ql +qw +ricochet +ro +rtcw +rust,lib32z1 +rw,openjdk-8-jre +samp +sb +sbots +scpsl,mono-complete +scpslsm,mono-complete +sdtd,telnet,expect +sfc,libtinfo5:i386 +sof2 +sol +squad +st +sven,libssl1.1:i386,zlib1g:i386 +terraria +tf2,libcurl4-gnutls-dev:i386 +tfc +ts +ts3 +tu +tw +unt +ut +ut2k4 +ut3 +ut99 +vh,libc6-dev +vs +vints,mono-complete +wet +wf +wmc,openjdk-8-jre +wurm,xvfb +zmr,libtinfo5:i386 +zps,libtinfo5:i386 diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv new file mode 100644 index 000000000..f72d74b7b --- /dev/null +++ b/lgsm/data/rhel-7.csv @@ -0,0 +1,120 @@ +all,epel-release,curl,wget,util-linux,python36,file,tar,gzip,bzip2,unzip,xz,binutils,bc,jq,tmux,nmap-ncat,cpio,hostname +ac +ahl +ahl2 +ark +arma3 +av +bb +bb2,libcurl.i686 +bd +bf1942,ncurses-libs.i686 +bfv,compat-libstdc++-33.i686,glibc.i686 +bmdm,ncurses-libs.i686 +bo +bs +bt,libicu +bt1944 +cc +cmw +cod,compat-libstdc++-33.i686 +cod2,compat-libstdc++-33.i686 +cod4 +coduo,compat-libstdc++-33.i686 +codwaw +col +cs +cscz +csgo +css,ncurses-libs.i686 +dab +dmc +dod +dodr +dods +doi +dst,libcurl.i686 +dys +eco,libgdiplus +em +etl +fctr +fof +gmod,ncurses-libs.i686 +hl2dm +hldm +hldms +hw,zlib-devel +ins +inss +ios +jc2 +jc3 +jk2 +kf +kf2 +lo +l4d +l4d2 +mc,java-11-openjdk +mcb,libnsl +mh +mohaa,compat-libstdc++-33.i686 +mom +mta +mumble +nd +nmrih,ncurses-libs.i686 +ns +ns2,speex,tbb +ns2c,speex.i686,tbb.i686 +onset,mariadb-connector-c +opfor +pc +pmc,java-11-openjdk +pstbs,GConf2 +pvkii +pvr,libcxx +pz,java-11-openjdk rng-tools +q2 +q3 +ql +qw +ricochet +ro +rtcw +rust,zlib-devel +rw,java-11-openjdk +samp +sb +sbots +scpsl +scpslsm +sdtd,telnet,expect +sfc,ncurses-libs.i686 +sof2 +sol +squad +st +sven +terraria +tf2,libcurl.i686 +tfc +ts +ts3 +tu +tw +unt +ut +ut2k4 +ut3 +ut99 +vh,glibc-devel +vs +vints,mono-complete +wet +wf +wmc,java-11-openjdk +wurm,xorg-x11-server-Xvfb +zmr,ncurses-libs.i686 +zps,ncurses-libs.i686 diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv new file mode 100644 index 000000000..f72d74b7b --- /dev/null +++ b/lgsm/data/rhel-8.csv @@ -0,0 +1,120 @@ +all,epel-release,curl,wget,util-linux,python36,file,tar,gzip,bzip2,unzip,xz,binutils,bc,jq,tmux,nmap-ncat,cpio,hostname +ac +ahl +ahl2 +ark +arma3 +av +bb +bb2,libcurl.i686 +bd +bf1942,ncurses-libs.i686 +bfv,compat-libstdc++-33.i686,glibc.i686 +bmdm,ncurses-libs.i686 +bo +bs +bt,libicu +bt1944 +cc +cmw +cod,compat-libstdc++-33.i686 +cod2,compat-libstdc++-33.i686 +cod4 +coduo,compat-libstdc++-33.i686 +codwaw +col +cs +cscz +csgo +css,ncurses-libs.i686 +dab +dmc +dod +dodr +dods +doi +dst,libcurl.i686 +dys +eco,libgdiplus +em +etl +fctr +fof +gmod,ncurses-libs.i686 +hl2dm +hldm +hldms +hw,zlib-devel +ins +inss +ios +jc2 +jc3 +jk2 +kf +kf2 +lo +l4d +l4d2 +mc,java-11-openjdk +mcb,libnsl +mh +mohaa,compat-libstdc++-33.i686 +mom +mta +mumble +nd +nmrih,ncurses-libs.i686 +ns +ns2,speex,tbb +ns2c,speex.i686,tbb.i686 +onset,mariadb-connector-c +opfor +pc +pmc,java-11-openjdk +pstbs,GConf2 +pvkii +pvr,libcxx +pz,java-11-openjdk rng-tools +q2 +q3 +ql +qw +ricochet +ro +rtcw +rust,zlib-devel +rw,java-11-openjdk +samp +sb +sbots +scpsl +scpslsm +sdtd,telnet,expect +sfc,ncurses-libs.i686 +sof2 +sol +squad +st +sven +terraria +tf2,libcurl.i686 +tfc +ts +ts3 +tu +tw +unt +ut +ut2k4 +ut3 +ut99 +vh,glibc-devel +vs +vints,mono-complete +wet +wf +wmc,java-11-openjdk +wurm,xorg-x11-server-Xvfb +zmr,ncurses-libs.i686 +zps,ncurses-libs.i686 diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv new file mode 100644 index 000000000..f72d74b7b --- /dev/null +++ b/lgsm/data/rocky-8.csv @@ -0,0 +1,120 @@ +all,epel-release,curl,wget,util-linux,python36,file,tar,gzip,bzip2,unzip,xz,binutils,bc,jq,tmux,nmap-ncat,cpio,hostname +ac +ahl +ahl2 +ark +arma3 +av +bb +bb2,libcurl.i686 +bd +bf1942,ncurses-libs.i686 +bfv,compat-libstdc++-33.i686,glibc.i686 +bmdm,ncurses-libs.i686 +bo +bs +bt,libicu +bt1944 +cc +cmw +cod,compat-libstdc++-33.i686 +cod2,compat-libstdc++-33.i686 +cod4 +coduo,compat-libstdc++-33.i686 +codwaw +col +cs +cscz +csgo +css,ncurses-libs.i686 +dab +dmc +dod +dodr +dods +doi +dst,libcurl.i686 +dys +eco,libgdiplus +em +etl +fctr +fof +gmod,ncurses-libs.i686 +hl2dm +hldm +hldms +hw,zlib-devel +ins +inss +ios +jc2 +jc3 +jk2 +kf +kf2 +lo +l4d +l4d2 +mc,java-11-openjdk +mcb,libnsl +mh +mohaa,compat-libstdc++-33.i686 +mom +mta +mumble +nd +nmrih,ncurses-libs.i686 +ns +ns2,speex,tbb +ns2c,speex.i686,tbb.i686 +onset,mariadb-connector-c +opfor +pc +pmc,java-11-openjdk +pstbs,GConf2 +pvkii +pvr,libcxx +pz,java-11-openjdk rng-tools +q2 +q3 +ql +qw +ricochet +ro +rtcw +rust,zlib-devel +rw,java-11-openjdk +samp +sb +sbots +scpsl +scpslsm +sdtd,telnet,expect +sfc,ncurses-libs.i686 +sof2 +sol +squad +st +sven +terraria +tf2,libcurl.i686 +tfc +ts +ts3 +tu +tw +unt +ut +ut2k4 +ut3 +ut99 +vh,glibc-devel +vs +vints,mono-complete +wet +wf +wmc,java-11-openjdk +wurm,xorg-x11-server-Xvfb +zmr,ncurses-libs.i686 +zps,ncurses-libs.i686 diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv new file mode 100644 index 000000000..0b40d2340 --- /dev/null +++ b/lgsm/data/ubuntu-16.04.csv @@ -0,0 +1,120 @@ +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,jq,python3,tar,tmux,util-linux,netcat,unzip,xz-utils,lib32gcc1,lib32stdc++6,hostname +ac +ahl +ahl2 +ark +arma3 +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 +bt1944 +cc +cmw +cod,libstdc++5:i386 +cod2,libstdc++5:i386 +cod4 +coduo,libstdc++5:i386 +codwaw +col +cs +cscz +csgo +css,libtinfo5:i386 +dab +dmc +dod +dodr +dods +doi +dst,libcurl4-gnutls-dev:i386 +dys +eco,libgdiplus +em +etl +fctr +fof +gmod,libtinfo5:i386 +hl2dm +hldm +hldms +hw,lib32z1 +ins +inss +ios +jc2 +jc3 +jk2 +kf +kf2 +lo +l4d +l4d2 +mc,openjdk-8-jre +mcb +mh +mohaa,libstdc++5:i386 +mom +mta +mumble +nd +nmrih,libtinfo5:i386 +ns +ns2,speex,libtbb2 +ns2c,speex:i386,libtbb2 +onset +opfor +pc +pmc,openjdk-8-jre +pstbs,libgconf-2-4 +pvkii +pvr,libc++1 +pz +q2 +q3 +ql +qw +ricochet +ro +rtcw +rust,lib32z1 +rw,openjdk-8-jre +samp +sb +sbots +scpsl,mono-complete +scpslsm,mono-complete +sdtd,telnet,expect +sfc,libtinfo5:i386 +sof2 +sol +squad +st +sven,libssl1.1:i386,zlib1g:i386 +terraria +tf2,libcurl4-gnutls-dev:i386 +tfc +ts +ts3 +tu +tw +unt +ut +ut2k4 +ut3 +ut99 +vh,libc6-dev +vs +vints,mono-complete +wet +wf +wmc,openjdk-8-jre +wurm,xvfb +zmr,libtinfo5:i386 +zps,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv new file mode 100644 index 000000000..f352a05a2 --- /dev/null +++ b/lgsm/data/ubuntu-18.04.csv @@ -0,0 +1,120 @@ +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,jq,python3,tar,tmux,util-linux,netcat,unzip,xz-utils,lib32gcc1,lib32stdc++6,hostname +ac +ahl +ahl2 +ark +arma3 +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 +bt1944 +cc +cmw +cod,libstdc++5:i386 +cod2,libstdc++5:i386 +cod4 +coduo,libstdc++5:i386 +codwaw +col +cs +cscz +csgo +css,libtinfo5:i386 +dab +dmc +dod +dodr +dods +doi +dst,libcurl4-gnutls-dev:i386 +dys +eco,libgdiplus +em +etl +fctr +fof +gmod,libtinfo5:i386 +hl2dm +hldm +hldms +hw,lib32z1 +ins +inss +ios +jc2 +jc3 +jk2 +kf +kf2 +lo +l4d +l4d2 +mc,openjdk-11-jre +mcb +mh +mohaa,libstdc++5:i386 +mom +mta +mumble +nd +nmrih,libtinfo5:i386 +ns +ns2,speex,libtbb2 +ns2c,speex:i386,libtbb2 +onset +opfor +pc +pmc,openjdk-11-jre +pstbs,libgconf-2-4 +pvkii +pvr,libc++1 +pz +q2 +q3 +ql +qw +ricochet +ro +rtcw +rust,lib32z1 +rw,openjdk-11-jre +samp +sb +sbots +scpsl,mono-complete +scpslsm,mono-complete +sdtd,telnet,expect +sfc,libtinfo5:i386 +sof2 +sol +squad +st +sven,libssl1.1:i386,zlib1g:i386 +terraria +tf2,libcurl4-gnutls-dev:i386 +tfc +ts +ts3 +tu +tw +unt +ut +ut2k4 +ut3 +ut99 +vh,libc6-dev +vs +vints,mono-complete +wet +wf +wmc,openjdk-11-jre +wurm,xvfb +zmr,libtinfo5:i386 +zps,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv new file mode 100644 index 000000000..942915cbe --- /dev/null +++ b/lgsm/data/ubuntu-20.04.csv @@ -0,0 +1,121 @@ +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,jq,python3,tar,tmux,util-linux,netcat,unzip,xz-utils,lib32gcc1,lib32stdc++6,hostname +steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386 +ac +ahl +ahl2 +ark +arma3 +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 +bt1944 +cc +cmw +cod,libstdc++5:i386 +cod2,libstdc++5:i386 +cod4 +coduo,libstdc++5:i386 +codwaw +col +cs +cscz +csgo +css,libtinfo5:i386 +dab +dmc +dod +dodr +dods +doi +dst,libcurl4-gnutls-dev:i386 +dys +eco,libgdiplus +em +etl +fctr +fof +gmod,libtinfo5:i386 +hl2dm +hldm +hldms +hw,lib32z1 +ins +inss +ios +jc2 +jc3 +jk2 +kf +kf2 +lo +l4d +l4d2 +mc,openjdk-16-jre +mcb +mh +mohaa,libstdc++5:i386 +mom +mta +mumble +nd +nmrih,libtinfo5:i386 +ns +ns2,speex,libtbb2 +ns2c,speex:i386,libtbb2 +onset +opfor +pc +pmc,openjdk-16-jre +pstbs,libgconf-2-4 +pvkii +pvr,libc++1 +pz +q2 +q3 +ql +qw +ricochet +ro +rtcw +rust,lib32z1 +rw,openjdk-16-jre +samp +sb +sbots +scpsl,mono-complete +scpslsm,mono-complete +sdtd,telnet,expect +sfc,libtinfo5:i386 +sof2 +sol +squad +st +sven,libssl1.1:i386,zlib1g:i386 +terraria +tf2,libcurl4-gnutls-dev:i386 +tfc +ts +ts3 +tu +tw +unt +ut +ut2k4 +ut3 +ut99 +vh,libc6-dev +vs +vints,mono-complete +wet +wf +wmc,openjdk-16-jre +wurm,xvfb +zmr,libtinfo5:i386 +zps,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-21.04.csv b/lgsm/data/ubuntu-21.04.csv new file mode 100644 index 000000000..146e9fc2c --- /dev/null +++ b/lgsm/data/ubuntu-21.04.csv @@ -0,0 +1,120 @@ +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,jq,python3,tar,tmux,util-linux,netcat,unzip,xz-utils,lib32gcc-s1,lib32stdc++6,hostname +ac +ahl +ahl2 +ark +arma3 +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 +bt1944 +cc +cmw +cod,libstdc++5:i386 +cod2,libstdc++5:i386 +cod4 +coduo,libstdc++5:i386 +codwaw +col +cs +cscz +csgo +css,libtinfo5:i386 +dab +dmc +dod +dodr +dods +doi +dst,libcurl4-gnutls-dev:i386 +dys +eco,libgdiplus +em +etl +fctr +fof +gmod,libtinfo5:i386 +hl2dm +hldm +hldms +hw,lib32z1 +ins +inss +ios +jc2 +jc3 +jk2 +kf +kf2 +lo +l4d +l4d2 +mc,openjdk-16-jre +mcb +mh +mohaa,libstdc++5:i386 +mom +mta +mumble +nd +nmrih,libtinfo5:i386 +ns +ns2,speex,libtbb2 +ns2c,speex:i386,libtbb2 +onset +opfor +pc +pmc,openjdk-16-jre +pstbs,libgconf-2-4 +pvkii +pvr,libc++1 +pz +q2 +q3 +ql +qw +ricochet +ro +rtcw +rust,lib32z1 +rw,openjdk-16-jre +samp +sb +sbots +scpsl,mono-complete +scpslsm,mono-complete +sdtd,telnet,expect +sfc,libtinfo5:i386 +sof2 +sol +squad +st +sven,libssl1.1:i386,zlib1g:i386 +terraria +tf2,libcurl4-gnutls-dev:i386 +tfc +ts +ts3 +tu +tw +unt +ut +ut2k4 +ut3 +ut99 +vh,libc6-dev +vs +vints,mono-complete +wet +wf +wmc,openjdk-16-jre +wurm,xvfb +zmr,libtinfo5:i386 +zps,libtinfo5:i386 diff --git a/lgsm/functions/check.sh b/lgsm/functions/check.sh index 523445c5d..761846c58 100755 --- a/lgsm/functions/check.sh +++ b/lgsm/functions/check.sh @@ -54,7 +54,7 @@ for allowed_command in "${allowed_commands_array[@]}"; do fi done -allowed_commands_array=( DEBUG START STOP ) +allowed_commands_array=( DEBUG START ) for allowed_command in "${allowed_commands_array[@]}"; do if [ "${allowed_command}" == "${commandname}" ]; then check_deps.sh diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh index 0e18b9f32..3e3d6a1b6 100755 --- a/lgsm/functions/check_deps.sh +++ b/lgsm/functions/check_deps.sh @@ -3,204 +3,85 @@ # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Checks if required dependencies are installed for LinuxGSM. +# Description: Checks and installs missing dependencies. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_install_mono_repo(){ - if [ "${monostatus}" != "0" ]; then - fn_print_dots "Adding Mono repository" - if [ "${autoinstall}" == "1" ]; then - sudo -n true > /dev/null 2>&1 - else - sudo -v > /dev/null 2>&1 - fi - if [ $? -eq 0 ]; then - fn_print_info_nl "Automatically adding Mono repository." - fn_script_log_info "Automatically adding Mono repository." - echo -en ".\r" - sleep 1 - echo -en "..\r" - sleep 1 - echo -en "...\r" - sleep 1 - echo -en " \r" - if [ "${distroid}" == "ubuntu" ]; then - if [ "${distroversion}" == "18.04" ]; then - cmd="sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/ubuntu stable-bionic main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt-get update" - eval "${cmd}" - elif [ "${distroversion}" == "16.04" ]; then - cmd="sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;sudo apt-get install apt-transport-https;echo 'deb https://download.mono-project.com/repo/ubuntu stable-xenial main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt-get update" - eval "${cmd}" - elif [ "${distroversion}" == "14.04" ]; then - cmd="sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;sudo apt-get install apt-transport-https;echo 'deb https://download.mono-project.com/repo/ubuntu stable-trusty main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt-get update" - eval "${cmd}" - else - fn_print_warn_nl "Installing Mono repository." - echo -e "Mono auto install not available for ${distroname}" - echo -e " Follow instructions on mono site to install the latest version of Mono." - echo -e " https://www.mono-project.com/download/stable/#download-lin" - monoautoinstall="1" - fi - elif [ "${distroid}" == "debian" ]; then - if [ "${distroversion}" == "10" ]; then - cmd="sudo apt-get install apt-transport-https dirmngr;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/debian stable-buster main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt-get update" - eval "${cmd}" - elif [ "${distroversion}" == "9" ]; then - cmd="sudo apt-get install apt-transport-https dirmngr;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/debian stable-stretch main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt-get update" - eval "${cmd}" - elif [ "${distroversion}" == "8" ]; then - cmd="sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;sudo apt-get install apt-transport-https;echo 'deb https://download.mono-project.com/repo/debian stable-jessie main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt-get update" - eval "${cmd}" - else - echo -e "Mono auto install not available for ${distroname}" - echo -e " Follow instructions on mono site to install the latest version of Mono." - echo -e " https://www.mono-project.com/download/stable/#download-lin" - monoautoinstall="1" - fi - elif [ "${distroid}" == "centos" ]; then - if [ "${distroversion}" == "8" ]; then - cmd="rpm --import 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF';su -c 'curl https://download.mono-project.com/repo/centos8-stable.repo | tee /etc/yum.repos.d/mono-centos8-stable.repo'" - eval "${cmd}" - elif [ "${distroversion}" == "7" ]; then - cmd="rpm --import 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF';su -c 'curl https://download.mono-project.com/repo/centos7-stable.repo | tee /etc/yum.repos.d/mono-centos7-stable.repo'" - eval "${cmd}" - else - echo -e "Mono auto install not available for ${distroname}" - echo -e " Follow instructions on mono site to install the latest version of Mono." - echo -e " https://www.mono-project.com/download/stable/#download-lin" - monoautoinstall="1" - fi - elif [ "${distroid}" == "fedora" ]; then - cmd="rpm --import 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF'; su -c 'curl https://download.mono-project.com/repo/centos7-stable.repo | tee /etc/yum.repos.d/mono-centos7-stable.repo'; dnf update" - eval "${cmd}" + if [ "${autodepinstall}" == "0" ]; then + fn_print_information_nl "Automatically adding Mono repository." + fn_script_log_info "Automatically adding Mono repository." + echo -en ".\r" + sleep 1 + echo -en "..\r" + sleep 1 + echo -en "...\r" + sleep 1 + echo -en " \r" + if [ "${distroid}" == "ubuntu" ]; then + if [ "${distroversion}" == "20.04" ]; then + cmd="sudo apt install gnupg ca-certificates;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/ubuntu stable-focal main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" + elif [ "${distroversion}" == "18.04" ]; then + cmd="sudo apt install gnupg ca-certificates;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/ubuntu stable-bionic main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" + elif [ "${distroversion}" == "16.04" ]; then + cmd="sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;sudo apt install apt-transport-https ca-certificates;echo 'deb https://download.mono-project.com/repo/ubuntu stable-xenial main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" else - echo -e "Mono auto install not available for ${distroname}" - echo -e " Follow instructions on mono site to install the latest version of Mono." - echo -e " https://www.mono-project.com/download/stable/#download-lin" monoautoinstall="1" fi - if [ "${monoautoinstall}" != "1" ]; then - if [ $? != 0 ]; then - fn_print_failure_nl "Unable to install Mono repository." - fn_script_log_fatal "Unable to installMono repository." - monoautoinstall=1 - else - fn_print_complete_nl "Installing Mono repository completed." - fn_script_log_pass "Installing Mono repository completed." - monoautoinstall=0 - fi + elif [ "${distroid}" == "debian" ]; then + if [ "${distroversion}" == "10" ]; then + cmd="sudo apt install apt-transport-https dirmngr gnupg ca-certificates;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/debian stable-buster main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" + elif [ "${distroversion}" == "9" ]; then + cmd="sudo apt install apt-transport-https dirmngr gnupg ca-certificates;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/debian stable-stretch main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" + else + monoautoinstall="1" fi - else - fn_print_information_nl "Installing Mono repository." - echo -e "" - fn_print_warning_nl "$(whoami) does not have sudo access. Manually install Mono repository." - fn_script_log_warn "$(whoami) does not have sudo access. Manually install Mono repository." - echo -e "* Follow instructions on mono site to install the latest version of Mono." - echo -e " https://www.mono-project.com/download/stable/#download-lin" - fi - fi -} - -fn_install_universe_repo(){ - # Defensive coding - As this is an ubuntu only issue then check to make sure this fix is needed, and we are using ubuntu. - if [ "${jquniversemissing}" != "0" ]&&[ "${distroid}" == "ubuntu" ]; then - fn_print_warning_nl "Ubuntu 18.04.1 contains a bug which means the sources.list file does not populate with the Ubuntu universe repository." - fn_print_information_nl "Attempting to add universe repository." - if [ "${autoinstall}" == "1" ]; then - sudo -n true > /dev/null 2>&1 - else - sudo -v > /dev/null 2>&1 - fi - if [ $? -eq 0 ]; then - echo -en ".\r" - sleep 1 - echo -en "..\r" - sleep 1 - echo -en "...\r" - sleep 1 - echo -en " \r" - cmd="sudo apt-add-repository universe" - eval "${cmd}" - if [ $? -eq 0 ]; then - fn_print_complete_nl "Installing universe repository completed." - fn_script_log_pass "Installing universe repository completed." + elif [ "${distroid}" == "centos" ]||[ "${distroid}" == "almalinux" ]||[ "${distroid}" == "rocky" ]; then + if [ "${distroversion}" == "8" ]; then + cmd="sudo rpmkeys --import 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF';su -c 'curl https://download.mono-project.com/repo/centos8-stable.repo | tee /etc/yum.repos.d/mono-centos8-stable.repo'" + elif [ "${distroversion}" == "7" ]; then + cmd="sudo rpmkeys --import 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF';su -c 'curl https://download.mono-project.com/repo/centos7-stable.repo | tee /etc/yum.repos.d/mono-centos7-stable.repo'" + else + monoautoinstall="1" + fi + elif [ "${distroid}" == "fedora" ]; then + if [ "${distroversion}" -ge "29" ]; then + cmd="sudo rpm --import 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF';su -c 'curl https://download.mono-project.com/repo/centos8-stable.repo | tee /etc/yum.repos.d/mono-centos8-stable.repo';dnf update" else - fn_print_failure_nl "Unable to install universe repository." - fn_script_log_fatal "Unable to install universe repository." + cmd="sudo rpm --import 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF';su -c 'curl https://download.mono-project.com/repo/centos7-stable.repo | tee /etc/yum.repos.d/mono-centos7-stable.repo';dnf update" fi else - fn_print_warning_nl "$(whoami) does not have sudo access. Manually add Universe repository." - fn_script_log_warn "$(whoami) does not have sudo access. Manually add Universe repository." - echo -e "* Please run the following command as a user with sudo access, and re-run the installation" - echo -e "" - echo -e " sudo apt-add-repository universe" + monoautoinstall="1" fi - fi -} -fn_deps_detector(){ - # Checks if dependency is missing. -if [ "${javacheck}" == "1" ]; then - # Added for users using Oracle JRE to bypass check. - depstatus=0 - deptocheck="${javaversion}" - unset javacheck - - elif [ "${deptocheck}" == "jq" ]&&[ "${distroid}" == "ubuntu" ]&&[ "${distroversion}" == "18.04" ]&& ! grep -qE "^deb .*universe" /etc/apt/sources.list; then - # #1985 ubuntu 18.04.1 bug does not set sources.list correctly which means universe is not active by default - # If the universe repo does not exist, mark as dependency missing and universe missing. - depstatus=1 - jquniversemissing=1 - elif [ "${deptocheck}" == "mono-complete" ]; then - if [ "$(command -v mono 2>/dev/null)" ]&&[ "$(mono --version 2>&1 | grep -Po '(?<=version )\d')" -ge 5 ]; then - # Mono >= 5.0.0 already installed. - depstatus=0 - else - # Mono not installed or installed Mono < 5.0.0. - depstatus=1 - monostatus=1 - fi - elif [ "$(command -v dpkg-query 2>/dev/null)" ]; then - dpkg-query -W -f='${Status}' "${deptocheck}" 2>/dev/null | grep -q -P '^install ok installed' - depstatus=$? - elif [ "$(command -v rpm 2>/dev/null)" ]; then - rpm -q "${deptocheck}" > /dev/null 2>&1 - depstatus=$? - fi + # Run the mono repo install. + eval "${cmd}" - if [ "${depstatus}" == "0" ]; then - # If dependency is found. - missingdep=0 - if [ "${commandname}" == "INSTALL" ]; then - echo -e "${green}${deptocheck}${default}" - fn_sleep_time - fi - else - # If dependency is not found. - missingdep=1 - if [ "${commandname}" == "INSTALL" ]; then - echo -e "${red}${deptocheck}${default}" - fn_sleep_time - fi - # Define required dependencies for SteamCMD. - if [ "${appid}" ]; then - # lib32gcc1 is now called lib32gcc-s1 in debian 11 - if { [ "${distroid}" == "debian" ]&&[ "${distroversion}" == "11" ]; }||{ [ "${distroid}" == "ubuntu" ]&&[ "${distroversion}" == "20.10" ]; } || { [ "${distroid}" == "pop" ]&&[ "${distroversion}" == "20.10" ]; }; then - if [ "${deptocheck}" == "glibc.i686" ]||[ "${deptocheck}" == "libstdc++64.i686" ]||[ "${deptocheck}" == "lib32gcc-s1" ]||[ "${deptocheck}" == "lib32stdc++6" ]; then - steamcmdfail=1 - fi + # Did Mono repo install correctly? + if [ "${monoautoinstall}" != "1" ]; then + if [ $? != 0 ]; then + fn_print_failure_nl "Unable to install Mono repository." + fn_script_log_fatal "Unable to install Mono repository." else - if [ "${deptocheck}" == "glibc.i686" ]||[ "${deptocheck}" == "libstdc++64.i686" ]||[ "${deptocheck}" == "lib32gcc1" ]||[ "${deptocheck}" == "lib32stdc++6" ]; then - steamcmdfail=1 - fi + fn_print_complete_nl "Installing Mono repository completed." + fn_script_log_pass "Installing Mono repository completed." fi fi - fi - # Missing dependencies are added to array_deps_missing. - if [ "${missingdep}" == "1" ]; then - array_deps_missing+=("${deptocheck}") + # Mono can not be auto installed with this distro. + if [ "${monoautoinstall}" == "1" ]; then + fn_print_warning_nl "Mono auto install not available for ${distroname}." + echo -e "Follow instructions on Mono website to install." + echo -e "https://www.mono-project.com/download/stable/#download-lin" + fn_script_log_warn "Unable to install Mono repository. Mono auto install not available for ${distroname}." + fi + + else + fn_print_information_nl "Installing Mono repository." + fn_print_warning_nl "$(whoami) does not have sudo access." + echo -e "Follow instructions on Mono website to install." + echo -e "https://www.mono-project.com/download/stable/#download-lin" + fn_script_log_warn "Unable to install Mono repository. $(whoami) does not have sudo access." fi } @@ -227,25 +108,51 @@ fn_deps_email(){ fi } -fn_found_missing_deps(){ +fn_install_missing_deps(){ + # If any dependencies are not installed. if [ "${#array_deps_missing[*]}" != "0" ]; then - - fn_print_warning_nl "Missing dependencies: ${red}${array_deps_missing[*]}${default}" - fn_script_log_warn "Missing dependencies: ${array_deps_missing[*]}" - fn_sleep_time - if [ "${monostatus}" ]; then - fn_install_mono_repo - fi - if [ "${jqstatus}" ]; then - fn_print_warning_nl "jq is not available in the ${distroname} repository." - echo -e " * https://docs.linuxgsm.com/requirements/jq" + if [ "${commandname}" == "INSTALL" ]; then + fn_print_warning_nl "Missing dependencies: ${red}${array_deps_missing[*]}${default}" + fn_script_log_warn "Missing dependencies: ${array_deps_missing[*]}" + else + fn_print_dots "Missing dependencies" + fn_print_warn "Missing dependencies: ${red}${array_deps_missing[*]}${default}" + fn_script_log_warn "Missing dependencies: ${array_deps_missing[*]}" fi + fn_sleep_time + + # Attempt automatic dependency installation if [ "${autoinstall}" == "1" ]; then sudo -n true > /dev/null 2>&1 else sudo -v > /dev/null 2>&1 fi - if [ $? -eq 0 ]; then + autodepinstall="$?" + + if [ "${monostatus}" == "1" ]; then + fn_install_mono_repo + fi + + if [ "${commandname}" == "INSTALL" ]; then + if [ "${autodepinstall}" == "0" ]; then + fn_print_information_nl "$(whoami) has sudo access." + fn_script_log_info "$(whoami) has sudo access." + else + fn_print_warning_nl "$(whoami) does not have sudo access. Manually install dependencies." + fn_script_log_warn "$(whoami) does not have sudo access. Manually install dependencies." + fi + fi + + + # Add sudo dpkg --add-architecture i386 if using i386 packages. + if [ "$(command -v dpkg-query 2>/dev/null)" ]; then + if printf '%s\n' "${array_deps_required[@]}" | grep -q -P 'i386'; then + i386installcommand="sudo dpkg --add-architecture i386; " + fi + fi + + # If automatic dependency install is available + if [ "${autodepinstall}" == "0" ]; then fn_print_information_nl "Automatically installing missing dependencies." fn_script_log_info "Automatically installing missing dependencies." echo -en ".\r" @@ -256,7 +163,7 @@ fn_found_missing_deps(){ sleep 1 echo -en " \r" if [ "$(command -v dpkg-query 2>/dev/null)" ]; then - cmd="echo steamcmd steam/question select \"I AGREE\" | sudo debconf-set-selections; echo steamcmd steam/license note '' | sudo debconf-set-selections; sudo dpkg --add-architecture i386; sudo apt-get update; sudo apt-get -y install ${array_deps_missing[*]}" + cmd="echo steamcmd steam/question select \"I AGREE\" | sudo debconf-set-selections; echo steamcmd steam/license note '' | sudo debconf-set-selections; ${i386installcommand}sudo apt-get update; sudo apt-get -y install ${array_deps_missing[*]}" eval "${cmd}" elif [ "$(command -v dnf 2>/dev/null)" ]; then cmd="sudo dnf -y install ${array_deps_missing[*]}" @@ -265,61 +172,31 @@ fn_found_missing_deps(){ cmd="sudo yum -y install ${array_deps_missing[*]}" eval "${cmd}" fi - if [ $? != 0 ]; then - fn_print_failure_nl "Unable to install dependencies." - fn_script_log_fatal "Unable to install dependencies." - echo -e "" - fn_print_warning_nl "Manually install dependencies." - fn_script_log_warn "Manually install dependencies." - if [ "$(command -v dpkg-query 2>/dev/null)" ]; then - echo -e " sudo dpkg --add-architecture i386; sudo apt update; sudo apt install ${array_deps_missing[*]}" - elif [ "$(command -v dnf 2>/dev/null)" ]; then - echo -e " sudo dnf install ${array_deps_missing[*]}" - elif [ "$(command -v yum 2>/dev/null)" ]; then - echo -e " sudo yum install ${array_deps_missing[*]}" - fi - if [ "${steamcmdfail}" ]; then - echo -e "" - if [ "${commandname}" == "INSTALL" ]; then - fn_print_failure_nl "Missing dependencies required to run SteamCMD." - fn_script_log_fatal "Missing dependencies required to run SteamCMD." - core_exit.sh - else - fn_print_error_nl "Missing dependencies required to run SteamCMD." - fn_script_log_error "Missing dependencies required to run SteamCMD." - fi - fi - else - fn_print_complete_nl "Install dependencies completed." - fn_script_log_pass "Install dependencies completed." - fi - else - fn_print_warning_nl "$(whoami) does not have sudo access. Manually install dependencies." - fn_script_log_warn "$(whoami) does not have sudo access. Manually install dependencies." - echo -e "" + autodepinstall="$?" + fi + + # If automatic dependency install is unavailable. + if [ "${autodepinstall}" != "0" ]; then if [ "$(command -v dpkg-query 2>/dev/null)" ]; then - echo -e "sudo dpkg --add-architecture i386; sudo apt update; sudo apt install ${array_deps_missing[*]}" + echo -e "${i386installcommand}sudo apt update; sudo apt install ${array_deps_missing[*]}" elif [ "$(command -v dnf 2>/dev/null)" ]; then echo -e "sudo dnf install ${array_deps_missing[*]}" elif [ "$(command -v yum 2>/dev/null)" ]; then echo -e "sudo yum install ${array_deps_missing[*]}" fi - if [ "${steamcmdfail}" ]; then - echo -e "" - if [ "${commandname}" == "INSTALL" ]; then - fn_print_failure_nl "Missing dependencies required to run SteamCMD." - fn_script_log_fatal "Missing dependencies required to run SteamCMD." - core_exit.sh - else - fn_print_error_nl "Missing dependencies required to run SteamCMD." - fn_script_log_error "Missing dependencies required to run SteamCMD." - fi - fi - echo -e "" fi - if [ "${commandname}" == "INSTALL" ]; then - sleep 5 + + if [ "${steamcmdfail}" ]; then + if [ "${commandname}" == "INSTALL" ]; then + fn_print_failure_nl "Missing dependencies required to run SteamCMD." + fn_script_log_fatal "Missing dependencies required to run SteamCMD." + core_exit.sh + else + fn_print_error_nl "Missing dependencies required to run SteamCMD." + fn_script_log_error "Missing dependencies required to run SteamCMD." + fi fi + else if [ "${commandname}" == "INSTALL" ]; then fn_print_information_nl "Required dependencies already installed." @@ -329,272 +206,79 @@ fn_found_missing_deps(){ } fn_check_loop(){ - # Loop though required depenencies. + # Loop though required depenencies checking if they are installed. for deptocheck in ${array_deps_required[*]}; do fn_deps_detector done - # user to be informed of any missing dependencies. - fn_found_missing_deps + # user will be informed of any missing dependencies. + fn_install_missing_deps } -# Generate require dependencies for debian based systems. -fn_deps_build_debian(){ - # Generate array of missing deps. - array_deps_missing=() - - # LinuxGSM requirements. - array_deps_required=( curl wget ca-certificates file bsdmainutils util-linux python3 tar bzip2 gzip unzip binutils bc jq tmux netcat cpio ) - - # All servers except ts3, mumble, GTA and minecraft servers require lib32stdc++6 and lib32gcc1. - if [ "${shortname}" != "ts3" ]&&[ "${shortname}" != "mumble" ]&&[ "${shortname}" != "mc" ]&&[ "${shortname}" != "pmc" ]&&[ "${shortname}" != "wmc" ]&&[ "${engine}" != "renderware" ]; then - if [ "${arch}" == "x86_64" ]; then - # lib32gcc1 is now called lib32gcc-s1 in debian 11 - if { [ "${distroid}" == "debian" ]&&[ "${distroversion}" == "11" ]; }||{ [ "${distroid}" == "ubuntu" ]&&[ "${distroversion}" == "20.10" ]; }||{ [ "${distroid}" == "pop" ]&&[ "${distroversion}" == "20.10" ]; }; then - array_deps_required+=( lib32gcc-s1 lib32stdc++6 ) - else - array_deps_required+=( lib32gcc1 lib32stdc++6 ) - fi - else - array_deps_required+=( lib32stdc++6 ) - fi - fi - # If requires steamcmd. - if [ "${appid}" ]; then - # Will not use apt if non-free repo is missing or Ubuntu 14.04 - if [ "${distroversion}" == "14.04" ]||[ "${distroid}" == "debian" ]&& ! grep -qE "^deb .*non-free" /etc/apt/sources.list; then - : - else - array_deps_required+=( steamcmd libsdl2-2.0-0:i386 ) - fi - fi - - # Game Specific requirements. - - # Natural Selection 2 (x64 only) - if [ "${shortname}" == "ns2" ]; then - array_deps_required+=( speex libtbb2 ) - # NS2: Combat - elif [ "${shortname}" == "ns2c" ]; then - array_deps_required+=( speex:i386 libtbb2 ) - # 7 Days to Die - elif [ "${shortname}" == "sdtd" ]; then - array_deps_required+=( telnet expect ) - # Battlefield: Vietnam - elif [ "${shortname}" == "bfv" ]; then - array_deps_required+=( libncurses5:i386 libstdc++5:i386 ) - # Battlefield 1942 - elif [ "${shortname}" == "bf1942" ]; then - array_deps_required+=( libncurses5:i386 libtinfo5:i386 ) - # Black Mesa: Death Match - elif [ "${shortname}" == "bmdm" ]; then - array_deps_required+=( libncurses5:i386 ) - # Counter-Strike: Source, Garry's Mod, No More Room in Hell, Source Forts Classic, Zombie Master Reborn and Zombie Panic: Source - elif [ "${shortname}" == "css" ]||[ "${shortname}" == "gmod" ]||[ "${shortname}" == "nmrih" ]||[ "${shortname}" == "sfc" ]||[ "${shortname}" == "zmr" ]||[ "${shortname}" == "zps" ]; then - if [ "${arch}" == "x86_64" ]; then - array_deps_required+=( libtinfo5:i386 ) - else - array_deps_required+=( libtinfo5 ) - fi - # Brainbread 2, Don't Starve Together & Team Fortress 2 - elif [ "${shortname}" == "bb2" ]||[ "${shortname}" == "dst" ]||[ "${shortname}" == "tf2" ]; then - array_deps_required+=( libcurl4-gnutls-dev:i386 ) - # Call of Duty & Medal of Honor: Allied Assault - elif [ "${shortname}" == "cod" ]||[ "${shortname}" == "coduo" ]||[ "${shortname}" == "cod2" ]||[ "${shortname}" == "mohaa" ]; then - array_deps_required+=( libstdc++5:i386 ) - # Barotrauma - elif [ "${shortname}" == "bt" ]; then - array_deps_required+=( libicu-dev ) - # Ecoserver - elif [ "${shortname}" == "eco" ]; then - array_deps_required+=( libgdiplus ) - # Factorio - elif [ "${shortname}" == "fctr" ]; then - array_deps_required+=( xz-utils ) - # Hurtword/Rust - elif [ "${shortname}" == "hw" ]||[ "${shortname}" == "rust" ]; then - array_deps_required+=( lib32z1 ) - # Minecraft, Rising World - elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "pmc" ]||[ "${shortname}" == "wmc" ]; then - javaversion=$(java -version 2>&1 | grep "version") - if [ "${javaversion}" ]; then - # Added for users using Oracle JRE to bypass the check. - javacheck=1 - else - if { [ "${distroid}" == "ubuntu" ]&&[ "${distroversion}" == "20.04" ]; }||{ [ "${distroid}" == "ubuntu" ]&&[ "${distroversion}" == "20.10" ]; }||{ [ "${distroid}" == "ubuntu" ]&&[ "${distroversion}" == "21.04" ]; }||{ [ "${distroid}" == "pop" ]&&[ "${distroversion}" == "20.04" ]; }||{ [ "${distroid}" == "pop" ]&&[ "${distroversion}" == "20.10" ]; }||{ [ "${distroid}" == "pop" ]&&[ "${distroversion}" == "21.04" ]; }; then - array_deps_required+=( openjdk-16-jre ) - else - array_deps_required+=( default-jre ) - fi - fi - elif [ "${shortname}" == "rw" ]; then - javaversion=$(java -version 2>&1 | grep "version") - if [ "${javaversion}" ]; then - # Added for users using Oracle JRE to bypass the check. - javacheck=1 +# Checks if dependency is installed or not. +fn_deps_detector(){ + # Java: Added for users using Oracle JRE to bypass check. + if [[ ${deptocheck} == "openjdk"* ]]||[[ ${deptocheck} == "java"* ]]; then + # Is java already installed? + if [ -n "${javaversion}" ]; then + # Added for users using Oracle JRE to bypass check. + depstatus=0 + deptocheck="${javaversion}" else - array_deps_required+=( default-jre ) + depstatus=1 fi - # Onset - elif [ "${shortname}" == "onset" ]; then - array_deps_required+=( libmariadbclient-dev ) - # Project Zomboid - elif [ "${shortname}" == "pz" ]; then - if java -version 2>&1 | grep "version"; then - # Added for users using Oracle JRE to bypass the check. - javacheck=1 - array_deps_required+=( rng-tools ) + # Mono: A Mono repo needs to be installed. + elif [ "${deptocheck}" == "mono-complete" ]; then + if [ -n "${monoversion}" ]&&[ "${monoversion}" -ge "5" ]; then + # Mono >= 5.0.0 already installed. + depstatus=0 + monostatus=0 else - array_deps_required+=( default-jre rng-tools ) + # Mono not installed or installed Mono < 5.0.0. + depstatus=1 + monostatus=1 fi - # SCP: Secret Laboratory, SCP: Secret Laboratory ServerMod - elif [ "${shortname}" == "scpsl" ]||[ "${shortname}" == "scpslsm" ]; then - array_deps_required+=( mono-complete ) - # Sven Co-op - elif [ "${shortname}" == "sven" ]; then - array_deps_required+=( libssl1.1:i386 zlib1g:i386 ) - # Vintage Story - elif [ "${shortname}" == "vints" ]; then - array_deps_required+=( mono-complete ) - # Wurm: Unlimited - elif [ "${shortname}" == "wurm" ]; then - array_deps_required+=( xvfb ) - # Post Scriptum - elif [ "${shortname}" == "pstbs" ]; then - array_deps_required+=( libgconf-2-4 ) - # Pavlov VR - elif [ "${shortname}" == "pvr" ]; then - array_deps_required+=( libc++1 ) - # Valheim ( for Plus mod) - elif [ "${shortname}" == "vh" ]; then - array_deps_required+=( libc6-dev ) + elif [ "$(command -v dpkg-query 2>/dev/null)" ]; then + dpkg-query -W -f='${Status}' "${deptocheck}" 2>/dev/null | grep -q -P '^install ok installed' + depstatus=$? + elif [ "$(command -v dnf 2>/dev/null)" ]; then + dnf list installed "${deptocheck}" > /dev/null 2>&1 + depstatus=$? + elif [ "$(command -v rpm 2>/dev/null)" ]; then + rpm -q "${deptocheck}" > /dev/null 2>&1 + depstatus=$? fi - # check if system is a lxc container and the hostname dependency. - if command -v systemd-detect-virt &> /dev/null; then - systemd_virt=$(systemd-detect-virt) - if [ "${systemd_virt}" == "lxc" ]||[ "${systemd_virt}" == "lxc-libvirt" ]; then - array_deps_required+=( hostname ) + if [ "${depstatus}" == "0" ]; then + # If dependency is found. + missingdep=0 + if [ "${commandname}" == "INSTALL" ]; then + echo -e "${green}${deptocheck}${default}" + sleep 0.1 fi - fi - - fn_deps_email - fn_check_loop -} - -fn_deps_build_redhat(){ - # Generate array of missing deps. - array_deps_missing=() - - # LinuxGSM requirements. - # CentOS - if [ "${distroversion}" == "7" ]; then - array_deps_required=( epel-release curl wget util-linux python3 file tar gzip bzip2 unzip binutils bc jq tmux nmap-ncat cpio ) - elif [ "${distroversion}" == "8" ]; then - array_deps_required=( epel-release curl wget util-linux python36 file tar gzip bzip2 unzip binutils bc jq tmux nmap-ncat cpio ) - elif [ "${distroid}" == "fedora" ]; then - array_deps_required=( curl wget util-linux python3 file tar gzip bzip2 unzip binutils bc jq tmux nmap-ncat cpio ) - elif [[ "${distroname}" == *"Amazon Linux AMI"* ]]; then - array_deps_required=( curl wget util-linux python3 file tar gzip bzip2 unzip binutils bc jq tmux nmap-ncat cpio ) else - array_deps_required=( curl wget util-linux python3 file tar gzip bzip2 unzip binutils bc jq tmux nmap-ncat cpio ) - fi - - # All servers except ts3, mumble, multi theft auto and minecraft servers require glibc.i686 and libstdc++.i686. - if [ "${shortname}" != "ts3" ]&&[ "${shortname}" != "mumble" ]&&[ "${shortname}" != "mc" ]&&[ "${engine}" != "renderware" ]; then - if [[ "${distroname}" == *"Amazon Linux AMI"* ]]; then - array_deps_required+=( glibc.i686 libstdc++64.i686 ) - else - array_deps_required+=( glibc.i686 libstdc++.i686 ) - fi - fi - - # Game Specific requirements. - - # Natural Selection 2 (x64 only) - if [ "${shortname}" == "ns2" ]; then - array_deps_required+=( speex tbb ) - # NS2: Combat - elif [ "${shortname}" == "ns2c" ]; then - array_deps_required+=( speex.i686 tbb.i686 ) - # 7 Days to Die - elif [ "${shortname}" == "sdtd" ]; then - array_deps_required+=( telnet expect ) - # Barotrauma - elif [ "${shortname}" == "bt" ]; then - array_deps_required+=( libicu ) - # Battlefield: Vietnam - elif [ "${shortname}" == "bfv" ]; then - array_deps_required+=( compat-libstdc++-33.i686 glibc.i686 ) - # Battlefield 1942, Black Mesa: Deathmatch, Counter-Strike: Source, Garry's Mod, No More Room in Hell, Source Forts Classic, Zombie Master Reborn and Zombie Panic: Source - elif [ "${shortname}" == "bf1942" ]||[ "${shortname}" == "bmdm" ]||[ "${shortname}" == "css" ]||[ "${shortname}" == "gmod" ]||[ "${shortname}" == "nmrih" ]||[ "${shortname}" == "sfc" ]||[ "${shortname}" == "zmr" ]||[ "${shortname}" == "zps" ]; then - array_deps_required+=( ncurses-libs.i686 ) - # Brainbread 2, Don't Starve Together & Team Fortress 2 - elif [ "${shortname}" == "bb2" ]||[ "${shortname}" == "dst" ]||[ "${shortname}" == "tf2" ]; then - array_deps_required+=( libcurl.i686 ) - # Call of Duty & Medal of Honor: Allied Assault - elif [ "${shortname}" == "cod" ]||[ "${shortname}" == "coduo" ]||[ "${shortname}" == "cod2" ]||[ "${shortname}" == "mohaa" ]; then - array_deps_required+=( compat-libstdc++-33.i686 ) - # Ecoserver - elif [ "${shortname}" == "eco" ]; then - array_deps_required+=( libgdiplus ) - # Factorio - elif [ "${shortname}" == "fctr" ]; then - array_deps_required+=( xz ) - # Hurtword/Rust - elif [ "${shortname}" == "hw" ]||[ "${shortname}" == "rust" ]; then - array_deps_required+=( zlib-devel ) - # Minecraft, Rising World, Wurm - elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "pmc" ]||[ "${shortname}" == "wmc" ]||[ "${shortname}" == "rw" ]; then - javaversion=$(java -version 2>&1 | grep "version") - if [ "${javaversion}" ]; then - # Added for users using Oracle JRE to bypass the check. - javacheck=1 - else - array_deps_required+=( java-11-openjdk ) + # If dependency is not found. + missingdep=1 + if [ "${commandname}" == "INSTALL" ]; then + echo -e "${red}${deptocheck}${default}" + sleep 0.1 fi - # Onset - elif [ "${shortname}" == "onset" ]; then - array_deps_required+=( mariadb-connector-c ) - # Project Zomboid - elif [ "${shortname}" == "pz" ]; then - if java -version 2>&1 | grep "version"; then - # Added for users using Oracle JRE to bypass the check. - javacheck=1 - array_deps_required+=( rng-tools ) - else - array_deps_required+=( java-11-openjdk rng-tools ) + # Define required dependencies for SteamCMD. + if [ -n "${appid}" ]; then + array_steamcmd_deps_required=("${depsteamcmd}") + for steamcmddeptocheck in ${array_steamcmd_deps_required[*]}; do + if [ "${deptocheck}" == "${steamcmddeptocheck}" ]; then + steamcmdfail=1 + fi + done fi - # Sven Co-op - elif [ "${shortname}" == "sven" ]; then - : # not compatible - # Vintage Story - elif [ "${shortname}" == "vints" ]; then - array_deps_required+=( mono-complete ) - # Wurm: Unlimited - elif [ "${shortname}" == "wurm" ]; then - array_deps_required+=( xorg-x11-server-Xvfb ) - # Post Scriptum - elif [ "${shortname}" == "pstbs" ]; then - array_deps_required+=( GConf2 ) - # Pavlov VR - elif [ "${shortname}" == "pvr" ]; then - array_deps_required+=( libcxx ) - # Valheim ( for Plus mod ) - elif [ "${shortname}" == "vh" ]; then - array_deps_required+=( glibc-devel ) fi + unset depstatus - # check if system is a lxc container and the hostname dependency. - if command -v systemd-detect-virt &> /dev/null; then - systemd_virt=$(systemd-detect-virt) - if [ "${systemd_virt}" == "lxc" ]||[ "${systemd_virt}" == "lxc-libvirt" ]; then - array_deps_required+=( hostname ) - fi + # Missing dependencies are added to array_deps_missing. + if [ "${missingdep}" == "1" ]; then + array_deps_missing+=("${deptocheck}") fi - - fn_deps_email - fn_check_loop } if [ "${commandname}" == "INSTALL" ]; then @@ -612,12 +296,45 @@ if [ "${commandname}" == "INSTALL" ]; then fi fi -# Filter checking in to Debian or Red Hat Based. info_distro.sh -if [ -f "/etc/debian_version" ]; then - fn_deps_build_debian -elif [ -f "/etc/redhat-release" ]; then - fn_deps_build_redhat -else - fn_print_warning_nl "${distroname} dependency checking unavailable." + +# some RHEL based distros use 8.4 instead of just 8. +if [[ "${distroidlike}" == *"rhel"* ]]||[ "${distroid}" == "rhel" ]; then + distroversion="${distroversionrh}" +fi + +if [ ! -f "${tmpdir}/dependency-no-check.tmp" ]&&[ ! -f "${datadir}/${distroid}-${distroversion}.csv" ]; then + # Check that the disto dependency csv file exists. + fn_check_file_github "lgsm/data" "${distroid}-${distroversion}.csv" + if [ -n "${checkflag}" ]&&[ "${checkflag}" == "0" ]; then + fn_fetch_file_github "lgsm/data" "${distroid}-${distroversion}.csv" "lgsm/data" "chmodx" "norun" "noforce" "nohash" + fi +fi + +# If the file successfully downloaded run the dependency check. +if [ -f "${datadir}/${distroid}-${distroversion}.csv" ]; then + depall=$(awk -F, '$1=="all" {$1=""; print $0}' "${datadir}/${distroid}-${distroversion}.csv") + depsteamcmd=$(awk -F, '$1=="steamcmd" {$1=""; print $0}' "${datadir}/${distroid}-${distroversion}.csv") + depshortname=$(awk -v shortname="$shortname" -F, '$1==shortname {$1=""; print $0}' "${datadir}/${distroid}-${distroversion}.csv") + + # Generate array of missing deps. + array_deps_missing=() + + array_deps_required=("${depall} ${depsteamcmd} ${depshortname}") + fn_deps_email + # Unique sort dependency array. + IFS=" " read -r -a array_deps_required <<< "$(echo "${array_deps_required[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' ')" + + fn_check_loop +# Warn the user that dependency checking is unavailable for their distro. +elif [ "${commandname}" == "INSTALL" ]||[ -n "${checkflag}" ]&&[ "${checkflag}" != "0" ]; then + fn_print_warning_nl "LinuxGSM dependency checking currently unavailable for ${distroname}." + # Prevent future dependency checking if unavailable for the distro. + echo "${version}" > "${tmpdir}/dependency-no-check.tmp" +elif [ -f "${tmpdir}/dependency-no-check.tmp" ]; then + # Allow LinuxGSM to try a dependency check if LinuxGSM has been recently updated. + nocheckversion=$(cat "${tmpdir}/dependency-no-check.tmp") + if [ "${version}" != "${nocheckversion}" ]; then + rm -f "${tmpdir:?}/dependency-no-check.tmp" + fi fi diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index 9d80913a7..33b2b7120 100755 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -252,6 +252,75 @@ fn_fetch_trap(){ core_exit.sh } +# Will check a file exists and download it. Will not exit if fails to download. +fn_check_file(){ + remote_fileurl="${1}" + remote_fileurl_backup="${2}" + remote_fileurl_name="${3}" + remote_fileurl_backup_name="${4}" + remote_filename="${5}" + # If backup fileurl exists include it. + if [ -n "${remote_fileurl_backup}" ]; then + # counter set to 0 to allow second try + counter=0 + remote_fileurls_array=( remote_fileurl remote_fileurl_backup ) + else + # counter set to 1 to not allow second try + counter=1 + remote_fileurls_array=( remote_fileurl ) + fi + for remote_fileurl_array in "${remote_fileurls_array[@]}"; do + if [ "${remote_fileurl_array}" == "remote_fileurl" ]; then + fileurl="${remote_fileurl}" + fileurl_name="${remote_fileurl_name}" + elif [ "${remote_fileurl_array}" == "remote_fileurl_backup" ]; then + fileurl="${remote_fileurl_backup}" + fileurl_name="${remote_fileurl_backup_name}" + fi + counter=$((counter+1)) + echo -en "checking ${fileurl_name} ${remote_filename}...\c" + curlcmd=$(curl --output /dev/null --silent --head --fail "${fileurl}" 2>&1) + local exitcode=$? + + # On first try will error. On second try will fail. + if [ "${exitcode}" != 0 ]; then + if [ ${counter} -ge 2 ]; then + fn_print_fail_eol_nl + if [ -f "${lgsmlog}" ]; then + fn_script_log_fatal "Checking ${remote_filename}" + fn_script_log_fatal "${fileurl}" + checkflag=1 + fi + else + fn_print_error_eol_nl + if [ -f "${lgsmlog}" ]; then + fn_script_log_error "Checking ${remote_filename}" + fn_script_log_error "${fileurl}" + checkflag=2 + fi + fi + else + fn_print_ok_eol + sleep 0.3 + echo -en "\033[2K\\r" + if [ -f "${lgsmlog}" ]; then + fn_script_log_pass "Checking ${remote_filename}" + checkflag=0 + fi + break + fi + done + + if [ -f "${local_filedir}/${local_filename}" ]; then + fn_dl_hash + # Execute file if run is set. + if [ "${run}" == "run" ]; then + # shellcheck source=/dev/null + source "${local_filedir}/${local_filename}" + fi + fi +} + fn_fetch_file(){ remote_fileurl="${1}" remote_fileurl_backup="${2}" @@ -361,8 +430,8 @@ fn_fetch_file(){ # GitHub file download functions. # Used to simplify downloading specific files from GitHub. -# github_file_url_dir: the directory of the file in the GitHub: lgsm/functions -# github_file_url_name: the filename of the file to download from GitHub: core_messages.sh +# github_fileurl_dir: the directory of the file in the GitHub: lgsm/functions +# github_fileurl_name: the filename of the file to download from GitHub: core_messages.sh # githuburl: the full GitHub url # remote_fileurl: The URL of the file: http://example.com/dl/File.tar.bz2 @@ -375,24 +444,24 @@ fn_fetch_file(){ # Fetches files from the Git repo. fn_fetch_file_github(){ - github_file_url_dir="${1}" - github_file_url_name="${2}" + github_fileurl_dir="${1}" + github_fileurl_name="${2}" # For legacy versions - code can be removed at a future date if [ "${legacymode}" == "1" ]; then - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. elif [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}" else - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" fi remote_fileurl_name="GitHub" remote_fileurl_backup_name="Bitbucket" local_filedir="${3}" - local_filename="${github_file_url_name}" + local_filename="${github_fileurl_name}" chmodx="${4:-0}" run="${5:-0}" forcedl="${6:-0}" @@ -401,17 +470,32 @@ fn_fetch_file_github(){ fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}" } +fn_check_file_github(){ + github_fileurl_dir="${1}" + github_fileurl_name="${2}" + if [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}" + else + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" + fi + remote_fileurl_name="GitHub" + remote_fileurl_backup_name="Bitbucket" + fn_check_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${github_fileurl_name}" +} + # Fetches config files from the Git repo. fn_fetch_config(){ - github_file_url_dir="${1}" - github_file_url_name="${2}" + github_fileurl_dir="${1}" + github_fileurl_name="${2}" # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. if [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}" else - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" fi remote_fileurl_name="GitHub" remote_fileurl_backup_name="Bitbucket" @@ -427,20 +511,20 @@ fn_fetch_config(){ # Fetches modules from the Git repo during first download. fn_fetch_function(){ - github_file_url_dir="lgsm/functions" - github_file_url_name="${functionfile}" + github_fileurl_dir="lgsm/functions" + github_fileurl_name="${functionfile}" # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. if [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_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}" + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}" else - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" fi remote_fileurl_name="GitHub" remote_fileurl_backup_name="Bitbucket" local_filedir="${functionsdir}" - local_filename="${github_file_url_name}" + local_filename="${github_fileurl_name}" chmodx="chmodx" run="run" forcedl="noforce" @@ -451,20 +535,20 @@ fn_fetch_function(){ # Fetches modules from the Git repo during update-lgsm. fn_update_function(){ - github_file_url_dir="lgsm/functions" - github_file_url_name="${functionfile}" + github_fileurl_dir="lgsm/functions" + github_fileurl_name="${functionfile}" # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. if [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_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}" + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}" else - remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}" fi remote_fileurl_name="GitHub" remote_fileurl_backup_name="Bitbucket" local_filedir="${functionsdir}" - local_filename="${github_file_url_name}" + local_filename="${github_fileurl_name}" chmodx="chmodx" run="norun" forcedl="noforce" diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh index eda17f8d1..dcde3ba7e 100755 --- a/lgsm/functions/info_distro.sh +++ b/lgsm/functions/info_distro.sh @@ -10,19 +10,19 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" ### Game Server pid if [ "${status}" == "1" ]; then - gameserverpid=$(tmux list-sessions -F "#{session_name} #{pane_pid}" | grep "^${sessionname} " | awk '{print $NF}') + gameserverpid="$(tmux list-sessions -F "#{session_name} #{pane_pid}" | grep "^${sessionname} " | awk '{print $NF}')" if [ "${engine}" == "source" ]; then - srcdslinuxpid=$(ps -ef | grep -v grep | grep "${gameserverpid}" | grep srcds_linux | awk '{print $2}') + srcdslinuxpid="$(ps -ef | grep -v grep | grep "${gameserverpid}" | grep srcds_linux | awk '{print $2}')" elif [ "${engine}" == "goldsrc" ]; then - hldslinuxpid=$(ps -ef | grep -v grep | grep "${gameserverpid}" | grep hlds_linux | awk '{print $2}') + hldslinuxpid="$(ps -ef | grep -v grep | grep "${gameserverpid}" | grep hlds_linux | awk '{print $2}')" fi fi ### Distro information ## Distro # Returns architecture, kernel and distro/os. -arch=$(uname -m) -kernel=$(uname -r) +arch="$(uname -m)" +kernel="$(uname -r)" # Distro Name - Ubuntu 16.04 LTS # Distro Version - 16.04 @@ -33,46 +33,49 @@ kernel=$(uname -r) 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 | sed 's/PRETTY_NAME=//g' | tr -d '="' | sed 's/\"//g') - distroversion=$(grep VERSION_ID /etc/os-release | sed 's/VERSION_ID=//g' | sed 's/\"//g') - distroid=$(grep ID /etc/os-release | grep -v _ID | grep -v ID_ | sed 's/ID=//g' | sed 's/\"//g') - distrocodename=$(grep VERSION_CODENAME /etc/os-release | sed 's/VERSION_CODENAME=//g' | sed 's/\"//g') + distroname="$(grep "PRETTY_NAME" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')" + distroversion="$(grep "VERSION_ID" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')" + # Special var for rhel like distros to removed point in number e.g 8.4 to just 8. + distroversionrh="$(printf "%.0f\n" "${distroversion}")" + distroid="$(grep "ID=" /etc/os-release | grep -v _ID | awk -F\= '{gsub(/"/,"",$2);print $2}')" + distroidlike="$(grep "ID_LIKE=" /etc/os-release | grep -v _ID | awk -F\= '{gsub(/"/,"",$2);print $2}')" + distrocodename="$(grep "VERSION_CODENAME" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')" elif [ "$(command -v lsb_release 2>/dev/null)" ]&&[ "${distro_info}" == "lsb_release" ]; then if [ -z "${distroname}" ];then - distroname=$(lsb_release -sd) + distroname="$(lsb_release -sd)" elif [ -z "${distroversion}" ]; then - distroversion=$(lsb_release -sr) + distroversion="$(lsb_release -sr)" elif [ -z "${distroid}" ]; then - distroid=$(lsb_release -si) + distroid="$(lsb_release -si)" elif [ -z "${distrocodename}" ]; then - distrocodename=$(lsb_release -sc) + distrocodename="$(lsb_release -sc)" fi elif [ "$(command -v hostnamectl 2>/dev/null)" ]&&[ "${distro_info}" == "hostnamectl" ]; then if [ -z "${distroname}" ];then - distroname=$(hostnamectl | grep "Operating System" | sed 's/Operating System: //g') + distroname="$(hostnamectl | grep "Operating System" | sed 's/Operating System: //g')" fi elif [ -f "/etc/debian_version" ]&&[ "${distro_info}" == "debian_version" ]; then if [ -z "${distroname}" ]; then distroname="Debian $(cat /etc/debian_version)" elif [ -z "${distroversion}" ]; then - distroversion=$(cat /etc/debian_version) + distroversion="$(cat /etc/debian_version)" elif [ -z "${distroid}" ]; then distroid="debian" fi elif [ -f "/etc/redhat-release" ]&&[ "${distro_info}" == "redhat-release" ]; then if [ -z "${distroname}" ]; then - distroname=$(cat /etc/redhat-release) + distroname="$(cat /etc/redhat-release)" elif [ -z "${distroversion}" ]; then - distroversion=$(rpm -qa \*-release | grep -Ei "oracle|redhat|centos|fedora" | cut -d"-" -f3) + distroversion="$(rpm -qa \*-release | grep -Ei "oracle|redhat|centos|fedora" | cut -d"-" -f3)" elif [ -z "${distroid}" ]; then - distroid=$(awk '{print $1}' /etc/redhat-release) + distroid="$(awk '{print $1}' /etc/redhat-release)" fi fi done ## Glibc version # e.g: 1.17 -glibcversion=$(ldd --version | sed -n '1s/.* //p') +glibcversion="$(ldd --version | sed -n '1s/.* //p')" ## tmux version # e.g: tmux 1.6 @@ -84,34 +87,38 @@ else if [ "${tmuxvdigit}" -lt "16" ]; then tmuxv="$(tmux -V) (>= 1.6 required for console log)" else - tmuxv=$(tmux -V) + tmuxv="$(tmux -V)" fi fi if [ "$(command -V java 2>/dev/null)" ]; then - javaversion=$(java -version 2>&1 | grep "version") + javaversion="$(java -version 2>&1 | grep "version")" +fi + +if [ "$(command -v mono 2>/dev/null)" ]; then + monoversion="$(mono --version 2>&1 | grep -Po '(?<=version )\d')" fi ## Uptime -uptime=$(/dev/null)" ]; then # Issue #2005 - Kernel 3.14+ contains MemAvailable which should be used. All others will be calculated. # get the raw KB values of these fields. - physmemtotalkb=$(grep MemTotal /proc/meminfo | awk '{print $2}') - physmemfreekb=$(grep ^MemFree /proc/meminfo | awk '{print $2}') - physmembufferskb=$(grep ^Buffers /proc/meminfo | awk '{print $2}') - physmemcachedkb=$(grep ^Cached /proc/meminfo | awk '{print $2}') - physmemreclaimablekb=$(grep ^SReclaimable /proc/meminfo | awk '{print $2}') + physmemtotalkb="$(grep MemTotal /proc/meminfo | awk '{print $2}')" + physmemfreekb="$(grep ^MemFree /proc/meminfo | awk '{print $2}')" + physmembufferskb="$(grep ^Buffers /proc/meminfo | awk '{print $2}')" + physmemcachedkb="$(grep ^Cached /proc/meminfo | awk '{print $2}')" + physmemreclaimablekb="$(grep ^SReclaimable /proc/meminfo | awk '{print $2}')" # check if MemAvailable Exists. if grep -q ^MemAvailable /proc/meminfo; then - physmemactualfreekb=$(grep ^MemAvailable /proc/meminfo | awk '{print $2}') + physmemactualfreekb="$(grep ^MemAvailable /proc/meminfo | awk '{print $2}')" else - physmemactualfreekb=$((physmemfreekb+physmembufferskb+physmemcachedkb)) + physmemactualfreekb="$((physmemfreekb+physmembufferskb+physmemcachedkb))" fi # Available RAM and swap. - physmemtotalmb=$((physmemtotalkb/1024)) - physmemtotal=$(numfmt --to=iec --from=iec --suffix=B "${physmemtotalkb}K") - physmemfree=$(numfmt --to=iec --from=iec --suffix=B "${physmemactualfreekb}K") - physmemused=$(numfmt --to=iec --from=iec --suffix=B "$((physmemtotalkb-physmemfreekb-physmembufferskb-physmemcachedkb-physmemreclaimablekb))K") - physmemavailable=$(numfmt --to=iec --from=iec --suffix=B "${physmemactualfreekb}K") - physmemcached=$(numfmt --to=iec --from=iec --suffix=B "$((physmemcachedkb+physmemreclaimablekb))K") - - swaptotal=$(numfmt --to=iec --from=iec --suffix=B "$(grep ^SwapTotal /proc/meminfo | awk '{print $2}')K") - swapfree=$(numfmt --to=iec --from=iec --suffix=B "$(grep ^SwapFree /proc/meminfo | awk '{print $2}')K") - swapused=$(numfmt --to=iec --from=iec --suffix=B "$(($(grep ^SwapTotal /proc/meminfo | awk '{print $2}')-$(grep ^SwapFree /proc/meminfo | awk '{print $2}')))K") + physmemtotalmb="$((physmemtotalkb/1024))" + physmemtotal="$(numfmt --to=iec --from=iec --suffix=B "${physmemtotalkb}K")" + physmemfree="$(numfmt --to=iec --from=iec --suffix=B "${physmemactualfreekb}K")" + physmemused="$(numfmt --to=iec --from=iec --suffix=B "$((physmemtotalkb-physmemfreekb-physmembufferskb-physmemcachedkb-physmemreclaimablekb))K")" + physmemavailable="$(numfmt --to=iec --from=iec --suffix=B "${physmemactualfreekb}K")" + physmemcached="$(numfmt --to=iec --from=iec --suffix=B "$((physmemcachedkb+physmemreclaimablekb))K")" + + swaptotal="$(numfmt --to=iec --from=iec --suffix=B "$(grep ^SwapTotal /proc/meminfo | awk '{print $2}')K")" + swapfree="$(numfmt --to=iec --from=iec --suffix=B "$(grep ^SwapFree /proc/meminfo | awk '{print $2}')K")" + swapused="$(numfmt --to=iec --from=iec --suffix=B "$(($(grep ^SwapTotal /proc/meminfo | awk '{print $2}')-$(grep ^SwapFree /proc/meminfo | awk '{print $2}')))K")" # RAM usage of the game server pid # MB if [ "${gameserverpid}" ]; then - memused=$(ps --forest -o rss -g "${gameserverpid}" | awk '{s+=$1} END {print s}'| awk '{$1/=1024;printf "%.0f",$1}{print $2}') + memused="$(ps --forest -o rss -g "${gameserverpid}" | awk '{s+=$1} END {print s}'| awk '{$1/=1024;printf "%.0f",$1}{print $2}')" # % - pmemused=$(ps --forest -o %mem -g "${gameserverpid}" | awk '{s+=$1} END {print s}') + pmemused="$(ps --forest -o %mem -g "${gameserverpid}" | awk '{s+=$1} END {print s}')" fi else -# Older distros will need to use free. + # Older distros will need to use free. # Older versions of free do not support -h option. if [ "$(free -h > /dev/null 2>&1; echo $?)" -ne "0" ]; then humanreadable="-m" else humanreadable="-h" fi - physmemtotalmb=$(free -m | awk '/Mem:/ {print $2}') - physmemtotal=$(free ${humanreadable} | awk '/Mem:/ {print $2}') - physmemfree=$(free ${humanreadable} | awk '/Mem:/ {print $4}') - physmemused=$(free ${humanreadable} | awk '/Mem:/ {print $3}') + physmemtotalmb="$(free -m | awk '/Mem:/ {print $2}')" + physmemtotal="$(free ${humanreadable} | awk '/Mem:/ {print $2}')" + physmemfree="$(free ${humanreadable} | awk '/Mem:/ {print $4}')" + physmemused="$(free ${humanreadable} | awk '/Mem:/ {print $3}')" - oldfree=$(free ${humanreadable} | awk '/cache:/') + oldfree="$(free ${humanreadable} | awk '/cache:/')" if [ "${oldfree}" ]; then physmemavailable="n/a" physmemcached="n/a" else - physmemavailable=$(free ${humanreadable} | awk '/Mem:/ {print $7}') - physmemcached=$(free ${humanreadable} | awk '/Mem:/ {print $6}') + physmemavailable="$(free ${humanreadable} | awk '/Mem:/ {print $7}')" + physmemcached="$(free ${humanreadable} | awk '/Mem:/ {print $6}')" fi - swaptotal=$(free ${humanreadable} | awk '/Swap:/ {print $2}') - swapused=$(free ${humanreadable} | awk '/Swap:/ {print $3}') - swapfree=$(free ${humanreadable} | awk '/Swap:/ {print $4}') + swaptotal="$(free ${humanreadable} | awk '/Swap:/ {print $2}')" + swapused="$(free ${humanreadable} | awk '/Swap:/ {print $3}')" + swapfree="$(free ${humanreadable} | awk '/Swap:/ {print $4}')" fi ### Disk information ## Available disk space on the partition. -filesystem=$(LC_ALL=C df -hP "${rootdir}" | tail -n 1 | awk '{print $1}') -totalspace=$(LC_ALL=C df -hP "${rootdir}" | tail -n 1 | awk '{print $2}') -usedspace=$(LC_ALL=C df -hP "${rootdir}" | tail -n 1 | awk '{print $3}') -availspace=$(LC_ALL=C df -hP "${rootdir}" | tail -n 1 | awk '{print $4}') +filesystem="$(LC_ALL=C df -hP "${rootdir}" | tail -n 1 | awk '{print $1}')" +totalspace="$(LC_ALL=C df -hP "${rootdir}" | tail -n 1 | awk '{print $2}')" +usedspace="$(LC_ALL=C df -hP "${rootdir}" | tail -n 1 | awk '{print $3}')" +availspace="$(LC_ALL=C df -hP "${rootdir}" | tail -n 1 | awk '{print $4}')" ## LinuxGSM used space total. -rootdirdu=$(du -sh "${rootdir}" 2> /dev/null | awk '{print $1}') +rootdirdu="$(du -sh "${rootdir}" 2> /dev/null | awk '{print $1}')" if [ -z "${rootdirdu}" ]; then rootdirdu="0M" fi ## LinuxGSM used space in serverfiles dir. -serverfilesdu=$(du -sh "${serverfiles}" 2> /dev/null | awk '{print $1}') +serverfilesdu="$(du -sh "${serverfiles}" 2> /dev/null | awk '{print $1}')" if [ -z "${serverfilesdu}" ]; then serverfilesdu="0M" fi ## LinuxGSM used space total minus backup dir. -rootdirduexbackup=$(du -sh --exclude="${backupdir}" "${serverfiles}" 2> /dev/null | awk '{print $1}') +rootdirduexbackup="$(du -sh --exclude="${backupdir}" "${serverfiles}" 2> /dev/null | awk '{print $1}')" if [ -z "${rootdirduexbackup}" ]; then rootdirduexbackup="0M" fi @@ -209,7 +216,7 @@ fi ## Backup info if [ -d "${backupdir}" ]; then # Used space in backups dir. - backupdirdu=$(du -sh "${backupdir}" | awk '{print $1}') + backupdirdu="$(du -sh "${backupdir}" | awk '{print $1}')" # If no backup dir, size is 0M. if [ -z "${backupdirdu}" ]; then backupdirdu="0M" @@ -221,15 +228,15 @@ if [ -d "${backupdir}" ]; then # If there are backups in backup dir. if [ "$(find "${backupdir}" -name "*.tar.gz" | wc -l)" -ne "0" ]; then # number of backups. - backupcount=$(find "${backupdir}"/*.tar.gz | wc -l) + backupcount="$(find "${backupdir}"/*.tar.gz | wc -l)" # most recent backup. - lastbackup=$(ls -1t "${backupdir}"/*.tar.gz | head -1) + lastbackup="$(ls -1t "${backupdir}"/*.tar.gz | head -1)" # date of most recent backup. - lastbackupdate=$(date -r "${lastbackup}") + lastbackupdate="$(date -r "${lastbackup}")" # no of days since last backup. - lastbackupdaysago=$(( ( $(date +'%s') - $(date -r "${lastbackup}" +'%s') )/60/60/24 )) + lastbackupdaysago="$(( ( $(date +'%s') - $(date -r "${lastbackup}" +'%s') )/60/60/24 ))" # size of most recent backup. - lastbackupsize=$(du -h "${lastbackup}" | awk '{print $1}') + lastbackupsize="$(du -h "${lastbackup}" | awk '{print $1}')" fi fi @@ -239,7 +246,7 @@ netlink=$(${ethtoolcommand} "${netint}" 2>/dev/null| grep Speed | awk '{print $2 # External IP address if [ -z "${extip}" ]; then - extip=$(curl --connect-timeout 10 -s https://api.ipify.org 2>/dev/null) + extip="$(curl --connect-timeout 10 -s https://api.ipify.org 2>/dev/null)" exitcode=$? # Should ifconfig.co return an error will use last known IP. if [ ${exitcode} -eq 0 ]; then @@ -247,14 +254,14 @@ if [ -z "${extip}" ]; then echo -e "${extip}" > "${tmpdir}/extip.txt" else if [ -f "${tmpdir}/extip.txt" ]; then - extip=$(cat "${tmpdir}/extip.txt") + extip="$(cat "${tmpdir}/extip.txt")" else fn_print_error_nl "Unable to get external IP" fi fi else if [ -f "${tmpdir}/extip.txt" ]; then - extip=$(cat "${tmpdir}/extip.txt") + extip="$(cat "${tmpdir}/extip.txt")" else fn_print_error_nl "Unable to get external IP" fi @@ -271,26 +278,27 @@ else fi # Steam Master Server - checks if detected by master server. -if [ "$(command -v jq 2>/dev/null)" ]; then - if [ "${ip}" ]&&[ "${port}" ]; then - if [ "${steammaster}" == "true" ]||[ ${commandname} == "DEV-QUERY-RAW" ]; then - # Will query server IP addresses first. - for queryip in "${queryips[@]}"; do - masterserver="$(curl --connect-timeout 10 -m 3 -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${queryip}':'${port}'&format=json' | jq '.response.servers[]|.addr' | wc -l 2>/dev/null)" - done - # Should that not work it will try the external IP. - if [ "${masterserver}" == "0" ]; then - masterserver="$(curl --connect-timeout 10 -m 3 -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${extip}':'${port}'&format=json' | jq '.response.servers[]|.addr' | wc -l 2>/dev/null)" - fi - if [ "${masterserver}" == "0" ]; then - displaymasterserver="false" - else - displaymasterserver="true" +if [ -z "${displaymasterserver}" ]; then + if [ "$(command -v jq 2>/dev/null)" ]; then + if [ "${ip}" ]&&[ "${port}" ]; then + if [ "${steammaster}" == "true" ]||[ "${commandname}" == "DEV-QUERY-RAW" ]; then + # Will query server IP addresses first. + for queryip in "${queryips[@]}"; do + masterserver="$(curl --connect-timeout 10 -m 3 -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${queryip}':'${port}'&format=json' | jq '.response.servers[]|.addr' | wc -l 2>/dev/null)" + done + # Should that not work it will try the external IP. + if [ "${masterserver}" == "0" ]; then + masterserver="$(curl --connect-timeout 10 -m 3 -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${extip}':'${port}'&format=json' | jq '.response.servers[]|.addr' | wc -l 2>/dev/null)" + fi + if [ "${masterserver}" == "0" ]; then + displaymasterserver="false" + else + displaymasterserver="true" + fi fi fi fi fi - # Sets the SteamCMD glibc requirement if the game server requirement is less or not required. if [ "${appid}" ]; then if [ "${glibc}" = "null" ]||[ -z "${glibc}" ]||[ "$(printf '%s\n'${glibc}'\n' "2.14" | sort -V | head -n 1)" != "2.14" ]; then diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index e67bd93bf..46bcece5b 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -2035,6 +2035,27 @@ fn_info_game_vh(){ servername=${servername:-"NOT SET"} } +fn_info_game_vints(){ + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + maxplayers="${unavailable}" + serverpassword="${unavailable}" + port="${unavailable}" + queryport="${unavailable}" + configip="${unavailable}" + else + servername=$(jq -r '.ServerName' "${servercfgfullpath}") + maxplayers=$(jq -r '.MaxClients' "${servercfgfullpath}") + serverpassword=$(jq -r 'select(.Password != null) | .Password' "${servercfgfullpath}") + port=$(jq -r '.Port' "${servercfgfullpath}") + queryport=${port:-"0"} + configip=$(jq -r 'select(.Ip != null) | .Ip' "${servercfgfullpath}") + + serverpassword=${serverpassword:-"NOT SET"} + configip=${configip:-"0.0.0.0"} + fi +} + fn_info_game_wet(){ # Config if [ ! -f "${servercfgfullpath}" ]; then diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 96ae7a1ea..8bc9a380a 100755 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -159,7 +159,6 @@ fn_list_config_locations(){ fi echo -e "LinuxGSM Config: ${lgsmdir}/config-lgsm/${gameservername}" echo -e "Documentation: https://docs.linuxgsm.com/configuration/game-server-config" - echo -e "" } if [ "${shortname}" == "sdtd" ]; then diff --git a/lgsm/functions/install_server_dir.sh b/lgsm/functions/install_server_dir.sh index 9e75fb488..658f4360c 100755 --- a/lgsm/functions/install_server_dir.sh +++ b/lgsm/functions/install_server_dir.sh @@ -15,7 +15,6 @@ if [ -d "${serverfiles}" ]; then fn_print_warning_nl "A server is already installed here." fi pwd -echo -e "" if [ -z "${autoinstall}" ]; then if ! fn_prompt_yn "Continue?" Y; then exitcode=0 diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index b6b9f5240..8ac1704dd 100755 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -73,6 +73,7 @@ echo -e "=================================" fn_sleep_time if [ "${appid}" ]; then + remotelocation="SteamCMD" fn_dl_steamcmd fi From c8d1a7c2a16018d59bf3dada09a6c2fc18a738fe Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 25 Sep 2021 11:50:46 +0100 Subject: [PATCH 32/38] feat(newserver): Last Oasis (#3565) Co-authored-by: Claiyc <58397976+Claiyc@users.noreply.github.com> --- .../config-lgsm/loserver/_default.cfg | 189 ++++++++++++++++++ lgsm/data/serverlist.csv | 1 + lgsm/functions/info_messages.sh | 12 ++ 3 files changed, 202 insertions(+) create mode 100644 lgsm/config-default/config-lgsm/loserver/_default.cfg mode change 100644 => 100755 lgsm/functions/info_messages.sh diff --git a/lgsm/config-default/config-lgsm/loserver/_default.cfg b/lgsm/config-default/config-lgsm/loserver/_default.cfg new file mode 100644 index 000000000..4f003de83 --- /dev/null +++ b/lgsm/config-default/config-lgsm/loserver/_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 #### + +## SteamCMD Login | https://docs.linuxgsm.com/steamcmd#steamcmd-login +steamuser="username" +steampass='password' + +## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters +servername="LinuxGSM" +ip="0.0.0.0" +port="7777" +queryport="27015" +customerkey="" +providerkey="" +slots="100" + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +# For specific IP use: -OverrideConnectionAddress=${ip} +startparameters="-log -force_steamclient_link -messaging -NoLiveServer -EnableCheats -backendapiurloverride="backend.last-oasis.com" -identifier=${servername} -port=${port} -CustomerKey=${customerkey} -ProviderKey=${providerkey} -slots=${slots} -QueryPort=${queryport}" + +#### LinuxGSM Settings #### + +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + +## Notification Alerts +# (on|off) + +# Display IP | https://docs.linuxgsm.com/alerts#display-ip +displayip="" + +# More info | https://docs.linuxgsm.com/alerts#more-info +postalert="off" + +# Discord Alerts | https://docs.linuxgsm.com/alerts/discord +discordalert="off" +discordwebhook="webhook" + +# Email Alerts | https://docs.linuxgsm.com/alerts/email +emailalert="off" +email="email@example.com" +emailfrom="" + +# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun +mailgunalert="off" +mailgunapiregion="us" +mailguntoken="accesstoken" +mailgundomain="example.com" +mailgunemailfrom="alert@example.com" +mailgunemail="email@myemail.com" + +# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover +pushoveralert="off" +pushovertoken="accesstoken" +pushoveruserkey="userkey" + +# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat +rocketchatalert="off" +rocketchatwebhook="webhook" +rocketchattoken="" + +# Slack Alerts | https://docs.linuxgsm.com/alerts/slack +slackalert="off" +slackwebhook="webhook" + +# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram +# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +telegramapi="api.telegram.org" +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +curlcustomstring="" + +## Updating | https://docs.linuxgsm.com/commands/update +updateonstart="off" + +## Backup | https://docs.linuxgsm.com/commands/backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://docs.linuxgsm.com/features/logging +consolelogging="on" +logdays="7" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="1" + +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors +ansi="on" + +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time +sleeptime="0.5" + +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd +# Server appid +appid="920720" +steamcmdforcewindows="no" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +betapassword="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="false" + +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode +# 1: tmux kill +# 2: CTRL+c +# 3: quit +# 4: quit 120s +# 5: stop +# 6: q +# 7: exit +# 8: 7 Days to Die +# 9: GoldSrc +# 10: Avorion +# 11: end +stopmode="2" + +## Query mode +# 1: session only +# 2: gamedig (gsquery fallback) +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="1" +querytype="" + +## Console type +consoleverbose="yes" +consoleinteract="no" + +## Game Server Details +# Do not edit +gamename="Last Oasis" +engine="unreal4" +glibc="2.17" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}/Mist" +executabledir="${systemdir}/Binaries/Linux" +executable="./MistServer-Linux-Shipping" +servercfgdir="${systemdir}/Saved/Config/LinuxServer" +servercfg="Game.ini" +servercfgdefault="Game.ini" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/Saved/Logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index e5e290efc..4bad355a6 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -52,6 +52,7 @@ jc3,jc3server,Just Cause 3 jk2,jk2server,Jedi Knight II: Jedi Outcast kf,kfserver,Killing Floor kf2,kf2server,Killing Floor 2 +lo,loserver,Last Oasis l4d,l4dserver,Left 4 Dead l4d2,l4d2server,Left 4 Dead 2 mc,mcserver,Minecraft diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh old mode 100644 new mode 100755 index 9a143f8e7..ef3b0a7b3 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -1032,6 +1032,16 @@ fn_info_message_jk2(){ } | column -s $'\t' -t } +fn_info_message_lo(){ + echo -e "netstat -atunp | grep MistServer" + echo -e "" + { + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" + echo -e "> Game\tINBOUND\t${port}\tudp" + echo -e "> Query\tINBOUND\t${queryport}\tudp" + } | column -s $'\t' -t +} + fn_info_message_kf(){ { fn_port "header" @@ -1643,6 +1653,8 @@ fn_info_message_select_engine(){ fn_info_message_jc3 elif [ "${shortname}" == "jk2" ]; then fn_info_message_jk2 + elif [ "${shortname}" == "lo" ]; then + fn_info_message_lo elif [ "${shortname}" == "kf" ]; then fn_info_message_kf elif [ "${shortname}" == "kf2" ]; then From 95de7bfa8f7b66a63a5c723b8ecb3100ef7493be Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 25 Sep 2021 11:58:54 +0100 Subject: [PATCH 33/38] added missing gotify alert to loserver --- lgsm/config-default/config-lgsm/loserver/_default.cfg | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lgsm/config-default/config-lgsm/loserver/_default.cfg b/lgsm/config-default/config-lgsm/loserver/_default.cfg index 4f003de83..9bf9ea90e 100644 --- a/lgsm/config-default/config-lgsm/loserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/loserver/_default.cfg @@ -51,6 +51,11 @@ emailalert="off" email="email@example.com" emailfrom="" +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + # IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt iftttalert="off" ifttttoken="accesstoken" From f6c982746ba02065f3073f8caec797d0015b4adc Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 25 Sep 2021 12:45:11 +0100 Subject: [PATCH 34/38] Release v21.3.0 --- lgsm/functions/core_functions.sh | 2 +- linuxgsm.sh | 2 +- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 0f18642e4..e9a4aab6f 100755 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -8,7 +8,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v21.2.5" +modulesversion="v21.3.0" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index 462ea09ad..a70a50f13 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v21.2.5" +version="v21.3.0" shortname="core" gameservername="core" commandname="CORE" diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index ef62e9724..4e3941a8d 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v21.2.5" +version="v21.3.0" shortname="fctr" gameservername="fctrserver" commandname="CORE" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 246ee76cd..d14025115 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v21.2.5" +version="v21.3.0" shortname="jc2" gameservername="jc2server" commandname="CORE" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 783580872..4866b92f3 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v21.2.5" +version="v21.3.0" shortname="mc" gameservername="mcserver" commandname="CORE" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 6d2b5d95f..ed52a0e67 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v21.2.5" +version="v21.3.0" shortname="ts3" gameservername="ts3server" commandname="CORE" From 848a34bd6daac9b421ce57c3ab4dcd9031e8f716 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 25 Sep 2021 13:13:50 +0100 Subject: [PATCH 35/38] updating github actions and tidy up --- .github/FUNDING.yml | 2 +- .github/ISSUE_TEMPLATE/new-server-request.md | 2 +- .github/topissuebot.yml | 4 - .github/workflows/create-release.yml | 2 +- .github/workflows/lock.yml | 4 +- .github/write-good.yml | 4 - .travis.yml | 44 ------ CODE_OF_CONDUCT.md | 152 +++++++++++++------ CONTRIBUTING.md | 14 +- README.md | 6 +- 10 files changed, 121 insertions(+), 113 deletions(-) delete mode 100644 .github/topissuebot.yml delete mode 100644 .github/write-good.yml delete mode 100644 .travis.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 5712ac3e7..357dfdf6e 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,7 +1,7 @@ # These are supported funding model platforms github: dgibbs64 # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] -patreon: # Replace with a single Patreon username +patreon: dgibbs # Replace with a single Patreon username open_collective: # Replace with a single Open Collective username ko_fi: # Replace with a single Ko-fi username tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel diff --git a/.github/ISSUE_TEMPLATE/new-server-request.md b/.github/ISSUE_TEMPLATE/new-server-request.md index 84176741f..57bee9cbe 100644 --- a/.github/ISSUE_TEMPLATE/new-server-request.md +++ b/.github/ISSUE_TEMPLATE/new-server-request.md @@ -7,7 +7,7 @@ assignees: '' --- -## What game server would you like adding? +## What game server would you like to add? [game server] diff --git a/.github/topissuebot.yml b/.github/topissuebot.yml deleted file mode 100644 index 06c64ae01..000000000 --- a/.github/topissuebot.yml +++ /dev/null @@ -1,4 +0,0 @@ -# Configuration for top-issue-bot -labelName: ":thumbsup: Top Issue!" -labelColor: "f442c2" -numberOfIssuesToLabel: 5 diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index f82cb60d9..04b6adb87 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: # Drafts your next Release notes as Pull Requests are merged into "master" - - uses: release-drafter/release-drafter@v5 + - uses: release-drafter/release-drafter@v5.15.0 with: config-name: release-drafter.yml env: diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index bef7c74c6..733fe595d 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -2,13 +2,13 @@ name: 'Lock Threads' on: schedule: - - cron: '0 0 * * *' + - cron: '0 0 * * *' jobs: lock: runs-on: ubuntu-latest steps: - - uses: dessant/lock-threads@v2.0.3 + - uses: dessant/lock-threads@v2.1.2 with: github-token: ${{ secrets.GITHUB_TOKEN }} issue-lock-comment: > diff --git a/.github/write-good.yml b/.github/write-good.yml deleted file mode 100644 index 00eefa99c..000000000 --- a/.github/write-good.yml +++ /dev/null @@ -1,4 +0,0 @@ -# .github/write-good.yml -writeGood: true -alex: true -spellchecker: true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0ea421b0e..000000000 --- a/.travis.yml +++ /dev/null @@ -1,44 +0,0 @@ -language: node_js -dist: bionic -node_js: - - "stable" -env: - global: - secure: VsS98cwJ5X/Ev3HEm7KEOPftYay+7jNTHepTS7d+gQNHcDR1UYKTmqlQNSIoUC52Ejs1cHq43jOfle4330zDPOYI0v5BMri6/iZKpmMxAw6KWNiUgSkziTP2kHC4NRLwEoU2WQTI3JZQjrBEfsPmD81+yR/eWXV3rph+YcSOxao= - -before_script: - - curl -L "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/shunit2/shunit2-2.1.6.tgz" | tar zx - -install: - - npm install gamedig - -addons: - apt: - packages: - - mailutils - - postfix - - jq - - lib32gcc1 - - lib32stdc++6 - - shellcheck - - libcurl4-openssl-dev - - libdw-dev - - cmake - -jobs: - include: - - stage: "Jobs" - name: "code coverage" - script: bash tests/tests_kcov.sh; kcov --bash-method=DEBUG coverage tests/tests_mcserver.sh - - script: bash tests/tests_mcserver.sh - name: "Minecraft" - - script: bash tests/tests_jc2server.sh - name: "Just Cause 2" - - script: bash tests/tests_fctrserver.sh - name: "Factorio" - - script: bash tests/tests_ts3server.sh - name: "Teamspeak 3" - - script: bash tests/tests_defaultcfg/tests_defaultcfg.sh - name: "_default.cfg checks" -after_success: -- bash <(curl -Ls https://coverage.codacy.com/get.sh) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 7fe220357..65a0143f5 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,73 +1,133 @@ + # Contributor Covenant Code of Conduct ## Our Pledge -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, sex characteristics, gender identity and expression, -level of experience, education, socio-economic status, nationality, personal -appearance, race, religion, or sexual identity and orientation. +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, caste, color, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. ## Our Standards -Examples of behavior that contributes to creating a positive environment -include: +Examples of behavior that contributes to a positive environment for our +community include: -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community -Examples of unacceptable behavior by participants include: +Examples of unacceptable behavior include: -* The use of sexualized language or imagery and unwelcome sexual attention or advances -* Trolling, insulting/derogatory comments, and personal or political attacks +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks * Public or private harassment -* Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting -## Our Responsibilities +## Enforcement Responsibilities -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. ## Scope -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. Examples of -representing a project or community include using an official project e-mail -address, posting via an official social media account, or acting as an appointed -representative at an online or offline event. Representation of a project may be -further defined and clarified by project maintainers. +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at me@danielgibbs.co.uk. All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. +reported to the community leaders responsible for enforcement at +[INSERT CONTACT METHOD]. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by other -members of the project's leadership. +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. ## Attribution -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.1, available at +[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. -[homepage]: https://www.contributor-covenant.org +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. -For answers to common questions about this code of conduct, see -https://www.contributor-covenant.org/faq +For answers to common questions about this code of conduct, see the FAQ at +[https://www.contributor-covenant.org/faq][FAQ]. Translations are available +at [https://www.contributor-covenant.org/translations][translations]. + +[homepage]: https://www.contributor-covenant.org +[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html +[Mozilla CoC]: https://github.com/mozilla/diversity +[FAQ]: https://www.contributor-covenant.org/faq +[translations]: https://www.contributor-covenant.org/translations diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4a114d2fc..1a2d7a3c8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -35,7 +35,7 @@ The following is a set of guidelines for contributing to LinuxGSM, which are hos ## Code of Conduct -This project and everyone participating in it are governed by the [LinuxGSM Code of Conduct](https://github.com/GameServerManagers/linuxgsm/blob/master/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behaviour to [daniel.gibbs@linuxgsm.com](mailto:daniel.gibbs@linuxgsm.com). +This project and everyone participating in it is governed by the [LinuxGSM Code of Conduct](https://github.com/GameServerManagers/linuxgsm/blob/master/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behaviour to [daniel.gibbs@linuxgsm.com](mailto:daniel.gibbs@linuxgsm.com). ## 🎉 Bug/Enhancement Contributions 🐛 @@ -87,7 +87,7 @@ Features are tracked as [GitHub issues](https://guides.github.com/features/issue This section guides you through submitting a game server request for LinuxGSM, Following these guidelines help maintainers and the community understand your game server request 📝. #### Before Submitting a Game Server Request -* **Check for existing** [**game server requests**](https://github.com/GameServerManagers/LinuxGSM/labels/type%3A%20game%20server%20request) to see if the new game server has already been suggested. If it has **and if the new game server is still open**, give it a thumbs. +* **Check for existing** [**game server requests**](https://github.com/GameServerManagers/LinuxGSM/labels/type%3A%20game%20server%20request) to see if the new game server has already been suggested. If it has **and if the new game server is still open**, give it a thumbs up. * **Check the game server is supported on Linux**, this does not include Wine servers which we do not support. #### How Do I Submit A (Good) Game Server Request? * The title should be as follows: **[Server Request] Game Name** @@ -98,9 +98,9 @@ This section guides you through submitting a game server request for LinuxGSM, F LinuxGSM is a management script that acts as a wrapper around game servers. These game servers are developed by different game developers such as Valve, Epic and Facepunch to name a few. -LinuxGSM has no control over the development and limited knowledge of issues directly relating to the game servers themselves. The same also applies for any mods, add-ons, maps etc. +LinuxGSM has no control over the development and limited knowledge of issues directly relating to the game servers themselves. The same also applies to any mods, add-ons, maps etc. -If there is an issue with a specific game server or mod the best action may be to contact the game/mod developers on there support forums. If it is unclear some community members should be able to help. +If there is an issue with a specific game server or mod the best action may be to contact the game/mod developers on their support forums. If it is unclear some community members should be able to help. A [list](https://docs.linuxgsm.com/support/game-server) of known game developer forums is available on the [LinuxGSM docs](https://docs.linuxgsm.com/support/game-server). @@ -157,7 +157,7 @@ Below is an example of the subject line for a pull request: ### Testing #### Pull Request Status Checks -When a Pull Request is submitted, a series of status check tests are conducted. These tests will asses the code quality, complete CI tests etc. To get your PR merged these status checks must pass. +When a Pull Request is submitted, a series of status check tests are conducted. These tests will assess the code quality, complete CI tests etc. To get your PR merged these status checks must pass. #### Test Environment It is recommended that you have a testing environment available to test your code during development. To test your own code you must change some variables within the `linuxgsm.sh` file. This will force the use of your own code branch. @@ -197,10 +197,10 @@ This section lists the labels we use to help us track and manage issues and pull [GitHub search](https://help.github.com/articles/searching-issues/) makes it easy to use labels for finding groups of issues or pull requests you're interested in. There are several categories of labels available: **command** Labels -Highlights the LinuxGSM command the Issue/PR relates too. +Highlights the LinuxGSM command the Issue/PR relates to. **info** Labels -Labels to help pinpoint what the issue or PR relates too. +Labels to help pinpoint what the issue or PR relates to. variants: * _distro_ diff --git a/README.md b/README.md index baed33db1..5164e0b86 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Other distros are likely to work but are not fully tested. ## :wrench: Requirements -Each game server has its own specific dependency requirements. Visit a specific game server installation page on the [LinuxGSM](https://linuxgsm.com) website to check dependency requirements for the game server you want to install. +Each game server has specific dependency requirements. Visit a specific game server installation page on the [LinuxGSM](https://linuxgsm.com) website to check dependency requirements for the game server you want to install. ## :blue_book: Documentation @@ -43,11 +43,11 @@ Documentation is found at [linuxgsm.com](https://linuxgsm.com) and [docs.linuxgs ## :question: Support -There are a various ways to get support, check out the [support](https://linuxgsm.com/support/) page to the right support. +There are various ways to get support, check out the [support](https://linuxgsm.com/support/) page to the right support. ## :heart: Sponsor -If you would like to [sponsor](https://linuxgsm.com/sponsor) to the project there are several ways you can, via [GitHub Sponsors](https://github.com/sponsors/dgibbs64) and [PayPal](https://www.paypal.me/dgibbs64). I would like to thank everyone who has previously sent a donation. Since 2012 LinuxGSM has been steadily growing with new servers, features and improvements added regularly. +If you would like to [sponsor](https://linuxgsm.com/sponsor) to the project there are several ways you can, via [GitHub Sponsors](https://github.com/sponsors/dgibbs64) and [PayPal](https://www.paypal.me/dgibbs64). I would like to thank everyone who sponsors me. Since 2012 LinuxGSM has been steadily growing with new servers, features and improvements added regularly. ## Contributors From daab0884915d04a9907e99f4d9c2020db8fb920c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 25 Sep 2021 13:16:50 +0100 Subject: [PATCH 36/38] make labeler more readable --- .github/workflows/labeler.yml | 109 +++++++++++++++++++++++++++++++++- 1 file changed, 108 insertions(+), 1 deletion(-) diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 316f08b98..82f5b8c8b 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -12,5 +12,112 @@ jobs: - uses: Naturalclar/issue-action@v2.0.2 with: title-or-body: "both" - parameters: '[ {"keywords": ["Server Request"], "labels": ["type: game server request"]}, {"keywords": ["backup"], "labels": ["command: backup"]}, {"keywords": ["console"], "labels": ["command: console"]}, {"keywords": ["command: debug"], "labels": ["command: debug"]}, {"keywords": ["command: details"], "labels": ["command: details"]}, {"keywords": ["fast-dl"], "labels": ["command: fast-dl"]}, {"keywords": ["command: install"], "labels": ["command: install"]}, {"keywords": ["command: mods"], "labels": ["command: mods"]}, {"keywords": ["monitor"], "labels": ["command: monitor"]}, {"keywords": ["command: start"], "labels": ["command: start"]}, {"keywords": ["command: stop"], "labels": ["command: stop"]}, {"keywords": ["command: update-lgsm"], "labels": ["command: update-lgsm"]}, {"keywords": ["update"], "labels": ["command: update"]}, {"keywords": ["validate"], "labels": ["command: validate"]}, {"keywords": ["wipe"], "labels": ["command: wipe"]}, {"keywords": ["CentOS"], "labels": ["distro: CentOS"]}, {"keywords": ["Debian"], "labels": ["distro: Debian"]}, {"keywords": ["Fedora"], "labels": ["distro: Fedora"]}, {"keywords": ["Ubuntu"], "labels": ["distro: Ubuntu"]}, {"keywords": ["alert"], "labels": ["info: alerts"]}, {"keywords": ["dependency"], "labels": ["info: dependency"]}, {"keywords": ["docker"], "labels": ["info: docker"]}, {"keywords": ["steamcmd"], "labels": ["info: steamcmd"]}, {"keywords": ["systemd"], "labels": ["info: systemd"]}, {"keywords": ["tmux"], "labels": ["info: tmux"]}, {"keywords": ["bug"], "labels": ["type: bug"]}, {"keywords": ["feature"], "labels": ["type: feature request"]}, {"keywords": ["refactor"], "labels": ["type: refactor"]}, {"keywords": ["Ark"], "labels": ["game: Ark: Survival Evolved"]}, {"keywords": ["Arma 3"], "labels": ["game: Arma 3"]}, {"keywords": ["Counter-Strike: Global Offensive"], "labels": ["game: Counter-Strike: Global Offensive"]}, {"keywords": ["Minecraft"], "labels": ["game: Minecraft"]}, {"keywords": ["Rust"], "labels": ["game: Rust"]}, {"keywords": ["Valheim"], "labels": ["game: Valheim"]}, {"keywords": ["7 Days to Die"], "labels": ["game: 7 Days to Die"]}]' + parameters: ' + [{ + "keywords": ["Server Request"], + "labels": ["type: game server request"] + }, { + "keywords": ["backup"], + "labels": ["command: backup"] + }, { + "keywords": ["console"], + "labels": ["command: console"] + }, { + "keywords": ["command: debug"], + "labels": ["command: debug"] + }, { + "keywords": ["command: details"], + "labels": ["command: details"] + }, { + "keywords": ["fast-dl"], + "labels": ["command: fast-dl"] + }, { + "keywords": ["command: install"], + "labels": ["command: install"] + }, { + "keywords": ["command: mods"], + "labels": ["command: mods"] + }, { + "keywords": ["monitor"], + "labels": ["command: monitor"] + }, { + "keywords": ["command: start"], + "labels": ["command: start"] + }, { + "keywords": ["command: stop"], + "labels": ["command: stop"] + }, { + "keywords": ["command: update-lgsm"], + "labels": ["command: update-lgsm"] + }, { + "keywords": ["update"], + "labels": ["command: update"] + }, { + "keywords": ["validate"], + "labels": ["command: validate"] + }, { + "keywords": ["wipe"], + "labels": ["command: wipe"] + }, { + "keywords": ["CentOS"], + "labels": ["distro: CentOS"] + }, { + "keywords": ["Debian"], + "labels": ["distro: Debian"] + }, { + "keywords": ["Fedora"], + "labels": ["distro: Fedora"] + }, { + "keywords": ["Ubuntu"], + "labels": ["distro: Ubuntu"] + }, { + "keywords": ["alert"], + "labels": ["info: alerts"] + }, { + "keywords": ["dependency"], + "labels": ["info: dependency"] + }, { + "keywords": ["docker"], + "labels": ["info: docker"] + }, { + "keywords": ["steamcmd"], + "labels": ["info: steamcmd"] + }, { + "keywords": ["systemd"], + "labels": ["info: systemd"] + }, { + "keywords": ["tmux"], + "labels": ["info: tmux"] + }, { + "keywords": ["bug"], + "labels": ["type: bug"] + }, { + "keywords": ["feature"], + "labels": ["type: feature request"] + }, { + "keywords": ["refactor"], + "labels": ["type: refactor"] + }, { + "keywords": ["Ark"], + "labels": ["game: Ark: Survival Evolved"] + }, { + "keywords": ["Arma 3"], + "labels": ["game: Arma 3"] + }, { + "keywords": ["Counter-Strike: Global Offensive"], + "labels": ["game: Counter-Strike: Global Offensive"] + }, { + "keywords": ["Minecraft"], + "labels": ["game: Minecraft"] + }, { + "keywords": ["Rust"], + "labels": ["game: Rust"] + }, { + "keywords": ["Valheim"], + "labels": ["game: Valheim"] + }, { + "keywords": ["7 Days to Die"], + "labels": ["game: 7 Days to Die"] + }] + ' github-token: "${{ secrets.GITHUB_TOKEN }}" From 1efb0a01ea6750703ac3330ea912ba0d43baa590 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 26 Sep 2021 21:30:22 +0100 Subject: [PATCH 37/38] add labels for all games --- .github/workflows/labeler.yml | 1483 ++++++++++++++++++++++++++++++--- 1 file changed, 1377 insertions(+), 106 deletions(-) diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 82f5b8c8b..30ccb5a03 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -13,111 +13,1382 @@ jobs: with: title-or-body: "both" parameters: ' - [{ - "keywords": ["Server Request"], - "labels": ["type: game server request"] - }, { - "keywords": ["backup"], - "labels": ["command: backup"] - }, { - "keywords": ["console"], - "labels": ["command: console"] - }, { - "keywords": ["command: debug"], - "labels": ["command: debug"] - }, { - "keywords": ["command: details"], - "labels": ["command: details"] - }, { - "keywords": ["fast-dl"], - "labels": ["command: fast-dl"] - }, { - "keywords": ["command: install"], - "labels": ["command: install"] - }, { - "keywords": ["command: mods"], - "labels": ["command: mods"] - }, { - "keywords": ["monitor"], - "labels": ["command: monitor"] - }, { - "keywords": ["command: start"], - "labels": ["command: start"] - }, { - "keywords": ["command: stop"], - "labels": ["command: stop"] - }, { - "keywords": ["command: update-lgsm"], - "labels": ["command: update-lgsm"] - }, { - "keywords": ["update"], - "labels": ["command: update"] - }, { - "keywords": ["validate"], - "labels": ["command: validate"] - }, { - "keywords": ["wipe"], - "labels": ["command: wipe"] - }, { - "keywords": ["CentOS"], - "labels": ["distro: CentOS"] - }, { - "keywords": ["Debian"], - "labels": ["distro: Debian"] - }, { - "keywords": ["Fedora"], - "labels": ["distro: Fedora"] - }, { - "keywords": ["Ubuntu"], - "labels": ["distro: Ubuntu"] - }, { - "keywords": ["alert"], - "labels": ["info: alerts"] - }, { - "keywords": ["dependency"], - "labels": ["info: dependency"] - }, { - "keywords": ["docker"], - "labels": ["info: docker"] - }, { - "keywords": ["steamcmd"], - "labels": ["info: steamcmd"] - }, { - "keywords": ["systemd"], - "labels": ["info: systemd"] - }, { - "keywords": ["tmux"], - "labels": ["info: tmux"] - }, { - "keywords": ["bug"], - "labels": ["type: bug"] - }, { - "keywords": ["feature"], - "labels": ["type: feature request"] - }, { - "keywords": ["refactor"], - "labels": ["type: refactor"] - }, { - "keywords": ["Ark"], - "labels": ["game: Ark: Survival Evolved"] - }, { - "keywords": ["Arma 3"], - "labels": ["game: Arma 3"] - }, { - "keywords": ["Counter-Strike: Global Offensive"], - "labels": ["game: Counter-Strike: Global Offensive"] - }, { - "keywords": ["Minecraft"], - "labels": ["game: Minecraft"] - }, { - "keywords": ["Rust"], - "labels": ["game: Rust"] - }, { - "keywords": ["Valheim"], - "labels": ["game: Valheim"] - }, { - "keywords": ["7 Days to Die"], - "labels": ["game: 7 Days to Die"] - }] + [{ + "keywords": [ + "Server Request", + "" + ], + "labels": [ + "type: game server request" + ] + }, + { + "keywords": [ + "backup", + "" + ], + "labels": [ + "command: backup" + ] + }, + { + "keywords": [ + "console", + "" + ], + "labels": [ + "command: console" + ] + }, + { + "keywords": [ + "command: debug", + "" + ], + "labels": [ + "command: debug" + ] + }, + { + "keywords": [ + "command: details", + "" + ], + "labels": [ + "command: details" + ] + }, + { + "keywords": [ + "fast-dl", + "" + ], + "labels": [ + "command: fast-dl" + ] + }, + { + "keywords": [ + "command: install", + "" + ], + "labels": [ + "command: install" + ] + }, + { + "keywords": [ + "command: mods", + "" + ], + "labels": [ + "command: mods" + ] + }, + { + "keywords": [ + "monitor", + "" + ], + "labels": [ + "command: monitor" + ] + }, + { + "keywords": [ + "command: start", + "" + ], + "labels": [ + "command: start" + ] + }, + { + "keywords": [ + "command: stop", + "" + ], + "labels": [ + "command: stop" + ] + }, + { + "keywords": [ + "command: update-lgsm", + "" + ], + "labels": [ + "command: update-lgsm" + ] + }, + { + "keywords": [ + "update", + "" + ], + "labels": [ + "command: update" + ] + }, + { + "keywords": [ + "validate", + "" + ], + "labels": [ + "command: validate" + ] + }, + { + "keywords": [ + "wipe", + "" + ], + "labels": [ + "command: wipe" + ] + }, + { + "keywords": [ + "CentOS", + "" + ], + "labels": [ + "distro: CentOS" + ] + }, + { + "keywords": [ + "Debian", + "" + ], + "labels": [ + "distro: Debian" + ] + }, + { + "keywords": [ + "Fedora", + "" + ], + "labels": [ + "distro: Fedora" + ] + }, + { + "keywords": [ + "Ubuntu", + "" + ], + "labels": [ + "distro: Ubuntu" + ] + }, + { + "keywords": [ + "Rocky", + "" + ], + "labels": [ + "distro: Rocky Linux" + ] + }, + { + "keywords": [ + "Slackware", + "" + ], + "labels": [ + "distro: Slackware" + ] + }, + { + "keywords": [ + "Arch", + "" + ], + "labels": [ + "distro: Arch Linux" + ] + }, + { + "keywords": [ + "SUSE", + "" + ], + "labels": [ + "distro: openSUSE" + ] + }, + { + "keywords": [ + "Alma", + "" + ], + "labels": [ + "distro: AlmaLinux" + ] + }, + { + "keywords": [ + "alert", + "" + ], + "labels": [ + "info: alerts" + ] + }, + { + "keywords": [ + "dependency", + "" + ], + "labels": [ + "info: dependency" + ] + }, + { + "keywords": [ + "docker", + "" + ], + "labels": [ + "info: docker" + ] + }, + { + "keywords": [ + "steamcmd", + "" + ], + "labels": [ + "info: steamcmd" + ] + }, + { + "keywords": [ + "systemd", + "" + ], + "labels": [ + "info: systemd" + ] + }, + { + "keywords": [ + "tmux", + "" + ], + "labels": [ + "info: tmux" + ] + }, + { + "keywords": [ + "bug", + "" + ], + "labels": [ + "type: bug" + ] + }, + { + "keywords": [ + "feature", + "" + ], + "labels": [ + "type: feature request" + ] + }, + { + "keywords": [ + "refactor", + "" + ], + "labels": [ + "type: refactor" + ] + }, + { + "keywords": [ + "7 Days to Die", + "" + ], + "labels": [ + "game: 7 Days to Die" + ] + }, + { + "keywords": [ + "Action Half-Life", + "" + ], + "labels": [ + "" + ] + }, + { + "keywords": [ + "Action: Source", + "" + ], + "labels": [ + "" + ] + }, + { + "keywords": [ + "ARK: Survival Evolved", + "ARK" + ], + "labels": [ + "game: Ark: Survival Evolved" + ] + }, + { + "keywords": [ + "ARMA 3", + "" + ], + "labels": [ + "game:ARMA 3" + ] + }, + { + "keywords": [ + "Assetto Corsa", + "" + ], + "labels": [ + "game:Assetto Corsa" + ] + }, + { + "keywords": [ + "Avorion", + "" + ], + "labels": [ + "game:Avorion" + ] + }, + { + "keywords": [ + "Ballistic Overkill", + "" + ], + "labels": [ + "game:Ballistic Overkill" + ] + }, + { + "keywords": [ + "Barotrauma", + "" + ], + "labels": [ + "game:Barotrauma" + ] + }, + { + "keywords": [ + "Base Defense", + "" + ], + "labels": [ + "game:Base Defense" + ] + }, + { + "keywords": [ + "Battalion 1944", + "" + ], + "labels": [ + "game:Battalion 1944" + ] + }, + { + "keywords": [ + "Battlefield 1942", + "" + ], + "labels": [ + "game:Battlefield 1942" + ] + }, + { + "keywords": [ + "Battlefield: Vietnam", + "" + ], + "labels": [ + "game:Battlefield: Vietnam" + ] + }, + { + "keywords": [ + "Black Mesa: Deathmatch", + "" + ], + "labels": [ + "game:Black Mesa: Deathmatch" + ] + }, + { + "keywords": [ + "Blade Symphony", + "" + ], + "labels": [ + "game:Blade Symphony" + ] + }, + { + "keywords": [ + "BrainBread", + "" + ], + "labels": [ + "game:BrainBread" + ] + }, + { + "keywords": [ + "BrainBread 2", + "" + ], + "labels": [ + "game:BrainBread 2" + ] + }, + { + "keywords": [ + "Call of Duty", + "" + ], + "labels": [ + "game:Call of Duty" + ] + }, + { + "keywords": [ + "Call of Duty 2", + "" + ], + "labels": [ + "game:Call of Duty 2" + ] + }, + { + "keywords": [ + "Call of Duty 4", + "" + ], + "labels": [ + "game:Call of Duty 4" + ] + }, + { + "keywords": [ + "Call of Duty: United Offensive", + "" + ], + "labels": [ + "game:Call of Duty: United Offensive" + ] + }, + { + "keywords": [ + "Call of Duty: World at War", + "" + ], + "labels": [ + "game:Call of Duty: World at War" + ] + }, + { + "keywords": [ + "Chivalry: Medieval Warfare", + "" + ], + "labels": [ + "game:Chivalry: Medieval Warfare" + ] + }, + { + "keywords": [ + "Codename CURE", + "" + ], + "labels": [ + "game:Codename CURE" + ] + }, + { + "keywords": [ + "Colony Survival", + "" + ], + "labels": [ + "game:Colony Survival" + ] + }, + { + "keywords": [ + "Counter-Strike 1.6", + "" + ], + "labels": [ + "game:Counter-Strike 1.6" + ] + }, + { + "keywords": [ + "Counter-Strike: Condition Zero", + "" + ], + "labels": [ + "game:Counter-Strike: Condition Zero" + ] + }, + { + "keywords": [ + "Counter-Strike: Global Offensive", + "" + ], + "labels": [ + "game:Counter-Strike: Global Offensive" + ] + }, + { + "keywords": [ + "Counter-Strike: Source", + "" + ], + "labels": [ + "game:Counter-Strike: Source" + ] + }, + { + "keywords": [ + "Day of Defeat", + "" + ], + "labels": [ + "game:Day of Defeat" + ] + }, + { + "keywords": [ + "Day of Defeat: Source", + "" + ], + "labels": [ + "game:Day of Defeat: Source" + ] + }, + { + "keywords": [ + "Day of Dragons", + "" + ], + "labels": [ + "game:Day of Dragons" + ] + }, + { + "keywords": [ + "Day of Infamy", + "" + ], + "labels": [ + "game:Day of Infamy" + ] + }, + { + "keywords": [ + "Deathmatch Classic", + "" + ], + "labels": [ + "game:Deathmatch Classic" + ] + }, + { + "keywords": [ + "Don't Starve Together" + ], + "labels": [ + "game:Don't Starve Together" + ] + }, + { + "keywords": [ + "Double Action: Boogaloo", + "" + ], + "labels": [ + "game:Double Action: Boogaloo" + ] + }, + { + "keywords": [ + "Dystopia", + "" + ], + "labels": [ + "game:Dystopia" + ] + }, + { + "keywords": [ + "Eco", + "" + ], + "labels": [ + "game:Eco" + ] + }, + { + "keywords": [ + "Empires Mod", + "" + ], + "labels": [ + "game:Empires Mod" + ] + }, + { + "keywords": [ + "ET: Legacy", + "" + ], + "labels": [ + "game:ET: Legacy" + ] + }, + { + "keywords": [ + "Factorio", + "" + ], + "labels": [ + "game:Factorio" + ] + }, + { + "keywords": [ + "Fistful of Frags", + "" + ], + "labels": [ + "game:Fistful of Frags" + ] + }, + { + "keywords": [ + "Garrys Mod", + "" + ], + "labels": [ + "game:Garrys Mod" + ] + }, + { + "keywords": [ + "Half-Life 2: Deathmatch", + "" + ], + "labels": [ + "game:Half-Life 2: Deathmatch" + ] + }, + { + "keywords": [ + "Half-Life Deathmatch: Source", + "" + ], + "labels": [ + "game:Half-Life Deathmatch: Source" + ] + }, + { + "keywords": [ + "Half-Life: Deathmatch", + "" + ], + "labels": [ + "game:Half-Life: Deathmatch" + ] + }, + { + "keywords": [ + "Hurtworld", + "" + ], + "labels": [ + "game:Hurtworld" + ] + }, + { + "keywords": [ + "Insurgency", + "" + ], + "labels": [ + "game:Insurgency" + ] + }, + { + "keywords": [ + "Insurgency: Sandstorm", + "" + ], + "labels": [ + "game:Insurgency: Sandstorm" + ] + }, + { + "keywords": [ + "IOSoccer", + "" + ], + "labels": [ + "game:IOSoccer" + ] + }, + { + "keywords": [ + "Jedi Knight II: Jedi Outcast", + "" + ], + "labels": [ + "game:Jedi Knight II: Jedi Outcast" + ] + }, + { + "keywords": [ + "Just Cause 2", + "" + ], + "labels": [ + "game:Just Cause 2" + ] + }, + { + "keywords": [ + "Just Cause 3", + "" + ], + "labels": [ + "game:Just Cause 3" + ] + }, + { + "keywords": [ + "Killing Floor", + "" + ], + "labels": [ + "game:Killing Floor" + ] + }, + { + "keywords": [ + "Killing Floor 2", + "" + ], + "labels": [ + "game:Killing Floor 2" + ] + }, + { + "keywords": [ + "Last Oasis", + "" + ], + "labels": [ + "game:Last Oasis" + ] + }, + { + "keywords": [ + "Left 4 Dead", + "" + ], + "labels": [ + "game:Left 4 Dead" + ] + }, + { + "keywords": [ + "Left 4 Dead 2", + "" + ], + "labels": [ + "game:Left 4 Dead 2" + ] + }, + { + "keywords": [ + "Medal of Honor: Allied Assault", + "" + ], + "labels": [ + "game:Medal of Honor: Allied Assault" + ] + }, + { + "keywords": [ + "Memories of Mars", + "" + ], + "labels": [ + "game:Memories of Mars" + ] + }, + { + "keywords": [ + "Minecraft", + "" + ], + "labels": [ + "game:Minecraft" + ] + }, + { + "keywords": [ + "Minecraft Bedrock", + "" + ], + "labels": [ + "game:Minecraft Bedrock" + ] + }, + { + "keywords": [ + "MORDHAU", + "" + ], + "labels": [ + "game:MORDHAU" + ] + }, + { + "keywords": [ + "Multi Theft Auto", + "" + ], + "labels": [ + "game:Multi Theft Auto" + ] + }, + { + "keywords": [ + "Mumble", + "" + ], + "labels": [ + "game:Mumble" + ] + }, + { + "keywords": [ + "Natural Selection", + "" + ], + "labels": [ + "game:Natural Selection" + ] + }, + { + "keywords": [ + "Natural Selection 2", + "" + ], + "labels": [ + "game:Natural Selection 2" + ] + }, + { + "keywords": [ + "No More Room in Hell", + "" + ], + "labels": [ + "game:No More Room in Hell" + ] + }, + { + "keywords": [ + "NS2: Combat", + "" + ], + "labels": [ + "game:NS2: Combat" + ] + }, + { + "keywords": [ + "Nuclear Dawn", + "" + ], + "labels": [ + "game:Nuclear Dawn" + ] + }, + { + "keywords": [ + "Onset", + "" + ], + "labels": [ + "game:Onset" + ] + }, + { + "keywords": [ + "Opposing Force", + "" + ], + "labels": [ + "game:Opposing Force" + ] + }, + { + "keywords": [ + "PaperMC", + "" + ], + "labels": [ + "game:PaperMC" + ] + }, + { + "keywords": [ + "Pavlov VR", + "" + ], + "labels": [ + "game:Pavlov VR" + ] + }, + { + "keywords": [ + "Pirates Vikings & Knights II", + "" + ], + "labels": [ + "game:Pirates Vikings & Knights II" + ] + }, + { + "keywords": [ + "Post Scriptum: The Bloody Seventh", + "" + ], + "labels": [ + "game:Post Scriptum: The Bloody Seventh" + ] + }, + { + "keywords": [ + "Project Cars", + "" + ], + "labels": [ + "game:Project Cars" + ] + }, + { + "keywords": [ + "Project Zomboid", + "" + ], + "labels": [ + "game:Project Zomboid" + ] + }, + { + "keywords": [ + "Quake 2", + "" + ], + "labels": [ + "game:Quake 2" + ] + }, + { + "keywords": [ + "Quake 3: Arena", + "" + ], + "labels": [ + "game:Quake 3: Arena" + ] + }, + { + "keywords": [ + "Quake Live", + "" + ], + "labels": [ + "game:Quake Live" + ] + }, + { + "keywords": [ + "Quake World", + "" + ], + "labels": [ + "game:Quake World" + ] + }, + { + "keywords": [ + "Red Orchestra: Ostfront 41-45", + "" + ], + "labels": [ + "game:Red Orchestra: Ostfront 41-45" + ] + }, + { + "keywords": [ + "Return to Castle Wolfenstein", + "" + ], + "labels": [ + "game:Return to Castle Wolfenstein" + ] + }, + { + "keywords": [ + "Ricochet", + "" + ], + "labels": [ + "game:Ricochet" + ] + }, + { + "keywords": [ + "Rising World", + "" + ], + "labels": [ + "game:Rising World" + ] + }, + { + "keywords": [ + "Rust", + "" + ], + "labels": [ + "game:Rust" + ] + }, + { + "keywords": [ + "San Andreas Multiplayer", + "" + ], + "labels": [ + "game:San Andreas Multiplayer" + ] + }, + { + "keywords": [ + "SCP: Secret Laboratory", + "" + ], + "labels": [ + "game:SCP: Secret Laboratory" + ] + }, + { + "keywords": [ + "SCP: Secret Laboratory ServerMod", + "" + ], + "labels": [ + "game:SCP: Secret Laboratory ServerMod" + ] + }, + { + "keywords": [ + "Soldat", + "" + ], + "labels": [ + "game:Soldat" + ] + }, + { + "keywords": [ + "Soldier Of Fortune 2: Gold Edition", + "" + ], + "labels": [ + "game:Soldier Of Fortune 2: Gold Edition" + ] + }, + { + "keywords": [ + "SourceForts Classic", + "" + ], + "labels": [ + "game:SourceForts Classic" + ] + }, + { + "keywords": [ + "Squad", + "" + ], + "labels": [ + "game:Squad" + ] + }, + { + "keywords": [ + "Starbound", + "" + ], + "labels": [ + "game:Starbound" + ] + }, + { + "keywords": [ + "Stationeers", + "" + ], + "labels": [ + "game:Stationeers" + ] + }, + { + "keywords": [ + "StickyBots", + "" + ], + "labels": [ + "game:StickyBots" + ] + }, + { + "keywords": [ + "Survive the Nights", + "" + ], + "labels": [ + "game:Survive the Nights" + ] + }, + { + "keywords": [ + "Sven Co-op", + "" + ], + "labels": [ + "game:Sven Co-op" + ] + }, + { + "keywords": [ + "Team Fortress 2", + "" + ], + "labels": [ + "game:Team Fortress 2" + ] + }, + { + "keywords": [ + "Team Fortress Classic", + "" + ], + "labels": [ + "game:Team Fortress Classic" + ] + }, + { + "keywords": [ + "Teamspeak 3", + "" + ], + "labels": [ + "game:Teamspeak 3" + ] + }, + { + "keywords": [ + "Teeworlds", + "" + ], + "labels": [ + "game:Teeworlds" + ] + }, + { + "keywords": [ + "Terraria", + "" + ], + "labels": [ + "game:Terraria" + ] + }, + { + "keywords": [ + "The Specialists", + "" + ], + "labels": [ + "game:The Specialists" + ] + }, + { + "keywords": [ + "Tower Unite", + "" + ], + "labels": [ + "game:Tower Unite" + ] + }, + { + "keywords": [ + "Unreal Tournament", + "" + ], + "labels": [ + "game:Unreal Tournament" + ] + }, + { + "keywords": [ + "Unreal Tournament 2004", + "" + ], + "labels": [ + "game:Unreal Tournament 2004" + ] + }, + { + "keywords": [ + "Unreal Tournament 3", + "" + ], + "labels": [ + "game:Unreal Tournament 3" + ] + }, + { + "keywords": [ + "Unreal Tournament 99", + "" + ], + "labels": [ + "game:Unreal Tournament 99" + ] + }, + { + "keywords": [ + "Unturned", + "" + ], + "labels": [ + "game:Unturned" + ] + }, + { + "keywords": [ + "Valheim", + "" + ], + "labels": [ + "game:Valheim" + ] + }, + { + "keywords": [ + "Vampire Slayer", + "" + ], + "labels": [ + "game:Vampire Slayer" + ] + }, + { + "keywords": [ + "Vintage Story", + "" + ], + "labels": [ + "game:Vintage Story" + ] + }, + { + "keywords": [ + "Warfork", + "" + ], + "labels": [ + "game:Warfork" + ] + }, + { + "keywords": [ + "WaterfallMC", + "" + ], + "labels": [ + "game:WaterfallMC" + ] + }, + { + "keywords": [ + "Wolfenstein: Enemy Territory", + "" + ], + "labels": [ + "game:Wolfenstein: Enemy Territory" + ] + }, + { + "keywords": [ + "Wurm Unlimited", + "" + ], + "labels": [ + "game:Wurm Unlimited" + ] + }, + { + "keywords": [ + "Zombie Master: Reborn", + "" + ], + "labels": [ + "game:Zombie Master: Reborn" + ] + }, + { + "keywords": [ + "Zombie Panic! Source", + "" + ], + "labels": [ + "game:Zombie Panic! Source" + ] + } + ] ' github-token: "${{ secrets.GITHUB_TOKEN }}" From 1cec2db4a7f660640f2fd5e6940d7baf30f8ccde Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 26 Sep 2021 22:41:06 +0100 Subject: [PATCH 38/38] add docs info to Last Oasis and change servername --- lgsm/config-default/config-lgsm/loserver/_default.cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/loserver/_default.cfg b/lgsm/config-default/config-lgsm/loserver/_default.cfg index 9bf9ea90e..855b60f26 100644 --- a/lgsm/config-default/config-lgsm/loserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/loserver/_default.cfg @@ -13,7 +13,8 @@ steamuser="username" steampass='password' ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters -servername="LinuxGSM" +## https://docs.linuxgsm.com/game-servers/last-oasis +servername="${selfname}" ip="0.0.0.0" port="7777" queryport="27015"