diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 79d78730b..bb77d9f85 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,6 +1,6 @@ # These are supported funding model platforms -github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +github: dgibbs64 # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] patreon: dgibbs # Replace with a single Patreon username open_collective: # Replace with a single Open Collective username ko_fi: dgibbs # Replace with a single Ko-fi username @@ -9,4 +9,4 @@ community_bridge: # Replace with a single Community Bridge project-name e.g., cl liberapay: # Replace with a single Liberapay username issuehunt: # Replace with a single IssueHunt username otechie: # Replace with a single Otechie username -custom: https://www.paypal.me/dgibbs64 # Replace with a single custom sponsorship URL +custom: ["https://www.paypal.me/dgibbs64", paypal.me/dgibbs64] # Replace with a single custom sponsorship URL diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index e6555a40e..db7ccf4f7 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -3,23 +3,20 @@ name: Bug report about: Found a bug? Raise a report --- -Follow **[this guide](https://linuxgsm.com/support/#guide)** to make sure you post the correct info. -For general support visit the **[LinuxGSM-Support](https://github.com/GameServerManagers/LinuxGSM-Support)**. +Issues raised here are **ONLY** for: +* LinuxGSM bugs. +* Feature suggestions. +* Code contributions. -Issues here are **ONLY** for: -* LinuxGSM bugs -* feature suggestions -* code contributions +Issues raised here are **NOT** for: +* General support. +* Specific game server issues (e.g CS:GO, TF2). +* Dedicated server issues (e.g Ubuntu, CentOS). +* Anything not directly related to LinuxGSM development. -Issues here are **NOT** for: -* General support -* Specific game server issues (e.g CS:GO, TF2) -* Dedicated server issues (e.g Ubuntu, CentOS) -* Anything not directly related to LinuxGSM development +For general support visit the **[LinuxGSM-Support](https://linuxgsm.com/support)**. -Any general support issues on GitHub will be migrated to [LinuxGSM-Support](https://github.com/GameServerManagers/LinuxGSM-Support). - -*Please use the template below* +***Please use the template below, deleting the above text*** ## User Story @@ -27,9 +24,10 @@ As a [user description], I want [desired action] so that [desired outcome]. ## Basic info -* Distro: [Ubuntu 18.04] -* Game: [Garry's Mod] -* Command: [Monitor] +* **Distro:** [Ubuntu 18.04] +* **Game:** [Garry's Mod] +* **Command:** [Monitor] +* **LinuxGSM version:** [v12.34.56] ## Further Information diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 0f2ccde58..68bdf0ad6 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -3,23 +3,21 @@ name: Feature request about: Suggest an idea for this project --- -Follow **[this guide](https://linuxgsm.com/support/#guide)** to make sure you post the correct info. -For general support visit the **[LinuxGSM-Support](https://github.com/GameServerManagers/LinuxGSM-Support)**. -Issues here are **ONLY** for: -* LinuxGSM bugs -* feature suggestions -* code contributions +Issues raised here are **ONLY** for: +* LinuxGSM bugs. +* Feature suggestions. +* Code contributions. -Issues here are **NOT** for: -* General support -* Specific game server issues (e.g CS:GO, TF2) -* Dedicated server issues (e.g Ubuntu, CentOS) -* Anything not directly related to LinuxGSM development +Issues raised here are **NOT** for: +* General support. +* Specific game server issues (e.g CS:GO, TF2). +* Dedicated server issues (e.g Ubuntu, CentOS). +* Anything not directly related to LinuxGSM development. -Any general support issues on GitHub will be migrated to [LinuxGSM-Support](https://github.com/GameServerManagers/LinuxGSM-Support). +For general support visit the **[LinuxGSM Support](https://linuxgsm.com/support)** page. -*Please use the template below* +***Please use the template below, deleting the above text*** ## User Story @@ -27,9 +25,10 @@ As a [user description], I want [desired action] so that [desired outcome]. ## Basic info -* Distro: [Ubuntu 18.04] -* Game: [Garry's Mod] -* Command: [Monitor] +* **Distro:** [Ubuntu 18.04] +* **Game:** [Garry's Mod] +* **Command:** [Monitor] +* **LinuxGSM version:** [v12.34.56] ## Further Information diff --git a/.github/ISSUE_TEMPLATE/new-server-request.md b/.github/ISSUE_TEMPLATE/new-server-request.md index adb1f5f4f..8101f74f0 100644 --- a/.github/ISSUE_TEMPLATE/new-server-request.md +++ b/.github/ISSUE_TEMPLATE/new-server-request.md @@ -23,7 +23,7 @@ If yes Use SteamDB to get the appid. (https://steamdb.info). ## Is the server supported on Linux? -We only support Linux servers and do not support Wine. +We only support Linux servers and do **not** support Wine. * [ ] Yes * [ ] No diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index a04f0dc68..807f3d8bb 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,6 +1,6 @@ # Description -Please include a summary of the change and which issues is fixed +Please include a summary of the change and which issues are fixed. Fixes #[issue] @@ -18,6 +18,7 @@ PR will not be merged until all steps are complete. * [ ] This pull request links to an issue. * [ ] This pull request uses the `develop` branch as its base. +* [ ] This pull request Subject follows the Conventinal Commits standard. * [ ] This code follows the style guidelines of this project. * [ ] I have performed a self-review of my own code. * [ ] I have checked that this code is commented where required. diff --git a/.travis.yml b/.travis.yml index 5606c8e6a..bb94b8033 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: node_js -dist: xenial +dist: bionic node_js: - 10 @@ -43,5 +43,7 @@ jobs: script: bash tests/tests_mcserver.sh - # stage name not required script: bash tests/tests_ts3server.sh + - # stage name not required + script: bash tests/tests_defaultcfg/tests_defaultcfg.sh - # retired as codacy does this check. # script: bash tests/tests_shellcheck.sh diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 33650771e..2cadd7e54 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,36 +1,213 @@ -# How to contribute to LinuxGSM +# Contributing to LinuxGSM -We are really glad you're reading this, because if you are then you have shown an interest in helping make LinuxGSM great. +๐Ÿ‘๐ŸŽ‰ Thank you for taking the time to contribute! ๐ŸŽ‰๐Ÿ‘ -If you haven't already, come find us on [Discord](https://linuxgsm.com/discord). From there you will have contact with other contributers of the project. We want you working on things you're excited about. +The following is a set of guidelines for contributing to LinuxGSM, which are hosted in the [GameServerManagers Organization](https://github.com/gameservermanagers) on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request. -Before working on a project we recommend that you create a issue in regards to the issue/feature. This will prevent duplicates while you work on the feature. If an issue already exists, make note that you are working on it so nobody else wastes their time working on the same project at the same time! +## Table of Contents +* [Contributing to LinuxGSM](#contributing-to-linuxgsm) + * [Table of Contents](#table-of-contents) + * [Code of Conduct](#code-of-conduct) + * [Bug/Enhancement Contributions](#---bug-enhancement-contributions---) + * [Reporting Bugs](#--reporting-bugs) + * [Before Submitting A Bug Report](#before-submitting-a-bug-report) + * [How Do I Submit A (Good) Bug Report?](#how-do-i-submit-a--good--bug-report-) + * [Suggesting Features](#--suggesting-features) + * [Before Submitting An Feature Suggestion](#before-submitting-an-feature-suggestion) + * [How Do I Submit A (Good) Feature Suggestion?](#how-do-i-submit-a--good--feature-suggestion-) + * [Game Server Requests](#---game-server-requests) + * [Before Submitting a Game Server Request](#before-submitting-a-game-server-request) + * [How Do I Submit A (Good) Game Server Suggestion?](#how-do-i-submit-a--good--feature-suggestion--1) + * [Game Server Specific Issues](#---game-server-specific-issues) + * [Code Contributions](#---code-contributions) + * [Pull Requests](#pull-requests) + * [Pull Request naming convention](#pull-request-naming-convention) + * [Testing](#testing) + * [Pull Request Status Checks](#pull-request-status-checks) + * [Test Environment](#test-environment) + * [Styleguides](#-wine-glass--styleguides) + * [Git Commit Messages](#git-commit-messages) + * [BASH Styleguide](#bash-styleguide) + * [Document Contributions](#-blue-book--document-contributions) + * [Documentation Styleguide](#documentation-styleguide) + * [Issue and Pull Request Labels](#issue-and-pull-request-labels) +## Code of Conduct -Here are some important resources: +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). - * [Issues Page](https://github.com/GameServerManagers/LinuxGSM/issues) provides a list of areas that could use some work, - * [Developer Wiki](https://github.com/GameServerManagers/LinuxGSM/wiki) gives a detailed guide on developing LGSM, +## ๐ŸŽ‰ Bug/Enhancement Contributions ๐Ÿ› -## Testing +### ๐Ÿ›Reporting Bugs -Please make sure all the code you write is working properly **before** you create a pull request. Information on debugging can be found in the following document: +This section guides you through submitting a bug report for LinuxGSM. Following these guidelines help maintainers and the community understand your report ๐Ÿ“, reproduce the behaviour๐Ÿ’ป, and find any related reports ๐Ÿ”Ž. -[Developer Commands](https://github.com/GameServerManagers/LinuxGSM/wiki/Developer-Commands) +Before creating bug reports, please check [this list](https://github.com/GameServerManagers/linuxgsm/blob/master/CONTRIBUTING.md#before-submitting-a-bug-report) as you might find out that you donโ€™t need to create one. When you are creating a bug report, please [include as many details as possible](https://github.com/atom/atom/blob/master/CONTRIBUTING.md#how-do-i-submit-a-good-bug-report). Fill out [the required template](https://github.com/atom/.github/blob/master/.github/ISSUE_TEMPLATE/bug_report.md), the information it asks for helps us resolve issues faster. -## Submitting changes +#### Before Submitting A Bug Report -Please send a [GitHub Pull Request to LinuxGSM](https://github.com/GameServerManagers/LinuxGSM/pull/new/develop) with a clear list of what you've done (read more about [pull requests](https://help.github.com/articles/about-pull-requests)). Please follow our coding conventions (below) and make sure all of your commits are atomic (one feature per commit). +* **Check the** [**documentation**](https://docs.linuxgsm.com/%5D(https://docs.linuxgsm.com/))**.** You might be able to find the cause of the problem and fix things yourself. +* **Check that the problem is not related to** [**support page**](https://linuxgsm/com/support) for links to other support options. +* **Check the** [**support page**](https://linuxgsm/com/support) for links to other support options. +* **Perform a** [**cursory search**](https://github.com/search?q=org:GameServerManagers%20type:issues&type=Issues) to see if the problem has already been reported. If it has **and the issue is still open**, add a comment to the existing issue and give it a thumbs up instead of opening a new one. -Always write a clear log message for your commits. One-line messages are fine for small changes, but bigger changes should look like this: +#### How Do I Submit A (Good) Bug Report? - $ git commit -m "A brief summary of the commit - > - > A paragraph describing what changed and its impact." -This will help us in understanding your code and determining where problems may arise. +Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/). Create an issue and provide the following information by filling in [the issues form](https://github.com/GameServerManagers/LinuxGSM/issues/new/choose). -## Coding conventions +* **Use a clear and descriptive title** for the issue to identify the problem. +* **Complete the user story** to give a summary of the issue. +* **Provide basic info** to help us understand the context of the issue. +* **Provide further info** to give specifics and more detail. +* **Give steps to reproduce** the issue, allowing developers to follow steps that lead to the issue. +* **Explain what you expect** to happen, so we know what you think should occur. -Start reading our code and you'll get the hang of it. Explore how functions are organized and you'll see how we strive for readable code. +### ๐ŸŽ‰Suggesting Features -Please give the following document a read and adjust your code according to its specifications. -[Syntax & Coding Conventions](https://github.com/GameServerManagers/LinuxGSM/wiki/Syntax-and-Conventions) +This section guides you through submitting a feature suggestion for LinuxGSM, including completely new features and minor improvements to existing functionality. Following these guidelines help maintainers and the community understand your suggestion ๐Ÿ“ and find related suggestions ๐Ÿ”Ž. + +#### Before Submitting An Feature Suggestion + +* **Check the** [**documentation**](https://docs.linuxgsm.com/%5D(https://docs.linuxgsm.com/)) to confirm that the enhancement doesnโ€™t already exist. +* **Check your** [**LinuxGSM version**](https://docs.linuxgsm.com/commands/update-lgsm)**.** A newer version of LinuxGSM may already have your enhancement. +* **Perform a** [**cursory search**](https://github.com/search?q=org:GameServerManagers%20type:issues&type=Issues) to see if the enhancement has already been suggested. If it has **and the enhancement is still open**, add a comment to the existing issue and give it a thumbs up instead of opening a new one. + +#### How Do I Submit A (Good) Feature Suggestion? + +Features are tracked as [GitHub issues](https://guides.github.com/features/issues/). Create an issue and provide the following information by filling in [the issues form](https://github.com/GameServerManagers/LinuxGSM/issues/new/choose). + +* **Use a clear and descriptive title** for the issue to identify the problem. +* **Complete the user story** to give a summary of the issue. +* **Provide basic info** to help us understand the context of the enhancement. +* **Provide further info** to give specifics and more detail. +* **Provide any further reading** materials that might assist in developing the enhancement. + +### ๐ŸŽฎ Game Server Requests + +This section guides you through submitting a game server request for LinuxGSM, Following these guidelines help maintainers and the community understand your game server request ๐Ÿ“ + +#### Before Submitting a Game Server Request + +* **Check for existing** [**game server requests**](https://github.com/GameServerManagers/LinuxGSM/labels/type%3A%20game%20server%20request) to see if the new game server has already been suggested. If it has **and if the new game server is still open**, give it a thumbs up instead of opening a new one. + +### ๐ŸŽฎ Game Server Specific Issues + +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 issues directly relating to the game servers themselves. The same also applies for 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 might 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). + +## ๐Ÿ’ป Code Contributions + +### Pull Requests + +The process described here has several goals: + +* Maintain LinuxGSM quality. +* Fix problems that are important to users. +* Engage the community in working toward the best possible LinuxGSM. +* Enable a sustainable system for LinuxGSM maintainers to review contributions. + +Please follow these steps to have your contribution considered by the maintainers: + +1. Follow all instructions in [the template](https://github.com/GameServerManagers/LinuxGSM/blob/master/.github/pull_request_template.md) +2. Follow the [style guides](#styleguides) +3. After you submit your pull request, verify that all [status checks](https://help.github.com/articles/about-status-checks/) are passing + +What if the status checks are failing? If a status check is failing, and you believe that the failure is unrelated to your change, please leave a comment on the pull request explaining why you believe the failure is unrelated. A maintainer will re-run the status check for you. If we conclude that the failure was a false positive, then we will open an issue to track that problem with our status check suite. + +While the prerequisites above must be satisfied before having your pull request reviewed, the reviewer(s) may ask you to complete additional design work, tests, or other changes before your pull request can be ultimately accepted. + +#### Pull Request naming convention + +When naming a pull request to ensure that it is following [Conventional Commits](https://www.conventionalcommits.org/) standards; as your pull request commits will be squashed, with the PR subject becoming the commit that is used for generating the [changelog](https://github.com/GameServerManagers/LinuxGSM/releases) for the next release. + +The pull request subject line should always be able to complete the following sentence: + +If applied, this commit will _your subject line here_ + +For example: + +* If applied, this commit will _refactor subsystem X for readability_ +* If applied, this commit will _update getting started documentation_ +* If applied, this commit will _remove deprecated methods_ +* If applied, this commit will _release version 1.0.0_ +* If applied, this commit will _merge pull request #123 from user/branch_ + +Notice how this doesnโ€™t work for the other non-imperative forms: + +* If applied, this commit will _fixed bug with Y_ +* If applied, this commit will _change the behaviour of X_ +* If applied, this commit will _more fixes for broken stuff_ +* If applied, this commit will _sweet new API methods_ + +Below is an example of the subject line for a pull request. + +feat(alerts): add slack support to alerts + +fix(csgoserver): remove SteamCMD auth requirement 32-bit workaround + +### 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. + +#### Test Environment +It is recommended that you have a testing environment available to test your code during development. To test your own cod you must change some variables within the `linuxgsm.sh` file. This will force the use of your own code branch. +```bash +## GitHub Branch Select +# Allows for the use of different function files +# from a different repo and/or branch. +githubuser="GameServerManagers" +githubrepo="LinuxGSM" +githubbranch="master" +``` + +### :wine_glass: Styleguides + +#### Git Commit Messages + +LinuxGSM uses the Conventional commits standard to allow other developers to get easy to understand, descriptive commit messages as you develop. While it is recommended that you use this standard for your commits, as your commits will eventually be squashed when your PR is merged following this standard is not strictly enforced for commits, however, it is recommended for more complex commits. + +#### BASH Styleguide + +LinuxGSM uses [ShellCheck](https://www.shellcheck.net/) to follow BASH best practices. It is recommended that you make use of linter tools for your text editor such as [linter-shellcheck](https://atom.io/packages/linter-shellcheck). LinuxGSM uses [Codacy](https://app.codacy.com/manual/GameServerManagers/LinuxGSM/dashboard) to analyse any Pull Requests to give you feedback on code standards. + +LinuxGSM also has some of its style standards that should be followed. These are available in the [dev docs](https://dev-docs.linuxgsm.com/) + +## :blue_book: Document Contributions + +As well as code contributions it is possible to contribute by writing and improving documentation. Documents contributions can be submitted similarly by submitting a Pull Request. + +### Documentation Styleguide + +LinuxGSM has various documentation available to assist users and developers. LinuxGSM primarily uses [GitBook](http://gitbook.com/) which uses the [Markdown](https://www.markdownguide.org/) document standard. LinuxGSM uses [Codacy](https://app.codacy.com/manual/GameServerManagers/LinuxGSM/dashboard) to analyse any Pull Requests to give you feedback on markup standards. + +## Issue and Pull Request Labels + +This section lists the labels we use to help us track and manage issues and pull requests. + +[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. + +**info** Labels +Labels to help pinpoint what the issue or PR relates too. + +variants: +* _distro_ +* _engine_ +* _game_ +* _info_ + +**outcome** Labels +Labels that identify why an issue was closed. + +**status** Labels +Labels to update people on the status of the issue. + +**type** Labels +Labels identifying the type of issue, such as a bug, feature, refactor etc. diff --git a/README.md b/README.md index 73d811da3..6c32bab75 100644 --- a/README.md +++ b/README.md @@ -5,15 +5,15 @@ [![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://api.codacy.com/project/badge/Grade/3e98be27840043a090c3ab6e35db44b0)](https://app.codacy.com/app/GameServerManagers/LinuxGSM?utm_source=github.com&utm_medium=referral&utm_content=GameServerManagers/LinuxGSM&utm_campaign=Badge_Grade_Dashboard) [![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/) [![All Contributors](https://img.shields.io/badge/all_contributors-9-orange.svg?style=flat-square)](#contributors) -[LinuxGSM](https://linuxgsm.com) is the command line tool for quick, simple deployment and management of dedicated game servers. +[LinuxGSM](https://linuxgsm.com) is the command-line tool for quick, simple deployment and management of Linux dedicated game servers. ## Hassle-Free Dedicated Game Servers -Traditionally game servers are not easy to manage yourself. Admins often have to spend hours just messing around trying to get their server working. LinuxGSM is designed to be as simple as possible allowing admins to spend less time on management and more time gaming. +Traditionally game servers are not easy to manage yourself. Admins often have to spend hours messing around trying to get their server working. LinuxGSM is a command-line tool designed to be as simple as possible, allowing admins to spend less time on management and more time gaming. ## Main features -80+ game servers supported +100+ game servers supported * :truck: Installer * :mag: Monitor @@ -25,23 +25,21 @@ Traditionally game servers are not easy to manage yourself. Admins often have to ## :penguin: Compatibility -Linux Game Server Managers are tested to work on the following Linux distros. +LinuxGSM will run on popular distros as long as the minimum requirements are met. -* Debian based (Ubuntu, Mint etc.) -* Red Hat based (CentOS, Fedora etc.) +* Ubuntu +* Debian +* CentOS Other distros are likely to work but are not fully tested. ## :wrench: Requirements -Each game server has its own specific dependency requirements, but most require GLIBC and Tmux. Visit the specific game server installation page on the [LinuxGSM](https://linuxgsm.com) website to see dependencies. - -* [GLIBC](https://docs.linuxgsm.com/requirements/glibc) >= 2.15 recommended [[specific requirements]](https://docs.linuxgsm.com/requirements/glibc#server-requirements) -* [Tmux](https://docs.linuxgsm.com/requirements/tmux) >= 1.6 recommended (Avoid Tmux 1.8) +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. ## :blue_book: Documentation -Documentation is found at [linuxgsm.com](https://linuxgsm.com) and [docs.linuxgsm.com](https://docs.linuxgsm.com) +Documentation is found at [linuxgsm.com](https://linuxgsm.com) and [docs.linuxgsm.com](https://docs.linuxgsm.com). ## :question: Support @@ -49,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 [PayPal](https://www.paypal.me/dgibbs64), [Patreon](https://www.patreon.com/dgibbs) and [Flattr](https://flattr.com/@dgibbs). I would like to thank everyone who has previously sent a donation. LinuxGSM has been going since 2012 and I have spent 1000s of hours developing and improving the project and continue to regularly add support for new servers. +If you would like to [donate](https://linuxgsm.com/donate) to the project there are several ways you can, via [Patreon](https://www.patreon.com/dgibbs), [Ko-Fi](https://ko-fi.com/dgibbs) 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 diff --git a/lgsm/config-default/config-lgsm/ahl2server/_default.cfg b/lgsm/config-default/config-lgsm/ahl2server/_default.cfg index f819cf468..9db6afe4a 100644 --- a/lgsm/config-default/config-lgsm/ahl2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ahl2server/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## SteamCMD Login | https://docs.linuxgsm.com/steamcmd#steamcmd-login steamuser="username" @@ -27,6 +27,12 @@ parms="-game ahl2 -strictportbind -ip ${ip} -port ${port} +clientport ${clientpo #### 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) @@ -42,10 +48,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -72,6 +74,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -97,15 +103,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -118,7 +124,16 @@ sleeptime="0.5" # 10: Teamspeak 3 stopmode="3" -## SteamCMD Settings +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="985050" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -126,7 +141,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -## LinuxGSM Server Details +## Game Server Details # Do not edit gamename="Action: Source" engine="source" @@ -135,11 +150,11 @@ glibc="2.15" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/ahl2" executabledir="${serverfiles}" executable="./srcds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -152,11 +167,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/ahlserver/_default.cfg b/lgsm/config-default/config-lgsm/ahlserver/_default.cfg index 513db4374..b9d5e36b5 100644 --- a/lgsm/config-default/config-lgsm/ahlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ahlserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -22,6 +22,12 @@ parms="-game action -strictportbind +ip ${ip} -port ${port} +clientport ${client #### 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) @@ -37,10 +43,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -67,6 +69,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -92,15 +98,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" appidmod="cstrike" @@ -109,7 +115,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -122,7 +128,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="9" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Action half-life" engine="goldsource" @@ -131,11 +146,11 @@ glibc="2.3.4" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/action" executabledir="${serverfiles}" executable="./hlds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -148,11 +163,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/arkserver/_default.cfg b/lgsm/config-default/config-lgsm/arkserver/_default.cfg index 94bdaebc1..8aace7519 100644 --- a/lgsm/config-default/config-lgsm/arkserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/arkserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -24,6 +24,12 @@ parms="\"${defaultmap}?AltSaveDirectoryName=${defaultmap}?listen?MultiHome=${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) @@ -39,10 +45,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -69,6 +71,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -94,15 +100,15 @@ logdays="7" # Query delay time querydelay="5" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="376030" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -110,7 +116,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -123,7 +129,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="ARK: Survival Evolved" engine="unreal4" @@ -132,13 +147,13 @@ glibc="2.15" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/ShooterGame" executabledir="${systemdir}/Binaries/Linux" executable="./ShooterGameServer" -servercfgdir="${systemdir}/Saved/Config/LinuxServer" servercfg="GameUserSettings.ini" servercfgdefault="GameUserSettings.ini" +servercfgdir="${systemdir}/Saved/Config/LinuxServer" servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory @@ -149,11 +164,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/Saved/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/arma3server/_default.cfg b/lgsm/config-default/config-lgsm/arma3server/_default.cfg index c01336adf..b8e8b3db7 100644 --- a/lgsm/config-default/config-lgsm/arma3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/arma3server/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## SteamCMD Login | https://docs.linuxgsm.com/steamcmd#steamcmd-login steamuser="username" @@ -38,6 +38,12 @@ parms="-ip=${ip} -port=${port} -cfg=${networkcfgfullpath} -config=${servercfgful #### 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) @@ -53,10 +59,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -83,6 +85,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -108,15 +114,15 @@ logdays="7" # Query delay time querydelay="5" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="233780" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -124,7 +130,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -137,7 +143,16 @@ steammaster="false" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="ARMA 3" engine="realvirtuality" @@ -146,12 +161,12 @@ glibc="2.13" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}" executable="./arma3server" -servercfg="${servicename}.server.cfg" -networkcfg="${servicename}.network.cfg" +servercfg="${selfname}.server.cfg" +networkcfg="${selfname}.network.cfg" servercfgdefault="server.cfg" networkcfgdefault="network.cfg" servercfgdir="${systemdir}/cfg" @@ -165,11 +180,11 @@ backupdir="${lgsmdir}/backup" logdir="${rootdir}/log" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/bb2server/_default.cfg b/lgsm/config-default/config-lgsm/bb2server/_default.cfg index f2a4f4f4e..044dd18a3 100644 --- a/lgsm/config-default/config-lgsm/bb2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bb2server/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -16,9 +16,9 @@ sourcetvport="27020" defaultmap="bba_barracks" maxplayers="20" -## Optional: Game Server Login Token +## Game Server Login Token (GSLT): Optional # GSLT can be used for running a public server. -# More info: https://linuxgsm.com/gslt +# More info: https://docs.linuxgsm.com/steamcmd/gslt gslt="" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters @@ -28,6 +28,12 @@ parms="-game brainbread2 -strictportbind -ip ${ip} -port ${port} +clientport ${c #### 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) @@ -43,10 +49,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -73,6 +75,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -98,15 +104,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="475370" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -114,7 +120,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -127,7 +133,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="BrainBread 2" engine="source" @@ -136,11 +151,11 @@ glibc="2.17" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/brainbread2" executabledir="${serverfiles}" executable="./srcds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -153,11 +168,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/bbserver/_default.cfg b/lgsm/config-default/config-lgsm/bbserver/_default.cfg index 6a91321e4..a263486d4 100644 --- a/lgsm/config-default/config-lgsm/bbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bbserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -22,6 +22,12 @@ parms="-game brainbread -strictportbind +ip ${ip} -port ${port} +clientport ${cl #### 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) @@ -37,10 +43,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -67,6 +69,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -92,15 +98,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" appidmod="cstrike" @@ -109,7 +115,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -122,7 +128,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="9" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="BrainBread" engine="goldsource" @@ -131,11 +146,11 @@ glibc="2.3.4" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/brainbread" executabledir="${serverfiles}" executable="./hlds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -148,11 +163,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/bdserver/_default.cfg b/lgsm/config-default/config-lgsm/bdserver/_default.cfg index abc3c9286..a57e41c12 100644 --- a/lgsm/config-default/config-lgsm/bdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bdserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -22,6 +22,12 @@ parms="-game bdef -strictportbind +ip ${ip} -port ${port} +clientport ${clientpo #### 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) @@ -37,10 +43,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -67,6 +69,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -92,15 +98,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="817300" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -108,7 +114,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -121,7 +127,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="9" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Base Defense" engine="goldsource" @@ -130,11 +145,11 @@ glibc="2.14" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/bdef" executabledir="${serverfiles}" executable="./hlds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -147,11 +162,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/bf1942server/_default.cfg b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg index ca193f795..cd77130db 100644 --- a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ @@ -15,6 +15,12 @@ parms="+hostServer 1 +dedicated 1" #### 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) @@ -30,10 +36,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -60,6 +62,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -85,15 +91,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -106,7 +112,16 @@ sleeptime="0.5" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Battlefield: 1942" engine="refractor" @@ -115,7 +130,7 @@ glibc="2.0" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${systemdir}" executable="./start.sh" @@ -132,11 +147,11 @@ logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/bmdmserver/_default.cfg b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg index 42b918a55..5b947486b 100644 --- a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -16,9 +16,9 @@ sourcetvport="27020" defaultmap="dm_bounce" maxplayers="16" -## Optional: Game Server Login Token +## Game Server Login Token (GSLT): Optional # GSLT can be used for running a public server. -# More info: https://linuxgsm.com/gslt +# More info: https://docs.linuxgsm.com/steamcmd/gslt gslt="" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters @@ -28,6 +28,12 @@ parms="-game bms -strictportbind -ip ${ip} -port ${port} +clientport ${clientpor #### 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) @@ -43,10 +49,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -73,6 +75,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -98,15 +104,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="346680" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -114,7 +120,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -127,7 +133,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Black Mesa: Deathmatch" engine="source" @@ -136,11 +151,11 @@ glibc="2.15" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/bms" executabledir="${serverfiles}" executable="./srcds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -153,11 +168,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/boserver/_default.cfg b/lgsm/config-default/config-lgsm/boserver/_default.cfg index 0395820bd..da2b4163a 100644 --- a/lgsm/config-default/config-lgsm/boserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/boserver/_default.cfg @@ -1,16 +1,16 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### -## Optional: Game Server Login Token +## Game Server Login Token (GSLT): Optional # GSLT can be used for running a public server. -# More info: https://linuxgsm.com/gslt +# More info: https://docs.linuxgsm.com/steamcmd/gslt gslt="" ip="" @@ -21,6 +21,12 @@ parms="-batchmode -nographics -dedicated -configfile=${servercfgfullpath}" #### LinuxGSM Settings #### +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + ## Notification Alerts # (on|off) @@ -36,10 +42,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -66,6 +68,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -91,15 +97,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="416880" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -107,7 +113,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -120,7 +126,16 @@ steammaster="false" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Ballistic Overkill" engine="unity3d" @@ -129,11 +144,11 @@ glibc="2.15" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}" executable="./BODS.x86" -servercfg="${servicename}.txt" +servercfg="${selfname}.txt" servercfgdefault="config.txt" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -146,11 +161,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/bsserver/_default.cfg b/lgsm/config-default/config-lgsm/bsserver/_default.cfg index 21dc7a0af..6685734d9 100644 --- a/lgsm/config-default/config-lgsm/bsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bsserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## SteamCMD Login | https://docs.linuxgsm.com/steamcmd#steamcmd-login steamuser="username" @@ -20,9 +20,9 @@ sourcetvport="27020" defaultmap="duel_winter" maxplayers="16" -## Required: Game Server Login Token +## Game Server Login Token (GSLT): Required # GSLT is required for running a public server. -# More info: https://linuxgsm.com/gslt +# More info: https://docs.linuxgsm.com/steamcmd/gslt gslt="" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters @@ -32,6 +32,12 @@ parms="-game "${serverfiles}/berimbau" -autoupdate -strictportbind -ip ${ip} -po #### 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) @@ -47,10 +53,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -77,6 +79,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -102,15 +108,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="228780" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -118,7 +124,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -131,7 +137,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Blade Symphony" engine="source" @@ -140,11 +155,11 @@ glibc="2.15" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/berimbau" executabledir="${serverfiles}/bin" executable="./srcds_run.sh" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -157,11 +172,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/bt1944server/_default.cfg b/lgsm/config-default/config-lgsm/bt1944server/_default.cfg index 6116933ee..3565e3670 100644 --- a/lgsm/config-default/config-lgsm/bt1944server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bt1944server/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -20,6 +20,12 @@ parms="/Game/Maps/Final_Maps/Derailed?Game=/Script/ShooterGame.WartideGameMode?l #### 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) @@ -35,10 +41,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -65,6 +67,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -90,15 +96,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="805140" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -106,7 +112,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -119,7 +125,16 @@ steammaster="false" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Battalion 1944" engine="unreal4" @@ -128,13 +143,13 @@ glibc="2.17" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/Linux/Battalion" executabledir="${systemdir}/Binaries/Linux" executable="./BattalionServer" -servercfgdir="${systemdir}/Saved/Config/LinuxServer" -servercfg="${servicename}.ini" +servercfg="${selfname}.ini" servercfgdefault="DefaultGame.ini" +servercfgdir="${systemdir}/Saved/Config/LinuxServer" servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory @@ -145,11 +160,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/Saved/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/btserver/_default.cfg b/lgsm/config-default/config-lgsm/btserver/_default.cfg index d70f24eab..7825610a9 100644 --- a/lgsm/config-default/config-lgsm/btserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/btserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ @@ -15,6 +15,12 @@ parms="" #### 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) @@ -30,10 +36,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -60,6 +62,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -85,15 +91,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="1026340" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -101,7 +107,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -114,7 +120,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="7" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Barotrauma" engine="barotrauma" @@ -123,7 +138,7 @@ glibc="2.17" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${systemdir}" executable="./DedicatedServer.exe" @@ -140,11 +155,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/ServerLogs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/ccserver/_default.cfg b/lgsm/config-default/config-lgsm/ccserver/_default.cfg index 4a58debe3..e6feab660 100644 --- a/lgsm/config-default/config-lgsm/ccserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ccserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -23,6 +23,12 @@ parms="-game cure -strictportbind -ip ${ip} -port ${port} +clientport ${clientpo #### 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) @@ -38,10 +44,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -68,6 +70,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -93,15 +99,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="383410" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -109,7 +115,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -122,7 +128,16 @@ steammaster="false" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Codename CURE" engine="source" @@ -131,11 +146,11 @@ glibc="2.15" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/cure" executabledir="${serverfiles}" executable="./srcds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -148,11 +163,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/cod2server/_default.cfg b/lgsm/config-default/config-lgsm/cod2server/_default.cfg index c13d4773e..61e2962c3 100644 --- a/lgsm/config-default/config-lgsm/cod2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod2server/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -21,6 +21,12 @@ parms="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +se #### 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) @@ -36,10 +42,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -66,6 +68,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -88,15 +94,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -109,7 +115,16 @@ sleeptime="0.5" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-quake3" + +## Game Server Details # Do not edit gamename="Call of Duty 2" engine="iw2.0" @@ -118,11 +133,11 @@ glibc="2.1.3" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}" executable="./cod2_lnxded" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/main" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -135,11 +150,11 @@ logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/cod4server/_default.cfg b/lgsm/config-default/config-lgsm/cod4server/_default.cfg index 4fbb9abfc..ebf573ac3 100644 --- a/lgsm/config-default/config-lgsm/cod4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod4server/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -21,6 +21,12 @@ parms="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set fs_homepath ${s #### 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) @@ -36,10 +42,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -66,6 +68,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -88,15 +94,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -109,7 +115,16 @@ sleeptime="0.5" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-quake3" + +## Game Server Details # Do not edit gamename="Call of Duty 4" engine="iw3.0" @@ -118,11 +133,11 @@ glibc="2.12" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}" executable="./cod4x18_dedrun" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/main" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -135,11 +150,11 @@ logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/codserver/_default.cfg b/lgsm/config-default/config-lgsm/codserver/_default.cfg index 3c858e74c..bd783d62c 100644 --- a/lgsm/config-default/config-lgsm/codserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -21,6 +21,12 @@ parms="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +se #### 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) @@ -36,10 +42,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -66,6 +68,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -88,15 +94,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -109,7 +115,16 @@ sleeptime="0.5" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-quake3" + +## Game Server Details # Do not edit gamename="Call of Duty" engine="idtech3" @@ -118,11 +133,11 @@ glibc="2.1" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}" executable="./cod_lnxded" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/main" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -135,11 +150,11 @@ logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/coduoserver/_default.cfg b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg index 64c3635f6..a187cfc99 100644 --- a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -21,6 +21,12 @@ parms="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +se #### 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) @@ -36,10 +42,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -66,6 +68,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -88,15 +94,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -109,7 +115,16 @@ sleeptime="0.5" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-quake3" + +## Game Server Details # Do not edit gamename="Call of Duty: United Offensive" engine="idtech3" @@ -118,11 +133,11 @@ glibc="2.1" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}" executable="./coduo_lnxded" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/uo" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -135,11 +150,11 @@ logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/codwawserver/_default.cfg b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg index 2d0381c00..ba9163205 100644 --- a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -21,6 +21,12 @@ parms="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +se #### 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) @@ -36,10 +42,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -66,6 +68,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -88,15 +94,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -109,7 +115,16 @@ sleeptime="0.5" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-quake3" + +## Game Server Details # Do not edit gamename="Call of Duty: World at War" engine="iw3.0" @@ -118,11 +133,11 @@ glibc="2.3.2" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}" executable="./codwaw_lnxded" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/main" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -135,11 +150,11 @@ logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/csczserver/_default.cfg b/lgsm/config-default/config-lgsm/csczserver/_default.cfg index a74e7d1cb..918d78841 100644 --- a/lgsm/config-default/config-lgsm/csczserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csczserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -22,6 +22,12 @@ parms="-game czero -strictportbind +ip ${ip} -port ${port} +clientport ${clientp #### 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) @@ -37,10 +43,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -67,6 +69,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -92,15 +98,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" appidmod="czero" @@ -109,7 +115,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -122,7 +128,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="9" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Counter-Strike: Condition Zero" engine="goldsource" @@ -131,11 +146,11 @@ glibc="2.3.6" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/czero" executabledir="${serverfiles}" executable="./hlds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -148,11 +163,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/csgoserver/_default.cfg b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg index b480dc7d7..15f45808b 100644 --- a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg @@ -1,15 +1,15 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters -# https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Dedicated_Servers#Starting_the_Server +# https://docs.linuxgsm.com/game-servers/counter-strike-global-offensive # [Game Modes] gametype gamemode mapgroup (you can mix these across all Game Modes except Danger Zone, but use only one) # Arms Race 1 0 mg_armsrace # Classic Casual 0 0 mg_casualsigma, mg_casualdelta @@ -30,9 +30,9 @@ defaultmap="de_mirage" maxplayers="16" tickrate="64" -## Required: Game Server Login Token +## Game Server Login Token (GSLT): Required # GSLT is required for running a public server. -# More info: https://linuxgsm.com/gslt +# More info: https://docs.linuxgsm.com/steamcmd/gslt gslt="" ## Workshop Parameters | https://developer.valvesoftware.com/wiki/CSGO_Workshop_For_Server_Operators @@ -48,6 +48,12 @@ parms="-game csgo -usercon -strictportbind -ip ${ip} -port ${port} +clientport $ #### 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) @@ -63,10 +69,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -93,6 +95,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -118,15 +124,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="740" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -134,7 +140,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -147,7 +153,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Counter-Strike: Global Offensive" engine="source" @@ -156,11 +171,11 @@ glibc="2.15" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/csgo" executabledir="${serverfiles}" executable="./srcds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -173,11 +188,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/csserver/_default.cfg b/lgsm/config-default/config-lgsm/csserver/_default.cfg index 92a54e7dd..1c58f0256 100644 --- a/lgsm/config-default/config-lgsm/csserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -22,6 +22,12 @@ parms="-game cstrike -strictportbind +ip ${ip} -port ${port} +clientport ${clien #### 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) @@ -37,10 +43,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -67,6 +69,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -92,15 +98,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" appidmod="cstrike" @@ -109,7 +115,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -122,7 +128,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="9" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Counter-Strike 1.6" engine="goldsource" @@ -131,11 +146,11 @@ glibc="2.3.6" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/cstrike" executabledir="${serverfiles}" executable="./hlds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -148,11 +163,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/cssserver/_default.cfg b/lgsm/config-default/config-lgsm/cssserver/_default.cfg index a4ab653ae..d50676ced 100644 --- a/lgsm/config-default/config-lgsm/cssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/cssserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -16,9 +16,9 @@ sourcetvport="27020" defaultmap="de_dust2" maxplayers="16" -## Required: Game Server Login Token +## Game Server Login Token (GSLT): Required # GSLT is required for running a public server. -# More info: https://linuxgsm.com/gslt +# More info: https://docs.linuxgsm.com/steamcmd/gslt gslt="" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters @@ -28,6 +28,12 @@ parms="-game cstrike -strictportbind -ip ${ip} -port ${port} +clientport ${clien #### 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) @@ -43,10 +49,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -73,6 +75,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -98,15 +104,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="232330" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -114,7 +120,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -127,7 +133,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Counter-Strike: Source" engine="source" @@ -136,11 +151,11 @@ glibc="2.3.6" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/cstrike" executabledir="${serverfiles}" executable="./srcds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -153,11 +168,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/dabserver/_default.cfg b/lgsm/config-default/config-lgsm/dabserver/_default.cfg index 0f0a75b31..03d518e06 100644 --- a/lgsm/config-default/config-lgsm/dabserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dabserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -23,6 +23,12 @@ parms="-strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_por #### 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) @@ -38,10 +44,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -68,6 +70,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -93,15 +99,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="317800" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -109,7 +115,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -122,7 +128,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Double Action: Boogaloo" engine="source" @@ -131,11 +146,11 @@ glibc="2.15" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/dab" executabledir="${serverfiles}" executable="./dabds.sh" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -148,11 +163,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/dmcserver/_default.cfg b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg index 9a12049b1..d2dcee9fa 100644 --- a/lgsm/config-default/config-lgsm/dmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -22,6 +22,12 @@ parms="-game dmc -strictportbind +ip ${ip} -port ${port} +clientport ${clientpor #### 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) @@ -37,10 +43,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -67,6 +69,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -92,15 +98,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" appidmod="dmc" @@ -109,7 +115,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -122,7 +128,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="9" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Deathmatch Classic" engine="goldsource" @@ -131,11 +146,11 @@ glibc="2.3.4" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/dmc" executabledir="${serverfiles}" executable="./hlds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -148,11 +163,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/dodserver/_default.cfg b/lgsm/config-default/config-lgsm/dodserver/_default.cfg index 646f3cd45..f23ab09b8 100644 --- a/lgsm/config-default/config-lgsm/dodserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -22,6 +22,12 @@ parms="-game dod -strictportbind +ip ${ip} -port ${port} +clientport ${clientpor #### 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) @@ -37,10 +43,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -67,6 +69,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -92,15 +98,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" appidmod="dod" @@ -109,7 +115,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -122,7 +128,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="9" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Day of Defeat" engine="goldsource" @@ -131,11 +146,11 @@ glibc="2.3.4" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/dod" executabledir="${serverfiles}" executable="./hlds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -148,11 +163,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/dodsserver/_default.cfg b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg index cc6a7b107..4e1aa6c94 100644 --- a/lgsm/config-default/config-lgsm/dodsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -23,6 +23,12 @@ parms="-game dod -strictportbind -ip ${ip} -port ${port} +clientport ${clientpor #### 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) @@ -38,10 +44,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -68,6 +70,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -93,15 +99,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="232290" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -109,7 +115,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -122,7 +128,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Day of Defeat: Source" engine="source" @@ -131,11 +146,11 @@ glibc="2.3.6" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/dod" executabledir="${serverfiles}" executable="./srcds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -148,11 +163,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/doiserver/_default.cfg b/lgsm/config-default/config-lgsm/doiserver/_default.cfg index 0023e1dc3..6dce5a140 100644 --- a/lgsm/config-default/config-lgsm/doiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/doiserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -24,6 +24,12 @@ parms="-game doi -strictportbind -ip ${ip} -port ${port} +clientport ${clientpor #### 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) @@ -39,10 +45,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -69,6 +71,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -94,15 +100,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="462310" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -110,7 +116,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -123,7 +129,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Day of Infamy" engine="source" @@ -132,11 +147,11 @@ glibc="2.15" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/doi" executabledir="${serverfiles}" executable="./srcds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -147,12 +162,13 @@ backupdir="${lgsmdir}/backup" ## Logging Directories logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/dstserver/_default.cfg b/lgsm/config-default/config-lgsm/dstserver/_default.cfg index 20f7f05c1..3073f2d79 100644 --- a/lgsm/config-default/config-lgsm/dstserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dstserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Installation Variables | https://docs.linuxgsm.com/game-servers/dont-starve-together sharding="false" @@ -26,6 +26,12 @@ parms="-persistent_storage_root ${persistentstorageroot} -conf_dir ${confdir} -c #### 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) @@ -41,10 +47,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -71,6 +73,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -96,15 +102,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="343050" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -112,7 +118,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -125,30 +131,36 @@ steammaster="false" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="1" +querytype="" + +## Game Server Details # Do not edit gamename="Don't Starve Together" engine="dontstarve" glibc="2.15" -## Service Name | https://docs.linuxgsm.com/features/multiple-game-servers -servicename="dst-server-${shard}" - #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}/bin" executable="./dontstarve_dedicated_server_nullrenderer" -clustercfg="cluster.ini" -clustercfgdir="${persistentstorageroot}/${confdir}/${cluster}" -clustercfgfullpath="${clustercfgdir}/${clustercfg}" -clustercfgdefault="cluster.ini" servercfg="server.ini" servercfgdir="${clustercfgdir}/${shard}" servercfgfullpath="${servercfgdir}/${servercfg}" servercfgdefault="server.ini" +clustercfg="cluster.ini" +clustercfgdir="${persistentstorageroot}/${confdir}/${cluster}" +clustercfgfullpath="${clustercfgdir}/${clustercfg}" +clustercfgdefault="cluster.ini" ## Backup Directory backupdir="${lgsmdir}/backup" @@ -158,11 +170,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/dysserver/_default.cfg b/lgsm/config-default/config-lgsm/dysserver/_default.cfg index 66a483d42..f368fc310 100644 --- a/lgsm/config-default/config-lgsm/dysserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dysserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -16,9 +16,9 @@ sourcetvport="27020" defaultmap="dys_broadcast" maxplayers="16" -## Optional: Game Server Login Token +## Game Server Login Token (GSLT): Optional # GSLT can be used for running a public server. -# More info: https://linuxgsm.com/gslt +# More info: https://docs.linuxgsm.com/steamcmd/gslt gslt="" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters @@ -28,6 +28,12 @@ parms="-game "${serverfiles}/dystopia" -strictportbind -ip ${ip} -port ${port} + #### 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) @@ -43,10 +49,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -73,6 +75,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -98,15 +104,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="17585" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -114,7 +120,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -127,7 +133,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Dystopia" engine="source" @@ -136,11 +151,11 @@ glibc="2.15" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/dystopia" executabledir="${serverfiles}/bin" executable="./srcds_run.sh" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -153,11 +168,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/ecoserver/_default.cfg b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg index dc1c8e9f3..c68e15df2 100644 --- a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ @@ -15,6 +15,12 @@ fn_parms(){ #### 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) @@ -30,10 +36,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -60,10 +62,18 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". +# like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need +# any custom string in curl - simple ignore this parameter. telegramalert="off" telegramtoken="accesstoken" telegramchatid="" +curlcustomstring="" ## Updating | https://docs.linuxgsm.com/commands/update updateonstart="off" @@ -81,15 +91,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="739590" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -97,7 +107,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -110,7 +120,16 @@ steammaster="false" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="1" +querytype="" + +## Game Server Details # Do not edit gamename="Eco" engine="unity3d" @@ -119,7 +138,7 @@ glibc="null" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}" executable="mono ./EcoServer.exe" @@ -136,12 +155,12 @@ logdir="${rootdir}/log" gamelogdir="${logdir}/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" -gamelogdate="${gamelogdir}/${servicename}-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" +gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/config-default/config-lgsm/emserver/_default.cfg b/lgsm/config-default/config-lgsm/emserver/_default.cfg index 50defd25e..65fe4d0dc 100644 --- a/lgsm/config-default/config-lgsm/emserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/emserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -16,9 +16,9 @@ sourcetvport="27020" defaultmap="emp_district" maxplayers="62" -## Optional: Game Server Login Token +## Game Server Login Token (GSLT): Optional # GSLT can be used for running a public server. -# More info: https://linuxgsm.com/gslt +# More info: https://docs.linuxgsm.com/steamcmd/gslt gslt="" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters @@ -28,6 +28,12 @@ parms="-game empires -strictportbind -ip ${ip} -port ${port} +clientport ${clien #### 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) @@ -43,10 +49,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -73,6 +75,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -98,15 +104,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="460040" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -114,7 +120,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -127,7 +133,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Empires Mod" engine="source" @@ -136,11 +151,11 @@ glibc="2.15" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/empires" executabledir="${serverfiles}" executable="./srcds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -153,11 +168,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/etlserver/_default.cfg b/lgsm/config-default/config-lgsm/etlserver/_default.cfg index c7e480ae2..ed4759cd2 100644 --- a/lgsm/config-default/config-lgsm/etlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/etlserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ @@ -15,6 +15,12 @@ parms="+set net_strict 1 +set fs_homepath ${serverfiles} +exec ${servercfg}" #### LinuxGSM Settings #### +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + ## Notification Alerts # (on|off) @@ -30,10 +36,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -60,6 +62,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -82,15 +88,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -103,7 +109,16 @@ sleeptime="0.5" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-quake3" + +## Game Server Details # Do not edit gamename="ET: Legacy" engine="idtech3" @@ -112,11 +127,11 @@ glibc="2.7" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${systemdir}" executable="./etlded" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/etmain" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -129,11 +144,11 @@ logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/fctrserver/_default.cfg b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg index 7173175e6..15c5bf0cf 100644 --- a/lgsm/config-default/config-lgsm/fctrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -23,6 +23,12 @@ parms="--start-server ${serverfiles}/save1.zip --server-settings ${servercfgfull #### 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) @@ -38,10 +44,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -68,6 +70,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -93,15 +99,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -114,7 +120,16 @@ sleeptime="0.5" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="1" +querytype="" + +## Game Server Details # Do not edit gamename="Factorio" engine="factorio" @@ -123,11 +138,11 @@ glibc="2.18" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}/bin/x64" executable="./factorio" -servercfg="${servicename}.json" +servercfg="${selfname}.json" servercfgdefault="server-settings.json" servercfgdir="${serverfiles}/data" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -136,14 +151,15 @@ servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${lgsmdir}/backup" ## Logging Directories +logdir="${rootdir}/log" gamelogdir="${serverfiles}" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/fofserver/_default.cfg b/lgsm/config-default/config-lgsm/fofserver/_default.cfg index 782b7f86b..b2da0ed5b 100644 --- a/lgsm/config-default/config-lgsm/fofserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/fofserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -14,7 +14,7 @@ port="27015" clientport="27005" sourcetvport="27020" defaultmap="fof_depot" -maxplayers="16" +maxplayers="20" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ @@ -23,6 +23,12 @@ parms="-game fof -strictportbind -ip ${ip} -port ${port} +clientport ${clientpor #### 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) @@ -38,10 +44,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -68,6 +70,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -93,15 +99,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="295230" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -109,7 +115,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -122,7 +128,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Fistful of Frags" engine="source" @@ -131,11 +146,11 @@ glibc="2.15" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/fof" executabledir="${serverfiles}" executable="./srcds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -148,11 +163,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/gesserver/_default.cfg b/lgsm/config-default/config-lgsm/gesserver/_default.cfg index 0a9d799b3..00ba0497f 100644 --- a/lgsm/config-default/config-lgsm/gesserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/gesserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -23,6 +23,12 @@ parms="-game gesource -strictportbind -ip ${ip} -port ${port} +clientport ${clie #### 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) @@ -38,10 +44,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -68,6 +70,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -93,15 +99,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="310" # Source 2007 SDK # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -109,7 +115,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -122,7 +128,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="GoldenEye: Source" engine="source" @@ -131,11 +146,11 @@ glibc="2.15" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/gesource" executabledir="${serverfiles}" executable="./srcds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -148,11 +163,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/gmodserver/_default.cfg b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg index bc26f69cd..d1501dc71 100644 --- a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -27,9 +27,9 @@ wscollectionid="" # Default -disableluarefresh, disables lua autorefresh reducing server lag. Auto refresh only useful for developers. customparms="-disableluarefresh" -## Optional: Game Server Login Token +## Game Server Login Token (GSLT): Optional # GSLT can be used for running a public server. -# More info: https://linuxgsm.com/gslt +# More info: https://docs.linuxgsm.com/steamcmd/gslt gslt="" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters @@ -39,6 +39,12 @@ parms="-game garrysmod -strictportbind -ip ${ip} -port ${port} -tickrate ${tickr #### 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) @@ -54,10 +60,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -84,6 +86,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -109,15 +115,15 @@ logdays="7" # Query delay time querydelay="5" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="4020" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -125,7 +131,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -138,7 +144,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Garry's Mod" engine="source" @@ -147,12 +162,12 @@ glibc="2.15" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/garrysmod" addonsdir="${systemdir}/addons" executabledir="${serverfiles}" executable="./srcds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -165,11 +180,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/hl2dmserver/_default.cfg b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg index 5be86032f..add451f92 100644 --- a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -23,6 +23,12 @@ parms="-game hl2mp -strictportbind -ip ${ip} -port ${port} +clientport ${clientp #### 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) @@ -38,10 +44,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -68,6 +70,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -93,15 +99,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="232370" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -109,7 +115,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -122,7 +128,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Half Life 2: Deathmatch" engine="source" @@ -131,11 +146,11 @@ glibc="2.3.6" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/hl2mp" executabledir="${serverfiles}" executable="./srcds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -148,11 +163,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/hldmserver/_default.cfg b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg index 67d8b3279..279f13b73 100644 --- a/lgsm/config-default/config-lgsm/hldmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -22,6 +22,12 @@ parms="-game valve -strictportbind +ip ${ip} -port ${port} +clientport ${clientp #### 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) @@ -37,10 +43,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -67,6 +69,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -92,15 +98,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -108,7 +114,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -121,7 +127,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="9" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Half Life: Deathmatch" engine="goldsource" @@ -130,11 +145,11 @@ glibc="2.3.4" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/valve" executabledir="${serverfiles}" executable="./hlds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -147,11 +162,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/hldmsserver/_default.cfg b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg index a53a47ddd..787e3c32b 100644 --- a/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -23,6 +23,12 @@ parms="-game hl1mp -strictportbind -ip ${ip} -port ${port} +clientport ${clientp #### 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) @@ -38,10 +44,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -68,6 +70,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -93,15 +99,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="255470" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -109,7 +115,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -122,7 +128,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Half-Life Deathmatch: Source" engine="source" @@ -131,11 +146,11 @@ glibc="2.3.6" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/hl1mp" executabledir="${serverfiles}" executable="./srcds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -148,11 +163,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/hwserver/_default.cfg b/lgsm/config-default/config-lgsm/hwserver/_default.cfg index 3deea0f22..facdaea0e 100644 --- a/lgsm/config-default/config-lgsm/hwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hwserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters servername="LinuxGSM Server" @@ -34,6 +34,12 @@ parms="-batchmode -nographics -exec \"host ${port} ${defaultmap} ${loadsave};que #### 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) @@ -49,10 +55,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -79,6 +81,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -104,15 +110,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="405100" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -120,7 +126,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -133,7 +139,16 @@ steammaster="false" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Hurtworld" engine="unity3d" @@ -142,10 +157,10 @@ glibc="2.15" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}" -executable=$([ "$(uname -m)" == "x86_64" ] && echo "./Hurtworld.x86_64" || echo "./Hurtworld.x86") +executable=$([ "$(uname -m)" == "x86_64" ] && echo -e "./Hurtworld.x86_64" || echo -e "./Hurtworld.x86") ## Backup Directory backupdir="${lgsmdir}/backup" @@ -155,13 +170,13 @@ logdir="${rootdir}/log" gamelogdir="${logdir}/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -gamelog="${gamelogdir}/${servicename}-game.log" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +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}/${servicename}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" +gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" +lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/config-default/config-lgsm/insserver/_default.cfg b/lgsm/config-default/config-lgsm/insserver/_default.cfg index 9ebea05e0..a9daf4e86 100644 --- a/lgsm/config-default/config-lgsm/insserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/insserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -17,18 +17,24 @@ defaultmap="embassy_coop checkpoint" maxplayers="32" tickrate="64" -## Optional: Game Server Login Token +## Game Server Login Token (GSLT): Optional # GSLT can be used for running a public server. -# More info: https://linuxgsm.com/gslt +# More info: https://docs.linuxgsm.com/steamcmd/gslt gslt="" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ -parms="-game insurgency -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} -tickrate ${tickrate} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers} -workshop" +parms="-game insurgency -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} -tickrate ${tickrate} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers} -workshop -norestart" } #### 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) @@ -44,10 +50,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -74,6 +76,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -99,15 +105,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="237410" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -115,7 +121,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -128,7 +134,16 @@ steammaster="false" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Insurgency" engine="source" @@ -137,11 +152,11 @@ glibc="2.15" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/insurgency" executabledir="${serverfiles}" executable="./srcds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -154,11 +169,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/inssserver/_default.cfg b/lgsm/config-default/config-lgsm/inssserver/_default.cfg index 28a0e9c95..014333b6a 100644 --- a/lgsm/config-default/config-lgsm/inssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/inssserver/_default.cfg @@ -1,15 +1,14 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters - ip="0.0.0.0" port="27102" queryport="27131" @@ -31,6 +30,12 @@ fn_parms(){ #### 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) @@ -46,10 +51,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -76,6 +77,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -101,15 +106,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="581330" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -117,7 +122,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -130,7 +135,16 @@ steammaster="false" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Insurgency: Sandstorm" engine="unreal4" @@ -139,7 +153,7 @@ glibc="2.17" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/Insurgency" executabledir="${systemdir}/Binaries/Linux" executable="./InsurgencyServer-Linux-Shipping" @@ -156,12 +170,12 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/Saved/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -gamelog="${gamelogdir}/${servicename}-game.log" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +gamelog="${gamelogdir}/${selfname}-game.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/instance-template.cfg b/lgsm/config-default/config-lgsm/instance-template.cfg index 69646e3a7..1f8109ce6 100644 --- a/lgsm/config-default/config-lgsm/instance-template.cfg +++ b/lgsm/config-default/config-lgsm/instance-template.cfg @@ -1,5 +1,5 @@ ################################## -######## Instance Settings ######## +####### Instance Settings ######## ################################## # PLACE INSTANCE SETTINGS HERE -## These settings will apply to a specific instance \ No newline at end of file +## These settings will apply to a specific instance diff --git a/lgsm/config-default/config-lgsm/iosserver/_default.cfg b/lgsm/config-default/config-lgsm/iosserver/_default.cfg index 4a13f1e36..27f93c29c 100644 --- a/lgsm/config-default/config-lgsm/iosserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/iosserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -23,6 +23,12 @@ parms="-game iosoccer -strictportbind -ip ${ip} -port ${port} +clientport ${clie #### 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) @@ -38,10 +44,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -68,6 +70,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -93,15 +99,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="673990" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -109,7 +115,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -122,7 +128,16 @@ steammaster="false" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="IOSoccer" engine="source" @@ -131,11 +146,11 @@ glibc="2.3.6" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/iosoccer" executabledir="${serverfiles}" executable="./srcds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -148,11 +163,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/jc2server/_default.cfg b/lgsm/config-default/config-lgsm/jc2server/_default.cfg index 039366269..2942b0b6c 100644 --- a/lgsm/config-default/config-lgsm/jc2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc2server/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ @@ -15,6 +15,12 @@ parms="" #### 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) @@ -30,10 +36,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -60,6 +62,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -85,15 +91,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="261140" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -101,7 +107,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -114,7 +120,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="jc2mp" + +## Game Server Details # Do not edit gamename="Just Cause 2" engine="avalanche2.0" @@ -123,7 +138,7 @@ glibc="2.13" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}" executable="./Jcmp-Server" @@ -140,11 +155,11 @@ logdir="${rootdir}/log" #gamelogdir="" # No server logs available lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/jc3server/_default.cfg b/lgsm/config-default/config-lgsm/jc3server/_default.cfg index 5b1ad7b54..1c88c7de2 100644 --- a/lgsm/config-default/config-lgsm/jc3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc3server/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ @@ -15,6 +15,12 @@ parms="" #### 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) @@ -30,10 +36,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -60,6 +62,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -85,15 +91,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="619960" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -101,7 +107,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -114,7 +120,16 @@ steammaster="false" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Just Cause 3" engine="avalanche3.0" @@ -123,7 +138,7 @@ glibc="2.17" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}" executable="./Server" @@ -140,11 +155,11 @@ logdir="${rootdir}/log" #gamelogdir="" # No server logs available lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/kf2server/_default.cfg b/lgsm/config-default/config-lgsm/kf2server/_default.cfg index a6bef1b81..016c28f69 100644 --- a/lgsm/config-default/config-lgsm/kf2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/kf2server/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -16,11 +16,17 @@ gamemode="KFGameContent.KFGameInfo_VersusSurvival" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ -parms="\"${defaultmap}?Game=${gamemode}?ConfigSubDir=${servicename} -QueryPort=${queryport}\"" +parms="\"${defaultmap}?Game=${gamemode}?ConfigSubDir=${selfname} -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) @@ -36,10 +42,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -66,6 +68,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -91,15 +97,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="232130" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -107,7 +113,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -120,7 +126,16 @@ steammaster="false" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Killing Floor 2" engine="unreal3" @@ -128,11 +143,11 @@ glibc="2.3.2" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${systemdir}/Binaries/Win64" executable="./KFGameSteamServer.bin.x86_64" -servercfgdir="${systemdir}/KFGame/Config/${servicename}" +servercfgdir="${systemdir}/KFGame/Config/${selfname}" servercfg="LinuxServer-KFGame.ini" servercfgdefault="LinuxServer-KFGame.ini" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -145,11 +160,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/Saved/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/kfserver/_default.cfg b/lgsm/config-default/config-lgsm/kfserver/_default.cfg index 4675447d6..ee5817909 100644 --- a/lgsm/config-default/config-lgsm/kfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/kfserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## SteamCMD Login | https://docs.linuxgsm.com/steamcmd#steamcmd-login steamuser="username" @@ -27,6 +27,12 @@ parms="server ${defaultmap}?game=KFmod.KFGameType?VACSecured=true -nohomedir ini #### 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) @@ -42,10 +48,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -72,6 +74,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -97,15 +103,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="215360" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -113,7 +119,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -126,7 +132,16 @@ steammaster="false" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-unreal2" + +## Game Server Details # Do not edit gamename="Killing Floor" engine="unreal2" @@ -135,12 +150,12 @@ glibc="2.4" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories serverfiles="${rootdir}/serverfiles" systemdir="${serverfiles}/System" executabledir="${systemdir}" executable="./ucc-bin" -servercfg="${servicename}.ini" +servercfg="${selfname}.ini" servercfgdefault="Default.ini" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -154,13 +169,13 @@ logdir="${rootdir}/log" gamelogdir="${logdir}/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -gamelog="${gamelogdir}/${servicename}-game.log" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +gamelog="${gamelogdir}/${selfname}-game.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" -gamelogdate="${gamelogdir}/${servicename}-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" +gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/config-default/config-lgsm/l4d2server/_default.cfg b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg index 0727b44bf..90c597f9e 100644 --- a/lgsm/config-default/config-lgsm/l4d2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -22,6 +22,12 @@ parms="-game left4dead2 -strictportbind -ip ${ip} -port ${port} +clientport ${cl #### 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) @@ -37,10 +43,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -67,6 +69,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -92,15 +98,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="222860" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -108,7 +114,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -121,7 +127,16 @@ steammaster="false" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Left 4 Dead 2" engine="source" @@ -130,11 +145,11 @@ glibc="2.3.6" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/left4dead2" executabledir="${serverfiles}" executable="./srcds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -147,11 +162,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/l4dserver/_default.cfg b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg index c06c6eff9..c72d16e14 100644 --- a/lgsm/config-default/config-lgsm/l4dserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -22,6 +22,12 @@ parms="-game left4dead -strictportbind -ip ${ip} -port ${port} +clientport ${cli #### 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) @@ -37,10 +43,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -67,6 +69,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -92,15 +98,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="222840" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -108,7 +114,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -121,7 +127,16 @@ steammaster="false" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Left 4 Dead" engine="source" @@ -130,7 +145,7 @@ glibc="2.3.6" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/left4dead" executabledir="${serverfiles}" executable="./srcds_run" @@ -147,11 +162,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/mcserver/_default.cfg b/lgsm/config-default/config-lgsm/mcserver/_default.cfg index cb3ae01b6..28ead92a2 100644 --- a/lgsm/config-default/config-lgsm/mcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mcserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters javaram="1024" # -Xmx$1024M @@ -17,6 +17,12 @@ parms="nogui" } #### 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) @@ -32,10 +38,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -62,6 +64,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -87,15 +93,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -108,7 +114,16 @@ sleeptime="0.5" # 10: Teamspeak 3 stopmode="5" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="minecraft" + +## Game Server Details # Do not edit gamename="Minecraft" engine="lwjgl2" @@ -117,7 +132,7 @@ glibc="null" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}" executable="java -Xmx${javaram}M -jar ${serverfiles}/minecraft_server.jar" @@ -134,11 +149,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/mhserver/_default.cfg b/lgsm/config-default/config-lgsm/mhserver/_default.cfg index f3846d238..cc4de6276 100644 --- a/lgsm/config-default/config-lgsm/mhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mhserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -23,9 +23,18 @@ parms="Mordhau ${defaultmap} -log -MultiHome=${ip} -Port=${port} -BeaconPort=${b #### 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" postdays="7" @@ -35,10 +44,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -65,6 +70,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -90,15 +99,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="629800" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -106,7 +115,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -119,7 +128,16 @@ steammaster="false" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="MORDHAU" engine="unreal4" @@ -128,13 +146,13 @@ glibc="2.17" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/Mordhau" executabledir="${systemdir}/Binaries/Linux" executable="./MordhauServer-Linux-Shipping" -servercfgdir="${systemdir}/Saved/Config/LinuxServer" servercfg="Game.ini" servercfgdefault="Game.ini" +servercfgdir="${systemdir}/Saved/Config/LinuxServer" servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory @@ -145,11 +163,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/Saved/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/mohaaserver/_default.cfg b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg new file mode 100644 index 000000000..97fe12dc8 --- /dev/null +++ b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg @@ -0,0 +1,159 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! +# Copy settings from here and use them in either: +# common.cfg - applies settings to every instance. +# [instance].cfg - applies settings to a specific instance. + +#### Game Server Settings #### + +## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters +ip="0.0.0.0" +port="12203" +defaultmap="dm/mohdm1" + +## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +fn_parms(){ +parms="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set fs_outputpath ${gamelogdir} +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +exec ${servercfg} +map ${defaultmap}" +} + +#### 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" +postdays="7" +posttarget="https://hastebin.com" + +# 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" +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" + +# 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) or else in "curlcustomstring". +# like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need +# any custom string in curl - simple ignore this parameter. +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +curlcustomstring="" + +## Backup | https://docs.linuxgsm.com/commands/backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://docs.linuxgsm.com/features/logging +consolelogging="on" +logdays="7" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="1" + +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors +ansi="on" + +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time +sleeptime="0.5" + +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode +# 1: tmux kill +# 2: CTRL+c +# 3: quit +# 4: quit 120s +# 5: stop +# 6: q +# 7: exit +# 8: 7 Days to Die +# 9: Gold Source +# 10: Teamspeak 3 +stopmode="3" + +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-quake3" + +## Game Server Details +# Do not edit +gamename="Medal of Honor: Allied Assault" +engine="idtech3" +glibc="2.3" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}/main" +executabledir="${serverfiles}" +executable="./mohaa_lnxded" +servercfg="${selfname}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${serverfiles}" +servercfgfullpath="${serverfiles}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${serverfiles}/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/config-default/config-lgsm/mtaserver/_default.cfg b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg index dca15b385..bb1e47762 100644 --- a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg @@ -1,12 +1,15 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### + +## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters +ip="0.0.0.0" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters # Edit with care @@ -16,6 +19,12 @@ parms="" #### 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) @@ -31,10 +40,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -61,6 +66,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -83,15 +92,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -104,7 +113,16 @@ sleeptime="0.5" # 10: Teamspeak 3 stopmode="4" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="3" +querytype="protocol-ase" + +## Game Server Details # Do not edit gamename="Multi Theft Auto" engine="renderware" @@ -113,7 +131,7 @@ glibc="2.7" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" resourcesdir="${systemdir}/mods/deathmatch/resources" executabledir="${systemdir}" @@ -130,11 +148,11 @@ logdir="${rootdir}/log" gamelogdir="${serverfiles}/mods/deathmatch/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/mumbleserver/_default.cfg b/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg index 0d31699c2..b722193b2 100644 --- a/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### # Use .ini config file for Mumble (Murmur) server. ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters @@ -16,6 +16,12 @@ parms="-fg -ini ${servercfgfullpath}" #### LinuxGSM Settings #### +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + ## Notification Alerts # (on|off) @@ -31,10 +37,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -61,6 +63,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -86,15 +92,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -107,7 +113,16 @@ sleeptime="0.5" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="mumbleping" + +## Game Server Details # Do not edit gamename="Mumble" engine="null" @@ -116,11 +131,11 @@ glibc="null" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}" executable="./murmur.x86" -servercfg="${servicename}.ini" +servercfg="${selfname}.ini" servercfgdefault="murmur.ini" servercfgdir="${serverfiles}" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -133,11 +148,11 @@ logdir="${rootdir}/log" #gamelogdir="" # No server logs available lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/ndserver/_default.cfg b/lgsm/config-default/config-lgsm/ndserver/_default.cfg index 5971fac1e..ab269aaf6 100644 --- a/lgsm/config-default/config-lgsm/ndserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ndserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -23,6 +23,12 @@ parms="-game nucleardawn -strictportbind -ip ${ip} -port ${port} +clientport ${c #### 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) @@ -38,10 +44,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -68,6 +70,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -93,15 +99,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="111710" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -109,7 +115,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -122,7 +128,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Nuclear Dawn" engine="source" @@ -131,11 +146,11 @@ glibc="2.3.6" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/nucleardawn" executabledir="${serverfiles}" executable="./srcds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -148,11 +163,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/nmrihserver/_default.cfg b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg index b95bcfb84..4c56f8a8d 100644 --- a/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -16,9 +16,9 @@ sourcetvport="27020" defaultmap="nmo_broadway" maxplayers="8" -## Optional: Game Server Login Token +## Game Server Login Token (GSLT): Optional # GSLT can be used for running a public server. -# More info: https://linuxgsm.com/gslt +# More info: https://docs.linuxgsm.com/steamcmd/gslt gslt="" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters @@ -28,6 +28,12 @@ parms="-game nmrih -strictportbind -ip ${ip} -port ${port} +clientport ${clientp #### 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) @@ -43,10 +49,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -73,6 +75,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -98,15 +104,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="317670" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -114,7 +120,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -127,7 +133,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="No More Room in Hell" engine="source" @@ -136,11 +151,11 @@ glibc="2.15" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/nmrih" executabledir="${serverfiles}" executable="./srcds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -153,11 +168,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/ns2cserver/_default.cfg b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg index 9fea23aab..f984d1908 100644 --- a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -30,6 +30,12 @@ parms="-name \"${servername}\" -port ${port} -webadmin -webdomain ${ip} -webuser #### 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) @@ -45,10 +51,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -75,6 +77,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -100,15 +106,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="313900" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -116,7 +122,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -129,7 +135,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="6" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="NS2: Combat" engine="spark" @@ -138,11 +153,11 @@ glibc="2.15" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}/ia32" executable="./ns2combatserver_linux32" -servercfgdir="${serverfiles}/${servicename}" +servercfgdir="${serverfiles}/${selfname}" servercfgfullpath="${servercfgdir}" modstoragedir="${servercfgdir}/Workshop" @@ -154,11 +169,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/ns2server/_default.cfg b/lgsm/config-default/config-lgsm/ns2server/_default.cfg index dd6f9150b..fbf312222 100644 --- a/lgsm/config-default/config-lgsm/ns2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2server/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## SteamCMD Login | https://docs.linuxgsm.com/steamcmd#steamcmd-login steamuser="username" @@ -34,6 +34,12 @@ parms="-name \"${servername}\" -port ${port} -webadmin -webdomain ${ip} -webuser #### 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) @@ -49,10 +55,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -79,6 +81,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -104,15 +110,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="4940" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -120,7 +126,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -133,7 +139,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="6" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Natural Selection 2" engine="spark" @@ -142,11 +157,11 @@ glibc="2.17" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}/x64" executable="./server_linux" -servercfgdir="${serverfiles}/${servicename}" +servercfgdir="${serverfiles}/${selfname}" servercfgfullpath="${servercfgdir}" modstoragedir="${servercfgdir}/Workshop" @@ -158,11 +173,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/nsserver/_default.cfg b/lgsm/config-default/config-lgsm/nsserver/_default.cfg index 0368bc5ba..6654d2e82 100644 --- a/lgsm/config-default/config-lgsm/nsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/nsserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -22,6 +22,12 @@ parms="-game ns -strictportbind +ip ${ip} -port ${port} +clientport ${clientport #### 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) @@ -37,10 +43,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -67,6 +69,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -92,15 +98,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" appidmod="cstrike" @@ -109,7 +115,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -122,7 +128,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="9" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Natural Selection" engine="goldsource" @@ -131,11 +146,11 @@ glibc="2.3.4" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/ns" executabledir="${serverfiles}" executable="./hlds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -148,11 +163,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/opforserver/_default.cfg b/lgsm/config-default/config-lgsm/opforserver/_default.cfg index bfea855be..5f50583fb 100644 --- a/lgsm/config-default/config-lgsm/opforserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/opforserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -20,7 +20,13 @@ fn_parms(){ parms="-game gearbox -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" } -### LinuxGSM Settings #### +#### 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) @@ -37,10 +43,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -67,6 +69,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -92,15 +98,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" appidmod="gearbox" @@ -109,7 +115,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -122,7 +128,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="9" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Half-Life: Opposing Force" engine="goldsource" @@ -131,11 +146,11 @@ glibc="2.3.4" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/gearbox" executabledir="${serverfiles}" executable="./hlds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -148,11 +163,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/pcserver/_default.cfg b/lgsm/config-default/config-lgsm/pcserver/_default.cfg index dc59cfe77..a4f7a8942 100644 --- a/lgsm/config-default/config-lgsm/pcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pcserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ @@ -15,6 +15,12 @@ parms="--config ${servercfg}" #### LinuxGSM Settings #### +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + ## Notification Alerts # (on|off) @@ -30,10 +36,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -60,6 +62,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -85,15 +91,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="332670" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -101,7 +107,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -114,7 +120,16 @@ steammaster="false" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Project Cars" engine="madness" @@ -123,11 +138,11 @@ glibc="2.4" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}" executable="./DedicatedServerCmd" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -140,11 +155,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/pstbsserver/_default.cfg b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg index 956d86b85..09e357bef 100644 --- a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg @@ -1,21 +1,19 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters - ip="0.0.0.0" -randommap="ALWAYS" port="10027" queryport="10037" +randommap="ALWAYS" #servername="LinuxGSM Server" -# If your server is not meeting the minimal server requirement, do not host the server for 80 players, decrease that number. maxplayers="40" reservedslots="2" @@ -26,6 +24,12 @@ parms="MULTIHOME=${ip}?RANDOM=${randommap}?Port=${port}?QueryPort=${queryport}?M #### 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) @@ -41,10 +45,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -71,6 +71,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -96,15 +100,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="746200" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -112,7 +116,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -125,7 +129,16 @@ steammaster="false" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="pstbsserver" engine="unreal4" @@ -134,7 +147,7 @@ glibc="2.17" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/PostScriptum" executabledir="${serverfiles}" executable="./PostScriptumServer.sh" @@ -151,12 +164,12 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/Saved/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -gamelog="${gamelogdir}/${servicename}-game.log" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +gamelog="${gamelogdir}/${selfname}-game.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/pvkiiserver/_default.cfg b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg index 1fd1a7dc3..4d6244afd 100644 --- a/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -23,6 +23,12 @@ parms="-game pvkii -strictportbind -ip ${ip} -port ${port} +clientport ${clientp #### 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) @@ -38,10 +44,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -68,6 +70,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -93,15 +99,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="17575" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -109,7 +115,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -122,7 +128,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Pirates, Vikings, and Knights II" engine="source" @@ -131,11 +146,11 @@ glibc="2.15" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/pvkii" executabledir="${serverfiles}" executable="./srcds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -148,11 +163,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/pzserver/_default.cfg b/lgsm/config-default/config-lgsm/pzserver/_default.cfg index 3ecb85125..62862f21f 100644 --- a/lgsm/config-default/config-lgsm/pzserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pzserver/_default.cfg @@ -1,23 +1,29 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" adminpassword="CHANGE_ME" fn_parms(){ -parms="-ip ${ip} -adminpassword \"${adminpassword}\" -servername ${servicename}" +parms="-ip ${ip} -adminpassword \"${adminpassword}\" -servername ${selfname}" } #### LinuxGSM Settings #### +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + ## Notification Alerts # (on|off) @@ -33,10 +39,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -63,6 +65,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -88,15 +94,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="380870" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -104,7 +110,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -117,7 +123,16 @@ steammaster="false" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Project Zomboid" engine="projectzomboid" @@ -126,11 +141,11 @@ glibc="2.15" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}" executable="./start-server.sh" -servercfg="${servicename}.ini" +servercfg="${selfname}.ini" servercfgdefault="server.ini" servercfgdir="${HOME}/Zomboid/Server" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -143,11 +158,11 @@ logdir="${rootdir}/log" gamelogdir="${HOME}/Zomboid/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/q2server/_default.cfg b/lgsm/config-default/config-lgsm/q2server/_default.cfg index 67463687b..8601a5f8d 100644 --- a/lgsm/config-default/config-lgsm/q2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/q2server/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -20,6 +20,12 @@ parms="+set dedicated 1 +set ip ${ip} +set port ${port} +exec ${servercfg} +set #### 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) @@ -35,10 +41,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -65,6 +67,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -87,15 +93,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -108,7 +114,16 @@ sleeptime="0.5" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-quake2" + +## Game Server Details # Do not edit gamename="Quake 2" engine="idtech2" @@ -117,11 +132,11 @@ glibc="null" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/baseq2" executabledir="${serverfiles}" executable="./quake2" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -134,11 +149,11 @@ logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/q3server/_default.cfg b/lgsm/config-default/config-lgsm/q3server/_default.cfg index 2b079dbbe..02d27c9d8 100644 --- a/lgsm/config-default/config-lgsm/q3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/q3server/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -20,6 +20,12 @@ parms="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +se #### 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) @@ -35,10 +41,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -65,6 +67,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -87,15 +93,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -108,7 +114,16 @@ sleeptime="0.5" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-quake3" + +## Game Server Details # Do not edit gamename="Quake 3: Arena" engine="idtech3" @@ -117,11 +132,11 @@ glibc="2.1" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/baseq3" executabledir="${serverfiles}" executable="./q3ded" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -134,11 +149,11 @@ logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/qlserver/_default.cfg b/lgsm/config-default/config-lgsm/qlserver/_default.cfg index b55cbd227..71f86ac98 100644 --- a/lgsm/config-default/config-lgsm/qlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/qlserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters # Edit with care | Install/Config Guide : https://steamcommunity.com/sharedfiles/filedetails/?id=542966946 @@ -17,6 +17,12 @@ parms="+exec ${servercfg}" #### LinuxGSM Settings #### +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + ## Notification Alerts # (on|off) @@ -32,10 +38,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -62,6 +64,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -87,15 +93,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="349090" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -103,7 +109,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -116,7 +122,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Quake Live" engine="idtech3_ql" @@ -125,11 +140,11 @@ glibc="2.15" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}" -executable=$([ "$(uname -m)" == "x86_64" ] && echo "./run_server_x64.sh" || echo "./run_server_x86.sh") -servercfg="${servicename}.cfg" +executable=$([ "$(uname -m)" == "x86_64" ] && echo -e "./run_server_x64.sh" || echo -e "./run_server_x86.sh") +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${serverfiles}/baseq3" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -142,12 +157,12 @@ logdir="${rootdir}/log" gamelogdir="${logdir}/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -gamelog="${gamelogdir}/${servicename}-game.log" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +gamelog="${gamelogdir}/${selfname}-game.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/qwserver/_default.cfg b/lgsm/config-default/config-lgsm/qwserver/_default.cfg index c94a460d4..693ffcbdf 100644 --- a/lgsm/config-default/config-lgsm/qwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/qwserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -19,6 +19,12 @@ parms="-port ${port} -game ktx +exec ${servercfg}" #### LinuxGSM Settings #### +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + ## Notification Alerts # (on|off) @@ -34,10 +40,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -64,6 +66,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -86,15 +92,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -107,7 +113,16 @@ sleeptime="0.5" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-quake1" + +## Game Server Details # Do not edit gamename="QuakeWorld" engine="quake" @@ -116,11 +131,11 @@ glibc="2.17" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/ktx" executabledir="${serverfiles}" executable="./mvdsv" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -133,11 +148,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/ricochetserver/_default.cfg b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg index 36457b93d..f62f4ceb1 100644 --- a/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -22,6 +22,12 @@ parms="-game ricochet -strictportbind +ip ${ip} -port ${port} +clientport ${clie #### 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) @@ -37,10 +43,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -67,6 +69,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -92,15 +98,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" appidmod="ricochet" @@ -109,7 +115,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -122,20 +128,29 @@ steammaster="true" # 10: Teamspeak 3 stopmode="9" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Ricochet" engine="goldsource" -glibcr="2.3.4" +glibc="2.3.4" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/ricochet" executabledir="${serverfiles}" executable="./hlds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -148,11 +163,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/roserver/_default.cfg b/lgsm/config-default/config-lgsm/roserver/_default.cfg index 76b3f312f..1018f0028 100644 --- a/lgsm/config-default/config-lgsm/roserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/roserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## SteamCMD Login | https://docs.linuxgsm.com/steamcmd#steamcmd-login steamuser="username" @@ -23,6 +23,12 @@ parms="server ${defaultmap}?game=ROGame.ROTeamGame?VACSecured=true -nohomedir in #### 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) @@ -38,10 +44,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -68,6 +70,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -93,15 +99,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="223250" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -109,7 +115,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -122,7 +128,16 @@ steammaster="false" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-unreal2" + +## Game Server Details # Do not edit gamename="Red Orchestra: Ostfront 41-45" engine="unreal2" @@ -131,12 +146,12 @@ glibc="2.4" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories serverfiles="${rootdir}/serverfiles" systemdir="${serverfiles}/system" executabledir="${systemdir}" executable="./ucc-bin" -servercfg="${servicename}.ini" +servercfg="${selfname}.ini" servercfgdefault="default.ini" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -150,13 +165,13 @@ logdir="${rootdir}/log" gamelogdir="${logdir}/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -gamelog="${gamelogdir}/${servicename}-game.log" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +gamelog="${gamelogdir}/${selfname}-game.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" -gamelogdate="${gamelogdir}/${servicename}-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" +gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg b/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg index e49bf9471..1abd2e20d 100644 --- a/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -20,6 +20,12 @@ parms="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 1 +se #### 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) @@ -35,10 +41,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -65,6 +67,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -87,15 +93,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -108,7 +114,16 @@ sleeptime="0.5" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-quake3" + +## Game Server Details # Do not edit gamename="Return to Castle Wolfenstein" engine="ioquake3" @@ -117,11 +132,11 @@ glibc="2.1" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/main" executabledir="${serverfiles}" executable="./iowolfded.x86_64" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -134,11 +149,11 @@ logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/rustserver/_default.cfg b/lgsm/config-default/config-lgsm/rustserver/_default.cfg index 5bebb709d..6835d35d6 100644 --- a/lgsm/config-default/config-lgsm/rustserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rustserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters # More settings available after install in serverfiles/server/rust-server/server.cfg @@ -42,11 +42,17 @@ else # Keep randomness of the number if not set conditionalsalt="" fi -parms="-batchmode +server.ip ${ip} +server.port ${port} +server.tickrate ${tickrate} +server.hostname \"${servername}\" +server.identity \"${servicename}\" ${conditionalseed} ${conditionalsalt} +server.maxplayers ${maxplayers} +server.worldsize ${worldsize} +server.saveinterval ${saveinterval} +rcon.web ${rconweb} +rcon.ip ${ip} +rcon.port ${rconport} +rcon.password \"${rconpassword}\" -logfile \"${gamelogdate}\"" +parms="-batchmode +server.ip ${ip} +server.port ${port} +server.tickrate ${tickrate} +server.hostname \"${servername}\" +server.identity \"${selfname}\" ${conditionalseed} ${conditionalsalt} +server.maxplayers ${maxplayers} +server.worldsize ${worldsize} +server.saveinterval ${saveinterval} +rcon.web ${rconweb} +rcon.ip ${ip} +rcon.port ${rconport} +rcon.password \"${rconpassword}\" -logfile \"${gamelogdate}\"" } #### 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) @@ -62,10 +68,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -92,6 +94,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -115,17 +121,17 @@ logdays="7" ## Monitor | https://docs.linuxgsm.com/commands/monitor # Query delay time -querydelay="1" +querydelay="5" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="258550" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -133,7 +139,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -144,9 +150,18 @@ steammaster="false" # 8: 7 Days to Die # 9: Gold Source # 10: Teamspeak 3 -stopmode="3" - -## LinuxGSM Server Details +stopmode="2" + +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Rust" engine="unity3d" @@ -155,11 +170,11 @@ glibc="2.15" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}" executable="./RustDedicated" -serveridentitydir="${systemdir}/server/${servicename}" +serveridentitydir="${systemdir}/server/${selfname}" servercfg="server.cfg" servercfgdefault="server.cfg" servercfgdir="${serveridentitydir}/cfg" @@ -173,12 +188,12 @@ logdir="${rootdir}/log" gamelogdir="${logdir}/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" -gamelogdate="${gamelogdir}/${servicename}-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" +gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/config-default/config-lgsm/rwserver/_default.cfg b/lgsm/config-default/config-lgsm/rwserver/_default.cfg index 6452e61f3..966c473fc 100644 --- a/lgsm/config-default/config-lgsm/rwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rwserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters javaram="2048" # -Xmx$2048M @@ -18,6 +18,12 @@ parms="" #### 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) @@ -33,10 +39,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -63,6 +65,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -88,15 +94,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="339010" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -104,7 +110,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -117,7 +123,16 @@ steammaster="false" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="1" +querytype="" + +## Game Server Details # Do not edit gamename="Rising World" engine="risingworld" @@ -126,7 +141,7 @@ glibc="null" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}" executable="java -Xmx${javaram}m -jar ${serverfiles}/server.jar" @@ -143,11 +158,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/sampserver/_default.cfg b/lgsm/config-default/config-lgsm/sampserver/_default.cfg index 7de9d62a0..50b52ad56 100644 --- a/lgsm/config-default/config-lgsm/sampserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sampserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -19,6 +19,12 @@ parms="" #### 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) @@ -34,10 +40,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -64,6 +66,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -86,15 +92,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -107,7 +113,16 @@ sleeptime="0.5" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="3" +querytype="samp" + +## Game Server Details # Do not edit gamename="San Andreas Multiplayer" engine="renderware" @@ -116,11 +131,12 @@ glibc="2.3" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${systemdir}/samp03" executable="./samp03svr" servercfg="server.cfg" +servercfgdefault="server.cfg" servercfgdir="${systemdir}/samp03" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -132,11 +148,11 @@ logdir="${rootdir}/log" gamelogdir="${serverfiles}/samp03" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/sbotsserver/_default.cfg b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg index d1ff39ccb..d426769be 100644 --- a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters port="7777" @@ -23,6 +23,12 @@ parms="Port=${port}?QueryPort=${queryport} -startup_map ${defaultmap} -server_na #### 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) @@ -38,10 +44,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -68,6 +70,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -90,15 +96,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="974130" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -106,7 +112,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -119,7 +125,16 @@ steammaster="false" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="StickyBots" engine="unreal4" @@ -128,7 +143,7 @@ glibc="2.17" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${systemdir}/blank1/Binaries/Linux" executable="./blank1Server-Linux-Shipping" @@ -145,11 +160,11 @@ logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/sbserver/_default.cfg b/lgsm/config-default/config-lgsm/sbserver/_default.cfg index dc1e400a6..cdff1963d 100644 --- a/lgsm/config-default/config-lgsm/sbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## SteamCMD Login | https://docs.linuxgsm.com/steamcmd#steamcmd-login steamuser="username" @@ -22,6 +22,12 @@ parms="" #### 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) @@ -37,10 +43,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -67,6 +69,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -92,22 +98,22 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="211820" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" steammaster="flase" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -120,7 +126,16 @@ steammaster="flase" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Starbound" engine="starbound" @@ -129,7 +144,7 @@ glibc="2.17" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}/linux" executable="./starbound_server" @@ -146,11 +161,11 @@ logdir="${rootdir}/log" gamelogdir="${serverfiles}/storage" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/sdtdserver/_default.cfg b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg index c9271524f..0f56ec19b 100644 --- a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -18,6 +18,12 @@ parms="-logfile ${gamelogdir}/output_log__$(date +%Y-%m-%d__%H-%M-%S).txt -quit #### 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) @@ -33,10 +39,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -63,6 +65,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -88,15 +94,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="294420" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -104,7 +110,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -114,10 +120,19 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: Gold Source -# teamspeak 3 +# 10: Teamspeak 3 stopmode="8" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="7 Days To Die" engine="unity3d" @@ -126,14 +141,12 @@ glibc="2.15" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}" -executable=$([ "$(uname -m)" == "x86_64" ] && echo "./7DaysToDieServer.x86_64" || echo "./7DaysToDieServer.x86") +executable=$([ "$(uname -m)" == "x86_64" ] && echo -e "./7DaysToDieServer.x86_64" || echo -e "./7DaysToDieServer.x86") servercfgdefault="serverconfig.xml" -servercfgdirdefault="${serverfiles}" -servercfgfullpathdefault="${servercfgdirdefault}/${servercfgdefault}" -servercfg="${servicename}.xml" +servercfgfullpathdefault="${serverfiles}/${servercfgdefault}" servercfgdir="${serverfiles}" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -145,12 +158,12 @@ logdir="${rootdir}/log" gamelogdir="${logdir}/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -gamelog="${gamelogdir}/${servicename}-game.log" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +gamelog="${gamelogdir}/${selfname}-game.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/sfcserver/_default.cfg b/lgsm/config-default/config-lgsm/sfcserver/_default.cfg index 3e3f4f7f5..373678cb4 100644 --- a/lgsm/config-default/config-lgsm/sfcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sfcserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -23,6 +23,12 @@ parms="-game sfclassic -strictportbind -ip ${ip} -port ${port} +clientport ${cli #### 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) @@ -38,10 +44,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -68,6 +70,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -93,15 +99,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="244310" # Source 2013 SDK # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -109,7 +115,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -122,7 +128,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="SourceForts Classic" engine="source" @@ -131,11 +146,11 @@ glibc="2.15" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/sfclassic" executabledir="${serverfiles}" executable="./srcds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -148,11 +163,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/sof2server/_default.cfg b/lgsm/config-default/config-lgsm/sof2server/_default.cfg index 26a0cc0cf..48887e1ce 100644 --- a/lgsm/config-default/config-lgsm/sof2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/sof2server/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -20,6 +20,12 @@ parms="+set sv_punkbuster 0 +set dedicated 2 +set net_ip ${ip} +set net_port ${p #### 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) @@ -35,10 +41,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -65,6 +67,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -87,15 +93,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -108,7 +114,16 @@ sleeptime="0.5" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-quake3" + +## Game Server Details # Do not edit gamename="Soldier Of Fortune 2: Gold Edition" engine="idtech3" @@ -117,11 +132,11 @@ glibc="2.1" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/main" executabledir="${serverfiles}" executable="./sof2ded" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -134,11 +149,11 @@ logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/solserver/_default.cfg b/lgsm/config-default/config-lgsm/solserver/_default.cfg index 6f846493c..89fe8c4e1 100644 --- a/lgsm/config-default/config-lgsm/solserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/solserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -21,6 +21,12 @@ parms="-b ${ip} -p ${port} -l ${maxplayers} -m ${maplist} -c ${servercfg}" #### LinuxGSM Settings #### +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + ## Notification Alerts # (on|off) @@ -36,10 +42,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -66,6 +68,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -88,15 +94,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -109,7 +115,16 @@ sleeptime="0.5" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="5" +querytype="" + +## Game Server Details # Do not edit gamename="Soldat" engine="soldat" @@ -118,12 +133,14 @@ glibc="2.1" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${systemdir}" executable="./soldatserver" -servercfg="soldat.ini" servercfgdir="${systemdir}" +servercfg="soldat.ini" +servercfgdefault="soldat.ini" + servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory @@ -134,11 +151,11 @@ logdir="${rootdir}/log" gamelogdir="${serverfiles}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/squadserver/_default.cfg b/lgsm/config-default/config-lgsm/squadserver/_default.cfg index 64fe026cc..ab8551bcb 100644 --- a/lgsm/config-default/config-lgsm/squadserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/squadserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters port="7787" @@ -20,6 +20,12 @@ parms="MULTIHOME=${ip} RANDOM=${randommap} Port=${port} 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) @@ -35,10 +41,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -65,6 +67,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -90,15 +96,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="403240" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -106,7 +112,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -119,7 +125,16 @@ steammaster="false" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Squad" engine="unreal4" @@ -128,11 +143,11 @@ glibc="2.17" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/Squad" executabledir="${serverfiles}" executable="./SquadGameServer.sh" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="Server.cfg" servercfgdir="${systemdir}/ServerConfig" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -145,12 +160,12 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/Saved/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -gamelog="${gamelogdir}/${servicename}-game.log" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +gamelog="${gamelogdir}/${selfname}-game.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/ss3server/_default.cfg b/lgsm/config-default/config-lgsm/ss3server/_default.cfg index 580b90968..606fdb21c 100644 --- a/lgsm/config-default/config-lgsm/ss3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ss3server/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -19,6 +19,12 @@ parms="+ip ${ip} +logfile ${gamelog} +exec ${servercfgfullpath}" #### LinuxGSM Settings #### +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + ## Notification Alerts # (on|off) @@ -34,10 +40,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -64,6 +66,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -89,15 +95,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="41080" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -105,7 +111,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -118,7 +124,16 @@ steammaster="false" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Serious Sam 3: BFE" engine="seriousengine35" @@ -127,11 +142,11 @@ glibc="2.13" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/Bin" -executable="./runSam3_DedicatedServer.sh" executabledir="${systemdir}" -servercfg="${servicename}.ini" +executable="./runSam3_DedicatedServer.sh" +servercfg="${selfname}.ini" servercfgdefault="server.ini" servercfgdir="${serverfiles}/Content/SeriousSam3/Config" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -144,13 +159,13 @@ logdir="${rootdir}/log" gamelogdir="${logdir}/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -gamelog="${gamelogdir}/${servicename}-game.log" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +gamelog="${gamelogdir}/${selfname}-game.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" -gamelogdate="${gamelogdir}/${servicename}-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" +gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/config-default/config-lgsm/stserver/_default.cfg b/lgsm/config-default/config-lgsm/stserver/_default.cfg index 3305cd282..73883f785 100644 --- a/lgsm/config-default/config-lgsm/stserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/stserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -18,13 +18,19 @@ clearinterval=60 worldname="moon_save" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -# Edit with care | http://hurtworld.wikia.com/wiki/Hosting_A_Server +# Edit with care fn_parms(){ parms="-batchmode -nographics -autostart -gameport=${port} -updateport=${queryport} -worldtype=${worldtype} -loadworld=${worldname} -worldname=${worldname} -autosaveinterval=${autosaveinterval} -clearallinterval=${clearinterval}" } #### 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) @@ -40,10 +46,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -70,6 +72,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -95,15 +101,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="600760" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -111,7 +117,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -124,7 +130,16 @@ steammaster="false" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Stationeers" engine="unity3d" @@ -133,7 +148,7 @@ glibc="2.15" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}" executable="./rocketstation_DedicatedServer.x86_64" @@ -150,11 +165,11 @@ logdir="${rootdir}/log" gamelogdir="${HOME}/.config/unity3d/Rocketwerkz/Stationeers" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/svenserver/_default.cfg b/lgsm/config-default/config-lgsm/svenserver/_default.cfg index f02443156..208adad83 100644 --- a/lgsm/config-default/config-lgsm/svenserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/svenserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -22,6 +22,12 @@ parms="-game svencoop -strictportbind +ip ${ip} -port ${port} +clientport ${clie #### 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) @@ -37,10 +43,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -67,6 +69,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -92,15 +98,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="276060" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -108,7 +114,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -121,7 +127,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="9" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Sven Co-op" engine="goldsource" @@ -130,11 +145,11 @@ glibc="2.24" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/svencoop" executabledir="${serverfiles}" executable="./svends_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -147,11 +162,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/terrariaserver/_default.cfg b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg index 4d3f06dab..495eaf159 100644 --- a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## SteamCMD Login | https://docs.linuxgsm.com/steamcmd#steamcmd-login steamuser="username" @@ -22,6 +22,12 @@ parms="-config ${servercfgfullpath}" #### LinuxGSM Settings #### +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + ## Notification Alerts # (on|off) @@ -37,10 +43,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -67,6 +69,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -92,15 +98,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="105600" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -108,7 +114,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -121,7 +127,16 @@ steammaster="false" # 10: Teamspeak 3 stopmode="7" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="5" +querytype="" + +## Game Server Details # Do not edit gamename="Terraria" engine="terraria" @@ -130,11 +145,11 @@ glibc="2.7" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}" executable="./TerrariaServer" -servercfg="${servicename}.txt" +servercfg="${selfname}.txt" servercfgdefault="serverconfig.txt" servercfgdir="${serverfiles}" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -147,11 +162,11 @@ logdir="${rootdir}/log" #gamelogdir="" # No server logs available lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/tf2server/_default.cfg b/lgsm/config-default/config-lgsm/tf2server/_default.cfg index dbd00f79f..bcc4585b4 100644 --- a/lgsm/config-default/config-lgsm/tf2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/tf2server/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -16,9 +16,9 @@ sourcetvport="27020" defaultmap="cp_badlands" maxplayers="16" -## Optional: Game Server Login Token +## Game Server Login Token (GSLT): Optional # GSLT can be used for running a public server. -# More info: https://linuxgsm.com/gslt +# More info: https://docs.linuxgsm.com/steamcmd/gslt gslt="" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters @@ -28,6 +28,12 @@ parms="-game tf -strictportbind -ip ${ip} -port ${port} +clientport ${clientport #### 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) @@ -43,10 +49,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -73,6 +75,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -98,15 +104,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="232250" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -114,7 +120,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -127,7 +133,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Team Fortress 2" engine="source" @@ -136,11 +151,11 @@ glibc="2.15" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/tf" executabledir="${serverfiles}" executable="./srcds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -153,11 +168,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/tfcserver/_default.cfg b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg index ac4cee489..0223c28c4 100644 --- a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -22,6 +22,12 @@ parms="-game tfc -strictportbind _ip ${ip} -port ${port} +clientport ${clientpor #### 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) @@ -37,10 +43,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -67,6 +69,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -92,15 +98,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" appidmod="tfc" @@ -109,7 +115,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -122,7 +128,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="9" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Team Fortress Classic" engine="goldsource" @@ -131,11 +146,11 @@ glibc="2.3.4" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/tfc" executabledir="${serverfiles}" executable="./hlds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -148,11 +163,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/ts3server/_default.cfg b/lgsm/config-default/config-lgsm/ts3server/_default.cfg index 54f70adb0..2d53a0725 100644 --- a/lgsm/config-default/config-lgsm/ts3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ts3server/_default.cfg @@ -1,16 +1,29 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. + +#### Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters # Edit serverfiles/ts3server.ini after installation +## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +fn_parms(){ +parms="inifile=${servercfgfullpath} pid_file=ts3server.pid" +} + #### 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) @@ -26,10 +39,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -56,6 +65,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -81,15 +94,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -100,9 +113,18 @@ sleeptime="0.5" # 8: 7 Days to Die # 9: Gold Source # 10: Teamspeak 3 -stopmode="10" - -## LinuxGSM Server Details +stopmode="2" + +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="5" +querytype="" + +## Game Server Details # Do not edit gamename="TeamSpeak 3" servername="TeamSpeak 3 Server" @@ -112,11 +134,11 @@ glibc="2.17" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}" -executable="./ts3server_startscript.sh" -servercfg="${servicename}.ini" +executable="./ts3server" +servercfg="${selfname}.ini" servercfgdefault="ts3server.ini" servercfgdir="${serverfiles}" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -128,9 +150,12 @@ backupdir="${lgsmdir}/backup" logdir="${rootdir}/log" gamelogdir="${serverfiles}/logs" lgsmlogdir="${logdir}/script" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +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}/${servicename}-script-$(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/config-default/config-lgsm/tsserver/_default.cfg b/lgsm/config-default/config-lgsm/tsserver/_default.cfg index 1a5bc27ed..be66db897 100644 --- a/lgsm/config-default/config-lgsm/tsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tsserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -22,6 +22,12 @@ parms="-game ts -strictportbind +ip ${ip} -port ${port} +clientport ${clientport #### 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) @@ -37,10 +43,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -67,6 +69,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -92,15 +98,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" appidmod="cstrike" @@ -109,7 +115,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -122,7 +128,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="9" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="The Specialists" engine="goldsource" @@ -131,11 +146,11 @@ glibc="2.3.4" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/ts" executabledir="${serverfiles}" executable="./hlds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -148,11 +163,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/tuserver/_default.cfg b/lgsm/config-default/config-lgsm/tuserver/_default.cfg index fae0f5137..2c0b3b445 100644 --- a/lgsm/config-default/config-lgsm/tuserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tuserver/_default.cfg @@ -1,30 +1,36 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" port="7777" queryport="27015" -## Optional: Game Server Login Token +## Game Server Login Token (GSLT): Optional # GSLT can be used for running a public server. -# More info: https://linuxgsm.com/gslt +# More info: https://docs.linuxgsm.com/steamcmd/gslt gslt="" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ -parms="-log -MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -TowerServerINI=${servicename}.ini" +parms="-log -MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -TowerServerINI=${selfname}.ini" } #### 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) @@ -40,10 +46,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -70,6 +72,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -95,15 +101,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="439660" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -111,7 +117,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -124,7 +130,16 @@ steammaster="false" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Tower Unite" engine="unreal4" @@ -133,14 +148,14 @@ glibc="2.17" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/Tower" executabledir="${systemdir}/Binaries/Linux" executable="./TowerServer-Linux-Shipping" +servercfg="${selfname}.ini" +servercfgdefault="TowerServer.ini" servercfgdir="${systemdir}/Binaries/Linux" -servercfg="${servicename}.ini" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="TowerServer.ini" ## Backup Directory backupdir="${lgsmdir}/backup" @@ -150,11 +165,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/Saved/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/twserver/_default.cfg b/lgsm/config-default/config-lgsm/twserver/_default.cfg index f0c817a6e..f9ca0f996 100644 --- a/lgsm/config-default/config-lgsm/twserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/twserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## SteamCMD Login | https://docs.linuxgsm.com/steamcmd#steamcmd-login steamuser="username" @@ -22,6 +22,12 @@ parms="-f ${servercfg}" #### LinuxGSM Settings #### +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + ## Notification Alerts # (on|off) @@ -37,10 +43,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -67,6 +69,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -92,15 +98,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="380840" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -108,7 +114,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -121,7 +127,16 @@ steammaster="false" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="4" +querytype="teeworlds" + +## Game Server Details # Do not edit gamename="Teeworlds" engine="teeworlds" @@ -130,11 +145,11 @@ glibc="2.14" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/tw" executabledir="${systemdir}" executable="./teeworlds_srv" -servercfg="${servicename}.cfg" # Teeworlds can also auto load any config if an autoexec.cfg file is present in the server dir +servercfg="${selfname}.cfg" # Teeworlds can also auto load any config if an autoexec.cfg file is present in the server dir servercfgdefault="server.cfg" servercfgdir="${serverfiles}/tw" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -147,12 +162,12 @@ logdir="${rootdir}/log" gamelogdir="${logdir}/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -gamelog="${gamelogdir}/${servicename}-game.log" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +gamelog="${gamelogdir}/${selfname}-game.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/untserver/_default.cfg b/lgsm/config-default/config-lgsm/untserver/_default.cfg index 32b468a12..e50f032c4 100644 --- a/lgsm/config-default/config-lgsm/untserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/untserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -20,14 +20,23 @@ defaultmap="pei" # Make sure you change the admin password before launching the server fn_parms(){ -parms="-port:${port} -players:${maxplayers} --nographics -${defaultmap} -batchmode +secureserver/${servicename}" +parms="-port:${port} -players:${maxplayers} --nographics -${defaultmap} -batchmode +secureserver/${selfname}" } #### LinuxGSM Settings #### +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + ## Notification Alerts # (on|off) +# Display IP | https://docs.linuxgsm.com/alerts#display-ip +displayip="" + # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" postdays="7" @@ -37,10 +46,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -67,6 +72,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -92,15 +101,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="1110390" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -108,7 +117,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -121,7 +130,16 @@ steammaster="false" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Unturned" engine="unity3d" @@ -130,13 +148,14 @@ glibc="2.15" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}" executable="./Unturned_Headless.x86_64" -servercfgdir="${systemdir}/Servers/${servicename}" +servercfgdir="${systemdir}/Servers/${selfname}" servercfg="Config.json" servercfgdefault="Config.json" +servercfgdir="${systemdir}/Servers/${selfname}" servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory @@ -147,11 +166,11 @@ logdir="${rootdir}/log" gamelogdir="${logdir}/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/ut2k4server/_default.cfg b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg index 178586854..2658f60ca 100644 --- a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters defaultmap="DM-Rankin" @@ -19,6 +19,12 @@ parms="server ${defaultmap}?game=XGame.xDeathMatch -nohomedir ini=${servercfg} l #### 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) @@ -34,10 +40,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -64,6 +66,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -86,15 +92,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -107,7 +113,16 @@ sleeptime="0.5" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-unreal2" + +## Game Server Details # Do not edit gamename="Unreal Tournament 2004" engine="unreal2" @@ -116,11 +131,11 @@ glibc="2.4" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/System" executabledir="${systemdir}" executable="./ucc-bin" -servercfg="${servicename}.ini" +servercfg="${selfname}.ini" servercfgdefault="UT2004.ini" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -134,13 +149,13 @@ logdir="${rootdir}/log" gamelogdir="${logdir}/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -gamelog="${gamelogdir}/${servicename}-game.log" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +gamelog="${gamelogdir}/${selfname}-game.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" -gamelogdate="${gamelogdir}/${servicename}-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" +gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/config-default/config-lgsm/ut3server/_default.cfg b/lgsm/config-default/config-lgsm/ut3server/_default.cfg index 990013274..6c1db9e1e 100644 --- a/lgsm/config-default/config-lgsm/ut3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut3server/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -23,13 +23,19 @@ pureserver="1" allowjoininprogress="true" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -# Edit with care | List of game types and mutators : http://wiki.unrealadmin.org/FAQ:UT3 +# Edit with care | List of game types and mutators : https://docs.linuxgsm.com/game-servers/unreal-tournament-3 fn_parms(){ -parms="server ${defaultmap}?Game=${game}?bIsDedicated=${isdedicated}?bIsLanMatch=${islanmatch}?bUsesStats=${usesstats}?bShouldAdvertise=${shouldadvertise}?PureServer=${pureserver}?bAllowJoinInProgress=${allowjoininprogress}?Mutator=${mutators}?ConfigSubDir=${servicename} -port=${port} -queryport=${queryport} -multihome=${ip} -nohomedir -unattended -log=${gamelog}" +parms="server ${defaultmap}?Game=${game}?bIsDedicated=${isdedicated}?bIsLanMatch=${islanmatch}?bUsesStats=${usesstats}?bShouldAdvertise=${shouldadvertise}?PureServer=${pureserver}?bAllowJoinInProgress=${allowjoininprogress}?Mutator=${mutators}?ConfigSubDir=${selfname} -port=${port} -queryport=${queryport} -multihome=${ip} -nohomedir -unattended -log=${gamelog}" } #### LinuxGSM Settings #### +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + ## Notification Alerts # (on|off) @@ -45,10 +51,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -75,6 +77,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -97,15 +103,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -118,7 +124,16 @@ sleeptime="0.5" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="1" +querytype="" + +## Game Server Details # Do not edit gamename="Unreal Tournament 3" engine="unreal3" @@ -127,13 +142,13 @@ glibc="2.3.2" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${systemdir}/Binaries" executable="./ut3" servercfg="UTGame.ini" servercfgdefault="UTGame.ini" -servercfgdir="${systemdir}/UTGame/Config/${servicename}" +servercfgdir="${systemdir}/UTGame/Config/${selfname}" servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory @@ -144,13 +159,13 @@ logdir="${rootdir}/log" gamelogdir="${logdir}/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -gamelog="${gamelogdir}/${servicename}-game.log" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +gamelog="${gamelogdir}/${selfname}-game.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" -gamelogdate="${gamelogdir}/${servicename}-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" +gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/config-default/config-lgsm/ut99server/_default.cfg b/lgsm/config-default/config-lgsm/ut99server/_default.cfg index 8c74230a2..3eb9e8043 100644 --- a/lgsm/config-default/config-lgsm/ut99server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut99server/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters defaultmap="DM-Deck16][" @@ -19,6 +19,12 @@ parms="server ${defaultmap}.unr ini=${servercfgfullpath}" #### LinuxGSM Settings #### +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + ## Notification Alerts # (on|off) @@ -34,10 +40,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -64,6 +66,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -86,15 +92,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -107,7 +113,16 @@ sleeptime="0.5" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-unreal2" + +## Game Server Details # Do not edit gamename="Unreal Tournament 99" engine="unreal" @@ -116,11 +131,11 @@ glibc="2.1" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/System" executabledir="${systemdir}" executable="./ucc-bin" -servercfg="${servicename}.ini" +servercfg="${selfname}.ini" servercfgdefault="Default.ini" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -134,11 +149,11 @@ logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/utserver/_default.cfg b/lgsm/config-default/config-lgsm/utserver/_default.cfg index 206625b7c..5227e99bf 100644 --- a/lgsm/config-default/config-lgsm/utserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/utserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters # For CTF: defaultmap="CTF-Face" gametype="CTF" @@ -23,6 +23,12 @@ parms="UnrealTournament ${defaultmap}?Game=${gametype}?TimeLimit=${timelimit} -p #### 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) @@ -38,10 +44,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -68,6 +70,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -90,15 +96,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -111,7 +117,16 @@ sleeptime="0.5" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="1" +querytype="" + +## Game Server Details # Do not edit gamename="Unreal Tournament" engine="unreal4" @@ -120,7 +135,7 @@ glibc="2.17" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/LinuxServer" executabledir="${systemdir}/Engine/Binaries/Linux" executable="./UE4Server-Linux-Shipping" @@ -136,11 +151,11 @@ logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/vsserver/_default.cfg b/lgsm/config-default/config-lgsm/vsserver/_default.cfg index 5ff4fc2d8..f1f8f7c4d 100644 --- a/lgsm/config-default/config-lgsm/vsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vsserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -22,6 +22,12 @@ parms="-game vs -strictportbind +ip ${ip} -port ${port} +clientport ${clientport #### 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) @@ -37,10 +43,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -67,6 +69,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -92,15 +98,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" appidmod="cstrike" @@ -109,7 +115,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -122,7 +128,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="9" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Vampire Slayer" engine="goldsource" @@ -131,11 +146,11 @@ glibc="2.3.4" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/vs" executabledir="${serverfiles}" executable="./hlds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -148,11 +163,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/wetserver/_default.cfg b/lgsm/config-default/config-lgsm/wetserver/_default.cfg index cdbaa61ec..3df5c91dc 100644 --- a/lgsm/config-default/config-lgsm/wetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wetserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ @@ -15,6 +15,12 @@ fn_parms(){ #### 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) @@ -30,10 +36,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -60,6 +62,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -82,15 +88,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -103,7 +109,16 @@ sleeptime="0.5" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-quake3" + +## Game Server Details # Do not edit gamename="Wolfenstein: Enemy Territory" engine="idtech3" @@ -112,11 +127,11 @@ glibc="2.2.4" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${systemdir}" executable="./etded" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/etmain" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -129,11 +144,11 @@ logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/wfserver/_default.cfg b/lgsm/config-default/config-lgsm/wfserver/_default.cfg index eb54646f8..dacb39aaf 100644 --- a/lgsm/config-default/config-lgsm/wfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wfserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -20,6 +20,12 @@ parms="+exec ${servercfg} +sv_http_ip ${ip} +set sv_http_port ${httpport} +sv_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) @@ -35,10 +41,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -65,6 +67,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -87,15 +93,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -108,7 +114,16 @@ sleeptime="0.5" # 10: Teamspeak 3 stopmode="3" -## SteamCMD Settings +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-quake3" + +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="1136510" appidmod="warfork" @@ -117,7 +132,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -## LinuxGSM Server Details +## Game Server Details # Do not edit gamename="Warfork" engine="qfusion" @@ -126,11 +141,11 @@ glibc="2.15" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/Warfork.app/Contents/Resources" executabledir="${systemdir}" executable="./wf_server.x86_64" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/basewf" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -143,11 +158,11 @@ logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/wurmserver/_default.cfg b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg index 7fb2493b8..08a17c81b 100644 --- a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ @@ -17,6 +17,12 @@ fn_parms(){ #### 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) @@ -32,10 +38,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -62,6 +64,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -84,15 +90,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="402370" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -100,7 +106,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -113,7 +119,16 @@ steammaster="false" # 10: Teamspeak 3 stopmode="2" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Wurm Unlimited" engine="wurm" @@ -122,11 +137,11 @@ glibc="2.14" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}" executabledir="${systemdir}" executable="xvfb-run ./WurmServerLauncher" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -139,11 +154,11 @@ logdir="${rootdir}/log" gamelogdir="${serverfiles}/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/zmrserver/_default.cfg b/lgsm/config-default/config-lgsm/zmrserver/_default.cfg index c4519b5f7..7de855e46 100644 --- a/lgsm/config-default/config-lgsm/zmrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/zmrserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -23,6 +23,12 @@ parms="-game zombie_master_reborn -strictportbind -ip ${ip} -port ${port} +clien #### 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) @@ -38,10 +44,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -68,6 +70,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -93,15 +99,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="244310" # Source 2013 SDK # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -109,7 +115,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -122,7 +128,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Zombie Master: Reborn" engine="source" @@ -131,11 +146,11 @@ glibc="2.15" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/zombie_master_reborn" executabledir="${serverfiles}" executable="./srcds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -148,11 +163,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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/config-default/config-lgsm/zpsserver/_default.cfg b/lgsm/config-default/config-lgsm/zpsserver/_default.cfg index e97e65dec..5f8d76c23 100644 --- a/lgsm/config-default/config-lgsm/zpsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/zpsserver/_default.cfg @@ -1,12 +1,12 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT 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 +# 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. -#### Server Settings #### +#### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" @@ -16,9 +16,9 @@ sourcetvport="27020" defaultmap="zps_deadend" maxplayers="20" -## Optional: Game Server Login Token +## Game Server Login Token (GSLT): Optional # GSLT can be used for running a public server. -# More info: https://linuxgsm.com/gslt +# More info: https://docs.linuxgsm.com/steamcmd/gslt gslt="" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters @@ -28,6 +28,12 @@ parms="-game zps -strictportbind -ip ${ip} -port ${port} +clientport ${clientpor #### 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) @@ -43,10 +49,6 @@ posttarget="https://hastebin.com" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -73,6 +75,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# 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) or else in "curlcustomstring". # like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need @@ -98,15 +104,15 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -## SteamCMD Settings +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="17505" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch @@ -114,7 +120,7 @@ branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -127,7 +133,16 @@ steammaster="true" # 10: Teamspeak 3 stopmode="3" -## LinuxGSM Server Details +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details # Do not edit gamename="Zombie Panic! Source" engine="source" @@ -136,11 +151,11 @@ glibc="2.15" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/zps" executabledir="${serverfiles}" executable="./srcds_run" -servercfg="${servicename}.cfg" +servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" @@ -153,11 +168,11 @@ logdir="${rootdir}/log" gamelogdir="${systemdir}/logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${servicename}-script.log" -consolelog="${consolelogdir}/${servicename}-console.log" -alertlog="${lgsmlogdir}/${servicename}-alert.log" -postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming -lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${servicename}-console-$(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 ab6bf8e96..e9d30c4c7 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -1,43 +1,43 @@ ahl,ahlserver,Action half-life ahl2,ahl2server,Action: Source -arma3,arma3server,ARMA 3 -sdtd,sdtdserver,7 Days to Die ark,arkserver,ARK: Survival Evolved -bo,boserver,Ballistic Overkill -bf1942,bf1942server,Battlefield 1942 +arma3,arma3server,ARMA 3 +bb,bbserver,BrainBread +bb2,bb2server,BrainBread 2 bd,bdserver,Base Defense +bf1942,bf1942server,Battlefield 1942 bmdm,bmdmserver,Black Mesa: Deathmatch +bo,boserver,Ballistic Overkill bs,bsserver,Blade Symphony -bb,bbserver,BrainBread -bb2,bb2server,BrainBread 2 bt,btserver,Barotrauma bt1944,bt1944server,Battalion 1944 +cc,ccserver,Codename CURE cod,codserver,Call of Duty cod2,cod2server,Call of Duty 2 cod4,cod4server,Call of Duty 4 coduo,coduoserver,Call of Duty: United Offensive codwaw,codwawserver,Call of Duty: World at War -cc,ccserver,Codename CURE cs,csserver,Counter-Strike 1.6 cscz,csczserver,Counter-Strike: Condition Zero csgo,csgoserver,Counter-Strike: Global Offensive css,cssserver,Counter-Strike: Source +dab,dabserver,Double Action: Boogaloo +dmc,dmcserver,Deathmatch Classic dod,dodserver,Day of Defeat dods,dodsserver,Day of Defeat: Source doi,doiserver,Day of Infamy -dmc,dmcserver,Deathmatch Classic dst,dstserver,Don't Starve Together -dab,dabserver,Double Action: Boogaloo dys,dysserver,Dystopia eco,ecoserver,Eco em,emserver,Empires Mod +etl,etlserver,ET: Legacy fctr,fctrserver,Factorio fof,fofserver,Fistful of Frags -gmod,gmodserver,Garrys Mod ges,gesserver,GoldenEye: Source +gmod,gmodserver,Garrys Mod hl2dm,hl2dmserver,Half-Life 2: Deathmatch -hldms,hldmsserver,Half-Life Deathmatch: Source hldm,hldmserver,Half-Life: Deathmatch +hldms,hldmsserver,Half-Life Deathmatch: Source hw,hwserver,Hurtworld ins,insserver,Insurgency inss,inssserver,Insurgency: Sandstorm @@ -51,6 +51,7 @@ l4d,l4dserver,Left 4 Dead l4d2,l4d2server,Left 4 Dead 2 mc,mcserver,Minecraft mh,mhserver,MORDHAU +mohaa,mohaaserver,Medal of Honor: Allied Assault mta,mtaserver,Multi Theft Auto mumble,mumbleserver,Mumble nd,ndserver,Nuclear Dawn @@ -59,44 +60,44 @@ ns,nsserver,Natural Selection ns2,ns2server,Natural Selection 2 ns2c,ns2cserver,NS2: Combat opfor,opforserver,Opposing Force +pc,pcserver,Project Cars pstbs,pstbsserver,Post Scriptum: The Bloody Seventh pvkii,pvkiiserver,Pirates Vikings & Knights II -pc,pcserver,Project Cars pz,pzserver,Project Zomboid q2,q2server,Quake 2 q3,q3server,Quake 3: Arena ql,qlserver,Quake Live qw,qwserver,Quake World -ro,roserver,Red Orchestra: Ostfront 41-45 ricochet,ricochetserver,Ricochet +ro,roserver,Red Orchestra: Ostfront 41-45 rtcw,rtcwserver,Return to Castle Wolfenstein rust,rustserver,Rust -rw,rwserver, Rising World +rw,rwserver,Rising World samp,sampserver,San Andreas Multiplayer -sbots,sbotsserver, StickyBots +sb,sbserver,Starbound +sbots,sbotsserver,StickyBots +sdtd,sdtdserver,7 Days to Die sfc,sfcserver,SourceForts Classic sof2,sof2server,Soldier Of Fortune 2: Gold Edition sol,solserver,Soldat +squad,squadserver,Squad ss3,ss3server,Serious Sam 3: BFE -sb,sbserver,Starbound st,stserver,Stationeers -squad,squadserver,Squad sven,svenserver,Sven Co-op +terraria,terrariaserver,Terraria tf2,tf2server,Team Fortress 2 tfc,tfcserver,Team Fortress Classic ts,tsserver,The Specialists ts3,ts3server,Teamspeak 3 -tw,twserver,Teeworlds -terraria,terrariaserver,Terraria tu,tuserver,Tower Unite +tw,twserver,Teeworlds +unt,untserver,Unturned ut2k4,ut2k4server,Unreal Tournament 2004 ut3,ut3server,Unreal Tournament 3 ut99,ut99server,Unreal Tournament 99 -unt,untserver,Unturned vs,vsserver,Vampire Slayer wet,wetserver,Wolfenstein: Enemy Territory wf,wfserver,Warfork wurm,wurmserver,Wurm Unlimited -etl,etlserver,ET: Legacy zmr,zmrserver,Zombie Master: Reborn zps,zpsserver,Zombie Panic! Source diff --git a/lgsm/functions/alert.sh b/lgsm/functions/alert.sh index e5f0e9c0c..c72967ed9 100644 --- a/lgsm/functions/alert.sh +++ b/lgsm/functions/alert.sh @@ -27,7 +27,7 @@ fn_alert_log(){ fn_alert_test(){ fn_script_log_info "Sending test alert" - alertsubject="Alert - ${servicename} - Test" + alertsubject="Alert - ${selfname} - Test" alertemoji="๐Ÿšง" alertsound="1" alerturl="not enabled" @@ -36,25 +36,25 @@ fn_alert_test(){ fn_alert_restart(){ fn_script_log_info "Sending alert: Restarted: ${executable} not running" - alertsubject="Alert - ${servicename} - Restarted" + alertsubject="Alert - ${selfname} - Restarted" alertemoji="๐Ÿšจ" alertsound="2" alerturl="not enabled" - alertbody="${servicename} ${executable} not running" + alertbody="${selfname} ${executable} not running" } fn_alert_restart_query(){ - fn_script_log_info "Sending alert: Restarted: ${servicename}" - alertsubject="Alert - ${servicename} - Restarted" + fn_script_log_info "Sending alert: Restarted: ${selfname}" + alertsubject="Alert - ${selfname} - Restarted" alertemoji="๐Ÿšจ" alertsound="2" alerturl="not enabled" - alertbody="Unable to query: ${servicename}" + alertbody="Unable to query: ${selfname}" } fn_alert_update(){ fn_script_log_info "Sending alert: Updated" - alertsubject="Alert - ${servicename} - Updated" + alertsubject="Alert - ${selfname} - Updated" alertemoji="๐ŸŽฎ" alertsound="1" alerturl="not enabled" @@ -63,20 +63,20 @@ fn_alert_update(){ fn_alert_permissions(){ fn_script_log_info "Sending alert: Permissions error" - alertsubject="Alert - ${servicename}: Permissions error" + alertsubject="Alert - ${selfname}: Permissions error" alertemoji="โ—" alertsound="2" alerturl="not enabled" - alertbody="${servicename} has permissions issues" + alertbody="${selfname} has permissions issues" } fn_alert_config(){ fn_script_log_info "Sending alert: New _default.cfg" - alertsubject="Alert - ${servicename} - New _default.cfg" + alertsubject="Alert - ${selfname} - New _default.cfg" alertemoji="๐ŸŽฎ" alertsound="1" alerturl="not enabled" - alertbody="${servicename} has recieved a new _default.cfg. Check file for changes." + alertbody="${servicename} has received a new _default.cfg. Check file for changes." } if [ "${alert}" == "permissions" ]; then @@ -98,7 +98,7 @@ fn_alert_log # Generates the more info link. if [ "${postalert}" == "on" ]&&[ -n "${postalert}" ]; then - alertflag=1 + exitbypass=1 command_postdetails.sh elif [ "${postalert}" != "on" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then fn_print_warn_nl "More Info not enabled" @@ -118,7 +118,7 @@ elif [ "${discordalert}" != "on" ]&&[ "${function_selfname}" == "command_test_al fn_script_log_warn "Discord alerts not enabled" elif [ -z "${discordtoken}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then fn_print_error_nl "Discord token not set" - echo " * https://docs.linuxgsm.com/alerts/discord" + echo -e " * https://docs.linuxgsm.com/alerts/discord" fn_script_error "Discord token not set" fi @@ -139,7 +139,7 @@ elif [ "${iftttalert}" != "on" ]&&[ "${function_selfname}" == "command_test_aler fn_script_log_warn "IFTTT alerts not enabled" elif [ -z "${ifttttoken}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then fn_print_error_nl "IFTTT token not set" - echo " * https://docs.linuxgsm.com/alerts/ifttt" + echo -e " * https://docs.linuxgsm.com/alerts/ifttt" fn_script_error "IFTTT token not set" fi @@ -150,7 +150,7 @@ elif [ "${mailgunalert}" != "on" ]&&[ "${function_selfname}" == "command_test_al fn_script_log_warn "Mailgun alerts not enabled" elif [ -z "${mailguntoken}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then fn_print_error_nl "Mailgun token not set" - echo " * https://docs.linuxgsm.com/alerts/mailgun" + echo -e " * https://docs.linuxgsm.com/alerts/mailgun" fn_script_error "Mailgun token not set" fi @@ -161,7 +161,7 @@ elif [ "${pushbulletalert}" != "on" ]&&[ "${function_selfname}" == "command_test fn_script_log_warn "Pushbullet alerts not enabled" elif [ -z "${pushbullettoken}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then fn_print_error_nl "Pushbullet token not set" - echo " * https://docs.linuxgsm.com/alerts/pushbullet" + echo -e " * https://docs.linuxgsm.com/alerts/pushbullet" fn_script_error "Pushbullet token not set" fi @@ -172,7 +172,7 @@ elif [ "${pushoveralert}" != "on" ]&&[ "${function_selfname}" == "command_test_a fn_script_log_warn "Pushover alerts not enabled" elif [ -z "${pushovertoken}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then fn_print_error_nl "Pushover token not set" - echo " * https://docs.linuxgsm.com/alerts/pushover" + echo -e " * https://docs.linuxgsm.com/alerts/pushover" fn_script_error "Pushover token not set" fi @@ -183,11 +183,11 @@ elif [ "${telegramalert}" != "on" ]&&[ "${function_selfname}" == "command_test_a fn_script_log_warn "Telegram Messages not enabled" elif [ -z "${telegramtoken}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then fn_print_error_nl "Telegram token not set." - echo " * https://docs.linuxgsm.com/alerts/telegram" + echo -e " * https://docs.linuxgsm.com/alerts/telegram" fn_script_error "Telegram token not set." elif [ -z "${telegramchatid}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then fn_print_error_nl "Telegram chat id not set." - echo " * https://docs.linuxgsm.com/alerts/telegram" + echo -e " * https://docs.linuxgsm.com/alerts/telegram" fn_script_error "Telegram chat id not set." fi @@ -198,6 +198,6 @@ elif [ "${slackalert}" != "on" ]&&[ "${function_selfname}" == "command_test_aler fn_script_log_warn "Slack alerts not enabled" elif [ -z "${slacktoken}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then fn_print_error_nl "Slack token not set" - echo " * https://docs.linuxgsm.com/alerts/slack" + echo -e " * https://docs.linuxgsm.com/alerts/slack" fn_script_error "Slack token not set" -fi \ No newline at end of file +fi diff --git a/lgsm/functions/alert_discord.sh b/lgsm/functions/alert_discord.sh index 0d4b22123..b404b8e0f 100644 --- a/lgsm/functions/alert_discord.sh +++ b/lgsm/functions/alert_discord.sh @@ -10,8 +10,8 @@ if ! command -v jq > /dev/null; then fn_script_log_fatal "Sending Discord alert: jq is missing." fi -escaped_servername="$(echo -n "${servername}" | jq -sRr "@json")" -escaped_alertbody="$(echo -n "${alertbody}" | jq -sRr "@json")" +escaped_servername=$(echo -n "${servername}" | jq -sRr "@json") +escaped_alertbody=$(echo -n "${alertbody}" | jq -sRr "@json") json=$(cat </dev/null)" ]&&[ "$(mono --version 2>&1 | grep -Po '(?<=version )\d')" -ge 5 ]; then + if [ -n "$(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 @@ -238,7 +238,7 @@ fn_found_missing_deps(){ fi if [ -n "${jqstatus}" ]; then fn_print_warning_nl "jq is not available in the ${distroname} repository" - echo " * https://docs.linuxgsm.com/requirements/jq" + echo -e " * https://docs.linuxgsm.com/requirements/jq" fi if [ "${autoinstall}" == "1" ]; then sudo -n true > /dev/null 2>&1 @@ -268,18 +268,18 @@ fn_found_missing_deps(){ if [ $? != 0 ]; then fn_print_failure_nl "Unable to install dependencies" fn_script_log_fatal "Unable to install dependencies" - echo "" + echo -e "" fn_print_warning_nl "Manually install dependencies." fn_script_log_warn "Manually install dependencies." if [ -n "$(command -v dpkg-query 2>/dev/null)" ]; then - echo " sudo dpkg --add-architecture i386; sudo apt update; sudo apt install ${array_deps_missing[@]}" + echo -e " sudo dpkg --add-architecture i386; sudo apt update; sudo apt install ${array_deps_missing[@]}" elif [ -n "$(command -v dnf 2>/dev/null)" ]; then - echo " sudo dnf install ${array_deps_missing[@]}" + echo -e " sudo dnf install ${array_deps_missing[@]}" elif [ -n "$(command -v yum 2>/dev/null)" ]; then - echo " sudo yum install ${array_deps_missing[@]}" + echo -e " sudo yum install ${array_deps_missing[@]}" fi if [ "${steamcmdfail}" ]; then - echo "" + echo -e "" fn_print_failure_nl "Missing dependencies required to run SteamCMD." fn_script_log_fatal "Missing dependencies required to run SteamCMD." core_exit.sh @@ -289,23 +289,23 @@ fn_found_missing_deps(){ fn_script_log_pass "Install dependencies completed" fi else - echo "" + echo -e "" 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." if [ -n "$(command -v dpkg-query 2>/dev/null)" ]; then - echo " sudo dpkg --add-architecture i386; sudo apt update; sudo apt install ${array_deps_missing[@]}" + echo -e " sudo dpkg --add-architecture i386; sudo apt update; sudo apt install ${array_deps_missing[@]}" elif [ -n "$(command -v dnf 2>/dev/null)" ]; then - echo " sudo dnf install ${array_deps_missing[@]}" + echo -e " sudo dnf install ${array_deps_missing[@]}" elif [ -n "$(command -v yum 2>/dev/null)" ]; then - echo " sudo yum install ${array_deps_missing[@]}" + echo -e " sudo yum install ${array_deps_missing[@]}" fi if [ "${steamcmdfail}" ]; then - echo "" + echo -e "" fn_print_failure_nl "Missing dependencies required to run SteamCMD." fn_script_log_fatal "Missing dependencies required to run SteamCMD." core_exit.sh fi - echo "" + echo -e "" fi if [ "${function_selfname}" == "command_install.sh" ]; then sleep 5 @@ -335,15 +335,12 @@ fn_deps_build_debian(){ array_deps_missing=() # LinuxGSM requirements. - array_deps_required=( curl wget ca-certificates file bsdmainutils util-linux python3 bzip2 gzip unzip binutils bc jq ) + array_deps_required=( curl wget ca-certificates file bsdmainutils util-linux python3 tar bzip2 gzip unzip binutils bc jq ) - # All servers except ts3 require tmux. - if [ "${shortname}" != "ts3" ]; then - if [ "$(command -v tmux 2>/dev/null)" ]; then - tmuxcheck=1 # Added for users compiling tmux from source to bypass check. - else - array_deps_required+=( tmux ) - fi + if [ -n "$(command -v tmux 2>/dev/null)" ]; then + tmuxcheck=1 # Added for users compiling tmux from source to bypass check. + else + array_deps_required+=( tmux ) fi # All servers except ts3, mumble, GTA and minecraft servers require libstdc++6 and lib32gcc1. @@ -392,7 +389,7 @@ fn_deps_build_debian(){ elif [ "${shortname}" == "hw" ]||[ "${shortname}" == "rust" ]; then array_deps_required+=( lib32z1 ) # Minecraft - elif [ "${shortname}" == "mc" ]; then + elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "rw" ]||[ "${shortname}" == "pz" ]; then javaversion=$(java -version 2>&1 | grep "version") if [ "${javaversion}" ]; then # Added for users using Oracle JRE to bypass the check. @@ -400,9 +397,12 @@ fn_deps_build_debian(){ else array_deps_required+=( openjdk-8-jre-headless ) fi + # Medal of Honor: Allied Assault + elif [ "${shortname}" == "mohaa" ]; then + array_deps_required+=( libstdc++5:i386 ) # Project Zomboid elif [ "${shortname}" == "pz" ]; then - if [ -n "$(java -version 2>&1 | grep "version")" ]; 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 ) @@ -430,12 +430,11 @@ fn_deps_build_debian(){ # Unreal Tournament elif [ "${shortname}" == "ut" ]; then array_deps_required+=( unzip ) - # Eco - elif [ "${shortname}" == "eco" ]; then - array_deps_required+=( mono-complete ) # Wurm: Unlimited elif [ "${shortname}" == "wurm" ]; then array_deps_required+=( xvfb ) + elif [ "${shortname}" == "pstbs" ]; then + array_deps_required+=( libgconf-2-4 ) fi fn_deps_email fn_check_loop @@ -448,27 +447,25 @@ fn_deps_build_redhat(){ # LinuxGSM requirements. # CentOS if [ "${distroversion}" == "6" ]; then - array_deps_required=( epel-release curl wget util-linux-ng python3 file gzip bzip2 unzip binutils bc jq ) + array_deps_required=( epel-release curl wget util-linux-ng python file tar gzip bzip2 unzip binutils bc jq ) elif [ "${distroversion}" == "7" ]; then - array_deps_required=( epel-release curl wget util-linux python3 file gzip bzip2 unzip binutils bc jq ) + array_deps_required=( epel-release curl wget util-linux python3 file tar gzip bzip2 unzip binutils bc jq ) elif [ "${distroversion}" == "8" ]; then - array_deps_required=( epel-release curl wget util-linux python3 file gzip bzip2 unzip binutils bc jq ) + array_deps_required=( epel-release curl wget util-linux python36 file tar gzip bzip2 unzip binutils bc jq ) elif [ "${distroid}" == "fedora" ]; then - array_deps_required=( curl wget util-linux python3 file gzip bzip2 unzip binutils bc jq ) + array_deps_required=( curl wget util-linux python3 file tar gzip bzip2 unzip binutils bc jq ) elif [[ "${distroname}" == *"Amazon Linux AMI"* ]]; then - array_deps_required=( curl wget util-linux python3 file gzip bzip2 unzip binutils bc jq ) + array_deps_required=( curl wget util-linux python3 file tar gzip bzip2 unzip binutils bc jq ) else - array_deps_required=( curl wget util-linux python3 file gzip bzip2 unzip binutils bc jq ) + array_deps_required=( curl wget util-linux python3 file tar gzip bzip2 unzip binutils bc jq ) fi # All servers except ts3 require tmux. - if [ "${shortname}" != "ts3" ]; then - if [ "$(command -v tmux 2>/dev/null)" ]; then - # Added for users compiling tmux from source to bypass check. - tmuxcheck=1 - else - array_deps_required+=( tmux ) - fi + if [ -n "$(command -v tmux 2>/dev/null)" ]; then + # Added for users compiling tmux from source to bypass check. + tmuxcheck=1 + else + array_deps_required+=( tmux ) fi # All servers except ts3, mumble, multi theft auto and minecraft servers require glibc.i686 and libstdc++.i686. @@ -511,18 +508,8 @@ fn_deps_build_redhat(){ array_deps_required+=( xz ) elif [ "${shortname}" == "hw" ]||[ "${shortname}" == "rust" ]; then array_deps_required+=( zlib-devel ) - # Minecraft - elif [ "${shortname}" == "mc" ]; then - javaversion=$(java -version 2>&1 | grep "version") - if [ "${javaversion}" ]; then - # Added for users using Oracle JRE to bypass the check. - javacheck=1 - array_deps_required+=( rng-tools ) - else - array_deps_required+=( java-1.8.0-openjdk rng-tools ) - fi - # Project Zomboid & Minecraft - elif [ "${shortname}" == "pz" ]; then + # Minecraft, Project Zomboid, Rising World + elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "rw" ]||[ "${shortname}" == "pz" ]; then javaversion=$(java -version 2>&1 | grep "version") if [ "${javaversion}" ]; then # Added for users using Oracle JRE to bypass the check. @@ -546,12 +533,13 @@ fn_deps_build_redhat(){ # Unreal Tournament elif [ "${shortname}" == "ut" ]; then array_deps_required+=( unzip ) - # Eco - elif [ "${shortname}" == "eco" ]; then - array_deps_required+=( mono-complete ) # Unturned elif [ "${shortname}" == "unt" ]; then array_deps_required+=( mono-complete ) + elif [ "${shortname}" == "wurm" ]; then + array_deps_required+=( xorg-x11-server-Xvfb ) + elif [ "${shortname}" == "pstbs" ]; then + array_deps_required+=( GConf2 ) fi fn_deps_email fn_check_loop @@ -559,16 +547,16 @@ fn_deps_build_redhat(){ if [ "${function_selfname}" == "command_install.sh" ]; then if [ "$(whoami)" == "root" ]; then - echo "" - echo "Checking Dependencies as root" - echo "=================================" + echo -e "" + echo -e "${lightyellow}Checking Dependencies as root${default}" + echo -e "=================================" fn_print_information_nl "Checking any missing dependencies for ${gamename} server only." fn_print_information_nl "This will NOT install a ${gamename} server." fn_sleep_time else - echo "" - echo "Checking Dependencies" - echo "=================================" + echo -e "" + echo -e "${lightyellow}Checking Dependencies${default}" + echo -e "=================================" fi fi diff --git a/lgsm/functions/check_executable.sh b/lgsm/functions/check_executable.sh index f0f0a67b7..88a93ffc5 100644 --- a/lgsm/functions/check_executable.sh +++ b/lgsm/functions/check_executable.sh @@ -5,12 +5,12 @@ # Description: Checks if server executable exists. local commandname="CHECK" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") # Check if executable exists if [ ! -f "${executabledir}/${execname}" ]; then fn_print_fail_nl "executable was not found" - echo "* ${executabledir}/${execname}" + echo -e "* ${executabledir}/${execname}" if [ -d "${lgsmlogdir}" ]; then fn_script_log_fatal "Executable was not found: ${executabledir}/${execname}" fi diff --git a/lgsm/functions/check_ip.sh b/lgsm/functions/check_ip.sh index b54dddd16..646a6899f 100644 --- a/lgsm/functions/check_ip.sh +++ b/lgsm/functions/check_ip.sh @@ -7,7 +7,7 @@ local commandname="CHECK" -if [ "${shortname}" != "ts3" ]&&[ "${shortname}" != "mumble" ]&&[ "${travistest}" != "1" ]; then +if [ "${travistest}" != "1" ]; then if [ ! -f "/bin/ip" ]; then ipcommand="/sbin/ip" else diff --git a/lgsm/functions/check_logs.sh b/lgsm/functions/check_logs.sh index 9f3e87427..4da3cd057 100644 --- a/lgsm/functions/check_logs.sh +++ b/lgsm/functions/check_logs.sh @@ -5,7 +5,7 @@ # Description: Checks if log files exist. local commandname="CHECK" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") fn_check_logs(){ fn_print_dots "Checking for log files" @@ -15,7 +15,7 @@ fn_check_logs(){ } # Create directories for the script and console logs. -if [ ! -d "${lgsmlogdir}" ]||[ ! -d "${consolelogdir}" ]&&[ "${shortname}" != "ts3" ]; then +if [ ! -d "${lgsmlogdir}" ]||[ ! -d "${consolelogdir}" ]; then fn_check_logs fi diff --git a/lgsm/functions/check_permissions.sh b/lgsm/functions/check_permissions.sh index aa7bb3de2..4d1e81413 100644 --- a/lgsm/functions/check_permissions.sh +++ b/lgsm/functions/check_permissions.sh @@ -41,7 +41,7 @@ fn_check_ownership(){ fi } | column -s $'\t' -t | tee -a "${lgsmlog}" - echo "" + echo -e "" fn_print_information_nl "please see https://docs.linuxgsm.com/support/faq#fail-starting-game-server-permission-issues-found" fn_script_log "For more information, please see https://docs.linuxgsm.com/support/faq#fail-starting-game-server-permission-issues-found" if [ "${monitorflag}" == 1 ]; then @@ -74,7 +74,7 @@ fn_check_permissions(){ # Check rootdir permissions. if [ -n "${rootdir}" ]; then # Get permission numbers on directory under the form 775. - rootdirperm="$(stat -c %a "${rootdir}")" + rootdirperm=$(stat -c %a "${rootdir}") # Grab the first and second digit for user and group permission. userrootdirperm="${rootdirperm:0:1}" grouprootdirperm="${rootdirperm:1:1}" @@ -94,10 +94,10 @@ fn_check_permissions(){ fi # Check if executable is executable and attempt to fix it. # First get executable name. - execname="$(basename "${executable}")" + execname=$(basename "${executable}") if [ -f "${executabledir}/${execname}" ]; then # Get permission numbers on file under the form 775. - execperm="$(stat -c %a "${executabledir}/${execname}")" + execperm=$(stat -c %a "${executabledir}/${execname}") # Grab the first and second digit for user and group permission. userexecperm="${execperm:0:1}" groupexecperm="${execperm:1:1}" @@ -118,7 +118,7 @@ fn_check_permissions(){ chmod u+x,g+x "${executabledir}/${execname}" # Second check to see if it's been successfully applied. # Get permission numbers on file under the form 775. - execperm="$(stat -c %a "${executabledir}/${execname}")" + execperm=$(stat -c %a "${executabledir}/${execname}") # Grab the first and second digit for user and group permission. userexecperm="${execperm:0:1}" groupexecperm="${execperm:1:1}" @@ -164,12 +164,12 @@ fn_sys_perm_errors_detect(){ # Display a message on how to fix the issue manually. fn_sys_perm_fix_manually_msg(){ - echo "" + echo -e "" fn_print_information_nl "This error causes servers to fail starting properly" fn_script_log_info "This error causes servers to fail starting properly." - echo " * To fix this issue, run the following command as root:" + echo -e " * To fix this issue, run the following command as root:" fn_script_log_info "To fix this issue, run the following command as root:" - echo " chmod a+rx /sys /sys/class /sys/class/net" + echo -e " chmod a+rx /sys /sys/class /sys/class/net" fn_script_log "chmod a+rx /sys /sys/class /sys/class/net" fn_sleep_time if [ "${monitorflag}" == 1 ]; then @@ -181,8 +181,7 @@ fn_sys_perm_fix_manually_msg(){ # Attempt to fix /sys related permission errors if sudo is available, exits otherwise. fn_sys_perm_errors_fix(){ - sudo -n true > /dev/null 2>&1 - if [ $? -eq 0 ]; then + if sudo -n true > /dev/null 2>&1; then fn_print_dots "Automatically fixing /sys permissions" fn_script_log_info "Automatically fixing /sys permissions." if [ "${sysdirpermerror}" == "1" ]; then diff --git a/lgsm/functions/check_root.sh b/lgsm/functions/check_root.sh index b5d20cf24..4200c5dc0 100644 --- a/lgsm/functions/check_root.sh +++ b/lgsm/functions/check_root.sh @@ -5,7 +5,7 @@ # Description: Checks if the user tried to run the script as root. local commandname="CHECK" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") if [ "$(whoami)" = "root" ]; then if [ "${function_selfname}" != "command_install.sh" ]; then diff --git a/lgsm/functions/check_status.sh b/lgsm/functions/check_status.sh index 529dcbf5b..d814197be 100644 --- a/lgsm/functions/check_status.sh +++ b/lgsm/functions/check_status.sh @@ -6,19 +6,6 @@ # Description: Checks the process status of the server. Either online or offline. local commandname="CHECK" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") -if [ "${shortname}" == "ts3" ]; then - # 1: Server is running - # 0: Server seems to have died - # 0: No server running (ts3server.pid is missing) - status=$("${executabledir}/ts3server_startscript.sh" status servercfgfullpathfile="${servercfgfullpath}") - if [ "${status}" == "Server is running" ]; then - status=1 - else - ts3error="${status}" - status=0 - fi -else - status=$(tmux list-sessions -F "#{session_name}" 2>/dev/null | grep -Ecx "^${servicename}") -fi +status=$(tmux list-sessions -F "#{session_name}" 2>/dev/null | grep -Ecx "^${selfname}") diff --git a/lgsm/functions/check_steamcmd.sh b/lgsm/functions/check_steamcmd.sh index 2972ae71d..3f6cd90de 100644 --- a/lgsm/functions/check_steamcmd.sh +++ b/lgsm/functions/check_steamcmd.sh @@ -23,7 +23,7 @@ fn_check_steamcmd_user(){ else fn_print_fail_nl "Steam login not set. Update steamuser in ${configdirserver}" fi - echo " * Change steamuser=\"username\" to a valid steam login." + echo -e " * Change steamuser=\"username\" to a valid steam login." if [ -d "${lgsmlogdir}" ]; then if [ "${legacymode}" == "1" ]; then fn_script_log_fatal "Steam login not set. Update steamuser in ${selfname}" diff --git a/lgsm/functions/check_system_dir.sh b/lgsm/functions/check_system_dir.sh index fd9ff3644..d11b30a20 100644 --- a/lgsm/functions/check_system_dir.sh +++ b/lgsm/functions/check_system_dir.sh @@ -5,7 +5,7 @@ # Description: Checks if systemdir/serverfiles is accessible. local commandname="CHECK" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") if [ "${function_selfname}" != "command_validate.sh" ]; then checkdir="${serverfiles}" diff --git a/lgsm/functions/check_system_requirements.sh b/lgsm/functions/check_system_requirements.sh index 1493f6b85..3c0345219 100644 --- a/lgsm/functions/check_system_requirements.sh +++ b/lgsm/functions/check_system_requirements.sh @@ -6,7 +6,7 @@ # Description: Checks RAM requirements local commandname="CHECK" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") info_distro.sh diff --git a/lgsm/functions/check_tmuxception.sh b/lgsm/functions/check_tmuxception.sh index 1a13bef9c..7e83cf844 100644 --- a/lgsm/functions/check_tmuxception.sh +++ b/lgsm/functions/check_tmuxception.sh @@ -12,8 +12,8 @@ fn_check_is_in_tmux(){ fn_print_fail_nl "tmuxception error: Sorry Cobb you cannot start a tmux session inside of a tmux session." fn_script_log_fatal "Tmuxception error: Attempted to start a tmux session inside of a tmux session." fn_print_information_nl "LinuxGSM creates a tmux session when starting the server." - echo "It is not possible to run a tmux session inside another tmux session" - echo "https://docs.linuxgsm.com/requirements/tmux#tmuxception" + echo -e "It is not possible to run a tmux session inside another tmux session" + echo -e "https://docs.linuxgsm.com/requirements/tmux#tmuxception" core_exit.sh fi } @@ -23,8 +23,8 @@ fn_check_is_in_screen(){ fn_print_fail_nl "tmuxception error: Sorry Cobb you cannot start a tmux session inside of a screen session." fn_script_log_fatal "Tmuxception error: Attempted to start a tmux session inside of a screen session." fn_print_information_nl "LinuxGSM creates a tmux session when starting the server." - echo "It is not possible to run a tmux session inside screen session" - echo "https://docs.linuxgsm.com/requirements/tmux#tmuxception" + echo -e "It is not possible to run a tmux session inside screen session" + echo -e "https://docs.linuxgsm.com/requirements/tmux#tmuxception" core_exit.sh fi } diff --git a/lgsm/functions/command_backup.sh b/lgsm/functions/command_backup.sh index 3a758886c..a7e3e337a 100644 --- a/lgsm/functions/command_backup.sh +++ b/lgsm/functions/command_backup.sh @@ -7,13 +7,13 @@ local commandname="BACKUP" local commandaction="Backup" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") check.sh # Trap to remove lockfile on quit. fn_backup_trap(){ - echo "" + echo -e "" echo -en "backup ${backupname}.tar.gz..." fn_print_canceled_eol_nl fn_script_log_info "Backup ${backupname}.tar.gz: CANCELED" @@ -37,8 +37,8 @@ fn_backup_check_lockfile(){ # Initialisation. fn_backup_init(){ - # Backup file name with servicename and current date. - backupname="${servicename}-$(date '+%Y-%m-%d-%H%M%S')" + # Backup file name with selfname and current date. + backupname="${selfname}-$(date '+%Y-%m-%d-%H%M%S')" info_distro.sh fn_print_dots "Backup starting" @@ -54,7 +54,7 @@ fn_backup_init(){ else daysago="${lastbackupdaysago} days ago" fi - echo " * Previous backup was created ${daysago}, total size ${lastbackupsize}" + echo -e " * Previous backup was created ${daysago}, total size ${lastbackupsize}" fi } @@ -67,14 +67,14 @@ fn_backup_stop_server(){ # Server is running and stoponbackup=off. elif [ "${stoponbackup}" == "off" ]; then serverstopped="no" - fn_print_warn_nl "${servicename} is currently running" - echo " * Although unlikely; creating a backup while ${servicename} is running might corrupt the backup." - fn_script_log_warn "${servicename} is currently running" - fn_script_log_warn "Although unlikely; creating a backup while ${servicename} is running might corrupt the backup" + fn_print_warn_nl "${selfname} is currently running" + echo -e " * Although unlikely; creating a backup while ${selfname} is running might corrupt the backup." + fn_script_log_warn "${selfname} is currently running" + fn_script_log_warn "Although unlikely; creating a backup while ${selfname} is running might corrupt the backup" # Server is running and will be stopped if stoponbackup=on or unset. else - fn_print_warn_nl "${servicename} will be stopped during the backup" - fn_script_log_warn "${servicename} will be stopped during the backup" + fn_print_warn_nl "${selfname} will be stopped during the backup" + fn_script_log_warn "${selfname} will be stopped during the backup" serverstopped="yes" exitbypass=1 command_stop.sh @@ -144,7 +144,7 @@ fn_backup_compression(){ if [ ${exitcode} -ne 0 ]; then fn_print_fail_eol fn_script_log_fatal "Backup in progress: FAIL" - echo "${tarcmd}" | tee -a "${lgsmlog}" + echo -e "${tarcmd}" | tee -a "${lgsmlog}" fn_print_fail_nl "Starting backup" fn_script_log_fatal "Starting backup" else @@ -174,7 +174,7 @@ fn_backup_prune(){ # If maxbackups greater or equal to backupsoutdatedcount, then it is over maxbackupdays. if [ "${backupquotadiff}" -ge "${backupsoudatedcount}" ]; then # Display how many backups will be cleared. - echo " * Pruning: ${backupquotadiff} backup(s) has exceeded the ${maxbackups} backups limit" + echo -e " * Pruning: ${backupquotadiff} backup(s) has exceeded the ${maxbackups} backups limit" fn_script_log_info "Pruning: ${backupquotadiff} backup(s) has exceeded the ${maxbackups} backups limit" fn_sleep_time fn_print_dots "Pruning: Clearing ${backupquotadiff} backup(s)" @@ -186,7 +186,7 @@ fn_backup_prune(){ # If maxbackupdays is used over maxbackups. elif [ "${backupquotadiff}" -lt "${backupsoudatedcount}" ]; then # Display how many backups will be cleared. - echo " * Pruning: ${backupsoudatedcount} backup(s) are older than ${maxbackupdays} days." + echo -e " * Pruning: ${backupsoudatedcount} backup(s) are older than ${maxbackupdays} days." fn_script_log_info "Pruning: ${backupsoudatedcount} backup(s) older than ${maxbackupdays} days." fn_sleep_time fn_print_dots "Pruning: Clearing ${backupquotadiff} backup(s)." @@ -243,7 +243,7 @@ fn_backup_relpath() { # traverse down, just add a newline. Otherwise at this point, there is # one remaining directory component in the backupdir to navigate. if (( "$base" < "${#bdirtoks[@]}" )) ; then - echo "${bdirtoks[ $(( ${#bdirtoks[@]} - 1)) ]}" + echo -e "${bdirtoks[ $(( ${#bdirtoks[@]} - 1)) ]}" else echo fi @@ -267,4 +267,5 @@ fn_backup_migrate_olddir fn_backup_compression fn_backup_prune fn_backup_start_server + core_exit.sh diff --git a/lgsm/functions/command_console.sh b/lgsm/functions/command_console.sh index 26f0a4707..4dfa2a4a3 100644 --- a/lgsm/functions/command_console.sh +++ b/lgsm/functions/command_console.sh @@ -6,7 +6,7 @@ local commandname="CONSOLE" local commandaction="Console" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") check.sh fn_print_header @@ -16,17 +16,17 @@ if [ "${shortname}" == "rust" ]||[ "${shortname}" == "hw" ]||[ "${shortname}" == fi fn_print_information_nl "Press \"CTRL+b\" then \"d\" to exit console." fn_print_warning_nl "Do NOT press CTRL+c to exit." -echo " * https://docs.linuxgsm.com/commands/console" -echo "" +echo -e " * https://docs.linuxgsm.com/commands/console" +echo -e "" if ! fn_prompt_yn "Continue?" Y; then - echo Exiting; return + return fi fn_print_dots "Accessing console" check_status.sh if [ "${status}" != "0" ]; then fn_print_ok_nl "Accessing console" fn_script_log_pass "Console accessed" - tmux attach-session -t "${servicename}" + tmux attach-session -t "${selfname}" fn_print_ok_nl "Closing console" fn_script_log_pass "Console closed" else diff --git a/lgsm/functions/command_debug.sh b/lgsm/functions/command_debug.sh index b06f05263..dda8b1170 100644 --- a/lgsm/functions/command_debug.sh +++ b/lgsm/functions/command_debug.sh @@ -6,7 +6,7 @@ local commandname="DEBUG" local commandaction="Debug" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") # Trap to remove lockfile on quit. fn_lockfile_trap(){ @@ -26,67 +26,67 @@ info_config.sh # NOTE: Check if works with server without parms. Could be intergrated in to info_parms.sh. fn_parms fn_print_header -echo -e "${blue}Distro:\t${default}${distroname}" -echo -e "${blue}Arch:\t${default}${arch}" -echo -e "${blue}Kernel:\t${default}${kernel}" -echo -e "${blue}Hostname:\t${default}${HOSTNAME}" -echo -e "${blue}tmux:\t${default}${tmuxv}" -echo -e "${blue}Avg Load:\t${default}${load}" -echo -e "${blue}Free Memory:\t${default}${physmemfree}" -echo -e "${blue}Free Disk:\t${default}${availspace}" - +{ + echo -e "${lightblue}Distro:\t\t${default}${distroname}" + echo -e "${lightblue}Arch:\t\t${default}${arch}" + echo -e "${lightblue}Kernel:\t\t${default}${kernel}" + echo -e "${lightblue}Hostname:\t\t${default}${HOSTNAME}" + echo -e "${lightblue}tmux:\t\t${default}${tmuxv}" + echo -e "${lightblue}Avg Load:\t\t${default}${load}" + echo -e "${lightblue}Free Memory:\t\t${default}${physmemfree}" + echo -e "${lightblue}Free Disk:\t\t${default}${availspace}" +} | column -s $'\t' -t # glibc required. if [ -n "${glibc}" ]; then if [ "${glibc}" == "null" ]; then # Glibc is not required. : elif [ -z "${glibc}" ]; then - echo -e "${blue}glibc required:\t${red}UNKNOWN${default}" + echo -e "${lightblue}glibc required:\t${red}UNKNOWN${default}" elif [ "$(printf '%s\n'${glibc}'\n' ${glibcversion} | sort -V | head -n 1)" != "${glibc}" ]; then - echo -e "${blue}glibc required:\t${red}${glibc} ${default}(${red}distro glibc ${glibcversion} too old${default})" + echo -e "${lightblue}glibc required:\t${red}${glibc} ${default}(${red}distro glibc ${glibcversion} too old${default})" else - echo -e "${blue}glibc required:\t${green}${glibc}${default}" + echo -e "${lightblue}glibc required:\t${green}${glibc}${default}" fi fi # Server IP if [ "${multiple_ip}" == "1" ]; then - echo -e "${blue}Server IP:\t${default}NOT SET" + echo -e "${lightblue}Server IP:\t${default}NOT SET" else - echo -e "${blue}Server IP:\t${default}${ip}:${port}" + echo -e "${lightblue}Server IP:\t${default}${ip}:${port}" fi # External server IP. if [ -n "${extip}" ]; then if [ "${ip}" != "${extip}" ]; then - echo -e "${blue}Internet IP:\t${default}${extip}:${port}" + echo -e "${lightblue}Internet IP:\t${default}${extip}:${port}" fi fi # Listed on Master Server. if [ "${displaymasterserver}" ];then if [ "${displaymasterserver}" == "true" ];then - echo -e "${blue}Master Server:\t${green}${displaymasterserver}${default}" + echo -e "${lightblue}Master Server:\t${green}${displaymasterserver}${default}" else - echo -e "${blue}Master Server:\t${red}${displaymasterserver}${default}" + echo -e "${lightblue}Master Server:\t${red}${displaymasterserver}${default}" fi fi # Server password. if [ -n "${serverpassword}" ]; then - echo -e "${blue}Server password:\t${default}${serverpassword}" + echo -e "${lightblue}Server password:\t${default}${serverpassword}" fi -echo "" -echo "Start parameters:" +echo -e "${lightblue}Start parameters:${default}" if [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then - echo "${executable} ${parms} -debug" + echo -e "${executable} ${parms} -debug" else - echo "${executable} ${parms}" + echo -e "${executable} ${parms}" fi -echo "" +echo -e "" echo -e "Use for identifying server issues only!" echo -e "Press CTRL+c to drop out of debug mode." -fn_print_warning_nl "If ${servicename} is already running it will be stopped." -echo "" +fn_print_warning_nl "If ${selfname} is already running it will be stopped." +echo -e "" if ! fn_prompt_yn "Continue?" Y; then - echo Exiting; return + return fi fn_print_info_nl "Stopping any running servers" @@ -123,4 +123,5 @@ fn_print_dots "Stopping debug" fn_print_ok_nl "Stopping debug" # remove trap. trap - INT + core_exit.sh diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index 6e4e8fecc..889febbd4 100644 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -7,7 +7,7 @@ local commandname="DETAILS" local commandaction="Details" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") # Run checks and gathers details to display. check.sh @@ -30,4 +30,5 @@ fi fn_info_message_ports fn_info_message_select_engine fn_info_message_statusbottom + core_exit.sh diff --git a/lgsm/functions/command_dev_clear_functions.sh b/lgsm/functions/command_dev_clear_functions.sh index 5c698f05f..51878a381 100644 --- a/lgsm/functions/command_dev_clear_functions.sh +++ b/lgsm/functions/command_dev_clear_functions.sh @@ -4,12 +4,13 @@ # Website: https://linuxgsm.com # Description: Deletes the contents of the functions dir. -echo "=================================" -echo "Clear Functions" -echo "=================================" -echo "" +echo -e "=================================" +echo -e "Clear Functions" +echo -e "=================================" +echo -e "" if fn_prompt_yn "Do you want to delete all functions?" Y; then rm -rfv "${functionsdir:?}/"* rm -rfv "${configdirdefault:?}/"* fi + core_exit.sh diff --git a/lgsm/functions/command_dev_debug.sh b/lgsm/functions/command_dev_debug.sh index 5229d068d..0cb3e48b5 100644 --- a/lgsm/functions/command_dev_debug.sh +++ b/lgsm/functions/command_dev_debug.sh @@ -6,7 +6,7 @@ local commandname="DEV-DEBUG" local commandaction="Dev-Debug" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") if [ -f "${rootdir}/.dev-debug" ]; then rm "${rootdir}/.dev-debug" @@ -17,4 +17,5 @@ else fn_print_ok_nl "Enabled dev-debug" fn_script_log_info "Enabled dev-debug" fi + core_exit.sh diff --git a/lgsm/functions/command_dev_detect_deps.sh b/lgsm/functions/command_dev_detect_deps.sh index ad431a722..252b37022 100644 --- a/lgsm/functions/command_dev_detect_deps.sh +++ b/lgsm/functions/command_dev_detect_deps.sh @@ -6,19 +6,19 @@ local commandname="DETECT-DEPS" local commandaction="Detect-Deps" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") -echo "=================================" -echo "Dependencies Checker" -echo "=================================" -echo "Checking directory: " -echo "${serverfiles}" -if [ "$(command -v eu-readelf 2>/dev/null)" ]; then +echo -e "=================================" +echo -e "Dependencies Checker" +echo -e "=================================" +echo -e "Checking directory: " +echo -e "${serverfiles}" +if [ -n "$(command -v eu-readelf 2>/dev/null)" ]; then readelf=eu-readelf -elif [ "$(command -v readelf 2>/dev/null)" ]; then +elif [ -n "$(command -v readelf 2>/dev/null)" ]; then readelf=readelf else - echo "readelf/eu-readelf not installed" + echo -e "readelf/eu-readelf not installed" fi files=$(find "${serverfiles}" | wc -l) find "${serverfiles}" -type f -print0 | @@ -35,14 +35,14 @@ done sort "${tmpdir}/.depdetect_readelf" |uniq >"${tmpdir}/.depdetect_readelf_uniq" while read -r lib; do - echo "${lib}" + echo -e "${lib}" local libs_array=( libm.so.6 libc.so.6 libtcmalloc_minimal.so.4 libpthread.so.0 libdl.so.2 libnsl.so.1 libgcc_s.so.1 librt.so.1 ld-linux.so.2 libdbus-glib-1.so.2 libgio-2.0.so.0 libglib-2.0.so.0 libGL.so.1 libgobject-2.0.so.0 libnm-glib.so.4 libnm-util.so.2 ) for lib_file in "${libs_array[@]}" do if [ "${lib}" == "${lib_file}" ]; then - echo "glibc.i686" >> "${tmpdir}/.depdetect_centos_list" - echo "lib32gcc1" >> "${tmpdir}/.depdetect_ubuntu_list" - echo "lib32gcc1" >> "${tmpdir}/.depdetect_debian_list" + echo -e "glibc.i686" >> "${tmpdir}/.depdetect_centos_list" + echo -e "lib32gcc1" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "lib32gcc1" >> "${tmpdir}/.depdetect_debian_list" libdetected=1 fi done @@ -51,9 +51,9 @@ while read -r lib; do for lib_file in "${libs_array[@]}" do if [ "${lib}" == "${lib_file}" ]; then - echo "java-1.8.0-openjdk" >> "${tmpdir}/.depdetect_centos_list" - echo "default-jre" >> "${tmpdir}/.depdetect_ubuntu_list" - echo "default-jre" >> "${tmpdir}/.depdetect_debian_list" + echo -e "java-1.8.0-openjdk" >> "${tmpdir}/.depdetect_centos_list" + echo -e "default-jre" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "default-jre" >> "${tmpdir}/.depdetect_debian_list" libdetected=1 fi done @@ -68,66 +68,71 @@ while read -r lib; do done if [ "${lib}" == "libstdc++.so.6" ]; then - echo "libstdc++.i686" >> "${tmpdir}/.depdetect_centos_list" - echo "libstdc++6:i386" >> "${tmpdir}/.depdetect_ubuntu_list" - echo "libstdc++6:i386" >> "${tmpdir}/.depdetect_debian_list" + echo -e "libstdc++.i686" >> "${tmpdir}/.depdetect_centos_list" + echo -e "libstdc++6:i386" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "libstdc++6:i386" >> "${tmpdir}/.depdetect_debian_list" libdetected=1 elif [ "${lib}" == "libstdc++.so.5" ]; then - echo "compat-libstdc++-33.i686" >> "${tmpdir}/.depdetect_centos_list" - echo "libstdc++5:i386" >> "${tmpdir}/.depdetect_ubuntu_list" - echo "libstdc++5:i386" >> "${tmpdir}/.depdetect_debian_list" + echo -e "compat-libstdc++-33.i686" >> "${tmpdir}/.depdetect_centos_list" + echo -e "libstdc++5:i386" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "libstdc++5:i386" >> "${tmpdir}/.depdetect_debian_list" libdetected=1 elif [ "${lib}" == "libcurl-gnutls.so.4" ]; then - echo "libcurl.i686" >> "${tmpdir}/.depdetect_centos_list" - echo "libcurl4-gnutls-dev:i386" >> "${tmpdir}/.depdetect_ubuntu_list" - echo "libcurl4-gnutls-dev:i386" >> "${tmpdir}/.depdetect_debian_list" + echo -e "libcurl.i686" >> "${tmpdir}/.depdetect_centos_list" + echo -e "libcurl4-gnutls-dev:i386" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "libcurl4-gnutls-dev:i386" >> "${tmpdir}/.depdetect_debian_list" libdetected=1 elif [ "${lib}" == "libspeex.so.1" ]||[ "${lib}" == "libspeexdsp.so.1" ]; then - echo "speex.i686" >> "${tmpdir}/.depdetect_centos_list" - echo "speex:i386" >> "${tmpdir}/.depdetect_ubuntu_list" - echo "speex:i386" >> "${tmpdir}/.depdetect_debian_list" + echo -e "speex.i686" >> "${tmpdir}/.depdetect_centos_list" + echo -e "speex:i386" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "speex:i386" >> "${tmpdir}/.depdetect_debian_list" libdetected=1 elif [ "${lib}" == "./libSDL-1.2.so.0" ]||[ "${lib}" == "libSDL-1.2.so.0" ]; then - echo "SDL.i686" >> "${tmpdir}/.depdetect_centos_list" - echo "libsdl1.2debian" >> "${tmpdir}/.depdetect_ubuntu_list" - echo "libsdl1.2debian" >> "${tmpdir}/.depdetect_debian_list" + echo -e "SDL.i686" >> "${tmpdir}/.depdetect_centos_list" + echo -e "libsdl1.2debian" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "libsdl1.2debian" >> "${tmpdir}/.depdetect_debian_list" libdetected=1 elif [ "${lib}" == "libtbb.so.2" ]; then - echo "tbb.i686" >> "${tmpdir}/.depdetect_centos_list" - echo "libtbb2" >> "${tmpdir}/.depdetect_ubuntu_list" - echo "libtbb2" >> "${tmpdir}/.depdetect_debian_list" + echo -e "tbb.i686" >> "${tmpdir}/.depdetect_centos_list" + echo -e "libtbb2" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "libtbb2" >> "${tmpdir}/.depdetect_debian_list" libdetected=1 elif [ "${lib}" == "libXrandr.so.2" ]; then - echo "libXrandr" >> "${tmpdir}/.depdetect_centos_list" - echo "libxrandr2" >> "${tmpdir}/.depdetect_ubuntu_list" - echo "libxrandr2" >> "${tmpdir}/.depdetect_debian_list" + echo -e "libXrandr" >> "${tmpdir}/.depdetect_centos_list" + echo -e "libxrandr2" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "libxrandr2" >> "${tmpdir}/.depdetect_debian_list" libdetected=1 elif [ "${lib}" == "libXext.so.6" ]; then - echo "libXext" >> "${tmpdir}/.depdetect_centos_list" - echo "libxext6" >> "${tmpdir}/.depdetect_ubuntu_list" - echo "libxext6" >> "${tmpdir}/.depdetect_debian_list" + echo -e "libXext" >> "${tmpdir}/.depdetect_centos_list" + echo -e "libxext6" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "libxext6" >> "${tmpdir}/.depdetect_debian_list" libdetected=1 elif [ "${lib}" == "libXtst.so.6" ]; then - echo "libXtst" >> "${tmpdir}/.depdetect_centos_list" - echo "libxtst6" >> "${tmpdir}/.depdetect_ubuntu_list" - echo "libxtst6" >> "${tmpdir}/.depdetect_debian_list" + echo -e "libXtst" >> "${tmpdir}/.depdetect_centos_list" + echo -e "libxtst6" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "libxtst6" >> "${tmpdir}/.depdetect_debian_list" libdetected=1 elif [ "${lib}" == "libpulse.so.0" ]; then - echo "pulseaudio-libs" >> "${tmpdir}/.depdetect_centos_list" - echo "libpulse0" >> "${tmpdir}/.depdetect_ubuntu_list" - echo "libpulse0" >> "${tmpdir}/.depdetect_debian_list" + echo -e "pulseaudio-libs" >> "${tmpdir}/.depdetect_centos_list" + echo -e "libpulse0" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "libpulse0" >> "${tmpdir}/.depdetect_debian_list" libdetected=1 elif [ "${lib}" == "libopenal.so.1" ]; then - echo "" >> "${tmpdir}/.depdetect_centos_list" - echo "libopenal1" >> "${tmpdir}/.depdetect_ubuntu_list" - echo "libopenal1" >> "${tmpdir}/.depdetect_debian_list" + echo -e "" >> "${tmpdir}/.depdetect_centos_list" + echo -e "libopenal1" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "libopenal1" >> "${tmpdir}/.depdetect_debian_list" + libdetected=1 + elif [ "${lib}" == "libgconf-2.so.4" ]; then + echo -e "GConf2" >> "${tmpdir}/.depdetect_centos_list" + echo -e "libgconf2-4" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "libgconf2-4" >> "${tmpdir}/.depdetect_debian_list" libdetected=1 fi if [ "${libdetected}" != "1" ]; then unknownlib=1 - echo "${lib}" >> "${tmpdir}/.depdetect_unknown" + echo -e "${lib}" >> "${tmpdir}/.depdetect_unknown" fi unset libdetected done < "${tmpdir}/.depdetect_readelf_uniq" @@ -142,35 +147,35 @@ fi awk -vORS='' '{ print $1,$2 }' "${tmpdir}/.depdetect_centos_list_uniq" > "${tmpdir}/.depdetect_centos_line" awk -vORS='' '{ print $1,$2 }' "${tmpdir}/.depdetect_ubuntu_list_uniq" > "${tmpdir}/.depdetect_ubuntu_line" awk -vORS='' '{ print $1,$2 }' "${tmpdir}/.depdetect_debian_list_uniq" > "${tmpdir}/.depdetect_debian_line" -echo "" -echo "" -echo "Required Dependencies" -echo "=================================" -echo "${executable}" -echo "" -echo "CentOS" -echo "=================================" +echo -e "" +echo -e "" +echo -e "Required Dependencies" +echo -e "=================================" +echo -e "${executable}" +echo -e "" +echo -e "CentOS" +echo -e "=================================" cat "${tmpdir}/.depdetect_centos_line" -echo "" -echo "" -echo "Ubuntu" -echo "=================================" +echo -e "" +echo -e "" +echo -e "Ubuntu" +echo -e "=================================" cat "${tmpdir}/.depdetect_ubuntu_line" -echo "" -echo "" -echo "Debian" -echo "=================================" +echo -e "" +echo -e "" +echo -e "Debian" +echo -e "=================================" cat "${tmpdir}/.depdetect_debian_line" -echo "" +echo -e "" if [ "${unknownlib}" == "1" ]; then - echo "" - echo "Unknown shared Library" - echo "=================================" + echo -e "" + echo -e "Unknown shared Library" + echo -e "=================================" cat "${tmpdir}/.depdetect_unknown" fi -echo "" -echo "Required Librarys" -echo "=================================" +echo -e "" +echo -e "Required Librarys" +echo -e "=================================" sort "${tmpdir}/.depdetect_readelf" | uniq echo -en "\n" rm -f "${tmpdir}/.depdetect_centos_line" diff --git a/lgsm/functions/command_dev_detect_glibc.sh b/lgsm/functions/command_dev_detect_glibc.sh index 7f0fc409c..e86fb05db 100644 --- a/lgsm/functions/command_dev_detect_glibc.sh +++ b/lgsm/functions/command_dev_detect_glibc.sh @@ -7,11 +7,11 @@ local commandname="DETECT-GLIBC" local commandaction="Detect-Glibc" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") -echo "=================================" -echo "glibc Requirements Checker" -echo "=================================" +echo -e "=================================" +echo -e "glibc Requirements Checker" +echo -e "=================================" if [ -z "$(command -v objdump)" ]; then fn_print_failure_nl "objdump is missing" @@ -20,17 +20,17 @@ if [ -z "$(command -v objdump)" ]; then fi if [ -z "${serverfiles}" ]; then - dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" + dir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") fi if [ -d "${serverfiles}" ]; then - echo "Checking directory: " - echo "${serverfiles}" + echo -e "Checking directory: " + echo -e "${serverfiles}" elif [ -f "${serverfiles}" ]; then - echo "Checking file: " - echo "${serverfiles}" + echo -e "Checking file: " + echo -e "${serverfiles}" fi -echo "" +echo -e "" local glibc_check_dir_array=( steamcmddir serverfiles ) @@ -50,25 +50,25 @@ do while IFS= read -r -d $'\0' line; do glibcversion=$(objdump -T "${line}" 2>/dev/null | grep -oP "GLIBC[^ ]+" | grep -v GLIBCXX | sort | uniq | sort -r --version-sort | head -n 1) if [ "${glibcversion}" ]; then - echo "${glibcversion}: ${line}" >>"${tmpdir}/detect_glibc_files_${glibc_check_var}.tmp" + echo -e "${glibcversion}: ${line}" >>"${tmpdir}/detect_glibc_files_${glibc_check_var}.tmp" fi objdump -T "${line}" 2>/dev/null | grep -oP "GLIBC[^ ]+" >>"${tmpdir}/detect_glibc_${glibc_check_var}.tmp" echo -n "${i} / ${glibc_check_files}" $'\r' ((i++)) done - echo "" - echo "" - echo "${glibc_check_name} glibc Requirements" - echo "=================================" + echo -e "" + echo -e "" + echo -e "${glibc_check_name} glibc Requirements" + echo -e "=================================" if [ -f "${tmpdir}/detect_glibc_files_${glibc_check_var}.tmp" ]; then - echo "Required glibc" + echo -e "Required glibc" cat "${tmpdir}/detect_glibc_${glibc_check_var}.tmp" | sort | uniq | sort -r --version-sort | head -1 |tee -a "${tmpdir}/detect_glibc_highest.tmp" - echo "" - echo "Files requiring GLIBC" - echo "Highest verion required: filename" + echo -e "" + echo -e "Files requiring GLIBC" + echo -e "Highest verion required: filename" cat "${tmpdir}/detect_glibc_files_${glibc_check_var}.tmp" - echo "" - echo "All required GLIBC versions" + echo -e "" + echo -e "All required GLIBC versions" cat "${tmpdir}/detect_glibc_${glibc_check_var}.tmp" | sort | uniq | sort -r --version-sort rm "${tmpdir}/detect_glibc_${glibc_check_var}.tmp" rm "${tmpdir}/detect_glibc_files_${glibc_check_var}.tmp" @@ -79,13 +79,14 @@ do fn_print_information_nl "${glibc_check_name} is not installed" fi done -echo "" -echo "Final glibc Requirement" -echo "=================================" +echo -e "" +echo -e "Final glibc Requirement" +echo -e "=================================" if [ -f "${tmpdir}/detect_glibc_highest.tmp" ]; then cat "${tmpdir}/detect_glibc_highest.tmp" | sort | uniq | sort -r --version-sort | head -1 rm "${tmpdir}/detect_glibc_highest.tmp" else fn_print_information_nl "glibc is not required" fi + core_exit.sh diff --git a/lgsm/functions/command_dev_detect_ldd.sh b/lgsm/functions/command_dev_detect_ldd.sh index 95898c4e4..3df4b0a58 100644 --- a/lgsm/functions/command_dev_detect_ldd.sh +++ b/lgsm/functions/command_dev_detect_ldd.sh @@ -7,50 +7,50 @@ local commandname="DETECT-LDD" local commandaction="Detect-LDD" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") -echo "=================================" -echo "Shared Object dependencies Checker" -echo "=================================" +echo -e "=================================" +echo -e "Shared Object dependencies Checker" +echo -e "=================================" if [ -z "${serverfiles}" ]; then - dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" + dir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") fi if [ -d "${serverfiles}" ]; then - echo "Checking directory: " - echo "${serverfiles}" + echo -e "Checking directory: " + echo -e "${serverfiles}" elif [ -f "${serverfiles}" ]; then - echo "Checking file: " - echo "${serverfiles}" + echo -e "Checking file: " + echo -e "${serverfiles}" fi -echo "" +echo -e "" files=$(find "${serverfiles}" | wc -l) find "${serverfiles}" -type f -print0 | while IFS= read -r -d $'\0' line; do if ldd "${line}" 2>/dev/null | grep -v "not a dynamic executable" then - echo "${line}" >> "${tmpdir}/detect_ldd.tmp" + echo -e "${line}" >> "${tmpdir}/detect_ldd.tmp" ldd "${line}" 2>/dev/null | grep -v "not a dynamic executable" >> "${tmpdir}/detect_ldd.tmp" if ldd "${line}" 2>/dev/null | grep -v "not a dynamic executable" | grep "not found" then - echo "${line}" >> "${tmpdir}/detect_ldd_not_found.tmp" + echo -e "${line}" >> "${tmpdir}/detect_ldd_not_found.tmp" ldd "${line}" 2>/dev/null | grep -v "not a dynamic executable" | grep "not found" >> "${tmpdir}/detect_ldd_not_found.tmp" fi fi echo -n "$i / $files" $'\r' ((i++)) done -echo "" -echo "" -echo "All" -echo "=================================" +echo -e "" +echo -e "" +echo -e "All" +echo -e "=================================" cat "${tmpdir}/detect_ldd.tmp" -echo "" -echo "Not Found" -echo "=================================" +echo -e "" +echo -e "Not Found" +echo -e "=================================" cat "${tmpdir}/detect_ldd_not_found.tmp" rm "${tmpdir}/detect_ldd.tmp" diff --git a/lgsm/functions/command_dev_query_raw.sh b/lgsm/functions/command_dev_query_raw.sh index 79072468f..a0efd2690 100644 --- a/lgsm/functions/command_dev_query_raw.sh +++ b/lgsm/functions/command_dev_query_raw.sh @@ -6,14 +6,15 @@ local commandname="QUERY-RAW" local commandaction="Query Raw" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -echo "" -echo "Query Port" -echo "==================================================================" -echo "" -echo "Gamedig Raw Output" -echo "=================================" -echo"" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") + +echo -e "" +echo -e "Query Port - Raw Output" +echo -e "==================================================================" +echo -e "" +echo -e "Gamedig Raw Output" +echo -e "=================================" +echo -e "" if [ ! "$(command -v gamedig 2>/dev/null)" ]; then fn_print_failure_nl "gamedig not installed" fi @@ -24,77 +25,54 @@ fi check.sh info_config.sh info_parms.sh -if [ "${engine}" == "idtech3_ql" ]; then - local engine="quakelive" -elif [ "${shortname}" == "kf2" ]; then - local engine="unreal4" -fi query_gamedig.sh -echo "${gamedigcmd}" +echo -e "${gamedigcmd}" echo"" -echo "${gamedigraw}" | jq -echo"" -echo "gsquery Raw Output" -echo "=================================" -echo"" -echo "./query_gsquery.py -a \"${ip}\" -p \"${queryport}\" -e \"${engine}\"" +echo -e "${gamedigraw}" | jq + +echo -e "" +echo -e "gsquery Raw Output" +echo -e "=================================" +echo -e "" +echo -e "./query_gsquery.py -a \"${ip}\" -p \"${queryport}\" -e \"${querytype}\"" +echo -e "" if [ ! -f "${functionsdir}/query_gsquery.py" ]; then fn_fetch_file_github "lgsm/functions" "query_gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nomd5" fi -"${functionsdir}"/query_gsquery.py -a "${ip}" -p "${queryport}" -e "${engine}" +"${functionsdir}"/query_gsquery.py -a "${ip}" -p "${queryport}" -e "${querytype}" -echo"" -echo "TCP Raw Output" -echo "=================================" -echo"" -echo "bash -c 'exec 3<> /dev/tcp/'${ip}'/'${queryport}''" +echo -e "" +echo -e "TCP Raw Output" +echo -e "=================================" +echo -e "" +echo -e "bash -c 'exec 3<> /dev/tcp/'${ip}'/'${queryport}''" +echo -e "" bash -c 'exec 3<> /dev/tcp/'${ip}'/'${queryport}'' querystatus="$?" +echo -e "" if [ "${querystatus}" == "0" ]; then - echo "TCP query PASS" + echo -e "TCP query PASS" else - echo "TCP query FAIL" + echo -e "TCP query FAIL" fi -echo"" -echo "UDP Raw Output" -echo "=================================" -echo"" -echo "bash -c 'exec 3<> /dev/udp/'${ip}'/'${queryport}''" -bash -c 'exec 3<> /dev/udp/'${ip}'/'${queryport}'' -querystatus="$?" -if [ "${querystatus}" == "0" ]; then - echo "UPD query PASS" -else - echo "UPD query FAIL" -fi -echo "" -echo "Game Port" -echo "==================================================================" -echo "" -echo"" -echo "TCP Raw Output" -echo "=================================" -echo"" -echo "bash -c 'exec 3<> /dev/tcp/'${ip}'/'${port}''" +echo -e "" +echo -e "Game Port - Raw Output" +echo -e "==================================================================" +echo -e "" +echo -e "TCP Raw Output" +echo -e "=================================" +echo -e "" +echo -e "bash -c 'exec 3<> /dev/tcp/'${ip}'/'${port}''" +echo -e "" bash -c 'exec 3<> /dev/tcp/'${ip}'/'${port}'' querystatus="$?" +echo -e "" if [ "${querystatus}" == "0" ]; then - echo "TCP query PASS" + echo -e "TCP query PASS" else - echo "TCP query FAIL" + echo -e "TCP query FAIL" fi -echo"" -echo "UDP Raw Output" -echo "=================================" -echo"" -echo "bash -c 'exec 3<> /dev/udp/'${ip}'/'${port}''" -bash -c 'exec 3<> /dev/udp/'${ip}'/'${port}'' -querystatus="$?" -if [ "${querystatus}" == "0" ]; then - echo "UDP query PASS" -else - echo "UDP query FAIL" -fi +core_exit.sh diff --git a/lgsm/functions/command_donate.sh b/lgsm/functions/command_donate.sh index 0cb3a0aee..15c94fdf3 100644 --- a/lgsm/functions/command_donate.sh +++ b/lgsm/functions/command_donate.sh @@ -2,17 +2,23 @@ # LinuxGSM command_donate.sh function # Author: Daniel Gibbs # Website: https://linuxgsm.com -# Description: Shows ways to donate +# Description: Shows ways to donate. -echo -e "" +local commandname="CONSOLE" +local commandaction="Console" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") + +fn_print_ascii_logo echo -e "${lightyellow}Support LinuxGSM${default}" echo -e "=================================" echo -e "" echo -e "Been using LinuxGSM?" echo -e "Consider donating to support development." echo -e "" -echo -e "* ${blue}Patreon:${default} https://linuxgsm.com/patreon" -echo -e "* ${blue}PayPal:${default} https://linuxgsm.com/paypal" -echo -e "* ${blue}Flattr:${default} https://linuxgsm.com/flattr" +echo -e "* ${lightblue}Patreon:${default} https://linuxgsm.com/patreon" +echo -e "* ${lightblue}PayPal:${default} https://linuxgsm.com/paypal" +echo -e "* ${lightblue}Ko-Fi:${default} https://linuxgsm.com/ko-fi" echo -e "" -echo -e "LinuxGSM has been going since 2012" +echo -e "LinuxGSM est. 2012" + +core_exit.sh diff --git a/lgsm/functions/command_fastdl.sh b/lgsm/functions/command_fastdl.sh index 5dba7ba53..81ad55e8a 100644 --- a/lgsm/functions/command_fastdl.sh +++ b/lgsm/functions/command_fastdl.sh @@ -7,7 +7,7 @@ local commandname="FASTDL" local commandaction="FastDL" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") check.sh @@ -31,18 +31,18 @@ fi # Header fn_print_header -echo "More info: https://docs.linuxgsm.com/commands/fastdl" -echo "" +echo -e "More info: https://docs.linuxgsm.com/commands/fastdl" +echo -e "" # Prompts user for FastDL creation settings. -echo "${commandaction} setup" -echo "=================================" +echo -e "${commandaction} setup" +echo -e "=================================" # Prompt for clearing old files if directory was already here. if [ -d "${fastdldir}" ]; then fn_print_warning_nl "FastDL directory already exists." - echo "${fastdldir}" - echo "" + echo -e "${fastdldir}" + echo -e "" if fn_prompt_yn "Overwrite existing directory?" Y; then fn_script_log_info "Overwrite existing directory: YES" else @@ -129,13 +129,13 @@ fn_human_readable_file_size(){ local precision="${2}" if [[ "${bytes}" == "1" ]]; then - echo "1 byte" + echo -e "1 byte" else for item in "${abbrevs[@]}"; do local factor="${item%:*}" local abbrev="${item#*:}" if [[ "${bytes}" -ge "${factor}" ]]; then - local size="$(bc -l <<< "${bytes} / ${factor}")" + local size=$(bc -l <<< "${bytes} / ${factor}") printf "%.*f %s\n" "${precision}" "${size}" "${abbrev}" break fi @@ -161,9 +161,9 @@ fn_fastdl_preview(){ while read -r ext; do ((fileswc++)) tput rc; tput el - printf "gathering ${allowed_extention} : ${fileswc}..." - echo "${ext}" >> "${tmpdir}/fastdl_files_to_compress.txt" - done < <(find . -type f -iname ${allowed_extention}) + echo -e "gathering ${allowed_extention} : ${fileswc}..." + echo -e "${ext}" >> "${tmpdir}/fastdl_files_to_compress.txt" + done < <(find . -type f -iname "${allowed_extention}") if [ ${fileswc} != 0 ]; then fn_print_ok_eol_nl else @@ -192,11 +192,11 @@ fn_fastdl_preview(){ while read -r ext; do ((fileswc++)) tput rc; tput el - printf "gathering ${directory} ${allowed_extention} : ${fileswc}..." - echo "${ext}" >> "${tmpdir}/fastdl_files_to_compress.txt" + echo -e "gathering ${directory} ${allowed_extention} : ${fileswc}..." + echo -e "${ext}" >> "${tmpdir}/fastdl_files_to_compress.txt" done < <(find "${systemdir}/${directory}" -type f -iname ${allowed_extention}) tput rc; tput el - echo "gathering ${directory} ${allowed_extention} : ${fileswc}..." + echo -e "gathering ${directory} ${allowed_extention} : ${fileswc}..." if [ ${fileswc} != 0 ]; then fn_print_ok_eol_nl else @@ -207,7 +207,7 @@ fn_fastdl_preview(){ done fi if [ -f "${tmpdir}/fastdl_files_to_compress.txt" ]; then - echo "calculating total file size..." + echo -e "calculating total file size..." fn_sleep_time totalfiles=$(wc -l < "${tmpdir}/fastdl_files_to_compress.txt") # Calculates total file size. @@ -226,7 +226,7 @@ fn_fastdl_preview(){ fn_script_log_fatal "Generating file list." core_exit.sh fi - echo "about to compress ${totalfiles} files, total size $(fn_human_readable_file_size ${filesizetotal} 0)" + echo -e "about to compress ${totalfiles} files, total size $(fn_human_readable_file_size ${filesizetotal} 0)" fn_script_log_info "${totalfiles} files, total size $(fn_human_readable_file_size ${filesizetotal} 0)" rm "${tmpdir}/fastdl_files_to_compress.txt" if ! fn_prompt_yn "Continue?" Y; then @@ -245,7 +245,7 @@ fn_fastdl_gmod(){ while read -r fastdlfile; do ((fileswc++)) tput rc; tput el - echo "copying ${allowed_extention} : ${fileswc}..." + echo -e "copying ${allowed_extention} : ${fileswc}..." cp --parents "${fastdlfile}" "${fastdldir}" exitcode=$? if [ ${exitcode} -ne 0 ]; then @@ -305,9 +305,9 @@ fn_fastdl_gmod(){ if [ -f "${tmpdir}/fastdl_files_to_compress.txt" ]; then totalfiles=$(wc -l < "${tmpdir}/fastdl_files_to_compress.txt") # Calculates total file size. - while read dufile; do + while read -r dufile; do filesize=$(du -b "${dufile}" | awk '{ print $1 }') - filesizetotal=$(( ${filesizetotal} + ${filesize} )) + filesizetotal=$((filesizetotal + filesize)) done <"${tmpdir}/fastdl_files_to_compress.txt" fi } @@ -334,7 +334,7 @@ fn_fastdl_source(){ while read -r fastdlfile; do ((fileswc++)) tput rc; tput el - printf "copying ${directory} ${allowed_extention} : ${fileswc}..." + echo -e "copying ${directory} ${allowed_extention} : ${fileswc}..." fn_sleep_time # get relative path of file in the dir tmprelfilepath="${fastdlfile#"${systemdir}/"}" @@ -352,7 +352,7 @@ fn_fastdl_source(){ else fn_script_log_pass "Copying ${fastdlfile} > ${fastdldir}/${copytodir}" fi - done < <(find "${systemdir}/${directory}" -type f -iname ${allowed_extention}) + done < <(find "${systemdir}/${directory}" -type f -iname "${allowed_extention}") if [ ${fileswc} != 0 ]; then fn_print_ok_eol_nl fi @@ -396,7 +396,7 @@ fn_fastdl_gmod_dl_enforcer(){ touch "${luafastdlfullpath}" # Read all filenames and put them into a lua file at the right path. while read -r line; do - echo "resource.AddFile( \"${line}\" )" >> "${luafastdlfullpath}" + echo -e "resource.AddFile( \"${line}\" )" >> "${luafastdlfullpath}" done < <(find "${fastdldir:?}" \( -type f ! -name "*.bz2" \) -printf '%P\n') exitcode=$? if [ ${exitcode} -ne 0 ]; then @@ -434,8 +434,9 @@ fn_fastdl_dirs fn_fastdl_build fn_fastdl_bzip2 # Finished message. -echo "FastDL files are located in:" -echo "${fastdldir}" -echo "FastDL completed" +echo -e "FastDL files are located in:" +echo -e "${fastdldir}" +echo -e "FastDL completed" fn_script_log_info "FastDL completed" + core_exit.sh diff --git a/lgsm/functions/command_install.sh b/lgsm/functions/command_install.sh index 2bc534d69..4955aab86 100644 --- a/lgsm/functions/command_install.sh +++ b/lgsm/functions/command_install.sh @@ -7,7 +7,7 @@ local commandname="INSTALL" local commandaction="Install" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") check.sh if [ "$(whoami)" = "root" ]; then @@ -45,6 +45,7 @@ else fi fix.sh + install_stats.sh install_complete.sh - core_exit.sh fi +core_exit.sh diff --git a/lgsm/functions/command_install_resources_mta.sh b/lgsm/functions/command_install_resources_mta.sh index 85fe20197..c4a555800 100644 --- a/lgsm/functions/command_install_resources_mta.sh +++ b/lgsm/functions/command_install_resources_mta.sh @@ -6,15 +6,15 @@ local commandname="DEFAULT_RESOURCES" local commandaction="Default Resources" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") fn_install_resources(){ - echo "" - echo "Installing Default Resources" - echo "=================================" + echo -e "" + echo -e "Installing Default Resources" + echo -e "=================================" fn_fetch_file "http://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip" "${tmpdir}" "mtasa-resources-latest.zip" "nochmodx" "norun" "noforce" "nomd5" fn_dl_extract "${tmpdir}" "mtasa-resources-latest.zip" "${resourcesdir}" - echo "Default Resources Installed." + echo -e "Default Resources Installed." } fn_print_header @@ -28,3 +28,5 @@ else fn_print_warning_nl "Default resources are not installed when using ./${selfname} auto-install." fn_print_information_nl "To install default resources use ./${selfname} install" fi + +core_exit.sh diff --git a/lgsm/functions/command_mods_install.sh b/lgsm/functions/command_mods_install.sh index cac08929d..dd6b51de6 100644 --- a/lgsm/functions/command_mods_install.sh +++ b/lgsm/functions/command_mods_install.sh @@ -7,7 +7,7 @@ local commandname="MODS" local commandaction="addons/mods" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") check.sh mods_core.sh @@ -17,8 +17,8 @@ fn_print_header # Displays a list of installed mods. fn_mods_installed_list if [ "${installedmodscount}" -gt "0" ]; then - echo "Installed addons/mods" - echo "=================================" + echo -e "Installed addons/mods" + echo -e "=================================" # Go through all available commands, get details and display them to the user. for ((llindex=0; llindex < ${#installedmodslist[@]}; llindex++)); do # Current mod is the "llindex" value of the array we're going through. @@ -27,11 +27,11 @@ if [ "${installedmodscount}" -gt "0" ]; then # Display mod info to the user. echo -e " * ${green}${modcommand}${default}${default}" done - echo "" + echo -e "" fi -echo "Available addons/mods" -echo "=================================" +echo -e "Available addons/mods" +echo -e "=================================" # Display available mods from mods_list.sh. # Set and reset vars compatiblemodslistindex=0 @@ -59,7 +59,7 @@ fi fn_script_log_info "${totalmodsavailable} addons/mods are available for install" ## User selects a mod. -echo "" +echo -e "" while [[ ! " ${availablemodscommands[@]} " =~ " ${usermodselect} " ]]; do echo -en "Enter an ${cyan}addon/mod${default} to ${green}install${default} (or exit to abort): " read -r usermodselect @@ -75,9 +75,9 @@ done currentmod="${usermodselect}" fn_mod_get_info -echo "" -echo "Installing ${modprettyname}" -echo "=================================" +echo -e "" +echo -e "Installing ${modprettyname}" +echo -e "=================================" fn_script_log_info "${modprettyname} selected for install" # Check if the mod is already installed and warn the user. @@ -85,9 +85,9 @@ if [ -f "${modsinstalledlistfullpath}" ]; then if [ -n "$(sed -n "/^${modcommand}$/p" "${modsinstalledlistfullpath}")" ]; then fn_print_warning_nl "${modprettyname} is already installed" fn_script_log_warn "${modprettyname} is already installed" - echo " * Any configs may be overwritten." + echo -e " * Any configs may be overwritten." if ! fn_prompt_yn "Continue?" Y; then - echo Exiting; core_exit.sh + core_exit.sh fi fn_script_log_info "User selected to continue" fi @@ -105,7 +105,7 @@ fn_mod_copy_destination fn_mod_add_list fn_mod_tidy_files_list fn_mods_clear_tmp_dir -echo "${modprettyname} installed" +echo -e "${modprettyname} installed" fn_script_log_pass "${modprettyname} installed." core_exit.sh diff --git a/lgsm/functions/command_mods_remove.sh b/lgsm/functions/command_mods_remove.sh index 9c64d4808..13516410d 100644 --- a/lgsm/functions/command_mods_remove.sh +++ b/lgsm/functions/command_mods_remove.sh @@ -7,15 +7,15 @@ local commandname="MODS" local commandaction="Mods Remove" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") check.sh mods_core.sh fn_mods_check_installed fn_print_header -echo "Remove addons/mods" -echo "=================================" +echo -e "Remove addons/mods" +echo -e "=================================" # Displays list of installed mods. # Generates list to display to user. @@ -29,7 +29,7 @@ for ((mlindex=0; mlindex < ${#installedmodslist[@]}; mlindex++)); do echo -e "${red}${modcommand}${default} - ${modprettyname} - ${moddescription}" done -echo "" +echo -e "" # Keep prompting as long as the user input doesn't correspond to an available mod. while [[ ! " ${installedmodslist[@]} " =~ " ${usermodselect} " ]]; do echo -en "Enter an ${cyan}addon/mod${default} to ${red}remove${default} (or exit to abort): " @@ -44,9 +44,9 @@ while [[ ! " ${installedmodslist[@]} " =~ " ${usermodselect} " ]]; do done fn_print_warning_nl "You are about to remove ${cyan}${usermodselect}${default}." -echo " * Any custom files/configuration will be removed." +echo -e " * Any custom files/configuration will be removed." if ! fn_prompt_yn "Continue?" Y; then - echo Exiting; exit + core_exit.sh fi currentmod="${usermodselect}" @@ -64,7 +64,7 @@ modfileline="1" tput sc while [ "${modfileline}" -le "${modsfilelistsize}" ]; do # Current line defines current file to remove. - currentfileremove="$(sed "${modfileline}q;d" "${modsdir}/${modcommand}-files.txt")" + currentfileremove=$(sed "${modfileline}q;d" "${modsdir}/${modcommand}-files.txt") # If file or directory exists, then remove it. if [ -f "${modinstalldir}/${currentfileremove}" ]||[ -d "${modinstalldir}/${currentfileremove}" ]; then @@ -78,7 +78,7 @@ while [ "${modfileline}" -le "${modsfilelistsize}" ]; do fi fi tput rc; tput el - echo "removing ${modprettyname} ${modfileline} / ${modsfilelistsize} : ${currentfileremove}..." + echo -e "removing ${modprettyname} ${modfileline} / ${modsfilelistsize} : ${currentfileremove}..." ((modfileline++)) done if [ ${exitcode} -ne 0 ]; then @@ -126,7 +126,7 @@ if [ "${engine}" == "unity3d" ]&&[[ "${modprettyname}" == *"Oxide"* ]]; then command_validate.sh unset exitbypass fi -echo "${modprettyname} removed" +echo -e "${modprettyname} removed" fn_script_log "${modprettyname} removed" core_exit.sh diff --git a/lgsm/functions/command_mods_update.sh b/lgsm/functions/command_mods_update.sh index 70a91cf5e..ba5708d96 100644 --- a/lgsm/functions/command_mods_update.sh +++ b/lgsm/functions/command_mods_update.sh @@ -7,7 +7,7 @@ local commandname="MODS" local commandaction="Mods Update" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") check.sh mods_core.sh @@ -19,11 +19,11 @@ fn_remove_cfg_files(){ echo -e "the following files/directories will be preserved:" fn_sleep_time # Count how many files there are to remove. - filestopreserve="$(echo "${modkeepfiles}" | awk -F ';' '{ print NF }')" + filestopreserve=$(echo -e "${modkeepfiles}" | awk -F ';' '{ print NF }') # Test all subvalues of "modkeepfiles" using the ";" separator. - for ((preservefilesindex=1; preservefilesindex < ${filestopreserve}; preservefilesindex++)); do + for ((preservefilesindex=1; preservefilesindex < filestopreserve; preservefilesindex++)); do # Put the current file we are looking for into a variable. - filetopreserve="$(echo "${modkeepfiles}" | awk -F ';' -v x=${preservefilesindex} '{ print $x }' )" + filetopreserve=$(echo -e "${modkeepfiles}" | awk -F ';' -v x=${preservefilesindex} '{ print $x }' ) echo -e " * serverfiles/${filetopreserve}" # If it matches an existing file that have been extracted delete the file. if [ -f "${extractdir}/${filetopreserve}" ]||[ -d "${extractdir}/${filetopreserve}" ]; then @@ -32,7 +32,7 @@ fn_remove_cfg_files(){ if [ ! -f "${modsdir}/.removedfiles.tmp" ]; then touch "${modsdir}/.removedfiles.tmp" fi - echo "${filetopreserve}" >> "${modsdir}/.removedfiles.tmp" + echo -e "${filetopreserve}" >> "${modsdir}/.removedfiles.tmp" fi done fi @@ -71,7 +71,7 @@ done # Reset line value. installedmodsline="1" while [ "${installedmodsline}" -le "${installedmodscount}" ]; do - currentmod="$(sed "${installedmodsline}q;d" "${modsinstalledlistfullpath}")" + currentmod=$(sed "${installedmodsline}q;d" "${modsinstalledlistfullpath}") if [ -n "${currentmod}" ]; then fn_mod_get_info # Don not update mod if the policy is set to "NOUPDATE". @@ -79,8 +79,8 @@ while [ "${installedmodsline}" -le "${installedmodscount}" ]; do fn_print_info "${modprettyname} will not be updated to preserve custom files" fn_script_log_info "${modprettyname} will not be updated to preserve custom files" else - echo "" - echo "==> Updating ${modprettyname}" + echo -e "" + echo -e "==> Updating ${modprettyname}" fn_create_mods_dir fn_mods_clear_tmp_dir fn_mods_create_tmp_dir @@ -101,7 +101,7 @@ while [ "${installedmodsline}" -le "${installedmodscount}" ]; do core_exit.sh fi done -echo "" +echo -e "" fn_print_ok_nl "Mods update complete" fn_script_log_info "Mods update complete" diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index 3eaa944de..610bc5531 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -8,37 +8,124 @@ local commandname="MONITOR" local commandaction="Monitor" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") -fn_monitor_loop(){ -# Monitor will query up to 5 times every 15 seconds. -# Query will wait up to 60 seconds to confirm server is down giving server time if changing map. +fn_monitor_check_lockfile(){ + # Monitor does not run it lockfile is not found. + if [ ! -f "${rootdir}/${lockselfname}" ]; then + fn_print_dots "Checking lockfile: " + fn_print_checking_eol + fn_script_log_info "Checking lockfile: CHECKING" + fn_sleep_time + fn_print_error_nl "Checking lockfile: No lockfile found: " + fn_print_error_eol + fn_script_log_error "Checking lockfile: No lockfile found: ERROR" + fn_sleep_time + echo -e " * Start ${selfname} to run monitor." + core_exit.sh + fi + + # Fix if lockfile is not unix time or contains letters + if [[ "$(cat "${rootdir}/${lockselfname}")" =~ [A-Za-z] ]]; then + date '+%s' > "${rootdir}/${lockselfname}" + fi +} + +fn_monitor_check_update(){ + # Monitor will check if update is already running. + if [ "$(pgrep "${selfname} update" | wc -l)" != "0" ]; then + fn_print_dots "Checking active updates: " + fn_print_checking_eol + fn_script_log_info "Checking active updates: CHECKING" + fn_sleep_time + fn_print_error_nl "Checking active updates: SteamCMD is currently checking for updates: " + fn_print_error_eol + fn_script_log_error "Checking active updates: SteamCMD is currently checking for updates: ERROR" + fn_sleep_time + core_exit.sh + fi +} + +fn_monitor_check_session(){ + fn_print_dots "Checking session: " + fn_print_checking_eol + fn_script_log_info "Checking session: CHECKING" + fn_sleep_time + # uses status var from check_status.sh + if [ "${status}" != "0" ]; then + fn_print_ok "Checking session: " + fn_print_ok_eol_nl + fn_script_log_pass "Checking session: OK" + fn_sleep_time + else + fn_print_error "Checking session: " + fn_print_fail_eol_nl + fn_script_log_fatal "Checking session: FAIL" + fn_sleep_time + alert="restart" + alert.sh + fn_script_log_info "Checking session: Monitor is restarting ${selfname}" + command_restart.sh + core_exit.sh + fi +} + +fn_monitor_check_queryport(){ + # Monitor will check queryport is set before continuing. + if [ -z "${queryport}" ]||[ "${queryport}" == "0" ]; then + fn_print_dots "Checking port: " + fn_print_checking_eol + fn_script_log_info "Checking session: CHECKING" + fn_sleep_time + fn_print_error "Checking port: Unable to query as queryport is not set: " + fn_print_error_eol_nl + fn_script_log_error "Checking port: Unable to query as queryport is not set: ERROR" + fn_sleep_time + core_exit.sh + fi +} + +fn_query_gsquery(){ + if [ ! -f "${functionsdir}/query_gsquery.py" ]; then + fn_fetch_file_github "lgsm/functions" "query_gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nomd5" + fi + "${functionsdir}"/query_gsquery.py -a "${ip}" -p "${queryport}" -e "${querytype}" > /dev/null 2>&1 + querystatus="$?" +} + +fn_query_tcp(){ + bash -c 'exec 3<> /dev/tcp/'${ip}'/'${queryport}'' > /dev/null 2>&1 + querystatus="$?" +} + +fn_monitor_query(){ +# Will loop and query up to 5 times every 15 seconds. +# Query will wait up to 60 seconds to confirm server is down as server can become non-responsive during map changes. totalseconds=0 for queryattempt in {1..5}; do fn_print_dots "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: " fn_print_querying_eol fn_script_log_info "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt} : QUERYING" + fn_sleep_time + # querydelay if [ "$(cat "${rootdir}/${lockselfname}")" -gt "$(date "+%s" -d "${querydelay} mins ago")" ]; then fn_print_ok "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: " - fn_print_delay_eol + fn_print_delay_eol_nl fn_script_log_info "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt} : DELAY" - fn_script_log_info "Query bypassed: ${gameservername} started less than ${querydelay} minute ago" + fn_script_log_info "Query bypassed: ${gameservername} started less than ${querydelay} minutes ago" + fn_sleep_time monitorpass=1 core_exit.sh + # will use query method selected in fn_monitor_loop + # gamedig elif [ "${querymethod}" == "gamedig" ]; then query_gamedig.sh + # gsquery elif [ "${querymethod}" == "gsquery" ]; then - if [ ! -f "${functionsdir}/query_gsquery.py" ]; then - fn_fetch_file_github "lgsm/functions" "query_gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nomd5" - fi - "${functionsdir}"/query_gsquery.py -a "${ip}" -p "${queryport}" -e "${engine}" > /dev/null 2>&1 - querystatus="$?" + fn_query_gsquery + #tcp query elif [ "${querymethod}" == "tcp" ]; then - bash -c 'exec 3<> /dev/tcp/'${ip}'/'${queryport}'' - querystatus="$?" - elif [ "${querymethod}" == "udp" ]; then - bash -c 'exec 3<> /dev/udp/'${ip}'/'${queryport}'' - querystatus="$?" + fn_query_tcp fi if [ "${querystatus}" == "0" ]; then @@ -46,21 +133,43 @@ for queryattempt in {1..5}; do fn_print_ok "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: " fn_print_ok_eol_nl fn_script_log_pass "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt}: OK" + fn_sleep_time monitorpass=1 + # send LinuxGSM stats if monitor is OK. + if [ "${stats}" == "on" ]; then + info_stats.sh + fi + if [ "${querystatus}" == "0" ]; then + # Add query data to log. + if [ -n "${gdname}" ]; then + fn_script_log_info "Server name: ${gdname}" + fi + if [ -n "${gdplayers}" ]; then + fn_script_log_info "Players: ${gdplayers}/${gdmaxplayers}" + fi + if [ -n "${gdmap}" ]; then + fn_script_log_info "Map: ${gdmap}" + fi + if [ -n "${gdgamemode}" ]; then + fn_script_log_info "Game Mode: ${gdgamemode}" + fi + fi core_exit.sh else # Server query FAIL. - fn_script_log_info "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt}: FAIL" fn_print_fail "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: " fn_print_fail_eol - # Monitor try gamedig first then gsquery before restarting. - if [ "${querymethod}" == "gsquery" ]; then + fn_script_log_warn "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt}: FAIL" + fn_sleep_time + # Monitor will try gamedig (if supported) for first 30s then gsquery before restarting. + if [ "${querymethod}" == "gsquery" ]||[ "${querymethod}" == "tcp" ]; then + # gsquery will fail if longer than 60s if [ "${totalseconds}" -ge "59" ]; then - # Server query FAIL for over 59 seconds reboot server. + # Monitor will FAIL if over 60s and trigger gane server reboot. fn_print_fail "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: " fn_print_fail_eol_nl - fn_script_log_error "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt}: FAIL" - + fn_script_log_warn "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt}: FAIL" + fn_sleep_time # Send alert if enabled. alert="restartquery" alert.sh @@ -68,12 +177,13 @@ for queryattempt in {1..5}; do core_exit.sh fi elif [ "${querymethod}" == "gamedig" ]; then + # gamedig will fail and try gsquery if longer than 30s if [ "${totalseconds}" -ge "29" ]; then break fi fi - # Seconds counter. + # Second counter will wait for 15s before breaking loop. for seconds in {1..15}; do fn_print_fail "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: WAIT" totalseconds=$((totalseconds + 1)) @@ -85,132 +195,56 @@ for queryattempt in {1..5}; do done } -fn_monitor_check_lockfile(){ - # Monitor does not run it lockfile is not found. - if [ ! -f "${rootdir}/${lockselfname}" ]; then - fn_print_error_nl "Disabled: No lockfile found" - fn_script_log_error "Disabled: No lockfile found" - echo " * To enable monitor run ./${selfname} start" - core_exit.sh - fi -} - -fn_monitor_check_update(){ - # Monitor will check if update is already running. - if [ "$(pgrep "${selfname} update" | wc -l)" != "0" ]; then - fn_print_error_nl "SteamCMD is currently checking for updates" - fn_script_log_error "SteamCMD is currently checking for updates" - core_exit.sh - fi -} - -fn_monitor_check_session(){ - fn_print_dots "Checking session: " - fn_print_checking_eol - fn_script_log_info "Checking session: CHECKING" - if [ "${status}" != "0" ]; then - fn_print_ok "Checking session: " - fn_print_ok_eol_nl - fn_script_log_pass "Checking session: OK" - else - if [ "${shortname}" == "ts3" ]; then - fn_print_error "Checking session: ${ts3error}: " - elif [ "${shortname}" == "mumble" ]; then - fn_print_error "Checking session: Not listening to port ${queryport}" - else - fn_print_error "Checking session: " - fi - fn_print_fail_eol_nl - fn_script_log_error "Checking session: FAIL" - alert="restart" - alert.sh - fn_script_log_info "Monitor is starting ${servername}" - command_restart.sh - core_exit.sh +fn_monitor_loop(){ + # loop though query methods selected by querymode. + totalseconds=0 + if [ "${querymode}" == "2" ]; then + local query_methods_array=( gamedig gsquery ) + elif [ "${querymode}" == "3" ]; then + local query_methods_array=( gamedig ) + elif [ "${querymode}" == "4" ]; then + local query_methods_array=( gsquery ) + elif [ "${querymode}" == "5" ]; then + local query_methods_array=( tcp ) fi -} - -fn_monitor_query(){ - fn_script_log_info "Querying port: query enabled" - # Engines that work with query. - local allowed_engines_array=( avalanche2.0 avalanche3.0 barotrauma goldsource idtech2 idtech3 idtech3_ql ioquake3 iw2.0 iw3.0 lwjgl2 madness quake qfusion refractor realvirtuality source spark starbound unity3d unreal unreal2 unreal4 wurm ) - for allowed_engine in "${allowed_engines_array[@]}" + for querymethod in "${query_methods_array[@]}" do - if [ "${allowed_engine}" == "${engine}" ]; then - if [ "${engine}" == "idtech3_ql" ]; then - local engine="quakelive" - elif [ "${shortname}" == "kf2" ]; then - local engine="unreal4" - fi - - # Will first attempt to use gamedig then gsquery. - totalseconds=0 - if [ "${shortname}" == "wurm" ]; then - local query_methods_array=( gsquery ) + # Will check if gamedig is installed and bypass if not. + if [ "${querymethod}" == "gamedig" ]; then + if [ -n "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; then + if [ -z "${monitorpass}" ]; then + fn_monitor_query + fi else - local query_methods_array=( gamedig gsquery ) + fn_script_log_info "gamedig is not installed" + fn_script_log_info "https://docs.linuxgsm.com/requirements/gamedig" + fi + else + # will not query if query already passed. + if [ -z "${monitorpass}" ]; then + fn_monitor_query fi - for query_method in "${query_methods_array[@]}" - do - if [ "${query_method}" == "gamedig" ]; then - # Will bypass gamedig if not installed. - if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; then - if [ -z "${monitorpass}" ]; then - querymethod="${query_method}" - fn_monitor_loop - fi - fi - else - if [ -z "${monitorpass}" ]; then - querymethod="${query_method}" - fn_monitor_loop - fi - fi - done fi done } -fn_monitor_query_tcp(){ - querymethod="tcp" - fn_monitor_loop -} - -fn_monitor_query_udp(){ - querymethod="upd" - fn_monitor_loop -} - monitorflag=1 -fn_print_dots "${servername}" check.sh logs.sh info_config.sh info_parms.sh +# query pre-checks fn_monitor_check_lockfile fn_monitor_check_update fn_monitor_check_session +fn_monitor_check_queryport -# Fix if lockfile is not unix time or contains letters -if [[ "$(cat "${rootdir}/${lockselfname}")" =~ [A-Za-z] ]]; then - date '+%s' > "${rootdir}/${lockselfname}" -fi - -# Add a query bypass if missing +# Add a querydelay of 1 min if var missing. if [ -z "${querydelay}" ]; then querydelay="1" fi -# Query has to be enabled in Starbound config. -if [ "${shortname}" == "sb" ]; then - if [ "${queryenabled}" == "true" ]; then - fn_monitor_query - fi -elif [ "${shortname}" == "ts3" ]||[ "${shortname}" == "eco" ]||[ "${shortname}" == "mumble" ]; then - fn_monitor_query_tcp -else - fn_monitor_query -fi +fn_monitor_loop core_exit.sh diff --git a/lgsm/functions/command_postdetails.sh b/lgsm/functions/command_postdetails.sh index 5fa7532b5..0657a2622 100644 --- a/lgsm/functions/command_postdetails.sh +++ b/lgsm/functions/command_postdetails.sh @@ -7,7 +7,7 @@ local commandname="POSTDETAILS" local commandaction="Postdetails" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") # Set posttarget to the appropriately-defined post destination. @@ -48,7 +48,7 @@ if [ -f "${postdetailslog}" ]; then fi # Rather than a one-pass sed parser, default to using a temporary directory. -if [ -n "${alertflag}" ]; then +if [ -n "${exitbypass}" ]; then postdetailslog="${alertlog}" else # Run checks and gathers details to display. @@ -67,7 +67,7 @@ else fn_info_message_script fn_info_message_backup # Some game servers do not have parms. - if [ "${shortname}" != "ts3" ]&&[ "${shortname}" != "jc2" ]&&[ "${shortname}" != "jc3" ]&&[ "${shortname}" != "dst" ]&&[ "${shortname}" != "pz" ]&&[ "${engine}" != "renderware" ]; then + if [ "${shortname}" != "jc2" ]&&[ "${shortname}" != "jc3" ]&&[ "${shortname}" != "dst" ]&&[ "${shortname}" != "pz" ]&&[ "${engine}" != "renderware" ]; then fn_parms fn_info_message_commandlineparms fi @@ -80,12 +80,12 @@ fi if [ "${posttarget}" == "http://pastebin.com" ] ; then fn_print_dots "Posting details to pastbin.com for ${postexpire}" # grab the return from 'value' from an initial visit to pastebin. - csrftoken=$(${curlpath} -s "${posttarget}" | + csrftoken=$(curl -s "${posttarget}" | sed -n 's/^.*input type="hidden" name="csrf_token_post" value="\(.*\)".*$/\1/p') # # Use the csrftoken to then post the content. # - link=$(${curlpath} -s "${posttarget}/post.php" -D - -F "submit_hidden=submit_hidden" \ + link=$(curl -s "${posttarget}/post.php" -D - -F "submit_hidden=submit_hidden" \ -F "post_key=${csrftoken}" -F "paste_expire_date=${postexpire}" \ -F "paste_name=${gamename} Debug Info" \ -F "paste_format=8" -F "paste_private=0" \ @@ -95,28 +95,29 @@ if [ "${posttarget}" == "http://pastebin.com" ] ; then # Output the resulting link. fn_print_ok_nl "Posting details to pastbin.com for ${postexpire}" pdurl="${posttarget}${link}" - echo " Please share the following url for support: ${pdurl}" + echo -e " Please share the following url for support: ${pdurl}" elif [ "${posttarget}" == "https://hastebin.com" ] ; then fn_print_dots "Posting details to hastebin.com" # hastebin is a bit simpler. If successful, the returned result # should look like: {"something":"key"}, putting the reference that # we need in "key". TODO - error handling. -CedarLUG - link=$(${curlpath} -H "HTTP_X_REQUESTED_WITH:XMLHttpRequest" -s -d "$(<${postdetailslog})" "${posttarget}/documents" | cut -d\" -f4) + link=$(curl -H "HTTP_X_REQUESTED_WITH:XMLHttpRequest" -s -d "$(<${postdetailslog})" "${posttarget}/documents" | cut -d\" -f4) fn_print_ok_nl "Posting details to hastebin.com for ${postexpire}" pdurl="${posttarget}/${link}" - echo " Please share the following url for support: ${pdurl}" + echo -e "Please share the following url for support: ${pdurl}" elif [ "${posttarget}" == "https://termbin.com" ] ; then fn_print_dots "Posting details to termbin.com" link=$(cat "${postdetailslog}" | nc termbin.com 9999 | tr -d '\n\0') fn_print_ok_nl "Posting details to termbin.com" pdurl="${link}" - echo " Please share the following url for support: ${pdurl}" + echo -e "Please share the following url for support: " + echo -e "${pdurl}" else fn_print_warn_nl "Review output in: ${postdetailslog}" core_exit.sh fi -if [ -z "${alertflag}" ]; then +if [ -z "${exitbypass}" ]; then core_exit.sh else alerturl="${pdurl}" diff --git a/lgsm/functions/command_restart.sh b/lgsm/functions/command_restart.sh index 2ece0810c..76b65b8e5 100644 --- a/lgsm/functions/command_restart.sh +++ b/lgsm/functions/command_restart.sh @@ -6,9 +6,11 @@ local commandname="RESTART" local commandaction="Restarting" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") info_config.sh exitbypass=1 command_stop.sh command_start.sh + +core_exit.sh diff --git a/lgsm/functions/command_start.sh b/lgsm/functions/command_start.sh index ed81fe63e..4c9fd20c4 100644 --- a/lgsm/functions/command_start.sh +++ b/lgsm/functions/command_start.sh @@ -7,7 +7,7 @@ local commandname="START" local commandaction="Starting" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") fn_start_teamspeak3(){ if [ ! -e "${servercfgfullpath}" ]; then @@ -24,34 +24,11 @@ fn_start_teamspeak3(){ sleep 5 touch "${servercfgfullpath}" fi - fn_sleep_time - if [ -f "${lgsmlog}" ]; then - mv "${lgsmlog}" "${lgsmlogdate}" - fi - - # Create lockfile. - date '+%s' > "${rootdir}/${lockselfname}" # Accept license. if [ ! -f "${executabledir}/.ts3server_license_accepted" ]; then install_eula.sh fi - cd "${executabledir}" || exit - if [ "${ts3serverpass}" == "1" ]; then - ./ts3server_startscript.sh start serveradmin_password="${newpassword}" inifile="${servercfgfullpath}" > /dev/null 2>&1 - else - ./ts3server_startscript.sh start inifile="${servercfgfullpath}" > /dev/null 2>&1 - fi - fn_sleep_time - check_status.sh - if [ "${status}" == "0" ]; then - fn_print_fail_nl "Unable to start ${servername}" - fn_script_log_fatal "Unable to start ${servername}" - echo -e " Check log files: ${logdir}" - core_exit.sh - else - fn_print_ok_nl "${servername}" - fn_script_log_pass "Started ${servername}" - fi + fn_start_tmux } fn_start_tmux(){ @@ -87,46 +64,46 @@ fn_start_tmux(){ # Create lockfile date > "${rootdir}/${lockselfname}" cd "${executabledir}" || exit - tmux new-session -d -x "${sessionwidth}" -y "${sessionheight}" -s "${servicename}" "${executable} ${parms}" 2> "${lgsmlogdir}/.${servicename}-tmux-error.tmp" + tmux new-session -d -x "${sessionwidth}" -y "${sessionheight}" -s "${selfname}" "${executable} ${parms}" 2> "${lgsmlogdir}/.${selfname}-tmux-error.tmp" # Create logfile. touch "${consolelog}" # Get tmux version. - tmuxversion="$(tmux -V | sed "s/tmux //" | sed -n '1 p')" + tmuxversion=$(tmux -V | sed "s/tmux //" | sed -n '1 p') # Tmux compiled from source will return "master", therefore ignore it. if [ "$(tmux -V | sed "s/tmux //" | sed -n '1 p')" == "master" ]; then fn_script_log "Tmux version: master (user compiled)" - echo "Tmux version: master (user compiled)" >> "${consolelog}" + echo -e "Tmux version: master (user compiled)" >> "${consolelog}" if [ "${consolelogging}" == "on" ]||[ -z "${consolelogging}" ]; then - tmux pipe-pane -o -t "${servicename}" "exec cat >> '${consolelog}'" + tmux pipe-pane -o -t "${selfname}" "exec cat >> '${consolelog}'" fi elif [ -n "${tmuxversion}" ]; then # Get the digit version of tmux. - tmuxversion="$(tmux -V | sed "s/tmux //" | sed -n '1 p' | tr -cd '[:digit:]')" + tmuxversion=$(tmux -V | sed "s/tmux //" | sed -n '1 p' | tr -cd '[:digit:]') # tmux pipe-pane not supported in tmux versions < 1.6. if [ "${tmuxversion}" -lt "16" ]; then - echo "Console logging disabled: Tmux => 1.6 required + echo -e "Console logging disabled: Tmux => 1.6 required https://linuxgsm.com/tmux-upgrade Currently installed: $(tmux -V)" > "${consolelog}" # Console logging disabled: Bug in tmux 1.8 breaks logging. elif [ "${tmuxversion}" -eq "18" ]; then - echo "Console logging disabled: Bug in tmux 1.8 breaks logging + echo -e "Console logging disabled: Bug in tmux 1.8 breaks logging https://linuxgsm.com/tmux-upgrade Currently installed: $(tmux -V)" > "${consolelog}" # Console logging enable or not set. elif [ "${consolelogging}" == "on" ]||[ -z "${consolelogging}" ]; then - tmux pipe-pane -o -t "${servicename}" "exec cat >> '${consolelog}'" + tmux pipe-pane -o -t "${selfname}" "exec cat >> '${consolelog}'" fi else - echo "Unable to detect tmux version" >> "${consolelog}" + echo -e "Unable to detect tmux version" >> "${consolelog}" fn_script_log_warn "Unable to detect tmux version" fi # Console logging disabled. if [ "${consolelogging}" == "off" ]; then - echo "Console logging disabled by user" >> "${consolelog}" + echo -e "Console logging disabled by user" >> "${consolelog}" fn_script_log_info "Console logging disabled by user" fi fn_sleep_time @@ -136,42 +113,42 @@ fn_sleep_time if [ "${status}" == "0" ]; then fn_print_fail_nl "Unable to start ${servername}" fn_script_log_fatal "Unable to start ${servername}" - if [ -s "${lgsmlogdir}/.${servicename}-tmux-error.tmp" ]; then + if [ -s "${lgsmlogdir}/.${selfname}-tmux-error.tmp" ]; then fn_print_fail_nl "Unable to start ${servername}: Tmux error:" fn_script_log_fatal "Unable to start ${servername}: Tmux error:" - echo "" - echo "Command" - echo "=================================" - echo "tmux new-session -d -s \"${servicename}\" \"${executable} ${parms}\"" | tee -a "${lgsmlog}" - echo "" - echo "Error" - echo "=================================" - cat "${lgsmlogdir}/.${servicename}-tmux-error.tmp" | tee -a "${lgsmlog}" + echo -e "" + echo -e "Command" + echo -e "=================================" + echo -e "tmux new-session -d -s \"${selfname}\" \"${executable} ${parms}\"" | tee -a "${lgsmlog}" + echo -e "" + echo -e "Error" + echo -e "=================================" + cat "${lgsmlogdir}/.${selfname}-tmux-error.tmp" | tee -a "${lgsmlog}" # Detected error https://linuxgsm.com/support - if grep -c "Operation not permitted" "${lgsmlogdir}/.${servicename}-tmux-error.tmp" + if grep -c "Operation not permitted" "${lgsmlogdir}/.${selfname}-tmux-error.tmp" then - echo "" - echo "Fix" - echo "=================================" - if [ ! "$(grep "tty:" /etc/group|grep "$(whoami)")" ]; then - echo "$(whoami) is not part of the tty group." + echo -e "" + echo -e "Fix" + echo -e "=================================" + if ! grep "tty:" /etc/group | grep "$(whoami)"; then + echo -e "$(whoami) is not part of the tty group." fn_script_log_info "$(whoami) is not part of the tty group." group=$(grep tty /etc/group) - echo "" - echo " ${group}" + echo -e "" + echo -e " ${group}" fn_script_log_info "${group}" - echo "" - echo "Run the following command with root privileges." - echo "" - echo " usermod -G tty $(whoami)" - echo "" - echo "https://linuxgsm.com/tmux-op-perm" + echo -e "" + echo -e "Run the following command with root privileges." + echo -e "" + echo -e " usermod -G tty $(whoami)" + echo -e "" + echo -e "https://linuxgsm.com/tmux-op-perm" fn_script_log_info "https://linuxgsm.com/tmux-op-perm" else - echo "No known fix currently. Please log an issue." + echo -e "No known fix currently. Please log an issue." fn_script_log_info "No known fix currently. Please log an issue." - echo "https://linuxgsm.com/support" + echo -e "https://linuxgsm.com/support" fn_script_log_info "https://linuxgsm.com/support" fi fi @@ -182,12 +159,14 @@ fn_sleep_time fn_print_ok "${servername}" fn_script_log_pass "Started ${servername}" fi - rm "${lgsmlogdir}/.${servicename}-tmux-error.tmp" + rm "${lgsmlogdir}/.${selfname}-tmux-error.tmp" echo -en "\n" } -fn_print_dots "${servername}" + check.sh + +fn_print_dots "${servername}" # Is the server already started. # $status comes from check_status.sh, which is run by check.sh for this command if [ "${status}" != "0" ]; then @@ -215,4 +194,5 @@ if [ "${shortname}" == "ts3" ]; then else fn_start_tmux fi + core_exit.sh diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index 01cce6a4a..f166fa552 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -7,14 +7,14 @@ local commandname="STOP" local commandaction="Stopping" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") # Attempts graceful shutdown by sending 'CTRL+c'. fn_stop_graceful_ctrlc(){ fn_print_dots "Graceful: CTRL+c" fn_script_log_info "Graceful: CTRL+c" # Sends quit. - tmux send-keys -t "${servicename}" C-c > /dev/null 2>&1 + tmux send-keys -t "${selfname}" C-c > /dev/null 2>&1 # Waits up to 30 seconds giving the server time to shutdown gracefuly. for seconds in {1..30}; do check_status.sh @@ -43,7 +43,7 @@ fn_stop_graceful_cmd(){ fn_print_dots "Graceful: sending \"${1}\"" fn_script_log_info "Graceful: sending \"${1}\"" # Sends specific stop command. - tmux send -t "${servicename}" "${1}" ENTER > /dev/null 2>&1 + tmux send -t "${selfname}" "${1}" ENTER > /dev/null 2>&1 # Waits up to ${seconds} seconds giving the server time to shutdown gracefully. for ((seconds=1; seconds<=${2}; seconds++)); do check_status.sh @@ -72,7 +72,7 @@ fn_stop_graceful_goldsource(){ fn_print_dots "Graceful: sending \"quit\"" fn_script_log_info "Graceful: sending \"quit\"" # sends quit - tmux send -t "${servicename}" quit ENTER > /dev/null 2>&1 + tmux send -t "${selfname}" quit ENTER > /dev/null 2>&1 # Waits 3 seconds as goldsource servers restart with the quit command. for seconds in {1..3}; do sleep 1 @@ -126,7 +126,7 @@ fn_stop_graceful_sdtd(){ fn_script_log_info "Graceful: telnet" if [ "${telnetenabled}" == "false" ]; then fn_print_info_nl "Graceful: telnet: DISABLED: Enable in ${servercfg}" - elif [ "$(command -v expect 2>/dev/null)" ]; then + elif [ -n "$(command -v expect 2>/dev/null)" ]; then # Tries to shutdown with both localhost and server IP. for telnetip in 127.0.0.1 ${ip}; do fn_print_dots "Graceful: telnet: ${telnetip}:${telnetport}" @@ -200,22 +200,6 @@ fn_stop_graceful_select(){ fn_stop_graceful_sdtd elif [ "${stopmode}" == "9" ]; then fn_stop_graceful_goldsource - elif [ "${stopmode}" == "10" ]; then - fn_stop_teamspeak3 - fi -} - -fn_stop_teamspeak3(){ - fn_print_dots "${servername}" - "${serverfiles}"/ts3server_startscript.sh stop > /dev/null 2>&1 - check_status.sh - if [ "${status}" == "0" ]; then - rm -f "${rootdir}/${lockselfname}" - fn_print_ok_nl "${servername}" - fn_script_log_pass "Stopped ${servername}" - else - fn_print_fail_nl "Unable to stop ${servername}" - fn_script_log_error "Unable to stop ${servername}" fi } @@ -223,7 +207,7 @@ fn_stop_tmux(){ fn_print_dots "${servername}" fn_script_log_info "tmux kill-session: ${servername}" # Kill tmux session. - tmux kill-session -t "${servicename}" > /dev/null 2>&1 + tmux kill-session -t "${selfname}" > /dev/null 2>&1 fn_sleep_time check_status.sh if [ "${status}" == "0" ]; then @@ -240,8 +224,6 @@ fn_stop_pre_check(){ if [ "${status}" == "0" ]; then fn_print_info_nl "${servername} is already stopped" fn_script_log_error "${servername} is already stopped" - elif [ "${shortname}" == "ts3" ]; then - fn_stop_teamspeak3 else # Select graceful shutdown. fn_stop_graceful_select @@ -253,14 +235,16 @@ fn_stop_pre_check(){ fi } -fn_print_dots "${servername}" check.sh +fn_print_dots "${servername}" + info_config.sh fn_stop_pre_check # Remove lockfile. if [ -f "${rootdir}/${lockselfname}" ]; then rm -f "${rootdir}/${lockselfname}" fi + if [ -z "${exitbypass}" ]; then core_exit.sh fi diff --git a/lgsm/functions/command_test_alert.sh b/lgsm/functions/command_test_alert.sh index 014e082b2..368a9ab21 100644 --- a/lgsm/functions/command_test_alert.sh +++ b/lgsm/functions/command_test_alert.sh @@ -6,11 +6,12 @@ local commandname="ALERT" local commandaction="Alert" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") fn_print_dots "${servername}" check.sh info_config.sh alert="test" alert.sh + core_exit.sh diff --git a/lgsm/functions/command_ts3_server_pass.sh b/lgsm/functions/command_ts3_server_pass.sh index f1b18560e..4bb3421dc 100644 --- a/lgsm/functions/command_ts3_server_pass.sh +++ b/lgsm/functions/command_ts3_server_pass.sh @@ -5,49 +5,47 @@ # Website: https://linuxgsm.com # Description: Changes TS3 serveradmin password. -local commandname="TS3-CHANGE-PASS" -local commandaction="ServerAdmin Password Change" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local commandname="PASSWORD-CHANGE" +local commandaction="Password Change" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") fn_serveradmin_password_prompt(){ fn_print_header - echo "Press \"CTRL+b d\" to exit console." fn_print_information_nl "You are about to change the ${gamename} ServerAdmin password." fn_print_warning_nl "${gamename} will restart during this process." - echo "" + echo -e "" if ! fn_prompt_yn "Continue?" Y; then echo Exiting; exit fi fn_script_log_info "Initiating ${gamename} ServerAdmin password change" - read -rp "Enter new password : " newpassword + read -rp "Enter new password: " newpassword + fn_print_info_nl "Changing password" + fn_script_log_info "Changing password" } fn_serveradmin_password_set(){ - fn_print_info_nl "Starting server with new password..." - fn_script_log_info "Starting server with new password" # Start server in "new password mode". ts3serverpass="1" exitbypass="1" command_start.sh - fn_print_ok_nl "Password applied" + fn_print_ok_nl "New password applied" fn_script_log_pass "New ServerAdmin password applied" } # Running functions. check.sh fn_serveradmin_password_prompt -check_status.sh if [ "${status}" != "0" ]; then # Stop any running server. exitbypass="1" command_stop.sh fn_serveradmin_password_set + parms="serveradmin_password=\"${newpassword}\" inifile=\"${servercfgfullpath}\" > /dev/null 2>&1" ts3serverpass="0" - fn_print_info_nl "Restarting server normally" - fn_script_log_info "Restarting server normally" command_restart.sh else fn_serveradmin_password_set command_stop.sh fi + core_exit.sh diff --git a/lgsm/functions/command_update.sh b/lgsm/functions/command_update.sh index 2ee8a8fed..5fceea755 100644 --- a/lgsm/functions/command_update.sh +++ b/lgsm/functions/command_update.sh @@ -6,7 +6,7 @@ local commandname="UPDATE" local commandaction="Update" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") fn_print_dots "" check.sh diff --git a/lgsm/functions/command_update_functions.sh b/lgsm/functions/command_update_functions.sh index 4825be027..e325b781a 100644 --- a/lgsm/functions/command_update_functions.sh +++ b/lgsm/functions/command_update_functions.sh @@ -6,7 +6,7 @@ # Legacy Command command_update_linuxgsm.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh index 4a70c7748..6816a1443 100644 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -6,7 +6,7 @@ local commandname="UPDATE LINUXGSM" local commandaction="Update LinuxGSM" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") fn_print_dots "Updating LinuxGSM" check.sh @@ -16,7 +16,7 @@ echo -en "\n" if [ -z "${legacymode}" ]; then # Check and update _default.cfg. echo -en " checking config _default.cfg...\c" - config_file_diff=$(diff "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg")) + config_file_diff=$(diff "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" <(curl -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg")) if [ "${config_file_diff}" != "" ]; then fn_print_update_eol_nl fn_script_log_info "checking config _default.cfg: UPDATE" @@ -30,7 +30,7 @@ if [ -z "${legacymode}" ]; then fi echo -en " checking linuxgsm.sh...\c" - tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh")) + tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(curl -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh")) if [ "${tmp_script_diff}" != "" ]; then fn_print_update_eol_nl fn_script_log_info "checking linuxgsm.sh: UPDATE" @@ -56,11 +56,13 @@ if [ -z "${legacymode}" ]; then echo -e " Backup: ${backupdir}/script/${selfname}-$(date +"%m_%d_%Y_%M").bak" fi echo -en " fetching ${selfname}...\c" + exitcode=$? cp "${tmpdir}/linuxgsm.sh" "${rootdir}/${selfname}" sed -i "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${rootdir}/${selfname}" sed -i "s/gameservername=\"core\"/gameservername=\"${gameservername}\"/g" "${rootdir}/${selfname}" sed -i "s/gamename=\"core\"/gamename=\"${gamename}\"/g" "${rootdir}/${selfname}" - if [ $? -ne 0 ]; then + + if [ "${exitcode}" == "0" ]; then fn_print_fail_eol_nl core_exit.sh else @@ -79,15 +81,14 @@ if [ -n "${functionsdir}" ]; then do echo -en " checking function ${functionfile}...\c" github_file_url_dir="lgsm/functions" - get_function_file=$(${curlpath} --fail -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}") + get_function_file=$(curl --fail -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}") exitcode=$? - function_file_diff=$(diff "${functionsdir}/${functionfile}" <(${curlpath} --fail -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}")) + function_file_diff=$(diff "${functionsdir}/${functionfile}" <(curl --fail -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}")) if [ ${exitcode} -ne 0 ]; then fn_print_fail_eol_nl echo -en " removing unknown function ${functionfile}...\c" fn_script_log_fatal "removing unknown function ${functionfile}" - rm -f "${functionfile}" - if [ $? -ne 0 ]; then + if ! rm -f "${functionfile}"; then fn_print_fail_eol_nl core_exit.sh else @@ -112,5 +113,5 @@ else fn_print_ok "Updating functions" fn_script_log_pass "Updating functions" fi -echo -en "\n" + core_exit.sh diff --git a/lgsm/functions/command_validate.sh b/lgsm/functions/command_validate.sh index cc171a00a..fe92a67bc 100644 --- a/lgsm/functions/command_validate.sh +++ b/lgsm/functions/command_validate.sh @@ -6,11 +6,11 @@ local commandname="VALIDATE" local commandaction="Validate" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") fn_validation(){ fn_print_info "Validating files: SteamCMD" - echo "" + echo -e "" echo -e "* Validating may overwrite some customised files." echo -e "* https://docs.linuxgsm.com/commands/validate" fn_script_log_info "Validating files: SteamCMD" @@ -18,7 +18,7 @@ fn_validation(){ cd "${steamcmddir}" || exit # Detects if unbuffer command is available for 32 bit distributions only. info_distro.sh - if [ "$(command -v stdbuf)" ]&&[ "${arch}" != "x86_64" ]; then + if [ -n "$(command -v stdbuf)" ]&&[ "${arch}" != "x86_64" ]; then unbuffer="stdbuf -i0 -o0 -e0" fi @@ -53,4 +53,5 @@ if [ "${status}" != "0" ]; then else fn_validation fi + core_exit.sh diff --git a/lgsm/functions/command_wipe.sh b/lgsm/functions/command_wipe.sh index 12e85d90d..0598699fb 100644 --- a/lgsm/functions/command_wipe.sh +++ b/lgsm/functions/command_wipe.sh @@ -7,7 +7,7 @@ local commandname="WIPE" local commandaction="Wipe" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") check.sh fn_print_header @@ -25,7 +25,7 @@ fn_wipe_server_process(){ else fn_wipe_server_remove_files fi - echo "server data wiped" + echo -e "server data wiped" fn_script_log "server data wiped." } @@ -185,7 +185,7 @@ if [ "${shortname}" == "rust" ]; then if [ -d "${serveridentitydir}/storage" ]||[ -d "${serveridentitydir}/user" ]||[ -n "$(find "${serveridentitydir}" -type f -name "proceduralmap*.sav")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "barren*.sav")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "Log.*.txt")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "player.deaths.*.db")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "player.blueprints.*.db")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "sv.files.*.db")" ]; then fn_print_warning_nl "Any user, storage, log and map data from ${serveridentitydir} will be erased." if ! fn_prompt_yn "Continue?" Y; then - echo Exiting; core_exit.sh + core_exit.sh fi fn_script_log_info "User selects to erase any user, storage, log and map data from ${serveridentitydir}" fn_sleep_time diff --git a/lgsm/functions/compress_unreal2_maps.sh b/lgsm/functions/compress_unreal2_maps.sh index 856bc5086..3940e8066 100644 --- a/lgsm/functions/compress_unreal2_maps.sh +++ b/lgsm/functions/compress_unreal2_maps.sh @@ -5,20 +5,20 @@ # Description: Compresses unreal maps. local commandaction="Unreal Map Compressor" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") check.sh fn_print_header -echo "Will compress all maps in:" -echo "" +echo -e "Will compress all maps in:" +echo -e "" pwd -echo "" -echo "Compressed maps saved to:" -echo "" -echo "${compressedmapsdir}" -echo "" +echo -e "" +echo -e "Compressed maps saved to:" +echo -e "" +echo -e "${compressedmapsdir}" +echo -e "" if ! fn_prompt_yn "Start compression?" Y; then - echo Exiting; return + return fi mkdir -pv "${compressedmapsdir}" > /dev/null 2>&1 rm -rfv "${serverfiles}/Maps/"*.ut2.uz2 @@ -27,4 +27,5 @@ for map in "${serverfiles}/Maps/"*; do ./ucc-bin compress "${map}" --nohomedir done mv -fv "${serverfiles}/Maps/"*.ut2.uz2 "${compressedmapsdir}" + core_exit.sh diff --git a/lgsm/functions/compress_ut99_maps.sh b/lgsm/functions/compress_ut99_maps.sh index 0832ae997..100740acb 100644 --- a/lgsm/functions/compress_ut99_maps.sh +++ b/lgsm/functions/compress_ut99_maps.sh @@ -5,20 +5,20 @@ # Description: Compresses unreal maps. local commandaction="Unreal Map Compressor" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") check.sh fn_print_header -echo "Will compress all maps in:" -echo "" +echo -e "Will compress all maps in:" +echo -e "" pwd -echo "" -echo "Compressed maps saved to:" -echo "" -echo "${compressedmapsdir}" -echo "" +echo -e "" +echo -e "Compressed maps saved to:" +echo -e "" +echo -e "${compressedmapsdir}" +echo -e "" if ! fn_prompt_yn "Start compression?" Y; then - echo Exiting; return + return fi mkdir -pv "${compressedmapsdir}" > /dev/null 2>&1 rm -rfv "${serverfiles}/Maps/"*.unr.uz @@ -27,4 +27,5 @@ for map in "${serverfiles}/Maps/"*; do ./ucc-bin compress "${map}" --nohomedir done mv -fv "${serverfiles}/Maps/"*.unr.uz "${compressedmapsdir}" + core_exit.sh diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index 86eb202d8..a01accdf8 100644 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -19,7 +19,7 @@ local commandname="DOWNLOAD" local commandaction="Download" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") # Emptys contents of the LinuxGSM tmpdir. fn_clear_tmp(){ @@ -45,8 +45,8 @@ fn_dl_md5(){ local md5sumcmd=$(md5sum "${local_filedir}/${local_filename}"|awk '{print $1;}') if [ "${md5sumcmd}" != "${md5}" ]; then fn_print_fail_eol_nl - echo "${local_filename} returned MD5 checksum: ${md5sumcmd}" - echo "expected MD5 checksum: ${md5}" + echo -e "${local_filename} returned MD5 checksum: ${md5sumcmd}" + echo -e "expected MD5 checksum: ${md5}" fn_script_log_fatal "Verifying ${local_filename} with MD5" fn_script_log_info "${local_filename} returned MD5 checksum: ${md5sumcmd}" fn_script_log_info "Expected MD5 checksum: ${md5}" @@ -88,9 +88,9 @@ fn_dl_extract(){ fn_print_fail_eol_nl fn_script_log_fatal "Extracting download" if [ -f "${lgsmlog}" ]; then - echo "${extractcmd}" >> "${lgsmlog}" + echo -e "${extractcmd}" >> "${lgsmlog}" fi - echo "${extractcmd}" + echo -e "${extractcmd}" core_exit.sh else fn_print_ok_eol_nl @@ -100,7 +100,7 @@ fn_dl_extract(){ # Trap to remove file download if canceled before completed. fn_fetch_trap(){ - echo "" + echo -e "" echo -en "downloading ${local_filename}..." fn_print_canceled_eol_nl fn_script_log_info "Downloading ${local_filename}...CANCELED" @@ -133,11 +133,11 @@ fn_fetch_file(){ echo -en "downloading ${local_filename}..." fn_sleep_time echo -en "\033[1K" - curlcmd=$(${curlpath} --progress-bar --fail -L -o "${local_filedir}/${local_filename}" "${remote_fileurl}") + curlcmd=$(curl --progress-bar --fail -L -o "${local_filedir}/${local_filename}" "${remote_fileurl}") echo -en "downloading ${local_filename}..." else echo -en " fetching ${local_filename}...\c" - curlcmd=$(${curlpath} -s --fail -L -o "${local_filedir}/${local_filename}" "${remote_fileurl}" 2>&1) + curlcmd=$(curl -s --fail -L -o "${local_filedir}/${local_filename}" "${remote_fileurl}" 2>&1) fi local exitcode=$? if [ ${exitcode} -ne 0 ]; then @@ -145,10 +145,10 @@ fn_fetch_file(){ if [ -f "${lgsmlog}" ]; then fn_script_log_fatal "Downloading ${local_filename}" echo -e "${remote_fileurl}" >> "${lgsmlog}" - echo "${curlcmd}" >> "${lgsmlog}" + echo -e "${curlcmd}" >> "${lgsmlog}" fi echo -e "${remote_fileurl}" - echo "${curlcmd}" + echo -e "${curlcmd}" core_exit.sh else fn_print_ok_eol_nl @@ -168,6 +168,7 @@ fn_fetch_file(){ fn_dl_md5 # Execute file if run is set. if [ "${run}" == "run" ]; then + # shellcheck source=/dev/null source "${local_filedir}/${local_filename}" fi fi @@ -254,10 +255,8 @@ fn_update_function(){ fn_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" } -# Defines curl path. -curlpath=$(command -v curl 2>/dev/null) - -if [ "$(basename "${curlpath}")" != "curl" ]; then - echo "[ FAIL ] Curl is not installed" +# Check that curl is installed +if [ -z "$(command -v curl 2>/dev/null)" ]; then + echo -e "[ FAIL ] Curl is not installed" exit 1 fi diff --git a/lgsm/functions/core_exit.sh b/lgsm/functions/core_exit.sh index f92d3b129..8c10d77e0 100644 --- a/lgsm/functions/core_exit.sh +++ b/lgsm/functions/core_exit.sh @@ -6,8 +6,8 @@ fn_exit_dev_debug(){ if [ -f "${rootdir}/.dev-debug" ]; then - echo "" - echo "${function_selfname} exiting with code: ${exitcode}" + echo -e "" + echo -e "${function_selfname} exiting with code: ${exitcode}" if [ -f "${rootdir}/dev-debug.log" ]; then grep "functionfile=" "${rootdir}/dev-debug.log" | sed 's/functionfile=//g' > "${rootdir}/dev-debug-function-order.log" fi diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index ca11f80b5..b5061d94a 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -8,7 +8,7 @@ # Core core_dl.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" if [ "$(type fn_fetch_core_dl 2>/dev/null)" ]; then fn_fetch_core_dl "lgsm/functions" "core_dl.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" else @@ -17,7 +17,7 @@ fi } core_messages.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" if [ "$(type fn_fetch_core_dl 2>/dev/null)" ]; then fn_fetch_core_dl "lgsm/functions" "core_messages.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" else @@ -26,7 +26,7 @@ fi } core_legacy.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" if [ "$(type fn_fetch_core_dl 2>/dev/null)" ]; then fn_fetch_core_dl "lgsm/functions" "core_legacy.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" else @@ -35,523 +35,528 @@ fi } core_exit.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } core_getopt.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } core_trap.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } # Commands command_backup.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } command_console.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } command_debug.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } command_details.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } command_donate.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } command_postdetails.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } command_test_alert.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } command_monitor.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } command_start.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } command_stop.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } command_validate.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } command_install.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } command_install_resources_mta.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } install_squad_license.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } command_mods_install.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } command_mods_update.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } command_mods_remove.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } command_fastdl.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } command_ts3_server_pass.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } command_restart.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } command_wipe.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } # Checks check.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } check_config.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } check_deps.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } check_executable.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } check_glibc.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } check_ip.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } check_logs.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } check_permissions.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } check_root.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } check_status.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } check_steamcmd.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } check_system_dir.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } check_system_requirements.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } check_tmuxception.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } # Compress compress_unreal2_maps.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } compress_ut99_maps.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } # Mods mods_list.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } mods_core.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } # Dev command_dev_clear_functions.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } command_dev_debug.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } command_dev_detect_deps.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } command_dev_detect_glibc.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } command_dev_detect_ldd.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } command_dev_query_raw.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } # Fix fix.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } fix_ark.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } fix_arma3.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } fix_csgo.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } fix_dst.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } fix_ges.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } fix_ins.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } fix_kf.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } fix_kf2.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } fix_mta.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } fix_ro.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } fix_rust.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } fix_rw.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } fix_sfc.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } fix_steamcmd.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } fix_terraria.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } fix_tf2.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } fix_ut3.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } fix_rust.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } fix_sdtd.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } fix_sof2.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } fix_ss3.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } fix_ts3.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } fix_ut2k4.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } fix_ut.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } fix_unt.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } fix_wurm.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } fix_zmr.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } # Info +info_stats.sh(){ +functionfile="${FUNCNAME[0]}" +fn_fetch_function +} + info_config.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } info_distro.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } info_gamedig.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } info_messages.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } info_parms.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } # Alert alert.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } alert_discord.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } alert_email.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } alert_ifttt.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } alert_mailgun.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } alert_pushbullet.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } alert_pushover.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } alert_telegram.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } alert_slack.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } # Logs logs.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } # Query query_gamedig.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } # Update command_update_functions.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } command_update_linuxgsm.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } command_update.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } update_ts3.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } update_minecraft.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } update_mumble.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } update_mta.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } update_factorio.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } @@ -561,12 +566,12 @@ fn_fetch_function } update_steamcmd.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } fn_update_functions.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } @@ -580,91 +585,96 @@ command_install.sh } install_complete.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } install_config.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } install_factorio_save.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } install_dst_token.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } install_eula.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } install_gsquery.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } install_gslt.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } install_header.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } install_logs.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } install_retry.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } install_server_dir.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } install_server_files.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" +fn_fetch_function +} + +install_stats.sh(){ +functionfile="${FUNCNAME[0]}" fn_fetch_function } install_steamcmd.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } install_ts3.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } install_ts3db.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } install_ut2k4.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } install_dl_ut2k4.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } install_ut2k4_key.sh(){ -functionfile="${FUNCNAME}" +functionfile="${FUNCNAME[0]}" fn_fetch_function } diff --git a/lgsm/functions/core_getopt.sh b/lgsm/functions/core_getopt.sh index 453e38725..6065bbf6c 100644 --- a/lgsm/functions/core_getopt.sh +++ b/lgsm/functions/core_getopt.sh @@ -4,7 +4,7 @@ # Website: https://linuxgsm.com # Description: getopt arguments. -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") ### Define all commands here. ## User commands | Trigger commands | Description @@ -74,13 +74,11 @@ if [ -n "${appid}" ]; then currentopt+=( "${cmd_validate[@]}" ) fi -#Backup. +# Backup. currentopt+=( "${cmd_backup[@]}" ) -# Exclude games without a console. -if [ "${shortname}" != "ts3" ]; then - currentopt+=( "${cmd_console[@]}" "${cmd_debug[@]}" ) -fi +# Console & Debug +currentopt+=( "${cmd_console[@]}" "${cmd_debug[@]}" ) ## Game server exclusive commands. @@ -145,18 +143,18 @@ currentopt+=( "${cmd_donate[@]}" ) optcommands=() index="0" for ((index="0"; index < ${#currentopt[@]}; index+=3)); do - cmdamount="$(echo "${currentopt[index]}" | awk -F ';' '{ print NF }')" - for ((cmdindex=1; cmdindex <= ${cmdamount}; cmdindex++)); do - optcommands+=( "$(echo "${currentopt[index]}" | awk -F ';' -v x=${cmdindex} '{ print $x }')" ) + cmdamount=$(echo -e "${currentopt[index]}" | awk -F ';' '{ print NF }') + for ((cmdindex=1; cmdindex <= cmdamount; cmdindex++)); do + optcommands+=( "$(echo -e "${currentopt[index]}" | awk -F ';' -v x=${cmdindex} '{ print $x }')" ) done done # Shows LinuxGSM usage. fn_opt_usage(){ - echo "Usage: $0 [option]" + echo -e "Usage: $0 [option]" echo -e "" - echo "LinuxGSM - ${gamename} - Version ${version}" - echo "https://linuxgsm.com/${gameservername}" + echo -e "LinuxGSM - ${gamename} - Version ${version}" + echo -e "https://linuxgsm.com/${gameservername}" echo -e "" echo -e "${lightyellow}Commands${default}" # Display available commands. @@ -165,7 +163,7 @@ fn_opt_usage(){ for ((index="0"; index < ${#currentopt[@]}; index+=3)); do # Hide developer commands. if [ "${currentopt[index+2]}" != "DEVCOMMAND" ]; then - echo -e "${cyan}$(echo "${currentopt[index]}" | awk -F ';' '{ print $2 }')\t${default}$(echo "${currentopt[index]}" | awk -F ';' '{ print $1 }')\t| ${currentopt[index+2]}" + echo -e "${cyan}$(echo -e "${currentopt[index]}" | awk -F ';' '{ print $2 }')\t${default}$(echo -e "${currentopt[index]}" | awk -F ';' '{ print $1 }')\t| ${currentopt[index+2]}" fi done } | column -s $'\t' -t @@ -182,9 +180,9 @@ for i in "${optcommands[@]}"; do # Seek and run command. index="0" for ((index="0"; index < ${#currentopt[@]}; index+=3)); do - currcmdamount="$(echo "${currentopt[index]}" | awk -F ';' '{ print NF }')" - for ((currcmdindex=1; currcmdindex <= ${currcmdamount}; currcmdindex++)); do - if [ "$(echo "${currentopt[index]}" | awk -F ';' -v x=${currcmdindex} '{ print $x }')" == "${getopt}" ]; then + currcmdamount=$(echo -e "${currentopt[index]}" | awk -F ';' '{ print NF }') + for ((currcmdindex=1; currcmdindex <= currcmdamount; currcmdindex++)); do + if [ "$(echo -e "${currentopt[index]}" | awk -F ';' -v x=${currcmdindex} '{ print $x }')" == "${getopt}" ]; then # Run command. eval "${currentopt[index+1]}" core_exit.sh diff --git a/lgsm/functions/core_messages.sh b/lgsm/functions/core_messages.sh index 51b9a4817..252ef182c 100644 --- a/lgsm/functions/core_messages.sh +++ b/lgsm/functions/core_messages.sh @@ -11,6 +11,7 @@ fn_ansi_loader(){ if [ "${ansi}" != "off" ]; then # echo colors default="\e[0m" + black="\e[30m" red="\e[31m" lightred="\e[91m" green="\e[32m" @@ -23,6 +24,9 @@ fn_ansi_loader(){ lightmagenta="\e[95m" cyan="\e[36m" lightcyan="\e[96m" + darkgrey="\e[90m" + lightgrey="\e[37m" + white="\e[97m" fi # carriage return & erase to end of line. creeol="\r\033[K" @@ -43,9 +47,9 @@ fn_sleep_time(){ fn_script_log(){ if [ -d "${lgsmlogdir}" ]; then if [ -n "${commandname}" ]; then - echo -e "$(date '+%b %d %H:%M:%S.%3N') ${servicename}: ${commandname}: ${1}" >> "${lgsmlog}" + echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: ${1}" >> "${lgsmlog}" else - echo -e "$(date '+%b %d %H:%M:%S.%3N') ${servicename}: ${1}" >> "${lgsmlog}" + echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${1}" >> "${lgsmlog}" fi fi } @@ -54,9 +58,9 @@ fn_script_log(){ fn_script_log_pass(){ if [ -d "${lgsmlogdir}" ]; then if [ -n "${commandname}" ]; then - echo -e "$(date '+%b %d %H:%M:%S.%3N') ${servicename}: ${commandname}: PASS: ${1}" >> "${lgsmlog}" + echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: PASS: ${1}" >> "${lgsmlog}" else - echo -e "$(date '+%b %d %H:%M:%S.%3N') ${servicename}: PASS: ${1}" >> "${lgsmlog}" + echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: PASS: ${1}" >> "${lgsmlog}" fi fi exitcode=0 @@ -66,9 +70,9 @@ fn_script_log_pass(){ fn_script_log_fatal(){ if [ -d "${lgsmlogdir}" ]; then if [ -n "${commandname}" ]; then - echo -e "$(date '+%b %d %H:%M:%S.%3N') ${servicename}: ${commandname}: FATAL: ${1}" >> "${lgsmlog}" + echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: FATAL: ${1}" >> "${lgsmlog}" else - echo -e "$(date '+%b %d %H:%M:%S.%3N') ${servicename}: FATAL: ${1}" >> "${lgsmlog}" + echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: FATAL: ${1}" >> "${lgsmlog}" fi fi exitcode=1 @@ -78,9 +82,9 @@ fn_script_log_fatal(){ fn_script_log_error(){ if [ -d "${lgsmlogdir}" ]; then if [ -n "${commandname}" ]; then - echo -e "$(date '+%b %d %H:%M:%S.%3N') ${servicename}: ${commandname}: ERROR: ${1}" >> "${lgsmlog}" + echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: ERROR: ${1}" >> "${lgsmlog}" else - echo -e "$(date '+%b %d %H:%M:%S.%3N') ${servicename}: ERROR: ${1}" >> "${lgsmlog}" + echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ERROR: ${1}" >> "${lgsmlog}" fi fi exitcode=2 @@ -90,9 +94,9 @@ fn_script_log_error(){ fn_script_log_warn(){ if [ -d "${lgsmlogdir}" ]; then if [ -n "${commandname}" ]; then - echo -e "$(date '+%b %d %H:%M:%S.%3N') ${servicename}: ${commandname}: WARN: ${1}" >> "${lgsmlog}" + echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: WARN: ${1}" >> "${lgsmlog}" else - echo -e "$(date '+%b %d %H:%M:%S.%3N') ${servicename}: WARN: ${1}" >> "${lgsmlog}" + echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: WARN: ${1}" >> "${lgsmlog}" fi fi exitcode=3 @@ -102,9 +106,9 @@ fn_script_log_warn(){ fn_script_log_info(){ if [ -d "${lgsmlogdir}" ]; then if [ -n "${commandname}" ]; then - echo -e "$(date '+%b %d %H:%M:%S.%3N') ${servicename}: ${commandname}: INFO: ${1}" >> "${lgsmlog}" + echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: INFO: ${1}" >> "${lgsmlog}" else - echo -e "$(date '+%b %d %H:%M:%S.%3N') ${servicename}: INFO: ${1}" >> "${lgsmlog}" + echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: INFO: ${1}" >> "${lgsmlog}" fi fi } @@ -115,18 +119,18 @@ fn_script_log_info(){ # [ .... ] fn_print_dots(){ if [ -n "${commandaction}" ]; then - echo -en "${creeol}[ .... ] ${commandaction} ${servicename}: $@" + echo -en "${creeol}[ .... ] ${commandaction} ${servicename}: $*" else - echo -en "${creeol}[ .... ] $@" + echo -en "${creeol}[ .... ] $*" fi fn_sleep_time } fn_print_dots_nl(){ if [ -n "${commandaction}" ]; then - echo -e "${creeol}[ .... ] ${commandaction} ${servicename}: $@" + echo -e "${creeol}[ .... ] ${commandaction} ${servicename}: $*" else - echo -e "${creeol}[ .... ] $@" + echo -e "${creeol}[ .... ] $*" fi fn_sleep_time echo -en "\n" @@ -135,18 +139,18 @@ fn_print_dots_nl(){ # [ OK ] fn_print_ok(){ if [ -n "${commandaction}" ]; then - echo -en "${creeol}[${green} OK ${default}] ${commandaction} ${servicename}: $@" + echo -en "${creeol}[${green} OK ${default}] ${commandaction} ${servicename}: $*" else - echo -en "${creeol}[${green} OK ${default}] $@" + echo -en "${creeol}[${green} OK ${default}] $*" fi fn_sleep_time } fn_print_ok_nl(){ if [ -n "${commandaction}" ]; then - echo -en "${creeol}[${green} OK ${default}] ${commandaction} ${servicename}: $@" + echo -en "${creeol}[${green} OK ${default}] ${commandaction} ${servicename}: $*" else - echo -en "${creeol}[${green} OK ${default}] $@" + echo -en "${creeol}[${green} OK ${default}] $*" fi fn_sleep_time echo -en "\n" @@ -155,18 +159,18 @@ fn_print_ok_nl(){ # [ FAIL ] fn_print_fail(){ if [ -n "${commandaction}" ]; then - echo -en "${creeol}[${red} FAIL ${default}] ${commandaction} ${servicename}: $@" + echo -en "${creeol}[${red} FAIL ${default}] ${commandaction} ${servicename}: $*" else - echo -en "${creeol}[${red} FAIL ${default}] $@" + echo -en "${creeol}[${red} FAIL ${default}] $*" fi fn_sleep_time } fn_print_fail_nl(){ if [ -n "${commandaction}" ]; then - echo -en "${creeol}[${red} FAIL ${default}] ${commandaction} ${servicename}: $@" + echo -en "${creeol}[${red} FAIL ${default}] ${commandaction} ${servicename}: $*" else - echo -en "${creeol}[${red} FAIL ${default}] $@" + echo -en "${creeol}[${red} FAIL ${default}] $*" fi fn_sleep_time echo -en "\n" @@ -175,18 +179,18 @@ fn_print_fail_nl(){ # [ ERROR ] fn_print_error(){ if [ -n "${commandaction}" ]; then - echo -en "${creeol}[${red}ERROR ${default}] ${commandaction} ${servicename}: $@" + echo -en "${creeol}[${red}ERROR ${default}] ${commandaction} ${servicename}: $*" else - echo -en "${creeol}[${red}ERROR ${default}] $@" + echo -en "${creeol}[${red}ERROR ${default}] $*" fi fn_sleep_time } fn_print_error_nl(){ if [ -n "${commandaction}" ]; then - echo -en "${creeol}[${red}ERROR ${default}] ${commandaction} ${servicename}: $@" + echo -en "${creeol}[${red}ERROR ${default}] ${commandaction} ${servicename}: $*" else - echo -en "${creeol}[${red}ERROR ${default}] $@" + echo -en "${creeol}[${red}ERROR ${default}] $*" fi fn_sleep_time echo -en "\n" @@ -195,18 +199,18 @@ fn_print_error_nl(){ # [ WARN ] fn_print_warn(){ if [ -n "${commandaction}" ]; then - echo -en "${creeol}[${yellow} WARN ${default}] ${commandaction} ${servicename}: $@" + echo -en "${creeol}[${lightyellow} WARN ${default}] ${commandaction} ${servicename}: $*" else - echo -en "${creeol}[${yellow} WARN ${default}] $@" + echo -en "${creeol}[${lightyellow} WARN ${default}] $*" fi fn_sleep_time } fn_print_warn_nl(){ if [ -n "${commandaction}" ]; then - echo -en "${creeol}[${yellow} WARN ${default}] ${commandaction} ${servicename}: $@" + echo -en "${creeol}[${lightyellow} WARN ${default}] ${commandaction} ${servicename}: $*" else - echo -en "${creeol}[${yellow} WARN ${default}] $@" + echo -en "${creeol}[${lightyellow} WARN ${default}] $*" fi fn_sleep_time echo -en "\n" @@ -215,18 +219,18 @@ fn_print_warn_nl(){ # [ INFO ] fn_print_info(){ if [ -n "${commandaction}" ]; then - echo -en "${creeol}[${cyan} INFO ${default}] ${commandaction} ${servicename}: $@" + echo -en "${creeol}[${cyan} INFO ${default}] ${commandaction} ${servicename}: $*" else - echo -en "${creeol}[${cyan} INFO ${default}] $@" + echo -en "${creeol}[${cyan} INFO ${default}] $*" fi fn_sleep_time } fn_print_info_nl(){ if [ -n "${commandaction}" ]; then - echo -en "${creeol}[${cyan} INFO ${default}] ${commandaction} ${servicename}: $@" + echo -en "${creeol}[${cyan} INFO ${default}] ${commandaction} ${servicename}: $*" else - echo -en "${creeol}[${cyan} INFO ${default}] $@" + echo -en "${creeol}[${cyan} INFO ${default}] $*" fi fn_sleep_time echo -en "\n" @@ -239,63 +243,62 @@ fn_print_info_nl(){ # ================================= fn_print_header(){ echo -e "" - echo -e "${gamename} ${commandaction}" + echo -e "${lightyellow}${gamename} ${commandaction}${default}" echo -e "=================================${default}" - echo -e "" } # Complete! fn_print_complete(){ - echo -en "${green}Complete!${default} $@" + echo -en "${green}Complete!${default} $*" fn_sleep_time } fn_print_complete_nl(){ - echo -e "${green}Complete!${default} $@" + echo -e "${green}Complete!${default} $*" fn_sleep_time } # Failure! fn_print_failure(){ - echo -en "${red}Failure!${default} $@" + echo -en "${red}Failure!${default} $*" fn_sleep_time } fn_print_failure_nl(){ - echo -e "${red}Failure!${default} $@" + echo -e "${red}Failure!${default} $*" fn_sleep_time } # Error! fn_print_error2(){ - echo -en "${red}Error!${default} $@" + echo -en "${red}Error!${default} $*" fn_sleep_time } fn_print_error2_nl(){ - echo -e "${red}Error!${default} $@" + echo -e "${red}Error!${default} $*" fn_sleep_time } # Warning! fn_print_warning(){ - echo -en "${yellow}Warning!${default} $@" + echo -en "${lightyellow}Warning!${default} $*" fn_sleep_time } fn_print_warning_nl(){ - echo -e "${yellow}Warning!${default} $@" + echo -e "${lightyellow}Warning!${default} $*" fn_sleep_time } # Information! fn_print_information(){ - echo -en "${cyan}Information!${default} $@" + echo -en "${cyan}Information!${default} $*" fn_sleep_time } fn_print_information_nl(){ - echo -e "${cyan}Information!${default} $@" + echo -e "${cyan}Information!${default} $*" fn_sleep_time } @@ -317,7 +320,7 @@ fn_prompt_yn(){ case "${yn}" in [Yy]|[Yy][Ee][Ss]) return 0 ;; [Nn]|[Nn][Oo]) return 1 ;; - *) echo "Please answer yes or no." ;; + *) echo -e "Please answer yes or no." ;; esac done } @@ -348,13 +351,17 @@ fn_print_error_eol(){ echo -en "${red}ERROR${default}" } +fn_print_error_eol_nl(){ + echo -en "${red}ERROR${default}" +} + # WARN fn_print_warn_eol(){ - echo -en "${red}WARN${default}" + echo -en "${lightyellow}WARN${default}" } fn_print_warn_eol_nl(){ - echo -e "${red}WARN${default}" + echo -e "${lightyellow}WARN${default}" } # INFO @@ -419,3 +426,39 @@ fn_print_update_eol(){ fn_print_update_eol_nl(){ echo -e "${cyan}UPDATE${default}" } + +fn_print_ascii_logo(){ + echo -e "" + echo -e " mdMMMMbm" + echo -e " mMMMMMMMMMMm" + echo -e " mMMMMMMMMMMMMm" + echo -e " mMMMMMMMMMMMMMMm" + echo -e " hMMMV^VMMV^VMMMh" + echo -e " MMMMM MM MMMMM" + echo -e " hMMs vv sMMh" + echo -e " hMMM: :MMMh" + echo -e " .hMMMh hMMMh." + echo -e " -dMMMh ${lightgrey}__${default} hMMMd-" + echo -e " :mMMMs ${lightgrey}||${default} sMMMm:" + echo -e " :MMMM+ ${lightgrey}||${default} ${red}_${default} +NMMN:" + echo -e " .mMMM+ ${lightgrey}========${default} +MMMm." + echo -e " yMMMy ${darkgrey}##############${default} yMMMy" + echo -e " mMMM: ${darkgrey}##############${default} :MMMm" + echo -e " mMM ${lightyellow}nn${default} ${lightyellow}nn${default} ${lightyellow}nn${default} ${lightyellow}nn${default} MMm" + echo -e " o ${lightyellow}nNNNNNNNn${default} ${lightyellow}nNNNNNNNn${default} o" + echo -e " ${lightyellow}nNNNNNNNNNn${default} ${lightyellow}nNNNNNNNNNn${default}" + echo -e " ${lightyellow}nNNNNNNNNNNN${default} ${lightyellow}NNNNNNNNNNNn${default}" + echo -e " ${lightyellow}+NNNNNNNNN:${default} ${lightyellow}:NNNNNNNNN+${default}" + echo -e " ${lightyellow}nNNNNNNN${default} /\ ${lightyellow}NNNNNNNn${default}" + echo -e " ${lightyellow}nnnnn${default} db ${lightyellow}nnnnn${default}" + echo -e "" + echo -e "${lightyellow}888${default} ${lightyellow}d8b${default} ${default}.d8888b. .d8888b. 888b d888" + echo -e "${lightyellow}888 Y8P ${default}d88P Y88b d88P Y88b 8888b d8888" + echo -e "${lightyellow}888${default} ${default}888${default} 888 Y88b. 88888b.d88888" + echo -e "${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}88888b.${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} 888 Y888b. 888Y88888P888" + echo -e "${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}88b${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}Y8bd8P${default} 888 88888 Y88b. 888 Y888P 888" + echo -e "${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}X88K${default} 888 888 888 888 Y8P 888" + echo -e "${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}Y88b${default} ${lightyellow}88Y${default} ${lightyellow}.d8pq8b.${default} Y88b d88P Y88b d88P 888 * 888" + echo -e "${lightyellow}LinuxGSM${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}Y8888Y${default} ${lightyellow}888${default} ${lightyellow}888${default} Y2012P88 Y8888P 888 888" + echo -e "" +} diff --git a/lgsm/functions/core_trap.sh b/lgsm/functions/core_trap.sh index 54f2ef2c5..4c9db3579 100644 --- a/lgsm/functions/core_trap.sh +++ b/lgsm/functions/core_trap.sh @@ -5,7 +5,7 @@ # Description: Handles CTRL-C trap to give an exit code. fn_exit_trap(){ - echo "" + echo -e "" core_exit.sh } diff --git a/lgsm/functions/fix.sh b/lgsm/functions/fix.sh index 23153d87c..04d5c09b5 100644 --- a/lgsm/functions/fix.sh +++ b/lgsm/functions/fix.sh @@ -81,9 +81,9 @@ fi # Fixes that are run on install only. if [ "${function_selfname}" == "command_install.sh" ]; then if [ "${shortname}" == "kf" ]||[ "${shortname}" == "kf2" ]||[ "${shortname}" == "ro" ]||[ "${shortname}" == "ut2k4" ]||[ "${shortname}" == "ut" ]||[ "${shortname}" == "ut3" ]; then - echo "" - echo "Applying Post-Install Fixes" - echo "=================================" + echo -e "" + echo -e "Applying Post-Install Fixes" + echo -e "=================================" fn_sleep_time if [ "${shortname}" == "kf" ]; then fix_kf.sh diff --git a/lgsm/functions/fix_arma3.sh b/lgsm/functions/fix_arma3.sh index ffa3d35e0..eda6dde69 100644 --- a/lgsm/functions/fix_arma3.sh +++ b/lgsm/functions/fix_arma3.sh @@ -6,7 +6,7 @@ local commandname="FIX" local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") # Fixes: 20150 Segmentation fault (core dumped) error. if [ ! -d "${HOME}/.local/share/Arma 3" ]||[ ! -d "${HOME}/.local/share/Arma 3 - Other Profiles" ]; then diff --git a/lgsm/functions/fix_csgo.sh b/lgsm/functions/fix_csgo.sh index 4cf281851..5e9981e38 100644 --- a/lgsm/functions/fix_csgo.sh +++ b/lgsm/functions/fix_csgo.sh @@ -6,7 +6,7 @@ local commandname="FIX" local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") # Fixes: server not always creating steam_appid.txt file. if [ ! -f "${serverfiles}/steam_appid.txt" ]; then diff --git a/lgsm/functions/fix_dst.sh b/lgsm/functions/fix_dst.sh index e2850c8b8..3b62be24b 100644 --- a/lgsm/functions/fix_dst.sh +++ b/lgsm/functions/fix_dst.sh @@ -6,7 +6,7 @@ local commandname="FIX" local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") # Fixes: ./dontstarve_dedicated_server_nullrenderer: ./lib32/libcurl-gnutls.so.4: no version information available (required by ./dontstarve_dedicated_server_nullrenderer). # Issue only occures on CentOS as libcurl-gnutls.so.4 is called libcurl.so.4 on CentOS. diff --git a/lgsm/functions/fix_kf.sh b/lgsm/functions/fix_kf.sh index bb5a8b6ca..0661775d4 100644 --- a/lgsm/functions/fix_kf.sh +++ b/lgsm/functions/fix_kf.sh @@ -6,20 +6,20 @@ local commandname="FIX" local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") -echo "Applying WebAdmin ROOst.css fix." -echo "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13" +echo -e "Applying WebAdmin ROOst.css fix." +echo -e "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13" sed -i 's/none}/none;/g' "${serverfiles}/Web/ServerAdmin/ROOst.css" sed -i 's/underline}/underline;/g' "${serverfiles}/Web/ServerAdmin/ROOst.css" fn_sleep_time -echo "Applying WebAdmin CharSet fix." -echo "http://forums.tripwireinteractive.com/showpost.php?p=442340&postcount=1" +echo -e "Applying WebAdmin CharSet fix." +echo -e "http://forums.tripwireinteractive.com/showpost.php?p=442340&postcount=1" sed -i 's/CharSet="iso-8859-1"/CharSet="utf-8"/g' "${systemdir}/UWeb.int" fn_sleep_time -echo "applying server name fix." +echo -e "applying server name fix." fn_sleep_time -echo "forcing server restart..." +echo -e "forcing server restart..." fn_sleep_time exitbypass=1 command_start.sh diff --git a/lgsm/functions/fix_kf2.sh b/lgsm/functions/fix_kf2.sh index e8f3440f0..2909a535f 100644 --- a/lgsm/functions/fix_kf2.sh +++ b/lgsm/functions/fix_kf2.sh @@ -6,7 +6,7 @@ local commandname="FIX" local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") fn_parms(){ parms="\"${defaultmap}?Game=KFGameContent.KFGameInfo_VersusSurvival\"" diff --git a/lgsm/functions/fix_mta.sh b/lgsm/functions/fix_mta.sh index 4eb4ff900..c8b2ff8b0 100644 --- a/lgsm/functions/fix_mta.sh +++ b/lgsm/functions/fix_mta.sh @@ -6,7 +6,7 @@ # Description: Installs the libmysqlclient for database functions on the server local commandname="FIX" local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") if [ ! -f "${lgsmdir}/lib/libmysqlclient.so.16" ]; then fixname="libmysqlclient16" diff --git a/lgsm/functions/fix_ro.sh b/lgsm/functions/fix_ro.sh index 1ded9824b..1e1da31bc 100644 --- a/lgsm/functions/fix_ro.sh +++ b/lgsm/functions/fix_ro.sh @@ -6,23 +6,23 @@ local commandname="FIX" local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") -echo "Applying WebAdmin ROOst.css fix." -echo "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13" +echo -e "Applying WebAdmin ROOst.css fix." +echo -e "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13" sed -i 's/none}/none;/g' "${serverfiles}/Web/ServerAdmin/ROOst.css" sed -i 's/underline}/underline;/g' "${serverfiles}/Web/ServerAdmin/ROOst.css" fn_sleep_time -echo "Applying WebAdmin CharSet fix." -echo "http://forums.tripwireinteractive.com/showpost.php?p=442340&postcount=1" +echo -e "Applying WebAdmin CharSet fix." +echo -e "http://forums.tripwireinteractive.com/showpost.php?p=442340&postcount=1" sed -i 's/CharSet="iso-8859-1"/CharSet="utf-8"/g' "${systemdir}/uweb.int" fn_sleep_time -echo "Applying Steam AppID fix." +echo -e "Applying Steam AppID fix." sed -i 's/1210/1200/g' "${systemdir}/steam_appid.txt" fn_sleep_time -echo "applying server name fix." +echo -e "applying server name fix." fn_sleep_time -echo "forcing server restart..." +echo -e "forcing server restart..." fn_sleep_time exitbypass=1 command_start.sh diff --git a/lgsm/functions/fix_sfc.sh b/lgsm/functions/fix_sfc.sh index 060ec4823..a40250083 100644 --- a/lgsm/functions/fix_sfc.sh +++ b/lgsm/functions/fix_sfc.sh @@ -6,7 +6,7 @@ local commandname="FIX" local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") if [ ! -f "${serverfiles}/bin/datacache.so" ]; then ln -s "${serverfiles}/bin/datacache_srv.so" "${serverfiles}/bin/datacache.so" diff --git a/lgsm/functions/fix_ss3.sh b/lgsm/functions/fix_ss3.sh index 73626f366..c7277ea9d 100644 --- a/lgsm/functions/fix_ss3.sh +++ b/lgsm/functions/fix_ss3.sh @@ -6,7 +6,7 @@ local commandname="FIX" local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") # Fixes https://steamcommunity.com/app/41070/discussions/0/353916981477716386/ if [ "$(diff "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/Bin/steamclient.so" >/dev/null)" ]; then diff --git a/lgsm/functions/fix_steamcmd.sh b/lgsm/functions/fix_steamcmd.sh index eb1622978..37bd4f61f 100644 --- a/lgsm/functions/fix_steamcmd.sh +++ b/lgsm/functions/fix_steamcmd.sh @@ -6,7 +6,7 @@ local commandname="FIX" local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") # Fixes: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam,or a local steamclient.so. if [ ! -f "${HOME}/.steam/sdk32/steamclient.so" ]; then diff --git a/lgsm/functions/fix_terraria.sh b/lgsm/functions/fix_terraria.sh index 1a898d046..e3a595029 100644 --- a/lgsm/functions/fix_terraria.sh +++ b/lgsm/functions/fix_terraria.sh @@ -6,6 +6,6 @@ local commandname="FIX" local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") export TERM=xterm diff --git a/lgsm/functions/fix_tf2.sh b/lgsm/functions/fix_tf2.sh index 26a31846e..5c8cdf6c4 100644 --- a/lgsm/functions/fix_tf2.sh +++ b/lgsm/functions/fix_tf2.sh @@ -6,7 +6,7 @@ local commandname="FIX" local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") # Fixes: Team Fortress 2 Segmentation fault for Red-Hat Distros #2062. if [ -f "/etc/redhat-release" ]&&[ ! -f "${serverfiles}/bin/libcurl-gnutls.so.4" ]; then diff --git a/lgsm/functions/fix_ts3.sh b/lgsm/functions/fix_ts3.sh index 751b5dbd5..3e3599066 100644 --- a/lgsm/functions/fix_ts3.sh +++ b/lgsm/functions/fix_ts3.sh @@ -6,7 +6,7 @@ local commandname="FIX" local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") # Fixes: makes libmariadb2 available #1924. if [ ! -f "${serverfiles}/libmariadb.so.2" ]; then diff --git a/lgsm/functions/fix_ut.sh b/lgsm/functions/fix_ut.sh index 5632c86e4..e479e9442 100644 --- a/lgsm/functions/fix_ut.sh +++ b/lgsm/functions/fix_ut.sh @@ -6,9 +6,9 @@ local commandname="FIX" local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") #Set Binary Executable -echo "chmod +x ${executabledir}/${executable}" +echo -e "chmod +x ${executabledir}/${executable}" chmod +x "${executabledir}/${executable}" fn_sleep_time diff --git a/lgsm/functions/fix_ut2k4.sh b/lgsm/functions/fix_ut2k4.sh index cc517e1f3..45ef3dc78 100644 --- a/lgsm/functions/fix_ut2k4.sh +++ b/lgsm/functions/fix_ut2k4.sh @@ -6,20 +6,20 @@ local commandname="FIX" local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") -echo "applying WebAdmin ut2003.css fix." -echo "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13" +echo -e "applying WebAdmin ut2003.css fix." +echo -e "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13" sed -i 's/none}/none;/g' "${serverfiles}/Web/ServerAdmin/ut2003.css" sed -i 's/underline}/underline;/g' "${serverfiles}/Web/ServerAdmin/ut2003.css" fn_sleep_time -echo "applying WebAdmin CharSet fix." -echo "http://forums.tripwireinteractive.com/showpost.php?p=442340&postcount=1" +echo -e "applying WebAdmin CharSet fix." +echo -e "http://forums.tripwireinteractive.com/showpost.php?p=442340&postcount=1" sed -i 's/CharSet="iso-8859-1"/CharSet="utf-8"/g' "${systemdir}/UWeb.int" fn_sleep_time -echo "applying server name fix." +echo -e "applying server name fix." fn_sleep_time -echo "forcing server restart." +echo -e "forcing server restart." fn_sleep_time exitbypass=1 command_start.sh diff --git a/lgsm/functions/fix_ut3.sh b/lgsm/functions/fix_ut3.sh index 53bde310f..31eb85281 100644 --- a/lgsm/functions/fix_ut3.sh +++ b/lgsm/functions/fix_ut3.sh @@ -6,10 +6,10 @@ local commandname="FIX" local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") fn_parms(){ -parms="server VCTF-Suspense?Game=UTGameContent.UTVehicleCTFGame_Content?bIsDedicated=true?bIsLanMatch=false?bUsesStats=false?bShouldAdvertise=false?PureServer=1?bAllowJoinInProgress=true?ConfigSubDir=${servicename} -port=${port} -queryport=${queryport} -multihome=${ip} -nohomedir -unattended -log=${gamelog}" +parms="server VCTF-Suspense?Game=UTGameContent.UTVehicleCTFGame_Content?bIsDedicated=true?bIsLanMatch=false?bUsesStats=false?bShouldAdvertise=false?PureServer=1?bAllowJoinInProgress=true?ConfigSubDir=${selfname} -port=${port} -queryport=${queryport} -multihome=${ip} -nohomedir -unattended -log=${gamelog}" } fn_print_information "starting ${gamename} server to generate configs." diff --git a/lgsm/functions/fix_zmr.sh b/lgsm/functions/fix_zmr.sh index 0edfee967..5ed1d8beb 100644 --- a/lgsm/functions/fix_zmr.sh +++ b/lgsm/functions/fix_zmr.sh @@ -6,7 +6,7 @@ local commandname="FIX" local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") if [ ! -f "${serverfiles}/bin/datacache.so" ]; then ln -s "${serverfiles}/bin/datacache_srv.so" "${serverfiles}/bin/datacache.so" diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 0b84a4944..00d2d553b 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Gets specific details from config files. -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") ## Examples of filtering to get info from config files. # sed 's/foo//g' - remove foo @@ -386,6 +386,26 @@ fn_info_config_minecraft(){ fi } +fn_info_config_mohaa(){ + if [ ! -f "${servercfgfullpath}" ]; then + rconpassword="${unavailable}" + servername="${unavailable}" + serverpassword="${unavailable}" + maxplayers="${zero}" + else + rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta rconpassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + + # Not Set + rconpassword=${rconpassword:-"NOT SET"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + fi +} + #Post Scriptum: The bloody Seventh fn_info_config_pstbs(){ if [ ! -f "${servercfgfullpath}" ]; then @@ -393,9 +413,9 @@ fn_info_config_pstbs(){ 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:]')" + 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 @@ -685,8 +705,8 @@ fn_info_config_sbots(){ 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=$(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 servername=${servername:-"NOT SET"} @@ -833,12 +853,14 @@ fn_info_config_teeworlds(){ 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 @@ -846,6 +868,7 @@ fn_info_config_teeworlds(){ serverpassword=${serverpassword:-"NOT SET"} rconpassword=${rconpassword:-"NOT SET"} port=${port:-"8303"} + queryport=${port:-"8303"} maxplayers=${maxplayers:-"12"} fi } @@ -856,15 +879,18 @@ fn_info_config_terraria(){ 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 @@ -891,7 +917,7 @@ fn_info_config_unreal(){ adminpassword="${unavailable}" port="${zero}" queryport="${zero}" - gsqueryport="${zero}" + queryportgs="${zero}" webadminenabled="${unavailable}" webadminport="${zero}" webadminuser="${unavailable}" @@ -902,16 +928,48 @@ fn_info_config_unreal(){ 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)) - gsqueryport=$(grep "OldQueryPortNumber" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + 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:]') - if [ "${engine}" == "unreal" ]; then - 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$//') - else - webadminuser=$(grep "AdminName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//') - webadminpass="${adminpassword}" - fi + 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 +} + +fn_info_config_unreal2(){ + 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 "AdminName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//') + webadminpass="${adminpassword}" # Not Set servername=${servername:-"NOT SET"} @@ -919,7 +977,7 @@ fn_info_config_unreal(){ adminpassword=${adminpassword:-"NOT SET"} port=${port:-"0"} queryport=${queryport:-"0"} - gsqueryport=${gsqueryport:-"0"} + queryportgs=${queryportgs:-"0"} webadminenabled=${webadminenabled:-"NOT SET"} webadminport=${webadminport:-"0"} webadminuser=${webadminuser:-"NOT SET"} @@ -1068,20 +1126,18 @@ fn_info_config_mta(){ 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:]') - 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:]') 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 - - ip=$(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" + # ip=$(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 port=${port:-"22003"} @@ -1190,8 +1246,8 @@ fn_info_config_squad(){ 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=$(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 if [ ! -f "${servercfgdir}/Rcon.cfg" ]; then @@ -1311,6 +1367,9 @@ elif [ "${shortname}" == "jc3" ]; then # Killing Floor 2 elif [ "${shortname}" == "kf2" ]; then fn_info_config_kf2 +# Medal of Honor: Allied Assault +elif [ "${shortname}" == "mohaa" ]; then + fn_info_config_mohaa # QuakeWorld elif [ "${shortname}" == "qw" ]; then fn_info_config_quakeworld @@ -1343,7 +1402,7 @@ elif [ "${shortname}" == "arma3" ]; then fn_info_config_realvirtuality # Return to Castle Wolfenstein elif [ "${shortname}" == "rtcw" ]; then - fn_info_config_rtcw + fn_info_config_rtcw # Rising World elif [ "${shortname}" == "rw" ]; then fn_info_config_risingworld @@ -1355,14 +1414,14 @@ elif [ "${shortname}" == "sol" ]; then fn_info_config_soldat # Soldier Of Fortune 2: Gold Edition elif [ "${shortname}" == "sof2" ]; then - fn_info_config_sof2 + fn_info_config_sof2 # Source Engine Games elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then fn_info_config_source # Starbound elif [ "${shortname}" == "sb" ]; then fn_info_config_starbound -# 10: Teamspeak 3 +# Teamspeak 3 elif [ "${shortname}" == "ts3" ]; then fn_info_config_teamspeak3 # Mumble @@ -1383,9 +1442,12 @@ elif [ "${shortname}" == "terraria" ]; then # Tower Unite elif [ "${shortname}" == "tu" ]; then fn_info_config_towerunite -# Unreal/Unreal 2 engine -elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then +# Unreal engine +elif [ "${engine}" == "unreal" ]; then fn_info_config_unreal +# Unreal 2 engine +elif [ "${engine}" == "unreal2" ]; then + fn_info_config_unreal2 # Unreal 3 engine elif [ "${engine}" == "unreal3" ]; then fn_info_config_unreal3 diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh index 13af615ce..38305c6e3 100644 --- a/lgsm/functions/info_distro.sh +++ b/lgsm/functions/info_distro.sh @@ -5,13 +5,11 @@ # Description: Variables providing useful info on the Operating System such as disk and performace info. # Used for command_details.sh, command_debug.sh and alert.sh. -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") ### Game Server pid if [ "${status}" == "1" ]; then - if [ "${shortname}" != "ts3" ]; then - gameserverpid=$(tmux list-sessions -F "#{session_name} #{pane_pid}"| grep "^${servicename}"|awk '{print $2}') - fi + gameserverpid=$(tmux list-sessions -F "#{session_name} #{pane_pid}"| grep "^${selfname}"|awk '{print $2}') fi ### Distro information @@ -36,9 +34,9 @@ do distrocodename=$(grep VERSION_CODENAME /etc/os-release | sed 's/VERSION_CODENAME=//g' | sed 's/\"//g') elif [ -n "$(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) elif [ -z "${distrocodename}" ];then @@ -46,13 +44,13 @@ do fi elif [ -n "$(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 @@ -62,21 +60,21 @@ do elif [ -z "${distroversion}" ];then distroversion=$(rpm -qa \*-release | grep -Ei "oracle|redhat|centos|fedora" | cut -d"-" -f3) elif [ -z "${distroid}" ];then - distroid="$(awk '{print $1}' /etc/redhat-release)" + 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 if [ -z "$(command -V tmux 2>/dev/null)" ]; then tmuxv="${red}NOT INSTALLED!${default}" else - if [ "$(tmux -V|sed "s/tmux //" | sed -n '1 p' | tr -cd '[:digit:]')" -lt "16" ] 2>/dev/null; then + if [ "$(tmux -V | sed "s/tmux //" | sed -n '1 p' | tr -cd '[:digit:]')" -lt "16" ]; then tmuxv="$(tmux -V) (>= 1.6 required for console log)" else tmuxv=$(tmux -V) @@ -98,10 +96,11 @@ load=$(uptime|awk -F 'load average: ' '{ print $2 }') ## CPU information cpumodel=$(awk -F: '/model name/ {name=$2} END {print name}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//') cpucores=$(awk -F: '/model name/ {core++} END {print core}' /proc/cpuinfo) -cpufreqency=$(awk -F: ' /cpu MHz/ {freq=$2} END {print freq " MHz"}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//') +cpufreqency=$(awk -F: '/cpu MHz/ {freq=$2} END {print freq}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//') # CPU usage of the game server pid -if [ "${status}" == "1" ]; then - cpuused=$(ps --forest -o pcpu -g "$(ps -o sid= -p "${gameserverpid}")"|awk '{s+=$1} END {print s}') +if [ "${gameserverpid}" ]; then + cpuused=$(ps --forest -o pcpu -g "${gameserverpid}"|awk '{s+=$1} END {print s}') + cpuusedmhz=$(echo "${cpufreqency} * ${cpuused} / 100" | bc ) fi ## Memory information @@ -122,26 +121,26 @@ if [ -n "$(command -v numfmt 2>/dev/null)" ]; then if grep -q ^MemAvailable /proc/meminfo; then physmemactualfreekb=$(grep ^MemAvailable /proc/meminfo | awk '{print $2}') else - physmemactualfreekb=$((${physmemfreekb}+${physmembufferskb}+${physmemcachedkb})) + physmemactualfreekb=$((physmemfreekb+physmembufferskb+physmemcachedkb)) fi # Available RAM and swap. - physmemtotalmb=$((${physmemtotalkb}/1024)) + physmemtotalmb=$((physmemtotalkb/1024)) physmemtotal=$(numfmt --to=iec --from=iec --suffix=B "${physmemtotalkb}K") physmemfree=$(numfmt --to=iec --from=iec --suffix=B "${physmemactualfreekb}K") - physmemused=$(numfmt --to=iec --from=iec --suffix=B "$((${physmemtotalkb}-${physmemfreekb}-${physmembufferskb}-${physmemcachedkb}-${physmemreclaimablekb}))K") + physmemused=$(numfmt --to=iec --from=iec --suffix=B "$((physmemtotalkb-physmemfreekb-physmembufferskb-physmemcachedkb-physmemreclaimablekb))K") physmemavailable=$(numfmt --to=iec --from=iec --suffix=B "${physmemactualfreekb}K") - physmemcached=$(numfmt --to=iec --from=iec --suffix=B "$((${physmemcachedkb}+${physmemreclaimablekb}))K") + physmemcached=$(numfmt --to=iec --from=iec --suffix=B "$((physmemcachedkb+physmemreclaimablekb))K") swaptotal=$(numfmt --to=iec --from=iec --suffix=B "$(grep ^SwapTotal /proc/meminfo | awk '{print $2}')K") swapfree=$(numfmt --to=iec --from=iec --suffix=B "$(grep ^SwapFree /proc/meminfo | awk '{print $2}')K") swapused=$(numfmt --to=iec --from=iec --suffix=B "$(($(grep ^SwapTotal /proc/meminfo | awk '{print $2}')-$(grep ^SwapFree /proc/meminfo | awk '{print $2}')))K") # RAM usage of the game server pid # MB - if [ "${status}" == "1" ]; then - memused=$(ps --forest -o rss -g "$(ps -o sid= -p "${gameserverpid}")"|awk '{s+=$1} END {print s}'| awk '{$1/=1024;printf "%.0fMB\t",$1}{print $2}') + if [ "${gameserverpid}" ]; then + memused=$(ps --forest -o rss -g "${gameserverpid}" | awk '{s+=$1} END {print s}'| awk '{$1/=1024;printf "%.0f",$1}{print $2}') # % - pmemused=$(ps --forest -o %mem -g "$(ps -o sid= -p "${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. @@ -229,16 +228,16 @@ netlink=$(ethtool "${netint}" 2>/dev/null| grep Speed | awk '{print $2}') # External IP address if [ -z "${extip}" ]; then - extip=$(${curlpath} -4 -m 3 ifconfig.co 2>/dev/null) + extip=$(curl -4 -m 3 ifconfig.co 2>/dev/null) exitcode=$? # Should ifconfig.co return an error will use last known IP. if [ ${exitcode} -eq 0 ]; then - echo "${extip}" > "${tmpdir}/extip.txt" + echo -e "${extip}" > "${tmpdir}/extip.txt" else if [ -f "${tmpdir}/extip.txt" ]; then - extip=$(cat ${tmpdir}/extip.txt) + extip=$(cat "${tmpdir}/extip.txt") else - echo "x.x.x.x" + echo -e "x.x.x.x" fi fi fi @@ -253,12 +252,12 @@ else fi # Steam Master Server - checks if detected by master server. -if [ "$(command -v jq 2>/dev/null)" ]; then +if [ -n "$(command -v jq 2>/dev/null)" ]; then if [ "${ip}" ]&&[ "${port}" ]; then if [ "${steammaster}" == "true" ]; then - masterserver="$(${curlpath} -m 3 -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${ip}':'${port}'&format=json' | jq '.response.servers[]|.addr' | wc -l)" + masterserver=$(curl -m 3 -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${ip}':'${port}'&format=json' | jq '.response.servers[]|.addr' | wc -l) if [ "${masterserver}" == "0" ]; then - masterserver="$(${curlpath} -m 3 -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${extip}':'${port}'&format=json' | jq '.response.servers[]|.addr' | wc -l)" + masterserver=$(curl -m 3 -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${extip}':'${port}'&format=json' | jq '.response.servers[]|.addr' | wc -l) fi if [ "${masterserver}" == "0" ]; then displaymasterserver="false" diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index 940da400e..fb3121b17 100644 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -25,9 +25,9 @@ fn_info_message_head(){ echo -e "" echo -e "Server IP" if [ "${multiple_ip}" == "1" ]; then - echo -e "NOT SET" + echo -e "NOT SET" else - echo -e "${ip}:${port}" + echo -e "${ip}:${port}" fi } @@ -84,7 +84,7 @@ fn_info_message_server_resource(){ echo -e "${lightyellow}CPU\t${default}" echo -e "${lightblue}Model:\t${default}${cpumodel}" echo -e "${lightblue}Cores:\t${default}${cpucores}" - echo -e "${lightblue}Frequency:\t${default}${cpufreqency}" + echo -e "${lightblue}Frequency:\t${default}${cpufreqency}MHz" echo -e "${lightblue}Avg Load:\t${default}${load}" } | column -s $'\t' -t echo -e "" @@ -135,7 +135,7 @@ fn_info_message_gameserver_resource(){ { if [ "${status}" == "1" ]; then echo -e "${lightblue}CPU Used:\t${default}${cpuused}%${default}" - echo -e "${lightblue}Mem Used:\t${default}${pmemused}%\t${memused}${default}" + echo -e "${lightblue}Mem Used:\t${default}${pmemused}%\t${memused}MB${default}" else echo -e "${lightblue}CPU Used:\t${default}0%${default}" echo -e "${lightblue}Mem Used:\t${default}0%\t0MB${default}" @@ -160,8 +160,8 @@ fn_info_message_gameserver(){ # Server password: NOT SET # RCON password: adminF54CC0VR # Players: 0/16 - # Current Map: de_mirage - # Default Map: de_mirage + # Current map: de_mirage + # Default map: de_mirage # Game type: 0 # Game mode: 0 # Tick rate: 64 @@ -245,7 +245,6 @@ fn_info_message_gameserver(){ fi # Players - if [ "${querystatus}" != "0" ]; then if [ -n "${maxplayers}" ]; then echo -e "${lightblue}Maxplayers:\t${default}${maxplayers}" @@ -273,31 +272,31 @@ fn_info_message_gameserver(){ echo -e "${lightblue}Bots:\t${default}${gdbots}" fi - # Current Map + # Current map if [ -n "${gdmap}" ]; then - echo -e "${lightblue}Current Map:\t${default}${gdmap}" + echo -e "${lightblue}Current map:\t${default}${gdmap}" + fi + + # Default map + if [ -n "${defaultmap}" ]; then + echo -e "${lightblue}Default map:\t${default}${defaultmap}" fi if [ -n "${defaultscenario}" ]; then - # Current Scenario + # Current scenario if [ -n "${gdgamemode}" ]; then - echo -e "${lightblue}Current Scenario:\t${default}${gdgamemode}" + echo -e "${lightblue}Current scenario:\t${default}${gdgamemode}" fi else - # Current Scenario + # Current game mode if [ -n "${gdgamemode}" ]; then - echo -e "${lightblue}Current Game Mode:\t${default}${gdgamemode}" + echo -e "${lightblue}Current game mode:\t${default}${gdgamemode}" fi fi - # Default Map - if [ -n "${defaultmap}" ]; then - echo -e "${lightblue}Default Map:\t${default}${defaultmap}" - fi - - # Default Scenario + # Default scenario if [ -n "${defaultscenario}" ]; then - echo -e "${lightblue}Default Scenario:\t${default}${defaultscenario}" + echo -e "${lightblue}Default scenario:\t${default}${defaultscenario}" fi # Game type @@ -374,13 +373,13 @@ fn_info_message_gameserver(){ if [ -n "${serverversion}" ]; then echo -e "${blue}Server Version:\t${default}${serverversion}" fi - - # Listed on Master Server - if [ "${displaymasterserver}" ];then + + # Listed on Master server + if [ -n "${displaymasterserver}" ];then if [ "${displaymasterserver}" == "true" ];then - echo -e "${lightblue}Master Server:\t${green}${displaymasterserver}${default}" + echo -e "${lightblue}Master server:\t${green}${displaymasterserver}${default}" else - echo -e "${lightblue}Master Server:\t${red}${displaymasterserver}${default}" + echo -e "${lightblue}Master server:\t${red}${displaymasterserver}${default}" fi fi @@ -402,7 +401,7 @@ fn_info_message_script(){ # LinuxGSM version: v19.9.0 # glibc required: 2.15 # Discord alert: off - # Slack alert: off + # Slack alert: off # Email alert: off # Pushbullet alert: off # IFTTT alert: off @@ -419,7 +418,7 @@ fn_info_message_script(){ fn_messages_separator { # Script name - echo -e "${lightblue}Script name:\t${default}${servicename}" + echo -e "${lightblue}Script name:\t${default}${selfname}" # LinuxGSM version if [ -n "${version}" ]; then @@ -543,7 +542,7 @@ fn_info_message_ports(){ echo -e "" echo -e "${lightgreen}Ports${default}" fn_messages_separator - echo -e "Change ports by editing the parameters in:" + echo -e "${lightblue}Change ports by editing the parameters in:${default}" parmslocation="${red}UNKNOWN${default}" # engines/games that require editing in the config file @@ -568,7 +567,7 @@ fn_info_message_ports(){ done echo -e "${parmslocation}" echo -e "" - echo -e "Useful port diagnostic command:" + echo -e "${lightblue}Useful port diagnostic command:${default}" } fn_info_message_statusbottom(){ @@ -583,45 +582,45 @@ fn_info_message_statusbottom(){ fn_info_logs(){ echo -e "" - echo -e "${servicename} Logs" + echo -e "${selfname} Logs" echo -e "=================================" if [ -n "${lgsmlog}" ]; then echo -e "\nScript log\n===================" if [ ! "$(ls -A "${lgsmlogdir}")" ]; then - echo "${lgsmlogdir} (NO LOG FILES)" + echo -e "${lgsmlogdir} (NO LOG FILES)" elif [ ! -s "${lgsmlog}" ]; then - echo "${lgsmlog} (LOG FILE IS EMPTY)" + echo -e "${lgsmlog} (LOG FILE IS EMPTY)" else - echo "${lgsmlog}" + echo -e "${lgsmlog}" tail -25 "${lgsmlog}" fi - echo "" + echo -e "" fi if [ -n "${consolelog}" ]; then echo -e "\nConsole log\n====================" if [ ! "$(ls -A "${consolelogdir}")" ]; then - echo "${consolelogdir} (NO LOG FILES)" + echo -e "${consolelogdir} (NO LOG FILES)" elif [ ! -s "${consolelog}" ]; then - echo "${consolelog} (LOG FILE IS EMPTY)" + echo -e "${consolelog} (LOG FILE IS EMPTY)" else - echo "${consolelog}" + echo -e "${consolelog}" tail -25 "${consolelog}" | awk '{ sub("\r$", ""); print }' fi - echo "" + echo -e "" fi if [ -n "${gamelogdir}" ]; then echo -e "\nServer log\n===================" if [ ! "$(ls -A "${gamelogdir}")" ]; then - echo "${gamelogdir} (NO LOG FILES)" + echo -e "${gamelogdir} (NO LOG FILES)" else - echo "${gamelogdir}" + echo -e "${gamelogdir}" # dos2unix sed 's/\r//' tail "${gamelogdir}"/* 2>/dev/null | grep -v "==>" | sed '/^$/d' | sed 's/\r//' | tail -25 fi - echo "" + echo -e "" fi } @@ -631,7 +630,7 @@ fn_info_message_ark(){ echo -e "netstat -atunp | grep ShooterGame" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + 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 @@ -646,7 +645,7 @@ fn_info_message_ballisticoverkill(){ echo -e "netstat -atunp | grep BODS.x86" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" echo -e "> Game/RCON\tINBOUND\t${port}\tudp" echo -e "> Query\tINBOUND\t${queryport}\tudp" } | column -s $'\t' -t @@ -656,7 +655,7 @@ fn_info_message_battalion1944(){ echo -e "netstat -atunp | grep BattalionServ" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + 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 @@ -672,7 +671,7 @@ fn_info_message_cod(){ echo -e "netstat -atunp | grep cod_lnxded" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" echo -e "> Game\tINBOUND\t${port}\tudp" } | column -s $'\t' -t } @@ -681,7 +680,7 @@ fn_info_message_coduo(){ echo -e "netstat -atunp | grep coduo_lnxded" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" echo -e "> Game\tINBOUND\t${port}\tudp" } | column -s $'\t' -t } @@ -690,7 +689,7 @@ fn_info_message_cod2(){ echo -e "netstat -atunp | grep cod2_lnxded" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" echo -e "> Game\tINBOUND\t${port}\tudp" } | column -s $'\t' -t } @@ -699,7 +698,7 @@ fn_info_message_cod4(){ echo -e "netstat -atunp" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" echo -e "> Game\tINBOUND\t${port}\tudp" } | column -s $'\t' -t } @@ -708,16 +707,16 @@ fn_info_message_codwaw(){ echo -e "netstat -atunp | grep codwaw_lnxded" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" echo -e "> Game\tINBOUND\t${port}\tudp" } | column -s $'\t' -t } -fn_info_message_dontstarve(){ +fn_info_message_dst(){ echo -e "netstat -atunp | grep dontstarve" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + 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" @@ -729,7 +728,7 @@ fn_info_message_eco(){ echo -e "netstat -atunp | grep mono" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" echo -e "> Game\tINBOUND\t${port}\tudp" echo -e "> WebAdmin\tINBOUND\t${webadminport}\ttcp" } | column -s $'\t' -t @@ -740,7 +739,7 @@ fn_info_message_etlegacy(){ echo -e "netstat -atunp | grep etlded" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" echo -e "> Game/Query\tINBOUND\t${port}\tudp" } | column -s $'\t' -t } @@ -749,8 +748,9 @@ fn_info_message_factorio(){ echo -e "netstat -atunp | grep factorio" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" - echo -e "> Game\tINBOUND\t${port}\ttcp" + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" + echo -e "> Game\tINBOUND\t${port}\tudp" + echo -e "> RCON\tINBOUND\t${rconport}\ttcp" } | column -s $'\t' -t } @@ -758,7 +758,7 @@ fn_info_message_goldsource(){ echo -e "netstat -atunp | grep hlds_linux" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" echo -e "> Game/RCON\tINBOUND\t${port}\ttcp/udp" echo -e "< Client\tOUTBOUND\t${clientport}\tudp" } | column -s $'\t' -t @@ -768,7 +768,7 @@ fn_info_message_hurtworld(){ echo -e "netstat -atunp | grep Hurtworld" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" echo -e "> Game/RCON\tINBOUND\t${port}\tudp" echo -e "> Query\tINBOUND\t${queryport}\tudp" } | column -s $'\t' -t @@ -778,7 +778,7 @@ fn_info_message_inss(){ echo -e "netstat -atunp | grep Insurgency" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + 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" @@ -798,7 +798,7 @@ fn_info_message_justcause2(){ echo -e "netstat -atunp | grep Jcmp-Server" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" echo -e "> Game\tINBOUND\t${port}\tudp" } | column -s $'\t' -t } @@ -807,7 +807,7 @@ fn_info_message_justcause3(){ echo -e "netstat -atunp | grep Server" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + 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" @@ -818,18 +818,27 @@ fn_info_message_minecraft(){ echo -e "netstat -atunp | grep java" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + 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" } | 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" + } | column -s $'\t' -t +} + fn_info_message_mumble(){ echo -e "netstat -atunp | grep murmur" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" echo -e "> Voice\tINBOUND\t${port}\tudp" echo -e "> ServerQuery\tINBOUND\t${port}\ttcp" } | column -s $'\t' -t @@ -838,7 +847,7 @@ fn_info_message_pstbs(){ echo -e "netstat -atunp | grep PostScriptum" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + 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" @@ -849,7 +858,7 @@ fn_info_message_projectcars(){ echo -e "netstat -atunp | grep DedicatedS" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + 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" @@ -857,11 +866,11 @@ fn_info_message_projectcars(){ } fn_info_message_projectzomboid(){ - echo -e "netstat -atunp | grep java" + echo -e "netstat -atunp | grep ProjectZomb" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" - echo -e "> Game\tINBOUND\t${port}\tudp" + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" + echo -e "> Game/Query\tINBOUND\t${port}\tudp" } | column -s $'\t' -t } @@ -869,7 +878,7 @@ fn_info_message_quake(){ echo -e "netstat -atunp | grep mvdsv" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" echo -e "> Game\tINBOUND\t${port}\tudp" } | column -s $'\t' -t } @@ -878,7 +887,7 @@ fn_info_message_quake2(){ echo -e "netstat -atunp | grep quake2" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" echo -e "> Game\tINBOUND\t${port}\tudp" } | column -s $'\t' -t } @@ -887,7 +896,7 @@ fn_info_message_quake3(){ echo -e "netstat -atunp | grep q3ded" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" echo -e "> Game\tINBOUND\t${port}\tudp" } | column -s $'\t' -t } @@ -900,14 +909,14 @@ fn_info_message_quakelive(){ echo -e "" fi { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + 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" } | column -s $'\t' -t } -fn_info_message_realvirtuality(){ +fn_info_message_arma3(){ echo -e "netstat -atunp | grep arma3server" echo -e "" # Default port @@ -915,24 +924,24 @@ fn_info_message_realvirtuality(){ port="2302" fi { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + 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 "> Steam: Query\tINBOUND\t$((port+1))\tudp" + 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 } | column -s $'\t' -t } -fn_info_message_refractor(){ +fn_info_message_bf1942(){ echo -e "netstat -atunp | grep bf1942_lnxd" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" echo -e "> Game/Query\tINBOUND\t${port}\tudp" - echo -e "> Steam: Query\tINBOUND\t${queryport}\tudp" + echo -e "> Query Steam\tINBOUND\t${queryport}\tudp" } | column -s $'\t' -t } @@ -940,9 +949,9 @@ fn_info_message_risingworld(){ echo -e "netstat -atunp | grep java" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" echo -e "> Game/Query\tINBOUND\t${port}\ttcp/udp" - echo -e "> http query\tINBOUND\t${httpqueryport}\ttcp" + echo -e "> Query HTTP\tINBOUND\t${httpqueryport}\ttcp" echo -e "> RCON\tINBOUND\t${rconport}\ttcp" } | column -s $'\t' -t } @@ -951,7 +960,7 @@ fn_info_message_rtcw(){ echo -e "netstat -atunp | grep iowolfded" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" echo -e "> Game\tINBOUND\t${port}\tudp" } | column -s $'\t' -t } @@ -960,8 +969,8 @@ fn_info_message_rust(){ echo -e "netstat -atunp | grep Rust" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" - echo -e "> Game/Query\tINBOUND\t${port}\ttcp/udp" + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" + echo -e "> Game/Query\tINBOUND\t${port}\tudp" echo -e "> RCON\tINBOUND\t${rconport}\ttcp" } | column -s $'\t' -t } @@ -970,17 +979,17 @@ fn_info_message_samp(){ echo -e "netstat -atunp | grep samp03svr" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" echo -e "> Game/RCON\tINBOUND\t${port}\ttcp/udp" } | column -s $'\t' -t } -fn_info_message_seriousengine35(){ - echo -e "netstat -atunp | grep Sam3_Dedicate" +fn_info_message_ss3(){ + echo -e "netstat -atunp | grep Sam3_Ded" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" echo -e "> Game/RCON\tINBOUND\t${port}\ttcp" echo -e "> Query\tINBOUND\t${queryport}\tudp" } | column -s $'\t' -t @@ -990,7 +999,7 @@ fn_info_message_sbots(){ echo -e "netstat -atunp | grep blank1" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + 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 @@ -1001,7 +1010,7 @@ fn_info_message_sdtd(){ echo -e "netstat -atunp | grep 7DaysToDie" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + 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 "> WebAdmin\tINBOUND\t${webadminport}\ttcp" @@ -1029,7 +1038,7 @@ fn_info_message_sof2(){ echo -e "netstat -atunp | grep sof2ded" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" echo -e "> Game/Query\tINBOUND\t${port}\tudp" } | column -s $'\t' -t } @@ -1038,7 +1047,7 @@ fn_info_message_source(){ echo -e "netstat -atunp | grep srcds_linux" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + 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" @@ -1050,7 +1059,7 @@ fn_info_message_spark(){ echo -e "netstat -atunp | grep server_linux" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + 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 "> WebAdmin\tINBOUND\t${webadminport}\ttcp" @@ -1069,7 +1078,7 @@ fn_info_message_squad(){ echo -e "netstat -atunp | grep SquadServer" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + 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" @@ -1080,7 +1089,7 @@ fn_info_message_starbound(){ echo -e "netstat -atunp | grep starbound" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + 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" @@ -1091,7 +1100,7 @@ fn_info_message_stationeers(){ echo -e "netstat -atunp | grep rocketstation" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" echo -e "> Game\tINBOUND\t${port}\ttcp" echo -e "> Query\tINBOUND\t${queryport}\ttcp" } | column -s $'\t' -t @@ -1101,7 +1110,7 @@ fn_info_message_teamspeak3(){ echo -e "netstat -atunp | grep ts3server" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + 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" @@ -1109,19 +1118,19 @@ fn_info_message_teamspeak3(){ } fn_info_message_teeworlds(){ - echo -e "netstat -atunp | grep teeworlds_srv" + echo -e "netstat -atunp | grep teeworlds" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" - echo -e "> Game\tINBOUND\t${port}\ttcp" + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" + echo -e "> Game\Query\tINBOUND\t${port}\ttcp" } | column -s $'\t' -t } fn_info_message_terraria(){ - echo -e "netstat -atunp | grep TerrariaServer" + echo -e "netstat -atunp | grep Terraria" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" echo -e "> Game\tINBOUND\t${port}\ttcp" } | column -s $'\t' -t } @@ -1130,7 +1139,7 @@ fn_info_message_towerunite(){ echo -e "netstat -atunp | grep TowerServer" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + 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 @@ -1152,7 +1161,7 @@ fn_info_message_unreal(){ echo -e "< UdpLink Port (random)\tOUTBOUND\t${udplinkport}+\tudp" fi if [ "${engine}" != "unreal" ]&&[ "${appid}" != "223250" ]; then - echo -e "> GameSpy query\tINBOUND\t${gsqueryport}\tudp\tOldQueryPortNumber=${gsqueryport}" + echo -e "> Query (GameSpy)\tINBOUND\t${queryportgs}\tudp\tOldQueryPortNumber=${queryportgs}" fi if [ "${appid}" == "215360" ]; then echo -e "< Master server\tOUTBOUND\t28852\ttcp/udp" @@ -1179,12 +1188,36 @@ 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 "" + { + 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 "> WebAdmin\tINBOUND\t${webadminport}\ttcp\tListenPort=${webadminport}" + } | column -s $'\t' -t + echo -e "" + echo -e "${lightgreen}${servername} WebAdmin${default}" + fn_messages_separator + { + echo -e "${lightblue}WebAdmin enabled:\t${default}${webadminenabled}" + echo -e "${lightblue}WebAdmin url:\t${default}http://${ip}:${webadminport}" + echo -e "${lightblue}WebAdmin username:\t${default}${webadminuser}" + echo -e "${lightblue}WebAdmin password:\t${default}${webadminpass}" + } | column -s $'\t' -t +} + fn_info_message_unreal3(){ fn_info_message_password_strip echo -e "netstat -atunp | grep ut3-bin" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" echo -e "> Game\tINBOUND\t${port}\tudp" echo -e "> Query\tINBOUND\t${queryport}\tudp" echo -e "> WebAdmin\tINBOUND\t${webadminport}\ttcp\tListenPort=${webadminport}" @@ -1204,7 +1237,7 @@ fn_info_message_unturned(){ echo -e "netstat -atunp | grep Unturned" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + 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 @@ -1217,7 +1250,7 @@ fn_info_message_kf2(){ echo -e "netstat -atunp | grep KFGame" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + 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" @@ -1238,7 +1271,7 @@ fn_info_message_wolfensteinenemyterritory(){ echo -e "netstat -atunp | grep etded" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" echo -e "> Game/Query\tINBOUND\t${port}\tudp" } | column -s $'\t' -t } @@ -1248,21 +1281,21 @@ fn_info_message_wurmunlimited(){ echo -e "netstat -atunp | grep WurmServer" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" echo -e "> Game\tINBOUND\t${port}\ttcp" - echo -e "> Game/Query\tINBOUND\t${queryport}\tudp" + echo -e "> Query\tINBOUND\t${queryport}\tudp" } | column -s $'\t' -t } fn_info_message_mta(){ - echo -e "netstat -atunp | grep mta-server64" + echo -e "netstat -atunp | grep mta-server" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" - echo -e "> Game\tOUTBOUND\t${port}\tudp" + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" + echo -e "> Game/Query\tOUTBOUND\t${port}\tudp" echo -e "> HTTP Server\tINBOUND\t${httpport}\ttcp" if [ "${ase}" == "Enabled" ]; then - echo -e "> ASE Game_Monitor\tOUTBOUND\t$((${port} + 123))\tudp" + echo -e "> Query Port\tOUTBOUND\t${queryport}\tudp" fi } | column -s $'\t' -t } @@ -1271,7 +1304,7 @@ fn_info_message_mordhau(){ echo -e "netstat -atunp | grep Mord" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + 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" @@ -1279,20 +1312,20 @@ fn_info_message_mordhau(){ } fn_info_message_barotrauma(){ - echo "netstat -atunp | grep /./Server.bin" + echo -e "netstat -atunp | grep /./Server.bin" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + 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 "netstat -atunp | grep soldat" + echo -e "netstat -atunp | grep soldat" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" echo -e "> Game\tINBOUND\t${port}\tudp" echo -e "> RCON\tINBOUND\t${port}\ttcp" echo -e "> FILES\tINBOUND\t$((port+10))\ttcp" @@ -1303,7 +1336,7 @@ fn_info_message_warfork(){ echo -e "netstat -atunp | grep wf_server" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" echo -e "> Game\tINBOUND\t${port}\tudp" echo -e "> HTTP\tINBOUND\t${httpport}\ttcp" } | column -s $'\t' -t @@ -1311,10 +1344,10 @@ fn_info_message_warfork(){ fn_info_message_select_engine(){ # Display details depending on game or engine. - if [ "${shortname}" == "sdtd" ]; then - fn_info_message_sdtd - elif [ "${shortname}" == "ark" ]; then + if [ "${shortname}" == "ark" ]; then fn_info_message_ark + elif [ "${shortname}" == "arma3" ]; then + fn_info_message_arma3 elif [ "${shortname}" == "bo" ]; then fn_info_message_ballisticoverkill elif [ "${shortname}" == "bt" ]; then @@ -1331,6 +1364,8 @@ fn_info_message_select_engine(){ fn_info_message_cod4 elif [ "${shortname}" == "codwaw" ]; then fn_info_message_codwaw + elif [ "${shortname}" == "dst" ]; then + fn_info_message_dst elif [ "${shortname}" == "eco" ]; then fn_info_message_eco elif [ "${shortname}" == "etl" ]; then @@ -1349,6 +1384,8 @@ fn_info_message_select_engine(){ fn_info_message_justcause3 elif [ "${shortname}" == "kf2" ]; then fn_info_message_kf2 + elif [ "${shortname}" == "pz" ]; then + fn_info_message_projectzomboid elif [ "${shortname}" == "pstbs" ]; then fn_info_message_pstbs elif [ "${shortname}" == "pc" ]; then @@ -1363,28 +1400,44 @@ fn_info_message_select_engine(){ fn_info_message_quakelive elif [ "${shortname}" == "samp" ]; then fn_info_message_samp + 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 + fn_info_message_sof2 elif [ "${shortname}" == "sol" ]; then fn_info_message_soldat + elif [ "${shortname}" == "st" ]; then + fn_info_message_starbound elif [ "${shortname}" == "sbots" ]; then fn_info_message_sbots + elif [ "${shortname}" == "ss3" ]; then + fn_info_message_ss3 + elif [ "${shortname}" == "terraria" ]; then + fn_info_message_terraria elif [ "${shortname}" == "ts3" ]; then fn_info_message_teamspeak3 elif [ "${shortname}" == "tu" ]; then fn_info_message_towerunite + elif [ "${shortname}" == "tw" ]; then + fn_info_message_teeworlds elif [ "${shortname}" == "unt" ]; then fn_info_message_unturned + elif [ "${shortname}" == "mc" ]; then + fn_info_message_minecraft elif [ "${shortname}" == "mh" ]; then fn_info_message_mordhau + 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 [ "${engine}" == "bf1942" ]; then + fn_info_message_bf1942 elif [ "${shortname}" == "rtcw" ]; then fn_info_message_rtcw elif [ "${shortname}" == "rust" ]; then @@ -1397,32 +1450,16 @@ fn_info_message_select_engine(){ fn_info_message_risingworld elif [ "${shortname}" == "wet" ]; then fn_info_message_wolfensteinenemyterritory - elif [ "${engine}" == "refractor" ]; then - fn_info_message_refractor - elif [ "${engine}" == "dontstarve" ]; then - fn_info_message_dontstarve elif [ "${engine}" == "goldsource" ]; then fn_info_message_goldsource - elif [ "${engine}" == "lwjgl2" ]; then - fn_info_message_minecraft - elif [ "${engine}" == "projectzomboid" ]; then - fn_info_message_projectzomboid - elif [ "${engine}" == "realvirtuality" ]; then - fn_info_message_realvirtuality - elif [ "${engine}" == "seriousengine35" ]; then - fn_info_message_seriousengine35 elif [ "${engine}" == "source" ]; then fn_info_message_source elif [ "${engine}" == "spark" ]; then fn_info_message_spark - elif [ "${engine}" == "starbound" ]; then - fn_info_message_starbound - elif [ "${engine}" == "teeworlds" ]; then - fn_info_message_teeworlds - elif [ "${engine}" == "terraria" ]; then - fn_info_message_terraria - elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then + 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 diff --git a/lgsm/functions/info_parms.sh b/lgsm/functions/info_parms.sh index 0b2857e06..639495e2a 100644 --- a/lgsm/functions/info_parms.sh +++ b/lgsm/functions/info_parms.sh @@ -4,7 +4,7 @@ # Website: https://linuxgsm.com # Description: If specific parms are not set then this will be displayed in details. -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") ## Examples of filtering to get info from config files # sed 's/foo//g' - remove foo @@ -43,11 +43,12 @@ fn_info_parms_dst(){ } fn_info_parms_eco(){ - queryport=${webadminport} + queryport=${webadminport:-"0"} } fn_info_parms_factorio(){ port=${port:-"0"} + queryport=${rconport:-"0"} rconport=${rconport:-"0"} rconpassword=${rconpassword:-"NOT SET"} } @@ -86,18 +87,29 @@ fn_info_parms_mordhau(){ beaconport=${beaconport:-"0"} } +fn_info_parms_mohaa(){ + port=${port:-"0"} + queryport=${port:-"0"} + defaultmap=${defaultmap:-"NOT SET"} +} + +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} + queryport=${port:-"0"} } fn_info_parms_quake2(){ port=${port:-"0"} - queryport=${port} + queryport=${port:-"0"} defaultmap=${defaultmap:-"NOT SET"} } @@ -109,20 +121,20 @@ fn_info_parms_realvirtuality(){ fn_info_parms_risingworld(){ servername=${servername:-"NOT SET"} port=${port:-"0"} - queryport=${port} + queryport=${port:-"0"} httpqueryport=$((port - 1)) } fn_info_parms_rtcw(){ port=${port:-"0"} - queryport="${port}" + queryport="${port:-"0"}" defaultmap=${defaultmap:-"NOT SET"} } fn_info_parms_rust(){ servername=${servername:-"NOT SET"} port=${port:-"0"} - queryport=${port} + queryport=${port:-"0"} rconport=${rconport:-"0"} rconpassword=${rconpassword:-"NOT SET"} rconweb=${rconweb:-"NOT SET"} @@ -131,6 +143,10 @@ fn_info_parms_rust(){ tickrate=${tickrate:-"0"} } +fn_info_parms_samp(){ + queryport=${port:-"0"} +} + fn_info_parms_sof2(){ port=${port:-"0"} defaultmap=${defaultmap:-"NOT SET"} @@ -140,7 +156,7 @@ fn_info_parms_source(){ defaultmap=${defaultmap:-"NOT SET"} maxplayers=${maxplayers:-"0"} port=${port:-"0"} - queryport=${port} + queryport=${port:-"0"} clientport=${clientport:-"0"} } @@ -168,24 +184,33 @@ fn_info_parms_stickybots(){ fn_info_parms_sof2(){ port=${port:-"0"} - queryport=${port} + queryport=${port:-"0"} defaultmap=${defaultmap:-"NOT SET"} } fn_info_parms_soldat(){ port=${port:-"0"} - queryport=${port} + queryport=${port:-"0"} servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} adminpassword=${adminpassword:-"NOT SET"} maxplayers=${maxplayers:-"0"} } +fn_info_parms_ss3(){ + port=${port:-"0"} + queryport=$((port + 1)) +} + fn_info_parms_towerunite(){ port=${port:-"0"} queryport=${queryport:-"0"} } +fn_info_parms_teeworlds(){ + queryport=${port:-"0"} +} + fn_info_parms_unreal(){ defaultmap=${defaultmap:-"NOT SET"} queryport=$((port + 1)) @@ -205,14 +230,14 @@ fn_info_parms_unreal3(){ } fn_info_parms_unturned(){ - servername=${servicename:-"NOT SET"} + servername=${selfname:-"NOT SET"} port=${port:-"0"} queryport=$((port + 1)) } fn_info_parms_wf(){ port=${port:-"0"} - queryport="${port}" + queryport="${port:-"0"}" webadminport=${webadminport:-"0"} } @@ -240,6 +265,8 @@ elif [ "${shortname}" == "jk2" ]; then fn_info_parms_jk2 elif [ "${shortname}" == "kf2" ]; then fn_info_parms_kf2 +elif [ "${shortname}" == "mohaa" ]; then + fn_info_parms_mohaa # Project Zomboid elif [ "${shortname}" == "pz" ]; then fn_info_parms_projectzomboid @@ -252,6 +279,8 @@ elif [ "${shortname}" == "rtcw" ]; then # Rust elif [ "${shortname}" == "rust" ]; then fn_info_parms_rust +elif [ "${shortname}" == "samp" ]; then + fn_info_parms_samp # Rising World elif [ "${shortname}" == "rw" ]; then fn_info_parms_risingworld @@ -265,7 +294,7 @@ elif [ "${shortname}" == "sol" ]; then fn_info_parms_soldat # Serious Sam elif [ "${shortname}" == "ss3" ]; then - fn_info_parms_seriousengine35 + fn_info_parms_ss3 elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then fn_info_parms_source # Spark @@ -273,8 +302,12 @@ 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}" == "mh" ]; then fn_info_parms_mordhau +elif [ "${shortname}" == "mta" ]; then + fn_info_parms_mta # Unreal/Unreal 2 engine elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then fn_info_parms_unreal diff --git a/lgsm/functions/info_stats.sh b/lgsm/functions/info_stats.sh new file mode 100644 index 000000000..d300c8bec --- /dev/null +++ b/lgsm/functions/info_stats.sh @@ -0,0 +1,77 @@ +#!/bin/bash +# LinuxGSM info_stats.sh function +# Author: Daniel Gibbs +# Website: https://linuxgsm.com +# Description: Optional Stats to send to LinuxGSM Developer +# Uses Google analytics + +info_distro.sh +# generate uuid +if [ ! -f "${datadir}/uuid.txt" ];then + mkdir -p "${datadir}" + touch "${datadir}/uuid.txt" + if [ -n "$(command -v uuidgen 2>/dev/null)" ]; then + uuidgen > "${datadir}/uuid.txt" + else + cat /proc/sys/kernel/random/uuid > "${datadir}/uuid.txt" + fi +fi + +uuid=$(cat "${datadir}/uuid.txt") +# results are rounded up to reduce number of different results in analytics +# nearest 100Mhz +cpuusedmhzroundup=$(((cpuusedmhz + 99) / 100 * 100)) +# nearest 100MB +memusedroundup=$(((memused + 99) / 100 * 100)) +# nearest 100MB +serverfilesduroundup=$(((serverfilesdu + 99) / 100 * 100)) +# https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters + +# Level 1 Stats +## Distro +curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuid}" -d "t=event" -d "ec=distro" -d "ea=${gamename}" -d "el=${distroname}" -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=${uuid}" -d "t=event" -d "ec=game" -d "ea=${gamename}" -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=${uuid}" -d "t=event" -d "ec=version" -d "ea=${version}" -d "el=${version}" -d "v=1" > /dev/null 2>&1 + +# Level 2 Stats +## CPU usage of a game server +if [ "${cpuusedmhzroundup}" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuid}" -d "t=event" -d "ec=cpuused" -d "ea=${gamename}" -d "el=${cpuusedmhzroundup}MHz" -d "v=1" > /dev/null 2>&1 +fi +## Ram usage of a game server +if [ "${memusedroundup}" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuid}" -d "t=event" -d "ec=ramused" -d "ea=${gamename}" -d "el=${memusedroundup}MB" -d "v=1" > /dev/null 2>&1 +fi +## Disk usage of a game server +if [ "${serverfilesdu}" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuid}" -d "t=event" -d "ec=diskused" -d "ea=${gamename}" -d "el=${serverfilesdu}" -d "v=1" > /dev/null 2>&1 +fi + +# Level 3 Stats +## CPU Model +if [ "${cpumodel}" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuid}" -d "t=event" -d "ec=servercpu" -d "ea=${gamename}" -d "el=${cpumodel} cores:${cpucores}" -d "v=1" > /dev/null 2>&1 +fi + +## Server RAM +if [ "${physmemtotal}" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuid}" -d "t=event" -d "ec=serverram" -d "ea=${gamename}" -d "el=${physmemtotal}" -d "v=1" > /dev/null 2>&1 +fi + +## Server Disk +if [ "${totalspace}" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuid}" -d "t=event" -d "ec=serverdisk" -d "ea=${gamename}" -d "el=${totalspace}" -d "v=1" > /dev/null 2>&1 +fi + +fn_script_log_info "Send LinuxGSM stats" +fn_script_log_info "* UUID: ${uuid}" +fn_script_log_info "* Game Name: ${gamename}" +fn_script_log_info "* Distro Name: ${distroname}" +fn_script_log_info "* Game Server CPU Used: ${cpuusedmhzroundup}MHz" +fn_script_log_info "* Game Server RAM Used: ${memusedroundup}MB" +fn_script_log_info "* Game Server Disk Used: ${serverfilesdu}" +fn_script_log_info "* Server CPU Model: ${cpumodel}" +fn_script_log_info "* Server RAM: ${physmemtotal}" +fn_script_log_info "* Server Disk: ${totalspace}" diff --git a/lgsm/functions/install_complete.sh b/lgsm/functions/install_complete.sh index 18cfc16e5..a747438a2 100644 --- a/lgsm/functions/install_complete.sh +++ b/lgsm/functions/install_complete.sh @@ -6,14 +6,14 @@ local commandname="INSTALL" local commandaction="Install" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") -echo "" -echo "=================================" -echo "Install Complete!" +echo -e "" +echo -e "=================================" +echo -e "Install Complete!" fn_script_log_info "Install Complete!" -echo "" -echo "To start server type:" -echo "./${selfname} start" -echo "" +echo -e "" +echo -e "To start server type:" +echo -e "./${selfname} start" +echo -e "" core_exit.sh diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 0a3506687..ed3fff51c 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -6,12 +6,12 @@ local commandname="INSTALL" local commandaction="Install" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") # Checks if server cfg dir exists, creates it if it doesn't. fn_check_cfgdir(){ if [ ! -d "${servercfgdir}" ]; then - echo "creating ${servercfgdir} config directory." + echo -e "creating ${servercfgdir} config directory." fn_script_log_info "creating ${servercfgdir} config directory." mkdir -pv "${servercfgdir}" fi @@ -19,10 +19,10 @@ fn_check_cfgdir(){ # Downloads default configs from Game-Server-Configs repo to lgsm/config-default. fn_fetch_default_config(){ - echo "" - echo "Downloading ${gamename} Configs" - echo "=================================" - echo "default configs from https://github.com/GameServerManagers/Game-Server-Configs" + echo -e "" + echo -e "${lightyellow}Downloading ${gamename} Configs${default}" + echo -e "=================================" + echo -e "default configs from https://github.com/GameServerManagers/Game-Server-Configs" fn_sleep_time mkdir -p "${lgsmdir}/config-default/config-game" githuburl="https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/master" @@ -35,7 +35,7 @@ fn_fetch_default_config(){ fn_default_config_remote(){ for config in "${array_configs[@]}"; do # every config is copied - echo "copying ${config} config file." + echo -e "copying ${config} config file." fn_script_log_info "copying ${servercfg} config file." if [ "${config}" == "${servercfgdefault}" ]; then mkdir -p "${servercfgdir}" @@ -55,7 +55,7 @@ fn_default_config_remote(){ # Copys local default config to server config location. fn_default_config_local(){ - echo "copying ${servercfgdefault} config file." + echo -e "copying ${servercfgdefault} config file." cp -nv "${servercfgfullpathdefault}" "${servercfgfullpath}" fn_sleep_time } @@ -68,7 +68,7 @@ fn_set_config_vars(){ random=$(tr -dc A-Za-z0-9_ < /dev/urandom | head -c 8 | xargs) servername="LinuxGSM" rconpass="admin${random}" - echo "changing hostname." + echo -e "changing hostname." fn_script_log_info "changing hostname." fn_sleep_time # prevents var from being overwritten with the servername. @@ -79,7 +79,7 @@ fn_set_config_vars(){ else sed -i "s/SERVERNAME/${servername}/g" "${servercfgfullpath}" fi - echo "changing rcon/admin password." + echo -e "changing rcon/admin password." fn_script_log_info "changing rcon/admin password." if [ "${shortname}" == "squad" ]; then sed -i "s/ADMINPASSWORD/${rconpass}/g" "${servercfgdir}/Rcon.cfg" @@ -89,7 +89,7 @@ fn_set_config_vars(){ fn_sleep_time else fn_script_log_warn "Config file not found, cannot alter it." - echo "Config file not found, cannot alter it." + echo -e "Config file not found, cannot alter it." fn_sleep_time fi } @@ -98,21 +98,21 @@ fn_set_config_vars(){ fn_set_dst_config_vars(){ ## cluster.ini if grep -Fq "SERVERNAME" "${clustercfgfullpath}"; then - echo "changing server name." + echo -e "changing server name." fn_script_log_info "changing server name." sed -i "s/SERVERNAME/LinuxGSM/g" "${clustercfgfullpath}" fn_sleep_time - echo "changing shard mode." + echo -e "changing shard mode." fn_script_log_info "changing shard mode." sed -i "s/USESHARDING/${sharding}/g" "${clustercfgfullpath}" fn_sleep_time - echo "randomizing cluster key." + echo -e "randomizing cluster key." fn_script_log_info "randomizing cluster key." randomkey=$(tr -dc A-Za-z0-9_ < /dev/urandom | head -c 8 | xargs) sed -i "s/CLUSTERKEY/${randomkey}/g" "${clustercfgfullpath}" fn_sleep_time else - echo "${clustercfg} is already configured." + echo -e "${clustercfg} is already configured." fn_script_log_info "${clustercfg} is already configured." fi @@ -125,23 +125,23 @@ fn_set_dst_config_vars(){ sed -i "/SHARDNAME/d" "${servercfgfullpath}" fi - echo "changing shard name." + echo -e "changing shard name." fn_script_log_info "changing shard name." sed -i "s/SHARDNAME/${shard}/g" "${servercfgfullpath}" fn_sleep_time - echo "changing master setting." + echo -e "changing master setting." fn_script_log_info "changing master setting." sed -i "s/ISMASTER/${master}/g" "${servercfgfullpath}" fn_sleep_time ## worldgenoverride.lua if [ "${cave}" == "true" ]; then - echo "defining ${shard} as cave in ${servercfgdir}/worldgenoverride.lua." + echo -e "defining ${shard} as cave in ${servercfgdir}/worldgenoverride.lua." fn_script_log_info "defining ${shard} as cave in ${servercfgdir}/worldgenoverride.lua." echo 'return { override_enabled = true, preset = "DST_CAVE", }' > "${servercfgdir}/worldgenoverride.lua" fi fn_sleep_time - echo "" + echo -e "" } if [ "${shortname}" == "sdtd" ]; then @@ -199,7 +199,7 @@ elif [ "${shortname}" == "bt1944" ]; then fn_fetch_default_config fn_default_config_remote fn_set_config_vars -elif [ "${shortname}" == "bt1942" ]; then +elif [ "${shortname}" == "bf1942" ]; then gamedirname="Battlefield1942" array_configs+=( serversettings.con ) fn_fetch_default_config @@ -440,6 +440,12 @@ elif [ "${shortname}" == "mc" ]; then fn_fetch_default_config fn_default_config_remote fn_set_config_vars +elif [ "${shortname}" == "mohaa" ]; then + gamedirname="MedalOfHonorAlliedAssault" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars elif [ "${shortname}" == "mh" ]; then gamedirname="Mordhau" fn_check_cfgdir diff --git a/lgsm/functions/install_dst_token.sh b/lgsm/functions/install_dst_token.sh index 616a6469b..869adde71 100644 --- a/lgsm/functions/install_dst_token.sh +++ b/lgsm/functions/install_dst_token.sh @@ -6,20 +6,20 @@ local commandname="INSTALL" local commandaction="Install" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") -echo "" -echo "Enter ${gamename} Cluster Token" -echo "=================================" +echo -e "" +echo -e "${lightyellow}Enter ${gamename} Cluster Token${default}" +echo -e "=================================" fn_sleep_time -echo "A cluster token is required to run this server!" -echo "Follow the instructions in this link to obtain this key:" -echo "https://linuxgsm.com/dst-auth-token" -echo "" +echo -e "A cluster token is required to run this server!" +echo -e "Follow the instructions in this link to obtain this key:" +echo -e "https://linuxgsm.com/dst-auth-token" +echo -e "" if [ -z "${autoinstall}" ]; then overwritetoken="true" if [ -s "${clustercfgdir}/cluster_token.txt" ]; then - echo "The cluster token is already set. Do you want to overwrite it?" + echo -e "The cluster token is already set. Do you want to overwrite it?" fn_script_log_info "Don't Starve Together cluster token is already set" if fn_prompt_yn "Continue?" N; then overwritetoken="true" @@ -28,19 +28,19 @@ if [ -z "${autoinstall}" ]; then fi fi if [ "${overwritetoken}" == "true" ]; then - echo "Once you have the cluster token, enter it below" + echo -e "Once you have the cluster token, enter it below" echo -n "Cluster Token: " read -r token mkdir -pv "${clustercfgdir}" - echo "${token}" > "${clustercfgdir}/cluster_token.txt" + echo -e "${token}" > "${clustercfgdir}/cluster_token.txt" if [ -f "${clustercfgdir}/cluster_token.txt" ]; then - echo "Don't Starve Together cluster token created" + echo -e "Don't Starve Together cluster token created" fn_script_log_info "Don't Starve Together cluster token created" fi unset overwritetoken fi else - echo "You can add your cluster token using the following command" - echo "./${selfname} cluster-token" + echo -e "You can add your cluster token using the following command" + echo -e "./${selfname} cluster-token" fi -echo "" +echo -e "" diff --git a/lgsm/functions/install_eula.sh b/lgsm/functions/install_eula.sh index fca4838af..d7893b16c 100644 --- a/lgsm/functions/install_eula.sh +++ b/lgsm/functions/install_eula.sh @@ -12,26 +12,26 @@ elif [ "${shortname}" == "ut" ]; then eulaurl="https://www.epicgames.com/unrealtournament/unreal-tournament-pre-alpha-test-development-build-eula" fi -echo "" -echo "Accept ${gamename} EULA" -echo "=================================" +echo -e "" +echo -e "${lightyellow}Accept ${gamename} EULA${default}" +echo -e "=================================" fn_sleep_time -echo "You are required to accept the EULA:" -echo "${eulaurl}" -echo "" +echo -e "You are required to accept the EULA:" +echo -e "${eulaurl}" +echo -e "" if [ -z "${autoinstall}" ]; then - echo "By continuing you are indicating your agreement to the EULA." - echo "" + echo -e "By continuing you are indicating your agreement to the EULA." + echo -e "" if ! fn_prompt_yn "Continue?" Y; then core_exit.sh fi elif [ "${function_selfname}" == "command_start.sh" ]; then fn_print_info "By continuing you are indicating your agreement to the EULA." - echo "" + echo -e "" sleep 5 else - echo "By using auto-install you are indicating your agreement to the EULA." - echo "" + echo -e "By using auto-install you are indicating your agreement to the EULA." + echo -e "" sleep 5 fi @@ -39,7 +39,7 @@ if [ "${shortname}" == "ts3" ]; then touch "${executabledir}/.ts3server_license_accepted" elif [ "${shortname}" == "mc" ]; then touch "${serverfiles}/eula.txt" - echo "eula=true" > "${serverfiles}/eula.txt" + echo -e "eula=true" > "${serverfiles}/eula.txt" elif [ "${shortname}" == "ut" ]; then : fi diff --git a/lgsm/functions/install_factorio_save.sh b/lgsm/functions/install_factorio_save.sh index 804ef88e7..fd9e634a1 100644 --- a/lgsm/functions/install_factorio_save.sh +++ b/lgsm/functions/install_factorio_save.sh @@ -7,9 +7,9 @@ local commandname="INSTALL" local commandaction="Install" -echo "" -echo "Creating initial Factorio savefile" -echo "=================================" +echo -e "" +echo -e "${lightyellow}Creating initial Factorio savefile${default}" +echo -e "=================================" fn_sleep_time check_glibc.sh "${executabledir}"/factorio --create "${serverfiles}/save1" diff --git a/lgsm/functions/install_gslt.sh b/lgsm/functions/install_gslt.sh index 87fccae70..ddb0ca291 100644 --- a/lgsm/functions/install_gslt.sh +++ b/lgsm/functions/install_gslt.sh @@ -6,43 +6,43 @@ local commandname="INSTALL" local commandaction="Install" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") -echo "" -echo "Game Server Login Token" -echo "=================================" +echo -e "" +echo -e "${lightyellow}Game Server Login Token${default}" +echo -e "=================================" fn_sleep_time if [ "${shortname}" == "csgo" ]||[ "${shortname}" == "css" ]||[ "${shortname}" == "nmrih" ]||[ "${shortname}" == "bs" ]; then - echo "GSLT is required to run a public ${gamename} server" + echo -e "GSLT is required to run a public ${gamename} server" fn_script_log_info "GSLT is required to run a public ${gamename} server" else - echo "GSLT is an optional feature for ${gamename} server" + echo -e "GSLT is an optional feature for ${gamename} server" fn_script_log_info "GSLT is an optional feature for ${gamename} server" fi -echo "Get more info and a token here:" -echo "https://linuxgsm.com/gslt" +echo -e "Get more info and a token here:" +echo -e "https://docs.linuxgsm.com/steamcmd/gslt" fn_script_log_info "Get more info and a token here:" -fn_script_log_info "https://linuxgsm.com/gslt" -echo "" +fn_script_log_info "https://docs.linuxgsm.com/steamcmd/gslt" +echo -e "" if [ -z "${autoinstall}" ]; then if [ "${shortname}" != "tu" ]; then - echo "Enter token below (Can be blank)." + echo -e "Enter token below (Can be blank)." echo -n "GSLT TOKEN: " read -r token - if ! grep -q "^gslt=" "${configdirserver}/${servicename}.cfg" > /dev/null 2>&1; then - echo -e "\ngslt=\"${token}\"" >> "${configdirserver}/${servicename}.cfg" + if ! grep -q "^gslt=" "${configdirserver}/${selfname}.cfg" > /dev/null 2>&1; then + echo -e "\ngslt=\"${token}\"" >> "${configdirserver}/${selfname}.cfg" else - sed -i -e "s/gslt=\"[^\"]*\"/gslt=\"${token}\"/g" "${configdirserver}/${servicename}.cfg" + sed -i -e "s/gslt=\"[^\"]*\"/gslt=\"${token}\"/g" "${configdirserver}/${selfname}.cfg" fi fi fi fn_sleep_time if [ "${shortname}" == "tu" ]; then - echo "The GSLT can be changed by editing ${servercfgdir}/${servercfg}." + echo -e "The GSLT can be changed by editing ${servercfgdir}/${servercfg}." fn_script_log_info "The GSLT can be changed by editing ${servercfgdir}/${servercfg}." else - echo "The GSLT can be changed by editing ${configdirserver}/${servicename}.cfg." - fn_script_log_info "The GSLT can be changed by editing ${configdirserver}/${servicename}.cfg." + echo -e "The GSLT can be changed by editing ${configdirserver}/${selfname}.cfg." + fn_script_log_info "The GSLT can be changed by editing ${configdirserver}/${selfname}.cfg." fi -echo "" +echo -e "" diff --git a/lgsm/functions/install_header.sh b/lgsm/functions/install_header.sh index 40c2845fc..1a0c9dc29 100644 --- a/lgsm/functions/install_header.sh +++ b/lgsm/functions/install_header.sh @@ -6,13 +6,17 @@ local commandname="INSTALL" local commandaction="Install" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") clear -echo "=================================" -echo "LinuxGSM - ${gamename}" -echo "by Daniel Gibbs" -echo "Website: https://linuxgsm.com" -echo "Contributors: https://linuxgsm.com/contrib" -echo "Donate: https://linuxgsm.com/donate" -echo "=================================" +fn_print_ascii_logo +fn_sleep_time +echo -e "=================================" +echo -e "${lightyellow}Linux${default}GSM_" +echo -e "by Daniel Gibbs" +echo -e "${lightblue}Game:${default} ${gamename}" +echo -e "${lightblue}Website:${default} https://linuxgsm.com" +echo -e "${lightblue}Contributors:${default} https://linuxgsm.com/contrib" +echo -e "${lightblue}Donate:${default} https://linuxgsm.com/donate" +echo -e "=================================" +fn_sleep_time diff --git a/lgsm/functions/install_logs.sh b/lgsm/functions/install_logs.sh index c886c9140..1a00bac39 100644 --- a/lgsm/functions/install_logs.sh +++ b/lgsm/functions/install_logs.sh @@ -6,12 +6,12 @@ local commandname="INSTALL" local commandaction="Install" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") if [ "${checklogs}" != "1" ]; then - echo "" - echo "Creating log directories" - echo "=================================" + echo -e "" + echo -e "${lightyellow}Creating log directories${default}" + echo -e "=================================" fi fn_sleep_time # Create LinuxGSM logs. @@ -51,8 +51,7 @@ if [ -n "${consolelogdir}" ]; then fn_print_ok_eol_nl fi echo -en "creating console log: ${consolelog}..." - touch "${consolelog}" - if [ $? -ne 0 ]; then + if ! touch "${consolelog}"; then fn_print_fail_eol_nl core_exit.sh else @@ -63,8 +62,7 @@ fi # Create Game logs. if [ -n "${gamelogdir}" ]&&[ ! -d "${gamelogdir}" ]; then echo -en "installing game log dir: ${gamelogdir}..." - mkdir -p "${gamelogdir}" - if [ $? -ne 0 ]; then + if ! mkdir -p "${gamelogdir}"; then fn_print_fail_eol_nl core_exit.sh else @@ -79,8 +77,7 @@ fi if [ -n "${gamelogdir}" ]; then if [ "${gamelogdir:0:${#logdir}}" != "${logdir}" ]; then echo -en "creating symlink to game log dir: ${logdir}/server -> ${gamelogdir}..." - ln -nfs "${gamelogdir}" "${logdir}/server" - if [ $? -ne 0 ]; then + if ! ln -nfs "${gamelogdir}" "${logdir}/server"; then fn_print_fail_eol_nl core_exit.sh else @@ -93,8 +90,7 @@ fi if [ -d "${rootdir}/Steam/logs" ]; then if [ ! -L "${logdir}/steamcmd" ]; then echo -en "creating symlink to steam log dir: ${logdir}/steamcmd -> ${rootdir}/Steam/logs..." - ln -nfs "${rootdir}/Steam/logs" "${logdir}/steamcmd" - if [ $? -ne 0 ]; then + if ! ln -nfs "${rootdir}/Steam/logs" "${logdir}/steamcmd"; then fn_print_fail_eol_nl core_exit.sh else diff --git a/lgsm/functions/install_mta_resources.sh b/lgsm/functions/install_mta_resources.sh index b4ff2bece..6d7f14bd1 100644 --- a/lgsm/functions/install_mta_resources.sh +++ b/lgsm/functions/install_mta_resources.sh @@ -7,8 +7,8 @@ local commandname="INSTALL" local commandaction="Install" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") fn_print_information_nl "${gamename} will not function without resources!" -echo " * install default resources using ./${selfname} install-default-resources" -echo " * download resources from https://community.multitheftauto.com" +echo -e " * install default resources using ./${selfname} install-default-resources" +echo -e " * download resources from https://community.multitheftauto.com" diff --git a/lgsm/functions/install_retry.sh b/lgsm/functions/install_retry.sh index e2918c268..2698b150c 100644 --- a/lgsm/functions/install_retry.sh +++ b/lgsm/functions/install_retry.sh @@ -6,10 +6,10 @@ local commandname="INSTALL" local commandaction="Install" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") if fn_prompt_yn "Retry install?" Y; then - command_install.sh; exit + command_install.sh; core_exit.sh else - echo Exiting; exit + core_exit.sh fi diff --git a/lgsm/functions/install_server_dir.sh b/lgsm/functions/install_server_dir.sh index cd8fe8c21..894ae060d 100644 --- a/lgsm/functions/install_server_dir.sh +++ b/lgsm/functions/install_server_dir.sh @@ -6,17 +6,17 @@ local commandname="INSTALL" local commandaction="Install" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") -echo "" -echo "Server Directory" -echo "=================================" +echo -e "" +echo -e "${lightyellow}Server Directory${default}" +echo -e "=================================" fn_sleep_time if [ -d "${serverfiles}" ]; then fn_print_warning_nl "A server is already installed here." fi pwd -echo "" +echo -e "" if [ -z "${autoinstall}" ]; then if ! fn_prompt_yn "Continue?" Y; then exit diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index cba106e2e..0fc6c92da 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -6,63 +6,65 @@ local commandname="INSTALL" local commandaction="Install" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") fn_install_server_files(){ if [ "${shortname}" == "ahl" ]; then - remote_fileurl="https://files.linuxgsm.com/ActionHalfLife/action_halflife-1.0.tar.bz2"; local_filedir="${tmpdir}"; local_filename="action_halflife-1.0.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="31430e670692b2eeaa0d1217db4dcb73" + remote_fileurl="http://files.linuxgsm.com/ActionHalfLife/action_halflife-1.0.tar.bz2"; local_filedir="${tmpdir}"; local_filename="action_halflife-1.0.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="31430e670692b2eeaa0d1217db4dcb73" elif [ "${shortname}" == "bf1942" ]; then - remote_fileurl="https://files.linuxgsm.com/BattleField1942/bf1942_lnxded-1.61-hacked-to-1.612.full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="bf1942_lnxded-1.61-hacked-to-1.612.full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="a86a5d3cd64ca59abcc9bb9f777c2e5d" + remote_fileurl="http://files.linuxgsm.com/BattleField1942/bf1942_lnxded-1.61-hacked-to-1.612.full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="bf1942_lnxded-1.61-hacked-to-1.612.full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="a86a5d3cd64ca59abcc9bb9f777c2e5d" elif [ "${shortname}" == "bb" ]; then - remote_fileurl="https://files.linuxgsm.com/BrainBread/brainbread-v1.2-linuxserver.tar.bz2"; local_filedir="${tmpdir}"; local_filename="brainbread-v1.2-linuxserver.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="5c729a7e9eecfa81b71a6a1f7267f0fd" + remote_fileurl="http://files.linuxgsm.com/BrainBread/brainbread-v1.2-linuxserver.tar.bz2"; local_filedir="${tmpdir}"; local_filename="brainbread-v1.2-linuxserver.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="5c729a7e9eecfa81b71a6a1f7267f0fd" elif [ "${shortname}" == "cod" ]; then - remote_fileurl="https://files.linuxgsm.com/CallOfDuty/cod-lnxded-1.5b-full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="cod-lnxded-1.5-large.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="19629895a4cf6fd8f6d1ee198b5304cd" + remote_fileurl="http://files.linuxgsm.com/CallOfDuty/cod-lnxded-1.5b-full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="cod-lnxded-1.5-large.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="19629895a4cf6fd8f6d1ee198b5304cd" elif [ "${shortname}" == "coduo" ]; then - remote_fileurl="https://files.linuxgsm.com/CallOfDutyUnitedOffensive/coduo-lnxded-1.51b-full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="coduo-lnxded-1.51b-full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="f1804ef13036e2b4ab535db000b19e97" + remote_fileurl="http://files.linuxgsm.com/CallOfDutyUnitedOffensive/coduo-lnxded-1.51b-full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="coduo-lnxded-1.51b-full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="f1804ef13036e2b4ab535db000b19e97" elif [ "${shortname}" == "cod2" ]; then - remote_fileurl="https://files.linuxgsm.com/CallOfDuty2/cod2-lnxded-1.3-full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="cod2-lnxded-1.3-full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="078128f83d06dc3d7699428dc2870214" + remote_fileurl="http://files.linuxgsm.com/CallOfDuty2/cod2-lnxded-1.3-full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="cod2-lnxded-1.3-full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="078128f83d06dc3d7699428dc2870214" elif [ "${shortname}" == "cod4" ]; then - remote_fileurl="https://files.linuxgsm.com/CallOfDuty4/cod4x18_1772_dedrun.tar.bz2"; local_filedir="${tmpdir}"; local_filename="cod4x18_1772_dedrun.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="de29f29d79f9cc24574b838daa501e46" + remote_fileurl="http://files.linuxgsm.com/CallOfDuty4/cod4x18_1772_dedrun.tar.bz2"; local_filedir="${tmpdir}"; local_filename="cod4x18_1772_dedrun.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="de29f29d79f9cc24574b838daa501e46" elif [ "${shortname}" == "codwaw" ]; then - remote_fileurl="https://files.linuxgsm.com/CallOfDutyWorldAtWar/codwaw-lnxded-1.7-full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="codwaw-lnxded-1.7-full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="0489697ff3bf678c109bfb377d1b7895" + remote_fileurl="http://files.linuxgsm.com/CallOfDutyWorldAtWar/codwaw-lnxded-1.7-full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="codwaw-lnxded-1.7-full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="0489697ff3bf678c109bfb377d1b7895" elif [ "${shortname}" == "etl" ]; then - remote_fileurl="https://files.linuxgsm.com/WolfensteinEnemyTerritory/etlegacy-v2.75-i386-et-260b.tar.bz2"; local_filedir="${tmpdir}"; local_filename="etlegacy-v2.75-i386-et-260b.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="92d7d4c26e0a295daed78cef623eeabb" + remote_fileurl="http://files.linuxgsm.com/WolfensteinEnemyTerritory/etlegacy-v2.75-i386-et-260b.tar.bz2"; local_filedir="${tmpdir}"; local_filename="etlegacy-v2.75-i386-et-260b.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="92d7d4c26e0a295daed78cef623eeabb" elif [ "${shortname}" == "ges" ]; then - remote_fileurl="https://files.linuxgsm.com/GoldenEyeSource/GoldenEye_Source_v5.0.6_full_server.tar.bz2"; local_filedir="${tmpdir}"; local_filename="GoldenEye_Source_v5.0.6_full_server.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="c45c16293096706e8b5e2cd64a6f2931" + remote_fileurl="http://files.linuxgsm.com/GoldenEyeSource/GoldenEye_Source_v5.0.6_full_server.tar.bz2"; local_filedir="${tmpdir}"; local_filename="GoldenEye_Source_v5.0.6_full_server.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="c45c16293096706e8b5e2cd64a6f2931" + elif [ "${shortname}" == "mohaa" ]; then + remote_fileurl="http://files.linuxgsm.com/MedalofHonorAlliedAssault/moh_revival_v1.12_RC3.5.1.tar.bz2"; local_filedir="${tmpdir}"; local_filename="moh_revival_v1.12_RC3.5.1.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="9d5924486a0cf5e46dd063216aad05c1" elif [ "${shortname}" == "ns" ]; then - remote_fileurl="https://files.linuxgsm.com/NaturalSelection/ns_dedicated_server_v32.tar.bz2"; local_filedir="${tmpdir}"; local_filename="ns_dedicated_server_v32.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="499cf63324b76925ada6baf5f2eacd67" + remote_fileurl="http://files.linuxgsm.com/NaturalSelection/ns_dedicated_server_v32.tar.bz2"; local_filedir="${tmpdir}"; local_filename="ns_dedicated_server_v32.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="499cf63324b76925ada6baf5f2eacd67" elif [ "${shortname}" == "q2" ]; then - remote_fileurl="https://files.linuxgsm.com/Quake2/quake2-3.20-glibc-i386-full-linux2.0.tar.bz2"; local_filedir="${tmpdir}"; local_filename="quake2-3.20-glibc-i386-full-linux2.0.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="0b8c7e2d51f40b56b328c69e986e7c5f" + remote_fileurl="http://files.linuxgsm.com/Quake2/quake2-3.20-glibc-i386-full-linux2.0.tar.bz2"; local_filedir="${tmpdir}"; local_filename="quake2-3.20-glibc-i386-full-linux2.0.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="0b8c7e2d51f40b56b328c69e986e7c5f" elif [ "${shortname}" == "q3" ]; then - remote_fileurl="https://files.linuxgsm.com/Quake3/quake3-1.32c-x86-full-linux.tar.bz2"; local_filedir="${tmpdir}"; local_filename="quake3-1.32c-x86-full-linux.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="fd7258d827474f67663dda297bff4306" + remote_fileurl="http://files.linuxgsm.com/Quake3/quake3-1.32c-x86-full-linux.tar.bz2"; local_filedir="${tmpdir}"; local_filename="quake3-1.32c-x86-full-linux.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="fd7258d827474f67663dda297bff4306" elif [ "${shortname}" == "qw" ]; then - remote_fileurl="https://files.linuxgsm.com/QuakeWorld/nquake.server.linux.190506.full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="nquake.server.linux.190506.full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="74405ec030463c5e1175e776ab572d32" + remote_fileurl="http://files.linuxgsm.com/QuakeWorld/nquake.server.linux.190506.full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="nquake.server.linux.190506.full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="74405ec030463c5e1175e776ab572d32" elif [ "${shortname}" == "rtcw" ]; then - remote_fileurl="https://files.linuxgsm.com/ReturnToCastleWolfenstein/iortcw-1.51c-x86_64-server-linux-20190507.tar.bz2"; local_filedir="${tmpdir}"; local_filename="iortcw-1.51c-x86_64-server-linux-20190507.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="6a3be9700372b228d1187422464e4212" + remote_fileurl="http://files.linuxgsm.com/ReturnToCastleWolfenstein/iortcw-1.51c-x86_64-server-linux-20190507.tar.bz2"; local_filedir="${tmpdir}"; local_filename="iortcw-1.51c-x86_64-server-linux-20190507.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="6a3be9700372b228d1187422464e4212" elif [ "${shortname}" == "sfc" ]; then - remote_fileurl="https://files.linuxgsm.com/SourceFortsClassic/SFClassic-1.0-RC7-fix.tar.bz2"; local_filedir="${tmpdir}"; local_filename="SFClassic-1.0-RC7-fix.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="e0d4cfd298a8a356053f92b1fa7d1002" + remote_fileurl="http://files.linuxgsm.com/SourceFortsClassic/SFClassic-1.0-RC7-fix.tar.bz2"; local_filedir="${tmpdir}"; local_filename="SFClassic-1.0-RC7-fix.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="e0d4cfd298a8a356053f92b1fa7d1002" elif [ "${shortname}" == "sof2" ]; then - remote_fileurl="https://files.linuxgsm.com/SoldierOfFortune2/sof2gold-1.03.tar.bz2"; local_filedir="${tmpdir}"; local_filename="sof2gold-1.03.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="871b1dc0dafeeace65b198119e8fa200" + remote_fileurl="http://files.linuxgsm.com/SoldierOfFortune2/sof2gold-1.03.tar.bz2"; local_filedir="${tmpdir}"; local_filename="sof2gold-1.03.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="871b1dc0dafeeace65b198119e8fa200" elif [ "${shortname}" == "ts" ]; then - remote_fileurl="https://files.linuxgsm.com/TheSpecialists/ts-3-linux-final.tar.bz2"; local_filedir="${tmpdir}"; local_filename="ts-3-linux-final.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="38e8a8325339f85a7745117802f940b7" + remote_fileurl="http://files.linuxgsm.com/TheSpecialists/ts-3-linux-final.tar.bz2"; local_filedir="${tmpdir}"; local_filename="ts-3-linux-final.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="38e8a8325339f85a7745117802f940b7" elif [ "${shortname}" == "ut2k4" ]; then - remote_fileurl="https://files.linuxgsm.com/UnrealTournament2004/ut2004-server-3369-2-ultimate-linux.tar.bz2"; local_filedir="${tmpdir}"; local_filename="ut2004-server-3369-2-ultimate-linux.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="67c5e2cd9c2a4b04f163962ee41eff54" + remote_fileurl="http://files.linuxgsm.com/UnrealTournament2004/ut2004-server-3369-2-ultimate-linux.tar.bz2"; local_filedir="${tmpdir}"; local_filename="ut2004-server-3369-2-ultimate-linux.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="67c5e2cd9c2a4b04f163962ee41eff54" elif [ "${shortname}" == "ut99" ]; then - remote_fileurl="https://files.linuxgsm.com/UnrealTournament99/ut99-server-451-ultimate-linux.tar.bz2"; local_filedir="${tmpdir}"; local_filename="ut99-server-451-ultimate-linux.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="49cb24d0550ff6ddeaba6007045c6edd" + remote_fileurl="http://files.linuxgsm.com/UnrealTournament99/ut99-server-451-ultimate-linux.tar.bz2"; local_filedir="${tmpdir}"; local_filename="ut99-server-451-ultimate-linux.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="49cb24d0550ff6ddeaba6007045c6edd" elif [ "${shortname}" == "ut" ]; then remote_fileurl="https://s3.amazonaws.com/unrealtournament/UnrealTournament-Client-XAN-3395761-Linux.zip"; local_filedir="${tmpdir}"; local_filename="UnrealTournament-Server-XAN-3395761-Linux.zip"; chmodx="noexecute" run="norun"; force="noforce"; md5="f04ad5b96865b19613303331ff4075eb" elif [ "${shortname}" == "ut3" ]; then - remote_fileurl="https://files.linuxgsm.com/UnrealTournament3/UT3-linux-server-2.1.tar.bz2"; local_filedir="${tmpdir}"; local_filename="UT3-linux-server-2.1.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="2527437b46f1b47f20228d27d72395a6" + remote_fileurl="http://files.linuxgsm.com/UnrealTournament3/UT3-linux-server-2.1.tar.bz2"; local_filedir="${tmpdir}"; local_filename="UT3-linux-server-2.1.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="2527437b46f1b47f20228d27d72395a6" elif [ "${shortname}" == "vs" ]; then - remote_fileurl="https://files.linuxgsm.com/VampireSlayer/vs_l-6.0_full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="vs_l-6.0_full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="38a79e44b98578bbdc5b15818493a066" + remote_fileurl="http://files.linuxgsm.com/VampireSlayer/vs_l-6.0_full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="vs_l-6.0_full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="38a79e44b98578bbdc5b15818493a066" elif [ "${shortname}" == "wet" ]; then - remote_fileurl="https://files.linuxgsm.com/WolfensteinEnemyTerritory/enemy-territory.260b.tar.bz2"; local_filedir="${tmpdir}"; local_filename="enemy-territory.260b.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="f833f514bfcdd46b42c111f83350c5a7" + remote_fileurl="http://files.linuxgsm.com/WolfensteinEnemyTerritory/enemy-territory.260b.tar.bz2"; local_filedir="${tmpdir}"; local_filename="enemy-territory.260b.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="f833f514bfcdd46b42c111f83350c5a7" elif [ "${shortname}" == "samp" ]; then remote_fileurl="https://files.sa-mp.com/samp037svr_R2-1.tar.gz"; local_filedir="${tmpdir}"; local_filename="samp037svr_R2-1.tar.gz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="93705e165550c97484678236749198a4" elif [ "${shortname}" == "sol" ]; then remote_fileurl="https://static.soldat.pl/downloads/soldatserver2.8.1_1.7.1.zip"; local_filedir="${tmpdir}"; local_filename="soldatserver2.8.1_1.7.1.zip"; chmodx="nochmodx" run="norun"; force="noforce"; md5="994409c28520425965dec5c71ccb55e1" elif [ "${shortname}" == "zmr" ]; then - remote_fileurl="https://files.linuxgsm.com/ZombieMasterReborn/zombie_master_reborn_b4_fix5.1.tar.bz2"; local_filedir="${tmpdir}"; local_filename="zombie_master_reborn_b4_fix5.1.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="73472bd84dfa6d203f3b5f48f760773e" + remote_fileurl="http://files.linuxgsm.com/ZombieMasterReborn/zombie_master_reborn_b5_2.tar.bz2"; local_filedir="${tmpdir}"; local_filename="zombie_master_reborn_b5_2.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="d52ef2db376f5d21e3a4ceca85ec8761" fi fn_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" fn_dl_extract "${local_filedir}" "${local_filename}" "${serverfiles}" @@ -86,7 +88,7 @@ fn_install_server_files_steamcmd(){ fi if [ "${counter}" -ge "7" ]; then - echo "Removing $(find "${serverfiles}" -type d -print0 | grep -Ez '[^/]{30}$')" + echo -e "Removing $(find "${serverfiles}" -type d -print0 | grep -Ez '[^/]{30}$')" find "${serverfiles}" -type d -print0 | grep -Ez '[^/]{30}$' | xargs -0 rm -rf fi if [ "${counter}" -ge "9" ]; then @@ -96,7 +98,7 @@ fn_install_server_files_steamcmd(){ # Detects if unbuffer command is available for 32 bit distributions only. info_distro.sh - if [ "$(command -v stdbuf 2>/dev/null)" ]&&[ "${arch}" != "x86_64" ]; then + if [ -n "$(command -v stdbuf 2>/dev/null)" ]&&[ "${arch}" != "x86_64" ]; then unbuffer="stdbuf -i0 -o0 -e0" fi @@ -140,9 +142,9 @@ fn_install_server_files_steamcmd(){ fi } -echo "" -echo "Installing ${gamename} Server" -echo "=================================" +echo -e "" +echo -e "${lightyellow}Installing ${gamename} Server${default}" +echo -e "=================================" fn_sleep_time if [ -n "${appid}" ]; then @@ -171,8 +173,8 @@ elif [ -z "${appid}" ]||[ "${shortname}" == "ahl" ]||[ "${shortname}" == "bd" ]| fi if [ -z "${autoinstall}" ]; then - echo "" - echo "=================================" + echo -e "" + echo -e "=================================" if ! fn_prompt_yn "Was the install successful?" Y; then install_retry.sh fi diff --git a/lgsm/functions/install_squad_license.sh b/lgsm/functions/install_squad_license.sh index f5d5dc457..0f1528e07 100644 --- a/lgsm/functions/install_squad_license.sh +++ b/lgsm/functions/install_squad_license.sh @@ -6,21 +6,21 @@ local commandname="INSTALL" local commandaction="Install" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") -echo "" -echo "Squad Server License" -echo "=================================" +echo -e "" +echo -e "${lightyellow}Squad Server License${default}" +echo -e "=================================" fn_sleep_time -echo "Server license is an optional feature for ${gamename} server" +echo -e "Server license is an optional feature for ${gamename} server" fn_script_log_info "Server license is an optional feature for ${gamename} server" -echo "Get more info and a server license here:" -echo "http://forums.joinsquad.com/topic/16519-server-licensing-general-info/" +echo -e "Get more info and a server license here:" +echo -e "http://forums.joinsquad.com/topic/16519-server-licensing-general-info/" fn_script_log_info "Get more info and a server license here:" fn_script_log_info "http://forums.joinsquad.com/topic/16519-server-licensing-general-info/" -echo "" +echo -e "" fn_sleep_time -echo "The Squad server license can be changed by editing ${servercfgdir}/License.cfg." +echo -e "The Squad server license can be changed by editing ${servercfgdir}/License.cfg." fn_script_log_info "The Squad server license can be changed by editing ${selfname}." -echo "" +echo -e "" diff --git a/lgsm/functions/install_stats.sh b/lgsm/functions/install_stats.sh new file mode 100644 index 000000000..2d304e447 --- /dev/null +++ b/lgsm/functions/install_stats.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# LinuxGSM install_stats.sh function +# Author: Daniel Gibbs +# Website: https://linuxgsm.com +# Description: Enabled LinuxGSM Stats. + +local commandname="INSTALL" +local commandaction="Install" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") + +echo -e "" +echo -e "${lightyellow}LinuxGSM Stats${default}" +echo -e "=================================" +fn_sleep_time +echo -e "Assist LinuxGSM development by sending anonymous stats to developers." +echo -e "More info: https://docs.linuxgsm.com/configuration/linuxgsm-stats" +echo -e "The following info will be sent:" +echo -e "* game server" +echo -e "* distro" +echo -e "* game server resource usage" +echo -e "* server hardware info" +if [ -z "${autoinstall}" ]; then + if fn_prompt_yn "Allow anonymous usage statistics?" Y; then + echo "stats=\"y\"" >> "${configdirserver}/common.cfg" + fn_print_information_nl "Stats setting is now enabled in common.cfg." + fi +else + fn_print_information_nl "auto-install leaves stats off by default. Stats can be enabled in common.cfg" +fi diff --git a/lgsm/functions/install_steamcmd.sh b/lgsm/functions/install_steamcmd.sh index 4b24c4274..e56c9b8aa 100644 --- a/lgsm/functions/install_steamcmd.sh +++ b/lgsm/functions/install_steamcmd.sh @@ -7,8 +7,8 @@ local commandname="INSTALL" local commandaction="Install" -echo "" -echo "Installing SteamCMD" -echo "=================================" +echo -e "" +echo -e "${lightyellow}Installing SteamCMD${default}" +echo -e "=================================" fn_sleep_time check_steamcmd.sh diff --git a/lgsm/functions/install_ts3db.sh b/lgsm/functions/install_ts3db.sh index 6fbe45724..09e16324e 100644 --- a/lgsm/functions/install_ts3db.sh +++ b/lgsm/functions/install_ts3db.sh @@ -7,7 +7,7 @@ local commandname="INSTALL" local commandaction="Install" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") fn_install_ts3db_mariadb(){ if [ ! -f "${serverfiles}/libts3db_mariadb.so" ]; then @@ -24,9 +24,9 @@ fn_install_ts3db_mariadb(){ fi fi - echo "" - echo "Configure ${gamename} Server for MariaDB" - echo "=================================" + echo -e "" + echo -e "${lightyellow}Configure ${gamename} Server for MariaDB${default}" + echo -e "=================================" fn_sleep_time read -rp "Enter MariaDB hostname: " mariahostname read -rp "Enter MariaDB port: " mariaport @@ -36,24 +36,24 @@ fn_install_ts3db_mariadb(){ read -rp "Enter MariaDB socket path: " mariadbsocket { - echo "[config]" - echo "host='${mariahostname}'" - echo "port='${mariaport}'" - echo "username='${mariausername}'" - echo "password='${mariapassword}'" - echo "database='${mariadbname}'" - echo "socket='${mariadbsocket}'" + echo -e "[config]" + echo -e "host='${mariahostname}'" + echo -e "port='${mariaport}'" + echo -e "username='${mariausername}'" + echo -e "password='${mariapassword}'" + echo -e "database='${mariadbname}'" + echo -e "socket='${mariadbsocket}'" } >> "${servercfgdir}/ts3db_mariadb.ini" sed -i "s/dbplugin=ts3db_sqlite3/dbplugin=ts3db_mariadb/g" "${servercfgfullpath}" sed -i "s/dbpluginparameter=/dbpluginparameter=ts3db_mariadb.ini/g" "${servercfgfullpath}" sed -i "s/dbsqlcreatepath=create_sqlite\//dbsqlcreatepath=create_mariadb\//g" "${servercfgfullpath}" - echo "updating ts3db_mariadb.ini." + echo -e "updating ts3db_mariadb.ini." fn_sleep_time } -echo "" -echo "Select Database" -echo "=================================" +echo -e "" +echo -e "${lightyellow}Select Database${default}" +echo -e "=================================" fn_sleep_time if [ -z "${autoinstall}" ]; then if fn_prompt_yn "Do you want to use MariaDB instead of sqlite? (MariaDB must be pre-configured)" N; then @@ -65,12 +65,14 @@ fi install_eula.sh -echo "" -echo "Getting privilege key" -echo "=================================" +echo -e "" +echo -e "${lightyellow}Getting privilege key${default}" +echo -e "=================================" fn_sleep_time fn_print_information_nl "Save these details for later." +fn_print_information_nl "Key also saved in:" +echo -e "${serverfiles}/privilege_key.txt" cd "${executabledir}" || exit -${executable} start inifile=ts3-server.ini +./ts3server_startscript.sh start inifile=ts3-server.ini 2>&1 | tee "${serverfiles}/privilege_key.txt" sleep 5 -${executable} stop +./ts3server_startscript.sh stop diff --git a/lgsm/functions/install_ut2k4_key.sh b/lgsm/functions/install_ut2k4_key.sh index 79066167e..c8d18692e 100644 --- a/lgsm/functions/install_ut2k4_key.sh +++ b/lgsm/functions/install_ut2k4_key.sh @@ -6,26 +6,26 @@ local commandname="INSTALL" local commandaction="Install" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") -echo "" -echo "Enter ${gamename} CD Key" -echo "=================================" +echo -e "" +echo -e "${lightyellow}Enter ${gamename} CD Key${default}" +echo -e "=================================" fn_sleep_time -echo "To get your server listed on the Master Server list" -echo "you must get a free CD key. Get a key here:" -echo "https://www.epicgames.com/unrealtournament/forums/cdkey.php?2004" -echo "" +echo -e "To get your server listed on the Master Server list" +echo -e "you must get a free CD key. Get a key here:" +echo -e "https://www.epicgames.com/unrealtournament/forums/cdkey.php?2004" +echo -e "" if [ -z "${autoinstall}" ]; then - echo "Once you have the key enter it below" + echo -e "Once you have the key enter it below" echo -n "KEY: " read -r CODE - echo ""\""CDKey"\""="\""${CODE}"\""" > "${systemdir}/cdkey" + echo -e ""\""CDKey"\""="\""${CODE}"\""" > "${systemdir}/cdkey" if [ -f "${systemdir}/cdkey" ]; then fn_script_log_info "UT2K4 Server CD Key created" fi else - echo "You can add your key using the following command" - echo "./${selfname} server-cd-key" + echo -e "You can add your key using the following command" + echo -e "./${selfname} server-cd-key" fi -echo "" +echo -e "" diff --git a/lgsm/functions/logs.sh b/lgsm/functions/logs.sh index 280b50a92..04f5010e9 100644 --- a/lgsm/functions/logs.sh +++ b/lgsm/functions/logs.sh @@ -98,7 +98,7 @@ if [ "$(find "${lgsmlogdir}"/ -type f -mtime +"${logdays}" | wc -l)" -ne "0" ]; fi # Count total amount of files removed. - countlogs=$((${scriptcount} + ${consolecount} + ${gamecount} + ${srcdscount} + ${smcount} + ${ulxcount} + ${darkrpcount})) + countlogs=$((scriptcount + consolecount + gamecount + srcdscount + smcount + ulxcount + darkrpcount)) # Job done. fn_print_ok_nl "Removed ${countlogs} log files" fn_script_log "Removed ${countlogs} log files" diff --git a/lgsm/functions/mods_core.sh b/lgsm/functions/mods_core.sh index 02d95c2f0..942012e46 100644 --- a/lgsm/functions/mods_core.sh +++ b/lgsm/functions/mods_core.sh @@ -7,7 +7,7 @@ local commandname="MODS" local commandaction="Mods" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") # Files and Directories. modsdir="${lgsmdir}/mods" @@ -43,10 +43,10 @@ fn_mod_lowercase(){ fileswc=$(find "${extractdir}" -depth | wc -l) echo -en "\r" while read -r src; do - dst="$(dirname "${src}$(/)basename" "${src}" | tr 'A-Z' 'a-z')" + dst=$(dirname "${src}$(/)basename" "${src}" | tr '[:upper:]' '[:lower:]') if [ "${src}" != "${dst}" ] then - [ ! -e "${dst}" ] && mv -T "${src}" "${dst}" || echo "${src} was not renamed" + [ ! -e "${dst}" ] && mv -T "${src}" "${dst}" || echo -e "${src} was not renamed" local exitcode=$? ((renamedwc++)) fi @@ -105,7 +105,7 @@ fn_mod_copy_destination(){ # Add the mod to the installed-mods.txt. fn_mod_add_list(){ if [ ! -n "$(sed -n "/^${modcommand}$/p" "${modsinstalledlistfullpath}")" ]; then - echo "${modcommand}" >> "${modsinstalledlistfullpath}" + echo -e "${modcommand}" >> "${modsinstalledlistfullpath}" fn_script_log_info "${modcommand} added to ${modsinstalledlist}" fi } @@ -122,11 +122,11 @@ fn_mod_tidy_files_list(){ removefromlist="cfg;addons;RustDedicated_Data;RustDedicated_Data\/Managed;RustDedicated_Data\/Managed\/x86;RustDedicated_Data\/Managed\/x64;" # Loop through files to remove from file list, # generate elements to remove from list. - removefromlistamount="$(echo "${removefromlist}" | awk -F ';' '{ print NF }')" + removefromlistamount=$(echo -e "${removefromlist}" | awk -F ';' '{ print NF }') # Test all subvalue of "removefromlist" using the ";" separator. for ((filesindex=1; filesindex < removefromlistamount; filesindex++)); do # Put current file into test variable. - removefilevar="$(echo "${removefromlist}" | awk -F ';' -v x=${filesindex} '{ print $x }')" + removefilevar=$(echo -e "${removefromlist}" | awk -F ';' -v x=${filesindex} '{ print $x }') # Delete line(s) matching exactly. sed -i "/^${removefilevar}$/d" "${modsdir}/${modcommand}-files.txt" # Exit on error. @@ -228,7 +228,7 @@ fn_mods_define(){ if [ -z "$index" ]; then fn_script_log_fatal "index variable not set. Please report an issue." fn_print_error "index variable not set. Please report an issue." - echo "* https://github.com/GameServerManagers/LinuxGSM/issues" + echo -e "* https://github.com/GameServerManagers/LinuxGSM/issues" core_exit.sh fi modcommand="${mods_global_array[index+1]}" @@ -259,7 +259,7 @@ fn_mods_installed_list(){ modcommandmaxlength="0" # Loop through every line of the installed mods list ${modsinstalledlistfullpath}. while [ "${installedmodsline}" -le "${installedmodscount}" ]; do - currentmod="$(sed "${installedmodsline}q;d" "${modsinstalledlistfullpath}")" + currentmod=$(sed "${installedmodsline}q;d" "${modsinstalledlistfullpath}") # Get mod info to make sure mod exists. fn_mod_get_info # Add the mod to available commands. @@ -306,11 +306,11 @@ fn_compatible_mod_games(){ # If value is set to GAMES (ignore). if [ "${modgames}" != "GAMES" ]; then # How many games we need to test. - gamesamount="$(echo "${modgames}" | awk -F ';' '{ print NF }')" + gamesamount=$(echo -e "${modgames}" | awk -F ';' '{ print NF }') # Test all subvalue of "modgames" using the ";" separator. for ((gamevarindex=1; gamevarindex < gamesamount; gamevarindex++)); do # Put current game name into modtest variable. - gamemodtest="$( echo "${modgames}" | awk -F ';' -v x=${gamevarindex} '{ print $x }' )" + gamemodtest=$( echo -e "${modgames}" | awk -F ';' -v x=${gamevarindex} '{ print $x }' ) # If game name matches. if [ "${gamemodtest}" == "${gamename}" ]; then # Mod is compatible. @@ -327,11 +327,11 @@ fn_compatible_mod_engines(){ # If value is set to ENGINES (ignore). if [ "${modengines}" != "ENGINES" ]; then # How many engines we need to test. - enginesamount="$(echo "${modengines}" | awk -F ';' '{ print NF }')" + enginesamount=$(echo -e "${modengines}" | awk -F ';' '{ print NF }') # Test all subvalue of "modengines" using the ";" separator. for ((gamevarindex=1; gamevarindex < ${enginesamount}; gamevarindex++)); do # Put current engine name into modtest variable. - enginemodtest="$( echo "${modengines}" | awk -F ';' -v x=${gamevarindex} '{ print $x }' )" + enginemodtest=$( echo -e "${modengines}" | awk -F ';' -v x=${gamevarindex} '{ print $x }' ) # If engine name matches. if [ "${enginemodtest}" == "${engine}" ]; then # Mod is compatible. @@ -348,11 +348,11 @@ fn_not_compatible_mod_games(){ # If value is set to NOTGAMES (ignore). if [ "${modexcludegames}" != "NOTGAMES" ]; then # How many engines we need to test. - excludegamesamount="$(echo "${modexcludegames}" | awk -F ';' '{ print NF }')" + excludegamesamount=$(echo -e "${modexcludegames}" | awk -F ';' '{ print NF }') # Test all subvalue of "modexcludegames" using the ";" separator. for ((gamevarindex=1; gamevarindex < excludegamesamount; gamevarindex++)); do # Put current engine name into modtest variable. - excludegamemodtest="$( echo "${modexcludegames}" | awk -F ';' -v x=${gamevarindex} '{ print $x }' )" + excludegamemodtest=$( echo -e "${modexcludegames}" | awk -F ';' -v x=${gamevarindex} '{ print $x }' ) # If engine name matches. if [ "${excludegamemodtest}" == "${gamename}" ]; then # Mod is compatible. @@ -461,7 +461,7 @@ fn_mods_clear_tmp_dir(){ # Counts how many mods were installed. fn_mods_count_installed(){ if [ -f "${modsinstalledlistfullpath}" ]; then - installedmodscount="$(wc -l < "${modsinstalledlistfullpath}")" + installedmodscount=$(wc -l < "${modsinstalledlistfullpath}") else installedmodscount=0 fi @@ -473,9 +473,9 @@ fn_mods_check_installed(){ fn_mods_count_installed # If no mods are found. if [ ${installedmodscount} -eq 0 ]; then - echo "" + echo -e "" fn_print_failure_nl "No installed mods or addons were found" - echo " * Install mods using LinuxGSM first with: ./${selfname} mods-install" + echo -e " * Install mods using LinuxGSM first with: ./${selfname} mods-install" fn_script_log_error "No installed mods or addons were found." core_exit.sh fi @@ -486,11 +486,11 @@ fn_check_mod_files_list(){ # File list must exist and be valid before any operation on it. if [ -f "${modsdir}/${modcommand}-files.txt" ]; then # How many lines is the file list. - modsfilelistsize="$(wc -l < "${modsdir}/${modcommand}-files.txt")" + modsfilelistsize=$(wc -l < "${modsdir}/${modcommand}-files.txt") # If file list is empty. if [ "${modsfilelistsize}" -eq 0 ]; then fn_print_failure "${modcommand}-files.txt is empty" - echo "* Unable to remove ${modprettyname}" + echo -e "* Unable to remove ${modprettyname}" fn_script_log_fatal "${modcommand}-files.txt is empty: Unable to remove ${modprettyname}." core_exit.sh fi diff --git a/lgsm/functions/mods_list.sh b/lgsm/functions/mods_list.sh index 0be790e7b..67a57463c 100644 --- a/lgsm/functions/mods_list.sh +++ b/lgsm/functions/mods_list.sh @@ -10,36 +10,36 @@ local commandname="MODS" local commandaction="List Mods" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") # Get a proper URL for mods that don't provide a good one (optional) fn_script_log_info "Retrieving latest mods URLs" # Metamod metamodmversion="1.10" metamodscrapeurl="https://mms.alliedmods.net/mmsdrop/${metamodmversion}/mmsource-latest-linux" -metamodlatestfile="$(wget "${metamodscrapeurl}" -q -O -)" +metamodlatestfile=$(wget "${metamodscrapeurl}" -q -O -) metamoddownloadurl="https://www.metamodsource.net/latest.php?os=linux&version=${metamodmversion}" metamodurl="${metamoddownloadurl}" # Sourcemod -sourcemodmversion="1.9" +sourcemodmversion="1.10" sourcemodscrapeurl="https://sm.alliedmods.net/smdrop/${sourcemodmversion}/sourcemod-latest-linux" -sourcemodlatestfile="$(wget "${sourcemodscrapeurl}" -q -O -)" +sourcemodlatestfile=$(wget "${sourcemodscrapeurl}" -q -O -) sourcemoddownloadurl="https://www.sourcemod.net/latest.php?os=linux&version=${sourcemodmversion}" sourcemodurl="${sourcemoddownloadurl}" # Steamworks steamworksscrapeurl="https://users.alliedmods.net/~kyles/builds/SteamWorks" -steamworkslatestfile="$(curl -sL ${steamworksscrapeurl} | grep -m 1 linux | cut -d '"' -f 4)" +steamworkslatestfile=$(curl -sL ${steamworksscrapeurl} | grep -m 1 linux | cut -d '"' -f 4) steamworksdownloadurl="${steamworksscrapeurl}/${steamworkslatestfile}" steamworksurl="${steamworksdownloadurl}" # CS:GO Mods -get5scrapepath="$(curl -sL https://ci.splewis.net/job/get5/lastSuccessfulBuild/api/xml | grep -oP "\K(.+)(?=)")" -get5latestfile="$(echo "${get5scrapepath}" | xargs -n 1 -I @ sh -c "echo "basename "@""")" +get5scrapepath=$(curl -sL https://ci.splewis.net/job/get5/lastSuccessfulBuild/api/xml | grep -oP "\K(.+)(?=)") +get5latestfile=$(echo -e "${get5scrapepath}" | xargs -n 1 -I @ sh -c "echo -e "basename "@""") get5downloadurl="https://ci.splewis.net/job/get5/lastSuccessfulBuild/artifact/${get5scrapepath}" get5url="${get5downloadurl}" # Oxide oxiderustlatestlink="https://umod.org/games/rust/download/develop" # fix for linux build 06.09.2019 -oxidehurtworldlatestlink="$(curl -sL https://api.github.com/repos/OxideMod/Oxide.Hurtworld/releases/latest | grep browser_download_url | cut -d '"' -f 4 | grep "Oxide.Hurtworld.zip")" -oxidesdtdlatestlink="$(curl -sL https://api.github.com/repos/OxideMod/Oxide.SevenDaysToDie/releases/latest | grep browser_download_url | cut -d '"' -f 4)" +oxidehurtworldlatestlink=$(curl -sL https://api.github.com/repos/OxideMod/Oxide.Hurtworld/releases/latest | grep browser_download_url | cut -d '"' -f 4 | grep "Oxide.Hurtworld.zip") +oxidesdtdlatestlink=$(curl -sL https://api.github.com/repos/OxideMod/Oxide.SevenDaysToDie/releases/latest | grep browser_download_url | cut -d '"' -f 4) # Define mods information (required) diff --git a/lgsm/functions/query_gamedig.sh b/lgsm/functions/query_gamedig.sh index 9438e4584..88e01af5f 100644 --- a/lgsm/functions/query_gamedig.sh +++ b/lgsm/functions/query_gamedig.sh @@ -6,102 +6,31 @@ # https://github.com/sonicsnes/node-gamedig # Check if gamedig and jq are installed. -if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; then - - if [ "${engine}" == "idtech3_ql" ]; then - local engine="quakelive" - elif [ "${shortname}" == "kf2" ]; then - local engine="unreal4" - fi - - local engine_query_array=( avalanche3.0 barotrauma madness quakelive realvirtuality refractor source goldsource spark starbound unity3d unreal4 wurm ) - for engine_query in "${engine_query_array[@]}" - do - if [ "${engine_query}" == "${engine}" ]; then - gamedigengine="protocol-valve" - fi - done - - local engine_query_array=( avalanche2.0 ) - for engine_query in "${engine_query_array[@]}" - do - if [ "${engine_query}" == "${engine}" ]; then - gamedigengine="jc2mp" - fi - done - - local engine_query_array=( quake ) - for engine_query in "${engine_query_array[@]}" - do - if [ "${engine_query}" == "${engine}" ]; then - gamedigengine="protocol-quake1" - fi - done - - local engine_query_array=( idtech2 iw2.0 ) - for engine_query in "${engine_query_array[@]}" - do - if [ "${engine_query}" == "${engine}" ]; then - gamedigengine="protocol-quake2" - fi - done - - local engine_query_array=( idtech3 iw3.0 ioquake3 qfusion ) - for engine_query in "${engine_query_array[@]}" - do - if [ "${engine_query}" == "${engine}" ]; then - gamedigengine="protocol-quake3" - fi - done - - local engine_query_array=( lwjgl2 ) - for engine_query in "${engine_query_array[@]}" - do - if [ "${engine_query}" == "${engine}" ]; then - gamedigengine="minecraft" - fi - done - - local shortname_query_array=( ts3 ) - for shortname_query in "${shortname_query_array[@]}" - do - if [ "${shortname_query}" == "${shortname}" ]; then - gamedigengine="teamspeak3" - fi - done - - local engine_query_array=( unreal ) - for engine_query in "${engine_query_array[@]}" - do - if [ "${engine_query}" == "${engine}" ]; then - gamedigengine="ut" - fi - done +if [ -n "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; then # will bypass query if server offline. check_status.sh if [ "${status}" != "0" ]; then # checks if query is working null = pass. - gamedigcmd=$(echo "gamedig --type \"${gamedigengine}\" --host \"${ip}\" --query_port \"${queryport}\"|jq") - gamedigraw=$(gamedig --type "${gamedigengine}" --host "${ip}" --query_port "${queryport}") - querystatus=$(echo "${gamedigraw}" | jq '.error|length') + gamedigcmd=$(echo -e "gamedig --type \"${querytype}\" --host \"${ip}\" --query_port \"${queryport}\"|jq") + gamedigraw=$(gamedig --type "${querytype}" --host "${ip}" --query_port "${queryport}") + querystatus=$(echo -e "${gamedigraw}" | jq '.error|length') if [ "${querystatus}" != "null" ]; then - gamedigcmd=$(echo "gamedig --type \"${gamedigengine}\" --host \"${ip}\" --port \"${queryport}\"|jq") - gamedigraw=$(gamedig --type "${gamedigengine}" --host "${ip}" --port "${queryport}") - querystatus=$(echo "${gamedigraw}" | jq '.error|length') + gamedigcmd=$(echo -e "gamedig --type \"${querytype}\" --host \"${ip}\" --port \"${queryport}\"|jq") + gamedigraw=$(gamedig --type "${querytype}" --host "${ip}" --port "${queryport}") + querystatus=$(echo -e "${gamedigraw}" | jq '.error|length') fi - # server name. - gdname=$(echo "${gamedigraw}" | jq -re '.name') + gdname=$(echo -e "${gamedigraw}" | jq -re '.name') if [ "${gdname}" == "null" ]; then unset gdname fi # numplayers. - gdplayers=$(echo "${gamedigraw}" | jq -re '.players') + gdplayers=$(echo -e "${gamedigraw}" | jq -re '.players') if [ "${gdplayers}" == "null" ]; then unset gdplayers elif [ "${gdplayers}" == "[]" ]; then @@ -109,7 +38,7 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; fi # maxplayers. - gdmaxplayers=$(echo "${gamedigraw}" | jq -re '.maxplayers') + gdmaxplayers=$(echo -e "${gamedigraw}" | jq -re '.maxplayers') if [ "${gdmaxplayers}" == "null" ]; then unset maxplayers elif [ "${gdmaxplayers}" == "[]" ]; then @@ -117,19 +46,19 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; fi # current map. - gdmap=$(echo "${gamedigraw}" | jq -re '.map') + gdmap=$(echo -e "${gamedigraw}" | jq -re '.map') if [ "${gdmap}" == "null" ]; then unset gdmap fi # current gamemode. - gdgamemode=$(echo "${gamedigraw}" | jq -re '.raw.rules.GameMode_s') + gdgamemode=$(echo -e "${gamedigraw}" | jq -re '.raw.rules.GameMode_s') if [ "${gdgamemode}" == "null" ]; then unset gdgamemode fi # numbots. - gdbots=$(echo "${gamedigraw}" | jq -re '.raw.numbots') + gdbots=$(echo -e "${gamedigraw}" | jq -re '.raw.numbots') if [ "${gdbots}" == "null" ]||[ "${gdbots}" == "0" ]; then unset gdbots fi diff --git a/lgsm/functions/query_gsquery.py b/lgsm/functions/query_gsquery.py index fcfd4edc3..0a41b495b 100644 --- a/lgsm/functions/query_gsquery.py +++ b/lgsm/functions/query_gsquery.py @@ -17,10 +17,15 @@ class gsquery: self.server_response_timeout = 5 self.default_buffer_length = 1024 # - sourcequery=[ 'avalanche3.0','barotrauma''madness','quakelive','realvirtuality','refractor','source','goldsource','spark','starbound','unity3d', 'unreal4', 'wurm' ] - idtech3query=['idtech3','iw3.0','ioquake3','qfusion'] - idtech2query=['idtech2','quake','iw2.0'] + sourcequery=['protocol-valve','avalanche3.0','barotrauma','madness','quakelive','realvirtuality','refractor','source','goldsource','spark','starbound','unity3d','unreal4','wurm'] + idtech2query=['protocol-quake3','idtech2','quake','iw2.0'] + idtech3query=['protocol-quake3','iw3.0','ioquake3','qfusion'] minecraftquery=['minecraft','lwjgl2'] + jc2mpquery=['jc2mp'] + mumblequery=['mumbleping'] + twquery=['teeworlds'] + unrealquery=['protocol-gamespy1','unreal'] + unreal2query=['protocol-unreal2','unreal2'] if self.option.engine in sourcequery: self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0' elif self.option.engine in idtech2query: @@ -29,12 +34,16 @@ class gsquery: self.query_prompt_string = b'\xff\xff\xff\xffgetstatus' elif self.option.engine in minecraftquery: self.query_prompt_string = b'\xFE\xFD\x09\x3d\x54\x1f\x93' - elif self.option.engine == 'avalanche2.0': + elif self.option.engine in jc2mpquery: self.query_prompt_string = b'\xFE\xFD\x09\x10\x20\x30\x40' - elif self.option.engine == 'unreal': + elif self.option.engine in mumblequery: + self.query_prompt_string = b'\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x07\x08' + elif self.option.engine in unrealquery: self.query_prompt_string = b'\x5C\x69\x6E\x66\x6F\x5C' - elif self.option.engine == 'unreal2': + elif self.option.engine in unreal2query: self.query_prompt_string = b'\x79\x00\x00\x00\x00' + elif self.option.engine in twquery: + self.query_prompt_string = b"\x04\x00\x00\xff\xff\xff\xff\x05" + bytearray(511) self.connected = False self.response = None @@ -104,7 +113,7 @@ if __name__ == '__main__': action='store', dest='engine', default=False, - help='Engine type: avalanche2.0 avalanche3.0 goldsource idtech2 idtech3 ioquake3 iw2.0 iw3.0 madness quake quakelive realvirtuality refracto source spark starbound unity3d unreal unreal2 unreal4 wurm.' + help='Engine type: protocol-valve protocol-quake3 protocol-quake3 protocol-gamespy1 protocol-unreal2 minecraft jc2mp mumbleping teeworlds' ) parser.add_option( '-v', '--verbose', diff --git a/lgsm/functions/update_factorio.sh b/lgsm/functions/update_factorio.sh index c6d27ee65..584fec4ae 100644 --- a/lgsm/functions/update_factorio.sh +++ b/lgsm/functions/update_factorio.sh @@ -6,7 +6,7 @@ local commandname="UPDATE" local commandaction="Update" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") fn_update_factorio_dl(){ fn_fetch_file "https://factorio.com/get-download/${downloadbranch}/headless/${factorioarch}" "${tmpdir}" "factorio_headless_${factorioarch}-${remotebuild}.tar.xz" @@ -43,7 +43,7 @@ fn_update_factorio_localbuild(){ fn_update_factorio_remotebuild(){ # Gets remote build info. - remotebuild=$(${curlpath} -s "https://factorio.com/get-download/${downloadbranch}/headless/${factorioarch}" | grep -o '[0-9]\.[0-9]\{1,\}\.[0-9]\{1,\}' | head -1) + remotebuild=$(curl -s "https://factorio.com/get-download/${downloadbranch}/headless/${factorioarch}" | grep -o '[0-9]\.[0-9]\{1,\}\.[0-9]\{1,\}' | head -1) if [ "${installer}" != "1" ]; then fn_print_dots "Checking for update: ${remotelocation}: checking remote build" # Checks if remotebuild variable has been set. @@ -68,8 +68,8 @@ fn_update_factorio_remotebuild(){ fn_update_factorio_compare(){ fn_print_dots "Checking for update: ${remotelocation}" # Removes dots so if statement can compare version numbers. - localbuilddigit=$(echo "${localbuild}" | tr -cd '[:digit:]') - remotebuilddigit=$(echo "${remotebuild}" | tr -cd '[:digit:]') + localbuilddigit=$(echo -e "${localbuild}" | tr -cd '[:digit:]') + remotebuilddigit=$(echo -e "${remotebuild}" | tr -cd '[:digit:]') if [ "${localbuilddigit}" -ne "${remotebuilddigit}" ]||[ "${forceupdate}" == "1" ]; then fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" diff --git a/lgsm/functions/update_minecraft.sh b/lgsm/functions/update_minecraft.sh index 8fa3ef40a..f27603a42 100644 --- a/lgsm/functions/update_minecraft.sh +++ b/lgsm/functions/update_minecraft.sh @@ -6,11 +6,11 @@ local commandname="UPDATE" local commandaction="Update" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") fn_update_minecraft_dl(){ - latestmcreleaselink=$(${curlpath} -s "https://launchermeta.mojang.com/mc/game/version_manifest.json" | jq -r '.latest.release as $latest | .versions[] | select(.id == $latest) | .url') - latestmcbuildurl=$(${curlpath} -s "${latestmcreleaselink}" | jq -r '.downloads.server.url') + latestmcreleaselink=$(curl -s "https://launchermeta.mojang.com/mc/game/version_manifest.json" | jq -r '.latest.release as $latest | .versions[] | select(.id == $latest) | .url') + latestmcbuildurl=$(curl -s "${latestmcreleaselink}" | jq -r '.downloads.server.url') fn_fetch_file "${latestmcbuildurl}" "${tmpdir}" "minecraft_server.${remotebuild}.jar" echo -e "copying to ${serverfiles}...\c" cp "${tmpdir}/minecraft_server.${remotebuild}.jar" "${serverfiles}/minecraft_server.jar" @@ -98,7 +98,7 @@ fn_update_minecraft_localbuild(){ fn_update_minecraft_remotebuild(){ # Gets remote build info. - remotebuild=$(${curlpath} -s "https://launchermeta.${remotelocation}/mc/game/version_manifest.json" | jq -r '.latest.release') + remotebuild=$(curl -s "https://launchermeta.${remotelocation}/mc/game/version_manifest.json" | jq -r '.latest.release') if [ "${installer}" != "1" ]; then fn_print_dots "Checking for update: ${remotelocation}: checking remote build" # Checks if remotebuild variable has been set. @@ -123,8 +123,8 @@ fn_update_minecraft_remotebuild(){ fn_update_minecraft_compare(){ # Removes dots so if statement can compare version numbers. fn_print_dots "Checking for update: ${remotelocation}" - localbuilddigit=$(echo "${localbuild}" | tr -cd '[:digit:]') - remotebuilddigit=$(echo "${remotebuild}" | tr -cd '[:digit:]') + localbuilddigit=$(echo -e "${localbuild}" | tr -cd '[:digit:]') + remotebuilddigit=$(echo -e "${remotebuild}" | tr -cd '[:digit:]') if [ "${localbuilddigit}" -ne "${remotebuilddigit}" ]||[ "${forceupdate}" == "1" ]; then fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" diff --git a/lgsm/functions/update_mta.sh b/lgsm/functions/update_mta.sh index 935ab474e..879ca1409 100644 --- a/lgsm/functions/update_mta.sh +++ b/lgsm/functions/update_mta.sh @@ -6,7 +6,7 @@ local commandname="UPDATE" local commandaction="Update" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") fn_update_mta_dl(){ fn_fetch_file "http://linux.mtasa.com/dl/multitheftauto_linux_x64.tar.gz" "${tmpdir}" "multitheftauto_linux_x64.tar.gz" @@ -99,9 +99,9 @@ fn_update_mta_localbuild(){ fn_update_mta_remotebuild(){ # Gets remote build info. - majorversion="$(curl -s https://raw.githubusercontent.com/multitheftauto/mtasa-blue/master/Server/version.h | grep "#define MTASA_VERSION_MAJOR" | awk '{ print $3 }' | sed 's/\r//g')" - minorversion="$(curl -s https://raw.githubusercontent.com/multitheftauto/mtasa-blue/master/Server/version.h | grep "#define MTASA_VERSION_MINOR" | awk '{ print $3 }' | sed 's/\r//g')" - maintenanceversion="$(curl -s https://raw.githubusercontent.com/multitheftauto/mtasa-blue/master/Server/version.h | grep "#define MTASA_VERSION_MAINTENANCE" | awk '{ print $3 }' | sed 's/\r//g')" + majorversion=$(curl -s https://raw.githubusercontent.com/multitheftauto/mtasa-blue/master/Server/version.h | grep "#define MTASA_VERSION_MAJOR" | awk '{ print $3 }' | sed 's/\r//g') + minorversion=$(curl -s https://raw.githubusercontent.com/multitheftauto/mtasa-blue/master/Server/version.h | grep "#define MTASA_VERSION_MINOR" | awk '{ print $3 }' | sed 's/\r//g') + maintenanceversion=$(curl -s https://raw.githubusercontent.com/multitheftauto/mtasa-blue/master/Server/version.h | grep "#define MTASA_VERSION_MAINTENANCE" | awk '{ print $3 }' | sed 's/\r//g') remotebuild="${majorversion}.${minorversion}.${maintenanceversion}" if [ "${installer}" != "1" ]; then fn_print_dots "Checking for update: ${remotelocation}: checking remote build" @@ -127,8 +127,8 @@ fn_update_mta_remotebuild(){ fn_update_mta_compare(){ # Removes dots so if statement can compare version numbers. fn_print_dots "Checking for update: ${remotelocation}" - localbuilddigit=$(echo "${localbuild}" | tr -cd '[:digit:]') - remotebuilddigit=$(echo "${remotebuild}" | tr -cd '[:digit:]') + localbuilddigit=$(echo -e "${localbuild}" | tr -cd '[:digit:]') + remotebuilddigit=$(echo -e "${remotebuild}" | tr -cd '[:digit:]') if [ "${localbuilddigit}" -ne "${remotebuilddigit}" ]||[ "${forceupdate}" == "1" ]; then fn_print_ok_nl "Checking for update: ${remotelocation}" if [ "${forceupdate}" == "1" ]; then diff --git a/lgsm/functions/update_mumble.sh b/lgsm/functions/update_mumble.sh index eb0bdcda3..0f33c1900 100644 --- a/lgsm/functions/update_mumble.sh +++ b/lgsm/functions/update_mumble.sh @@ -6,7 +6,7 @@ local commandname="UPDATE" local commandaction="Update" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") fn_update_mumble_dl(){ fn_fetch_file "https://github.com/mumble-voip/mumble/releases/download/${remotebuild}/murmur-static_${mumblearch}-${remotebuild}.tar.bz2" "${tmpdir}" "murmur-static_${mumblearch}-${remotebuild}.tar.bz2" @@ -43,7 +43,7 @@ fn_update_mumble_localbuild(){ fn_update_mumble_remotebuild(){ # Gets remote build info. - remotebuild=$(${curlpath} -s "https://api.github.com/repos/mumble-voip/mumble/releases/latest" | grep 'murmur-static_x86.*\.bz2"' | tail -1 | awk -F"/" '{ print $8 }') + remotebuild=$(curl -s "https://api.github.com/repos/mumble-voip/mumble/releases/latest" | grep 'murmur-static_x86.*\.bz2"' | tail -1 | awk -F"/" '{ print $8 }') if [ "${installer}" != "1" ]; then fn_print_dots "Checking for update: ${remotelocation}: checking remote build" # Checks if remotebuild variable has been set. @@ -68,8 +68,8 @@ fn_update_mumble_remotebuild(){ fn_update_mumble_compare(){ # Removes dots so if statement can compare version numbers. fn_print_dots "Checking for update: ${remotelocation}" - localbuilddigit=$(echo "${localbuild}" | tr -cd '[:digit:]') - remotebuilddigit=$(echo "${remotebuild}" | tr -cd '[:digit:]') + localbuilddigit=$(echo -e "${localbuild}" | tr -cd '[:digit:]') + remotebuilddigit=$(echo -e "${remotebuild}" | tr -cd '[:digit:]') if [ "${localbuilddigit}" -ne "${remotebuilddigit}" ]||[ "${forceupdate}" == "1" ]; then fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh index c844e9160..61eceb772 100644 --- a/lgsm/functions/update_steamcmd.sh +++ b/lgsm/functions/update_steamcmd.sh @@ -6,14 +6,14 @@ local commandname="UPDATE" local commandaction="Update" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") fn_update_steamcmd_dl(){ info_config.sh # Detects if unbuffer command is available for 32 bit distributions only. info_distro.sh - if [ "$(command -v stdbuf)" ]&&[ "${arch}" != "x86_64" ]; then + if [ -n "$(command -v stdbuf)" ]&&[ "${arch}" != "x86_64" ]; then unbuffer="stdbuf -i0 -o0 -e0" fi @@ -162,9 +162,9 @@ fn_appmanifest_check(){ if [ "${appmanifestfilewc}" -ge "2" ]; then fn_print_fail "Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files" fn_script_log_fatal "Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files" - echo " * Check user permissions" + echo -e " * Check user permissions" for appfile in ${appmanifestfile}; do - echo " ${appfile}" + echo -e " ${appfile}" done core_exit.sh else diff --git a/lgsm/functions/update_ts3.sh b/lgsm/functions/update_ts3.sh index 31a015e6e..798137311 100644 --- a/lgsm/functions/update_ts3.sh +++ b/lgsm/functions/update_ts3.sh @@ -6,13 +6,13 @@ local commandname="UPDATE" local commandaction="Update" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") fn_update_ts3_dl(){ if [ "${ts3arch}" == "amd64" ]; then - remotebuildurl=$(${curlpath} -s 'https://www.teamspeak.com/versions/server.json' | jq -r '.linux.x86_64.mirrors."teamspeak.com"') + remotebuildurl=$(curl -s 'https://www.teamspeak.com/versions/server.json' | jq -r '.linux.x86_64.mirrors."teamspeak.com"') elif [ "${ts3arch}" == "x86" ]; then - remotebuildurl=$(${curlpath} -s 'https://www.teamspeak.com/versions/server.json' | jq -r '.linux.x86.mirrors."teamspeak.com"') + remotebuildurl=$(curl -s 'https://www.teamspeak.com/versions/server.json' | jq -r '.linux.x86.mirrors."teamspeak.com"') fi fn_fetch_file "${remotebuildurl}" "${tmpdir}" "teamspeak3-server_linux_${ts3arch}-${remotebuild}.tar.bz2" fn_dl_extract "${tmpdir}" "teamspeak3-server_linux_${ts3arch}-${remotebuild}.tar.bz2" "${tmpdir}" @@ -68,7 +68,7 @@ fn_update_ts3_localbuild(){ fi if [ -z "${localbuild}" ]; then - localbuild=$(cat $(find ./* -name "ts3server*_0.log" 2> /dev/null | sort | tail -1) | grep -Eo "TeamSpeak 3 Server ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}" | grep -Eo "((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}") + localbuild=$(cat "$(find ./* -name "ts3server*_0.log" 2> /dev/null | sort | tail -1)" | grep -Eo "TeamSpeak 3 Server ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}" | grep -Eo "((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}" | tail -1) fi if [ -z "${localbuild}" ]; then @@ -81,7 +81,7 @@ fn_update_ts3_localbuild(){ loopignore=1 fn_script_log_info "Waiting for local build to generate" fi - localbuild=$(cat $(find ./* -name "ts3server*_0.log" 2> /dev/null | sort | tail -1) | grep -Eo "TeamSpeak 3 Server ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}" | grep -Eo "((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}") + localbuild=$(cat "$(find ./* -name "ts3server*_0.log" 2> /dev/null | sort | tail -1)" | grep -Eo "TeamSpeak 3 Server ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}" | grep -Eo "((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}" | tail -1) if [ "${localbuild}" ]; then break fi @@ -104,9 +104,9 @@ fn_update_ts3_localbuild(){ fn_update_ts3_remotebuild(){ # Gets remote build info. if [ "${arch}" == "x86_64" ]; then - remotebuild="$(${curlpath} -s "https://www.teamspeak.com/versions/server.json" | jq -r '.linux.x86_64.version')" + remotebuild=$(curl -s "https://www.teamspeak.com/versions/server.json" | jq -r '.linux.x86_64.version') elif [ "${arch}" == "x86" ]; then - remotebuild="$(${curlpath} -s "https://www.teamspeak.com/versions/server.json" | jq -r '.linux.x86.version')" + remotebuild=$(curl -s "https://www.teamspeak.com/versions/server.json" | jq -r '.linux.x86.version') fi if [ "${installer}" != "1" ]; then fn_print_dots "Checking for update: ${remotelocation}: checking remote build" @@ -132,8 +132,8 @@ fn_update_ts3_remotebuild(){ fn_update_ts3_compare(){ # Removes dots so if statement can compare version numbers. fn_print_dots "Checking for update: ${remotelocation}" - localbuilddigit=$(echo "${localbuild}" | tr -cd '[:digit:]') - remotebuilddigit=$(echo "${remotebuild}" | tr -cd '[:digit:]') + localbuilddigit=$(echo -e "${localbuild}" | tr -cd '[:digit:]') + remotebuilddigit=$(echo -e "${remotebuild}" | tr -cd '[:digit:]') if [ "${localbuilddigit}" -ne "${remotebuilddigit}" ]||[ "${forceupdate}" == "1" ]; then fn_print_ok_nl "Checking for update: ${remotelocation}" echo -en "\n" diff --git a/linuxgsm.sh b/linuxgsm.sh index 143493712..451e0c888 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,13 +20,12 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v19.10.2" +version="v19.11.0" shortname="core" gameservername="core" -rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" -selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -servicename="${selfname}" -lockselfname=".${servicename}.lock" +rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") +selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") +lockselfname=".${selfname}.lock" lgsmdir="${rootdir}/lgsm" logdir="${rootdir}/log" lgsmlogdir="${logdir}/lgsm" @@ -52,7 +51,7 @@ githubbranch="master" # Core function that is required first. core_functions.sh(){ - functionfile="${FUNCNAME}" + functionfile="${FUNCNAME[0]}" fn_bootstrap_fetch_file_github "lgsm/functions" "core_functions.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" } @@ -71,27 +70,25 @@ fn_bootstrap_fetch_file(){ if [ ! -d "${local_filedir}" ]; then mkdir -p "${local_filedir}" fi - # Defines curl path. - curlpath=$(command -v curl 2>/dev/null) # If curl exists download file. - if [ "$(basename "${curlpath}")" == "curl" ]; then + if [ -n "$(command -v curl 2>/dev/null)" ]; then # Trap to remove part downloaded files. echo -en " fetching ${local_filename}...\c" - curlcmd=$(${curlpath} -s --fail -L -o "${local_filedir}/${local_filename}" "${remote_fileurl}" 2>&1) + curlcmd=$(curl -s --fail -L -o "${local_filedir}/${local_filename}" "${remote_fileurl}" 2>&1) local exitcode=$? if [ ${exitcode} -ne 0 ]; then echo -e "FAIL" if [ -f "${lgsmlog}" ]; then echo -e "${remote_fileurl}" | tee -a "${lgsmlog}" - echo "${curlcmd}" | tee -a "${lgsmlog}" + echo -e "${curlcmd}" | tee -a "${lgsmlog}" fi exit 1 else echo -e "OK" fi else - echo "[ FAIL ] Curl is not installed" + echo -e "[ FAIL ] Curl is not installed" exit 1 fi # Make file chmodx if chmodx is set. @@ -103,6 +100,7 @@ fn_bootstrap_fetch_file(){ if [ -f "${local_filedir}/${local_filename}" ]; then # Run file if run is set. if [ "${run}" == "run" ]; then + # shellcheck source=/dev/null source "${local_filedir}/${local_filename}" fi fi @@ -127,14 +125,13 @@ fn_bootstrap_fetch_file_github(){ # Installer menu. fn_print_center() { - columns="$(tput cols)" - line="$@" + columns=$(tput cols) + line="$*" printf "%*s\n" $(( (${#line} + columns) / 2)) "${line}" } fn_print_horizontal(){ - char="${1:-=}" - printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' "${char}" + printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' "=" } # Bash menu. @@ -149,7 +146,7 @@ fn_install_menu_bash() { fn_print_horizontal menu_options=() while read -r line || [[ -n "${line}" ]]; do - var=$(echo "${line}" | awk -F "," '{print $2 " - " $3}') + var=$(echo -e "${line}" | awk -F "," '{print $2 " - " $3}') menu_options+=( "${var}" ) done < "${options}" menu_options+=( "Cancel" ) @@ -174,8 +171,8 @@ fn_install_menu_whiptail() { IFS="," menu_options=() while read -r line; do - key=$(echo "${line}" | awk -F "," '{print $3}') - val=$(echo "${line}" | awk -F "," '{print $2}') + key=$(echo -e "${line}" | awk -F "," '{print $3}') + val=$(echo -e "${line}" | awk -F "," '{print $2}') menu_options+=( "${val//\"}" "${key//\"}" ) done < "${options}" OPTION=$(${menucmd} --title "${title}" --menu "${caption}" "${height}" "${width}" "${menuheight}" "${menu_options[@]}" 3>&1 1>&2 2>&3) @@ -220,10 +217,10 @@ fn_server_info(){ fn_install_getopt(){ userinput="empty" - echo "Usage: $0 [option]" + echo -e "Usage: $0 [option]" echo -e "" - echo "Installer - Linux Game Server Managers - Version ${version}" - echo "https://linuxgsm.com" + echo -e "Installer - Linux Game Server Managers - Version ${version}" + echo -e "https://linuxgsm.com" echo -e "" echo -e "Commands" echo -e "install\t\t| Select server to install." @@ -237,22 +234,22 @@ fn_install_file(){ if [ -e "${local_filename}" ]; then i=2 while [ -e "${local_filename}-${i}" ] ; do - let i++ + (( i++ )) done local_filename="${local_filename}-${i}" fi cp -R "${selfname}" "${local_filename}" sed -i -e "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${local_filename}" sed -i -e "s/gameservername=\"core\"/gameservername=\"${gameservername}\"/g" "${local_filename}" - echo "Installed ${gamename} server as ${local_filename}" - echo "" + echo -e "Installed ${gamename} server as ${local_filename}" + echo -e "" if [ ! -d "${serverfiles}" ]; then - echo "./${local_filename} install" + echo -e "./${local_filename} install" else - echo "Remember to check server ports" - echo "./${local_filename} details" + echo -e "Remember to check server ports" + echo -e "./${local_filename} details" fi - echo "" + echo -e "" exit } @@ -260,11 +257,11 @@ fn_install_file(){ if [ "$(whoami)" == "root" ]; then if [ "${userinput}" == "install" ]||[ "${userinput}" == "auto-install" ]||[ "${userinput}" == "i" ]||[ "${userinput}" == "ai" ]; then if [ "${shortname}" == "core" ]; then - echo "[ FAIL ] Do NOT run this script as root!" + echo -e "[ FAIL ] Do NOT run this script as root!" exit 1 fi elif [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" + echo -e "[ FAIL ] Do NOT run this script as root!" exit 1 else core_functions.sh @@ -277,7 +274,7 @@ if [ "${shortname}" == "core" ]; then # Download the latest serverlist. This is the complete list of all supported servers. fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" if [ ! -f "${serverlist}" ]; then - echo "[ FAIL ] serverlist.csv could not be loaded." + echo -e "[ FAIL ] serverlist.csv could not be loaded." exit 1 fi @@ -294,18 +291,18 @@ if [ "${shortname}" == "core" ]; then if [ "${result}" == "${gameservername}" ]; then fn_install_file elif [ "${result}" == "" ]; then - echo "Install canceled" + echo -e "Install canceled" else - echo "[ FAIL ] menu result does not match gameservername" - echo "result: ${result}" - echo "gameservername: ${gameservername}" + echo -e "[ FAIL ] menu result does not match gameservername" + echo -e "result: ${result}" + echo -e "gameservername: ${gameservername}" fi elif [ -n "${userinput}" ]; then fn_server_info if [ "${userinput}" == "${gameservername}" ]||[ "${userinput}" == "${gamename}" ]||[ "${userinput}" == "${shortname}" ]; then fn_install_file else - echo "[ FAIL ] unknown game server" + echo -e "[ FAIL ] unknown game server" fi else fn_install_getopt @@ -348,19 +345,24 @@ else fi fi fi + # shellcheck source=/dev/null source "${configdirserver}/_default.cfg" # Load the common.cfg config. If missing download it. if [ ! -f "${configdirserver}/common.cfg" ]; then fn_fetch_config "lgsm/config-default/config-lgsm" "common-template.cfg" "${configdirserver}" "common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nomd5" + # shellcheck source=/dev/null source "${configdirserver}/common.cfg" else + # shellcheck source=/dev/null source "${configdirserver}/common.cfg" fi # Load the instance.cfg config. If missing download it. if [ ! -f "${configdirserver}/${servicename}.cfg" ]; then fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${servicename}.cfg" "nochmodx" "norun" "noforcedl" "nomd5" + # shellcheck source=/dev/null source "${configdirserver}/${servicename}.cfg" else + # shellcheck source=/dev/null source "${configdirserver}/${servicename}.cfg" fi diff --git a/tests/tests_defaultcfg/defaultcfg_0.txt b/tests/tests_defaultcfg/defaultcfg_0.txt new file mode 100644 index 000000000..ac95a5715 --- /dev/null +++ b/tests/tests_defaultcfg/defaultcfg_0.txt @@ -0,0 +1,54 @@ +stats +displayip +postalert +postdays +posttarget +discordalert +discordwebhook +emailalert +email +emailfrom +iftttalert +ifttttoken +iftttevent +mailgunalert +mailguntoken +mailgundomain +mailgunemailfrom +mailgunemail +pushbulletalert +pushbullettoken +channeltag +pushoveralert +pushovertoken +slackalert +slackwebhook +telegramalert +telegramtoken +telegramchatid +curlcustomstring +maxbackups +maxbackupdays +stoponbackup +consolelogging +logdays +querydelay +ansi +sleeptime +stopmode +gamename +engine +glibc +systemdir +executabledir +executable +backupdir +logdir +lgsmlogdir +consolelogdir +lgsmlog +consolelog +alertlog +postdetailslog +lgsmlogdate +consolelogdate diff --git a/tests/tests_defaultcfg/defaultcfg_1.txt b/tests/tests_defaultcfg/defaultcfg_1.txt new file mode 100644 index 000000000..9a4df6c0b --- /dev/null +++ b/tests/tests_defaultcfg/defaultcfg_1.txt @@ -0,0 +1,51 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! +# Copy settings from here and use them in either: +# common.cfg - applies settings to every instance. +# [instance].cfg - applies settings to a specific instance. +#### Game Server Settings #### +## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +#### LinuxGSM Settings #### +## Notification Alerts +# (on|off) +# Display IP | https://docs.linuxgsm.com/alerts#display-ip +# More info | https://docs.linuxgsm.com/alerts#more-info +# Discord Alerts | https://docs.linuxgsm.com/alerts/discord +# Email Alerts | https://docs.linuxgsm.com/alerts/email +# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt +# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun +# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet +# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover +# Slack Alerts | https://docs.linuxgsm.com/alerts/slack +# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram +# You can add a custom cURL string eg proxy (useful in Russia) or else in "curlcustomstring". +# like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need +# any custom string in curl - simple ignore this parameter. +## Backup | https://docs.linuxgsm.com/commands/backup +## Logging | https://docs.linuxgsm.com/features/logging +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors +#### Advanced Settings #### +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode +# 1: tmux kill +# 2: CTRL+c +# 3: quit +# 4: quit 120s +# 5: stop +# 6: q +# 7: exit +# 8: 7 Days to Die +# 9: Gold Source +# 10: Teamspeak 3 +## Game Server Details +# Do not edit +#### Directories #### +# Edit with care +## Game Server Directories +## Backup Directory +## Logging Directories +## Logs Naming diff --git a/tests/tests_defaultcfg/tests_defaultcfg.sh b/tests/tests_defaultcfg/tests_defaultcfg.sh new file mode 100644 index 000000000..5e139fb4d --- /dev/null +++ b/tests/tests_defaultcfg/tests_defaultcfg.sh @@ -0,0 +1,60 @@ +#!/bin/bash +echo -e "" +echo -e "0.1 - Full comparison Output" +echo -e "==================================================================" +echo -e "Description:" +echo -e "test checks that vars present in ALL _default.cfg files are correct." +echo -e "" +find "lgsm/config-default/config-lgsm/" ! -name '*template.cfg' -name "*.cfg" -type f -print0 | +while IFS= read -r -d $'\0' line; do + grep = ${line} | cut -f1 -d"=" > defaultcfgtemp.txt + diffoutput=$(diff tests/tests_defaultcfg/defaultcfg_0.txt defaultcfgtemp.txt) + if [ "${diffoutput}" ]; then + echo "File with errors:" + echo "${line}" + echo -e "=================================" + echo "${diffoutput}" + echo "" + fi + rm defaultcfgtemp.txt +done + +echo -e "" +echo -e "1.0 - Master Comparison" +echo -e "==================================================================" +echo -e "Description:" +echo -e "test checks that vars present in ALL _default.cfg files are correct." +echo -e "" +find lgsm/config-default/config-lgsm/ ! -name '*template.cfg' -name "*.cfg" -type f -print0 | +while IFS= read -r -d $'\0' line; do + grep "=" "${line}" | cut -f1 -d"=" > defaultcfgtemp.txt + diffoutput=$(diff tests/tests_defaultcfg/defaultcfg_0.txt defaultcfgtemp.txt | grep '^<') + if [ "${diffoutput}" ]; then + echo "File with errors:" + echo "${line}" + echo -e "=================================" + echo "${diffoutput}" + echo "" + fi + rm defaultcfgtemp.txt +done + +echo -e "" +echo -e "2.0 - Check Comment" +echo -e "==================================================================" +echo -e "Description:" +echo -e "test checks that comments in ALL _default.cfg files are correct." +echo -e "" +find lgsm/config-default/config-lgsm/ ! -name '*template.cfg' -name "*.cfg" -type f -print0 | +while IFS= read -r -d $'\0' line; do + grep "#" "${line}" > defaultcfgtemp.txt + diffoutput=$(diff tests/tests_defaultcfg/defaultcfg_1.txt defaultcfgtemp.txt | grep '^<') + if [ "${diffoutput}" ]; then + echo "File with errors:" + echo "${line}" + echo -e "=================================" + echo "${diffoutput}" + echo "" + fi + rm defaultcfgtemp.txt +done diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index 6c74712cc..1a9fae98b 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -23,10 +23,9 @@ fi version="v19.9.0" shortname="fctr" gameservername="fctrserver" -rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" -selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -servicename="${selfname}" -lockselfname=".${servicename}.lock" +rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") +selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") +lockselfname=".${selfname}.lock" lgsmdir="${rootdir}/lgsm" logdir="${rootdir}/log" lgsmlogdir="${logdir}/lgsm" @@ -48,7 +47,7 @@ if [ ! -v TRAVIS ]; then TRAVIS_BRANCH="develop" TRAVIS_BUILD_DIR="${rootdir}" else - servicename="travis" + selfname="travis" travistest="1" fi @@ -61,7 +60,7 @@ githubbranch="${TRAVIS_BRANCH}" # Core function that is required first. core_functions.sh(){ - functionfile="${FUNCNAME}" + functionfile="${FUNCNAME[0]}" fn_bootstrap_fetch_file_github "lgsm/functions" "core_functions.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" } @@ -82,27 +81,25 @@ fn_bootstrap_fetch_file(){ if [ ! -d "${local_filedir}" ]; then mkdir -p "${local_filedir}" fi - # Defines curl path. - curlpath=$(command -v curl 2>/dev/null) # If curl exists download file. - if [ "$(basename "${curlpath}")" == "curl" ]; then + if [ -n "$(command -v curl 2>/dev/null)" ]; then # Trap to remove part downloaded files. echo -en " fetching ${local_filename}...\c" - curlcmd=$(${curlpath} -s --fail -L -o "${local_filedir}/${local_filename}" "${remote_fileurl}" 2>&1) + curlcmd=$(curl -s --fail -L -o "${local_filedir}/${local_filename}" "${remote_fileurl}" 2>&1) local exitcode=$? if [ ${exitcode} -ne 0 ]; then echo -e "FAIL" if [ -f "${lgsmlog}" ]; then echo -e "${remote_fileurl}" | tee -a "${lgsmlog}" - echo "${curlcmd}" | tee -a "${lgsmlog}" + echo -e "${curlcmd}" | tee -a "${lgsmlog}" fi exit 1 else echo -e "OK" fi else - echo "[ FAIL ] Curl is not installed" + echo -e "[ FAIL ] Curl is not installed" exit 1 fi # Make file chmodx if chmodx is set. @@ -114,6 +111,7 @@ fn_bootstrap_fetch_file(){ if [ -f "${local_filedir}/${local_filename}" ]; then # Run file if run is set. if [ "${run}" == "run" ]; then + # shellcheck source=/dev/null source "${local_filedir}/${local_filename}" fi fi @@ -138,14 +136,13 @@ fn_bootstrap_fetch_file_github(){ # Installer menu. fn_print_center() { - columns="$(tput cols)" - line="$@" + columns=$(tput cols) + line="$*" printf "%*s\n" $(( (${#line} + columns) / 2)) "${line}" } fn_print_horizontal(){ - char="${1:-=}" - printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' "${char}" + printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' "=" } # Bash menu. @@ -160,7 +157,7 @@ fn_install_menu_bash() { fn_print_horizontal menu_options=() while read -r line || [[ -n "${line}" ]]; do - var=$(echo "${line}" | awk -F "," '{print $2 " - " $3}') + var=$(echo -e "${line}" | awk -F "," '{print $2 " - " $3}') menu_options+=( "${var}" ) done < "${options}" menu_options+=( "Cancel" ) @@ -185,8 +182,8 @@ fn_install_menu_whiptail() { IFS="," menu_options=() while read -r line; do - key=$(echo "${line}" | awk -F "," '{print $3}') - val=$(echo "${line}" | awk -F "," '{print $2}') + key=$(echo -e "${line}" | awk -F "," '{print $3}') + val=$(echo -e "${line}" | awk -F "," '{print $2}') menu_options+=( "${val//\"}" "${key//\"}" ) done < "${options}" OPTION=$(${menucmd} --title "${title}" --menu "${caption}" "${height}" "${width}" "${menuheight}" "${menu_options[@]}" 3>&1 1>&2 2>&3) @@ -231,10 +228,10 @@ fn_server_info(){ fn_install_getopt(){ userinput="empty" - echo "Usage: $0 [option]" + echo -e "Usage: $0 [option]" echo -e "" - echo "Installer - Linux Game Server Managers - Version ${version}" - echo "https://linuxgsm.com" + echo -e "Installer - Linux Game Server Managers - Version ${version}" + echo -e "https://linuxgsm.com" echo -e "" echo -e "Commands" echo -e "install\t\t| Select server to install." @@ -248,22 +245,22 @@ fn_install_file(){ if [ -e "${local_filename}" ]; then i=2 while [ -e "${local_filename}-${i}" ] ; do - let i++ + (( i++ )) done local_filename="${local_filename}-${i}" fi cp -R "${selfname}" "${local_filename}" sed -i -e "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${local_filename}" sed -i -e "s/gameservername=\"core\"/gameservername=\"${gameservername}\"/g" "${local_filename}" - echo "Installed ${gamename} server as ${local_filename}" - echo "" + echo -e "Installed ${gamename} server as ${local_filename}" + echo -e "" if [ ! -d "${serverfiles}" ]; then - echo "./${local_filename} install" + echo -e "./${local_filename} install" else - echo "Remember to check server ports" - echo "./${local_filename} details" + echo -e "Remember to check server ports" + echo -e "./${local_filename} details" fi - echo "" + echo -e "" exit } @@ -271,11 +268,11 @@ fn_install_file(){ if [ "$(whoami)" == "root" ]; then if [ "${userinput}" == "install" ]||[ "${userinput}" == "auto-install" ]||[ "${userinput}" == "i" ]||[ "${userinput}" == "ai" ]; then if [ "${shortname}" == "core" ]; then - echo "[ FAIL ] Do NOT run this script as root!" + echo -e "[ FAIL ] Do NOT run this script as root!" exit 1 fi elif [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" + echo -e "[ FAIL ] Do NOT run this script as root!" exit 1 else core_functions.sh @@ -286,7 +283,7 @@ fi # Download the latest serverlist. This is the complete list of all supported servers. fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" if [ ! -f "${serverlist}" ]; then - echo "[ FAIL ] serverlist.csv could not be loaded." + echo -e "[ FAIL ] serverlist.csv could not be loaded." exit 1 fi @@ -305,18 +302,18 @@ if [ "${shortname}" == "core" ]; then if [ "${result}" == "${gameservername}" ]; then fn_install_file elif [ "${result}" == "" ]; then - echo "Install canceled" + echo -e "Install canceled" else - echo "[ FAIL ] menu result does not match gameservername" - echo "result: ${result}" - echo "gameservername: ${gameservername}" + echo -e "[ FAIL ] menu result does not match gameservername" + echo -e "result: ${result}" + echo -e "gameservername: ${gameservername}" fi elif [ -n "${userinput}" ]; then fn_server_info if [ "${userinput}" == "${gameservername}" ]||[ "${userinput}" == "${gamename}" ]||[ "${userinput}" == "${shortname}" ]; then fn_install_file else - echo "[ FAIL ] unknown game server" + echo -e "[ FAIL ] unknown game server" fi else fn_install_getopt @@ -368,11 +365,11 @@ else source "${configdirserver}/common.cfg" fi # Load the instance.cfg config. If missing download it. - if [ ! -f "${configdirserver}/${servicename}.cfg" ]; then - fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${servicename}.cfg" "nochmodx" "norun" "noforcedl" "nomd5" - source "${configdirserver}/${servicename}.cfg" + if [ ! -f "${configdirserver}/${selfname}.cfg" ]; then + fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5" + source "${configdirserver}/${selfname}.cfg" else - source "${configdirserver}/${servicename}.cfg" + source "${configdirserver}/${selfname}.cfg" fi # Load the linuxgsm.sh in to tmpdir. If missing download it. @@ -410,9 +407,9 @@ fn_currentstatus_ts3(){ fn_setstatus(){ fn_currentstatus_tmux echo"" - echo "Required status: ${requiredstatus}" + echo -e "Required status: ${requiredstatus}" counter=0 - echo "Current status: ${currentstatus}" + echo -e "Current status: ${currentstatus}" while [ "${requiredstatus}" != "${currentstatus}" ]; do counter=$((counter+1)) fn_currentstatus_tmux @@ -425,16 +422,16 @@ fn_setstatus(){ fi if [ "${counter}" -gt "5" ]; then currentstatus="FAIL" - echo "Current status: ${currentstatus}" - echo "" - echo "Unable to start or stop server." + echo -e "Current status: ${currentstatus}" + echo -e "" + echo -e "Unable to start or stop server." exit 1 fi done echo -en "New status: ${currentstatus}\\r" echo -e "\n" - echo "Test starting:" - echo "" + echo -e "Test starting:" + echo -e "" } # End of every test will expect the result to either pass or fail @@ -442,88 +439,88 @@ fn_setstatus(){ # if expecting a pass fn_test_result_pass(){ if [ $? != 0 ]; then - echo "=================================" - echo "Expected result: PASS" - echo "Actual result: FAIL" + echo -e "=================================" + echo -e "Expected result: PASS" + echo -e "Actual result: FAIL" fn_print_fail_nl "TEST FAILED" exitcode=1 core_exit.sh else - echo "=================================" - echo "Expected result: PASS" - echo "Actual result: PASS" + echo -e "=================================" + echo -e "Expected result: PASS" + echo -e "Actual result: PASS" fn_print_ok_nl "TEST PASSED" - echo "" + echo -e "" fi } # if expecting a fail fn_test_result_fail(){ if [ $? == 0 ]; then - echo "=================================" - echo "Expected result: FAIL" - echo "Actual result: PASS" + echo -e "=================================" + echo -e "Expected result: FAIL" + echo -e "Actual result: PASS" fn_print_fail_nl "TEST FAILED" exitcode=1 core_exit.sh else - echo "=================================" - echo "Expected result: FAIL" - echo "Actual result: FAIL" + echo -e "=================================" + echo -e "Expected result: FAIL" + echo -e "Actual result: FAIL" fn_print_ok_nl "TEST PASSED" - echo "" + echo -e "" fi } # test result n/a fn_test_result_na(){ - echo "=================================" - echo "Expected result: N/A" - echo "Actual result: N/A" + echo -e "=================================" + echo -e "Expected result: N/A" + echo -e "Actual result: N/A" fn_print_fail_nl "TEST N/A" } -echo "=================================" -echo "Travis CI Tests" -echo "Linux Game Server Manager" -echo "by Daniel Gibbs" -echo "Contributors: http://goo.gl/qLmitD" -echo "https://linuxgsm.com" -echo "=================================" -echo "" -echo "=================================" -echo "Server Tests" -echo "Using: ${gamename}" -echo "Testing Branch: $TRAVIS_BRANCH" -echo "=================================" - -echo "" -echo "0.0 - Pre-test Tasks" -echo "==================================================================" -echo "Description:" -echo "Create log dir's" -echo "" - -echo "" -echo "0.1 - Create log dir's" -echo "=================================" -echo "" +echo -e "=================================" +echo -e "Travis CI Tests" +echo -e "Linux Game Server Manager" +echo -e "by Daniel Gibbs" +echo -e "Contributors: http://goo.gl/qLmitD" +echo -e "https://linuxgsm.com" +echo -e "=================================" +echo -e "" +echo -e "=================================" +echo -e "Server Tests" +echo -e "Using: ${gamename}" +echo -e "Testing Branch: $TRAVIS_BRANCH" +echo -e "=================================" + +echo -e "" +echo -e "0.0 - Pre-test Tasks" +echo -e "==================================================================" +echo -e "Description:" +echo -e "Create log dir's" +echo -e "" + +echo -e "" +echo -e "0.1 - Create log dir's" +echo -e "=================================" +echo -e "" ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x install_logs.sh ) -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "0.2 - Enable dev-debug" -echo "=================================" -echo "Description:" -echo "Enable dev-debug" -echo "" +echo -e "" +echo -e "0.2 - Enable dev-debug" +echo -e "=================================" +echo -e "Description:" +echo -e "Enable dev-debug" +echo -e "" ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" @@ -531,21 +528,21 @@ echo "" command_dev_debug.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "1.0 - Pre-install tests" -echo "==================================================================" -echo "" - -echo "1.1 - start - no files" -echo "=================================" -echo "Description:" -echo "test script reaction to missing server files." -echo "Command: ./${gameservername} start" -echo "" +echo -e "" +echo -e "1.0 - Pre-install tests" +echo -e "==================================================================" +echo -e "" + +echo -e "1.1 - start - no files" +echo -e "=================================" +echo -e "Description:" +echo -e "test script reaction to missing server files." +echo -e "Command: ./${gameservername} start" +echo -e "" # Allows for testing not on Travis CI if [ ! -v TRAVIS ]; then ( @@ -556,20 +553,20 @@ if [ ! -v TRAVIS ]; then ) fn_test_result_fail else - echo "Test bypassed" + echo -e "Test bypassed" fi -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "1.2 - getopt" -echo "=================================" -echo "Description:" -echo "displaying options messages." -echo "Command: ./${gameservername}" -echo "" +echo -e "" +echo -e "1.2 - getopt" +echo -e "=================================" +echo -e "Description:" +echo -e "displaying options messages." +echo -e "Command: ./${gameservername}" +echo -e "" ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" @@ -577,17 +574,17 @@ echo "" core_getopt.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "1.3 - getopt with incorrect args" -echo "=================================" -echo "Description:" -echo "displaying options messages." -echo "Command: ./${gameservername} abc123" -echo "" +echo -e "" +echo -e "1.3 - getopt with incorrect args" +echo -e "=================================" +echo -e "Description:" +echo -e "displaying options messages." +echo -e "Command: ./${gameservername} abc123" +echo -e "" getopt="abc123" ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -596,20 +593,20 @@ getopt="abc123" core_getopt.sh ) fn_test_result_fail -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "2.0 - Installation" -echo "==================================================================" +echo -e "" +echo -e "2.0 - Installation" +echo -e "==================================================================" -echo "" -echo "2.0 - install" -echo "=================================" -echo "Description:" -echo "install ${gamename} server." -echo "Command: ./${gameservername} auto-install" +echo -e "" +echo -e "2.0 - install" +echo -e "=================================" +echo -e "Description:" +echo -e "install ${gamename} server." +echo -e "Command: ./${gameservername} auto-install" ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" @@ -617,20 +614,20 @@ echo "Command: ./${gameservername} auto-install" fn_autoinstall ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "3.0 - Start/Stop/Restart Tests" -echo "==================================================================" +echo -e "" +echo -e "3.0 - Start/Stop/Restart Tests" +echo -e "==================================================================" -echo "" -echo "3.1 - start" -echo "=================================" -echo "Description:" -echo "start ${gamename} server." -echo "Command: ./${gameservername} start" +echo -e "" +echo -e "3.1 - start" +echo -e "=================================" +echo -e "Description:" +echo -e "start ${gamename} server." +echo -e "Command: ./${gameservername} start" requiredstatus="OFFLINE" fn_setstatus ( @@ -640,16 +637,16 @@ fn_setstatus command_start.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "3.2 - start - online" -echo "=================================" -echo "Description:" -echo "start ${gamename} server while already running." -echo "Command: ./${gameservername} start" +echo -e "" +echo -e "3.2 - start - online" +echo -e "=================================" +echo -e "Description:" +echo -e "start ${gamename} server while already running." +echo -e "Command: ./${gameservername} start" requiredstatus="ONLINE" fn_setstatus ( @@ -659,16 +656,16 @@ fn_setstatus command_start.sh ) fn_test_result_fail -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "3.3 - start - updateonstart" -echo "=================================" -echo "Description:" -echo "will update server on start." -echo "Command: ./${gameservername} start" +echo -e "" +echo -e "3.3 - start - updateonstart" +echo -e "=================================" +echo -e "Description:" +echo -e "will update server on start." +echo -e "Command: ./${gameservername} start" requiredstatus="OFFLINE" fn_setstatus ( @@ -678,16 +675,16 @@ fn_setstatus updateonstart="on";command_start.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "3.4 - stop" -echo "=================================" -echo "Description:" -echo "stop ${gamename} server." -echo "Command: ./${gameservername} stop" +echo -e "" +echo -e "3.4 - stop" +echo -e "=================================" +echo -e "Description:" +echo -e "stop ${gamename} server." +echo -e "Command: ./${gameservername} stop" requiredstatus="ONLINE" fn_setstatus ( @@ -697,16 +694,16 @@ fn_setstatus command_stop.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "3.5 - stop - offline" -echo "=================================" -echo "Description:" -echo "stop ${gamename} server while already stopped." -echo "Command: ./${gameservername} stop" +echo -e "" +echo -e "3.5 - stop - offline" +echo -e "=================================" +echo -e "Description:" +echo -e "stop ${gamename} server while already stopped." +echo -e "Command: ./${gameservername} stop" requiredstatus="OFFLINE" fn_setstatus ( @@ -716,16 +713,16 @@ fn_setstatus command_stop.sh ) fn_test_result_fail -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "3.6 - restart" -echo "=================================" -echo "Description:" -echo "restart ${gamename}." -echo "Command: ./${gameservername} restart" +echo -e "" +echo -e "3.6 - restart" +echo -e "=================================" +echo -e "Description:" +echo -e "restart ${gamename}." +echo -e "Command: ./${gameservername} restart" requiredstatus="ONLINE" fn_setstatus ( @@ -735,16 +732,16 @@ fn_setstatus command_restart.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "3.7 - restart - offline" -echo "=================================" -echo "Description:" -echo "restart ${gamename} while already stopped." -echo "Command: ./${gameservername} restart" +echo -e "" +echo -e "3.7 - restart - offline" +echo -e "=================================" +echo -e "Description:" +echo -e "restart ${gamename} while already stopped." +echo -e "Command: ./${gameservername} restart" requiredstatus="OFFLINE" fn_setstatus ( @@ -754,20 +751,20 @@ fn_setstatus command_restart.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "4.0 - Update Tests" -echo "==================================================================" +echo -e "" +echo -e "4.0 - Update Tests" +echo -e "==================================================================" -echo "" -echo "4.1 - update" -echo "=================================" -echo "Description:" -echo "check for updates." -echo "Command: ./${gameservername} update" +echo -e "" +echo -e "4.1 - update" +echo -e "=================================" +echo -e "Description:" +echo -e "check for updates." +echo -e "Command: ./${gameservername} update" requiredstatus="OFFLINE" fn_setstatus ( @@ -777,23 +774,23 @@ fn_setstatus command_update.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "5.0 - Monitor Tests" -echo "==================================================================" -echo "" -echo "Server IP - Port: ${ip}:${port}" -echo "Server IP - Query Port: ${ip}:${queryport}" - -echo "" -echo "5.1 - monitor - online" -echo "=================================" -echo "Description:" -echo "run monitor server while already running." -echo "Command: ./${gameservername} monitor" +echo -e "" +echo -e "5.0 - Monitor Tests" +echo -e "==================================================================" +echo -e "" +echo -e "Server IP - Port: ${ip}:${port}" +echo -e "Server IP - Query Port: ${ip}:${queryport}" + +echo -e "" +echo -e "5.1 - monitor - online" +echo -e "=================================" +echo -e "Description:" +echo -e "run monitor server while already running." +echo -e "Command: ./${gameservername} monitor" requiredstatus="ONLINE" fn_setstatus ( @@ -803,16 +800,16 @@ fn_setstatus command_monitor.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "5.2 - monitor - offline - with lockfile" -echo "=================================" -echo "Description:" -echo "run monitor while server is offline with lockfile." -echo "Command: ./${gameservername} monitor" +echo -e "" +echo -e "5.2 - monitor - offline - with lockfile" +echo -e "=================================" +echo -e "Description:" +echo -e "run monitor while server is offline with lockfile." +echo -e "Command: ./${gameservername} monitor" requiredstatus="OFFLINE" fn_setstatus fn_print_info_nl "creating lockfile." @@ -824,16 +821,16 @@ date '+%s' > "${rootdir}/${lockselfname}" command_monitor.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "5.3 - monitor - offline - no lockfile" -echo "=================================" -echo "Description:" -echo "run monitor while server is offline with no lockfile." -echo "Command: ./${gameservername} monitor" +echo -e "" +echo -e "5.3 - monitor - offline - no lockfile" +echo -e "=================================" +echo -e "Description:" +echo -e "run monitor while server is offline with no lockfile." +echo -e "Command: ./${gameservername} monitor" requiredstatus="OFFLINE" fn_setstatus ( @@ -843,16 +840,16 @@ fn_setstatus command_monitor.sh ) fn_test_result_fail -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "5.4 - test-alert" -echo "=================================" -echo "Description:" -echo "run monitor while server is offline with no lockfile." -echo "Command: ./${gameservername} test-alert" +echo -e "" +echo -e "5.4 - test-alert" +echo -e "=================================" +echo -e "Description:" +echo -e "run monitor while server is offline with no lockfile." +echo -e "Command: ./${gameservername} test-alert" requiredstatus="OFFLINE" fn_setstatus ( @@ -862,20 +859,20 @@ fn_setstatus command_test_alert.sh ) fn_test_result_fail -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "6.0 - Details Tests" -echo "==================================================================" +echo -e "" +echo -e "6.0 - Details Tests" +echo -e "==================================================================" -echo "" -echo "6.1 - details" -echo "=================================" -echo "Description:" -echo "display details." -echo "Command: ./${gameservername} details" +echo -e "" +echo -e "6.1 - details" +echo -e "=================================" +echo -e "Description:" +echo -e "display details." +echo -e "Command: ./${gameservername} details" requiredstatus="ONLINE" fn_setstatus ( @@ -885,16 +882,16 @@ fn_setstatus command_details.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "6.2 - postdetails" -echo "=================================" -echo "Description:" -echo "post details." -echo "Command: ./${gameservername} postdetails" +echo -e "" +echo -e "6.2 - postdetails" +echo -e "=================================" +echo -e "Description:" +echo -e "post details." +echo -e "Command: ./${gameservername} postdetails" requiredstatus="ONLINE" fn_setstatus ( @@ -904,39 +901,39 @@ fn_setstatus command_postdetails.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "7.0 - Backup Tests" -echo "==================================================================" +echo -e "" +echo -e "7.0 - Backup Tests" +echo -e "==================================================================" -echo "" -echo "7.1 - backup" -echo "=================================" -echo "Description:" -echo "run a backup." -echo "Command: ./${gameservername} backup" +echo -e "" +echo -e "7.1 - backup" +echo -e "=================================" +echo -e "Description:" +echo -e "run a backup." +echo -e "Command: ./${gameservername} backup" requiredstatus="ONLINE" fn_setstatus -echo "test de-activated until issue #1839 fixed" +echo -e "test de-activated until issue #1839 fixed" #(command_backup.sh) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "8.0 - Development Tools Tests" -echo "==================================================================" +echo -e "" +echo -e "8.0 - Development Tools Tests" +echo -e "==================================================================" -echo "" -echo "8.1 - dev - detect glibc" -echo "=================================" -echo "Description:" -echo "detect glibc." -echo "Command: ./${gameservername} detect-glibc" +echo -e "" +echo -e "8.1 - dev - detect glibc" +echo -e "=================================" +echo -e "Description:" +echo -e "detect glibc." +echo -e "Command: ./${gameservername} detect-glibc" requiredstatus="ONLINE" fn_setstatus ( @@ -946,16 +943,16 @@ fn_setstatus command_dev_detect_glibc.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "8.2 - dev - detect ldd" -echo "=================================" -echo "Description:" -echo "detect ldd." -echo "Command: ./${gameservername} detect-ldd" +echo -e "" +echo -e "8.2 - dev - detect ldd" +echo -e "=================================" +echo -e "Description:" +echo -e "detect ldd." +echo -e "Command: ./${gameservername} detect-ldd" requiredstatus="ONLINE" fn_setstatus ( @@ -965,16 +962,16 @@ fn_setstatus command_dev_detect_ldd.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "8.3 - dev - detect deps" -echo "=================================" -echo "Description:" -echo "detect dependencies." -echo "Command: ./${gameservername} detect-deps" +echo -e "" +echo -e "8.3 - dev - detect deps" +echo -e "=================================" +echo -e "Description:" +echo -e "detect dependencies." +echo -e "Command: ./${gameservername} detect-deps" requiredstatus="ONLINE" fn_setstatus ( @@ -984,16 +981,16 @@ fn_setstatus command_dev_detect_deps.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "8.4 - dev - query-raw" -echo "=================================" -echo "Description:" -echo "raw query output." -echo "Command: ./${gameservername} query-raw" +echo -e "" +echo -e "8.4 - dev - query-raw" +echo -e "=================================" +echo -e "Description:" +echo -e "raw query output." +echo -e "Command: ./${gameservername} query-raw" requiredstatus="ONLINE" fn_setstatus ( @@ -1003,15 +1000,15 @@ fn_setstatus command_dev_query_raw.sh ) fn_test_result_na -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "=================================" -echo "Server Tests - Complete!" -echo "Using: ${gamename}" -echo "=================================" +echo -e "" +echo -e "=================================" +echo -e "Server Tests - Complete!" +echo -e "Using: ${gamename}" +echo -e "=================================" requiredstatus="OFFLINE" fn_setstatus fn_print_info "Tidying up directories." diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 8aa9e09cc..780d01f4f 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -23,10 +23,9 @@ fi version="v19.9.0" shortname="jc2" gameservername="jc2server" -rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" -selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -servicename="${selfname}" -lockselfname=".${servicename}.lock" +rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") +selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") +lockselfname=".${selfname}.lock" lgsmdir="${rootdir}/lgsm" logdir="${rootdir}/log" lgsmlogdir="${logdir}/lgsm" @@ -48,7 +47,7 @@ if [ ! -v TRAVIS ]; then TRAVIS_BRANCH="develop" TRAVIS_BUILD_DIR="${rootdir}" else - servicename="travis" + selfname="travis" travistest="1" fi @@ -61,7 +60,7 @@ githubbranch="${TRAVIS_BRANCH}" # Core function that is required first. core_functions.sh(){ - functionfile="${FUNCNAME}" + functionfile="${FUNCNAME[0]}" fn_bootstrap_fetch_file_github "lgsm/functions" "core_functions.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" } @@ -80,27 +79,25 @@ fn_bootstrap_fetch_file(){ if [ ! -d "${local_filedir}" ]; then mkdir -p "${local_filedir}" fi - # Defines curl path. - curlpath=$(command -v curl 2>/dev/null) # If curl exists download file. - if [ "$(basename "${curlpath}")" == "curl" ]; then + if [ "$(command -v curl 2>/dev/null)" ]; then # Trap to remove part downloaded files. echo -en " fetching ${local_filename}...\c" - curlcmd=$(${curlpath} -s --fail -L -o "${local_filedir}/${local_filename}" "${remote_fileurl}" 2>&1) + curlcmd=$(curl -s --fail -L -o "${local_filedir}/${local_filename}" "${remote_fileurl}" 2>&1) local exitcode=$? if [ ${exitcode} -ne 0 ]; then echo -e "FAIL" if [ -f "${lgsmlog}" ]; then echo -e "${remote_fileurl}" | tee -a "${lgsmlog}" - echo "${curlcmd}" | tee -a "${lgsmlog}" + echo -e "${curlcmd}" | tee -a "${lgsmlog}" fi exit 1 else echo -e "OK" fi else - echo "[ FAIL ] Curl is not installed" + echo -e "[ FAIL ] Curl is not installed" exit 1 fi # Make file chmodx if chmodx is set. @@ -112,6 +109,7 @@ fn_bootstrap_fetch_file(){ if [ -f "${local_filedir}/${local_filename}" ]; then # Run file if run is set. if [ "${run}" == "run" ]; then + # shellcheck source=/dev/null source "${local_filedir}/${local_filename}" fi fi @@ -136,14 +134,13 @@ fn_bootstrap_fetch_file_github(){ # Installer menu. fn_print_center() { - columns="$(tput cols)" - line="$@" + columns=$(tput cols) + line="$*" printf "%*s\n" $(( (${#line} + columns) / 2)) "${line}" } fn_print_horizontal(){ - char="${1:-=}" - printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' "${char}" + printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' "=" } # Bash menu. @@ -158,7 +155,7 @@ fn_install_menu_bash() { fn_print_horizontal menu_options=() while read -r line || [[ -n "${line}" ]]; do - var=$(echo "${line}" | awk -F "," '{print $2 " - " $3}') + var=$(echo -e "${line}" | awk -F "," '{print $2 " - " $3}') menu_options+=( "${var}" ) done < "${options}" menu_options+=( "Cancel" ) @@ -183,8 +180,8 @@ fn_install_menu_whiptail() { IFS="," menu_options=() while read -r line; do - key=$(echo "${line}" | awk -F "," '{print $3}') - val=$(echo "${line}" | awk -F "," '{print $2}') + key=$(echo -e "${line}" | awk -F "," '{print $3}') + val=$(echo -e "${line}" | awk -F "," '{print $2}') menu_options+=( "${val//\"}" "${key//\"}" ) done < "${options}" OPTION=$(${menucmd} --title "${title}" --menu "${caption}" "${height}" "${width}" "${menuheight}" "${menu_options[@]}" 3>&1 1>&2 2>&3) @@ -229,10 +226,10 @@ fn_server_info(){ fn_install_getopt(){ userinput="empty" - echo "Usage: $0 [option]" + echo -e "Usage: $0 [option]" echo -e "" - echo "Installer - Linux Game Server Managers - Version ${version}" - echo "https://linuxgsm.com" + echo -e "Installer - Linux Game Server Managers - Version ${version}" + echo -e "https://linuxgsm.com" echo -e "" echo -e "Commands" echo -e "install\t\t| Select server to install." @@ -253,15 +250,15 @@ fn_install_file(){ cp -R "${selfname}" "${local_filename}" sed -i -e "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${local_filename}" sed -i -e "s/gameservername=\"core\"/gameservername=\"${gameservername}\"/g" "${local_filename}" - echo "Installed ${gamename} server as ${local_filename}" - echo "" + echo -e "Installed ${gamename} server as ${local_filename}" + echo -e "" if [ ! -d "${serverfiles}" ]; then - echo "./${local_filename} install" + echo -e "./${local_filename} install" else - echo "Remember to check server ports" - echo "./${local_filename} details" + echo -e "Remember to check server ports" + echo -e "./${local_filename} details" fi - echo "" + echo -e "" exit } @@ -269,11 +266,11 @@ fn_install_file(){ if [ "$(whoami)" == "root" ]; then if [ "${userinput}" == "install" ]||[ "${userinput}" == "auto-install" ]||[ "${userinput}" == "i" ]||[ "${userinput}" == "ai" ]; then if [ "${shortname}" == "core" ]; then - echo "[ FAIL ] Do NOT run this script as root!" + echo -e "[ FAIL ] Do NOT run this script as root!" exit 1 fi elif [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" + echo -e "[ FAIL ] Do NOT run this script as root!" exit 1 else core_functions.sh @@ -286,7 +283,7 @@ if [ "${shortname}" == "core" ]; then # Download the latest serverlist. This is the complete list of all supported servers. fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" if [ ! -f "${serverlist}" ]; then - echo "[ FAIL ] serverlist.csv could not be loaded." + echo -e "[ FAIL ] serverlist.csv could not be loaded." exit 1 fi @@ -303,18 +300,18 @@ if [ "${shortname}" == "core" ]; then if [ "${result}" == "${gameservername}" ]; then fn_install_file elif [ "${result}" == "" ]; then - echo "Install canceled" + echo -e "Install canceled" else - echo "[ FAIL ] menu result does not match gameservername" - echo "result: ${result}" - echo "gameservername: ${gameservername}" + echo -e "[ FAIL ] menu result does not match gameservername" + echo -e "result: ${result}" + echo -e "gameservername: ${gameservername}" fi elif [ -n "${userinput}" ]; then fn_server_info if [ "${userinput}" == "${gameservername}" ]||[ "${userinput}" == "${gamename}" ]||[ "${userinput}" == "${shortname}" ]; then fn_install_file else - echo "[ FAIL ] unknown game server" + echo -e "[ FAIL ] unknown game server" fi else fn_install_getopt @@ -366,11 +363,11 @@ else source "${configdirserver}/common.cfg" fi # Load the instance.cfg config. If missing download it. - if [ ! -f "${configdirserver}/${servicename}.cfg" ]; then - fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${servicename}.cfg" "nochmodx" "norun" "noforcedl" "nomd5" - source "${configdirserver}/${servicename}.cfg" + if [ ! -f "${configdirserver}/${selfname}.cfg" ]; then + fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5" + source "${configdirserver}/${selfname}.cfg" else - source "${configdirserver}/${servicename}.cfg" + source "${configdirserver}/${selfname}.cfg" fi # Load the linuxgsm.sh in to tmpdir. If missing download it. @@ -408,9 +405,9 @@ fn_currentstatus_ts3(){ fn_setstatus(){ fn_currentstatus_tmux echo"" - echo "Required status: ${requiredstatus}" + echo -e "Required status: ${requiredstatus}" counter=0 - echo "Current status: ${currentstatus}" + echo -e "Current status: ${currentstatus}" while [ "${requiredstatus}" != "${currentstatus}" ]; do counter=$((counter+1)) fn_currentstatus_tmux @@ -423,16 +420,16 @@ fn_setstatus(){ fi if [ "${counter}" -gt "5" ]; then currentstatus="FAIL" - echo "Current status: ${currentstatus}" - echo "" - echo "Unable to start or stop server." + echo -e "Current status: ${currentstatus}" + echo -e "" + echo -e "Unable to start or stop server." exit 1 fi done echo -en "New status: ${currentstatus}\\r" echo -e "\n" - echo "Test starting:" - echo "" + echo -e "Test starting:" + echo -e "" } # End of every test will expect the result to either pass or fail @@ -440,88 +437,88 @@ fn_setstatus(){ # if expecting a pass fn_test_result_pass(){ if [ $? != 0 ]; then - echo "=================================" - echo "Expected result: PASS" - echo "Actual result: FAIL" + echo -e "=================================" + echo -e "Expected result: PASS" + echo -e "Actual result: FAIL" fn_print_fail_nl "TEST FAILED" exitcode=1 core_exit.sh else - echo "=================================" - echo "Expected result: PASS" - echo "Actual result: PASS" + echo -e "=================================" + echo -e "Expected result: PASS" + echo -e "Actual result: PASS" fn_print_ok_nl "TEST PASSED" - echo "" + echo -e "" fi } # if expecting a fail fn_test_result_fail(){ if [ $? == 0 ]; then - echo "=================================" - echo "Expected result: FAIL" - echo "Actual result: PASS" + echo -e "=================================" + echo -e "Expected result: FAIL" + echo -e "Actual result: PASS" fn_print_fail_nl "TEST FAILED" exitcode=1 core_exit.sh else - echo "=================================" - echo "Expected result: FAIL" - echo "Actual result: FAIL" + echo -e "=================================" + echo -e "Expected result: FAIL" + echo -e "Actual result: FAIL" fn_print_ok_nl "TEST PASSED" - echo "" + echo -e "" fi } # test result n/a fn_test_result_na(){ - echo "=================================" - echo "Expected result: N/A" - echo "Actual result: N/A" + echo -e "=================================" + echo -e "Expected result: N/A" + echo -e "Actual result: N/A" fn_print_fail_nl "TEST N/A" } -echo "=================================" -echo "Travis CI Tests" -echo "Linux Game Server Manager" -echo "by Daniel Gibbs" -echo "Contributors: http://goo.gl/qLmitD" -echo "https://linuxgsm.com" -echo "=================================" -echo "" -echo "=================================" -echo "Server Tests" -echo "Using: ${gamename}" -echo "Testing Branch: $TRAVIS_BRANCH" -echo "=================================" - -echo "" -echo "0.0 - Pre-test Tasks" -echo "==================================================================" -echo "Description:" -echo "Create log dir's" -echo "" - -echo "" -echo "0.1 - Create log dir's" -echo "=================================" -echo "" +echo -e "=================================" +echo -e "Travis CI Tests" +echo -e "Linux Game Server Manager" +echo -e "by Daniel Gibbs" +echo -e "Contributors: http://goo.gl/qLmitD" +echo -e "https://linuxgsm.com" +echo -e "=================================" +echo -e "" +echo -e "=================================" +echo -e "Server Tests" +echo -e "Using: ${gamename}" +echo -e "Testing Branch: $TRAVIS_BRANCH" +echo -e "=================================" + +echo -e "" +echo -e "0.0 - Pre-test Tasks" +echo -e "==================================================================" +echo -e "Description:" +echo -e "Create log dir's" +echo -e "" + +echo -e "" +echo -e "0.1 - Create log dir's" +echo -e "=================================" +echo -e "" ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x install_logs.sh ) -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "0.2 - Enable dev-debug" -echo "=================================" -echo "Description:" -echo "Enable dev-debug" -echo "" +echo -e "" +echo -e "0.2 - Enable dev-debug" +echo -e "=================================" +echo -e "Description:" +echo -e "Enable dev-debug" +echo -e "" ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" @@ -529,21 +526,21 @@ echo "" command_dev_debug.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "1.0 - Pre-install tests" -echo "==================================================================" -echo "" - -echo "1.1 - start - no files" -echo "=================================" -echo "Description:" -echo "test script reaction to missing server files." -echo "Command: ./${gameservername} start" -echo "" +echo -e "" +echo -e "1.0 - Pre-install tests" +echo -e "==================================================================" +echo -e "" + +echo -e "1.1 - start - no files" +echo -e "=================================" +echo -e "Description:" +echo -e "test script reaction to missing server files." +echo -e "Command: ./${gameservername} start" +echo -e "" # Allows for testing not on Travis CI if [ ! -v TRAVIS ]; then ( @@ -554,20 +551,20 @@ if [ ! -v TRAVIS ]; then ) fn_test_result_fail else - echo "Test bypassed" + echo -e "Test bypassed" fi -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "1.2 - getopt" -echo "=================================" -echo "Description:" -echo "displaying options messages." -echo "Command: ./${gameservername}" -echo "" +echo -e "" +echo -e "1.2 - getopt" +echo -e "=================================" +echo -e "Description:" +echo -e "displaying options messages." +echo -e "Command: ./${gameservername}" +echo -e "" ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" @@ -575,17 +572,17 @@ echo "" core_getopt.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "1.3 - getopt with incorrect args" -echo "=================================" -echo "Description:" -echo "displaying options messages." -echo "Command: ./${gameservername} abc123" -echo "" +echo -e "" +echo -e "1.3 - getopt with incorrect args" +echo -e "=================================" +echo -e "Description:" +echo -e "displaying options messages." +echo -e "Command: ./${gameservername} abc123" +echo -e "" getopt="abc123" ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -594,20 +591,20 @@ getopt="abc123" core_getopt.sh ) fn_test_result_fail -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "2.0 - Installation" -echo "==================================================================" +echo -e "" +echo -e "2.0 - Installation" +echo -e "==================================================================" -echo "" -echo "2.0 - install" -echo "=================================" -echo "Description:" -echo "install ${gamename} server." -echo "Command: ./${gameservername} auto-install" +echo -e "" +echo -e "2.0 - install" +echo -e "=================================" +echo -e "Description:" +echo -e "install ${gamename} server." +echo -e "Command: ./${gameservername} auto-install" ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" @@ -615,20 +612,20 @@ echo "Command: ./${gameservername} auto-install" fn_autoinstall ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "3.0 - Start/Stop/Restart Tests" -echo "==================================================================" +echo -e "" +echo -e "3.0 - Start/Stop/Restart Tests" +echo -e "==================================================================" -echo "" -echo "3.1 - start" -echo "=================================" -echo "Description:" -echo "start ${gamename} server." -echo "Command: ./${gameservername} start" +echo -e "" +echo -e "3.1 - start" +echo -e "=================================" +echo -e "Description:" +echo -e "start ${gamename} server." +echo -e "Command: ./${gameservername} start" requiredstatus="OFFLINE" fn_setstatus ( @@ -638,16 +635,16 @@ fn_setstatus command_start.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "3.2 - start - online" -echo "=================================" -echo "Description:" -echo "start ${gamename} server while already running." -echo "Command: ./${gameservername} start" +echo -e "" +echo -e "3.2 - start - online" +echo -e "=================================" +echo -e "Description:" +echo -e "start ${gamename} server while already running." +echo -e "Command: ./${gameservername} start" requiredstatus="ONLINE" fn_setstatus ( @@ -657,16 +654,16 @@ fn_setstatus command_start.sh ) fn_test_result_fail -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "3.3 - start - updateonstart" -echo "=================================" -echo "Description:" -echo "will update server on start." -echo "Command: ./${gameservername} start" +echo -e "" +echo -e "3.3 - start - updateonstart" +echo -e "=================================" +echo -e "Description:" +echo -e "will update server on start." +echo -e "Command: ./${gameservername} start" requiredstatus="OFFLINE" fn_setstatus ( @@ -676,16 +673,16 @@ fn_setstatus updateonstart="on";command_start.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "3.4 - stop" -echo "=================================" -echo "Description:" -echo "stop ${gamename} server." -echo "Command: ./${gameservername} stop" +echo -e "" +echo -e "3.4 - stop" +echo -e "=================================" +echo -e "Description:" +echo -e "stop ${gamename} server." +echo -e "Command: ./${gameservername} stop" requiredstatus="ONLINE" fn_setstatus ( @@ -695,16 +692,16 @@ fn_setstatus command_stop.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "3.5 - stop - offline" -echo "=================================" -echo "Description:" -echo "stop ${gamename} server while already stopped." -echo "Command: ./${gameservername} stop" +echo -e "" +echo -e "3.5 - stop - offline" +echo -e "=================================" +echo -e "Description:" +echo -e "stop ${gamename} server while already stopped." +echo -e "Command: ./${gameservername} stop" requiredstatus="OFFLINE" fn_setstatus ( @@ -714,16 +711,16 @@ fn_setstatus command_stop.sh ) fn_test_result_fail -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "3.6 - restart" -echo "=================================" -echo "Description:" -echo "restart ${gamename}." -echo "Command: ./${gameservername} restart" +echo -e "" +echo -e "3.6 - restart" +echo -e "=================================" +echo -e "Description:" +echo -e "restart ${gamename}." +echo -e "Command: ./${gameservername} restart" requiredstatus="ONLINE" fn_setstatus ( @@ -733,16 +730,16 @@ fn_setstatus command_restart.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "3.7 - restart - offline" -echo "=================================" -echo "Description:" -echo "restart ${gamename} while already stopped." -echo "Command: ./${gameservername} restart" +echo -e "" +echo -e "3.7 - restart - offline" +echo -e "=================================" +echo -e "Description:" +echo -e "restart ${gamename} while already stopped." +echo -e "Command: ./${gameservername} restart" requiredstatus="OFFLINE" fn_setstatus ( @@ -752,20 +749,20 @@ fn_setstatus command_restart.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "4.0 - Update Tests" -echo "==================================================================" +echo -e "" +echo -e "4.0 - Update Tests" +echo -e "==================================================================" -echo "" -echo "4.1 - update" -echo "=================================" -echo "Description:" -echo "check for updates." -echo "Command: ./${gameservername} update" +echo -e "" +echo -e "4.1 - update" +echo -e "=================================" +echo -e "Description:" +echo -e "check for updates." +echo -e "Command: ./${gameservername} update" requiredstatus="OFFLINE" fn_setstatus ( @@ -775,16 +772,16 @@ fn_setstatus command_update.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "4.2 - update - change buildid" -echo "=================================" -echo "Description:" -echo "change the buildid tricking SteamCMD to update." -echo "Command: ./jc2server update" +echo -e "" +echo -e "4.2 - update - change buildid" +echo -e "=================================" +echo -e "Description:" +echo -e "change the buildid tricking SteamCMD to update." +echo -e "Command: ./jc2server update" requiredstatus="OFFLINE" fn_setstatus fn_print_info_nl "changed buildid to 0." @@ -796,16 +793,16 @@ sed -i 's/[0-9]\+/0/' "${serverfiles}/steamapps/appmanifest_${appid}.acf" command_update.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "4.3 - update - change buildid - online" -echo "=================================" -echo "Description:" -echo "change the buildid tricking SteamCMD to update server while already running." -echo "Command: ./jc2server update" +echo -e "" +echo -e "4.3 - update - change buildid - online" +echo -e "=================================" +echo -e "Description:" +echo -e "change the buildid tricking SteamCMD to update server while already running." +echo -e "Command: ./jc2server update" requiredstatus="ONLINE" fn_setstatus fn_print_info_nl "changed buildid to 0." @@ -817,16 +814,16 @@ sed -i 's/[0-9]\+/0/' "${serverfiles}/steamapps/appmanifest_${appid}.acf" command_update.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "4.4 - update - remove appmanifest file" -echo "=================================" -echo "Description:" -echo "removing appmanifest file will cause script to repair." -echo "Command: ./jc2server update" +echo -e "" +echo -e "4.4 - update - remove appmanifest file" +echo -e "=================================" +echo -e "Description:" +echo -e "removing appmanifest file will cause script to repair." +echo -e "Command: ./jc2server update" requiredstatus="OFFLINE" fn_setstatus fn_print_info_nl "removed appmanifest_${appid}.acf." @@ -838,16 +835,16 @@ rm --verbose "${serverfiles}/steamapps/appmanifest_${appid}.acf" command_update.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "4.5 - force-update" -echo "=================================" -echo "Description:" -echo "force-update bypassing update check." -echo "Command: ./jc2server force-update" +echo -e "" +echo -e "4.5 - force-update" +echo -e "=================================" +echo -e "Description:" +echo -e "force-update bypassing update check." +echo -e "Command: ./jc2server force-update" requiredstatus="OFFLINE" fn_setstatus ( @@ -857,16 +854,16 @@ fn_setstatus forceupdate=1;command_update.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "4.6 - force-update - online" -echo "=================================" -echo "Description:" -echo "force-update bypassing update check server while already running." -echo "Command: ./jc2server force-update" +echo -e "" +echo -e "4.6 - force-update - online" +echo -e "=================================" +echo -e "Description:" +echo -e "force-update bypassing update check server while already running." +echo -e "Command: ./jc2server force-update" requiredstatus="ONLINE" fn_setstatus ( @@ -876,16 +873,16 @@ fn_setstatus forceupdate=1;command_update.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "4.7 - validate" -echo "=================================" -echo "Description:" -echo "validate server files." -echo "Command: ./jc2server validate" +echo -e "" +echo -e "4.7 - validate" +echo -e "=================================" +echo -e "Description:" +echo -e "validate server files." +echo -e "Command: ./jc2server validate" requiredstatus="OFFLINE" fn_setstatus ( @@ -895,17 +892,17 @@ fn_setstatus command_validate.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "4.8 - validate - online" -echo "=================================" -echo "Description:" -echo "validate server files while server already running." -echo "" -echo "Command: ./jc2server validate" +echo -e "" +echo -e "4.8 - validate - online" +echo -e "=================================" +echo -e "Description:" +echo -e "validate server files while server already running." +echo -e "" +echo -e "Command: ./jc2server validate" requiredstatus="ONLINE" fn_setstatus ( @@ -915,37 +912,37 @@ fn_setstatus command_validate.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "Inserting IP address" -echo "=================================" -echo "Description:" -echo "Inserting Travis IP in to config." -echo "Allows monitor to work" +echo -e "" +echo -e "Inserting IP address" +echo -e "=================================" +echo -e "Description:" +echo -e "Inserting Travis IP in to config." +echo -e "Allows monitor to work" if [ "$(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) 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) fi sed -i "/BindIP/c\BindIP = \"${travisip}\"," "${serverfiles}/config.lua" -echo "IP: ${travisip}" - -echo "" -echo "5.0 - Monitor Tests" -echo "==================================================================" -echo "" -echo "Server IP - Port: ${ip}:${port}" -echo "Server IP - Query Port: ${ip}:${queryport}" - -echo "" -echo "5.1 - monitor - online" -echo "=================================" -echo "Description:" -echo "run monitor server while already running." -echo "Command: ./${gameservername} monitor" +echo -e "IP: ${travisip}" + +echo -e "" +echo -e "5.0 - Monitor Tests" +echo -e "==================================================================" +echo -e "" +echo -e "Server IP - Port: ${ip}:${port}" +echo -e "Server IP - Query Port: ${ip}:${queryport}" + +echo -e "" +echo -e "5.1 - monitor - online" +echo -e "=================================" +echo -e "Description:" +echo -e "run monitor server while already running." +echo -e "Command: ./${gameservername} monitor" requiredstatus="ONLINE" fn_setstatus ( @@ -955,16 +952,16 @@ fn_setstatus command_monitor.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "5.2 - monitor - offline - with lockfile" -echo "=================================" -echo "Description:" -echo "run monitor while server is offline with lockfile." -echo "Command: ./${gameservername} monitor" +echo -e "" +echo -e "5.2 - monitor - offline - with lockfile" +echo -e "=================================" +echo -e "Description:" +echo -e "run monitor while server is offline with lockfile." +echo -e "Command: ./${gameservername} monitor" requiredstatus="OFFLINE" fn_setstatus fn_print_info_nl "creating lockfile." @@ -976,16 +973,16 @@ date '+%s' > "${rootdir}/${lockselfname}" command_monitor.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "5.3 - monitor - offline - no lockfile" -echo "=================================" -echo "Description:" -echo "run monitor while server is offline with no lockfile." -echo "Command: ./${gameservername} monitor" +echo -e "" +echo -e "5.3 - monitor - offline - no lockfile" +echo -e "=================================" +echo -e "Description:" +echo -e "run monitor while server is offline with no lockfile." +echo -e "Command: ./${gameservername} monitor" requiredstatus="OFFLINE" fn_setstatus ( @@ -995,16 +992,16 @@ fn_setstatus command_monitor.sh ) fn_test_result_fail -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "5.4 - test-alert" -echo "=================================" -echo "Description:" -echo "run monitor while server is offline with no lockfile." -echo "Command: ./${gameservername} test-alert" +echo -e "" +echo -e "5.4 - test-alert" +echo -e "=================================" +echo -e "Description:" +echo -e "run monitor while server is offline with no lockfile." +echo -e "Command: ./${gameservername} test-alert" requiredstatus="OFFLINE" fn_setstatus cp "${servercfgfullpath}" "config.lua" @@ -1016,25 +1013,25 @@ sed -i 's/[0-9]\+/0/' "${servercfgfullpath}" command_test_alert.sh ) fn_test_result_fail -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" +echo -e "" fn_print_info_nl "Re-generating ${servercfg}." cp -v "config.lua" "${servercfgfullpath}" -echo "=================================" - -echo "" -echo "6.0 - Details Tests" -echo "==================================================================" - -echo "" -echo "6.1 - details" -echo "=================================" -echo "Description:" -echo "display details." -echo "Command: ./${gameservername} details" +echo -e "=================================" + +echo -e "" +echo -e "6.0 - Details Tests" +echo -e "==================================================================" + +echo -e "" +echo -e "6.1 - details" +echo -e "=================================" +echo -e "Description:" +echo -e "display details." +echo -e "Command: ./${gameservername} details" requiredstatus="ONLINE" fn_setstatus ( @@ -1044,16 +1041,16 @@ fn_setstatus command_details.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "6.2 - postdetails" -echo "=================================" -echo "Description:" -echo "post details." -echo "Command: ./${gameservername} postdetails" +echo -e "" +echo -e "6.2 - postdetails" +echo -e "=================================" +echo -e "Description:" +echo -e "post details." +echo -e "Command: ./${gameservername} postdetails" requiredstatus="ONLINE" fn_setstatus ( @@ -1063,39 +1060,39 @@ fn_setstatus command_postdetails.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "7.0 - Backup Tests" -echo "==================================================================" +echo -e "" +echo -e "7.0 - Backup Tests" +echo -e "==================================================================" -echo "" -echo "7.1 - backup" -echo "=================================" -echo "Description:" -echo "run a backup." -echo "Command: ./${gameservername} backup" +echo -e "" +echo -e "7.1 - backup" +echo -e "=================================" +echo -e "Description:" +echo -e "run a backup." +echo -e "Command: ./${gameservername} backup" requiredstatus="ONLINE" fn_setstatus -echo "test de-activated until issue #1839 fixed" +echo -e "test de-activated until issue #1839 fixed" #(command_backup.sh) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "8.0 - Development Tools Tests" -echo "==================================================================" +echo -e "" +echo -e "8.0 - Development Tools Tests" +echo -e "==================================================================" -echo "" -echo "8.1 - dev - detect glibc" -echo "=================================" -echo "Description:" -echo "detect glibc." -echo "Command: ./${gameservername} detect-glibc" +echo -e "" +echo -e "8.1 - dev - detect glibc" +echo -e "=================================" +echo -e "Description:" +echo -e "detect glibc." +echo -e "Command: ./${gameservername} detect-glibc" requiredstatus="ONLINE" fn_setstatus ( @@ -1105,16 +1102,16 @@ fn_setstatus command_dev_detect_glibc.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "8.2 - dev - detect ldd" -echo "=================================" -echo "Description:" -echo "detect ldd." -echo "Command: ./${gameservername} detect-ldd" +echo -e "" +echo -e "8.2 - dev - detect ldd" +echo -e "=================================" +echo -e "Description:" +echo -e "detect ldd." +echo -e "Command: ./${gameservername} detect-ldd" requiredstatus="ONLINE" fn_setstatus ( @@ -1124,16 +1121,16 @@ fn_setstatus command_dev_detect_ldd.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "8.3 - dev - detect deps" -echo "=================================" -echo "Description:" -echo "detect dependencies." -echo "Command: ./${gameservername} detect-deps" +echo -e "" +echo -e "8.3 - dev - detect deps" +echo -e "=================================" +echo -e "Description:" +echo -e "detect dependencies." +echo -e "Command: ./${gameservername} detect-deps" requiredstatus="ONLINE" fn_setstatus ( @@ -1143,16 +1140,16 @@ fn_setstatus command_dev_detect_deps.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "8.4 - dev - query-raw" -echo "=================================" -echo "Description:" -echo "raw query output." -echo "Command: ./${gameservername} query-raw" +echo -e "" +echo -e "8.4 - dev - query-raw" +echo -e "=================================" +echo -e "Description:" +echo -e "raw query output." +echo -e "Command: ./${gameservername} query-raw" requiredstatus="ONLINE" fn_setstatus ( @@ -1162,15 +1159,15 @@ fn_setstatus command_dev_query_raw.sh ) fn_test_result_na -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "=================================" -echo "Server Tests - Complete!" -echo "Using: ${gamename}" -echo "=================================" +echo -e "" +echo -e "=================================" +echo -e "Server Tests - Complete!" +echo -e "Using: ${gamename}" +echo -e "=================================" requiredstatus="OFFLINE" fn_setstatus fn_print_info "Tidying up directories." diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index df76274fb..190612bf3 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -23,10 +23,9 @@ fi version="v19.9.0" shortname="mc" gameservername="mcserver" -rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" -selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -servicename="${selfname}" -lockselfname=".${servicename}.lock" +rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") +selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") +lockselfname=".${selfname}.lock" lgsmdir="${rootdir}/lgsm" logdir="${rootdir}/log" lgsmlogdir="${logdir}/lgsm" @@ -48,7 +47,7 @@ if [ ! -v TRAVIS ]; then TRAVIS_BRANCH="develop" TRAVIS_BUILD_DIR="${rootdir}" else - servicename="travis" + selfname="travis" travistest="1" fi @@ -61,7 +60,7 @@ githubbranch="${TRAVIS_BRANCH}" # Core function that is required first. core_functions.sh(){ - functionfile="${FUNCNAME}" + functionfile="${FUNCNAME[0]}" fn_bootstrap_fetch_file_github "lgsm/functions" "core_functions.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" } @@ -80,27 +79,25 @@ fn_bootstrap_fetch_file(){ if [ ! -d "${local_filedir}" ]; then mkdir -p "${local_filedir}" fi - # Defines curl path. - curlpath=$(command -v curl 2>/dev/null) # If curl exists download file. - if [ "$(basename "${curlpath}")" == "curl" ]; then + if [ -n "$(command -v curl 2>/dev/null)" ]; then # Trap to remove part downloaded files. echo -en " fetching ${local_filename}...\c" - curlcmd=$(${curlpath} -s --fail -L -o "${local_filedir}/${local_filename}" "${remote_fileurl}" 2>&1) + curlcmd=$(curl -s --fail -L -o "${local_filedir}/${local_filename}" "${remote_fileurl}" 2>&1) local exitcode=$? if [ ${exitcode} -ne 0 ]; then echo -e "FAIL" if [ -f "${lgsmlog}" ]; then echo -e "${remote_fileurl}" | tee -a "${lgsmlog}" - echo "${curlcmd}" | tee -a "${lgsmlog}" + echo -e "${curlcmd}" | tee -a "${lgsmlog}" fi exit 1 else echo -e "OK" fi else - echo "[ FAIL ] Curl is not installed" + echo -e "[ FAIL ] Curl is not installed" exit 1 fi # Make file chmodx if chmodx is set. @@ -112,6 +109,7 @@ fn_bootstrap_fetch_file(){ if [ -f "${local_filedir}/${local_filename}" ]; then # Run file if run is set. if [ "${run}" == "run" ]; then + # shellcheck source=/dev/null source "${local_filedir}/${local_filename}" fi fi @@ -136,14 +134,13 @@ fn_bootstrap_fetch_file_github(){ # Installer menu. fn_print_center() { - columns="$(tput cols)" - line="$@" + columns=$(tput cols) + line="$*" printf "%*s\n" $(( (${#line} + columns) / 2)) "${line}" } fn_print_horizontal(){ - char="${1:-=}" - printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' "${char}" + printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' "=" } # Bash menu. @@ -158,7 +155,7 @@ fn_install_menu_bash() { fn_print_horizontal menu_options=() while read -r line || [[ -n "${line}" ]]; do - var=$(echo "${line}" | awk -F "," '{print $2 " - " $3}') + var=$(echo -e "${line}" | awk -F "," '{print $2 " - " $3}') menu_options+=( "${var}" ) done < "${options}" menu_options+=( "Cancel" ) @@ -183,8 +180,8 @@ fn_install_menu_whiptail() { IFS="," menu_options=() while read -r line; do - key=$(echo "${line}" | awk -F "," '{print $3}') - val=$(echo "${line}" | awk -F "," '{print $2}') + key=$(echo -e "${line}" | awk -F "," '{print $3}') + val=$(echo -e "${line}" | awk -F "," '{print $2}') menu_options+=( "${val//\"}" "${key//\"}" ) done < "${options}" OPTION=$(${menucmd} --title "${title}" --menu "${caption}" "${height}" "${width}" "${menuheight}" "${menu_options[@]}" 3>&1 1>&2 2>&3) @@ -229,10 +226,10 @@ fn_server_info(){ fn_install_getopt(){ userinput="empty" - echo "Usage: $0 [option]" + echo -e "Usage: $0 [option]" echo -e "" - echo "Installer - Linux Game Server Managers - Version ${version}" - echo "https://linuxgsm.com" + echo -e "Installer - Linux Game Server Managers - Version ${version}" + echo -e "https://linuxgsm.com" echo -e "" echo -e "Commands" echo -e "install\t\t| Select server to install." @@ -253,15 +250,15 @@ fn_install_file(){ cp -R "${selfname}" "${local_filename}" sed -i -e "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${local_filename}" sed -i -e "s/gameservername=\"core\"/gameservername=\"${gameservername}\"/g" "${local_filename}" - echo "Installed ${gamename} server as ${local_filename}" - echo "" + echo -e "Installed ${gamename} server as ${local_filename}" + echo -e "" if [ ! -d "${serverfiles}" ]; then - echo "./${local_filename} install" + echo -e "./${local_filename} install" else - echo "Remember to check server ports" - echo "./${local_filename} details" + echo -e "Remember to check server ports" + echo -e "./${local_filename} details" fi - echo "" + echo -e "" exit } @@ -269,11 +266,11 @@ fn_install_file(){ if [ "$(whoami)" == "root" ]; then if [ "${userinput}" == "install" ]||[ "${userinput}" == "auto-install" ]||[ "${userinput}" == "i" ]||[ "${userinput}" == "ai" ]; then if [ "${shortname}" == "core" ]; then - echo "[ FAIL ] Do NOT run this script as root!" + echo -e "[ FAIL ] Do NOT run this script as root!" exit 1 fi elif [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" + echo -e "[ FAIL ] Do NOT run this script as root!" exit 1 else core_functions.sh @@ -286,7 +283,7 @@ if [ "${shortname}" == "core" ]; then # Download the latest serverlist. This is the complete list of all supported servers. fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" if [ ! -f "${serverlist}" ]; then - echo "[ FAIL ] serverlist.csv could not be loaded." + echo -e "[ FAIL ] serverlist.csv could not be loaded." exit 1 fi @@ -303,18 +300,18 @@ if [ "${shortname}" == "core" ]; then if [ "${result}" == "${gameservername}" ]; then fn_install_file elif [ "${result}" == "" ]; then - echo "Install canceled" + echo -e "Install canceled" else - echo "[ FAIL ] menu result does not match gameservername" - echo "result: ${result}" - echo "gameservername: ${gameservername}" + echo -e "[ FAIL ] menu result does not match gameservername" + echo -e "result: ${result}" + echo -e "gameservername: ${gameservername}" fi elif [ -n "${userinput}" ]; then fn_server_info if [ "${userinput}" == "${gameservername}" ]||[ "${userinput}" == "${gamename}" ]||[ "${userinput}" == "${shortname}" ]; then fn_install_file else - echo "[ FAIL ] unknown game server" + echo -e "[ FAIL ] unknown game server" fi else fn_install_getopt @@ -366,11 +363,11 @@ else source "${configdirserver}/common.cfg" fi # Load the instance.cfg config. If missing download it. - if [ ! -f "${configdirserver}/${servicename}.cfg" ]; then - fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${servicename}.cfg" "nochmodx" "norun" "noforcedl" "nomd5" - source "${configdirserver}/${servicename}.cfg" + if [ ! -f "${configdirserver}/${selfname}.cfg" ]; then + fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5" + source "${configdirserver}/${selfname}.cfg" else - source "${configdirserver}/${servicename}.cfg" + source "${configdirserver}/${selfname}.cfg" fi # Load the linuxgsm.sh in to tmpdir. If missing download it. @@ -408,9 +405,9 @@ fn_currentstatus_ts3(){ fn_setstatus(){ fn_currentstatus_tmux echo"" - echo "Required status: ${requiredstatus}" + echo -e "Required status: ${requiredstatus}" counter=0 - echo "Current status: ${currentstatus}" + echo -e "Current status: ${currentstatus}" while [ "${requiredstatus}" != "${currentstatus}" ]; do counter=$((counter+1)) fn_currentstatus_tmux @@ -423,16 +420,16 @@ fn_setstatus(){ fi if [ "${counter}" -gt "5" ]; then currentstatus="FAIL" - echo "Current status: ${currentstatus}" - echo "" - echo "Unable to start or stop server." + echo -e "Current status: ${currentstatus}" + echo -e "" + echo -e "Unable to start or stop server." exit 1 fi done echo -en "New status: ${currentstatus}\\r" echo -e "\n" - echo "Test starting:" - echo "" + echo -e "Test starting:" + echo -e "" } # End of every test will expect the result to either pass or fail @@ -440,88 +437,88 @@ fn_setstatus(){ # if expecting a pass fn_test_result_pass(){ if [ $? != 0 ]; then - echo "=================================" - echo "Expected result: PASS" - echo "Actual result: FAIL" + echo -e "=================================" + echo -e "Expected result: PASS" + echo -e "Actual result: FAIL" fn_print_fail_nl "TEST FAILED" exitcode=1 core_exit.sh else - echo "=================================" - echo "Expected result: PASS" - echo "Actual result: PASS" + echo -e "=================================" + echo -e "Expected result: PASS" + echo -e "Actual result: PASS" fn_print_ok_nl "TEST PASSED" - echo "" + echo -e "" fi } # if expecting a fail fn_test_result_fail(){ if [ $? == 0 ]; then - echo "=================================" - echo "Expected result: FAIL" - echo "Actual result: PASS" + echo -e "=================================" + echo -e "Expected result: FAIL" + echo -e "Actual result: PASS" fn_print_fail_nl "TEST FAILED" exitcode=1 core_exit.sh else - echo "=================================" - echo "Expected result: FAIL" - echo "Actual result: FAIL" + echo -e "=================================" + echo -e "Expected result: FAIL" + echo -e "Actual result: FAIL" fn_print_ok_nl "TEST PASSED" - echo "" + echo -e "" fi } # test result n/a fn_test_result_na(){ - echo "=================================" - echo "Expected result: N/A" - echo "Actual result: N/A" + echo -e "=================================" + echo -e "Expected result: N/A" + echo -e "Actual result: N/A" fn_print_fail_nl "TEST N/A" } -echo "=================================" -echo "Travis CI Tests" -echo "Linux Game Server Manager" -echo "by Daniel Gibbs" -echo "Contributors: http://goo.gl/qLmitD" -echo "https://linuxgsm.com" -echo "=================================" -echo "" -echo "=================================" -echo "Server Tests" -echo "Using: ${gamename}" -echo "Testing Branch: $TRAVIS_BRANCH" -echo "=================================" - -echo "" -echo "0.0 - Pre-test Tasks" -echo "==================================================================" -echo "Description:" -echo "Create log dir's" -echo "" - -echo "" -echo "0.1 - Create log dir's" -echo "=================================" -echo "" +echo -e "=================================" +echo -e "Travis CI Tests" +echo -e "Linux Game Server Manager" +echo -e "by Daniel Gibbs" +echo -e "Contributors: http://goo.gl/qLmitD" +echo -e "https://linuxgsm.com" +echo -e "=================================" +echo -e "" +echo -e "=================================" +echo -e "Server Tests" +echo -e "Using: ${gamename}" +echo -e "Testing Branch: $TRAVIS_BRANCH" +echo -e "=================================" + +echo -e "" +echo -e "0.0 - Pre-test Tasks" +echo -e "==================================================================" +echo -e "Description:" +echo -e "Create log dir's" +echo -e "" + +echo -e "" +echo -e "0.1 - Create log dir's" +echo -e "=================================" +echo -e "" ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x install_logs.sh ) -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "0.2 - Enable dev-debug" -echo "=================================" -echo "Description:" -echo "Enable dev-debug" -echo "" +echo -e "" +echo -e "0.2 - Enable dev-debug" +echo -e "=================================" +echo -e "Description:" +echo -e "Enable dev-debug" +echo -e "" ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" @@ -529,21 +526,21 @@ echo "" command_dev_debug.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "1.0 - Pre-install tests" -echo "==================================================================" -echo "" - -echo "1.1 - start - no files" -echo "=================================" -echo "Description:" -echo "test script reaction to missing server files." -echo "Command: ./${gameservername} start" -echo "" +echo -e "" +echo -e "1.0 - Pre-install tests" +echo -e "==================================================================" +echo -e "" + +echo -e "1.1 - start - no files" +echo -e "=================================" +echo -e "Description:" +echo -e "test script reaction to missing server files." +echo -e "Command: ./${gameservername} start" +echo -e "" # Allows for testing not on Travis CI if [ ! -v TRAVIS ]; then ( @@ -554,20 +551,20 @@ if [ ! -v TRAVIS ]; then ) fn_test_result_fail else - echo "Test bypassed" + echo -e "Test bypassed" fi -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "1.2 - getopt" -echo "=================================" -echo "Description:" -echo "displaying options messages." -echo "Command: ./${gameservername}" -echo "" +echo -e "" +echo -e "1.2 - getopt" +echo -e "=================================" +echo -e "Description:" +echo -e "displaying options messages." +echo -e "Command: ./${gameservername}" +echo -e "" ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" @@ -575,17 +572,17 @@ echo "" core_getopt.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "1.3 - getopt with incorrect args" -echo "=================================" -echo "Description:" -echo "displaying options messages." -echo "Command: ./${gameservername} abc123" -echo "" +echo -e "" +echo -e "1.3 - getopt with incorrect args" +echo -e "=================================" +echo -e "Description:" +echo -e "displaying options messages." +echo -e "Command: ./${gameservername} abc123" +echo -e "" getopt="abc123" ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -594,20 +591,20 @@ getopt="abc123" core_getopt.sh ) fn_test_result_fail -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "2.0 - Installation" -echo "==================================================================" +echo -e "" +echo -e "2.0 - Installation" +echo -e "==================================================================" -echo "" -echo "2.0 - install" -echo "=================================" -echo "Description:" -echo "install ${gamename} server." -echo "Command: ./${gameservername} auto-install" +echo -e "" +echo -e "2.0 - install" +echo -e "=================================" +echo -e "Description:" +echo -e "install ${gamename} server." +echo -e "Command: ./${gameservername} auto-install" ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" @@ -615,20 +612,20 @@ echo "Command: ./${gameservername} auto-install" fn_autoinstall ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "3.0 - Start/Stop/Restart Tests" -echo "==================================================================" +echo -e "" +echo -e "3.0 - Start/Stop/Restart Tests" +echo -e "==================================================================" -echo "" -echo "3.1 - start" -echo "=================================" -echo "Description:" -echo "start ${gamename} server." -echo "Command: ./${gameservername} start" +echo -e "" +echo -e "3.1 - start" +echo -e "=================================" +echo -e "Description:" +echo -e "start ${gamename} server." +echo -e "Command: ./${gameservername} start" requiredstatus="OFFLINE" fn_setstatus ( @@ -638,16 +635,16 @@ fn_setstatus command_start.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "3.2 - start - online" -echo "=================================" -echo "Description:" -echo "start ${gamename} server while already running." -echo "Command: ./${gameservername} start" +echo -e "" +echo -e "3.2 - start - online" +echo -e "=================================" +echo -e "Description:" +echo -e "start ${gamename} server while already running." +echo -e "Command: ./${gameservername} start" requiredstatus="ONLINE" fn_setstatus ( @@ -657,16 +654,16 @@ fn_setstatus command_start.sh ) fn_test_result_fail -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "3.3 - start - updateonstart" -echo "=================================" -echo "Description:" -echo "will update server on start." -echo "Command: ./${gameservername} start" +echo -e "" +echo -e "3.3 - start - updateonstart" +echo -e "=================================" +echo -e "Description:" +echo -e "will update server on start." +echo -e "Command: ./${gameservername} start" requiredstatus="OFFLINE" fn_setstatus ( @@ -676,25 +673,25 @@ fn_setstatus updateonstart="on";command_start.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "30s Pause" -echo "=================================" -echo "Description:" -echo "give time for server to fully start." -echo "Command: sleep 30" +echo -e "" +echo -e "30s Pause" +echo -e "=================================" +echo -e "Description:" +echo -e "give time for server to fully start." +echo -e "Command: sleep 30" requiredstatus="ONLINE" fn_setstatus sleep 30 -echo "" -echo "3.4 - stop" -echo "=================================" -echo "Description:" -echo "stop ${gamename} server." -echo "Command: ./${gameservername} stop" +echo -e "" +echo -e "3.4 - stop" +echo -e "=================================" +echo -e "Description:" +echo -e "stop ${gamename} server." +echo -e "Command: ./${gameservername} stop" requiredstatus="ONLINE" fn_setstatus ( @@ -704,16 +701,16 @@ fn_setstatus command_stop.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "3.5 - stop - offline" -echo "=================================" -echo "Description:" -echo "stop ${gamename} server while already stopped." -echo "Command: ./${gameservername} stop" +echo -e "" +echo -e "3.5 - stop - offline" +echo -e "=================================" +echo -e "Description:" +echo -e "stop ${gamename} server while already stopped." +echo -e "Command: ./${gameservername} stop" requiredstatus="OFFLINE" fn_setstatus ( @@ -723,16 +720,16 @@ fn_setstatus command_stop.sh ) fn_test_result_fail -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "3.6 - restart" -echo "=================================" -echo "Description:" -echo "restart ${gamename}." -echo "Command: ./${gameservername} restart" +echo -e "" +echo -e "3.6 - restart" +echo -e "=================================" +echo -e "Description:" +echo -e "restart ${gamename}." +echo -e "Command: ./${gameservername} restart" requiredstatus="ONLINE" fn_setstatus ( @@ -742,16 +739,16 @@ fn_setstatus command_restart.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "3.7 - restart - offline" -echo "=================================" -echo "Description:" -echo "restart ${gamename} while already stopped." -echo "Command: ./${gameservername} restart" +echo -e "" +echo -e "3.7 - restart - offline" +echo -e "=================================" +echo -e "Description:" +echo -e "restart ${gamename} while already stopped." +echo -e "Command: ./${gameservername} restart" requiredstatus="OFFLINE" fn_setstatus ( @@ -761,20 +758,20 @@ fn_setstatus command_restart.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "4.0 - Update Tests" -echo "==================================================================" +echo -e "" +echo -e "4.0 - Update Tests" +echo -e "==================================================================" -echo "" -echo "4.1 - update" -echo "=================================" -echo "Description:" -echo "check for updates." -echo "Command: ./${gameservername} update" +echo -e "" +echo -e "4.1 - update" +echo -e "=================================" +echo -e "Description:" +echo -e "check for updates." +echo -e "Command: ./${gameservername} update" requiredstatus="OFFLINE" fn_setstatus ( @@ -784,47 +781,47 @@ fn_setstatus command_update.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "Inserting IP address" -echo "=================================" -echo "Description:" -echo "Inserting Travis IP in to config." -echo "Allows monitor to work" +echo -e "" +echo -e "Inserting IP address" +echo -e "=================================" +echo -e "Description:" +echo -e "Inserting Travis IP in to config." +echo -e "Allows monitor to work" if [ "$(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) 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) fi sed -i "/server-ip=/c\server-ip=${travisip}" "${serverfiles}/server.properties" -echo "IP: ${travisip}" - -echo "" -echo "5.0 - Monitor Tests" -echo "==================================================================" -echo "" -echo "Server IP - Port: ${ip}:${port}" -echo "Server IP - Query Port: ${ip}:${queryport}" - -echo "" -echo "30s Pause" -echo "=================================" -echo "Description:" -echo "give time for server to fully start." -echo "Command: sleep 30" +echo -e "IP: ${travisip}" + +echo -e "" +echo -e "5.0 - Monitor Tests" +echo -e "==================================================================" +echo -e "" +echo -e "Server IP - Port: ${ip}:${port}" +echo -e "Server IP - Query Port: ${ip}:${queryport}" + +echo -e "" +echo -e "30s Pause" +echo -e "=================================" +echo -e "Description:" +echo -e "give time for server to fully start." +echo -e "Command: sleep 30" requiredstatus="ONLINE" fn_setstatus sleep 30 -echo "" -echo "5.1 - monitor - online" -echo "=================================" -echo "Description:" -echo "run monitor server while already running." -echo "Command: ./${gameservername} monitor" +echo -e "" +echo -e "5.1 - monitor - online" +echo -e "=================================" +echo -e "Description:" +echo -e "run monitor server while already running." +echo -e "Command: ./${gameservername} monitor" requiredstatus="ONLINE" fn_setstatus ( @@ -834,16 +831,16 @@ fn_setstatus command_monitor.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "5.2 - monitor - offline - with lockfile" -echo "=================================" -echo "Description:" -echo "run monitor while server is offline with lockfile." -echo "Command: ./${gameservername} monitor" +echo -e "" +echo -e "5.2 - monitor - offline - with lockfile" +echo -e "=================================" +echo -e "Description:" +echo -e "run monitor while server is offline with lockfile." +echo -e "Command: ./${gameservername} monitor" requiredstatus="OFFLINE" fn_setstatus fn_print_info_nl "creating lockfile." @@ -855,16 +852,16 @@ date '+%s' > "${rootdir}/${lockselfname}" command_monitor.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "5.3 - monitor - offline - no lockfile" -echo "=================================" -echo "Description:" -echo "run monitor while server is offline with no lockfile." -echo "Command: ./${gameservername} monitor" +echo -e "" +echo -e "5.3 - monitor - offline - no lockfile" +echo -e "=================================" +echo -e "Description:" +echo -e "run monitor while server is offline with no lockfile." +echo -e "Command: ./${gameservername} monitor" requiredstatus="OFFLINE" fn_setstatus ( @@ -874,16 +871,16 @@ fn_setstatus command_monitor.sh ) fn_test_result_fail -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "5.4 - test-alert" -echo "=================================" -echo "Description:" -echo "run monitor while server is offline with no lockfile." -echo "Command: ./${gameservername} test-alert" +echo -e "" +echo -e "5.4 - test-alert" +echo -e "=================================" +echo -e "Description:" +echo -e "run monitor while server is offline with no lockfile." +echo -e "Command: ./${gameservername} test-alert" requiredstatus="OFFLINE" fn_setstatus ( @@ -893,20 +890,20 @@ fn_setstatus command_test_alert.sh ) fn_test_result_fail -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "6.0 - Details Tests" -echo "==================================================================" +echo -e "" +echo -e "6.0 - Details Tests" +echo -e "==================================================================" -echo "" -echo "6.1 - details" -echo "=================================" -echo "Description:" -echo "display details." -echo "Command: ./${gameservername} details" +echo -e "" +echo -e "6.1 - details" +echo -e "=================================" +echo -e "Description:" +echo -e "display details." +echo -e "Command: ./${gameservername} details" requiredstatus="ONLINE" fn_setstatus ( @@ -916,16 +913,16 @@ fn_setstatus command_details.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "6.2 - postdetails" -echo "=================================" -echo "Description:" -echo "post details." -echo "Command: ./${gameservername} postdetails" +echo -e "" +echo -e "6.2 - postdetails" +echo -e "=================================" +echo -e "Description:" +echo -e "post details." +echo -e "Command: ./${gameservername} postdetails" requiredstatus="ONLINE" fn_setstatus ( @@ -935,39 +932,39 @@ fn_setstatus command_postdetails.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "7.0 - Backup Tests" -echo "==================================================================" +echo -e "" +echo -e "7.0 - Backup Tests" +echo -e "==================================================================" -echo "" -echo "7.1 - backup" -echo "=================================" -echo "Description:" -echo "run a backup." -echo "Command: ./${gameservername} backup" +echo -e "" +echo -e "7.1 - backup" +echo -e "=================================" +echo -e "Description:" +echo -e "run a backup." +echo -e "Command: ./${gameservername} backup" requiredstatus="ONLINE" fn_setstatus -echo "test de-activated until issue #1839 fixed" +echo -e "test de-activated until issue #1839 fixed" #(command_backup.sh) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "8.0 - Development Tools Tests" -echo "==================================================================" +echo -e "" +echo -e "8.0 - Development Tools Tests" +echo -e "==================================================================" -echo "" -echo "8.1 - dev - detect glibc" -echo "=================================" -echo "Description:" -echo "detect glibc." -echo "Command: ./${gameservername} detect-glibc" +echo -e "" +echo -e "8.1 - dev - detect glibc" +echo -e "=================================" +echo -e "Description:" +echo -e "detect glibc." +echo -e "Command: ./${gameservername} detect-glibc" requiredstatus="ONLINE" fn_setstatus ( @@ -977,16 +974,16 @@ fn_setstatus command_dev_detect_glibc.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "8.2 - dev - detect ldd" -echo "=================================" -echo "Description:" -echo "detect ldd." -echo "Command: ./${gameservername} detect-ldd" +echo -e "" +echo -e "8.2 - dev - detect ldd" +echo -e "=================================" +echo -e "Description:" +echo -e "detect ldd." +echo -e "Command: ./${gameservername} detect-ldd" requiredstatus="ONLINE" fn_setstatus ( @@ -996,16 +993,16 @@ fn_setstatus command_dev_detect_ldd.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "8.3 - dev - detect deps" -echo "=================================" -echo "Description:" -echo "detect dependencies." -echo "Command: ./${gameservername} detect-deps" +echo -e "" +echo -e "8.3 - dev - detect deps" +echo -e "=================================" +echo -e "Description:" +echo -e "detect dependencies." +echo -e "Command: ./${gameservername} detect-deps" requiredstatus="ONLINE" fn_setstatus ( @@ -1015,30 +1012,30 @@ fn_setstatus command_dev_detect_deps.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "Inserting IP address" -echo "=================================" -echo "Description:" -echo "Inserting Travis IP in to config." -echo "Allows monitor to work" +echo -e "" +echo -e "Inserting IP address" +echo -e "=================================" +echo -e "Description:" +echo -e "Inserting Travis IP in to config." +echo -e "Allows monitor to work" if [ "$(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) 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) fi sed -i "/server-ip=/c\server-ip=${travisip}" "${serverfiles}/server.properties" -echo "IP: ${travisip}" - -echo "" -echo "8.4 - dev - query-raw" -echo "=================================" -echo "Description:" -echo "raw query output." -echo "Command: ./${gameservername} query-raw" +echo -e "IP: ${travisip}" + +echo -e "" +echo -e "8.4 - dev - query-raw" +echo -e "=================================" +echo -e "Description:" +echo -e "raw query output." +echo -e "Command: ./${gameservername} query-raw" requiredstatus="ONLINE" fn_setstatus ( @@ -1048,15 +1045,15 @@ fn_setstatus command_dev_query_raw.sh ) fn_test_result_na -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "=================================" -echo "Server Tests - Complete!" -echo "Using: ${gamename}" -echo "=================================" +echo -e "" +echo -e "=================================" +echo -e "Server Tests - Complete!" +echo -e "Using: ${gamename}" +echo -e "=================================" requiredstatus="OFFLINE" fn_setstatus fn_print_info "Tidying up directories." diff --git a/tests/tests_shellcheck.sh b/tests/tests_shellcheck.sh index 6d33507e6..51784906c 100644 --- a/tests/tests_shellcheck.sh +++ b/tests/tests_shellcheck.sh @@ -7,26 +7,26 @@ # Documentation: https://docs.linuxgsm.com/ # Website: https://linuxgsm.com -echo "=================================" -echo "Travis CI Tests" -echo "Linux Game Server Manager" -echo "by Daniel Gibbs" -echo "Contributors: http://goo.gl/qLmitD" -echo "https://linuxgsm.com" -echo "=================================" -echo "" -echo "=================================" -echo "Bash Analysis Tests" -echo "Using: Shellcheck" -echo "Testing Branch: $TRAVIS_BRANCH" -echo "=================================" -echo "" +echo -e "=================================" +echo -e "Travis CI Tests" +echo -e "Linux Game Server Manager" +echo -e "by Daniel Gibbs" +echo -e "Contributors: http://goo.gl/qLmitD" +echo -e "https://linuxgsm.com" +echo -e "=================================" +echo -e "" +echo -e "=================================" +echo -e "Bash Analysis Tests" +echo -e "Using: Shellcheck" +echo -e "Testing Branch: $TRAVIS_BRANCH" +echo -e "=================================" +echo -e "" scissues=$(find . -type f \( -name "*.sh" -o -name "*.cfg" \) -not -path "./shunit2-2.1.6/*" -exec shellcheck --shell=bash --exclude=SC2154,SC2034 {} \; | grep -F "^--" | wc -l) -echo "Found issues: ${scissues}" -echo "=================================" +echo -e "Found issues: ${scissues}" +echo -e "=================================" find . -type f \( -name "*.sh" -o -name "*.cfg" \) -not -path "./shunit2-2.1.6/*" -exec shellcheck --shell=bash --exclude=SC2154,SC2034 {} \; -echo "" -echo "=================================" -echo "Bash Analysis Tests - Complete!" -echo "Using: Shellcheck" -echo "=================================" +echo -e "" +echo -e "=================================" +echo -e "Bash Analysis Tests - Complete!" +echo -e "Using: Shellcheck" +echo -e "=================================" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index c0d257059..080a2c9a3 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -23,10 +23,9 @@ fi version="v19.9.0" shortname="ts3" gameservername="ts3server" -rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" -selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -servicename="${selfname}" -lockselfname=".${servicename}.lock" +rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") +selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") +lockselfname=".${selfname}.lock" lgsmdir="${rootdir}/lgsm" logdir="${rootdir}/log" lgsmlogdir="${logdir}/lgsm" @@ -48,7 +47,7 @@ if [ ! -v TRAVIS ]; then TRAVIS_BRANCH="develop" TRAVIS_BUILD_DIR="${rootdir}" else - servicename="travis" + selfname="travis" travistest="1" fi @@ -61,7 +60,7 @@ githubbranch="${TRAVIS_BRANCH}" # Core function that is required first. core_functions.sh(){ - functionfile="${FUNCNAME}" + functionfile="${FUNCNAME[0]}" fn_bootstrap_fetch_file_github "lgsm/functions" "core_functions.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" } @@ -80,27 +79,25 @@ fn_bootstrap_fetch_file(){ if [ ! -d "${local_filedir}" ]; then mkdir -p "${local_filedir}" fi - # Defines curl path. - curlpath=$(command -v curl 2>/dev/null) # If curl exists download file. - if [ "$(basename "${curlpath}")" == "curl" ]; then + if [ -n "$(command -v curl 2>/dev/null)" ]; then # Trap to remove part downloaded files. echo -en " fetching ${local_filename}...\c" - curlcmd=$(${curlpath} -s --fail -L -o "${local_filedir}/${local_filename}" "${remote_fileurl}" 2>&1) + curlcmd=$(curl -s --fail -L -o "${local_filedir}/${local_filename}" "${remote_fileurl}" 2>&1) local exitcode=$? if [ ${exitcode} -ne 0 ]; then echo -e "FAIL" if [ -f "${lgsmlog}" ]; then echo -e "${remote_fileurl}" | tee -a "${lgsmlog}" - echo "${curlcmd}" | tee -a "${lgsmlog}" + echo -e "${curlcmd}" | tee -a "${lgsmlog}" fi exit 1 else echo -e "OK" fi else - echo "[ FAIL ] Curl is not installed" + echo -e "[ FAIL ] Curl is not installed" exit 1 fi # Make file chmodx if chmodx is set. @@ -112,6 +109,7 @@ fn_bootstrap_fetch_file(){ if [ -f "${local_filedir}/${local_filename}" ]; then # Run file if run is set. if [ "${run}" == "run" ]; then + # shellcheck source=/dev/null source "${local_filedir}/${local_filename}" fi fi @@ -136,14 +134,13 @@ fn_bootstrap_fetch_file_github(){ # Installer menu. fn_print_center() { - columns="$(tput cols)" - line="$@" + columns=$(tput cols) + line="$*" printf "%*s\n" $(( (${#line} + columns) / 2)) "${line}" } fn_print_horizontal(){ - char="${1:-=}" - printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' "${char}" + printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' "=" } # Bash menu. @@ -158,7 +155,7 @@ fn_install_menu_bash() { fn_print_horizontal menu_options=() while read -r line || [[ -n "${line}" ]]; do - var=$(echo "${line}" | awk -F "," '{print $2 " - " $3}') + var=$(echo -e "${line}" | awk -F "," '{print $2 " - " $3}') menu_options+=( "${var}" ) done < "${options}" menu_options+=( "Cancel" ) @@ -183,8 +180,8 @@ fn_install_menu_whiptail() { IFS="," menu_options=() while read -r line; do - key=$(echo "${line}" | awk -F "," '{print $3}') - val=$(echo "${line}" | awk -F "," '{print $2}') + key=$(echo -e "${line}" | awk -F "," '{print $3}') + val=$(echo -e "${line}" | awk -F "," '{print $2}') menu_options+=( "${val//\"}" "${key//\"}" ) done < "${options}" OPTION=$(${menucmd} --title "${title}" --menu "${caption}" "${height}" "${width}" "${menuheight}" "${menu_options[@]}" 3>&1 1>&2 2>&3) @@ -229,10 +226,10 @@ fn_server_info(){ fn_install_getopt(){ userinput="empty" - echo "Usage: $0 [option]" + echo -e "Usage: $0 [option]" echo -e "" - echo "Installer - Linux Game Server Managers - Version ${version}" - echo "https://linuxgsm.com" + echo -e "Installer - Linux Game Server Managers - Version ${version}" + echo -e "https://linuxgsm.com" echo -e "" echo -e "Commands" echo -e "install\t\t| Select server to install." @@ -246,22 +243,22 @@ fn_install_file(){ if [ -e "${local_filename}" ]; then i=2 while [ -e "${local_filename}-${i}" ] ; do - let i++ + (( i++ )) done local_filename="${local_filename}-${i}" fi cp -R "${selfname}" "${local_filename}" sed -i -e "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${local_filename}" sed -i -e "s/gameservername=\"core\"/gameservername=\"${gameservername}\"/g" "${local_filename}" - echo "Installed ${gamename} server as ${local_filename}" - echo "" + echo -e "Installed ${gamename} server as ${local_filename}" + echo -e "" if [ ! -d "${serverfiles}" ]; then - echo "./${local_filename} install" + echo -e "./${local_filename} install" else - echo "Remember to check server ports" - echo "./${local_filename} details" + echo -e "Remember to check server ports" + echo -e "./${local_filename} details" fi - echo "" + echo -e "" exit } @@ -269,11 +266,11 @@ fn_install_file(){ if [ "$(whoami)" == "root" ]; then if [ "${userinput}" == "install" ]||[ "${userinput}" == "auto-install" ]||[ "${userinput}" == "i" ]||[ "${userinput}" == "ai" ]; then if [ "${shortname}" == "core" ]; then - echo "[ FAIL ] Do NOT run this script as root!" + echo -e "[ FAIL ] Do NOT run this script as root!" exit 1 fi elif [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]; then - echo "[ FAIL ] Do NOT run this script as root!" + echo -e "[ FAIL ] Do NOT run this script as root!" exit 1 else core_functions.sh @@ -286,7 +283,7 @@ if [ "${shortname}" == "core" ]; then # Download the latest serverlist. This is the complete list of all supported servers. fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" if [ ! -f "${serverlist}" ]; then - echo "[ FAIL ] serverlist.csv could not be loaded." + echo -e "[ FAIL ] serverlist.csv could not be loaded." exit 1 fi @@ -303,18 +300,18 @@ if [ "${shortname}" == "core" ]; then if [ "${result}" == "${gameservername}" ]; then fn_install_file elif [ "${result}" == "" ]; then - echo "Install canceled" + echo -e "Install canceled" else - echo "[ FAIL ] menu result does not match gameservername" - echo "result: ${result}" - echo "gameservername: ${gameservername}" + echo -e "[ FAIL ] menu result does not match gameservername" + echo -e "result: ${result}" + echo -e "gameservername: ${gameservername}" fi elif [ -n "${userinput}" ]; then fn_server_info if [ "${userinput}" == "${gameservername}" ]||[ "${userinput}" == "${gamename}" ]||[ "${userinput}" == "${shortname}" ]; then fn_install_file else - echo "[ FAIL ] unknown game server" + echo -e "[ FAIL ] unknown game server" fi else fn_install_getopt @@ -366,11 +363,11 @@ else source "${configdirserver}/common.cfg" fi # Load the instance.cfg config. If missing download it. - if [ ! -f "${configdirserver}/${servicename}.cfg" ]; then - fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${servicename}.cfg" "nochmodx" "norun" "noforcedl" "nomd5" - source "${configdirserver}/${servicename}.cfg" + if [ ! -f "${configdirserver}/${selfname}.cfg" ]; then + fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5" + source "${configdirserver}/${selfname}.cfg" else - source "${configdirserver}/${servicename}.cfg" + source "${configdirserver}/${selfname}.cfg" fi # Load the linuxgsm.sh in to tmpdir. If missing download it. @@ -408,9 +405,9 @@ fn_currentstatus_ts3(){ fn_setstatus(){ fn_currentstatus_ts3 echo"" - echo "Required status: ${requiredstatus}" + echo -e "Required status: ${requiredstatus}" counter=0 - echo "Current status: ${currentstatus}" + echo -e "Current status: ${currentstatus}" while [ "${requiredstatus}" != "${currentstatus}" ]; do counter=$((counter+1)) fn_currentstatus_ts3 @@ -423,16 +420,16 @@ fn_setstatus(){ fi if [ "${counter}" -gt "5" ]; then currentstatus="FAIL" - echo "Current status: ${currentstatus}" - echo "" - echo "Unable to start or stop server." + echo -e "Current status: ${currentstatus}" + echo -e "" + echo -e "Unable to start or stop server." exit 1 fi done echo -en "New status: ${currentstatus}\\r" echo -e "\n" - echo "Test starting:" - echo "" + echo -e "Test starting:" + echo -e "" } # End of every test will expect the result to either pass or fail @@ -440,88 +437,88 @@ fn_setstatus(){ # if expecting a pass fn_test_result_pass(){ if [ $? != 0 ]; then - echo "=================================" - echo "Expected result: PASS" - echo "Actual result: FAIL" + echo -e "=================================" + echo -e "Expected result: PASS" + echo -e "Actual result: FAIL" fn_print_fail_nl "TEST FAILED" exitcode=1 core_exit.sh else - echo "=================================" - echo "Expected result: PASS" - echo "Actual result: PASS" + echo -e "=================================" + echo -e "Expected result: PASS" + echo -e "Actual result: PASS" fn_print_ok_nl "TEST PASSED" - echo "" + echo -e "" fi } # if expecting a fail fn_test_result_fail(){ if [ $? == 0 ]; then - echo "=================================" - echo "Expected result: FAIL" - echo "Actual result: PASS" + echo -e "=================================" + echo -e "Expected result: FAIL" + echo -e "Actual result: PASS" fn_print_fail_nl "TEST FAILED" exitcode=1 core_exit.sh else - echo "=================================" - echo "Expected result: FAIL" - echo "Actual result: FAIL" + echo -e "=================================" + echo -e "Expected result: FAIL" + echo -e "Actual result: FAIL" fn_print_ok_nl "TEST PASSED" - echo "" + echo -e "" fi } # test result n/a fn_test_result_na(){ - echo "=================================" - echo "Expected result: N/A" - echo "Actual result: N/A" + echo -e "=================================" + echo -e "Expected result: N/A" + echo -e "Actual result: N/A" fn_print_fail_nl "TEST N/A" } -echo "=================================" -echo "Travis CI Tests" -echo "Linux Game Server Manager" -echo "by Daniel Gibbs" -echo "Contributors: http://goo.gl/qLmitD" -echo "https://linuxgsm.com" -echo "=================================" -echo "" -echo "=================================" -echo "Server Tests" -echo "Using: ${gamename}" -echo "Testing Branch: $TRAVIS_BRANCH" -echo "=================================" - -echo "" -echo "0.0 - Pre-test Tasks" -echo "==================================================================" -echo "Description:" -echo "Create log dir's" -echo "" - -echo "" -echo "0.1 - Create log dir's" -echo "=================================" -echo "" +echo -e "=================================" +echo -e "Travis CI Tests" +echo -e "Linux Game Server Manager" +echo -e "by Daniel Gibbs" +echo -e "Contributors: http://goo.gl/qLmitD" +echo -e "https://linuxgsm.com" +echo -e "=================================" +echo -e "" +echo -e "=================================" +echo -e "Server Tests" +echo -e "Using: ${gamename}" +echo -e "Testing Branch: $TRAVIS_BRANCH" +echo -e "=================================" + +echo -e "" +echo -e "0.0 - Pre-test Tasks" +echo -e "==================================================================" +echo -e "Description:" +echo -e "Create log dir's" +echo -e "" + +echo -e "" +echo -e "0.1 - Create log dir's" +echo -e "=================================" +echo -e "" ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x install_logs.sh ) -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "0.2 - Enable dev-debug" -echo "=================================" -echo "Description:" -echo "Enable dev-debug" -echo "" +echo -e "" +echo -e "0.2 - Enable dev-debug" +echo -e "=================================" +echo -e "Description:" +echo -e "Enable dev-debug" +echo -e "" ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" @@ -529,21 +526,21 @@ echo "" command_dev_debug.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "1.0 - Pre-install tests" -echo "==================================================================" -echo "" - -echo "1.1 - start - no files" -echo "=================================" -echo "Description:" -echo "test script reaction to missing server files." -echo "Command: ./${gameservername} start" -echo "" +echo -e "" +echo -e "1.0 - Pre-install tests" +echo -e "==================================================================" +echo -e "" + +echo -e "1.1 - start - no files" +echo -e "=================================" +echo -e "Description:" +echo -e "test script reaction to missing server files." +echo -e "Command: ./${gameservername} start" +echo -e "" # Allows for testing not on Travis CI if [ ! -v TRAVIS ]; then ( @@ -554,20 +551,20 @@ if [ ! -v TRAVIS ]; then ) fn_test_result_fail else - echo "Test bypassed" + echo -e "Test bypassed" fi -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "1.2 - getopt" -echo "=================================" -echo "Description:" -echo "displaying options messages." -echo "Command: ./${gameservername}" -echo "" +echo -e "" +echo -e "1.2 - getopt" +echo -e "=================================" +echo -e "Description:" +echo -e "displaying options messages." +echo -e "Command: ./${gameservername}" +echo -e "" ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" @@ -575,17 +572,17 @@ echo "" core_getopt.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "1.3 - getopt with incorrect args" -echo "=================================" -echo "Description:" -echo "displaying options messages." -echo "Command: ./${gameservername} abc123" -echo "" +echo -e "" +echo -e "1.3 - getopt with incorrect args" +echo -e "=================================" +echo -e "Description:" +echo -e "displaying options messages." +echo -e "Command: ./${gameservername} abc123" +echo -e "" getopt="abc123" ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -594,20 +591,20 @@ getopt="abc123" core_getopt.sh ) fn_test_result_fail -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "2.0 - Installation" -echo "==================================================================" +echo -e "" +echo -e "2.0 - Installation" +echo -e "==================================================================" -echo "" -echo "2.0 - install" -echo "=================================" -echo "Description:" -echo "install ${gamename} server." -echo "Command: ./${gameservername} auto-install" +echo -e "" +echo -e "2.0 - install" +echo -e "=================================" +echo -e "Description:" +echo -e "install ${gamename} server." +echo -e "Command: ./${gameservername} auto-install" ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" @@ -615,20 +612,20 @@ echo "Command: ./${gameservername} auto-install" fn_autoinstall ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "3.0 - Start/Stop/Restart Tests" -echo "==================================================================" +echo -e "" +echo -e "3.0 - Start/Stop/Restart Tests" +echo -e "==================================================================" -echo "" -echo "3.1 - start" -echo "=================================" -echo "Description:" -echo "start ${gamename} server." -echo "Command: ./${gameservername} start" +echo -e "" +echo -e "3.1 - start" +echo -e "=================================" +echo -e "Description:" +echo -e "start ${gamename} server." +echo -e "Command: ./${gameservername} start" requiredstatus="OFFLINE" fn_setstatus ( @@ -638,16 +635,16 @@ fn_setstatus command_start.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "3.2 - start - online" -echo "=================================" -echo "Description:" -echo "start ${gamename} server while already running." -echo "Command: ./${gameservername} start" +echo -e "" +echo -e "3.2 - start - online" +echo -e "=================================" +echo -e "Description:" +echo -e "start ${gamename} server while already running." +echo -e "Command: ./${gameservername} start" requiredstatus="ONLINE" fn_setstatus ( @@ -657,16 +654,16 @@ fn_setstatus command_start.sh ) fn_test_result_fail -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "3.3 - start - updateonstart" -echo "=================================" -echo "Description:" -echo "will update server on start." -echo "Command: ./${gameservername} start" +echo -e "" +echo -e "3.3 - start - updateonstart" +echo -e "=================================" +echo -e "Description:" +echo -e "will update server on start." +echo -e "Command: ./${gameservername} start" requiredstatus="OFFLINE" fn_setstatus ( @@ -676,16 +673,16 @@ fn_setstatus updateonstart="on";command_start.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "3.4 - stop" -echo "=================================" -echo "Description:" -echo "stop ${gamename} server." -echo "Command: ./${gameservername} stop" +echo -e "" +echo -e "3.4 - stop" +echo -e "=================================" +echo -e "Description:" +echo -e "stop ${gamename} server." +echo -e "Command: ./${gameservername} stop" requiredstatus="ONLINE" fn_setstatus ( @@ -695,16 +692,16 @@ fn_setstatus command_stop.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "3.5 - stop - offline" -echo "=================================" -echo "Description:" -echo "stop ${gamename} server while already stopped." -echo "Command: ./${gameservername} stop" +echo -e "" +echo -e "3.5 - stop - offline" +echo -e "=================================" +echo -e "Description:" +echo -e "stop ${gamename} server while already stopped." +echo -e "Command: ./${gameservername} stop" requiredstatus="OFFLINE" fn_setstatus ( @@ -714,16 +711,16 @@ fn_setstatus command_stop.sh ) fn_test_result_fail -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "3.6 - restart" -echo "=================================" -echo "Description:" -echo "restart ${gamename}." -echo "Command: ./${gameservername} restart" +echo -e "" +echo -e "3.6 - restart" +echo -e "=================================" +echo -e "Description:" +echo -e "restart ${gamename}." +echo -e "Command: ./${gameservername} restart" requiredstatus="ONLINE" fn_setstatus ( @@ -733,16 +730,16 @@ fn_setstatus command_restart.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "3.7 - restart - offline" -echo "=================================" -echo "Description:" -echo "restart ${gamename} while already stopped." -echo "Command: ./${gameservername} restart" +echo -e "" +echo -e "3.7 - restart - offline" +echo -e "=================================" +echo -e "Description:" +echo -e "restart ${gamename} while already stopped." +echo -e "Command: ./${gameservername} restart" requiredstatus="OFFLINE" fn_setstatus ( @@ -752,20 +749,20 @@ fn_setstatus command_restart.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "4.0 - Update Tests" -echo "==================================================================" +echo -e "" +echo -e "4.0 - Update Tests" +echo -e "==================================================================" -echo "" -echo "4.1 - update" -echo "=================================" -echo "Description:" -echo "check for updates." -echo "Command: ./${gameservername} update" +echo -e "" +echo -e "4.1 - update" +echo -e "=================================" +echo -e "Description:" +echo -e "check for updates." +echo -e "Command: ./${gameservername} update" requiredstatus="OFFLINE" fn_setstatus ( @@ -775,23 +772,23 @@ fn_setstatus command_update.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "5.0 - Monitor Tests" -echo "==================================================================" -echo "" -echo "Server IP - Port: ${ip}:${port}" -echo "Server IP - Query Port: ${ip}:${queryport}" - -echo "" -echo "5.1 - monitor - online" -echo "=================================" -echo "Description:" -echo "run monitor server while already running." -echo "Command: ./${gameservername} monitor" +echo -e "" +echo -e "5.0 - Monitor Tests" +echo -e "==================================================================" +echo -e "" +echo -e "Server IP - Port: ${ip}:${port}" +echo -e "Server IP - Query Port: ${ip}:${queryport}" + +echo -e "" +echo -e "5.1 - monitor - online" +echo -e "=================================" +echo -e "Description:" +echo -e "run monitor server while already running." +echo -e "Command: ./${gameservername} monitor" requiredstatus="ONLINE" fn_setstatus ( @@ -801,16 +798,16 @@ fn_setstatus command_monitor.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "5.2 - monitor - offline - with lockfile" -echo "=================================" -echo "Description:" -echo "run monitor while server is offline with lockfile." -echo "Command: ./${gameservername} monitor" +echo -e "" +echo -e "5.2 - monitor - offline - with lockfile" +echo -e "=================================" +echo -e "Description:" +echo -e "run monitor while server is offline with lockfile." +echo -e "Command: ./${gameservername} monitor" requiredstatus="OFFLINE" fn_setstatus fn_print_info_nl "creating lockfile." @@ -822,16 +819,16 @@ date '+%s' > "${rootdir}/${lockselfname}" command_monitor.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "5.3 - monitor - offline - no lockfile" -echo "=================================" -echo "Description:" -echo "run monitor while server is offline with no lockfile." -echo "Command: ./${gameservername} monitor" +echo -e "" +echo -e "5.3 - monitor - offline - no lockfile" +echo -e "=================================" +echo -e "Description:" +echo -e "run monitor while server is offline with no lockfile." +echo -e "Command: ./${gameservername} monitor" requiredstatus="OFFLINE" fn_setstatus ( @@ -841,16 +838,16 @@ fn_setstatus command_monitor.sh ) fn_test_result_fail -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "5.4 - test-alert" -echo "=================================" -echo "Description:" -echo "run monitor while server is offline with no lockfile." -echo "Command: ./${gameservername} test-alert" +echo -e "" +echo -e "5.4 - test-alert" +echo -e "=================================" +echo -e "Description:" +echo -e "run monitor while server is offline with no lockfile." +echo -e "Command: ./${gameservername} test-alert" requiredstatus="OFFLINE" fn_setstatus ( @@ -860,20 +857,20 @@ fn_setstatus command_test_alert.sh ) fn_test_result_fail -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "6.0 - Details Tests" -echo "==================================================================" +echo -e "" +echo -e "6.0 - Details Tests" +echo -e "==================================================================" -echo "" -echo "6.1 - details" -echo "=================================" -echo "Description:" -echo "display details." -echo "Command: ./${gameservername} details" +echo -e "" +echo -e "6.1 - details" +echo -e "=================================" +echo -e "Description:" +echo -e "display details." +echo -e "Command: ./${gameservername} details" requiredstatus="ONLINE" fn_setstatus ( @@ -883,16 +880,16 @@ fn_setstatus command_details.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "6.2 - postdetails" -echo "=================================" -echo "Description:" -echo "post details." -echo "Command: ./${gameservername} postdetails" +echo -e "" +echo -e "6.2 - postdetails" +echo -e "=================================" +echo -e "Description:" +echo -e "post details." +echo -e "Command: ./${gameservername} postdetails" requiredstatus="ONLINE" fn_setstatus ( @@ -902,39 +899,39 @@ fn_setstatus command_postdetails.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "7.0 - Backup Tests" -echo "==================================================================" +echo -e "" +echo -e "7.0 - Backup Tests" +echo -e "==================================================================" -echo "" -echo "7.1 - backup" -echo "=================================" -echo "Description:" -echo "run a backup." -echo "Command: ./${gameservername} backup" +echo -e "" +echo -e "7.1 - backup" +echo -e "=================================" +echo -e "Description:" +echo -e "run a backup." +echo -e "Command: ./${gameservername} backup" requiredstatus="ONLINE" fn_setstatus -echo "test de-activated until issue #1839 fixed" +echo -e "test de-activated until issue #1839 fixed" #(command_backup.sh) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "8.0 - Development Tools Tests" -echo "==================================================================" +echo -e "" +echo -e "8.0 - Development Tools Tests" +echo -e "==================================================================" -echo "" -echo "8.1 - dev - detect glibc" -echo "=================================" -echo "Description:" -echo "detect glibc." -echo "Command: ./${gameservername} detect-glibc" +echo -e "" +echo -e "8.1 - dev - detect glibc" +echo -e "=================================" +echo -e "Description:" +echo -e "detect glibc." +echo -e "Command: ./${gameservername} detect-glibc" requiredstatus="ONLINE" fn_setstatus ( @@ -944,16 +941,16 @@ fn_setstatus command_dev_detect_glibc.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "8.2 - dev - detect ldd" -echo "=================================" -echo "Description:" -echo "detect ldd." -echo "Command: ./${gameservername} detect-ldd" +echo -e "" +echo -e "8.2 - dev - detect ldd" +echo -e "=================================" +echo -e "Description:" +echo -e "detect ldd." +echo -e "Command: ./${gameservername} detect-ldd" requiredstatus="ONLINE" fn_setstatus ( @@ -963,16 +960,16 @@ fn_setstatus command_dev_detect_ldd.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "8.3 - dev - detect deps" -echo "=================================" -echo "Description:" -echo "detect dependencies." -echo "Command: ./${gameservername} detect-deps" +echo -e "" +echo -e "8.3 - dev - detect deps" +echo -e "=================================" +echo -e "Description:" +echo -e "detect dependencies." +echo -e "Command: ./${gameservername} detect-deps" requiredstatus="ONLINE" fn_setstatus ( @@ -982,16 +979,16 @@ fn_setstatus command_dev_detect_deps.sh ) fn_test_result_pass -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "8.4 - dev - query-raw" -echo "=================================" -echo "Description:" -echo "raw query output." -echo "Command: ./${gameservername} query-raw" +echo -e "" +echo -e "8.4 - dev - query-raw" +echo -e "=================================" +echo -e "Description:" +echo -e "raw query output." +echo -e "Command: ./${gameservername} query-raw" requiredstatus="ONLINE" fn_setstatus ( @@ -1001,15 +998,15 @@ fn_setstatus command_dev_query_raw.sh ) fn_test_result_na -echo "run order" -echo "=================" +echo -e "run order" +echo -e "=================" grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g' -echo "" -echo "=================================" -echo "Server Tests - Complete!" -echo "Using: ${gamename}" -echo "=================================" +echo -e "" +echo -e "=================================" +echo -e "Server Tests - Complete!" +echo -e "Using: ${gamename}" +echo -e "=================================" requiredstatus="OFFLINE" fn_setstatus fn_print_info "Tidying up directories."