From 21fcdcf5901a626481a0192f16daf81da4102071 Mon Sep 17 00:00:00 2001 From: MicLieg <38057464+MicLieg@users.noreply.github.com> Date: Thu, 7 Mar 2024 02:13:36 +0100 Subject: [PATCH 1/4] Add .editorconfig, .gitignore, and .vscode/extensions.json files --- .editorconfig | 18 ++++++++++++++++++ .gitignore | 1 + .markdownlint.json | 9 +++++++++ .vscode/extensions.json | 8 ++++++++ 4 files changed, 36 insertions(+) create mode 100644 .editorconfig create mode 100644 .gitignore create mode 100644 .markdownlint.json create mode 100644 .vscode/extensions.json diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..9d741bd --- /dev/null +++ b/.editorconfig @@ -0,0 +1,18 @@ +# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs. +# Atom: Please assure your Atom's config setting Tab Type is set to auto, otherwise Atom-EditorConfig may not work as expected. Also disable whitespace package. +# http://editorconfig.org/ + +root = true + +[*] +charset = utf-8 +indent_style = tab +indent_size = 4 +trim_trailing_whitespace = true +end_of_line = lf +insert_final_newline = true + +# MARKDOWN Files +[*.{md}] +indent_style = space +indent_size = 4 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c6f9a44 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.vscode/settings.json diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 0000000..d3f9e5f --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,9 @@ +{ + "MD013": false, + "MD030": { + "ul_single": 3, + "ol_single": 1, + "ul_multi": 3, + "ol_multi": 1 + } + } diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..21a9ce2 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,8 @@ +{ + "recommendations": [ + "editorconfig.editorconfig", + "yzhang.markdown-all-in-one", + "DavidAnson.vscode-markdownlint", + "esbenp.prettier-vscode" + ] +} From 1ec7362c22e8d4fc0830879bea6050c505e931b8 Mon Sep 17 00:00:00 2001 From: MicLieg <38057464+MicLieg@users.noreply.github.com> Date: Wed, 7 Aug 2024 15:07:32 +0200 Subject: [PATCH 2/4] Added prettier config & edited markdownlint config --- .markdownlint.json | 17 +++++++++++------ .prettierrc | 1 + 2 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 .prettierrc diff --git a/.markdownlint.json b/.markdownlint.json index d3f9e5f..1fffd37 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -1,9 +1,14 @@ { + "MD007": { + "indent": 4 + }, "MD013": false, "MD030": { - "ul_single": 3, - "ol_single": 1, - "ul_multi": 3, - "ol_multi": 1 - } - } + "ul_single": 3, + "ol_single": 1, + "ul_multi": 3, + "ol_multi": 1 + }, + "MD033": false, + "MD034": false +} diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/.prettierrc @@ -0,0 +1 @@ +{} From daaade41f3286089703959dd6f0203f89a912dd4 Mon Sep 17 00:00:00 2001 From: MicLieg <38057464+MicLieg@users.noreply.github.com> Date: Wed, 7 Aug 2024 15:07:59 +0200 Subject: [PATCH 3/4] Fixed markdownlint errors --- README.md | 6 +- SUMMARY.md | 60 +++++++-------- code-standards/shellcheck-linter.md | 1 - code-standards/style-guide.md | 64 ++++++++-------- code-standards/text-editor-settings.md | 4 +- getting-started/adding-a-new-game-server.md | 29 ++++---- getting-started/developer-commands.md | 4 +- getting-started/development-software.md | 26 +++---- .../feature-development-quick-guide.md | 6 +- getting-started/programming-language.md | 8 +- getting-started/test-environment.md | 30 ++++---- technical/checks.md | 24 +++--- technical/commands.md | 2 +- technical/debuggins.md | 10 +-- technical/exit-codes.md | 71 +++++++++--------- technical/functions.md | 6 +- technical/game-server-querying.md | 1 - technical/install.md | 6 +- technical/messages-and-logs.md | 74 +++++++++---------- technical/modules.md | 30 ++++---- technical/modules/core.md | 8 +- technical/modules/fixes.md | 2 +- workflow/agile.md | 1 - workflow/branching.md | 2 +- workflow/conventional-commits.md | 1 - workflow/gitflow.md | 4 +- workflow/unit-tests.md | 1 - workflow/workflow.md | 5 +- 28 files changed, 236 insertions(+), 250 deletions(-) diff --git a/README.md b/README.md index c04fa22..127af2c 100644 --- a/README.md +++ b/README.md @@ -4,14 +4,14 @@ The command-line tool for quick, simple deployment and management of Linux dedicated game servers. -* User docs: [docs.linuxgsm.com](https://docs.linuxgsm.com) -* Dev Docs: [dev-docs.linuxgsm.com](https://dev-docs.linuxgsm.com) +- User docs: [docs.linuxgsm.com](https://docs.linuxgsm.com) +- Dev Docs: [dev-docs.linuxgsm.com](https://dev-docs.linuxgsm.com) ## Introduction Welcome to the LinuxGSM developer documentation that covers how to get started, tooling, workflow, best practices, and code standards. -If you want to contribute to LinuxGSM and need assistance feel free to pop on the LinuxGSM [Discord ](https://linuxgsm.com/discord)and have a chat with some of the contributors. +If you want to contribute to LinuxGSM and need assistance feel free to pop on the LinuxGSM [Discord](https://linuxgsm.com/discord)and have a chat with some of the contributors. ## Work in Progress diff --git a/SUMMARY.md b/SUMMARY.md index 5b487a4..82c8cc2 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -1,44 +1,44 @@ # Table of contents -* [Home](README.md) +- [Home](README.md) ## Getting Started -* [Getting Started](getting-started/feature-development-quick-guide.md) -* [Programming Language](getting-started/programming-language.md) -* [Development Software](getting-started/development-software.md) -* [Test Environment](getting-started/test-environment.md) -* [Developer Commands](getting-started/developer-commands.md) -* [Adding a new Game Server](getting-started/adding-a-new-game-server.md) +- [Getting Started](getting-started/feature-development-quick-guide.md) +- [Programming Language](getting-started/programming-language.md) +- [Development Software](getting-started/development-software.md) +- [Test Environment](getting-started/test-environment.md) +- [Developer Commands](getting-started/developer-commands.md) +- [Adding a new Game Server](getting-started/adding-a-new-game-server.md) ## Workflow -* [Semantic Versioning](workflow/semantic-versioning.md) -* [Workflow](workflow/workflow.md) -* [Agile](workflow/agile.md) -* [Pull Requests](workflow/branching.md) -* [Gitflow](workflow/gitflow.md) -* [Conventional Commits](workflow/conventional-commits.md) -* [Unit Tests](workflow/unit-tests.md) +- [Semantic Versioning](workflow/semantic-versioning.md) +- [Workflow](workflow/workflow.md) +- [Agile](workflow/agile.md) +- [Pull Requests](workflow/branching.md) +- [Gitflow](workflow/gitflow.md) +- [Conventional Commits](workflow/conventional-commits.md) +- [Unit Tests](workflow/unit-tests.md) ## Technical -* [Main Executable](technical/main-executable.md) -* [Commands](technical/commands.md) -* [Exit Codes](technical/exit-codes.md) -* [Functions](technical/functions.md) -* [Modules](technical/modules.md) - * [Fixes](technical/modules/fixes.md) - * [Core](technical/modules/core.md) -* [Game Server Querying](technical/game-server-querying.md) -* [Messages & Logs](technical/messages-and-logs.md) -* [Checks](technical/checks.md) -* [Exit](technical/exit.md) -* [Install](technical/install.md) -* [Debuggins](technical/debuggins.md) +- [Main Executable](technical/main-executable.md) +- [Commands](technical/commands.md) +- [Exit Codes](technical/exit-codes.md) +- [Functions](technical/functions.md) +- [Modules](technical/modules.md) + - [Fixes](technical/modules/fixes.md) + - [Core](technical/modules/core.md) +- [Game Server Querying](technical/game-server-querying.md) +- [Messages & Logs](technical/messages-and-logs.md) +- [Checks](technical/checks.md) +- [Exit](technical/exit.md) +- [Install](technical/install.md) +- [Debuggins](technical/debuggins.md) ## Code Standards -* [Style Guide](code-standards/style-guide.md) -* [Shellcheck Linter](code-standards/shellcheck-linter.md) -* [Text Editor Settings](code-standards/text-editor-settings.md) +- [Style Guide](code-standards/style-guide.md) +- [Shellcheck Linter](code-standards/shellcheck-linter.md) +- [Text Editor Settings](code-standards/text-editor-settings.md) diff --git a/code-standards/shellcheck-linter.md b/code-standards/shellcheck-linter.md index 952bd29..65b1eb3 100644 --- a/code-standards/shellcheck-linter.md +++ b/code-standards/shellcheck-linter.md @@ -1,4 +1,3 @@ # Shellcheck Linter \[WIP\] - diff --git a/code-standards/style-guide.md b/code-standards/style-guide.md index 3b323b3..c10c979 100644 --- a/code-standards/style-guide.md +++ b/code-standards/style-guide.md @@ -5,7 +5,7 @@ Here are some of them. ## Variables -#### Naming variables +### Naming variables Variables should be made of lowercase letters only and should be descriptive enough to understand its purpose (even if the variable is longer that preferred). @@ -25,7 +25,7 @@ Variable should always be called between brackets and double quotes to prevent g echo "${var}" ``` -### Directories +## Directories Directories are called using LinuxGSM directories variables, or relative to those. Common directory variables can be found in `linuxgsm.sh` and `_default.cfg` . @@ -42,7 +42,7 @@ find "${executabledir}/bin" If statements should look like the following -``` +```bash if [ "${shortname}" == "csgo" ];then # content fi @@ -50,7 +50,7 @@ fi if statements with multiple options like so -``` +```bash if [ "${shortname}" == "csgo" ]||[ "${shortname}" == "css" ]; then # content fi @@ -60,9 +60,9 @@ fi ### Syntax -* The `if [ statement ]; then` should be a one-liner operation. -* Signs comparators like `==`, `lt`, `lt` etc. are preferred to `-eq`, `-le`, `-lt`. -* Anything within an if statement must be tabulated one step deeper. +- The `if [ statement ]; then` should be a one-liner operation. +- Signs comparators like `==`, `lt`, `lt` etc. are preferred to `-eq`, `-le`, `-lt`. +- Anything within an if statement must be tabulated one step deeper. Example: @@ -74,7 +74,7 @@ fi ### Expression Standards -Common if expressions LinuxGSM uses. More expressions [here](http://tldp.org/LDP/Bash-Beginners-Guide/html/sect\_07\_01.html). +Common if expressions LinuxGSM uses. More expressions [here](http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_07_01.html). | Expression | Description | | ---------- | ------------------------------------ | @@ -109,7 +109,7 @@ if [ -z "${var}" ]; then fi ``` -``` +```bash var="" # OR var="set" @@ -118,7 +118,7 @@ if [ -v var ]; then fi ``` -``` +```bash # var is missing if [ ! -v var ]; then # Variable does not exist @@ -127,8 +127,8 @@ fi ## Loops -* Loops should be a one liner statement. -* Anything within a loop must be tabulated one step deeper. +- Loops should be a one liner statement. +- Anything within a loop must be tabulated one step deeper. ```bash while [ "${var}" < "${cap}" ]; do @@ -139,7 +139,7 @@ done ## Comments -As English is not always the native language of a developer, comments should use a formal writing style and be straight to the point. If unsure this short formal writing [guide](http://www2.ivcc.edu/rambo/tip\_formal\_writing\_voice.htm) will help. +As English is not always the native language of a developer, comments should use a formal writing style and be straight to the point. If unsure this short formal writing [guide](http://www2.ivcc.edu/rambo/tip_formal_writing_voice.htm) will help. ```bash # Using comments help developers understand complex code, but should be used sparingly. @@ -147,9 +147,9 @@ As English is not always the native language of a developer, comments should use ## Functions -* Function should be named starting with `fn_` and using lowercase letters only. -* Any recurrent task should be put into a function. -* Anything within a function must be tabulated one step deeper. +- Function should be named starting with `fn_` and using lowercase letters only. +- Any recurrent task should be put into a function. +- Anything within a function must be tabulated one step deeper. Example: @@ -161,56 +161,56 @@ fn_myfunction(){ ## Messages -* Messages should be given using core\_messages.sh forms -* Additional information messages are given in the form of `echo -e " * Message here"` +- Messages should be given using core_messages.sh forms +- Additional information messages are given in the form of `echo -e " * Message here"` ## Automated Messages -Automated messages are used with any commands that are non-interactive. Examples of this include Start, Stop and Monitor. There are various different alert messages available see [Exit-Codes](broken-reference) for details. +Automated messages are used with any commands that are non-interactive. Examples of this include Start, Stop and Monitor. There are various different alert messages available see [Exit-Codes](../technical/exit-codes.md) for details. Each automated message starts with `fn_print_dots` to show a process is happening but with no known outcome. -`fn_print_dots` +### `fn_print_dots` -``` +Once an outcome of a process is known the message uses an outcome message like `fn_print_ok` or `fn_print_fail` + +```text [ .... ] Starting fctrserver: ``` -Once an outcome of a process is known the message uses an outcome message like `fn_print_ok` or `fn_print_fail` +### `fn_print_ok` -fn\_print\_ok - -``` +```text [ OK ] Starting fctrserver: Factorio Server ``` The option of a newline is also available by appending `_nl` for example `fn_print_ok_nl`. This will add a carriage return to the message preventing it being overwritten by the next message. -``` +```text [ OK ] Stopping fctrserver: Graceful: CTRL+c: 2: OK [ .... ] Starting fctrserver: Factorio Server ``` -#### Characteristics +### Characteristics of Automated Messages -Interactive messages contain extra detail at the begining of the message that is pre-populated. Full stops must `not` be used with this type of message. +Automated messages contain extra detail at the begining of the message that is pre-populated. Full stops must `not` be used with this type of message. -### Interactive Messages +## Interactive Messages Interactive messages are used with any commands that have interactive elements. Examples of this include Install, console and debug. There are various different alert messages available see \[\[Exit-Codes]] for details. -``` +```text Warning! If fctrserver is already running it will be stopped. ``` standard echo commands are normally used to supplement an alert or if an alert is not required. Bullet points can also be used -``` +```bash Information! Press "CTRL+b" then "d" to exit console. Warning! Do NOT press CTRL+c to exit. * https://docs.linuxgsm.com/commands/console ``` -#### Characteristics +### Characteristics of Interactive Messages Treat interactive messages as a standard sentence. All messages must begin with a capital and end with a full stop diff --git a/code-standards/text-editor-settings.md b/code-standards/text-editor-settings.md index a828a3c..d6db266 100644 --- a/code-standards/text-editor-settings.md +++ b/code-standards/text-editor-settings.md @@ -1,5 +1,5 @@ --- -description: '[WIP] discuss using LF and white space remover etc.' +description: "[WIP] discuss using LF and white space remover etc." --- # Text Editor Settings @@ -20,7 +20,7 @@ For more info about line endings check out the article "[The Great Newline Schis When developing code sometimes it can be easy to end up with trailing white spaces. as shown below. -``` +```bash fn_example_func(){ # The line below has two spaces after its final character code•• diff --git a/getting-started/adding-a-new-game-server.md b/getting-started/adding-a-new-game-server.md index a34f3d6..84337c8 100644 --- a/getting-started/adding-a-new-game-server.md +++ b/getting-started/adding-a-new-game-server.md @@ -6,7 +6,7 @@ Adding a new game server is one of the most common things developers do. This gu replace gameserver with the name of the new server e.g rustserver {% endhint %} -### Create new \_default.cfg config file +## Create new \_default.cfg config file Firstly create a new `_default.cfg` file in `lgsm/config-default/config-lgsm/gameserver` . An existing \_default.cfg file can be used as a template. @@ -14,15 +14,15 @@ Update all the variables in the new `_default.cfg` file to fit the new server. Some common variables that will need updating: -* Add `## SteamCMD Login` section only if required. -* `startparameters` are any parameters the executable requires to run the game server. -* `appid` used to download a game server from Steam. Remove if not using steam. -* `steammaster` used if the game servers are listed on the Steam master servers. -* `stopmode` defines how a server can safely exit. -* `querymode` defines the type of query monitor that can be used to check the server is responding. -* console type highlights to users if the console outputs and is interactive. -* Game Server Details `gamename` , `engine`, `glibc`. -* Various directory and config variables. +- Add `## SteamCMD Login` section only if required. +- `startparameters` are any parameters the executable requires to run the game server. +- `appid` used to download a game server from Steam. Remove if not using steam. +- `steammaster` used if the game servers are listed on the Steam master servers. +- `stopmode` defines how a server can safely exit. +- `querymode` defines the type of query monitor that can be used to check the server is responding. +- console type highlights to users if the console outputs and is interactive. +- Game Server Details `gamename` , `engine`, `glibc`. +- Various directory and config variables. ## Add the new server to serverlist.csv @@ -32,10 +32,10 @@ Add the new server details to `serverlist.csv` as well as add any dependency req Some game servers require alterations before they can start common examples include: -* copying library files to serverfiles -* symlinking files -* creating directories -* adding a directory to `LD_LIBRARY_PATH` +- copying library files to serverfiles +- symlinking files +- creating directories +- adding a directory to `LD_LIBRARY_PATH` If this is required a fix module will need to be created. @@ -71,4 +71,3 @@ Not all game servers use SteamCMD. If this is the case a custom update module wi ## Custom Commands Some game servers may require bespoke commands to complete tasks. Examples of this include Teamspeak 3 and Unreal Tournament 2004. Take a look at the `core_getopts.sh` module for examples of how to add commands. - diff --git a/getting-started/developer-commands.md b/getting-started/developer-commands.md index 88d1ba1..a718a9f 100644 --- a/getting-started/developer-commands.md +++ b/getting-started/developer-commands.md @@ -12,7 +12,7 @@ LinuxGSM provides commands to help developers gather information about the game | Query Raw | `./gameserver query-raw` | `./gameserver qr` | | Clear Functions | `./gameserver clear-modules` | `./gameserver cm` | -### Developer +## Developer The `developer` command enables development mode allowing access to all hidden developer commands. @@ -27,7 +27,7 @@ This command also enables dev debug that outputs everything LinuxGSM is doing to Detects variables that are set up to be displayed in details. -``` +```bash ./gameserver detect-details ./gameserver ddt ``` diff --git a/getting-started/development-software.md b/getting-started/development-software.md index 00d6478..89b6360 100644 --- a/getting-started/development-software.md +++ b/getting-started/development-software.md @@ -14,10 +14,10 @@ LinuxGSM uses [GitHub](https://github.com) to host the code, manage issues, and LinuxGSM is written in BASH and can be developed simply by using a text editor. The recommended text editor is [VSCode](https://code.visualstudio.com/) as it is free and integrates with GitHub and WSL. However, if you are more comfortable with another editor that is fine. For specific requirements for text editors see [Text Editor Settings](https://linuxgsm/s/linuxgsm-dev/text-editor-settings). -* [VSCode](https://code.visualstudio.com/) (recommended) -* [Sublime Text](https://www.sublimetext.com/) -* [Notepad++](https://notepad-plus-plus.org/) -* [Neovim](https://neovim.io/) +- [VSCode](https://code.visualstudio.com/) (recommended) +- [Sublime Text](https://www.sublimetext.com/) +- [Notepad++](https://notepad-plus-plus.org/) +- [Neovim](https://neovim.io/) {% embed url="https://www.youtube.com/watch?v=KMxo3T_MTvY" %} @@ -29,19 +29,19 @@ The LinuxGSM project uses Git as version control software. It is important you h To work on the project, edit code, and create branches a Git client is required. GitKracken as it is feature-rich and easy to understand the branch relationships. GitHub Desktop is a great client for beginners as well as VSCode's built-in Git Client. -* [GitKracken](https://www.gitkraken.com/) -* [VSCode](https://code.visualstudio.com/docs/sourcecontrol/overview) -* [Github Desktop](https://desktop.github.com/) -* [Git](https://git-scm.com/downloads) +- [GitKracken](https://www.gitkraken.com/) +- [VSCode](https://code.visualstudio.com/docs/sourcecontrol/overview) +- [Github Desktop](https://desktop.github.com/) +- [Git](https://git-scm.com/downloads) ## SSH Client To connect to Linux servers an SSH client is needed. There are various clients available to choose from. For Windows, MobaXterm is a great option for the classic PuTTY. For Linux and Mac Remmina works well for saving SSH sessions. -* [Termius](https://termius.com/) (Cross-platform) -* [MobaXterm](https://mobaxterm.mobatek.net/) (Windows) -* [Putty](https://www.chiark.greenend.org.uk/\~sgtatham/putty/latest.html) (Windows) -* [Remmina](https://remmina.org/) (Linux & Mac) +- [Termius](https://termius.com/) (Cross-platform) +- [MobaXterm](https://mobaxterm.mobatek.net/) (Windows) +- [Putty](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html) (Windows) +- [Remmina](https://remmina.org/) (Linux & Mac) ## Discord @@ -50,5 +50,3 @@ The LinuxGSM project uses [Discord](https://discordapp.com) as the main method o ## SteamDB [SteamDB](https://steamdb.info/) is a great resource for finding data related to Steam. This can be used to look up appid's for game servers as well as checking if a game server supports Linux. For example, The Rust dedicated server is found here [https://steamdb.info/app/258550/info/](https://steamdb.info/app/258550/info/) - -## diff --git a/getting-started/feature-development-quick-guide.md b/getting-started/feature-development-quick-guide.md index 5ad36ef..af76909 100644 --- a/getting-started/feature-development-quick-guide.md +++ b/getting-started/feature-development-quick-guide.md @@ -24,8 +24,4 @@ To begin working on LinuxGSM you need to [fork](https://help.github.com/en/githu It is recommended you create a [branch](../@linuxgsm/s/linuxgsm-dev/branching/) to develop your code. The branch should use the Gitflow methodology and should be named `feature/[featurename]`. -Once a change has been made and saved the change will need to be committed to your local repo. When using commit it is important to leave a useful message to describe the change, this is covered in [Conventional Commits](../@linuxgsm/s/linuxgsm-dev/conventional-commits/). When you are ready to send your commits to your remote fork you will need to [push ](https://help.github.com/en/github/using-git/pushing-commits-to-a-remote-repository)the updates. - -## - -## +Once a change has been made and saved the change will need to be committed to your local repo. When using commit it is important to leave a useful message to describe the change, this is covered in [Conventional Commits](../@linuxgsm/s/linuxgsm-dev/conventional-commits/). When you are ready to send your commits to your remote fork you will need to [push](https://help.github.com/en/github/using-git/pushing-commits-to-a-remote-repository)the updates. diff --git a/getting-started/programming-language.md b/getting-started/programming-language.md index 9cc08cd..0ebfb97 100644 --- a/getting-started/programming-language.md +++ b/getting-started/programming-language.md @@ -1,8 +1,8 @@ # Programming Language -![](../.gitbook/assets/68747470733a2f2f63646e2e7261776769742e636f6d2f6f64622f6f6666696369616c2d626173682d6c6f676f2f6d617374.png) +![BASH logo](../.gitbook/assets/68747470733a2f2f63646e2e7261776769742e636f6d2f6f64622f6f6666696369616c2d626173682d6c6f676f2f6d617374.png) -LinuxGSM is written in [Bourne-Again Shell](https://en.wikipedia.org/wiki/Bash\_\(Unix\_shell\)) (BASH) Script sometimes just known as Shell Script. +LinuxGSM is written in [Bourne-Again Shell]() (BASH) Script sometimes just known as Shell Script. ## What is BASH? @@ -12,11 +12,11 @@ _BASH_ is a "Unix shell": a command-line interface for interacting with the oper ## What is BASH Script? -"In addition to the interactive mode, where the user types one command at a time, with immediate execution and feedback, Bash (like many other shells) also has the ability to run an entire script of commands, known as a "Bash shell script" (or "Bash script" or "shell script" or just "script"). A script might contain just a very simple list of commands — or even just a single command — or it might contain functions, loops, conditional constructs, and all the other hallmarks of imperative programming. In effect, a Bash shell script is a computer program written in the Bash programming language." -[ Bash Shell Scripting](https://en.wikibooks.org/wiki/Bash\_Shell\_Scripting#What\_is\_Bash?) +"In addition to the interactive mode, where the user types one command at a time, with immediate execution and feedback, Bash (like many other shells) also has the ability to run an entire script of commands, known as a "Bash shell script" (or "Bash script" or "shell script" or just "script"). A script might contain just a very simple list of commands — or even just a single command — or it might contain functions, loops, conditional constructs, and all the other hallmarks of imperative programming. In effect, a Bash shell script is a computer program written in the Bash programming language." -[Bash Shell Scripting](https://en.wikibooks.org/wiki/Bash_Shell_Scripting#What_is_Bash?) ## Why Does LinuxGSM use BASH? -BASH script is often used by Linux System Administrators to automate repetitive tasks on Linux servers and is often used in the same way Windows Admins use [BATCH](https://en.wikipedia.org/wiki/Batch\_file) Script or [Powershell](https://learn.microsoft.com/en-us/powershell/scripting/overview?view=powershell-7.3) on Windows. BASH is available on all Linux systems, it is very stable and reliable and most people who interact with Linux will have had some exposure to it. +BASH script is often used by Linux System Administrators to automate repetitive tasks on Linux servers and is often used in the same way Windows Admins use [BATCH](https://en.wikipedia.org/wiki/Batch_file) Script or [Powershell](https://learn.microsoft.com/en-us/powershell/scripting/overview?view=powershell-7.3) on Windows. BASH is available on all Linux systems, it is very stable and reliable and most people who interact with Linux will have had some exposure to it. LinuxGSM started as a simple BASH script to easily control and manage a game server (Killing Floor). As Daniel Gibbs (lead developer) was a Linux Systems Administrator at the time and other examples of managing game servers often used BASH it simply made sense to use it. diff --git a/getting-started/test-environment.md b/getting-started/test-environment.md index dcb6356..580ff24 100644 --- a/getting-started/test-environment.md +++ b/getting-started/test-environment.md @@ -20,11 +20,11 @@ For developers using Windows, Windows Subsystem for Linux (WSL) provides an effi Creating a virtual machine on your desktop or laptop is a versatile way to create a development environment. You can use tools like VirtualBox to download an Ubuntu Server ISO and quickly set up a test environment. Note that for testing internet functionality, you may need to configure port forwarding on your home router. -* [Virtual Box](https://www.virtualbox.org/) -* [VMware Player](https://www.vmware.com/uk/products/workstation-player.html) -* [ESXI Server](https://www.vmware.com/uk/products/esxi-and-esx.html) -* [Xen](https://xenproject.org/) -* [Proxmox](https://www.proxmox.com/) +- [Virtual Box](https://www.virtualbox.org/) +- [VMware Player](https://www.vmware.com/uk/products/workstation-player.html) +- [ESXI Server](https://www.vmware.com/uk/products/esxi-and-esx.html) +- [Xen](https://xenproject.org/) +- [Proxmox](https://www.proxmox.com/) ### Internet Server @@ -32,38 +32,38 @@ Renting a virtual private server (VPS) or dedicated server can be an excellent c Notable providers include: -* [Linode](https://linode.com/) -* [Digital Ocean](https://www.digitalocean.com/) -* [OVHCloud](https://ovhcloud.com) -* [Oneprovider](https://oneprovider.com/) -* [Kimsufi](https://www.kimsufi.com/) +- [Linode](https://linode.com/) +- [Digital Ocean](https://www.digitalocean.com/) +- [OVHCloud](https://ovhcloud.com) +- [Oneprovider](https://oneprovider.com/) +- [Kimsufi](https://www.kimsufi.com/) ## **Testing Your Code** At some point, you will need to test the code you have worked on. This can be done by downloading LinuxGSM and updating the repo and branch details to match your fork. -#### Setup Testing Environment +### Setup Testing Environment Login to your development environment and begin installing LinuxGSM. 1. Create a user and log in. -``` +```bash adduser linuxgsm ``` -``` +```bash passwd linuxgsm ``` -``` +```bash su - linuxgsm ``` > replace `[gameserver]` with the game server you are developing. ```bash -mkdir [gameserver] +mkdir [gameserver] ``` 2. Download linuxgsm.sh. diff --git a/technical/checks.md b/technical/checks.md index 5d2944d..54bfe5f 100644 --- a/technical/checks.md +++ b/technical/checks.md @@ -4,15 +4,15 @@ Any script file must run `check.sh` at some point. Within `check.sh`, you will t There are several checks available: -* check\_config.sh checks for a missing config file or a wrong parameter. -* check\_deps.sh checks for missing dependencies and contains requirements -* check\_glibs.sh checks if the server has the correct Glibc version or a fix available. -* check\_ip.sh automatically identifies the server interface IP. -* check\_logs.sh checks if log files exist. -* check\_permissions.sh checks ownership & permissions of scripts, files and directories -* check\_root.sh checks if the user tried to run the script as root -* check\_status.sh checks the process status of the server. Either online or offline -* check\_steamcmd.sh checks if SteamCMD is installed correctly -* check\_system\_dir.sh checks if systemdir is accessible -* check\_system\_requirements.sh checks RAM requirements (maybe more into the future) -* check\_tmuxception.sh checks and prevents server start from tmux or screen +- check_config.sh checks for a missing config file or a wrong parameter. +- check_deps.sh checks for missing dependencies and contains requirements +- check_glibs.sh checks if the server has the correct Glibc version or a fix available. +- check_ip.sh automatically identifies the server interface IP. +- check_logs.sh checks if log files exist. +- check_permissions.sh checks ownership & permissions of scripts, files and directories +- check_root.sh checks if the user tried to run the script as root +- check_status.sh checks the process status of the server. Either online or offline +- check_steamcmd.sh checks if SteamCMD is installed correctly +- check_system_dir.sh checks if systemdir is accessible +- check_system_requirements.sh checks RAM requirements (maybe more into the future) +- check_tmuxception.sh checks and prevents server start from tmux or screen diff --git a/technical/commands.md b/technical/commands.md index 2ead70e..886b951 100644 --- a/technical/commands.md +++ b/technical/commands.md @@ -1,6 +1,6 @@ # Commands -## Commands +## What are commands? Within LinuxGSM there are many commands that a user will run to complete tasks such as start, stop, monitor, and details. Command scripts are stored will all other modules and are always named something like `command_install.sh`. See the [commands](broken-reference) page for more info. diff --git a/technical/debuggins.md b/technical/debuggins.md index f16eee7..be10e8c 100644 --- a/technical/debuggins.md +++ b/technical/debuggins.md @@ -2,14 +2,14 @@ ## Testing and debugging your code -#### Working from your own GitHub branch +### Working from your own GitHub branch You will usually be developing onto your own repo. Using your own repo instead of the original one is quite easy. 1. Display your main "gameserver" file on GitHub, and select "Raw". 2. Make a test user, login to it 3. wget your Raw link and chmod +x the script. -4. Edit your "gameserver" file by changing GitHub information to your username and repo and branch. +4. Edit your "gameserver" file by changing GitHub information to your username and repo and branch. ```bash ## Github Branch Select @@ -22,11 +22,11 @@ You will usually be developing onto your own repo. Using your own repo instead o Now, any command you run will get your own GitHub files, and after any change you make on your repo, `./gameserver uf` will grab new files. If you make a change and that `./gameserver uf` don't get them, it means you were too quick, and that your curl still has old files in cache; in this case, you'll need to wait a few minutes to get your modifications. -#### How to test +### How to test -You need to make sure that all needed commands displayed in opt work properly. So just run `./gameserver` to show available commands, then try commands one by one. A common procedure is to first work on command\_install, then start, then stop, then debug, then details, then monitor. +You need to make sure that all needed commands displayed in opt work properly. So just run `./gameserver` to show available commands, then try commands one by one. A common procedure is to first work on command_install, then start, then stop, then debug, then details, then monitor. -#### Oops, I found a bug! +### Oops, I found a bug If you found a bug, either you'll instantly know how to fix it, or you won't. And either it will be a bug caused by your own code or a bug into LinuxGSM itself. So let's address those cases. diff --git a/technical/exit-codes.md b/technical/exit-codes.md index 4bab08c..98f550e 100644 --- a/technical/exit-codes.md +++ b/technical/exit-codes.md @@ -4,73 +4,75 @@ Below is a list of exit codes and explanations for each code. An exit code hight to see the exit code you can activate developer mode. -```text +```bash ./gameserver developer ``` +## Types of Exit Codes + ### Pass -* **Code:** 0 -* **Description:** This code is returned when all is well. -* **On Screen Automated:** \[ OK \] -* **On Screen Interactive:** Complete! -* **Logfile:** PASS +- **Code:** 0 +- **Description:** This code is returned when all is well. +- **On Screen Automated:** \[ OK \] +- **On Screen Interactive:** Complete! +- **Logfile:** PASS ### Fatal -* **Code:** 1 -* **Description:** Fatal errors occur when LinuxGSM is prevented from completing its task. e.g it was unable to start a server. -* **On Screen Automated:** \[ FAIL \] -* **On Screen Interactive:** Failure! -* **Logfile:** FATAL +- **Code:** 1 +- **Description:** Fatal errors occur when LinuxGSM is prevented from completing its task. e.g it was unable to start a server. +- **On Screen Automated:** \[ FAIL \] +- **On Screen Interactive:** Failure! +- **Logfile:** FATAL ### Error -* **Code:** 2 -* **Description:** An error occurs when LinuxGSM can complete its task however something went wrong. In many cases LinuxGSM will attempt to resolve errors itself. -* **On Screen Automated:** \[ ERROR \] -* **On Screen Interactive:** Error! -* **Logfile:** ERROR +- **Code:** 2 +- **Description:** An error occurs when LinuxGSM can complete its task however something went wrong. In many cases LinuxGSM will attempt to resolve errors itself. +- **On Screen Automated:** \[ ERROR \] +- **On Screen Interactive:** Error! +- **Logfile:** ERROR ### Warning -* **Code:** 3 -* **Description:** Warnings happen when there is something mis-configured or not setup correctly. LinuxGSM may still work but not do as expected. -* **On Screen:** \[ WARN \] -* **On Screen Automated:** \[ WARN \] -* **On Screen Interactive:** Warning! -* **Logfile:** WARN +- **Code:** 3 +- **Description:** Warnings happen when there is something mis-configured or not setup correctly. LinuxGSM may still work but not do as expected. +- **On Screen:** \[ WARN \] +- **On Screen Automated:** \[ WARN \] +- **On Screen Interactive:** Warning! +- **Logfile:** WARN ### Info -* **Code:** N/A -* **Description:** Useful information about what LinuxGSM is currently doing. -* **On Screen:** -* **On Screen Automated:** \[ INFO \] -* **On Screen Interactive:** Information! -* **Logfile:** INFO +- **Code:** N/A +- **Description:** Useful information about what LinuxGSM is currently doing. +- **On Screen:** +- **On Screen Automated:** \[ INFO \] +- **On Screen Interactive:** Information! +- **Logfile:** INFO -### How to used exit codes in code +## How to use exit codes in code -An exit code is generated when you specify a logfile message e.g __`fn_script_log_fatal`. When you want the script to exit you must use `core_exit.sh` rather than just the exit command. `core_exit.sh` will then handle the exit and specify the last know exit code. So if the more recent command was `fn_script_log_fatal`then the exit code will be 1 +An exit code is generated when you specify a logfile message e.g `fn_script_log_fatal`. When you want the script to exit you must use `core_exit.sh` rather than just the exit command. `core_exit.sh` will then handle the exit and specify the last known exit code. So if the more recent command was `fn_script_log_fatal` then the exit code will be 1 -#### Examples +### Examples -```text +```bash fn_script_log_fatal "RCON password is not set" core_exit.sh ``` This will exit with code 1 -```text +```bash fn_script_log_error "RCON password is not set" core_exit.sh ``` This will exit with code 2 -```text +```bash fn_script_log_error "SteamCMD is missing" LinuxGSM installs SteamCMD fn_script_log_pass "SteamCMD has been installed" @@ -78,4 +80,3 @@ core_exit.sh ``` This will exit with code 0 - diff --git a/technical/functions.md b/technical/functions.md index 6207f97..284bb37 100644 --- a/technical/functions.md +++ b/technical/functions.md @@ -10,11 +10,11 @@ For LinuxGSM development, it is important that developers understand what a func ### Examples -``` +```text fn_stop_graceful_cmd ``` -``` +```text fn_update_ts3_dl ``` @@ -22,7 +22,7 @@ fn_update_ts3_dl All functions should be formatted with the following syntax. -``` +```bash fn_function_name(){ code } diff --git a/technical/game-server-querying.md b/technical/game-server-querying.md index 90c3076..265fc4e 100644 --- a/technical/game-server-querying.md +++ b/technical/game-server-querying.md @@ -1,4 +1,3 @@ # Game Server Querying \[WIP\] - diff --git a/technical/install.md b/technical/install.md index 4855cc3..25e7976 100644 --- a/technical/install.md +++ b/technical/install.md @@ -1,10 +1,10 @@ # Install -#### Server installation +## Server installation Installing a new server is mainly done through two scripts: -* install\_server\_files.sh -* install\_config.sh +- install_server_files.sh +- install_config.sh Sometimes, another script is required, such as for TeamSpeak 3: `update_ts3.sh` diff --git a/technical/messages-and-logs.md b/technical/messages-and-logs.md index e032197..e66d022 100644 --- a/technical/messages-and-logs.md +++ b/technical/messages-and-logs.md @@ -4,43 +4,43 @@ LGSM has a message/logging framework to avoid painful syntax into scripts. Framework syntax is: `fn_print_whatever "This is your message"` If you want to replace the line afterwards, then reuse `fn_print_whatever`. If you want a new output on a new line, then use `fn_print_whatever_nl`. "nl" stands for "new line". -**On-Screen - Automated functions** - -* \[ .... ] | fn\_print\_dots | fn\_print\_dots\_nl -* \[ OK ] | fn\_print\_ok | fn\_print\_ok\_nl -* \[ FAIL ] | fn\_print\_fail | fn\_print\_fail\_nl -* \[ ERROR ] | fn\_print\_error | fn\_print\_error\_nl -* \[ WARN ] | fn\_print\_warn | fn\_print\_warn\_nl -* \[ INFO ] | fn\_print\_info | fn\_print\_info\_nl - -**On-Screen - Interactive messages** - -* Print $gamename $commandaction and jump some lines | fn\_print\_header (used at the beginning of a command) -* Complete! |fn\_print\_complete | fn\_print\_complete\_nl -* Failure! | fn\_print\_failure | fn\_print\_failure\_nl -* Error! | fn\_print\_error2 | fn\_print\_error2\_nl -* Warning! | fn\_print\_warning | fn\_print\_warning\_nl -* Information! | fn\_print\_information | fn\_print\_information\_nl - -**On-Screen End of Line** - -* OK| fn\_print\_ok\_eol | fn\_print\_ok\_eol\_nl -* FAIL | fn\_print\_fail\_eol | fn\_print\_fail\_eol\_nl -* WARN | fn\_print\_warn\_eol | fn\_print\_warn\_eol\_nl -* FAIL | fn\_print\_info\_eol | fn\_print\_info\_eol\_nl -* QUERYING | fn\_print\_querying\_eol | fn\_print\_querying\_eol\_nl -* CHECKING | fn\_print\_checking\_eol | fn\_print\_checking\_eol\_nl -* CANCELED | fn\_print\_canceled\_eol | fn\_print\_canceled\_eol\_nl -* REMOVED | fn\_print\_removed\_eol | fn\_print\_removed\_eol\_nl -* UPDATE | fn\_print\_update\_eol | fn\_print\_update\_eol\_nl - -**Logging** +## On-Screen - Automated functions + +- [ .... ] | fn_print_dots | fn_print_dots_nl +- [ OK ] | fn_print_ok | fn_print_ok_nl +- [ FAIL ] | fn_print_fail | fn_print_fail_nl +- [ ERROR ] | fn_print_error | fn_print_error_nl +- [ WARN ] | fn_print_warn | fn_print_warn_nl +- [ INFO ] | fn_print_info | fn_print_info_nl + +## On-Screen - Interactive messages + +- Print $gamename $commandaction and jump some lines | fn_print_header (used at the beginning of a command) +- Complete! |fn_print_complete | fn_print_complete_nl +- Failure! | fn_print_failure | fn_print_failure_nl +- Error! | fn_print_error2 | fn_print_error2_nl +- Warning! | fn_print_warning | fn_print_warning_nl +- Information! | fn_print_information | fn_print_information_nl + +## On-Screen End of Line + +- OK| fn_print_ok_eol | fn_print_ok_eol_nl +- FAIL | fn_print_fail_eol | fn_print_fail_eol_nl +- WARN | fn_print_warn_eol | fn_print_warn_eol_nl +- FAIL | fn_print_info_eol | fn_print_info_eol_nl +- QUERYING | fn_print_querying_eol | fn_print_querying_eol_nl +- CHECKING | fn_print_checking_eol | fn_print_checking_eol_nl +- CANCELED | fn_print_canceled_eol | fn_print_canceled_eol_nl +- REMOVED | fn_print_removed_eol | fn_print_removed_eol_nl +- UPDATE | fn_print_update_eol | fn_print_update_eol_nl + +## Logging Syntax: `fn_script_log "Message goes here."` Output: `## Feb 28 14:56:58 ut99-server: Monitor: Message goes here.` -* Simple action log | fn\_script\_log -* PASS (a successful test) | fn\_script\_log\_pass -* FATAL (an error has interrupted LGSM) | fn\_script\_log\_fatal -* ERROR | fn\_script\_log\_error -* WARN | fn\_script\_log\_warn -* INFO | fn\_script\_log\_info +- Simple action log | fn_script_log +- PASS (a successful test) | fn_script_log_pass +- FATAL (an error has interrupted LGSM) | fn_script_log_fatal +- ERROR | fn_script_log_error +- WARN | fn_script_log_warn +- INFO | fn_script_log_info diff --git a/technical/modules.md b/technical/modules.md index da78bd4..331d4c9 100644 --- a/technical/modules.md +++ b/technical/modules.md @@ -8,30 +8,30 @@ A command will call upon modules to complete various command tasks. Modules are Modules are located in the `modules` directory, -``` +```text lgsm/modules ``` -### Module Groups +## Module Groups Modules are split into logical groups depending on the type of task being carried out. -* alert – Sending alert notifications -* check – completes checks before a command runs. -* command – the command module that runs specific command tasks. -* core – core modules that are required to run LinuxGSM. -* fix – apply game server-specific fixes to allow the game server to run correctly. -* info – gathers info from sources such as the OS and game server. -* install - modules related to installation -* mods – handles game server mods -* query – game server query modules -* update – handles updating of game servers and LinuxGSM +- **alert** - Sending alert notifications +- **check** - completes checks before a command runs. +- **command** - the command module that runs specific command tasks. +- **core** - core modules that are required to run LinuxGSM. +- **fix** - apply game server-specific fixes to allow the game server to run correctly. +- **info** - gathers info from sources such as the OS and game server. +- **install** - modules related to installation +- **mods** - handles game server mods +- **query** - game server query modules +- **update** - handles updating of game servers and LinuxGSM ### Module Pointer Some modules such as `fix.sh` and `check.sh` are made up of smaller tasks that are split up into sub-modules. Because of this, these modules become pointers for their sub-modules that will upon the sub-modules as required. -An example of this is when check.sh will be called within command\_start.sh, it will automatically select which sub-module tasks are required and run them. +An example of this is when check.sh will be called within command_start.sh, it will automatically select which sub-module tasks are required and run them. ### Core Modules @@ -41,7 +41,7 @@ Core modules handle vital are required by LinuxGSM. These include download, geto Modules will launch in sequence as they are required by commands. The following modules will normally run in the following order when a command is executed: -``` +```text core command check @@ -52,7 +52,7 @@ It is possible to see the order that modules run by enabling `./gameserver dev`. Example output of `./gameserver stop` -``` +```text + core_functions.sh ++ core_legacy.sh ++ core_messages.sh diff --git a/technical/modules/core.md b/technical/modules/core.md index 7ad1f91..281f43d 100644 --- a/technical/modules/core.md +++ b/technical/modules/core.md @@ -1,17 +1,17 @@ # Core -### **core\_dl.sh** +## **core_dl.sh** This is the first script to be run when `gameserver`is executed. This script allows for fetching LinuxGSM core files, but also for downloading big files within kind of an API. -### **core\_modules.sh** +## **core_modules.sh** This is the second script to be run when `gameserver`is executed. This script declares all functions and fetches them when they are required. -### **core\_getopt.sh** +## **core_getopt.sh** This is the third and last script to be run when `gameserver`is executed. This script allows for setting and printing available commands to the user. -### **core\_messages.sh** +## **core_messages.sh** This script allows for easy message output and logging. More details about it in the next part. diff --git a/technical/modules/fixes.md b/technical/modules/fixes.md index cb57801..199c268 100644 --- a/technical/modules/fixes.md +++ b/technical/modules/fixes.md @@ -1,5 +1,5 @@ # Fixes -## +## How do fiex work? `command_install.sh` runs `fix.sh` at the end of server installation. If the given server requires a fix, then add `fix_gameserver.sh` and run it from `fix.sh`. diff --git a/workflow/agile.md b/workflow/agile.md index f1970d6..43ea143 100644 --- a/workflow/agile.md +++ b/workflow/agile.md @@ -1,4 +1,3 @@ # Agile \[WIP\] - diff --git a/workflow/branching.md b/workflow/branching.md index fe8eaef..cff346c 100644 --- a/workflow/branching.md +++ b/workflow/branching.md @@ -13,7 +13,7 @@ feat(alerts): add slack support to alerts ``` ```bash -fix(csgoserver): remove SteamCMD auth requirement 32-bit workaround +fix(csgoserver): remove SteamCMD auth requirement 32-bit workaround ``` Once the Pull Request is created it is now time to wait. diff --git a/workflow/conventional-commits.md b/workflow/conventional-commits.md index f17f7b1..8de514d 100644 --- a/workflow/conventional-commits.md +++ b/workflow/conventional-commits.md @@ -1,2 +1 @@ # Conventional Commits - diff --git a/workflow/gitflow.md b/workflow/gitflow.md index 3c42295..91450cb 100644 --- a/workflow/gitflow.md +++ b/workflow/gitflow.md @@ -28,7 +28,7 @@ The `develop` branch brings together all the `feature` branches ready to be test A feature branch is a development branch that is used while code is being actively worked on by developers. A feature branch should normally relate to an existing issue in GitHub. The feature branch should refer to the issue number and a word or two describing the issue, allowing other developers to know what issue branch is related to and helps with housekeeping. -``` +```text feature\1234-glibc-migrate ``` @@ -42,7 +42,7 @@ The branch naming convention is less of an issue for developers who have forked The `hotfix` branch is identical to the `feature` branch but instead is used for urgent fixes that need to be applied to master. -``` +```text hotfix\1234-glibc-migrate ``` diff --git a/workflow/unit-tests.md b/workflow/unit-tests.md index 2886f06..3cf40af 100644 --- a/workflow/unit-tests.md +++ b/workflow/unit-tests.md @@ -1,2 +1 @@ # Unit Tests - diff --git a/workflow/workflow.md b/workflow/workflow.md index 67ae183..56c91d6 100644 --- a/workflow/workflow.md +++ b/workflow/workflow.md @@ -4,7 +4,4 @@ The below flow chart highlights the basic method for getting a feature released. -![](../.gitbook/assets/e241csr.jpg) - - - +![feature release flowchart](../.gitbook/assets/e241csr.jpg) From 648878c9ccee7986b9a9757bb582fb40faf08933 Mon Sep 17 00:00:00 2001 From: MicLieg <38057464+MicLieg@users.noreply.github.com> Date: Wed, 7 Aug 2024 15:10:11 +0200 Subject: [PATCH 4/4] Removed redundant exit.md file becasue of exit-codes.md & added suggested prettier rules --- .markdownlint.json | 45 +++++++++++++++++++++-------- SUMMARY.md | 2 +- code-standards/shellcheck-linter.md | 2 +- technical/exit.md | 10 ------- technical/game-server-querying.md | 2 +- technical/modules.md | 2 +- workflow/agile.md | 2 +- 7 files changed, 38 insertions(+), 27 deletions(-) delete mode 100644 technical/exit.md diff --git a/.markdownlint.json b/.markdownlint.json index 1fffd37..7d6673d 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -1,14 +1,35 @@ { - "MD007": { - "indent": 4 + "no-duplicate-heading": false, + "no-inline-html": { + "allowed_elements": [ + "figure", + "figcaption", + "img", + "p" + ] }, - "MD013": false, - "MD030": { - "ul_single": 3, - "ol_single": 1, - "ul_multi": 3, - "ol_multi": 1 - }, - "MD033": false, - "MD034": false -} + "no-bare-urls": false, + "comment": "The following entries disable rules that may conflict with Prettier see https://github.com/DavidAnson/markdownlint/blob/v0.34.0/style/prettier.json", + "blanks-around-fences": false, + "blanks-around-headings": false, + "blanks-around-lists": false, + "code-fence-style": false, + "emphasis-style": false, + "heading-start-left": false, + "hr-style": false, + "line-length": false, + "list-indent": false, + "list-marker-space": false, + "no-blanks-blockquote": false, + "no-hard-tabs": false, + "no-missing-space-atx": false, + "no-missing-space-closed-atx": false, + "no-multiple-blanks": false, + "no-multiple-space-atx": false, + "no-multiple-space-blockquote": false, + "no-multiple-space-closed-atx": false, + "no-trailing-spaces": false, + "ol-prefix": false, + "strong-style": false, + "ul-indent": false +} \ No newline at end of file diff --git a/SUMMARY.md b/SUMMARY.md index 82c8cc2..74e6b15 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -33,7 +33,7 @@ - [Game Server Querying](technical/game-server-querying.md) - [Messages & Logs](technical/messages-and-logs.md) - [Checks](technical/checks.md) -- [Exit](technical/exit.md) +- [Exit & Exit Codes](technical/exit-codes.md) - [Install](technical/install.md) - [Debuggins](technical/debuggins.md) diff --git a/code-standards/shellcheck-linter.md b/code-standards/shellcheck-linter.md index 65b1eb3..3a2d1ff 100644 --- a/code-standards/shellcheck-linter.md +++ b/code-standards/shellcheck-linter.md @@ -1,3 +1,3 @@ # Shellcheck Linter -\[WIP\] +[WIP] diff --git a/technical/exit.md b/technical/exit.md deleted file mode 100644 index 4af3e02..0000000 --- a/technical/exit.md +++ /dev/null @@ -1,10 +0,0 @@ -# Exit - -**core\_exit.sh** - -This script allows for the use of exit codes which will print different outputs to LinuxGSM logs. Running `core_exit.sh` defaults exitcode variable to 0 which stands for a proper exit - -* Normal exit: exitcode=0 -* FATAL exitcode=1 -* ERROR: exitcode=2 -* WARN: exitcode=3 diff --git a/technical/game-server-querying.md b/technical/game-server-querying.md index 265fc4e..c85a2da 100644 --- a/technical/game-server-querying.md +++ b/technical/game-server-querying.md @@ -1,3 +1,3 @@ # Game Server Querying -\[WIP\] +[WIP] diff --git a/technical/modules.md b/technical/modules.md index 331d4c9..308b54c 100644 --- a/technical/modules.md +++ b/technical/modules.md @@ -87,7 +87,7 @@ In bash to call another bash script, the `source` command is used. However, in L To call a module simply add the name of the module file e.g `info_config.sh` and the module will be called. If a new module is being added it must be added to the list of modules in `core_functions.sh` like so. -``` +```bash info_config.sh(){ functionfile="${FUNCNAME}" fn_fetch_function diff --git a/workflow/agile.md b/workflow/agile.md index 43ea143..e508701 100644 --- a/workflow/agile.md +++ b/workflow/agile.md @@ -1,3 +1,3 @@ # Agile -\[WIP\] +[WIP]