From 643a6fed2628d4488ac7fe5884b28a97d9eb7071 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 8 Jan 2022 18:01:22 +0000 Subject: [PATCH 01/25] feat(ark): increase glibc requirement to 2.17 --- lgsm/config-default/config-lgsm/arkserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/arkserver/_default.cfg b/lgsm/config-default/config-lgsm/arkserver/_default.cfg index eb3ac908b..8e24debfc 100644 --- a/lgsm/config-default/config-lgsm/arkserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/arkserver/_default.cfg @@ -158,7 +158,7 @@ consoleinteract="no" # Do not edit gamename="ARK: Survival Evolved" engine="unreal4" -glibc="2.15" +glibc="2.17" #### Directories #### # Edit with care From 0465e0970bb1e9909269c7aba186d91e4d78a0db Mon Sep 17 00:00:00 2001 From: Christian Date: Sun, 9 Jan 2022 22:41:31 +0100 Subject: [PATCH 02/25] fix(deps): add missing dep for distro-info (#3732) --- lgsm/data/debian-10.csv | 2 +- lgsm/data/debian-11.csv | 2 +- lgsm/data/debian-9.csv | 2 +- lgsm/data/ubuntu-18.04.csv | 2 +- lgsm/data/ubuntu-20.04.csv | 2 +- lgsm/data/ubuntu-21.04.csv | 2 +- lgsm/data/ubuntu-21.10.csv | 2 +- lgsm/data/ubuntu-22.04.csv | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index 5f066b1ee..94f356412 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd ac ahl diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index ca7b2a208..6e2b3e99f 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd ac ahl diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index 36f752356..9cb339c8e 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd ac ahl diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index 5f066b1ee..94f356412 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd ac ahl diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index 4809d4b97..bf5a9601c 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd ac ahl diff --git a/lgsm/data/ubuntu-21.04.csv b/lgsm/data/ubuntu-21.04.csv index 18918e443..c2a4b959d 100644 --- a/lgsm/data/ubuntu-21.04.csv +++ b/lgsm/data/ubuntu-21.04.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd ac ahl diff --git a/lgsm/data/ubuntu-21.10.csv b/lgsm/data/ubuntu-21.10.csv index d12f19447..8c66e2e26 100644 --- a/lgsm/data/ubuntu-21.10.csv +++ b/lgsm/data/ubuntu-21.10.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd ac ahl diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index d12f19447..8c66e2e26 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -1,4 +1,4 @@ -all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd ac ahl From 079fe0766e98bc0a1a191ecb7e576a05d25bc273 Mon Sep 17 00:00:00 2001 From: Christian Date: Sun, 9 Jan 2022 22:42:07 +0100 Subject: [PATCH 03/25] fix(vh): log a message when the password is not set or to short (#3738) --- lgsm/functions/check_config.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lgsm/functions/check_config.sh b/lgsm/functions/check_config.sh index 5b8d51691..0a6313151 100755 --- a/lgsm/functions/check_config.sh +++ b/lgsm/functions/check_config.sh @@ -25,3 +25,11 @@ elif [ -v rconpassword ]&&[ "${rconpassword}" == "CHANGE_ME" ]; then fn_print_warn_nl "Default RCON Password detected" fn_script_log_warn "Default RCON Password detected" fi + +if [ "${shortname}" == "vh" ]&&[ -z "${serverpassword}" ]; then + fn_print_fail_nl "serverpassword is not set" + fn_script_log_fatal "serverpassword is not set" +elif [ "${shortname}" == "vh" ]&&[ "${#serverpassword}" -le "4" ]; then + fn_print_fail_nl "serverpassword is to short (min 5 chars)" + fn_script_log_fatal "serverpassword is to short (min 5 chars)" +fi From 1a022caf21b9f4c7716b5e3d542c78d8f4d3f675 Mon Sep 17 00:00:00 2001 From: sharaga44 <97103998+sharaga44@users.noreply.github.com> Date: Mon, 10 Jan 2022 00:42:36 +0300 Subject: [PATCH 04/25] fix(unt): resolve start parameter issues #2681 (#3733) * Update linuxgsm.sh * Update _default.cfg * Update install_config.sh * Update _default.cfg * Revert "Update linuxgsm.sh" This reverts commit 12639d26d1935f09c0ebd4de79d70dd9ce75d4b8. * Revert "Update install_config.sh" This reverts commit 2de6088edddc1fc7e0d934439395bd6d57dfa441. --- lgsm/config-default/config-lgsm/untserver/_default.cfg | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lgsm/config-default/config-lgsm/untserver/_default.cfg b/lgsm/config-default/config-lgsm/untserver/_default.cfg index e57f08f57..41d1981e7 100644 --- a/lgsm/config-default/config-lgsm/untserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/untserver/_default.cfg @@ -12,10 +12,15 @@ ip="0.0.0.0" port="27015" maxplayers="20" -defaultmap="pei" +defaultmap="PEI" + +## Game Server Login Token (GSLT): Required +# GSLT is required for running a public server. +# More info: https://docs.linuxgsm.com/steamcmd/gslt +gslt="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-port:${port} -players:${maxplayers} --nographics -${defaultmap} -batchmode +secureserver/${selfname}" +startparameters="-nographics -batchmode -bind ${ip} -port ${port} -maxplayers ${maxplayers} -map ${defaultmap} -gslt ${gslt} +InternetServer/${selfname}" #### LinuxGSM Settings #### From f60c65a744fe82410f947e85b5d8ae93387d9406 Mon Sep 17 00:00:00 2001 From: Christian Date: Sat, 15 Jan 2022 14:30:48 +0100 Subject: [PATCH 05/25] refactor(core): move curl check to main file (#3740) --- lgsm/functions/core_dl.sh | 6 ------ linuxgsm.sh | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index 5abfdfbb3..297f4101f 100755 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -597,9 +597,3 @@ fn_dl_latest_release_github(){ fi fi } - -# Check that curl is installed -if [ ! "$(command -v curl 2>/dev/null)" ]; then - echo -e "[ FAIL ] Curl is not installed" - exit 1 -fi diff --git a/linuxgsm.sh b/linuxgsm.sh index 76edddfa3..6eb3f0beb 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -51,6 +51,12 @@ githubuser="GameServerManagers" githubrepo="LinuxGSM" githubbranch="master" +# Check that curl is installed before doing anything +if [ ! "$(command -v curl 2>/dev/null)" ]; then + echo -e "[ FAIL ] Curl is not installed" + exit 1 +fi + # Core function that is required first. core_functions.sh(){ functionfile="${FUNCNAME[0]}" From ff7a9e788f0005ce012b24438a0762698a80bed0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Feb 2022 23:41:31 +0000 Subject: [PATCH 06/25] build(deps): bump release-drafter/release-drafter from 5.15.0 to 5.18.1 (#3783) * Create dependabot.yml * build(deps): bump release-drafter/release-drafter from 5.15.0 to 5.18.1 Bumps [release-drafter/release-drafter](https://github.com/release-drafter/release-drafter) from 5.15.0 to 5.18.1. - [Release notes](https://github.com/release-drafter/release-drafter/releases) - [Commits](https://github.com/release-drafter/release-drafter/compare/v5.15.0...v5.18.1) --- updated-dependencies: - dependency-name: release-drafter/release-drafter dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: Daniel Gibbs Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/dependabot.yml | 9 +++++++++ .github/workflows/create-release.yml | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..c39f10ad4 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,9 @@ +# Set update schedule for GitHub Actions +version: 2 +updates: + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + # Check for updates to GitHub Actions every weekday + interval: "daily" diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 04b6adb87..7b71953f0 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: # Drafts your next Release notes as Pull Requests are merged into "master" - - uses: release-drafter/release-drafter@v5.15.0 + - uses: release-drafter/release-drafter@v5.18.1 with: config-name: release-drafter.yml env: From ef583bdf33a3e612d5b095e80fd65945046d0561 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Feb 2022 23:42:00 +0000 Subject: [PATCH 07/25] build(deps): bump dessant/lock-threads from 2.1.2 to 3 (#3782) * Create dependabot.yml * build(deps): bump dessant/lock-threads from 2.1.2 to 3 Bumps [dessant/lock-threads](https://github.com/dessant/lock-threads) from 2.1.2 to 3. - [Release notes](https://github.com/dessant/lock-threads/releases) - [Changelog](https://github.com/dessant/lock-threads/blob/master/CHANGELOG.md) - [Commits](https://github.com/dessant/lock-threads/compare/v2.1.2...v3) --- updated-dependencies: - dependency-name: dessant/lock-threads dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: Daniel Gibbs Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/lock.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index 733fe595d..668b8a581 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -8,7 +8,7 @@ jobs: lock: runs-on: ubuntu-latest steps: - - uses: dessant/lock-threads@v2.1.2 + - uses: dessant/lock-threads@v3 with: github-token: ${{ secrets.GITHUB_TOKEN }} issue-lock-comment: > From 522bb2d3c3bab786bee3e52a14c30df423ead471 Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 4 Apr 2022 21:56:06 +0200 Subject: [PATCH 08/25] fix(av): fix port for config info (#3826) --- lgsm/functions/info_game.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index 754f6183d..8c1652023 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -125,7 +125,7 @@ fn_info_game_av() { maxplayers=${maxplayers:-"NOT SET"} servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} - port=${zero} + port=${port:-"0"} queryport=${queryport:-"0"} steamqueryport=${steamqueryport:-"0"} steammasterport=${steammasterport:-"0"} From 50d485ff0542e0bff75c34b70409cb1fa8a4b792 Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 4 Apr 2022 21:56:25 +0200 Subject: [PATCH 09/25] fix(squad): fix variable for queryport (#3824) --- lgsm/functions/info_game.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index 8c1652023..bb750559f 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -1742,7 +1742,7 @@ fn_info_game_squad(){ # Parameters port=${port:-"0"} - queryport=${port:-"0"} + queryport=${queryport:-"0"} } fn_info_game_st(){ From 95e9498330bc2f75d421545630f41671529b65b9 Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 4 Apr 2022 21:59:01 +0200 Subject: [PATCH 10/25] fix(deps): change openjdk to version 17 for debian 11 (#3825) --- lgsm/data/debian-11.csv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index 6e2b3e99f..e0021c345 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -78,7 +78,7 @@ pmc,openjdk-17-jre pstbs,libgconf-2-4 pvkii pvr,libc++1 -pz,openjdk-16-jre,rng-tools +pz,openjdk-17-jre,rng-tools q2 q3 ql @@ -87,7 +87,7 @@ ricochet ro rtcw rust,lib32z1 -rw,openjdk-16-jre +rw,openjdk-17-jre samp sb sbots From 3fb3ccc8243e66ffbd343396a37d1c860396cd25 Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 4 Apr 2022 21:59:15 +0200 Subject: [PATCH 11/25] fix(ns2): remove login (#3759) --- lgsm/config-default/config-lgsm/ns2server/_default.cfg | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lgsm/config-default/config-lgsm/ns2server/_default.cfg b/lgsm/config-default/config-lgsm/ns2server/_default.cfg index 2d7a64cbe..e071f539e 100644 --- a/lgsm/config-default/config-lgsm/ns2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2server/_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 ip="0.0.0.0" port="27015" From 00cdee22decc42bb9bcc4fabdd761904a8012931 Mon Sep 17 00:00:00 2001 From: Jay Oster Date: Mon, 4 Apr 2022 12:59:55 -0700 Subject: [PATCH 12/25] fix(sdtdserver): monitor command fails (#3764) * Fix monitor command for SDTD - Closes #3619 - Related to #3701 * Fix semantic pull request --- lgsm/config-default/config-lgsm/sdtdserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg index bd922057b..090309696 100644 --- a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg @@ -140,7 +140,7 @@ stopmode="8" # 3: gamedig # 4: gsquery # 5: tcp -querymode="2" +querymode="5" querytype="protocol-valve" ## Console type From 4844b695dce5a23ab4f8de287b838f8a2acfadc8 Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 4 Apr 2022 22:00:16 +0200 Subject: [PATCH 13/25] fix(ns2): change mods commandline (#3760) --- lgsm/config-default/config-lgsm/ns2server/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/ns2server/_default.cfg b/lgsm/config-default/config-lgsm/ns2server/_default.cfg index e071f539e..83dfd991b 100644 --- a/lgsm/config-default/config-lgsm/ns2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2server/_default.cfg @@ -24,7 +24,7 @@ serverpassword="" # -password \"${serverpassword}\" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-name \"${servername}\" -port ${port} -webadmin -webdomain ${ip} -webuser ${webadminuser} -webpassword \"${webadminpass}\" -webport ${webadminport} -map ${defaultmap} -limit ${maxplayers} -config_path \"${servercfgdir}\" -logdir \"${gamelogdir}\" -modstorage \"${modstoragedir}\" -mods \"${mods}\"" +startparameters="-name \"${servername}\" -port ${port} -webadmin -webdomain ${ip} -webuser ${webadminuser} -webpassword \"${webadminpass}\" -webport ${webadminport} -map ${defaultmap} -limit ${maxplayers} -config_path \"${servercfgdir}\" -logdir \"${gamelogdir}\" -modstorage \"${modstoragedir}\" -mods2 \"${mods}\"" #### LinuxGSM Settings #### From 1d6d94d7a3a8fcbe2d346e4f9d1d91738f64b59c Mon Sep 17 00:00:00 2001 From: Jens Date: Mon, 11 Apr 2022 00:36:07 +0200 Subject: [PATCH 14/25] feat(mods): csgo mods - scraping latest versions for GOKZ and MovementAPI (#3841) --- lgsm/functions/mods_list.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/mods_list.sh b/lgsm/functions/mods_list.sh index 7afeffcfb..ed9be2121 100755 --- a/lgsm/functions/mods_list.sh +++ b/lgsm/functions/mods_list.sh @@ -82,6 +82,13 @@ csgopracticelatestlink=$(echo -e "${csgopracticelatest}" | jq -r '.browser_downl 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') +gokzlatestversion=$(curl --connect-timeout 10 -s https://api.github.com/repos/KZGlobalTeam/gokz/releases/latest | grep "tag_name" | cut -d : -f 2,3 | sed -E 's/.*"([^"]+)".*/\1/') +gokzlatestfile="GOKZ-v${gokzlatestversion}.zip" +gokzlatestlink="https://github.com/KZGlobalTeam/gokz/releases/download/${gokzlatestversion}/${gokzlatestfile}" +movementapilatestversion=$(curl --connect-timeout 10 -s https://api.github.com/repos/danzayau/MovementAPI/releases/latest | grep "tag_name" | cut -d : -f 2,3 | sed -E 's/.*"([^"]+)".*/\1/') +movementapilatestfile="MovementAPI-v${movementapilatestversion}.zip" +movementapilatestlink="https://github.com/danzayau/MovementAPI/releases/download/${movementapilatestversion}/${movementapilatestfile}" + # Oxide oxiderustlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/OxideMod/Oxide.Rust/releases/latest | jq -r '.assets[]|select(.browser_download_url | contains("linux")) | .browser_download_url') oxidehurtworldlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/OxideMod/Oxide.Hurtworld/releases/latest | jq -r '.assets[].browser_download_url') @@ -140,13 +147,13 @@ mod_info_steamworks=( MOD "steamworks" "SteamWorks" "${steamworksurl}" "${steamw mod_info_stripper=( MOD "stripper" "Stripper Source" "http://www.bailopan.net/stripper/snapshots/1.2/stripper-1.2.2-git129-linux.tar.gz" "stripper-1.2.2-git129-linux.tar.gz" "0" "LowercaseOff" "${systemdir}" "addons/stripper/maps;" "ENGINES" "Counter-Strike: Global Offensive;Counter-Strike: Source;Day of Defeat: Source;Half Life: Deathmatch;Half Life 2: Deathmatch;Insurgency;Left 4 Dead;Left 4 Dead 2;Nuclear Dawn;Team Fortress 2;" "NOTGAMES" "http://www.bailopan.net/stripper/" "Add or remove objects from map (requires MetaMod)") # CS:GO Mods -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" "${gokzlatestlink}" "${gokzlatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/KZGlobalTeam/gokz" "GOKZ ${gokzlatestversion} - 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" ) +mod_info_movement=( MOD "movementapi" "movementapi" "${movementapilatestlink}" "${movementapilatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/danzayau/MovementAPI" "Movement API ${movementapilatestversion} - Required for GOKZ" ) mod_info_cleaner=( MOD "cleaner" "cleaner" "https://github.com/e54385991/console-cleaner/archive/refs/heads/master.zip" "console-cleaner.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/e54385991/console-cleaner" "Console Cleaner - Optional for GOKZ" ) # Garry's Mod Addons From 60ae41da622c342440978498078d9390f50678de Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 26 Apr 2022 17:50:19 -0500 Subject: [PATCH 15/25] fix (arma3server): prevent multiple loading mods failing due to accidental line termination (#3845) Fixes loading multiple mods failing due to accidental line termination in the mod string when following the documentation. (Observed on Ubuntu 20.10) --- lgsm/config-default/config-lgsm/arma3server/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/arma3server/_default.cfg b/lgsm/config-default/config-lgsm/arma3server/_default.cfg index 1cdfe239a..7c4619c17 100644 --- a/lgsm/config-default/config-lgsm/arma3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/arma3server/_default.cfg @@ -32,7 +32,7 @@ servermods="" bepath="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-ip=${ip} -port=${port} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} -mod=${mods} -servermod=${servermods} -bepath=${bepath} -autoinit -loadmissiontomemory" +startparameters="-ip=${ip} -port=${port} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} -mod='${mods}' -servermod=${servermods} -bepath=${bepath} -autoinit -loadmissiontomemory" #### LinuxGSM Settings #### From 0342adaa40d9fb7e1fdfd5e74c210cf83042f7a7 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 26 Apr 2022 23:51:05 +0100 Subject: [PATCH 16/25] feat(new server): Project Cars 2 (#3842) --- .../config-lgsm/pc2server/_default.cfg | 184 ++++++++++++++++++ lgsm/data/serverlist.csv | 1 + lgsm/functions/info_game.sh | 29 +++ lgsm/functions/info_messages.sh | 13 +- lgsm/functions/install_config.sh | 4 + 5 files changed, 230 insertions(+), 1 deletion(-) create mode 100644 lgsm/config-default/config-lgsm/pc2server/_default.cfg diff --git a/lgsm/config-default/config-lgsm/pc2server/_default.cfg b/lgsm/config-default/config-lgsm/pc2server/_default.cfg new file mode 100644 index 000000000..e43f150fd --- /dev/null +++ b/lgsm/config-default/config-lgsm/pc2server/_default.cfg @@ -0,0 +1,184 @@ +################################## +######## 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 #### + +## SteamCMD Login | https://docs.linuxgsm.com/steamcmd#steamcmd-login +steamuser="username" +steampass='password' + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="--config ${servercfg}" + +#### 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@example.com" +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="alert@example.com" +mailgunemail="email@myemail.com" + +# 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="413770" +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="2" +querytype="protocol-valve" + +## Console type +consoleverbose="yes" +consoleinteract="no" + +## Game Server Details +# Do not edit +gamename="Project Cars 2" +engine="madness" +glibc="2.15" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}" +executabledir="${serverfiles}" +executable="./DedicatedServerCmd.elf" +servercfgdir="${systemdir}" +servercfg="${selfname}.cfg" +servercfgdefault="config_sample/server.cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/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" diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 7e71a94cc..8f4fde1b2 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -72,6 +72,7 @@ ns2c,ns2cserver,NS2: Combat onset,onsetserver,Onset opfor,opforserver,Opposing Force pc,pcserver,Project Cars +pc2,pc2server,Project Cars 2 pmc,pmcserver,PaperMC pstbs,pstbsserver,Post Scriptum: The Bloody Seventh pvkii,pvkiiserver,Pirates Vikings & Knights II diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index bb750559f..b2f5b7a24 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -1100,6 +1100,33 @@ fn_info_game_pc(){ fi } +fn_info_game_pc2(){ + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + maxplayers="${zero}" + port="${zero}" + queryport="${zero}" + steamport="${zero}" + else + servername=$(grep "name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "password " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + port=$(grep "hostPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + queryport=$(grep "queryPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + steamport=$(grep "steamPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + + # Not set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"NOT SET"} + port=${port:-"NOT SET"} + queryport=${queryport:-"NOT SET"} + steamport=${steamport:-"NOT SET"} + fi +} + fn_info_game_pstbs(){ # Config if [ ! -f "${servercfgfullpath}" ]; then @@ -2329,6 +2356,8 @@ elif [ "${shortname}" == "onset" ]; then fn_info_game_onset elif [ "${shortname}" == "pc" ]; then fn_info_game_pc +elif [ "${shortname}" == "pc2" ]; then + fn_info_game_pc2 elif [ "${shortname}" == "pstbs" ]; then fn_info_game_pstbs elif [ "${shortname}" == "pvr" ];then diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index a5ad5852e..cf0f686b1 100755 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -658,7 +658,7 @@ fn_info_message_ports_edit(){ startparameterslocation="${red}UNKNOWN${default}" # engines/games that require editing in the config file. - local ports_edit_array=( "ac" "arma3" "bo" "bt" "cd" "dst" "eco" "idtech2" "idtech3" "idtech3_ql" "jc2" "jc3" "lwjgl2" "mcb" "mumble" "pc" "pz" "qw" "refractor" "renderware" "rw" "sb" "sdtd" "st" "stn" "ts3" "tw" "terraria" "unreal" "unreal2" "unreal3" "vints" "wurm") + local ports_edit_array=( "ac" "arma3" "bo" "bt" "cd" "dst" "eco" "idtech2" "idtech3" "idtech3_ql" "jc2" "jc3" "lwjgl2" "mcb" "mumble" "pc" "pc2" "pz" "qw" "refractor" "renderware" "rw" "sb" "sdtd" "st" "stn" "ts3" "tw" "terraria" "unreal" "unreal2" "unreal3" "vints" "wurm") for port_edit in "${ports_edit_array[@]}"; do if [ "${shortname}" == "ut3" ]; then startparameterslocation="${servercfgdir}/UTWeb.ini" @@ -1178,6 +1178,15 @@ fn_info_message_pc(){ } | column -s $'\t' -t } +fn_info_message_pc2(){ + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + fn_port "Steam" steamport udp + } | column -s $'\t' -t +} + fn_info_message_pstbs(){ { fn_port "header" @@ -1708,6 +1717,8 @@ fn_info_message_select_engine(){ fn_info_message_onset elif [ "${shortname}" == "pc" ]; then fn_info_message_pc + elif [ "${shortname}" == "pc2" ]; then + fn_info_message_pc2 elif [ "${shortname}" == "pstbs" ]; then fn_info_message_pstbs elif [ "${shortname}" == "pvr" ]; then diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 76de7867f..305a12f93 100755 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -633,6 +633,10 @@ elif [ "${shortname}" == "pc" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations +elif [ "${shortname}" == "pc2" ]; then + gamedirname="ProjectCars2" + fn_default_config_local + fn_list_config_locations elif [ "${shortname}" == "q2" ]; then gamedirname="Quake2" array_configs+=( server.cfg ) From 9e77ca2dd15b64437b94fcdeaacba47613c218e2 Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 27 Apr 2022 00:52:38 +0200 Subject: [PATCH 17/25] refactor: move steammaster check to info_game (#3821) --- lgsm/functions/info_distro.sh | 55 --------------------------------- lgsm/functions/info_game.sh | 57 +++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 55 deletions(-) diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh index 148e2df48..f747b0d1b 100755 --- a/lgsm/functions/info_distro.sh +++ b/lgsm/functions/info_distro.sh @@ -267,61 +267,6 @@ fi netint=$(${ipcommand} -o addr | grep "${ip}" | awk '{print $2}') netlink=$(${ethtoolcommand} "${netint}" 2>/dev/null| grep Speed | awk '{print $2}') -# External IP address -if [ -z "${extip}" ]; then - extip="$(curl --connect-timeout 10 -s https://api.ipify.org 2>/dev/null)" - exitcode=$? - # Should ifconfig.co return an error will use last known IP. - if [ ${exitcode} -eq 0 ]; then - if [[ "${extip}" != *"DOCTYPE"* ]]; then - echo -e "${extip}" > "${tmpdir}/extip.txt" - else - if [ -f "${tmpdir}/extip.txt" ]; then - extip="$(cat "${tmpdir}/extip.txt")" - else - fn_print_error_nl "Unable to get external IP" - fi - fi - else - if [ -f "${tmpdir}/extip.txt" ]; then - extip="$(cat "${tmpdir}/extip.txt")" - else - fn_print_error_nl "Unable to get external IP" - fi - fi -fi - -# Alert IP address -if [ "${displayip}" ]; then - alertip="${displayip}" -elif [ "${extip}" ]; then - alertip="${extip}" -else - alertip="${ip}" -fi - -# Steam Master Server - checks if detected by master server. -if [ -z "${displaymasterserver}" ]; then - if [ "$(command -v jq 2>/dev/null)" ]; then - if [ "${ip}" ]&&[ "${port}" ]; then - if [ "${steammaster}" == "true" ]||[ "${commandname}" == "DEV-QUERY-RAW" ]; then - # Will query server IP addresses first. - for queryip in "${queryips[@]}"; do - masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${queryip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" '.response.servers[] | select((.gameport == ($port|tonumber) or (.gameport == ($queryport|tonumber)))) | .addr' | wc -l 2>/dev/null)" - done - # Should that not work it will try the external IP. - if [ "${masterserver}" == "0" ]; then - masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${extip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" '.response.servers[] | select((.gameport == ($port|tonumber) or (.gameport == ($queryport|tonumber)))) | .addr' | wc -l 2>/dev/null)" - fi - if [ "${masterserver}" == "0" ]; then - displaymasterserver="false" - else - displaymasterserver="true" - fi - fi - fi - fi -fi # Sets the SteamCMD glibc requirement if the game server requirement is less or not required. if [ "${appid}" ]; then if [ "${glibc}" = "null" ]||[ -z "${glibc}" ]||[ "$(printf '%s\n'${glibc}'\n' "2.14" | sort -V | head -n 1)" != "2.14" ]; then diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index b2f5b7a24..3b6910802 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -2441,3 +2441,60 @@ elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsrc" ]; then elif [ "${engine}" == "unreal2" ]; then fn_info_game_unreal2 fi + +# External IP address +if [ -z "${extip}" ]; then + extip="$(curl --connect-timeout 10 -s https://api.ipify.org 2>/dev/null)" + exitcode=$? + # Should ifconfig.co return an error will use last known IP. + if [ ${exitcode} -eq 0 ]; then + if [[ "${extip}" != *"DOCTYPE"* ]]; then + echo -e "${extip}" > "${tmpdir}/extip.txt" + else + if [ -f "${tmpdir}/extip.txt" ]; then + extip="$(cat "${tmpdir}/extip.txt")" + else + fn_print_error_nl "Unable to get external IP" + fi + fi + else + if [ -f "${tmpdir}/extip.txt" ]; then + extip="$(cat "${tmpdir}/extip.txt")" + else + fn_print_error_nl "Unable to get external IP" + fi + fi +fi + +# Alert IP address +if [ "${displayip}" ]; then + alertip="${displayip}" +elif [ "${extip}" ]; then + alertip="${extip}" +else + alertip="${ip}" +fi + +# Steam Master Server - checks if detected by master server. +# Checked after config init, as the queryport is needed +if [ -z "${displaymasterserver}" ]; then + if [ "$(command -v jq 2>/dev/null)" ]; then + if [ "${ip}" ]&&[ "${port}" ]; then + if [ "${steammaster}" == "true" ]||[ "${commandname}" == "DEV-QUERY-RAW" ]; then + # Will query server IP addresses first. + for queryip in "${queryips[@]}"; do + masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${queryip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" '.response.servers[] | select((.gameport == ($port|tonumber) or (.gameport == ($queryport|tonumber)))) | .addr' | wc -l 2>/dev/null)" + done + # Should that not work it will try the external IP. + if [ "${masterserver}" == "0" ]; then + masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${extip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" '.response.servers[] | select((.gameport == ($port|tonumber) or (.gameport == ($queryport|tonumber)))) | .addr' | wc -l 2>/dev/null)" + fi + if [ "${masterserver}" == "0" ]; then + displaymasterserver="false" + else + displaymasterserver="true" + fi + fi + fi + fi +fi From ed12e6c8a041a57509e2d71f33a3c1de50cd5cbb Mon Sep 17 00:00:00 2001 From: Jonah Hirsch Date: Sat, 14 May 2022 16:20:34 -0700 Subject: [PATCH 18/25] fix: tfcserver/_default.cfg Ip flag (#3859) `_ip` => `+ip` --- lgsm/config-default/config-lgsm/tfcserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg index b22c10a7c..827b32736 100644 --- a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg @@ -16,7 +16,7 @@ defaultmap="dustbowl" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game tfc -strictportbind _ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +startparameters="-game tfc -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### From 20eb96e8377863d122caebbd866eed02bb7b12ab Mon Sep 17 00:00:00 2001 From: nathannaveen <42319948+nathannaveen@users.noreply.github.com> Date: Sat, 14 May 2022 19:21:46 -0400 Subject: [PATCH 19/25] chore: Set permissions for GitHub actions (#3849) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much. - Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs [Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/) Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com> --- .github/workflows/create-release.yml | 6 ++++++ .github/workflows/labeler.yml | 6 ++++++ .github/workflows/lock.yml | 6 ++++++ .github/workflows/version-check.yml | 3 +++ 4 files changed, 21 insertions(+) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index c53f39d3d..fcc7fc837 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -5,8 +5,14 @@ on: # branches to consider in the event; optional, defaults to all branches: - master +permissions: + contents: read + jobs: update_release_draft: + permissions: + contents: write # for release-drafter/release-drafter to create a github release + pull-requests: write # for release-drafter/release-drafter to add label to PR runs-on: ubuntu-latest steps: # Drafts your next Release notes as Pull Requests are merged into "master" diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 7b8e2668a..c5ea01d0a 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -3,8 +3,14 @@ on: issues: types: [opened, edited] +permissions: + contents: read + jobs: triage: + permissions: + contents: read # for github/issue-labeler to get repo contents + issues: write # for github/issue-labeler to create or remove labels runs-on: ubuntu-latest steps: - uses: github/issue-labeler@v2.4 diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index 0ec82b1f6..7c17c56bf 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -4,8 +4,14 @@ on: schedule: - cron: '0 0 * * *' +permissions: + contents: read + jobs: lock: + permissions: + issues: write # for dessant/lock-threads to lock issues + pull-requests: write # for dessant/lock-threads to lock PRs runs-on: ubuntu-latest steps: - uses: dessant/lock-threads@v3 diff --git a/.github/workflows/version-check.yml b/.github/workflows/version-check.yml index 2bf80f491..4c06d86d7 100644 --- a/.github/workflows/version-check.yml +++ b/.github/workflows/version-check.yml @@ -7,6 +7,9 @@ name: Version Check on: push # A workflow run is made up of one or more jobs that can run sequentially or in parallel +permissions: + contents: read + jobs: # This workflow contains a single job called "build" Version-Check: From 37ea2c99bc71817555457ad20aa048c54dcb6f7c Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 1 Jun 2022 00:12:34 +0200 Subject: [PATCH 20/25] fix(mcb): fix renaming whitelist to allowlist (#3883) --- lgsm/functions/update_minecraft_bedrock.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/update_minecraft_bedrock.sh b/lgsm/functions/update_minecraft_bedrock.sh index f4054ae00..ad22a291d 100644 --- a/lgsm/functions/update_minecraft_bedrock.sh +++ b/lgsm/functions/update_minecraft_bedrock.sh @@ -17,7 +17,7 @@ fn_update_minecraft_dl(){ if [ "${firstcommandname}" == "INSTALL" ]; then unzip -oq "${tmpdir}/bedrock_server.${remotebuild}.zip" -x "server.properties" -d "${serverfiles}" else - unzip -oq "${tmpdir}/bedrock_server.${remotebuild}.zip" -x "permissions.json" "server.properties" "whitelist.json" -d "${serverfiles}" + unzip -oq "${tmpdir}/bedrock_server.${remotebuild}.zip" -x "permissions.json" "server.properties" "allowlist.json" -d "${serverfiles}" fi local exitcode=$? if [ "${exitcode}" == "0" ]; then From 14ca894cdcfe01dbae8c7449d7e4660dc345ce76 Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 1 Jun 2022 00:13:10 +0200 Subject: [PATCH 21/25] feat(mcb): allow to set hard a version for the server (#3881) --- lgsm/config-default/config-lgsm/mcbserver/_default.cfg | 3 +++ lgsm/functions/update_minecraft_bedrock.sh | 10 +++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lgsm/config-default/config-lgsm/mcbserver/_default.cfg b/lgsm/config-default/config-lgsm/mcbserver/_default.cfg index 8ccd2e658..bc64ee883 100644 --- a/lgsm/config-default/config-lgsm/mcbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mcbserver/_default.cfg @@ -11,6 +11,9 @@ ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters startparameters="" +# Version (latest|1.18.33.02) +mcversion="latest" + #### LinuxGSM Settings #### ## LinuxGSM Stats diff --git a/lgsm/functions/update_minecraft_bedrock.sh b/lgsm/functions/update_minecraft_bedrock.sh index ad22a291d..f724679a9 100644 --- a/lgsm/functions/update_minecraft_bedrock.sh +++ b/lgsm/functions/update_minecraft_bedrock.sh @@ -11,8 +11,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" randnum=$((1 + RANDOM % 5000)) fn_update_minecraft_dl(){ - latestmcbuildurl=$(curl -H "Accept-Encoding: identity" -H "Accept-Language: en" -Ls -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.${randnum}.212 Safari/537.36" "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*zip') - fn_fetch_file "${latestmcbuildurl}" "" "" "" "${tmpdir}" "bedrock_server.${remotebuild}.zip" + fn_fetch_file "https://minecraft.azureedge.net/bin-linux/bedrock-server-${remotebuild}.zip" "" "" "" "${tmpdir}" "bedrock_server.${remotebuild}.zip" echo -e "Extracting to ${serverfiles}...\c" if [ "${firstcommandname}" == "INSTALL" ]; then unzip -oq "${tmpdir}/bedrock_server.${remotebuild}.zip" -x "server.properties" -d "${serverfiles}" @@ -82,7 +81,12 @@ fn_update_minecraft_localbuild(){ fn_update_minecraft_remotebuild(){ # Gets remote build info. - remotebuild=$(curl -H "Accept-Encoding: identity" -H "Accept-Language: en" -Ls -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.${randnum}.212 Safari/537.36" "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*' | sed 's/.*\///' | grep -Eo "[.0-9]+[0-9]") + if [ "${mcversion}" == "latest" ]; then + remotebuild=$(curl -H "Accept-Encoding: identity" -H "Accept-Language: en" -Ls -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.${randnum}.212 Safari/537.36" "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*' | sed 's/.*\///' | grep -Eo "[.0-9]+[0-9]") + else + remotebuild="${mcversion}" + fi + if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" # Checks if remotebuild variable has been set. From 6816d396f82b24da5dbfacefbe5b5540dba73497 Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 1 Jun 2022 00:13:27 +0200 Subject: [PATCH 22/25] fix(ark): rework parsing of config (#3878) --- lgsm/functions/info_game.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index 3b6910802..75cef3c69 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -46,9 +46,9 @@ fn_info_game_ark(){ adminpassword="${unavailable}" serverpassword="${unavailable}" else - servername=$(grep "SessionName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/SessionName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - adminpassword=$(grep "ServerAdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/ServerAdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' ) - serverpassword=$( grep "ServerPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/ServerPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + servername=$(sed -nr 's/^SessionName=(.*)/\1/p' "${servercfgfullpath}") + adminpassword=$(sed -nr 's/^ServerAdminPassword=(.*)/\1/p' "${servercfgfullpath}") + serverpassword=$(sed -nr 's/^ServerPassword=(.*)/\1/p' "${servercfgfullpath}") # Not set servername=${servername:-"NOT SET"} From c68394ff626b33393c1402a3b1cd6e27629b1f0c Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 2 Jun 2022 22:58:07 +0200 Subject: [PATCH 23/25] feat(newserver): Arma Reforger (#3871) * feat(newserver): Arma Reforger * feat(armarserver): Add server profile name * feat(armarserver): Add fix for create profile directory * feat(armar): limit fps for the server to fix the performance * feat(armar): add dependencys Co-authored-by: FliesWithWind * feat(armar): move queryport to config parser and add adminpass * feat(armar): fix dependencys * change ss command for armar * add battleeyeport * bug * tcp Co-authored-by: Marcin Jakubowski Co-authored-by: FliesWithWind Co-authored-by: Daniel Gibbs --- .../config-lgsm/armarserver/_default.cfg | 187 ++++++++++++++++++ lgsm/data/almalinux-8.csv | 1 + lgsm/data/centos-7.csv | 1 + lgsm/data/centos-8.csv | 1 + lgsm/data/debian-10.csv | 1 + lgsm/data/debian-11.csv | 1 + lgsm/data/debian-9.csv | 1 + lgsm/data/rhel-7.csv | 1 + lgsm/data/rhel-8.csv | 1 + lgsm/data/rocky-8.csv | 1 + lgsm/data/serverlist.csv | 1 + lgsm/data/ubuntu-18.04.csv | 1 + lgsm/data/ubuntu-20.04.csv | 1 + lgsm/data/ubuntu-21.04.csv | 1 + lgsm/data/ubuntu-21.10.csv | 1 + lgsm/data/ubuntu-22.04.csv | 1 + lgsm/functions/core_functions.sh | 5 + lgsm/functions/fix.sh | 2 + lgsm/functions/fix_armar.sh | 17 ++ lgsm/functions/info_game.sh | 29 +++ lgsm/functions/info_messages.sh | 17 +- lgsm/functions/install_config.sh | 8 + 22 files changed, 278 insertions(+), 2 deletions(-) create mode 100644 lgsm/config-default/config-lgsm/armarserver/_default.cfg create mode 100755 lgsm/functions/fix_armar.sh diff --git a/lgsm/config-default/config-lgsm/armarserver/_default.cfg b/lgsm/config-default/config-lgsm/armarserver/_default.cfg new file mode 100644 index 000000000..9e2f88d7c --- /dev/null +++ b/lgsm/config-default/config-lgsm/armarserver/_default.cfg @@ -0,0 +1,187 @@ +################################## +######## 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 #### + +# https://community.bistudio.com/wiki/Arma_Reforger:Server_Hosting +# MaxFPS to limit the used Server resouces +maxfps="60" + +# Profile Name +serverprofile="server" +serverprofilefullpath="${serverfiles}/profiles/${serverprofile}" + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="-config ${servercfgfullpath} -profile ${serverprofilefullpath} -maxFPS ${maxfps}" + +#### 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@example.com" +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="alert@example.com" +mailgunemail="email@myemail.com" + +# 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="5" + +## 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="1874900" +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="2" +querytype="protocol-valve" + +## Console type +consoleverbose="yes" +consoleinteract="no" + +## Game Server Details +# Do not edit +gamename="Arma Reforger" +engine="enfusion" +glibc="2.27" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}" +executabledir="${serverfiles}" +executable="./ArmaReforgerServer" +servercfgdir="${systemdir}" +servercfg="${selfname}_config.json" +servercfgdefault="server.json" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +logdir="${rootdir}/log" +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" diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index 808267bb0..067b58378 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -5,6 +5,7 @@ ahl ahl2 ark arma3 +armar,libcurl,openssl-libs av bb bb2,libcurl.i686 diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index 9f989f42a..e8dc0a885 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -5,6 +5,7 @@ ahl ahl2 ark arma3 +armar,libcurl,openssl11-libs av bb bb2,libcurl.i686 diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index 79c45b8db..116d83bea 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -5,6 +5,7 @@ ahl ahl2 ark arma3 +armar,libcurl,openssl-libs av bb bb2,libcurl.i686 diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index 94f356412..30ca2df10 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -5,6 +5,7 @@ ahl ahl2 ark arma3 +armar,libcurl4,libssl1.1 av bb bb2,libcurl4-gnutls-dev:i386 diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index e0021c345..f96d48862 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -5,6 +5,7 @@ ahl ahl2 ark arma3 +armar,libcurl4,libssl1.1 av bb bb2,libcurl4-gnutls-dev:i386 diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index 9cb339c8e..fe55eb260 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -5,6 +5,7 @@ ahl ahl2 ark arma3 +armar,libcurl4,libssl1.1 av bb bb2,libcurl4-gnutls-dev:i386 diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index a7b3254ec..d4d3fbd30 100644 --- a/lgsm/data/rhel-7.csv +++ b/lgsm/data/rhel-7.csv @@ -5,6 +5,7 @@ ahl ahl2 ark arma3 +armar,libcurl,openssl11-libs av bb bb2,libcurl.i686 diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index a7b3254ec..5e7b622e9 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -5,6 +5,7 @@ ahl ahl2 ark arma3 +armar,libcurl,openssl-libs av bb bb2,libcurl.i686 diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index 808267bb0..067b58378 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -5,6 +5,7 @@ ahl ahl2 ark arma3 +armar,libcurl,openssl-libs av bb bb2,libcurl.i686 diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 8f4fde1b2..f5463cd84 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -3,6 +3,7 @@ ahl,ahlserver,Action Half-Life ahl2,ahl2server,Action: Source ark,arkserver,ARK: Survival Evolved arma3,arma3server,ARMA 3 +armar,armarserver,Arma Reforger av,avserver,Avorion bb,bbserver,BrainBread bb2,bb2server,BrainBread 2 diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index 94f356412..30ca2df10 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -5,6 +5,7 @@ ahl ahl2 ark arma3 +armar,libcurl4,libssl1.1 av bb bb2,libcurl4-gnutls-dev:i386 diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index bf5a9601c..ccb1ca703 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -5,6 +5,7 @@ ahl ahl2 ark arma3 +armar,libcurl4,libssl1.1 av bb bb2,libcurl4-gnutls-dev:i386 diff --git a/lgsm/data/ubuntu-21.04.csv b/lgsm/data/ubuntu-21.04.csv index c2a4b959d..b2a277306 100644 --- a/lgsm/data/ubuntu-21.04.csv +++ b/lgsm/data/ubuntu-21.04.csv @@ -5,6 +5,7 @@ ahl ahl2 ark arma3 +armar,libcurl4,libssl1.1 av bb bb2,libcurl4-gnutls-dev:i386 diff --git a/lgsm/data/ubuntu-21.10.csv b/lgsm/data/ubuntu-21.10.csv index 8c66e2e26..836dfe53f 100644 --- a/lgsm/data/ubuntu-21.10.csv +++ b/lgsm/data/ubuntu-21.10.csv @@ -5,6 +5,7 @@ ahl ahl2 ark arma3 +armar,libcurl4,libssl1.1 av bb bb2,libcurl4-gnutls-dev:i386 diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index 8c66e2e26..836dfe53f 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -5,6 +5,7 @@ ahl ahl2 ark arma3 +armar,libcurl4,libssl1.1 av bb bb2,libcurl4-gnutls-dev:i386 diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 4a72bf7d0..ad1307a73 100755 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -341,6 +341,11 @@ functionfile="${FUNCNAME[0]}" fn_fetch_function } +fix_armar.sh(){ +functionfile="${FUNCNAME[0]}" +fn_fetch_function +} + fix_bo.sh(){ functionfile="${FUNCNAME[0]}" fn_fetch_function diff --git a/lgsm/functions/fix.sh b/lgsm/functions/fix.sh index b5cbcc77a..f9f61162f 100755 --- a/lgsm/functions/fix.sh +++ b/lgsm/functions/fix.sh @@ -39,6 +39,8 @@ if [ "${commandname}" != "INSTALL" ]&&[ -z "${fixbypass}" ]; then if [ "${shortname}" == "arma3" ]; then fix_arma3.sh + elif [ "${shortname}" == "armar" ]; then + fix_armar.sh elif [ "${shortname}" == "ark" ]; then fix_ark.sh elif [ "${shortname}" == "bo" ]; then diff --git a/lgsm/functions/fix_armar.sh b/lgsm/functions/fix_armar.sh new file mode 100755 index 000000000..9db42f51a --- /dev/null +++ b/lgsm/functions/fix_armar.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# LinuxGSM fix_armar.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Resolves an issue with Arma Reforger. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +# Fixes: Profile directory doesn't exist. +# Issue Link: https://feedback.bistudio.com/T164845 +if [ ! -d "${serverprofilefullpath}" ]; then + fixname="Profile directory doesn't exist" + fn_fix_msg_start + mkdir -p "${serverprofilefullpath}" + fn_fix_msg_end +fi diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index 75cef3c69..db769f820 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -93,6 +93,33 @@ fn_info_game_arma3(){ battleeyeport=$((port+4)) } +fn_info_game_armar(){ + if [ -f "${servercfgfullpath}" ]; then + adminpassword=$(jq -r '.adminPassword' "${servercfgfullpath}") + configip=$(jq -r '.gameHostBindAddress' "${servercfgfullpath}") + maxplayers=$(jq -r '.game.playerCountLimit' "${servercfgfullpath}") + port=$(jq -r '.gameHostBindPort' "${servercfgfullpath}") + queryport=$(jq -r '.steamQueryPort' "${servercfgfullpath}") + servername=$(jq -r '.game.name' "${servercfgfullpath}") + serverpassword=$(jq -r '.game.password' "${servercfgfullpath}") + battleeyeport=1376 + + + # Not set + adminpassword=${adminpassword:-"NOT SET"} + configip=${configip:-"0.0.0.0"} + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + queryport=${queryport:-"0"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + else + port=${port:-"0"} + servername="${unavailable}" + serverpassword="${unavailable}" + fi +} + fn_info_game_av() { # Config if [ ! -f "${servercfgfullpath}" ]; then @@ -2282,6 +2309,8 @@ elif [ "${shortname}" == "ark" ]; then fn_info_game_ark elif [ "${shortname}" == "arma3" ]; then fn_info_game_arma3 +elif [ "${shortname}" == "armar" ]; then + fn_info_game_armar elif [ "${shortname}" == "av" ]; then fn_info_game_av elif [ "${shortname}" == "bf1942" ]; then diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index cf0f686b1..f0def5b0e 100755 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -658,7 +658,7 @@ fn_info_message_ports_edit(){ startparameterslocation="${red}UNKNOWN${default}" # engines/games that require editing in the config file. - local ports_edit_array=( "ac" "arma3" "bo" "bt" "cd" "dst" "eco" "idtech2" "idtech3" "idtech3_ql" "jc2" "jc3" "lwjgl2" "mcb" "mumble" "pc" "pc2" "pz" "qw" "refractor" "renderware" "rw" "sb" "sdtd" "st" "stn" "ts3" "tw" "terraria" "unreal" "unreal2" "unreal3" "vints" "wurm") + local ports_edit_array=( "ac" "arma3" "armar" "bo" "bt" "cd" "dst" "eco" "idtech2" "idtech3" "idtech3_ql" "jc2" "jc3" "lwjgl2" "mcb" "mumble" "pc" "pc2" "pz" "qw" "refractor" "renderware" "rw" "sb" "sdtd" "st" "stn" "ts3" "tw" "terraria" "unreal" "unreal2" "unreal3" "vints" "wurm") for port_edit in "${ports_edit_array[@]}"; do if [ "${shortname}" == "ut3" ]; then startparameterslocation="${servercfgdir}/UTWeb.ini" @@ -681,7 +681,9 @@ fn_info_message_ports_edit(){ fn_info_message_ports(){ echo -e "${lightblue}Useful port diagnostic command:${default}" - if [ "${shortname}" == "av" ]; then + if [ "${shortname}" == "armar" ]; then + echo -e "ss -tuplwn | grep enfMain" + elif [ "${shortname}" == "av" ]; then echo -e "ss -tuplwn | grep AvorionServer" elif [ "${shortname}" == "bf1942" ]; then echo -e "ss -tuplwn | grep bf1942_lnxded" @@ -807,6 +809,15 @@ fn_info_message_arma3(){ } | column -s $'\t' -t } +fn_info_message_armar(){ + { + fn_port "header" + fn_port "Game" port udp + fn_port "Steam Query" queryport udp + fn_port "BattleEye" battleeyeport tcp + } | column -s $'\t' -t +} + fn_info_message_av(){ { fn_port "header" @@ -1639,6 +1650,8 @@ fn_info_message_select_engine(){ fn_info_message_ark elif [ "${shortname}" == "arma3" ]; then fn_info_message_arma3 + elif [ "${shortname}" == "armar" ]; then + fn_info_message_armar elif [ "${shortname}" == "av" ]; then fn_info_message_av elif [ "${shortname}" == "bf1942" ]; then diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 305a12f93..a7c18b65d 100755 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -202,6 +202,14 @@ elif [ "${shortname}" == "arma3" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations +elif [ "${shortname}" == "armar" ]; then + gamedirname="ArmaReforger" + fn_check_cfgdir + array_configs+=( server.json ) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "bo" ]; then gamedirname="BallisticOverkill" array_configs+=( config.txt ) From 74020fb111d11f29c86535ff017b540cbc2fd4c1 Mon Sep 17 00:00:00 2001 From: Marcin Jakubowski Date: Thu, 2 Jun 2022 23:00:11 +0200 Subject: [PATCH 24/25] fix(arma3): rework parsing of config (#3886) --- lgsm/functions/info_game.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index db769f820..88c27b4c9 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -72,10 +72,10 @@ fn_info_game_arma3(){ serverpassword="${unavailable}" maxplayers="${zero}" else - servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - adminpassword=$(grep "passwordAdmin" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/passwordAdmin//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "maxPlayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + servername=$(sed -nr 's/^hostname\s*=\s*"(.*)"\s*;/\1/p' "${servercfgfullpath}") + adminpassword=$(sed -nr 's/^passwordAdmin\s*=\s*"(.*)"\s*;/\1/p' "${servercfgfullpath}") + serverpassword=$(sed -nr 's/^password\s*=\s*"(.*)"\s*;/\1/p' "${servercfgfullpath}") + maxplayers=$(sed -nr 's/^maxPlayers\s*=\s*([0-9]+)\s*;/\1/p' "${servercfgfullpath}") # Not set servername=${servername:-"NOT SET"} From f34bae849b279c53394848ea54c036c11502fc26 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 2 Jun 2022 22:15:00 +0100 Subject: [PATCH 25/25] Release v22.1.0 --- lgsm/functions/core_functions.sh | 2 +- linuxgsm.sh | 2 +- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index ad1307a73..67ed2a59b 100755 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -8,7 +8,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v21.5.1" +modulesversion="v22.1.0" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index c56d3e284..43c388571 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v21.5.1" +version="v22.1.0" shortname="core" gameservername="core" commandname="CORE" diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index c5c80590c..6a074861c 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v21.5.1" +version="v22.1.0" shortname="fctr" gameservername="fctrserver" commandname="CORE" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 89867b5fa..4bdadb59f 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v21.5.1" +version="v22.1.0" shortname="jc2" gameservername="jc2server" commandname="CORE" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 347646789..f9e64e07c 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v21.5.1" +version="v22.1.0" shortname="mc" gameservername="mcserver" commandname="CORE" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 01a705086..bb149ded7 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v21.5.1" +version="v22.1.0" shortname="ts3" gameservername="ts3server" commandname="CORE"