Browse Source

Merge branch 'develop' into feature/dayz-server

pull/3557/head
Marcin Jakubowski 4 years ago
parent
commit
fce578528d
  1. 2
      .github/FUNDING.yml
  2. 98
      .github/labeler.yml
  3. 13
      .github/potential-duplicates.yml
  4. 4
      .github/release-drafter.yml
  5. 9
      .github/workflows/git-sync.yml
  6. 14
      .github/workflows/label-sponsors.yml
  7. 1395
      .github/workflows/labeler.yml
  8. 31
      .github/workflows/potential-duplicates.yml
  9. 14
      .github/workflows/version-check.sh
  10. 23
      .github/workflows/version-check.yml
  11. 8
      lgsm/config-default/config-lgsm/avserver/_default.cfg
  12. 4
      lgsm/config-default/config-lgsm/loserver/_default.cfg
  13. 186
      lgsm/config-default/config-lgsm/sfserver/_default.cfg
  14. 7
      lgsm/data/almalinux-8.csv
  15. 7
      lgsm/data/centos-7.csv
  16. 6
      lgsm/data/centos-8.csv
  17. 11
      lgsm/data/debian-10.csv
  18. 11
      lgsm/data/debian-11.csv
  19. 11
      lgsm/data/debian-9.csv
  20. 5
      lgsm/data/rhel-7.csv
  21. 5
      lgsm/data/rhel-8.csv
  22. 7
      lgsm/data/rocky-8.csv
  23. 1
      lgsm/data/serverlist.csv
  24. 9
      lgsm/data/ubuntu-16.04.csv
  25. 11
      lgsm/data/ubuntu-18.04.csv
  26. 12
      lgsm/data/ubuntu-20.04.csv
  27. 13
      lgsm/data/ubuntu-21.04.csv
  28. 10
      lgsm/functions/alert_mailgun.sh
  29. 3
      lgsm/functions/alert_telegram.sh
  30. 50
      lgsm/functions/check_deps.sh
  31. 33
      lgsm/functions/command_update_linuxgsm.sh
  32. 2
      lgsm/functions/core_functions.sh
  33. 9
      lgsm/functions/info_distro.sh
  34. 32
      lgsm/functions/info_game.sh
  35. 28
      lgsm/functions/info_messages.sh
  36. 7
      lgsm/functions/install_config.sh
  37. 2
      lgsm/functions/install_server_files.sh
  38. 6
      lgsm/functions/mods_list.sh
  39. 3
      lgsm/functions/query_gsquery.py
  40. 5
      lgsm/functions/update_mta.sh
  41. 2
      linuxgsm.sh
  42. 2
      tests/tests_fctrserver.sh
  43. 2
      tests/tests_jc2server.sh
  44. 2
      tests/tests_mcserver.sh
  45. 2
      tests/tests_ts3server.sh

2
.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

98
.github/labeler.yml

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

13
.github/potential-duplicates.yml

@ -1,13 +0,0 @@
# Label name and color to set, when potential duplicates are detected
issueLabel: "duplicate"
labelColor: 579e01
# If similarity is higher than this threshold, issue will be marked as duplicate
threshold: 0.60
# Comment to post when potential duplicates are detected
referenceComment: >
Potential duplicates:
{{#issues}}
- [#{{ number }}] {{ title }} ({{ accuracy }}%)
{{/issues}}

4
.github/release-drafter.yml

@ -1,4 +0,0 @@
template: |
## What’s Changed
$CHANGES

9
.github/workflows/git-sync.yml

@ -5,18 +5,17 @@ on:
push:
branches:
- master
- 'develop'
- develop
jobs:
repo-sync:
GitHub-to-Bitbucket:
runs-on: ubuntu-latest
steps:
- name: webfactory/ssh-agent
- name: webfactory/ssh-agent@v0.5.3
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.BITBUCKET_SECRET }}
- name: repo-sync
- name: wei/[email protected]
uses: wei/[email protected]
with:
ssh_private_key: ${{ secrets.BITBUCKET_SECRET }}

14
.github/workflows/label-sponsors.yml

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

1395
.github/workflows/labeler.yml

File diff suppressed because it is too large

31
.github/workflows/potential-duplicates.yml

@ -0,0 +1,31 @@
name: Potential Duplicates
on:
issues:
types: [opened]
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: wow-actions/potential-duplicates@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Issue title filter work with anymatch https://www.npmjs.com/package/anymatch.
# Any matched issue will stop detection immediately.
# You can specify multi filters in each line.
filter: ''
# Exclude keywords in title before detecting.
exclude: ''
# Label to set, when potential duplicates are detected.
label: potential-duplicate
# Get issues with state to compare. Supported state: 'all', 'closed', 'open'.
state: all
# If similarity is higher than this threshold([0,1]), issue will be marked as duplicate.
threshold: 0.6
# Reactions to be add to comment when potential duplicates are detected.
# Available reactions: "-1", "+1", "confused", "laugh", "heart", "hooray", "rocket", "eyes"
#reactions: 'eyes, confused'
# Comment to post when potential duplicates are detected.
comment: >
Potential duplicates: {{#issues}}
- [#{{ number }}] {{ title }} ({{ accuracy }}%)
{{/issues}}

14
.github/workflows/version-check.sh

@ -0,0 +1,14 @@
version=$(grep "version=" linuxgsm.sh | sed -e 's/version//g'| tr -d '="')
modulesversion=$(grep "modulesversion=" lgsm/functions/core_functions.sh | sed -e 's/modulesversion//g'| tr -d '="')
if [ "${version}" != "${modulesversion}" ]; then
echo "Error! LinuxGSM version mismatch"
echo "Version: ${version}"
echo "Modules Version: ${modulesversion}"
exit 1
else
echo "Success! LinuxGSM version match"
echo "Version: ${version}"
echo "Modules Version: ${modulesversion}"
exit
fi

23
.github/workflows/version-check.yml

@ -0,0 +1,23 @@
# This is a basic workflow to help you get started with Actions
name: Version Check
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on: push
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
Version-Check:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Runs a single command using the runners shell
- name: compare versions
run: chmod +x .github/workflows/version-check.sh; .github/workflows/version-check.sh

8
lgsm/config-default/config-lgsm/avserver/_default.cfg

@ -10,14 +10,8 @@
## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters
# https://steamidfinder.com
adminsteamid=""
if [ -n "${adminsteamid}" ]; then
admincmd="--admin ${adminsteamid}"
fi
## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
startparameters="--galaxy-name ${selfname} --ip ${ip} --datapath ${avdatapath} ${admincmd}"
startparameters="--galaxy-name ${selfname} --ip ${ip} --datapath ${avdatapath}"
#### LinuxGSM Settings ####

4
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}"

186
lgsm/config-default/config-lgsm/sfserver/_default.cfg

@ -0,0 +1,186 @@
##################################
######## Default Settings ########
##################################
# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN!
# Copy settings from here and use them in either:
# common.cfg - applies settings to every instance.
# [instance].cfg - applies settings to a specific instance.
#### Game Server Settings ####
## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters
ip="0.0.0.0"
queryport="15777"
beaconport="15000"
port="7777"
## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
startparameters="FactoryGame -ServerQueryPort=${queryport} -BeaconPort=${beaconport} -Port=${port} -log -unattended"
#### LinuxGSM Settings ####
## LinuxGSM Stats
# Send useful stats to LinuxGSM developers.
# https://docs.linuxgsm.com/configuration/linuxgsm-stats
# (on|off)
stats="off"
## Notification Alerts
# (on|off)
# Display IP | https://docs.linuxgsm.com/alerts#display-ip
displayip=""
# More info | https://docs.linuxgsm.com/alerts#more-info
postalert="off"
# Discord Alerts | https://docs.linuxgsm.com/alerts/discord
discordalert="off"
discordwebhook="webhook"
# Email Alerts | https://docs.linuxgsm.com/alerts/email
emailalert="off"
email="[email protected]"
emailfrom=""
# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify
gotifyalert="off"
gotifytoken="token"
gotifywebhook="webhook"
# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt
iftttalert="off"
ifttttoken="accesstoken"
iftttevent="linuxgsm_alert"
# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun
mailgunalert="off"
mailgunapiregion="us"
mailguntoken="accesstoken"
mailgundomain="example.com"
mailgunemailfrom="[email protected]"
mailgunemail="[email protected]"
# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet
pushbulletalert="off"
pushbullettoken="accesstoken"
channeltag=""
# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover
pushoveralert="off"
pushovertoken="accesstoken"
pushoveruserkey="userkey"
# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat
rocketchatalert="off"
rocketchatwebhook="webhook"
rocketchattoken=""
# Slack Alerts | https://docs.linuxgsm.com/alerts/slack
slackalert="off"
slackwebhook="webhook"
# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram
# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring".
# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help".
telegramapi="api.telegram.org"
telegramalert="off"
telegramtoken="accesstoken"
telegramchatid=""
curlcustomstring=""
## Updating | https://docs.linuxgsm.com/commands/update
updateonstart="off"
## Backup | https://docs.linuxgsm.com/commands/backup
maxbackups="4"
maxbackupdays="30"
stoponbackup="on"
## Logging | https://docs.linuxgsm.com/features/logging
consolelogging="on"
logdays="7"
## Monitor | https://docs.linuxgsm.com/commands/monitor
# Query delay time
querydelay="1"
## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors
ansi="on"
#### Advanced Settings ####
## Message Display Time | https://docs.linuxgsm.com/features/message-display-time
sleeptime="0.5"
## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd
# Server appid
appid="1690800"
steamcmdforcewindows="no"
# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch
branch=""
betapassword=""
# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server
steammaster="false"
## Stop Mode | https://docs.linuxgsm.com/features/stop-mode
# 1: tmux kill
# 2: CTRL+c
# 3: quit
# 4: quit 120s
# 5: stop
# 6: q
# 7: exit
# 8: 7 Days to Die
# 9: GoldSrc
# 10: Avorion
# 11: end
stopmode="2"
## Query mode
# 1: session only
# 2: gamedig (gsquery fallback)
# 3: gamedig
# 4: gsquery
# 5: tcp
querymode="1"
querytype=""
## Console type
consoleverbose="yes"
consoleinteract="no"
## Game Server Details
# Do not edit
gamename="Satisfactory"
engine="unreal4"
glibc="2.17"
#### Directories ####
# Edit with care
## Game Server Directories
systemdir="${serverfiles}/FactoryGame"
executabledir="${serverfiles}/Engine/Binaries/Linux"
executable="./UE4Server-Linux-Shipping"
servercfgdir="${systemdir}/Saved/Config/LinuxServer"
servercfg="GameUserSettings.ini"
servercfgdefault="GameUserSettings.ini"
servercfgfullpath="${servercfgdir}/${servercfg}"
## Backup Directory
backupdir="${lgsmdir}/backup"
## Logging Directories
logdir="${rootdir}/log"
gamelogdir="${systemdir}/Saved/Logs"
lgsmlogdir="${logdir}/script"
consolelogdir="${logdir}/console"
lgsmlog="${lgsmlogdir}/${selfname}-script.log"
consolelog="${consolelogdir}/${selfname}-console.log"
alertlog="${lgsmlogdir}/${selfname}-alert.log"
postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log"
## Logs Naming
lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log"
consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log"

7
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
ahl
ahl2
@ -61,7 +62,7 @@ mcb,libnsl
mh
mohaa,compat-libstdc++-33.i686
mom
mta
mta,ncurses-compat-libs
mumble
nd
nmrih,ncurses-libs.i686
@ -92,10 +93,12 @@ scpsl
scpslsm
sdtd,telnet,expect
sfc,ncurses-libs.i686
sf
sof2
sol
squad
st
stn
sven
terraria
tf2,libcurl.i686

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

7
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,python3,tar,tmux,unzip,util-linux,wget,xz
steamcmd,glibc.i686,libstdc++.i686
ac
ahl
ahl2
@ -61,7 +62,7 @@ mcb,libnsl
mh
mohaa,compat-libstdc++-33.i686
mom
mta
mta,ncurses-libs
mumble
nd
nmrih,ncurses-libs.i686
@ -92,10 +93,12 @@ scpsl
scpslsm
sdtd,telnet,expect
sfc,ncurses-libs.i686
sf
sof2
sol
squad
st
stn
sven
terraria
tf2,libcurl.i686

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

6
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
ahl
ahl2
@ -61,7 +62,7 @@ mcb,libnsl
mh
mohaa,compat-libstdc++-33.i686
mom
mta
mta,ncurses-compat-libs
mumble
nd
nmrih,ncurses-libs.i686
@ -92,6 +93,7 @@ scpsl
scpslsm
sdtd,telnet,expect
sfc,ncurses-libs.i686
sf
sof2
sol
squad

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

11
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
ahl
ahl2
@ -61,21 +62,21 @@ mcb
mh
mohaa,libstdc++5:i386
mom
mta
mta,libncursesw5
mumble
nd
nmrih,libtinfo5:i386
ns
ns2,speex,libtbb2
ns2c,speex:i386,libtbb2
onset
onset,libmariadbclient-dev
opfor
pc
pmc,openjdk-11-jre
pstbs,libgconf-2-4
pvkii
pvr,libc++1
pz
pz,openjdk-11-jre,rng-tools
q2
q3
ql
@ -92,10 +93,12 @@ scpsl,mono-complete
scpslsm,mono-complete
sdtd,telnet,expect
sfc,libtinfo5:i386
sf
sof2
sol
squad
st
stn
sven,libssl1.1:i386,zlib1g:i386
terraria
tf2,libcurl4-gnutls-dev:i386

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

11
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
ahl
ahl2
@ -61,21 +62,21 @@ mcb
mh
mohaa,libstdc++5:i386
mom
mta
mta,libncursesw5
mumble
nd
nmrih,libtinfo5:i386
ns
ns2,speex,libtbb2
ns2c,speex:i386,libtbb2
onset
onset,libmariadbclient-dev
opfor
pc
pmc,openjdk-16-jre
pstbs,libgconf-2-4
pvkii
pvr,libc++1
pz
pz,openjdk-16-jre,rng-tools
q2
q3
ql
@ -92,10 +93,12 @@ scpsl,mono-complete
scpslsm,mono-complete
sdtd,telnet,expect
sfc,libtinfo5:i386
sf
sof2
sol
squad
st
stn
sven,libssl1.1:i386,zlib1g:i386
terraria
tf2,libcurl4-gnutls-dev:i386

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

11
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
ahl
ahl2
@ -61,21 +62,21 @@ mcb
mh
mohaa,libstdc++5:i386
mom
mta
mta,libncursesw5
mumble
nd
nmrih,libtinfo5:i386
ns
ns2,speex,libtbb2
ns2c,speex:i386,libtbb2
onset
onset,libmariadbclient-dev
opfor
pc
pmc,openjdk-8-jre
pstbs,libgconf-2-4
pvkii
pvr,libc++1
pz
pz,openjdk-8-jre,rng-tools
q2
q3
ql
@ -92,10 +93,12 @@ scpsl,mono-complete
scpslsm,mono-complete
sdtd,telnet,expect
sfc,libtinfo5:i386
sf
sof2
sol
squad
st
stn
sven,libssl1.1:i386,zlib1g:i386
terraria
tf2,libcurl4-gnutls-dev:i386

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

5
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
ahl
ahl2
@ -92,10 +93,12 @@ scpsl
scpslsm
sdtd,telnet,expect
sfc,ncurses-libs.i686
sf
sof2
sol
squad
st
stn
sven
terraria
tf2,libcurl.i686

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

5
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
ahl
ahl2
@ -92,10 +93,12 @@ scpsl
scpslsm
sdtd,telnet,expect
sfc,ncurses-libs.i686
sf
sof2
sol
squad
st
stn
sven
terraria
tf2,libcurl.i686

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

7
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
ahl
ahl2
@ -61,7 +62,7 @@ mcb,libnsl
mh
mohaa,compat-libstdc++-33.i686
mom
mta
mta,ncurses-compat-libs
mumble
nd
nmrih,ncurses-libs.i686
@ -92,10 +93,12 @@ scpsl
scpslsm
sdtd,telnet,expect
sfc,ncurses-libs.i686
sf
sof2
sol
squad
st
stn
sven
terraria
tf2,libcurl.i686

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

1
lgsm/data/serverlist.csv

@ -92,6 +92,7 @@ scpsl,scpslserver,SCP: Secret Laboratory
scpslsm,scpslsmserver,SCP: Secret Laboratory ServerMod
sdtd,sdtdserver,7 Days to Die
sfc,sfcserver,SourceForts Classic
sf,sfserver,Satisfactory
sof2,sof2server,Soldier Of Fortune 2: Gold Edition
sol,solserver,Soldat
squad,squadserver,Squad

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

9
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
ahl
ahl2
@ -68,14 +69,14 @@ nmrih,libtinfo5:i386
ns
ns2,speex,libtbb2
ns2c,speex:i386,libtbb2
onset
onset,libmariadbclient-dev
opfor
pc
pmc,openjdk-8-jre
pstbs,libgconf-2-4
pvkii
pvr,libc++1
pz
pz,openjdk-8-jre,rng-tools
q2
q3
ql
@ -92,10 +93,12 @@ scpsl,mono-complete
scpslsm,mono-complete
sdtd,telnet,expect
sfc,libtinfo5:i386
sf
sof2
sol
squad
st
stn
sven,libssl1.1:i386,zlib1g:i386
terraria
tf2,libcurl4-gnutls-dev:i386

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

11
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
ahl
ahl2
@ -61,21 +62,21 @@ mcb
mh
mohaa,libstdc++5:i386
mom
mta
mta,libncursesw5
mumble
nd
nmrih,libtinfo5:i386
ns
ns2,speex,libtbb2
ns2c,speex:i386,libtbb2
onset
onset,libmariadbclient-dev
opfor
pc
pmc,openjdk-11-jre
pstbs,libgconf-2-4
pvkii
pvr,libc++1
pz
pz,openjdk-11-jre,rng-tools
q2
q3
ql
@ -92,10 +93,12 @@ scpsl,mono-complete
scpslsm,mono-complete
sdtd,telnet,expect
sfc,libtinfo5:i386
sf
sof2
sol
squad
st
stn
sven,libssl1.1:i386,zlib1g:i386
terraria
tf2,libcurl4-gnutls-dev:i386

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

12
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
steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386
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
ahl
ahl2
@ -62,21 +62,21 @@ mcb
mh
mohaa,libstdc++5:i386
mom
mta
mta,libncursesw5
mumble
nd
nmrih,libtinfo5:i386
ns
ns2,speex,libtbb2
ns2c,speex:i386,libtbb2
onset
onset,libmariadbclient-dev
opfor
pc
pmc,openjdk-16-jre
pstbs,libgconf-2-4
pvkii
pvr,libc++1
pz
pz,openjdk-16-jre,rng-tools
q2
q3
ql
@ -93,10 +93,12 @@ scpsl,mono-complete
scpslsm,mono-complete
sdtd,telnet,expect
sfc,libtinfo5:i386
sf
sof2
sol
squad
st
stn
sven,libssl1.1:i386,zlib1g:i386
terraria
tf2,libcurl4-gnutls-dev:i386

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

13
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
ahl
ahl2
@ -61,21 +62,21 @@ mcb
mh
mohaa,libstdc++5:i386
mom
mta
mta,libncursesw5
mumble
nd
nmrih,libtinfo5:i386
ns
ns2,speex,libtbb2
ns2c,speex:i386,libtbb2
onset
onset,libmariadbclient-dev
opfor
pc
pmc,openjdk-16-jre
pstbs,libgconf-2-4
pvkii
pvr,libc++1
pz
pz,openjdk-16-jre,rng-tools
q2
q3
ql
@ -92,12 +93,14 @@ scpsl,mono-complete
scpslsm,mono-complete
sdtd,telnet,expect
sfc,libtinfo5:i386
sf
sof2
sol
squad
st
stn
sven,libssl1.1:i386,zlib1g:i386
terraria
terraria,libsdl
tf2,libcurl4-gnutls-dev:i386
tfc
ts

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

10
lgsm/functions/alert_mailgun.sh

@ -13,7 +13,7 @@ else
mailgunapiurl="https://api.mailgun.net"
fi
fn_print_dots "Sending Email alert: Mailgun: ${email}"
fn_print_dots "Sending Email alert: Mailgun: ${mailgunemail}"
mailgunsend=$(curl --connect-timeout 10 -s --user "api:${mailguntoken}" \
-F from="LinuxGSM <${mailgunemailfrom}>" \
@ -24,9 +24,9 @@ mailgunsend=$(curl --connect-timeout 10 -s --user "api:${mailguntoken}" \
-F text="$(cat "${alertlog}")" "${mailgunapiurl}/v3/${mailgundomain}/messages")
if [ -z "${mailgunsend}" ]; then
fn_print_fail_nl "Sending Email alert: Mailgun: ${email}"
fn_script_log_fatal "Sending Email alert: Mailgun: ${email}"
fn_print_fail_nl "Sending Email alert: Mailgun: ${mailgunemail}"
fn_script_log_fatal "Sending Email alert: Mailgun: ${mailgunemail}"
else
fn_print_ok_nl "Sending Email alert: Mailgun: ${email}"
fn_script_log_pass "Sending Email alert: Mailgun: ${email}"
fn_print_ok_nl "Sending Email alert: Mailgun: ${mailgunemail}"
fn_script_log_pass "Sending Email alert: Mailgun: ${mailgunemail}"
fi

3
lgsm/functions/alert_telegram.sh

@ -12,7 +12,8 @@ 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
)

50
lgsm/functions/check_deps.sh

@ -173,6 +173,11 @@ fn_install_missing_deps(){
eval "${cmd}"
fi
autodepinstall="$?"
# If auto install passes remove steamcmd install failure.
if [ "${autodepinstall}" == "0" ]; then
unset steamcmdfail
fi
fi
# If automatic dependency install is unavailable.
@ -217,8 +222,14 @@ fn_check_loop(){
# Checks if dependency is installed or not.
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 [ "${deptocheck}" == "steamcmd" ]&&[ -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.
if [[ ${deptocheck} == "openjdk"* ]]||[[ ${deptocheck} == "java"* ]]; then
elif [[ ${deptocheck} == "openjdk"* ]]||[[ ${deptocheck} == "java"* ]]; then
# Is java already installed?
if [ -n "${javaversion}" ]; then
# Added for users using Oracle JRE to bypass check.
@ -249,25 +260,28 @@ fn_deps_detector(){
depstatus=$?
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.
missingdep=0
if [ "${commandname}" == "INSTALL" ]; then
echo -e "${green}${deptocheck}${default}"
sleep 0.1
fi
else
elif [ "${depstatus}" != "0" ]; then
# If dependency is not found.
missingdep=1
if [ "${commandname}" == "INSTALL" ]; then
echo -e "${red}${deptocheck}${default}"
sleep 0.1
fi
# Define required dependencies for SteamCMD.
# If SteamCMD requirements are not met install will fail.
if [ -n "${appid}" ]; then
array_steamcmd_deps_required=("${depsteamcmd}")
for steamcmddeptocheck in ${array_steamcmd_deps_required[*]}; do
if [ "${deptocheck}" == "${steamcmddeptocheck}" ]; then
for steamcmddeptocheck in ${array_deps_required_steamcmd[*]}; do
if [ "${deptocheck}" != "steamcmd" ]&&[ "${deptocheck}" == "${steamcmddeptocheck}" ]; then
steamcmdfail=1
fi
done
@ -298,29 +312,25 @@ fi
info_distro.sh
# some RHEL based distros use 8.4 instead of just 8.
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.
fn_check_file_github "lgsm/data" "${distroid}-${distroversion}.csv"
if [ ! -f "${tmpdir}/dependency-no-check.tmp" ]&&[ ! -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then
# 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}-${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
# If the file successfully downloaded run the dependency check.
if [ -f "${datadir}/${distroid}-${distroversion}.csv" ]; then
depall=$(awk -F, '$1=="all" {$1=""; print $0}' "${datadir}/${distroid}-${distroversion}.csv")
depsteamcmd=$(awk -F, '$1=="steamcmd" {$1=""; print $0}' "${datadir}/${distroid}-${distroversion}.csv")
depshortname=$(awk -v shortname="$shortname" -F, '$1==shortname {$1=""; print $0}' "${datadir}/${distroid}-${distroversion}.csv")
if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then
depall=$(awk -F, '$1=="all" {$1=""; print $0}' "${datadir}/${distroid}-${distroversioncsv}.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}-${distroversioncsv}.csv")
# Generate array of missing deps.
array_deps_missing=()
array_deps_required=("${depall} ${depsteamcmd} ${depshortname}")
array_deps_required_steamcmd=("${depsteamcmd}")
fn_deps_email
# Unique sort dependency array.
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
check.sh
info_distro.sh
fn_print_dots ""
fn_script_log_info "Updating LinuxGSM"
@ -146,6 +147,38 @@ else
fn_script_log_pass "Checking ${remotereponame} config _default.cfg"
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.
if [ -n "${functionsdir}" ]; then
if [ -d "${functionsdir}" ]; then

2
lgsm/functions/core_functions.sh

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

9
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}')"
@ -73,6 +73,13 @@ for distro_info in "${distro_info_array[@]}"; do
fi
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
# e.g: 1.17
glibcversion="$(ldd --version | sed -n '1s/.* //p')"

32
lgsm/functions/info_game.sh

@ -818,6 +818,14 @@ fn_info_game_kf2(){
defaultmap=${defaultmap:-"NOT SET"}
}
fn_info_game_lo(){
# Parameters
servername=${servername:-"NOT SET"}
port=${port:-"0"}
queryport=${queryport:-"0"}
maxplayers=${slots:-"0"}
}
fn_info_game_mc(){
# Config
if [ ! -f "${servercfgfullpath}" ]; then
@ -831,7 +839,7 @@ fn_info_game_mc(){
gamemode="${unavailable}"
gameworld="${unavailable}"
else
servername=$(grep "motd" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/motd//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
servername=$(grep "motd" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/motd//g' | tr -d '=\";,:' | sed 's/\\u00A70//g;s/\\u00A71//g;s/\\u00A72//g;s/\\u00A73//g;s/\\u00A74//g;s/\\u00A75//g;s/\\u00A76//g;s/\\u00A77//g;s/\\u00A78//g;s/\\u00A79//g;s/\\u00A7a//g;s/\\u00A7b//g;s/\\u00A7c//g;s/\\u00A7d//g;s/\\u00A7e//g;s/\\u00A7f//g;s/\\u00A7l//g;s/\\u00A7o//g;s/\\u00A7n//g;s/\\u00A7m//g;s/\\u00A7k//g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
rconpassword=$(grep "rcon.password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/rcon.password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
rconport=$(grep "rcon.port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
maxplayers=$(grep "max-players" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
@ -1105,7 +1113,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"}
@ -1576,6 +1586,14 @@ fn_info_game_sdtd(){
fi
}
fn_info_game_sf(){
# Parameters
servername=${selfname:-"NOT SET"}
port=${port:-"0"}
queryport=${queryport:-"0"}
beaconport=${beaconport:-"0"}
}
fn_info_game_sof2(){
# Config
if [ ! -f "${servercfgfullpath}" ]; then
@ -1769,6 +1787,9 @@ fn_info_game_stn(){
port=$(sed -nr 's/^ServerPort=([0-9]+)/\1/p' "${servercfgfullpath}")
serverpassword=$(sed -nr 's/^ServerPassword=(.*)$/\1/p' "${servercfgfullpath}")
queryport=$((port + 1))
# Not set
serverpassword=${serverpassword:-"NOT SET"}
else
servername="${unavailable}"
configip=${configip:-"0.0.0.0"}
@ -1950,7 +1971,8 @@ fn_info_game_unt(){
# Parameters
servername=${selfname:-"NOT SET"}
port=${port:-"0"}
queryport=$((port+1))
queryport=${port}
steamport=$((port+1))
}
fn_info_game_ut(){
@ -2255,6 +2277,8 @@ elif [ "${shortname}" == "kf" ]; then
fn_info_game_kf
elif [ "${shortname}" == "kf2" ]; then
fn_info_game_kf2
elif [ "${shortname}" == "lo" ]; then
fn_info_game_lo
elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "pmc" ]; then
fn_info_game_mc
elif [ "${shortname}" == "mcb" ]; then
@ -2305,6 +2329,8 @@ elif [ "${shortname}" == "scpsl" ]||[ "${shortname}" == "scpslsm" ]; then
fn_info_game_scpsl
elif [ "${shortname}" == "sdtd" ]; then
fn_info_game_sdtd
elif [ "${shortname}" == "sf" ]; then
fn_info_game_sf
elif [ "${shortname}" == "sof2" ]; then
fn_info_game_sof2
elif [ "${shortname}" == "sol" ]; then

28
lgsm/functions/info_messages.sh

@ -800,7 +800,7 @@ fn_info_message_arma3(){
fn_port "header"
fn_port "Game" port udp
fn_port "Voice" voiceport udp
fn_port "Query Steam" queryport udp
fn_port "Query" queryport udp
fn_port "Steam Master" steammasterport udp
fn_port "Voice (unused)" voiceunusedport udp
fn_port "BattleEye" battleeyeport udp
@ -1042,16 +1042,6 @@ fn_info_message_jk2(){
} | column -s $'\t' -t
}
fn_info_message_lo(){
echo -e "netstat -atunp | grep MistServer"
echo -e ""
{
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\tudp"
echo -e "> Query\tINBOUND\t${queryport}\tudp"
} | column -s $'\t' -t
}
fn_info_message_kf(){
{
fn_port "header"
@ -1352,6 +1342,15 @@ fn_info_message_sdtd(){
} | column -s $'\t' -t
}
fn_info_message_sf(){
{
fn_port "header"
fn_port "Game" port udp
fn_port "Query" queryport udp
fn_port "Beacon" beaconport udp
} | column -s $'\t' -t
}
fn_info_message_sof2(){
{
fn_port "header"
@ -1376,7 +1375,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
@ -1528,6 +1527,7 @@ fn_info_message_unt(){
fn_port "header"
fn_port "Game" port udp
fn_port "Query" queryport udp
fn_port "Steam" steamport udp
} | column -s $'\t' -t
}
@ -1665,8 +1665,6 @@ fn_info_message_select_engine(){
fn_info_message_jc3
elif [ "${shortname}" == "jk2" ]; then
fn_info_message_jk2
elif [ "${shortname}" == "lo" ]; then
fn_info_message_lo
elif [ "${shortname}" == "kf" ]; then
fn_info_message_kf
elif [ "${shortname}" == "kf2" ]; then
@ -1719,6 +1717,8 @@ fn_info_message_select_engine(){
fn_info_message_scpsl
elif [ "${shortname}" == "sdtd" ]; then
fn_info_message_sdtd
elif [ "${shortname}" == "sf" ]; then
fn_info_message_sf
elif [ "${shortname}" == "sof2" ]; then
fn_info_message_sof2
elif [ "${shortname}" == "sol" ]; then

7
lgsm/functions/install_config.sh

@ -688,6 +688,13 @@ elif [ "${shortname}" == "scpsl" ]||[ "${shortname}" == "scpslsm" ]; then
fn_default_config_remote
fn_set_config_vars
fn_list_config_locations
elif [ "${shortname}" == "sf" ]; then
gamedirname="Satisfactory"
array_configs+=( GameUserSettings.ini )
fn_fetch_default_config
fn_default_config_remote
fn_set_config_vars
fn_list_config_locations
elif [ "${shortname}" == "sol" ]; then
gamedirname="Soldat"
array_configs+=( soldat.ini )

2
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

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')
get5latestfilepath=$(echo -e "${get5lastbuild}" | jq -r '.relativePath')
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[]')
csgopuglatestfile=$(echo -e "${csgopuglatest}" | jq -r '.name')
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_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_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_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" )
@ -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")
# 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[@]}" )

3
lgsm/functions/query_gsquery.py

@ -59,10 +59,12 @@ class gsquery:
self.response = None
self.sanity_checks()
@staticmethod
def fatal_error(self, error_message, error_code=1):
sys.stderr.write('ERROR: ' + str(error_message) + '\n')
sys.exit(error_code)
@staticmethod
def exit_success(self, success_message=''):
sys.stdout.write('OK: ' + str(success_message) + '\n')
sys.exit(0)
@ -140,6 +142,5 @@ if __name__ == '__main__':
help='Display debugging output.'
)
options, arguments = parser.parse_args()
#
server = gsquery(options, arguments)
server.responding()

5
lgsm/functions/update_mta.sh

@ -99,10 +99,7 @@ fn_update_mta_localbuild(){
fn_update_mta_remotebuild(){
# Gets remote build info.
majorversion=$(curl -s https://raw.githubusercontent.com/multitheftauto/mtasa-blue/master/Server/version.h | grep "#define MTASA_VERSION_MAJOR" | awk '{ print $3 }' | sed 's/\r//g')
minorversion=$(curl -s https://raw.githubusercontent.com/multitheftauto/mtasa-blue/master/Server/version.h | grep "#define MTASA_VERSION_MINOR" | awk '{ print $3 }' | sed 's/\r//g')
maintenanceversion=$(curl -s https://raw.githubusercontent.com/multitheftauto/mtasa-blue/master/Server/version.h | grep "#define MTASA_VERSION_MAINTENANCE" | awk '{ print $3 }' | sed 's/\r//g')
remotebuild="${majorversion}.${minorversion}.${maintenanceversion}"
remotebuild=$(curl -s "https://api.github.com/repos/multitheftauto/mtasa-blue/releases/latest" | jq -r '.tag_name')
if [ "${firstcommandname}" != "INSTALL" ]; then
fn_print_dots "Checking remote build: ${remotelocation}"
# Checks if remotebuild variable has been set.

2
linuxgsm.sh

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

2
tests/tests_fctrserver.sh

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

2
tests/tests_jc2server.sh

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

2
tests/tests_mcserver.sh

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

2
tests/tests_ts3server.sh

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

Loading…
Cancel
Save