Browse Source

Merge branch 'hotfix/v21.3.1' into develop

pull/3590/head
Daniel Gibbs 4 years ago
parent
commit
b99c9e56dc
No known key found for this signature in database GPG Key ID: 5D5AB867A27738EC
  1. 83
      .github/labeler.yml
  2. 14
      .github/workflows/label-sponsors.yml
  3. 1393
      .github/workflows/labeler.yml
  4. 4
      lgsm/data/almalinux-8.csv
  5. 4
      lgsm/data/centos-7.csv
  6. 3
      lgsm/data/centos-8.csv
  7. 8
      lgsm/data/debian-10.csv
  8. 8
      lgsm/data/debian-11.csv
  9. 8
      lgsm/data/debian-9.csv
  10. 4
      lgsm/data/rhel-7.csv
  11. 4
      lgsm/data/rhel-8.csv
  12. 4
      lgsm/data/rocky-8.csv
  13. 8
      lgsm/data/ubuntu-16.04.csv
  14. 8
      lgsm/data/ubuntu-18.04.csv
  15. 9
      lgsm/data/ubuntu-20.04.csv
  16. 8
      lgsm/data/ubuntu-21.04.csv
  17. 48
      lgsm/functions/check_deps.sh
  18. 33
      lgsm/functions/command_update_linuxgsm.sh
  19. 2
      lgsm/functions/core_functions.sh
  20. 7
      lgsm/functions/info_distro.sh
  21. 3
      lgsm/functions/info_game.sh
  22. 6
      lgsm/functions/mods_list.sh
  23. 2
      linuxgsm.sh
  24. 2
      tests/tests_fctrserver.sh
  25. 2
      tests/tests_jc2server.sh
  26. 2
      tests/tests_mcserver.sh
  27. 2
      tests/tests_ts3server.sh

83
.github/labeler.yml

@ -0,0 +1,83 @@
# Add/remove 'critical' label if issue contains the words 'urgent' or 'critical'
# Type
"type: game server request":
- '(Server Request)'
"type: bug":
- '(bug)'
"type: feature request":
- '(feature)'
# Commands
"command: backup":
- '(backup)'
"command: console":
- '(console|tmux)'
"command: debug":
- '(debug)'
"command: details":
- '(details)'
"command: fast-dl":
- '(fast-dl|fastdl)'
"command: install":
- '(install)'
"command: mods":
- '(mods)'
"command: monitor":
- '(monitor)'
"command: post-details":
- '(post-details)'
"command: restart":
- '(restart)'
"command: send":
- '(send)'
"command: skeleton":
- '(skeleton)'
"command: start":
- '(start)'
"command: stop":
- '(stop)'
"command: update-lgsm":
- '(update-lgsm)'
"command: update":
- '(update)'
"command: validate":
- '(validate)'
"command: wipe":
- '(wipe)'
# Distros
"distro: AlmaLinux":
- '(Alma)'
"distro: Arch Linux":
- '(Arch)'
"distro: CentOS":
- '(CentOS)'
"distro: Debian":
- '(Debian)'
"distro: Fedora":
- '(Fedora)'
"distro: openSUSE":
- '(openSUSE)'
"distro: Rocky Linux":
- '(Rocky)'
"distro: Slackware":
- '(Slackware)'
"distro: Ubuntu":
- '(Ubuntu)'
# Info
"info: alerts":
- '(alert)'
"info: dependency":
- '(dependency|deps)'
"info: docker":
- '(docker)'
"info: docs":
- '(documentation|docs)'
"info: email":
- '(postfix|sendmail|exim|smtp)'
"info: steamcmd":
- '(steamcmd)'
"info: systemd":
- '(systemd)'
"info: tmux":
- '(tmux)'
"info: website":
- '(website)'

14
.github/workflows/label-sponsors.yml

@ -0,0 +1,14 @@
name: Label sponsors
on:
pull_request:
types: [opened, edited]
issues:
types: [opened, edited]
jobs:
build:
name: is-sponsor-label
runs-on: ubuntu-latest
steps:
- uses: JasonEtco/is-sponsor-label-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

1393
.github/workflows/labeler.yml

File diff suppressed because it is too large

4
lgsm/data/almalinux-8.csv

@ -1,4 +1,5 @@
all,epel-release,curl,wget,util-linux,python36,file,tar,gzip,bzip2,unzip,xz,binutils,bc,jq,tmux,nmap-ncat,cpio,hostname all,bc,binutils,bzip2,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz
steamcmd,glibc.i686,libstdc++.i686
ac ac
ahl ahl
ahl2 ahl2
@ -96,6 +97,7 @@ sof2
sol sol
squad squad
st st
stn
sven sven
terraria terraria
tf2,libcurl.i686 tf2,libcurl.i686

Can't render this file because it has a wrong number of fields in line 2.

4
lgsm/data/centos-7.csv

@ -1,4 +1,5 @@
all,epel-release,curl,wget,util-linux,python36,file,tar,gzip,bzip2,unzip,xz,binutils,bc,jq,tmux,nmap-ncat,cpio,hostname all,bc,binutils,bzip2,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz
steamcmd,glibc.i686,libstdc++.i686
ac ac
ahl ahl
ahl2 ahl2
@ -96,6 +97,7 @@ sof2
sol sol
squad squad
st st
stn
sven sven
terraria terraria
tf2,libcurl.i686 tf2,libcurl.i686

Can't render this file because it has a wrong number of fields in line 2.

3
lgsm/data/centos-8.csv

@ -1,4 +1,5 @@
all,epel-release,curl,wget,util-linux,python36,file,tar,gzip,bzip2,unzip,xz,binutils,bc,jq,tmux,nmap-ncat,cpio,hostname all,bc,binutils,bzip2,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz
steamcmd,glibc.i686,libstdc++.i686
ac ac
ahl ahl
ahl2 ahl2

Can't render this file because it has a wrong number of fields in line 2.

8
lgsm/data/debian-10.csv

@ -1,4 +1,5 @@
all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,jq,python3,tar,tmux,util-linux,netcat,unzip,xz-utils,lib32gcc1,lib32stdc++6,hostname all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils
steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
ac ac
ahl ahl
ahl2 ahl2
@ -68,14 +69,14 @@ nmrih,libtinfo5:i386
ns ns
ns2,speex,libtbb2 ns2,speex,libtbb2
ns2c,speex:i386,libtbb2 ns2c,speex:i386,libtbb2
onset onset,libmariadbclient-dev
opfor opfor
pc pc
pmc,openjdk-11-jre pmc,openjdk-11-jre
pstbs,libgconf-2-4 pstbs,libgconf-2-4
pvkii pvkii
pvr,libc++1 pvr,libc++1
pz pz,openjdk-11-jre,rng-tools
q2 q2
q3 q3
ql ql
@ -96,6 +97,7 @@ sof2
sol sol
squad squad
st st
stn
sven,libssl1.1:i386,zlib1g:i386 sven,libssl1.1:i386,zlib1g:i386
terraria terraria
tf2,libcurl4-gnutls-dev:i386 tf2,libcurl4-gnutls-dev:i386

Can't render this file because it has a wrong number of fields in line 2.

8
lgsm/data/debian-11.csv

@ -1,4 +1,5 @@
all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,jq,python3,tar,tmux,util-linux,netcat,unzip,xz-utils,lib32gcc-s1,lib32stdc++6,hostname all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils
steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
ac ac
ahl ahl
ahl2 ahl2
@ -68,14 +69,14 @@ nmrih,libtinfo5:i386
ns ns
ns2,speex,libtbb2 ns2,speex,libtbb2
ns2c,speex:i386,libtbb2 ns2c,speex:i386,libtbb2
onset onset,libmariadbclient-dev
opfor opfor
pc pc
pmc,openjdk-16-jre pmc,openjdk-16-jre
pstbs,libgconf-2-4 pstbs,libgconf-2-4
pvkii pvkii
pvr,libc++1 pvr,libc++1
pz pz,openjdk-16-jre,rng-tools
q2 q2
q3 q3
ql ql
@ -96,6 +97,7 @@ sof2
sol sol
squad squad
st st
stn
sven,libssl1.1:i386,zlib1g:i386 sven,libssl1.1:i386,zlib1g:i386
terraria terraria
tf2,libcurl4-gnutls-dev:i386 tf2,libcurl4-gnutls-dev:i386

Can't render this file because it has a wrong number of fields in line 2.

8
lgsm/data/debian-9.csv

@ -1,4 +1,5 @@
all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,jq,python3,tar,tmux,util-linux,netcat,unzip,xz-utils,lib32gcc1,lib32stdc++6,hostname all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils
steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
ac ac
ahl ahl
ahl2 ahl2
@ -68,14 +69,14 @@ nmrih,libtinfo5:i386
ns ns
ns2,speex,libtbb2 ns2,speex,libtbb2
ns2c,speex:i386,libtbb2 ns2c,speex:i386,libtbb2
onset onset,libmariadbclient-dev
opfor opfor
pc pc
pmc,openjdk-8-jre pmc,openjdk-8-jre
pstbs,libgconf-2-4 pstbs,libgconf-2-4
pvkii pvkii
pvr,libc++1 pvr,libc++1
pz pz,openjdk-8-jre,rng-tools
q2 q2
q3 q3
ql ql
@ -96,6 +97,7 @@ sof2
sol sol
squad squad
st st
stn
sven,libssl1.1:i386,zlib1g:i386 sven,libssl1.1:i386,zlib1g:i386
terraria terraria
tf2,libcurl4-gnutls-dev:i386 tf2,libcurl4-gnutls-dev:i386

Can't render this file because it has a wrong number of fields in line 2.

4
lgsm/data/rhel-7.csv

@ -1,4 +1,5 @@
all,epel-release,curl,wget,util-linux,python36,file,tar,gzip,bzip2,unzip,xz,binutils,bc,jq,tmux,nmap-ncat,cpio,hostname all,bc,binutils,bzip2,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz
steamcmd,glibc.i686,libstdc++.i686
ac ac
ahl ahl
ahl2 ahl2
@ -96,6 +97,7 @@ sof2
sol sol
squad squad
st st
stn
sven sven
terraria terraria
tf2,libcurl.i686 tf2,libcurl.i686

Can't render this file because it has a wrong number of fields in line 2.

4
lgsm/data/rhel-8.csv

@ -1,4 +1,5 @@
all,epel-release,curl,wget,util-linux,python36,file,tar,gzip,bzip2,unzip,xz,binutils,bc,jq,tmux,nmap-ncat,cpio,hostname all,bc,binutils,bzip2,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz
steamcmd,glibc.i686,libstdc++.i686
ac ac
ahl ahl
ahl2 ahl2
@ -96,6 +97,7 @@ sof2
sol sol
squad squad
st st
stn
sven sven
terraria terraria
tf2,libcurl.i686 tf2,libcurl.i686

Can't render this file because it has a wrong number of fields in line 2.

4
lgsm/data/rocky-8.csv

@ -1,4 +1,5 @@
all,epel-release,curl,wget,util-linux,python36,file,tar,gzip,bzip2,unzip,xz,binutils,bc,jq,tmux,nmap-ncat,cpio,hostname all,bc,binutils,bzip2,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz
steamcmd,glibc.i686,libstdc++.i686
ac ac
ahl ahl
ahl2 ahl2
@ -96,6 +97,7 @@ sof2
sol sol
squad squad
st st
stn
sven sven
terraria terraria
tf2,libcurl.i686 tf2,libcurl.i686

Can't render this file because it has a wrong number of fields in line 2.

8
lgsm/data/ubuntu-16.04.csv

@ -1,4 +1,5 @@
all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,jq,python3,tar,tmux,util-linux,netcat,unzip,xz-utils,lib32gcc1,lib32stdc++6,hostname all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils
steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
ac ac
ahl ahl
ahl2 ahl2
@ -68,14 +69,14 @@ nmrih,libtinfo5:i386
ns ns
ns2,speex,libtbb2 ns2,speex,libtbb2
ns2c,speex:i386,libtbb2 ns2c,speex:i386,libtbb2
onset onset,libmariadbclient-dev
opfor opfor
pc pc
pmc,openjdk-8-jre pmc,openjdk-8-jre
pstbs,libgconf-2-4 pstbs,libgconf-2-4
pvkii pvkii
pvr,libc++1 pvr,libc++1
pz pz,openjdk-8-jre,rng-tools
q2 q2
q3 q3
ql ql
@ -96,6 +97,7 @@ sof2
sol sol
squad squad
st st
stn
sven,libssl1.1:i386,zlib1g:i386 sven,libssl1.1:i386,zlib1g:i386
terraria terraria
tf2,libcurl4-gnutls-dev:i386 tf2,libcurl4-gnutls-dev:i386

Can't render this file because it has a wrong number of fields in line 2.

8
lgsm/data/ubuntu-18.04.csv

@ -1,4 +1,5 @@
all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,jq,python3,tar,tmux,util-linux,netcat,unzip,xz-utils,lib32gcc1,lib32stdc++6,hostname all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils
steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
ac ac
ahl ahl
ahl2 ahl2
@ -68,14 +69,14 @@ nmrih,libtinfo5:i386
ns ns
ns2,speex,libtbb2 ns2,speex,libtbb2
ns2c,speex:i386,libtbb2 ns2c,speex:i386,libtbb2
onset onset,libmariadbclient-dev
opfor opfor
pc pc
pmc,openjdk-11-jre pmc,openjdk-11-jre
pstbs,libgconf-2-4 pstbs,libgconf-2-4
pvkii pvkii
pvr,libc++1 pvr,libc++1
pz pz,openjdk-11-jre,rng-tools
q2 q2
q3 q3
ql ql
@ -96,6 +97,7 @@ sof2
sol sol
squad squad
st st
stn
sven,libssl1.1:i386,zlib1g:i386 sven,libssl1.1:i386,zlib1g:i386
terraria terraria
tf2,libcurl4-gnutls-dev:i386 tf2,libcurl4-gnutls-dev:i386

Can't render this file because it has a wrong number of fields in line 2.

9
lgsm/data/ubuntu-20.04.csv

@ -1,5 +1,5 @@
all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,jq,python3,tar,tmux,util-linux,netcat,unzip,xz-utils,lib32gcc1,lib32stdc++6,hostname all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils
steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386 steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
ac ac
ahl ahl
ahl2 ahl2
@ -69,14 +69,14 @@ nmrih,libtinfo5:i386
ns ns
ns2,speex,libtbb2 ns2,speex,libtbb2
ns2c,speex:i386,libtbb2 ns2c,speex:i386,libtbb2
onset onset,libmariadbclient-dev
opfor opfor
pc pc
pmc,openjdk-16-jre pmc,openjdk-16-jre
pstbs,libgconf-2-4 pstbs,libgconf-2-4
pvkii pvkii
pvr,libc++1 pvr,libc++1
pz pz,openjdk-16-jre,rng-tools
q2 q2
q3 q3
ql ql
@ -97,6 +97,7 @@ sof2
sol sol
squad squad
st st
stn
sven,libssl1.1:i386,zlib1g:i386 sven,libssl1.1:i386,zlib1g:i386
terraria terraria
tf2,libcurl4-gnutls-dev:i386 tf2,libcurl4-gnutls-dev:i386

Can't render this file because it has a wrong number of fields in line 2.

8
lgsm/data/ubuntu-21.04.csv

@ -1,4 +1,5 @@
all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,jq,python3,tar,tmux,util-linux,netcat,unzip,xz-utils,lib32gcc-s1,lib32stdc++6,hostname all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils
steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
ac ac
ahl ahl
ahl2 ahl2
@ -68,14 +69,14 @@ nmrih,libtinfo5:i386
ns ns
ns2,speex,libtbb2 ns2,speex,libtbb2
ns2c,speex:i386,libtbb2 ns2c,speex:i386,libtbb2
onset onset,libmariadbclient-dev
opfor opfor
pc pc
pmc,openjdk-16-jre pmc,openjdk-16-jre
pstbs,libgconf-2-4 pstbs,libgconf-2-4
pvkii pvkii
pvr,libc++1 pvr,libc++1
pz pz,openjdk-16-jre,rng-tools
q2 q2
q3 q3
ql ql
@ -96,6 +97,7 @@ sof2
sol sol
squad squad
st st
stn
sven,libssl1.1:i386,zlib1g:i386 sven,libssl1.1:i386,zlib1g:i386
terraria terraria
tf2,libcurl4-gnutls-dev:i386 tf2,libcurl4-gnutls-dev:i386

Can't render this file because it has a wrong number of fields in line 2.

48
lgsm/functions/check_deps.sh

@ -173,6 +173,11 @@ fn_install_missing_deps(){
eval "${cmd}" eval "${cmd}"
fi fi
autodepinstall="$?" autodepinstall="$?"
# If auto install passes remove steamcmd install failure.
if [ "${autodepinstall}" == "0" ]; then
unset steamcmdfail
fi
fi fi
# If automatic dependency install is unavailable. # If automatic dependency install is unavailable.
@ -217,8 +222,14 @@ fn_check_loop(){
# Checks if dependency is installed or not. # Checks if dependency is installed or not.
fn_deps_detector(){ fn_deps_detector(){
## Check.
# SteamCMD: Will be removed from required array if 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
array_deps_required=( "${array_deps_required[@]/steamcmd}" )
steamcmdstatus=1
# Java: Added for users using Oracle JRE to bypass check. # Java: Added for users using Oracle JRE to bypass check.
if [[ ${deptocheck} == "openjdk"* ]]||[[ ${deptocheck} == "java"* ]]; then elif [[ ${deptocheck} == "openjdk"* ]]||[[ ${deptocheck} == "java"* ]]; then
# Is java already installed? # Is java already installed?
if [ -n "${javaversion}" ]; then if [ -n "${javaversion}" ]; then
# Added for users using Oracle JRE to bypass check. # Added for users using Oracle JRE to bypass check.
@ -249,25 +260,28 @@ fn_deps_detector(){
depstatus=$? depstatus=$?
fi fi
if [ "${depstatus}" == "0" ]; then # Outcome of Check.
if [ "${steamcmdstatus}" == "1" ]; then
# If SteamCMD is not available in repo dont check for it.
unset steamcmdstatus
elif [ "${depstatus}" == "0" ]; then
# If dependency is found. # If dependency is found.
missingdep=0 missingdep=0
if [ "${commandname}" == "INSTALL" ]; then if [ "${commandname}" == "INSTALL" ]; then
echo -e "${green}${deptocheck}${default}" echo -e "${green}${deptocheck}${default}"
sleep 0.1 sleep 0.1
fi fi
else elif [ "${depstatus}" != "0" ]; then
# If dependency is not found. # If dependency is not found.
missingdep=1 missingdep=1
if [ "${commandname}" == "INSTALL" ]; then if [ "${commandname}" == "INSTALL" ]; then
echo -e "${red}${deptocheck}${default}" echo -e "${red}${deptocheck}${default}"
sleep 0.1 sleep 0.1
fi fi
# Define required dependencies for SteamCMD. # If SteamCMD requirements are not met install will fail.
if [ -n "${appid}" ]; then if [ -n "${appid}" ]; then
array_steamcmd_deps_required=("${depsteamcmd}") for steamcmddeptocheck in ${array_deps_required_steamcmd[*]}; do
for steamcmddeptocheck in ${array_steamcmd_deps_required[*]}; do if [ "${deptocheck}" != "steamcmd" ]&&[ "${deptocheck}" == "${steamcmddeptocheck}" ]; then
if [ "${deptocheck}" == "${steamcmddeptocheck}" ]; then
steamcmdfail=1 steamcmdfail=1
fi fi
done done
@ -298,29 +312,25 @@ fi
info_distro.sh info_distro.sh
# some RHEL based distros use 8.4 instead of just 8. if [ ! -f "${tmpdir}/dependency-no-check.tmp" ]&&[ ! -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then
if [[ "${distroidlike}" == *"rhel"* ]]||[ "${distroid}" == "rhel" ]; then
distroversion="${distroversionrh}"
fi
if [ ! -f "${tmpdir}/dependency-no-check.tmp" ]&&[ ! -f "${datadir}/${distroid}-${distroversion}.csv" ]; then
# Check that the disto dependency csv file exists. # Check that the disto dependency csv file exists.
fn_check_file_github "lgsm/data" "${distroid}-${distroversion}.csv" fn_check_file_github "lgsm/data" "${distroid}-${distroversioncsv}.csv"
if [ -n "${checkflag}" ]&&[ "${checkflag}" == "0" ]; then if [ -n "${checkflag}" ]&&[ "${checkflag}" == "0" ]; then
fn_fetch_file_github "lgsm/data" "${distroid}-${distroversion}.csv" "lgsm/data" "chmodx" "norun" "noforce" "nohash" fn_fetch_file_github "lgsm/data" "${distroid}-${distroversioncsv}.csv" "lgsm/data" "chmodx" "norun" "noforce" "nohash"
fi fi
fi fi
# If the file successfully downloaded run the dependency check. # If the file successfully downloaded run the dependency check.
if [ -f "${datadir}/${distroid}-${distroversion}.csv" ]; then if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then
depall=$(awk -F, '$1=="all" {$1=""; print $0}' "${datadir}/${distroid}-${distroversion}.csv") depall=$(awk -F, '$1=="all" {$1=""; print $0}' "${datadir}/${distroid}-${distroversioncsv}.csv")
depsteamcmd=$(awk -F, '$1=="steamcmd" {$1=""; print $0}' "${datadir}/${distroid}-${distroversion}.csv") depsteamcmd=$(awk -F, '$1=="steamcmd" {$1=""; print $0}' "${datadir}/${distroid}-${distroversioncsv}.csv")
depshortname=$(awk -v shortname="$shortname" -F, '$1==shortname {$1=""; print $0}' "${datadir}/${distroid}-${distroversion}.csv") depshortname=$(awk -v shortname="$shortname" -F, '$1==shortname {$1=""; print $0}' "${datadir}/${distroid}-${distroversioncsv}.csv")
# Generate array of missing deps. # Generate array of missing deps.
array_deps_missing=() array_deps_missing=()
array_deps_required=("${depall} ${depsteamcmd} ${depshortname}") array_deps_required=("${depall} ${depsteamcmd} ${depshortname}")
array_deps_required_steamcmd=("${depsteamcmd}")
fn_deps_email fn_deps_email
# Unique sort dependency array. # Unique sort dependency array.
IFS=" " read -r -a array_deps_required <<< "$(echo "${array_deps_required[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' ')" IFS=" " read -r -a array_deps_required <<< "$(echo "${array_deps_required[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' ')"

33
lgsm/functions/command_update_linuxgsm.sh

@ -11,6 +11,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set fn_firstcommand_set
check.sh check.sh
info_distro.sh
fn_print_dots "" fn_print_dots ""
fn_script_log_info "Updating LinuxGSM" fn_script_log_info "Updating LinuxGSM"
@ -146,6 +147,38 @@ else
fn_script_log_pass "Checking ${remotereponame} config _default.cfg" fn_script_log_pass "Checking ${remotereponame} config _default.cfg"
fi fi
# Check distro csv. ${datadir}/${distroid}-${distroversioncsv}.csv
if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then
echo -en "checking ${remotereponame} config ${distroid}-${distroversioncsv}.csv...\c"
fn_script_log_info "Checking ${remotereponame} ${distroid}-${distroversioncsv}.csv"
if [ "${remotereponame}" == "GitHub" ]; then
curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv" 1>/dev/null
else
curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv" 1>/dev/null
fi
if [ $? != "0" ]; then
fn_print_fail_eol_nl
fn_script_log_fatal "Checking ${remotereponame} ${distroid}-${distroversioncsv}.csv"
fn_script_log_fatal "Curl returned error: $?"
core_exit.sh
fi
if [ "${remotereponame}" == "GitHub" ]; then
config_file_diff=$(diff "${datadir}/${distroid}-${distroversioncsv}.csv" <(curl --connect-timeout 10 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv"))
else
config_file_diff=$(diff "${datadir}/${distroid}-${distroversioncsv}.csv" <(curl --connect-timeout 10 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv"))
fi
if [ "${config_file_diff}" != "" ]; then
fn_print_update_eol_nl
fn_script_log_update "Checking ${remotereponame} ${distroid}-${distroversioncsv}.csv"
rm -f "${datadir:?}/${distroid}-${distroversioncsv}.csv"
fn_fetch_file_github "lgsm/data" "${distroid}-${distroversioncsv}.csv" "${datadir}" "nochmodx" "norun" "noforce" "nohash"
else
fn_print_ok_eol_nl
fn_script_log_pass "Checking ${remotereponame} ${distroid}-${distroversioncsv}.csv"
fi
fi
# Check and update modules. # Check and update modules.
if [ -n "${functionsdir}" ]; then if [ -n "${functionsdir}" ]; then
if [ -d "${functionsdir}" ]; then if [ -d "${functionsdir}" ]; then

2
lgsm/functions/core_functions.sh

@ -8,7 +8,7 @@
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
modulesversion="v21.3.0" modulesversion="v21.3.1"
# Core # Core

7
lgsm/functions/info_distro.sh

@ -73,6 +73,13 @@ for distro_info in "${distro_info_array[@]}"; do
fi fi
done done
# some RHEL based distros use 8.4 instead of just 8.
if [[ "${distroidlike}" == *"rhel"* ]]||[ "${distroid}" == "rhel" ]; then
distroversioncsv="${distroversionrh}"
else
distroversioncsv="${distroversion}"
fi
## Glibc version ## Glibc version
# e.g: 1.17 # e.g: 1.17
glibcversion="$(ldd --version | sed -n '1s/.* //p')" glibcversion="$(ldd --version | sed -n '1s/.* //p')"

3
lgsm/functions/info_game.sh

@ -1741,6 +1741,9 @@ fn_info_game_stn(){
port=$(sed -nr 's/^ServerPort=([0-9]+)/\1/p' "${servercfgfullpath}") port=$(sed -nr 's/^ServerPort=([0-9]+)/\1/p' "${servercfgfullpath}")
serverpassword=$(sed -nr 's/^ServerPassword=(.*)$/\1/p' "${servercfgfullpath}") serverpassword=$(sed -nr 's/^ServerPassword=(.*)$/\1/p' "${servercfgfullpath}")
queryport=$((port + 1)) queryport=$((port + 1))
# Not set
serverpassword=${serverpassword:-"NOT SET"}
else else
servername="${unavailable}" servername="${unavailable}"
configip=${configip:-"0.0.0.0"} configip=${configip:-"0.0.0.0"}

6
lgsm/functions/mods_list.sh

@ -76,6 +76,9 @@ get5lastbuild=$(curl --connect-timeout 10 -sL https://ci.splewis.net/job/get5/la
get5latestfile=$(echo -e "${get5lastbuild}" | jq -r '.fileName') get5latestfile=$(echo -e "${get5lastbuild}" | jq -r '.fileName')
get5latestfilepath=$(echo -e "${get5lastbuild}" | jq -r '.relativePath') get5latestfilepath=$(echo -e "${get5lastbuild}" | jq -r '.relativePath')
get5url="https://ci.splewis.net/job/get5/lastSuccessfulBuild/artifact/${get5latestfilepath}" get5url="https://ci.splewis.net/job/get5/lastSuccessfulBuild/artifact/${get5latestfilepath}"
csgopracticelatest=$(curl --connect-timeout 10 -sL https://api.github.com/repos/splewis/csgo-practice-mode/releases/latest | jq '.assets[]')
csgopracticelatestfile=$(echo -e "${csgopracticelatest}" | jq -r '.name')
csgopracticelatestlink=$(echo -e "${csgopracticelatest}" | jq -r '.browser_download_url')
csgopuglatest=$(curl --connect-timeout 10 -sL https://api.github.com/repos/splewis/csgo-pug-setup/releases/latest | jq '.assets[]') csgopuglatest=$(curl --connect-timeout 10 -sL https://api.github.com/repos/splewis/csgo-pug-setup/releases/latest | jq '.assets[]')
csgopuglatestfile=$(echo -e "${csgopuglatest}" | jq -r '.name') csgopuglatestfile=$(echo -e "${csgopuglatest}" | jq -r '.name')
csgopuglatestlink=$(echo -e "${csgopuglatest}" | jq -r '.browser_download_url') csgopuglatestlink=$(echo -e "${csgopuglatest}" | jq -r '.browser_download_url')
@ -140,6 +143,7 @@ mod_info_stripper=( MOD "stripper" "Stripper Source" "http://www.bailopan.net/st
mod_info_gokz=( MOD "gokz" "GOKZ" "https://bitbucket.org/kztimerglobalteam/gokz/downloads/GOKZ-latest.zip" "gokz-latest.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://bitbucket.org/kztimerglobalteam/gokz/src/master/" "Implements the KZ game mode (requires SourceMod and MetaMod)" ) mod_info_gokz=( MOD "gokz" "GOKZ" "https://bitbucket.org/kztimerglobalteam/gokz/downloads/GOKZ-latest.zip" "gokz-latest.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://bitbucket.org/kztimerglobalteam/gokz/src/master/" "Implements the KZ game mode (requires SourceMod and MetaMod)" )
mod_info_ttt=( MOD "ttt" "Trouble in Terrorist Town" "https://csgottt.com/downloads/ttt-latest-dev-${sourcemodversion}.zip" "ttt-latest.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/Bara/TroubleinTerroristTown" "Implements the TTT game mode (requires SourceMod and MetaMod)" ) mod_info_ttt=( MOD "ttt" "Trouble in Terrorist Town" "https://csgottt.com/downloads/ttt-latest-dev-${sourcemodversion}.zip" "ttt-latest.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/Bara/TroubleinTerroristTown" "Implements the TTT game mode (requires SourceMod and MetaMod)" )
mod_info_get5=( MOD "get5" "Get 5" "${get5url}" "${get5latestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/get5" "Plugin for competitive matches/scrims (requires SourceMod and MetaMod)" ) mod_info_get5=( MOD "get5" "Get 5" "${get5url}" "${get5latestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/get5" "Plugin for competitive matches/scrims (requires SourceMod and MetaMod)" )
mod_info_prac=( MOD "prac" "csgo practice mode" "${csgopracticelatestlink}" "${csgopracticelatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/csgo-practice-mode" "Practice Mode is a sourcemod plugin for helping players/teams run practices." )
mod_info_pug=( MOD "pug" "PUG" "${csgopuglatestlink}" "${csgopuglatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/csgo-pug-setup" "plugin for setting up private pug/10man games" ) mod_info_pug=( MOD "pug" "PUG" "${csgopuglatestlink}" "${csgopuglatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/csgo-pug-setup" "plugin for setting up private pug/10man games" )
mod_info_dhook=( MOD "dhook" "dhook" "https://forums.alliedmods.net/attachment.php?attachmentid=190123&d=1625050030" "dhooks-2.2.0d17.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://forums.alliedmods.net/showpost.php?p=2588686&postcount=589" "DHooks 2.2.0 - Required for GOKZ" ) mod_info_dhook=( MOD "dhook" "dhook" "https://forums.alliedmods.net/attachment.php?attachmentid=190123&d=1625050030" "dhooks-2.2.0d17.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://forums.alliedmods.net/showpost.php?p=2588686&postcount=589" "DHooks 2.2.0 - Required for GOKZ" )
mod_info_movement=( MOD "movementapi" "movementapi" "https://github.com/danzayau/MovementAPI/releases/download/2.1.0/MovementAPI-v2.1.0.zip" "MovementAPI-v2.1.0.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/danzayau/MovementAPI" "Movement API 2.1.0 - Required for GOKZ" ) mod_info_movement=( MOD "movementapi" "movementapi" "https://github.com/danzayau/MovementAPI/releases/download/2.1.0/MovementAPI-v2.1.0.zip" "MovementAPI-v2.1.0.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/danzayau/MovementAPI" "Movement API 2.1.0 - Required for GOKZ" )
@ -184,4 +188,4 @@ mod_info_sdtdoxide=( MOD "sdtdoxide" "Oxide for 7 Days To Die" "${oxidesdtdlates
mod_info_valheimplus=( MOD "valheimplus" "Valheim PLUS" "${valeimpluslatestlink}" "ValheimPlus.tar.gz" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Valheim;" "NOTGAMES" "https://github.com/valheimPlus/ValheimPlus" "Mod to improve Valheim gameplay") mod_info_valheimplus=( MOD "valheimplus" "Valheim PLUS" "${valeimpluslatestlink}" "ValheimPlus.tar.gz" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Valheim;" "NOTGAMES" "https://github.com/valheimPlus/ValheimPlus" "Mod to improve Valheim gameplay")
# REQUIRED: Set all mods info into the global array # REQUIRED: Set all mods info into the global array
mods_global_array=( "${mod_info_metamod[@]}" "${mod_info_base_amxx[@]}" "${mod_info_cs_amxx[@]}" "${mod_info_dod_amxx[@]}" "${mod_info_tfc_amxx[@]}" "${mod_info_ns_amxx[@]}" "${mod_info_ts_amxx[@]}" "${mod_info_metamodsource[@]}" "${mod_info_sourcemod[@]}" "${mod_info_steamworks[@]}" "${mod_info_gokz[@]}" "${mod_info_ttt[@]}" "${mod_info_get5[@]}" "${mod_info_pug[@]}" "${mod_info_dhook[@]}" "${mod_info_movement[@]}" "${mod_info_cleaner[@]}" "${mod_info_ulib[@]}" "${mod_info_ulx[@]}" "${mod_info_utime[@]}" "${mod_info_uclip[@]}" "${mod_info_acf[@]}" "${mod_info_acf_missiles[@]}" "${mod_info_acf_sweps[@]}" "${mod_info_advdupe2[@]}" "${mod_info_pac3[@]}" "${mod_info_wiremod[@]}" "${mod_info_wiremodextras[@]}" "${mod_info_darkrp[@]}" "${mod_info_darkrpmodification[@]}" "${mod_info_rustoxide[@]}" "${mod_info_hwoxide[@]}" "${mod_info_sdtdoxide[@]}" "${mod_info_advduplicator[@]}" "${mod_info_trackassemblytool[@]}" "${mod_info_physpropertiesadv[@]}" "${mod_info_controlsystemse2[@]}" "${mod_info_e2pistontiming[@]}" "${mod_info_propcannontool[@]}" "${mod_info_gearassemblytool[@]}" "${mod_info_spinnertool[@]}" "${mod_info_surfacefrictiontool[@]}" "${mod_info_magneticdipole[@]}" "${mod_info_environmentorganizer[@]}" "${mod_info_precision_alignment[@]}" "${mod_info_improved_stacker[@]}" "${mod_info_improved_weight[@]}" "${mod_info_improved_antinoclip[@]}" "${mod_info_laserstool[@]}" "${mod_info_valheimplus[@]}" ) mods_global_array=( "${mod_info_metamod[@]}" "${mod_info_base_amxx[@]}" "${mod_info_cs_amxx[@]}" "${mod_info_dod_amxx[@]}" "${mod_info_tfc_amxx[@]}" "${mod_info_ns_amxx[@]}" "${mod_info_ts_amxx[@]}" "${mod_info_metamodsource[@]}" "${mod_info_sourcemod[@]}" "${mod_info_steamworks[@]}" "${mod_info_gokz[@]}" "${mod_info_ttt[@]}" "${mod_info_get5[@]}" "${mod_info_prac[@]}" "${mod_info_pug[@]}" "${mod_info_dhook[@]}" "${mod_info_movement[@]}" "${mod_info_cleaner[@]}" "${mod_info_ulib[@]}" "${mod_info_ulx[@]}" "${mod_info_utime[@]}" "${mod_info_uclip[@]}" "${mod_info_acf[@]}" "${mod_info_acf_missiles[@]}" "${mod_info_acf_sweps[@]}" "${mod_info_advdupe2[@]}" "${mod_info_pac3[@]}" "${mod_info_wiremod[@]}" "${mod_info_wiremodextras[@]}" "${mod_info_darkrp[@]}" "${mod_info_darkrpmodification[@]}" "${mod_info_rustoxide[@]}" "${mod_info_hwoxide[@]}" "${mod_info_sdtdoxide[@]}" "${mod_info_advduplicator[@]}" "${mod_info_trackassemblytool[@]}" "${mod_info_physpropertiesadv[@]}" "${mod_info_controlsystemse2[@]}" "${mod_info_e2pistontiming[@]}" "${mod_info_propcannontool[@]}" "${mod_info_gearassemblytool[@]}" "${mod_info_spinnertool[@]}" "${mod_info_surfacefrictiontool[@]}" "${mod_info_magneticdipole[@]}" "${mod_info_environmentorganizer[@]}" "${mod_info_precision_alignment[@]}" "${mod_info_improved_stacker[@]}" "${mod_info_improved_weight[@]}" "${mod_info_improved_antinoclip[@]}" "${mod_info_laserstool[@]}" "${mod_info_valheimplus[@]}" )

2
linuxgsm.sh

@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x set -x
fi fi
version="v21.3.0" version="v21.3.1"
shortname="core" shortname="core"
gameservername="core" gameservername="core"
commandname="CORE" commandname="CORE"

2
tests/tests_fctrserver.sh

@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x set -x
fi fi
version="v21.3.0" version="v21.3.1"
shortname="fctr" shortname="fctr"
gameservername="fctrserver" gameservername="fctrserver"
commandname="CORE" commandname="CORE"

2
tests/tests_jc2server.sh

@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x set -x
fi fi
version="v21.3.0" version="v21.3.1"
shortname="jc2" shortname="jc2"
gameservername="jc2server" gameservername="jc2server"
commandname="CORE" commandname="CORE"

2
tests/tests_mcserver.sh

@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x set -x
fi fi
version="v21.3.0" version="v21.3.1"
shortname="mc" shortname="mc"
gameservername="mcserver" gameservername="mcserver"
commandname="CORE" commandname="CORE"

2
tests/tests_ts3server.sh

@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x set -x
fi fi
version="v21.3.0" version="v21.3.1"
shortname="ts3" shortname="ts3"
gameservername="ts3server" gameservername="ts3server"
commandname="CORE" commandname="CORE"

Loading…
Cancel
Save