Browse Source

chore(prettier): format code

pull/4854/head
dgibbs64 4 months ago
committed by GitHub Action
parent
commit
5023490a27
  1. 30
      .github/pull_request_template.md
  2. 30
      CODE_OF_CONDUCT.md
  3. 132
      CONTRIBUTING.md
  4. 20
      README.md
  5. 18
      lgsm/modules/README.md
  6. 2
      lgsm/modules/alert.sh
  7. 6
      lgsm/modules/core_modules.sh
  8. 2
      lgsm/modules/install_ut2k4_key.sh

30
.github/pull_request_template.md

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

30
CODE_OF_CONDUCT.md

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

132
CONTRIBUTING.md

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

20
README.md

@ -17,21 +17,21 @@ Traditionally game servers are not easy to manage yourself. Admins often have to
100+ game servers supported 100+ game servers supported
- :truck: Installer - :truck: Installer
- :mag: Monitor - :mag: Monitor
- :phone: Alerts - :phone: Alerts
- :cloud: Updater - :cloud: Updater
- :blue_book: Server Details - :blue_book: Server Details
- :floppy_disk: Backup - :floppy_disk: Backup
- :computer: Console - :computer: Console
## :penguin: Compatibility ## :penguin: Compatibility
LinuxGSM will run on popular distros as long as the minimum requirements are met. LinuxGSM will run on popular distros as long as the minimum requirements are met.
- Ubuntu - Ubuntu
- Debian - Debian
- CentOS - CentOS
Other distros are likely to work but are not fully tested. Other distros are likely to work but are not fully tested.

18
lgsm/modules/README.md

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

2
lgsm/modules/alert.sh

@ -20,7 +20,7 @@ fn_alert_log() {
fn_info_messages_gameserver_resource fn_info_messages_gameserver_resource
fn_info_messages_gameserver fn_info_messages_gameserver
fn_info_logs fn_info_logs
} | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" | tee -a "${alertlog}" >/dev/null 2>&1 } | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" | tee -a "${alertlog}" > /dev/null 2>&1
} }
fn_alert_test() { fn_alert_test() {

6
lgsm/modules/core_modules.sh

@ -14,7 +14,7 @@ modulesversion="v25.2.0"
core_dl.sh() { core_dl.sh() {
modulefile="${FUNCNAME[0]}" modulefile="${FUNCNAME[0]}"
if [ "$(type fn_fetch_core_dl 2>/dev/null)" ]; then if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then
fn_fetch_core_dl "lgsm/modules" "core_dl.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" fn_fetch_core_dl "lgsm/modules" "core_dl.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash"
else else
fn_bootstrap_fetch_file_github "lgsm/modules" "core_dl.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" fn_bootstrap_fetch_file_github "lgsm/modules" "core_dl.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash"
@ -43,7 +43,7 @@ core_github.sh() {
core_legacy.sh() { core_legacy.sh() {
modulefile="${FUNCNAME[0]}" modulefile="${FUNCNAME[0]}"
if [ "$(type fn_fetch_core_dl 2>/dev/null)" ]; then if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then
fn_fetch_core_dl "lgsm/modules" "core_legacy.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" fn_fetch_core_dl "lgsm/modules" "core_legacy.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash"
else else
fn_bootstrap_fetch_file_github "lgsm/modules" "core_legacy.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" fn_bootstrap_fetch_file_github "lgsm/modules" "core_legacy.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash"
@ -52,7 +52,7 @@ core_legacy.sh() {
core_messages.sh() { core_messages.sh() {
modulefile="${FUNCNAME[0]}" modulefile="${FUNCNAME[0]}"
if [ "$(type fn_fetch_core_dl 2>/dev/null)" ]; then if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then
fn_fetch_core_dl "lgsm/modules" "core_messages.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" fn_fetch_core_dl "lgsm/modules" "core_messages.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash"
else else
fn_bootstrap_fetch_file_github "lgsm/modules" "core_messages.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash" fn_bootstrap_fetch_file_github "lgsm/modules" "core_messages.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash"

2
lgsm/modules/install_ut2k4_key.sh

@ -18,7 +18,7 @@ if [ -z "${autoinstall}" ]; then
echo -e "Once you have the key enter it below" echo -e "Once you have the key enter it below"
echo -n "KEY: " echo -n "KEY: "
read -r CODE read -r CODE
printf '"CDKey"="%s"\n' "${CODE}" > "${systemdir}/cdkey" printf '"CDKey"="%s"\n' "${CODE}" > "${systemdir}/cdkey"
if [ -f "${systemdir}/cdkey" ]; then if [ -f "${systemdir}/cdkey" ]; then
fn_script_log_info "UT2K4 Server CD Key created" fn_script_log_info "UT2K4 Server CD Key created"
fi fi

Loading…
Cancel
Save