Browse Source

Merge branch 'develop' into nec

pull/3997/head
Daniel Gibbs 3 years ago
parent
commit
38ebd6e34e
  1. 2
      .github/workflows/create-release.yml
  2. 55
      .github/workflows/linter.yml
  3. 28
      .github/workflows/trigger_docker_build.yml
  4. 14
      README.md
  5. 30
      lgsm/config-default/config-lgsm/csgoserver/_default.cfg
  6. 2
      lgsm/data/almalinux-8.csv
  7. 2
      lgsm/data/centos-7.csv
  8. 2
      lgsm/data/centos-8.csv
  9. 2
      lgsm/data/debian-10.csv
  10. 2
      lgsm/data/debian-11.csv
  11. 2
      lgsm/data/debian-9.csv
  12. 2
      lgsm/data/rocky-8.csv
  13. 2
      lgsm/data/ubuntu-16.04.csv
  14. 2
      lgsm/data/ubuntu-18.04.csv
  15. 2
      lgsm/data/ubuntu-20.04.csv
  16. 2
      lgsm/data/ubuntu-21.04.csv
  17. 2
      lgsm/data/ubuntu-22.04.csv
  18. 4
      lgsm/functions/check.sh
  19. 2
      lgsm/functions/check_deps.sh
  20. 1
      lgsm/functions/check_executable.sh
  21. 8
      lgsm/functions/check_permissions.sh
  22. 2
      lgsm/functions/check_root.sh
  23. 2
      lgsm/functions/command_install.sh
  24. 2
      lgsm/functions/core_exit.sh
  25. 2
      lgsm/functions/core_functions.sh
  26. 4
      lgsm/functions/core_steamcmd.sh
  27. 8
      lgsm/functions/fix_bt.sh
  28. 26
      linuxgsm.sh
  29. 2
      tests/tests_fctrserver.sh
  30. 2
      tests/tests_jc2server.sh
  31. 2
      tests/tests_mcserver.sh
  32. 2
      tests/tests_ts3server.sh

2
.github/workflows/create-release.yml

@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/[email protected]0.1
- uses: release-drafter/[email protected].0
with:
config-name: release-drafter.yml
env:

55
.github/workflows/linter.yml

@ -1,55 +0,0 @@
---
#################################
#################################
## Super Linter GitHub Actions ##
#################################
#################################
name: Lint Code Base
#
# Documentation:
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
#
#############################
# Start the job on all push #
#############################
on:
push:
branches-ignore: [master, main]
# Remove the line above to run when pushing to master
pull_request:
###############
# Set the Job #
###############
jobs:
build:
# Name the Job
name: Lint Code Base
# Set the agent to run on
runs-on: ubuntu-latest
##################
# Load all steps #
##################
steps:
##########################
# Checkout the code base #
##########################
- name: Checkout Code
uses: actions/checkout@v2
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0
################################
# Run Linter against code base #
################################
- name: Lint Code Base
uses: github/super-linter@v4
env:
VALIDATE_ALL_CODEBASE: false
# Change to 'master' if your main branch differs
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

28
.github/workflows/trigger_docker_build.yml

@ -0,0 +1,28 @@
name: Trigger Docker Build
on:
push:
branches:
- master
- develop
jobs:
trigger_build_docker-linuxgsm:
name: Trigger Build docker-linuxgsm
runs-on: ubuntu-latest
steps:
- uses: convictional/[email protected]
with:
owner: GameServerManagers
repo: docker-linuxgsm
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
workflow_file_name: docker-publish.yml
trigger_build_docker-gameserver:
name: Trigger Build docker-linuxgsm
runs-on: ubuntu-latest
steps:
- uses: convictional/[email protected]
with:
owner: GameServerManagers
repo: docker-gameserver
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
workflow_file_name: docker-publish.yml

14
README.md

File diff suppressed because one or more lines are too long

30
lgsm/config-default/config-lgsm/csgoserver/_default.cfg

@ -10,17 +10,27 @@
## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters
# https://docs.linuxgsm.com/game-servers/counter-strike-global-offensive
# [Game Modes] gametype gamemode mapgroup (you can mix these across all Game Modes except Danger Zone, but use only one)
# Arms Race 1 0 mg_armsrace
# Classic Casual 0 0 mg_casualsigma, mg_casualdelta
# Classic Competitive 0 1 mg_active, mg_reserves, mg_hostage, mg_de_dust2
# Custom 3 0
# Deathmatch 1 2 mg_deathmatch
# Demolition 1 1 mg_demolition
# Wingman 0 2
# Danger Zone 6 0 mg_dz_blacksite (map: dz_blacksite), mg_dz_sirocco (map: dz_sirocco)
# [Game Modes] gametype gamemode gamemodeflags skirmishid mapgroup (you can mix these across all Game Modes except Danger Zone, but use only one)
# Arms Race 1 0 0 0 mg_armsrace
# Boom! Headshot! 1 2 0 6 mg_skirmish_headshots
# Classic Casual 0 0 0 0 mg_casualsigma, mg_casualdelta
# Classic Competitive (Default) 0 1 0 0 mg_active, mg_reserves, mg_hostage, mg_de_dust2, ...
# Classic Competitive (Short Match) 0 1 32 0 mg_active, mg_reserves, mg_hostage, mg_de_dust2, ...
# Danger Zone 6 0 0 0 mg_dz_blacksite (map: dz_blacksite), mg_dz_sirocco (map: dz_sirocco)
# Deathmatch (Default) 1 2 0 0 mg_deathmatch
# Deathmatch (Free For All) 1 2 32 0 mg_deathmatch
# Deathmatch (Team vs Team) 1 2 4 0 mg_deathmatch
# Demolition 1 1 0 0 mg_demolition
# Flying Scoutsman 0 0 0 3 mg_skirmish_flyingscoutsman
# Hunter-Gatherers 1 2 0 7 mg_skirmish_huntergatherers
# Retakes 0 0 0 12 mg_skirmish_retakes
# Stab Stab Zap 0 0 0 1 mg_skirmish_stabstabzap
# Trigger Discipline 0 0 0 4 mg_skirmish_triggerdiscipline
# Wingman 0 2 0 0 mg_de_prime, mg_de_blagai, mg_de_vertigo, mg_de_inferno, mg_de_overpass, mg_de_cbble, mg_de_train, mg_de_shortnuke, mg_de_shortdust, mg_de_lake
gametype="0"
gamemode="0"
gamemodeflags="0"
skirmishid="0"
mapgroup="mg_active"
ip="0.0.0.0"
port="27015"
@ -43,7 +53,7 @@ wscollectionid=""
wsstartmap=""
## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
startparameters="-game csgo -usercon -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} -tickrate ${tickrate} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers_override ${maxplayers} +mapgroup ${mapgroup} +game_type ${gametype} +game_mode ${gamemode} +host_workshop_collection ${wscollectionid} +workshop_start_map ${wsstartmap} -authkey ${wsapikey} -nobreakpad"
startparameters="-game csgo -usercon -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} -tickrate ${tickrate} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers_override ${maxplayers} +mapgroup ${mapgroup} +game_type ${gametype} +game_mode ${gamemode} +sv_game_mode_flags ${gamemodeflags} +sv_skirmish_id ${skirmishid} +host_workshop_collection ${wscollectionid} +workshop_start_map ${wsstartmap} -authkey ${wsapikey} -nobreakpad"
#### LinuxGSM Settings ####

2
lgsm/data/almalinux-8.csv

@ -15,7 +15,7 @@ bfv,compat-libstdc++-33.i686,glibc.i686
bmdm,ncurses-libs.i686
bo
bs
bt,libicu
bt,libicu,dos2unix
bt1944
cc
cd

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

2
lgsm/data/centos-7.csv

@ -15,7 +15,7 @@ bfv,compat-libstdc++-33.i686,glibc.i686
bmdm,ncurses-libs.i686
bo
bs
bt,libicu
bt,libicu,dos2unix
bt1944
cc
cd

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

2
lgsm/data/centos-8.csv

@ -15,7 +15,7 @@ bfv,compat-libstdc++-33.i686,glibc.i686
bmdm,ncurses-libs.i686
bo
bs
bt,libicu
bt,libicu,dos2unix
bt1944
cc
cd

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

2
lgsm/data/debian-10.csv

@ -15,7 +15,7 @@ bfv,libncurses5:i386,libstdc++5:i386
bmdm,libncurses5:i386
bo
bs
bt,libicu-dev
bt,libicu-dev,dos2unix
bt1944
cc
cd

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

2
lgsm/data/debian-11.csv

@ -15,7 +15,7 @@ bfv,libncurses5:i386,libstdc++5:i386
bmdm,libncurses5:i386
bo
bs
bt,libicu-dev
bt,libicu-dev,dos2unix
bt1944
cc
cd

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

2
lgsm/data/debian-9.csv

@ -15,7 +15,7 @@ bfv,libncurses5:i386,libstdc++5:i386
bmdm,libncurses5:i386
bo
bs
bt,libicu-dev
bt,libicu-dev,dos2unix
bt1944
cc
cd

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

2
lgsm/data/rocky-8.csv

@ -15,7 +15,7 @@ bfv,compat-libstdc++-33.i686,glibc.i686
bmdm,ncurses-libs.i686
bo
bs
bt,libicu
bt,libicu,dos2unix
bt1944
cc
cd

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

2
lgsm/data/ubuntu-16.04.csv

@ -14,7 +14,7 @@ bfv,libncurses5:i386,libstdc++5:i386
bmdm,libncurses5:i386
bo
bs
bt,libicu-dev
bt,libicu-dev,dos2unix
bt1944
cc
cd

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

2
lgsm/data/ubuntu-18.04.csv

@ -15,7 +15,7 @@ bfv,libncurses5:i386,libstdc++5:i386
bmdm,libncurses5:i386
bo
bs
bt,libicu-dev
bt,libicu-dev,dos2unix
bt1944
cc
cd

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

2
lgsm/data/ubuntu-20.04.csv

@ -15,7 +15,7 @@ bfv,libncurses5:i386,libstdc++5:i386
bmdm,libncurses5:i386
bo
bs
bt,libicu-dev
bt,libicu-dev,dos2unix
bt1944
cc
cd

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

2
lgsm/data/ubuntu-21.04.csv

@ -15,7 +15,7 @@ bfv,libncurses5:i386,libstdc++5:i386
bmdm,libncurses5:i386
bo
bs
bt,libicu-dev
bt,libicu-dev,dos2unix
bt1944
cc
cd

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

2
lgsm/data/ubuntu-22.04.csv

@ -15,7 +15,7 @@ bfv,libncurses5:i386,libstdc++5:i386
bmdm,libncurses5:i386
bo
bs
bt,libicu-dev
bt,libicu-dev,dos2unix
bt1944
cc
cmw

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

4
lgsm/functions/check.sh

@ -21,7 +21,7 @@ fi
check_tmuxception.sh
if [ "$(whoami)" != "root" ]; then
if [ "$(whoami)" != "root" ] || [ -f /.dockerenv ]; then
if [ "${commandname}" != "MONITOR" ]; then
check_permissions.sh
fi
@ -38,7 +38,7 @@ for allowed_command in "${allowed_commands_array[@]}"; do
fi
done
if [ "$(whoami)" != "root" ]; then
if [ "$(whoami)" != "root" ] || [ -f /.dockerenv ]; then
allowed_commands_array=(DEBUG START INSTALL)
for allowed_command in "${allowed_commands_array[@]}"; do
if [ "${allowed_command}" == "${commandname}" ]; then

2
lgsm/functions/check_deps.sh

@ -301,7 +301,7 @@ fn_deps_detector() {
}
if [ "${commandname}" == "INSTALL" ]; then
if [ "$(whoami)" == "root" ]; then
if [ "$(whoami)" == "root" ] && [ ! -f /.dockerenv ]; then
echo -e ""
echo -e "${lightyellow}Checking Dependencies as root${default}"
echo -e "================================="

1
lgsm/functions/check_executable.sh

@ -8,6 +8,7 @@
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Check if executable exists
execname=$(basename "${executable}")
if [ ! -f "${executabledir}/${execname}" ]; then
fn_print_fail_nl "executable was not found"
echo -e "* ${executabledir}/${execname}"

8
lgsm/functions/check_permissions.sh

@ -181,7 +181,7 @@ fn_sys_perm_fix_manually_msg() {
# Attempt to fix /sys related permission errors if sudo is available, exits otherwise.
fn_sys_perm_errors_fix() {
if sudo -n true > /dev/null 2>&1; then
if sudo -n true >/dev/null 2>&1; then
fn_print_dots "Automatically fixing /sys permissions"
fn_script_log_info "Automatically fixing /sys permissions."
if [ "${sysdirpermerror}" == "1" ]; then
@ -223,10 +223,8 @@ fn_sys_perm_error_process() {
fi
}
# Run perm error detect & fix/alert functions on /sys directories.
## Run checks.
if [ "$(whoami)" != "root" ]; then
## Run permisions checks when not root or docker.
if [ "$(whoami)" != "root" ] && [ ! -f /.dockerenv ]; then
fn_check_ownership
fn_check_permissions
if [ "${commandname}" == "START" ]; then

2
lgsm/functions/check_root.sh

@ -7,7 +7,7 @@
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if [ "$(whoami)" = "root" ]; then
if [ "$(whoami)" == "root" ] && [ ! -f /.dockerenv ]; then
if [ "${commandname}" != "INSTALL" ]; then
fn_print_fail_nl "Do NOT run this script as root!"
if [ -d "${lgsmlogdir}" ]; then

2
lgsm/functions/command_install.sh

@ -11,7 +11,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
check.sh
if [ "$(whoami)" = "root" ]; then
if [ "$(whoami)" == "root" ] && [ ! -f /.dockerenv ]; then
check_deps.sh
else
install_header.sh

2
lgsm/functions/core_exit.sh

@ -18,7 +18,7 @@ fn_exit_dev_debug() {
}
# If running dependency check as root will remove any files that belong to root user.
if [ "$(whoami)" == "root" ]; then
if [ "$(whoami)" == "root" ] && [ ! -f /.dockerenv ]; then
find "${lgsmdir}"/ -group root -prune -exec rm -rf {} + > /dev/null 2>&1
find "${logdir}"/ -group root -prune -exec rm -rf {} + > /dev/null 2>&1
fi

2
lgsm/functions/core_functions.sh

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

4
lgsm/functions/core_steamcmd.sh

@ -281,8 +281,8 @@ fn_update_steamcmd_compare() {
}
fn_appmanifest_info() {
appmanifestfile=$(find "${serverfiles}" -type f -name "appmanifest_${appid}.acf")
appmanifestfilewc=$(find "${serverfiles}" -type f -name "appmanifest_${appid}.acf" | wc -l)
appmanifestfile=$(find -L "${serverfiles}" -type f -name "appmanifest_${appid}.acf")
appmanifestfilewc=$(find -L "${serverfiles}" -type f -name "appmanifest_${appid}.acf" | wc -l)
}
fn_appmanifest_check() {

8
lgsm/functions/fix_bt.sh

@ -14,3 +14,11 @@ if [ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Daedalic Entertainment GmbH/
mkdir -p "${XDG_DATA_HOME:="${HOME}/.local/share"}/Daedalic Entertainment GmbH/Barotrauma"
fn_fix_msg_end
fi
# check if startscript is with windows line endings and reformat it
if file -b "${serverfiles}${executable:1}" | grep -q CRLF; then
fixname="Convert ${executable:2} to unix file format"
fn_fix_msg_start
dos2unix -q "${serverfiles}${executable:1}"
fn_fix_msg_end
fi

26
linuxgsm.sh

@ -15,12 +15,12 @@
# Debugging
if [ -f ".dev-debug" ]; then
exec 5> dev-debug.log
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="v22.1.0"
version="v22.2.1"
shortname="core"
gameservername="core"
commandname="CORE"
@ -52,7 +52,7 @@ userinput2="${2}"
[ -n "${LGSM_GITHUBBRANCH}" ] && githubbranch="${LGSM_GITHUBBRANCH}" || githubbranch="master"
# Check that curl is installed before doing anything
if [ ! "$(command -v curl 2> /dev/null)" ]; then
if [ ! "$(command -v curl 2>/dev/null)" ]; then
echo -e "[ FAIL ] Curl is not installed"
exit 1
fi
@ -213,7 +213,7 @@ fn_install_menu_bash() {
while read -r line || [[ -n "${line}" ]]; do
var=$(echo -e "${line}" | awk -F "," '{print $2 " - " $3}')
menu_options+=("${var}")
done < "${options}"
done <"${options}"
menu_options+=("Cancel")
select option in "${menu_options[@]}"; do
if [ "${option}" ] && [ "${option}" != "Cancel" ]; then
@ -239,7 +239,7 @@ fn_install_menu_whiptail() {
key=$(echo -e "${line}" | awk -F "," '{print $3}')
val=$(echo -e "${line}" | awk -F "," '{print $2}')
menu_options+=("${val//\"/}" "${key//\"/}")
done < "${options}"
done <"${options}"
OPTION=$(${menucmd} --title "${title}" --menu "${caption}" "${height}" "${width}" "${menuheight}" "${menu_options[@]}" 3>&1 1>&2 2>&3)
if [ $? == 0 ]; then
eval "$resultvar=\"${OPTION}\""
@ -263,12 +263,12 @@ fn_install_menu() {
fi
done
case "$(basename "${menucmd}")" in
whiptail | dialog)
fn_install_menu_whiptail "${menucmd}" selection "${title}" "${caption}" "${options}" 40 80 30
;;
*)
fn_install_menu_bash selection "${title}" "${caption}" "${options}"
;;
whiptail | dialog)
fn_install_menu_whiptail "${menucmd}" selection "${title}" "${caption}" "${options}" 40 80 30
;;
*)
fn_install_menu_bash selection "${title}" "${caption}" "${options}"
;;
esac
eval "$resultvar=\"${selection}\""
}
@ -321,7 +321,7 @@ fn_install_file() {
}
# Prevent LinuxGSM from running as root. Except if doing a dependency install.
if [ "$(whoami)" == "root" ]; then
if [ "$(whoami)" == "root" ] && [ ! -f /.dockerenv ]; then
if [ "${userinput}" == "install" ] || [ "${userinput}" == "auto-install" ] || [ "${userinput}" == "i" ] || [ "${userinput}" == "ai" ]; then
if [ "${shortname}" == "core" ]; then
echo -e "[ FAIL ] Do NOT run this script as root!"
@ -351,7 +351,7 @@ if [ "${shortname}" == "core" ]; then
} | column -s $'\t' -t | more
exit
elif [ "${userinput}" == "install" ] || [ "${userinput}" == "i" ]; then
tail -n +1 "${serverlist}" | awk -F "," '{print $1 "," $2 "," $3}' > "${serverlistmenu}"
tail -n +1 "${serverlist}" | awk -F "," '{print $1 "," $2 "," $3}' >"${serverlistmenu}"
fn_install_menu result "LinuxGSM" "Select game server to install." "${serverlistmenu}"
userinput="${result}"
fn_server_info

2
tests/tests_fctrserver.sh

@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x
fi
version="v22.1.0"
version="v22.2.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="v22.1.0"
version="v22.2.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="v22.1.0"
version="v22.2.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="v22.1.0"
version="v22.2.1"
shortname="ts3"
gameservername="ts3server"
commandname="CORE"

Loading…
Cancel
Save