From 1766d43c720618cc4403322cce3d7bb30b3ae4c0 Mon Sep 17 00:00:00 2001
From: Daniel Gibbs <me@danielgibbs.co.uk>
Date: Tue, 28 Sep 2021 23:23:19 +0100
Subject: [PATCH 01/14] fix(details): steam port showing when unavailable

---
 lgsm/functions/info_messages.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh
index ef3b0a7b3..c670bec05 100755
--- a/lgsm/functions/info_messages.sh
+++ b/lgsm/functions/info_messages.sh
@@ -1366,7 +1366,7 @@ fn_info_message_source(){
 		fn_port "RCON" rconport tcp
 		fn_port "SourceTV" sourcetvport udp
 		# Will not show if unaviable
-		if [ "${steamport}" == "0" ]||[ -z "${steamport}" ]; then
+		if [ "${steamport}" == "0" ]||[ -v "${steamport}" ]; then
 			fn_port "Steam" steamport udp
 		fi
 		fn_port "Client" clientport udp

From 3fe55b634d81669dd82f419bcecbd9e1d47d26ca Mon Sep 17 00:00:00 2001
From: Daniel Gibbs <me@danielgibbs.co.uk>
Date: Wed, 29 Sep 2021 00:01:13 +0100
Subject: [PATCH 02/14] actions: fixes for labeler and sponsored

labeler


test


reg
---
 .github/labeler.yml                  | 78 ++++++++++++++--------------
 .github/workflows/label-sponsors.yml |  4 +-
 .github/workflows/labeler.yml        |  4 +-
 3 files changed, 44 insertions(+), 42 deletions(-)

diff --git a/.github/labeler.yml b/.github/labeler.yml
index c8ebdad6f..683b29f32 100644
--- a/.github/labeler.yml
+++ b/.github/labeler.yml
@@ -1,83 +1,83 @@
 # Add/remove 'critical' label if issue contains the words 'urgent' or 'critical'
 # Type
 "type: game server request":
-    - '(Server Request)'
+    - '/(Server Request)/i'
 "type: bug":
-    - '(bug)'
+    - '/(bug)/i'
 "type: feature request":
-    - '(feature)'
+    - '/(feature)/i'
 # Commands
 "command: backup":
-    - '(backup)'
+    - '/(backup)/i'
 "command: console":
-    - '(console|tmux)'
+    - '/(console|tmux)/i'
 "command: debug":
-    - '(debug)'
+    - '/(debug)/i'
 "command: details":
-    - '(details)'
+    - '/(details)/i'
 "command: fast-dl":
-    - '(fast-dl|fastdl)'
+    - '/(fast-dl|fastdl)/i'
 "command: install":
-    - '(install)'
+    - '/(install)/i'
 "command: mods":
-    - '(mods)'
+    - '/(mods)/i'
 "command: monitor":
-    - '(monitor)'
+    - '/(monitor)/i'
 "command: post-details":
-    - '(post-details)'
+    - '/(post-details)/i'
 "command: restart":
-    - '(restart)'
+    - '/(restart)/i'
 "command: send":
-    - '(send)'
+    - '/(send)/i'
 "command: skeleton":
-    - '(skeleton)'
+    - '/(skeleton)/i'
 "command: start":
-    - '(start)'
+    - '/(start)/i'
 "command: stop":
-    - '(stop)'
+    - '/(stop)/i'
 "command: update-lgsm":
-    - '(update-lgsm)'
+    - '/(update-lgsm)/i'
 "command: update":
-    - '(update)'
+    - '/(update)/i'
 "command: validate":
-    - '(validate)'
+    - '/(validate)/i'
 "command: wipe":
-    - '(wipe)'
+    - '/(wipe)/i'
 # Distros
 "distro: AlmaLinux":
-    - '(Alma)'
+    - '/(Alma)/i'
 "distro: Arch Linux":
-    - '(Arch)'
+    - '/(Arch)/i'
 "distro: CentOS":
-    - '(CentOS)'
+    - '/(CentOS)/i'
 "distro: Debian":
-    - '(Debian)'
+    - '/(Debian)/i'
 "distro: Fedora":
-    - '(Fedora)'
+    - '/(Fedora)/i'
 "distro: openSUSE":
-    - '(openSUSE)'
+    - '/(openSUSE|suse)/i'
 "distro: Rocky Linux":
-    - '(Rocky)'
+    - '/(Rocky)/i'
 "distro: Slackware":
-    - '(Slackware)'
+    - '/(Slackware)/i'
 "distro: Ubuntu":
-    - '(Ubuntu)'
+    - '/(Ubuntu)/i'
 # Info
 "info: alerts":
-    - '(alert)'
+    - '/(alert)/i'
 "info: dependency":
-    - '(dependency|deps)'
+    - '/(dependency|deps)/i'
 "info: docker":
-    - '(docker)'
+    - '/(docker)/i'
 "info: docs":
-    - '(documentation|docs)'
+    - '/(documentation|docs)/i'
 "info: email":
-    - '(postfix|sendmail|exim|smtp)'
+    - '/(postfix|sendmail|exim|smtp)/i'
 "info: steamcmd":
-    - '(steamcmd)'
+    - '/(steamcmd)/i'
 "info: systemd":
-    - '(systemd)'
+    - '/(systemd)/i'
 "info: tmux":
-    - '(tmux)'
+    - '/(tmux)/i'
 "info: website":
-    - '(website)'
+    - '/(website)/i'
diff --git a/.github/workflows/label-sponsors.yml b/.github/workflows/label-sponsors.yml
index 0b7691cbb..8cf880da9 100644
--- a/.github/workflows/label-sponsors.yml
+++ b/.github/workflows/label-sponsors.yml
@@ -1,9 +1,9 @@
 name: Label sponsors
 on:
   pull_request:
-    types: [opened, edited]
+    types: [opened]
   issues:
-    types: [opened, edited]
+    types: [opened]
 jobs:
   build:
     name: is-sponsor-label
diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml
index 8d806009d..7b8e2668a 100644
--- a/.github/workflows/labeler.yml
+++ b/.github/workflows/labeler.yml
@@ -7,7 +7,9 @@ jobs:
   triage:
     runs-on: ubuntu-latest
     steps:
-    - uses: github/issue-labeler@v2.0
+    - uses: github/issue-labeler@v2.4
       with:
         repo-token: "${{ secrets.GITHUB_TOKEN }}"
         configuration-path: .github/labeler.yml
+        not-before:
+        enable-versioned-regex: 0

From 081826b240712e2366fd87c9a4a2ea9c4378b999 Mon Sep 17 00:00:00 2001
From: Daniel Gibbs <me@danielgibbs.co.uk>
Date: Wed, 29 Sep 2021 17:18:16 +0100
Subject: [PATCH 03/14] actions: fixes for labeler and sponsored

labeler


test


reg


add query


Added games


add pr-labeler
---
 .github/labeler.yml                  | 93 ++++++++++++++++------------
 .github/pr-labeler.yml               |  3 +
 .github/workflows/label-sponsors.yml |  4 +-
 .github/workflows/labeler.yml        |  4 +-
 .github/workflows/pr-labeler.yml     | 14 +++++
 5 files changed, 76 insertions(+), 42 deletions(-)
 create mode 100644 .github/pr-labeler.yml
 create mode 100644 .github/workflows/pr-labeler.yml

diff --git a/.github/labeler.yml b/.github/labeler.yml
index c8ebdad6f..5cd6740d4 100644
--- a/.github/labeler.yml
+++ b/.github/labeler.yml
@@ -1,83 +1,98 @@
 # Add/remove 'critical' label if issue contains the words 'urgent' or 'critical'
 # Type
 "type: game server request":
-    - '(Server Request)'
+    - '/(Server Request)/i'
 "type: bug":
-    - '(bug)'
+    - '/(bug)/i'
 "type: feature request":
-    - '(feature)'
+    - '/(feature)/i'
 # Commands
 "command: backup":
-    - '(backup)'
+    - '/(backup)/i'
 "command: console":
-    - '(console|tmux)'
+    - '/(console|tmux)/i'
 "command: debug":
-    - '(debug)'
+    - '/(debug)/i'
 "command: details":
-    - '(details)'
+    - '/(details)/i'
 "command: fast-dl":
-    - '(fast-dl|fastdl)'
+    - '/(fast-dl|fastdl)/i'
 "command: install":
-    - '(install)'
+    - '/(install)/i'
 "command: mods":
-    - '(mods)'
+    - '/(mods)/i'
 "command: monitor":
-    - '(monitor)'
+    - '/(monitor)/i'
 "command: post-details":
-    - '(post-details)'
+    - '/(post-details)/i'
 "command: restart":
-    - '(restart)'
+    - '/(restart)/i'
 "command: send":
-    - '(send)'
+    - '/(send)/i'
 "command: skeleton":
-    - '(skeleton)'
+    - '/(skeleton)/i'
 "command: start":
-    - '(start)'
+    - '/(start)/i'
 "command: stop":
-    - '(stop)'
+    - '/(stop)/i'
 "command: update-lgsm":
-    - '(update-lgsm)'
+    - '/(update-lgsm)/i'
 "command: update":
-    - '(update)'
+    - '/(update)/i'
 "command: validate":
-    - '(validate)'
+    - '/(validate)/i'
 "command: wipe":
-    - '(wipe)'
+    - '/(wipe)/i'
 # Distros
 "distro: AlmaLinux":
-    - '(Alma)'
+    - '/(Alma)/i'
 "distro: Arch Linux":
-    - '(Arch)'
+    - '/(Arch)/i'
 "distro: CentOS":
-    - '(CentOS)'
+    - '/(CentOS)/i'
 "distro: Debian":
-    - '(Debian)'
+    - '/(Debian)/i'
 "distro: Fedora":
-    - '(Fedora)'
+    - '/(Fedora)/i'
 "distro: openSUSE":
-    - '(openSUSE)'
+    - '/(openSUSE|suse)/i'
 "distro: Rocky Linux":
-    - '(Rocky)'
+    - '/(Rocky)/i'
 "distro: Slackware":
-    - '(Slackware)'
+    - '/(Slackware)/i'
 "distro: Ubuntu":
-    - '(Ubuntu)'
+    - '/(Ubuntu)/i'
 # Info
 "info: alerts":
-    - '(alert)'
+    - '/(alert)/i'
 "info: dependency":
-    - '(dependency|deps)'
+    - '/(dependency|deps)/i'
 "info: docker":
-    - '(docker)'
+    - '/(docker)/i'
 "info: docs":
-    - '(documentation|docs)'
+    - '/(documentation|docs)/i'
 "info: email":
-    - '(postfix|sendmail|exim|smtp)'
+    - '/(postfix|sendmail|exim|smtp)/i'
+"info: query":
+    - '/(gamedig|gsquery)/i'
 "info: steamcmd":
-    - '(steamcmd)'
+    - '/(steamcmd)/i'
 "info: systemd":
-    - '(systemd)'
+    - '/(systemd)/i'
 "info: tmux":
-    - '(tmux)'
+    - '/(tmux)/i'
 "info: website":
-    - '(website)'
+    - '/(website)/i'
+# Games
+"game: Ark: Survival Evolved":
+    - '/(Ark: Survival Evolved|Ark)/i'
+"game: ARMA 3":
+    - '/(ARMA 3)/i'
+"game: Assetto Corsa":
+    - '/(Assetto Corsa)/i'
+"game: Avorion":
+    - '/(Avorion)/i'
+"game: Ballistic Overkill":
+    - '/(Ballistic Overkill)/i'
+"game: Barotrauma":
+    - '/(Barotrauma)/i'
diff --git a/.github/pr-labeler.yml b/.github/pr-labeler.yml
new file mode 100644
index 000000000..06092ef11
--- /dev/null
+++ b/.github/pr-labeler.yml
@@ -0,0 +1,3 @@
+feature: ['feature/*', 'feat/*']
+hotfix: hotfix/*
+release: release/*
diff --git a/.github/workflows/label-sponsors.yml b/.github/workflows/label-sponsors.yml
index 0b7691cbb..8cf880da9 100644
--- a/.github/workflows/label-sponsors.yml
+++ b/.github/workflows/label-sponsors.yml
@@ -1,9 +1,9 @@
 name: Label sponsors
 on:
   pull_request:
-    types: [opened, edited]
+    types: [opened]
   issues:
-    types: [opened, edited]
+    types: [opened]
 jobs:
   build:
     name: is-sponsor-label
diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml
index 8d806009d..7b8e2668a 100644
--- a/.github/workflows/labeler.yml
+++ b/.github/workflows/labeler.yml
@@ -7,7 +7,9 @@ jobs:
   triage:
     runs-on: ubuntu-latest
     steps:
-    - uses: github/issue-labeler@v2.0
+    - uses: github/issue-labeler@v2.4
       with:
         repo-token: "${{ secrets.GITHUB_TOKEN }}"
         configuration-path: .github/labeler.yml
+        not-before:
+        enable-versioned-regex: 0
diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml
new file mode 100644
index 000000000..8b7371574
--- /dev/null
+++ b/.github/workflows/pr-labeler.yml
@@ -0,0 +1,14 @@
+name: PR Labeler
+on:
+  pull_request:
+    types: [opened, edited, closed]
+
+jobs:
+  pr-labeler:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: TimonVS/pr-labeler-action@v3
+        with:
+          configuration-path: .github/pr-labeler.yml # optional, .github/pr-labeler.yml is the default value
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

From 204a43d791a3d1b48c4091f00771aed507de2402 Mon Sep 17 00:00:00 2001
From: Daniel Gibbs <me@danielgibbs.co.uk>
Date: Sun, 3 Oct 2021 10:50:03 +0100
Subject: [PATCH 04/14] fix(loserver): make Last Oasis anonymous login

---
 lgsm/config-default/config-lgsm/loserver/_default.cfg | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/lgsm/config-default/config-lgsm/loserver/_default.cfg b/lgsm/config-default/config-lgsm/loserver/_default.cfg
index 855b60f26..15ebddde5 100644
--- a/lgsm/config-default/config-lgsm/loserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/loserver/_default.cfg
@@ -8,10 +8,6 @@
 
 #### Game Server Settings ####
 
-## SteamCMD Login | https://docs.linuxgsm.com/steamcmd#steamcmd-login
-steamuser="username"
-steampass='password'
-
 ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters
 ## https://docs.linuxgsm.com/game-servers/last-oasis
 servername="${selfname}"

From 48308ec61e6f01e83e7e127a8b25c8fda4ef1355 Mon Sep 17 00:00:00 2001
From: Daniel Gibbs <me@danielgibbs.co.uk>
Date: Sun, 3 Oct 2021 11:10:45 +0100
Subject: [PATCH 05/14] Revert telegram change

---
 lgsm/functions/alert_telegram.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lgsm/functions/alert_telegram.sh b/lgsm/functions/alert_telegram.sh
index de5dd2714..056f11ae0 100755
--- a/lgsm/functions/alert_telegram.sh
+++ b/lgsm/functions/alert_telegram.sh
@@ -17,7 +17,7 @@ EOF
 )
 
 fn_print_dots "Sending Telegram alert"
-telegramsend=$(curl --connect-timeout 10 -sSL -H "Content-Type: application/json" -X POST -d "$(echo -n "${json}" | jq -c .)" ${curlcustomstring} "https://${telegramapi}/bot${telegramtoken}/sendMessage" | grep "error_code")
+telegramsend=$(curl --connect-timeout 10 -sSL -H "Content-Type: application/json" -X POST -d """${json}""" ${curlcustomstring} "https://${telegramapi}/bot${telegramtoken}/sendMessage" | grep "error_code")
 
 if [ -n "${telegramsend}" ]; then
 	fn_print_fail_nl "Sending Telegram alert: ${telegramsend}"

From 9933a7840b25e37de09362b2a28f04dfeb04391f Mon Sep 17 00:00:00 2001
From: Daniel Gibbs <me@danielgibbs.co.uk>
Date: Fri, 8 Oct 2021 11:59:01 +0100
Subject: [PATCH 06/14] Update FUNDING.yml

---
 .github/FUNDING.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
index 357dfdf6e..441867e9c 100644
--- a/.github/FUNDING.yml
+++ b/.github/FUNDING.yml
@@ -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: [paypal.me/dgibbs64] # Replace with a single custom sponsorship URL
+custom: # Replace with a single custom sponsorship URL

From 04d680d90397ee6ded8cb8998f26b9b34192e780 Mon Sep 17 00:00:00 2001
From: Christian <h3o66@users.noreply.github.com>
Date: Sat, 9 Oct 2021 21:15:39 +0200
Subject: [PATCH 07/14] fix(pstbs): fix queryport from config (#3597)

---
 lgsm/functions/info_game.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh
index a961a41f3..106b1b4ee 100644
--- a/lgsm/functions/info_game.sh
+++ b/lgsm/functions/info_game.sh
@@ -1077,7 +1077,9 @@ fn_info_game_pstbs(){
 
 	# Parameters
 	port=${port:-"0"}
-	queryport=${port:-"0"}
+	if [ -z "${queryport}" ]; then
+		queryport=${port:-"0"}
+	fi
 	rconport=${rconport:-"0"}
 	randommap=${randommap:-"NOT SET"}
 	maxplayers=${maxplayers:-"0"}

From 0ef31243a8661e41ea70ecbf5ed62a99625086fa Mon Sep 17 00:00:00 2001
From: johnoclockdk <68790186+johnoclockdk@users.noreply.github.com>
Date: Sat, 9 Oct 2021 21:16:54 +0200
Subject: [PATCH 09/14] fix(deps): missing dependency libsdl (#3590)

---
 lgsm/data/ubuntu-21.04.csv | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lgsm/data/ubuntu-21.04.csv b/lgsm/data/ubuntu-21.04.csv
index 35bf76936..180be9c25 100644
--- a/lgsm/data/ubuntu-21.04.csv
+++ b/lgsm/data/ubuntu-21.04.csv
@@ -99,7 +99,7 @@ squad
 st
 stn
 sven,libssl1.1:i386,zlib1g:i386
-terraria
+terraria,libsdl
 tf2,libcurl4-gnutls-dev:i386
 tfc
 ts

From 0fee00e19c5a4a606016ad299b1cca3cccb2a405 Mon Sep 17 00:00:00 2001
From: Daniel Gibbs <me@danielgibbs.co.uk>
Date: Sun, 10 Oct 2021 22:24:53 +0100
Subject: [PATCH 10/14] fix(deps): steamcmd will be removed as a requirement is
 appid is missing (#3606)

---
 lgsm/functions/check_deps.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh
index f961d076a..862d03743 100755
--- a/lgsm/functions/check_deps.sh
+++ b/lgsm/functions/check_deps.sh
@@ -223,9 +223,9 @@ fn_check_loop(){
 # Checks if dependency is installed or not.
 fn_deps_detector(){
 	## Check.
-	# SteamCMD: Will be removed from required array if non-free repo is not available.
+	# SteamCMD: Will be removed from required array if no appid is present or non-free repo is not available.
 	# This will cause SteamCMD to be installed using tar.
-	if [ "${deptocheck}" == "steamcmd" ]&&[ "${distroid}" == "debian" ]&& ! grep -qE "^deb .*non-free" /etc/apt/sources.list; then
+ if [ -z "${appid}" ]||[ "${deptocheck}" == "steamcmd" ]&&[ "${distroid}" == "debian" ]&& ! grep -qE "^deb .*non-free" /etc/apt/sources.list; then
 		array_deps_required=( "${array_deps_required[@]/steamcmd}" )
 		steamcmdstatus=1
 	# Java: Added for users using Oracle JRE to bypass check.
@@ -313,7 +313,7 @@ fi
 info_distro.sh
 
 if [ ! -f "${tmpdir}/dependency-no-check.tmp" ]&&[ ! -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then
-	# Check that the disto dependency csv file exists.
+	# Check that the distro dependency csv file exists.
 	fn_check_file_github "lgsm/data" "${distroid}-${distroversioncsv}.csv"
 	if [ -n "${checkflag}" ]&&[ "${checkflag}" == "0" ]; then
 		fn_fetch_file_github "lgsm/data" "${distroid}-${distroversioncsv}.csv" "lgsm/data" "chmodx" "norun" "noforce" "nohash"

From 44daf200834c5bf56956531ff082dc1045021253 Mon Sep 17 00:00:00 2001
From: Daniel Gibbs <me@danielgibbs.co.uk>
Date: Sun, 10 Oct 2021 22:34:02 +0100
Subject: [PATCH 11/14] fix(telegram): resolve alert sending invalid json
 (#3605)

The telegram alert was using invalid json (though telegram did accept it). JSON has been corrected and is now valid
---
 lgsm/functions/alert_telegram.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lgsm/functions/alert_telegram.sh b/lgsm/functions/alert_telegram.sh
index 056f11ae0..7da6a9f0c 100755
--- a/lgsm/functions/alert_telegram.sh
+++ b/lgsm/functions/alert_telegram.sh
@@ -12,12 +12,13 @@ json=$(cat <<EOF
 	"chat_id": "${telegramchatid}",
 	"parse_mode": "HTML",
 	"text": "<b>${alertemoji} ${alertsubject} ${alertemoji}</b>\n\n<b>Server name</b>\n${servername}\n\n<b>Message</b>\n${alertbody}\n\n<b>Game</b>\n${gamename}\n\n<b>Server IP</b>\n<a href='https://www.gametracker.com/server_info/${alertip}:${port}'>${alertip}:${port}</a>\n\n<b>Hostname</b>\n${HOSTNAME}\n\n<b>More info</b>\n<a href='${alerturl}'>${alerturl}</a>",
-	"disable_web_page_preview": "yes",
+	"disable_web_page_preview": "yes"
+}
 EOF
 )
 
 fn_print_dots "Sending Telegram alert"
-telegramsend=$(curl --connect-timeout 10 -sSL -H "Content-Type: application/json" -X POST -d """${json}""" ${curlcustomstring} "https://${telegramapi}/bot${telegramtoken}/sendMessage" | grep "error_code")
+telegramsend=$(curl --connect-timeout 10 -sSL -H "Content-Type: application/json" -X POST -d "$(echo -n "${json}" | jq -c .)" ${curlcustomstring} "https://${telegramapi}/bot${telegramtoken}/sendMessage" | grep "error_code")
 
 if [ -n "${telegramsend}" ]; then
 	fn_print_fail_nl "Sending Telegram alert: ${telegramsend}"

From db4d40e3e782c65363fd29e45cf44fd36a663789 Mon Sep 17 00:00:00 2001
From: Daniel Gibbs <me@danielgibbs.co.uk>
Date: Sun, 10 Oct 2021 22:35:32 +0100
Subject: [PATCH 12/14] fix(info): resolve distroversionrh error for some non
 English languages (#3607)

---
 lgsm/functions/info_distro.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh
index d8f5dfaca..43a6aa4e0 100755
--- a/lgsm/functions/info_distro.sh
+++ b/lgsm/functions/info_distro.sh
@@ -36,7 +36,7 @@ for distro_info in "${distro_info_array[@]}"; do
 		distroname="$(grep "PRETTY_NAME" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')"
 		distroversion="$(grep "VERSION_ID" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')"
 		# Special var for rhel like distros to removed point in number e.g 8.4 to just 8.
-		distroversionrh="$(printf "%.0f\n" "${distroversion}")"
+		distroversionrh="$(sed -nr 's/^VERSION_ID="([0-9]*).+?"/\1/p' /etc/os-release)"
 		distroid="$(grep "ID=" /etc/os-release | grep -v _ID | awk -F\= '{gsub(/"/,"",$2);print $2}')"
 		distroidlike="$(grep "ID_LIKE=" /etc/os-release | grep -v _ID | awk -F\= '{gsub(/"/,"",$2);print $2}')"
 		distrocodename="$(grep "VERSION_CODENAME" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')"

From 8dbca12a5626f8bb625ab19c88111d203bfce0f4 Mon Sep 17 00:00:00 2001
From: Daniel Gibbs <me@danielgibbs.co.uk>
Date: Sun, 10 Oct 2021 23:56:05 +0100
Subject: [PATCH 13/14] feat(etl): update Enemy Territory: Legacy to 2.78
 (#3609)

tab
---
 lgsm/functions/check_deps.sh           | 2 +-
 lgsm/functions/install_server_files.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh
index 862d03743..047093596 100755
--- a/lgsm/functions/check_deps.sh
+++ b/lgsm/functions/check_deps.sh
@@ -225,7 +225,7 @@ fn_deps_detector(){
 	## Check.
 	# SteamCMD: Will be removed from required array if no appid is present or non-free repo is not available.
 	# This will cause SteamCMD to be installed using tar.
- if [ -z "${appid}" ]||[ "${deptocheck}" == "steamcmd" ]&&[ "${distroid}" == "debian" ]&& ! grep -qE "^deb .*non-free" /etc/apt/sources.list; then
+	if [ -z "${appid}" ]||[ "${deptocheck}" == "steamcmd" ]&&[ "${distroid}" == "debian" ]&& ! grep -qE "^deb .*non-free" /etc/apt/sources.list; then
 		array_deps_required=( "${array_deps_required[@]/steamcmd}" )
 		steamcmdstatus=1
 	# Java: Added for users using Oracle JRE to bypass check.
diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh
index 8ac1704dd..e32d3d778 100755
--- a/lgsm/functions/install_server_files.sh
+++ b/lgsm/functions/install_server_files.sh
@@ -27,7 +27,7 @@ fn_install_server_files(){
 	elif [ "${shortname}" == "codwaw" ]; then
 		remote_fileurl="http://linuxgsm.download/CallOfDutyWorldAtWar/codwaw-lnxded-1.7-full.tar.xz"; local_filedir="${tmpdir}"; local_filename="codwaw-lnxded-1.7-full.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="2c6be1bb66ea631b9b2e7ae6216c6680"
 	elif [ "${shortname}" == "etl" ]; then
-		remote_fileurl="http://linuxgsm.download/WolfensteinEnemyTerritory/etlegacy-v2.77.1-i386-et-260b.tar.xz"; local_filedir="${tmpdir}"; local_filename="etlegacy-v2.77.1-i386-et-260b.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="cc307a9232abd3999be499b42d8e4ea8"
+		remote_fileurl="http://linuxgsm.download/WolfensteinEnemyTerritory/etlegacy-v2.78-i386-et-260b.tar.xz"; local_filedir="${tmpdir}"; local_filename="etlegacy-v2.78-i386-et-260b.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="501e442fdac2eeab5e7f51e5b5c27280"
 	elif [ "${shortname}" == "mohaa" ]; then
 		remote_fileurl="http://linuxgsm.download/MedalofHonorAlliedAssault/moh_revival_v1.12_RC3.5.1.tar.xz"; local_filedir="${tmpdir}"; local_filename="moh_revival_v1.12_RC3.5.1.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="7c664538999252eeaf2b6d9949416480"
 	elif [ "${shortname}" == "ns" ]; then

From 222eb9dffd15378a3d67e9fd1f403ffcf2520044 Mon Sep 17 00:00:00 2001
From: Daniel Gibbs <me@danielgibbs.co.uk>
Date: Mon, 11 Oct 2021 00:03:30 +0100
Subject: [PATCH 14/14] Release v21.3.2

---
 lgsm/functions/core_functions.sh | 2 +-
 linuxgsm.sh                      | 2 +-
 tests/tests_fctrserver.sh        | 2 +-
 tests/tests_jc2server.sh         | 2 +-
 tests/tests_mcserver.sh          | 2 +-
 tests/tests_ts3server.sh         | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh
index 6c6edbdfc..f11b6f3e0 100755
--- a/lgsm/functions/core_functions.sh
+++ b/lgsm/functions/core_functions.sh
@@ -8,7 +8,7 @@
 
 functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
-modulesversion="v21.3.1"
+modulesversion="v21.3.2"
 
 # Core
 
diff --git a/linuxgsm.sh b/linuxgsm.sh
index c7620cd72..8c6cf9fc0 100755
--- a/linuxgsm.sh
+++ b/linuxgsm.sh
@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="v21.3.1"
+version="v21.3.2"
 shortname="core"
 gameservername="core"
 commandname="CORE"
diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh
index 05ae0795e..6df457a10 100644
--- a/tests/tests_fctrserver.sh
+++ b/tests/tests_fctrserver.sh
@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="v21.3.1"
+version="v21.3.2"
 shortname="fctr"
 gameservername="fctrserver"
 commandname="CORE"
diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh
index 609f71f50..65a32db1a 100644
--- a/tests/tests_jc2server.sh
+++ b/tests/tests_jc2server.sh
@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="v21.3.1"
+version="v21.3.2"
 shortname="jc2"
 gameservername="jc2server"
 commandname="CORE"
diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh
index a9dc9abf2..de0a44d18 100644
--- a/tests/tests_mcserver.sh
+++ b/tests/tests_mcserver.sh
@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="v21.3.1"
+version="v21.3.2"
 shortname="mc"
 gameservername="mcserver"
 commandname="CORE"
diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh
index 7f72dd7ef..4e6383bf9 100644
--- a/tests/tests_ts3server.sh
+++ b/tests/tests_ts3server.sh
@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="v21.3.1"
+version="v21.3.2"
 shortname="ts3"
 gameservername="ts3server"
 commandname="CORE"