From 18833adde1c5cdd19e286670bea97d7715ec26a3 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 2 Dec 2021 21:08:31 +0000 Subject: [PATCH 01/21] feat(mc): update Minecraft java requirements (#3697) * update Minecraft Java requirements to Java 17 * fix: steamcmd depdencency check logic --- lgsm/data/debian-11.csv | 6 +- lgsm/data/ubuntu-20.04.csv | 6 +- lgsm/data/ubuntu-21.04.csv | 6 +- lgsm/data/ubuntu-21.10.csv | 123 +++++++++++++++++++++++++++++++++++ lgsm/data/ubuntu-22.04.csv | 123 +++++++++++++++++++++++++++++++++++ lgsm/functions/check_deps.sh | 8 ++- 6 files changed, 262 insertions(+), 10 deletions(-) create mode 100644 lgsm/data/ubuntu-21.10.csv create mode 100644 lgsm/data/ubuntu-22.04.csv diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index 32d0c8b0d0..27dc5cb745 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -57,7 +57,7 @@ kf2 lo l4d l4d2 -mc,openjdk-16-jre +mc,openjdk-17-jre mcb mh mohaa,libstdc++5:i386 @@ -72,7 +72,7 @@ ns2c,speex:i386,libtbb2 onset,libmariadbclient-dev opfor pc -pmc,openjdk-16-jre +pmc,openjdk-17-jre pstbs,libgconf-2-4 pvkii pvr,libc++1 @@ -117,7 +117,7 @@ vs vints,mono-complete wet wf -wmc,openjdk-16-jre +wmc,openjdk-17-jre wurm,xvfb zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index 96889c2ff7..c9fa981f09 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -57,7 +57,7 @@ kf2 lo l4d l4d2 -mc,openjdk-16-jre +mc,openjdk-17-jre mcb mh mohaa,libstdc++5:i386 @@ -72,7 +72,7 @@ ns2c,speex:i386,libtbb2 onset,libmariadbclient-dev opfor pc -pmc,openjdk-16-jre +pmc,openjdk-17-jre pstbs,libgconf-2-4 pvkii pvr,libc++1 @@ -117,7 +117,7 @@ vs vints,mono-complete wet wf -wmc,openjdk-16-jre +wmc,openjdk-17-jre wurm,xvfb zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-21.04.csv b/lgsm/data/ubuntu-21.04.csv index a0abc38253..a3ca2d84ef 100644 --- a/lgsm/data/ubuntu-21.04.csv +++ b/lgsm/data/ubuntu-21.04.csv @@ -57,7 +57,7 @@ kf2 lo l4d l4d2 -mc,openjdk-16-jre +mc,openjdk-17-jre mcb mh mohaa,libstdc++5:i386 @@ -72,7 +72,7 @@ ns2c,speex:i386,libtbb2 onset,libmariadbclient-dev opfor pc -pmc,openjdk-16-jre +pmc,openjdk-17-jre pstbs,libgconf-2-4 pvkii pvr,libc++1 @@ -117,7 +117,7 @@ vs vints,mono-complete wet wf -wmc,openjdk-16-jre +wmc,openjdk-17-jre wurm,xvfb zmr,libtinfo5:i386 zps,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-21.10.csv b/lgsm/data/ubuntu-21.10.csv new file mode 100644 index 0000000000..a3ca2d84ef --- /dev/null +++ b/lgsm/data/ubuntu-21.10.csv @@ -0,0 +1,123 @@ +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 +ark +arma3 +av +bb +bb2,libcurl4-gnutls-dev:i386 +bd +bf1942,libncurses5:i386,libtinfo5:i386 +bfv,libncurses5:i386,libstdc++5:i386 +bmdm,libncurses5:i386 +bo +bs +bt,libicu-dev +bt1944 +cc +cmw +cod,libstdc++5:i386 +cod2,libstdc++5:i386 +cod4 +coduo,libstdc++5:i386 +codwaw +col +cs +cscz +csgo +css,libtinfo5:i386 +dab +dmc +dod +dodr +dods +doi +dst,libcurl4-gnutls-dev:i386 +dys +eco,libgdiplus +em +etl +fctr +fof +gmod,libtinfo5:i386 +hl2dm +hldm +hldms +hw,lib32z1 +ins +inss +ios +jc2 +jc3 +jk2 +kf +kf2 +lo +l4d +l4d2 +mc,openjdk-17-jre +mcb +mh +mohaa,libstdc++5:i386 +mom +mta,libncursesw5 +mumble +nd +nmrih,libtinfo5:i386 +ns +ns2,speex,libtbb2 +ns2c,speex:i386,libtbb2 +onset,libmariadbclient-dev +opfor +pc +pmc,openjdk-17-jre +pstbs,libgconf-2-4 +pvkii +pvr,libc++1 +pz,openjdk-16-jre,rng-tools +q2 +q3 +ql +qw +ricochet +ro +rtcw +rust,lib32z1 +rw,openjdk-16-jre +samp +sb +sbots +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,libsdl +tf2,libcurl4-gnutls-dev:i386 +tfc +ts +ts3 +tu +tw +unt +ut +ut2k4 +ut3 +ut99 +vh,libc6-dev +vs +vints,mono-complete +wet +wf +wmc,openjdk-17-jre +wurm,xvfb +zmr,libtinfo5:i386 +zps,libtinfo5:i386 diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv new file mode 100644 index 0000000000..a3ca2d84ef --- /dev/null +++ b/lgsm/data/ubuntu-22.04.csv @@ -0,0 +1,123 @@ +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 +ark +arma3 +av +bb +bb2,libcurl4-gnutls-dev:i386 +bd +bf1942,libncurses5:i386,libtinfo5:i386 +bfv,libncurses5:i386,libstdc++5:i386 +bmdm,libncurses5:i386 +bo +bs +bt,libicu-dev +bt1944 +cc +cmw +cod,libstdc++5:i386 +cod2,libstdc++5:i386 +cod4 +coduo,libstdc++5:i386 +codwaw +col +cs +cscz +csgo +css,libtinfo5:i386 +dab +dmc +dod +dodr +dods +doi +dst,libcurl4-gnutls-dev:i386 +dys +eco,libgdiplus +em +etl +fctr +fof +gmod,libtinfo5:i386 +hl2dm +hldm +hldms +hw,lib32z1 +ins +inss +ios +jc2 +jc3 +jk2 +kf +kf2 +lo +l4d +l4d2 +mc,openjdk-17-jre +mcb +mh +mohaa,libstdc++5:i386 +mom +mta,libncursesw5 +mumble +nd +nmrih,libtinfo5:i386 +ns +ns2,speex,libtbb2 +ns2c,speex:i386,libtbb2 +onset,libmariadbclient-dev +opfor +pc +pmc,openjdk-17-jre +pstbs,libgconf-2-4 +pvkii +pvr,libc++1 +pz,openjdk-16-jre,rng-tools +q2 +q3 +ql +qw +ricochet +ro +rtcw +rust,lib32z1 +rw,openjdk-16-jre +samp +sb +sbots +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,libsdl +tf2,libcurl4-gnutls-dev:i386 +tfc +ts +ts3 +tu +tw +unt +ut +ut2k4 +ut3 +ut99 +vh,libc6-dev +vs +vints,mono-complete +wet +wf +wmc,openjdk-17-jre +wurm,xvfb +zmr,libtinfo5:i386 +zps,libtinfo5:i386 diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh index e8fd3f991e..fab923bd74 100755 --- a/lgsm/functions/check_deps.sh +++ b/lgsm/functions/check_deps.sh @@ -225,7 +225,13 @@ 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 + if [ "${deptocheck}" == "libsdl2-2.0-0:i386" ]&&[ -z "${appid}" ]; then + array_deps_required=( "${array_deps_required[@]/libsdl2-2.0-0:i386}" ) + steamcmdstatus=1 + elif [ "${deptocheck}" == "steamcmd" ]&&[ -z "${appid}" ]; then + array_deps_required=( "${array_deps_required[@]/steamcmd}" ) + steamcmdstatus=1 + elif [ "${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. From fa73a72521a0316d3124fef2ce68d8b834489224 Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 2 Dec 2021 22:12:17 +0100 Subject: [PATCH 02/21] fix(core_dl): fix position of force_install_dir (#3693) --- lgsm/functions/core_dl.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index 33b2b71202..5abfdfbb35 100755 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -60,29 +60,29 @@ fn_dl_steamcmd(){ if [ "${appid}" == "90" ]; then # If using a specific branch. if [ -n "${branch}" ]&&[ -n "${betapassword}" ]; then - ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" + ${unbuffer} ${steamcmdcommand} +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" elif [ -n "${branch}" ]; then - ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" -beta "${branch}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" + ${unbuffer} ${steamcmdcommand} +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" -beta "${branch}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" else - ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" + ${unbuffer} ${steamcmdcommand} +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" fi # Force Windows Platform type. elif [ "${steamcmdforcewindows}" == "yes" ]; then if [ -n "${branch}" ]&&[ -n "${betapassword}" ]; then - ${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" + ${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" elif [ -n "${branch}" ]; then - ${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" + ${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" else - ${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" + ${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" fi # All other servers. else if [ -n "${branch}" ]&&[ -n "${betapassword}" ]; then - ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" + ${unbuffer} ${steamcmdcommand} +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" elif [ -n "${branch}" ]; then - ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" + ${unbuffer} ${steamcmdcommand} +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" else - ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" + ${unbuffer} ${steamcmdcommand} +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" fi fi From 809305d838b372d3fa92575f15d129bbb84d80f1 Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 2 Dec 2021 22:12:55 +0100 Subject: [PATCH 03/21] fix(ts3): fix missing details (#3682) --- lgsm/functions/info_game.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index c767fcb78b..ad29b5a2cd 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -2315,6 +2315,8 @@ elif [ "${shortname}" == "stn" ]; then fn_info_game_stn elif [ "${shortname}" == "terraria" ]; then fn_info_game_terraria +elif [ "${shortname}" == "ts3" ]; then + fn_info_game_ts3 elif [ "${shortname}" == "tu" ]; then fn_info_game_tu elif [ "${shortname}" == "tw" ]; then From 07715b73cdb96de8a9b0b61747f1365fe6367265 Mon Sep 17 00:00:00 2001 From: Cryotize <49732602+Cryotize@users.noreply.github.com> Date: Thu, 2 Dec 2021 22:14:35 +0100 Subject: [PATCH 04/21] feat(ark): Add Genesis 2 (#3678) Add the Genesis 2 DLC map name Co-authored-by: Daniel Gibbs --- 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 ea8b917aff..eb3ac908b4 100644 --- a/lgsm/config-default/config-lgsm/arkserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/arkserver/_default.cfg @@ -13,7 +13,7 @@ ip="0.0.0.0" port="7777" queryport="27015" rconport="27020" -# Default Map: TheIsland, Ragnarok, CrystalIsles, Aberration_P, ScorchedEarth_P, TheCenter, Extinction, Valguero_P, Genesis +# Default Map: TheIsland, Ragnarok, CrystalIsles, Aberration_P, ScorchedEarth_P, TheCenter, Extinction, Valguero_P, Genesis, Gen2 defaultmap="TheIsland" altsavedirectoryname="${defaultmap}" maxplayers="70" From 3c9d112ae29e42cad9f3c2fc01b0362a0d9728f5 Mon Sep 17 00:00:00 2001 From: StudioEtrange Date: Thu, 2 Dec 2021 22:15:18 +0100 Subject: [PATCH 05/21] fix: typo in fix_vh.sh (#3674) Co-authored-by: Daniel Gibbs --- lgsm/functions/fix_vh.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/fix_vh.sh b/lgsm/functions/fix_vh.sh index 9b672a5b32..7d60916a44 100755 --- a/lgsm/functions/fix_vh.sh +++ b/lgsm/functions/fix_vh.sh @@ -17,7 +17,7 @@ if [ -f "${modsinstalledlistfullpath}" ]; then if ! grep -qE "^executable=\"./start_server_bepinex.sh\"" "${configdirserver}/${selfname}.cfg" then echo 'executable="./start_server_bepinex.sh"' >> "${configdirserver}/${selfname}.cfg" - executeable="./start_server_bepinex.sh" + executable="./start_server_bepinex.sh" fi fi fi From a908e18c12b7f94c9a596590e9395f09c9624fd4 Mon Sep 17 00:00:00 2001 From: jobhh Date: Thu, 2 Dec 2021 23:24:18 +0100 Subject: [PATCH 06/21] feat(etl): update Enemy Territory: Legacy to 2.78.1 (#3684) --- lgsm/functions/install_server_files.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index e32d3d7784..91fb1743a5 100755 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -27,7 +27,7 @@ fn_install_server_files(){ elif [ "${shortname}" == "codwaw" ]; then remote_fileurl="http://linuxgsm.download/CallOfDutyWorldAtWar/codwaw-lnxded-1.7-full.tar.xz"; local_filedir="${tmpdir}"; local_filename="codwaw-lnxded-1.7-full.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="2c6be1bb66ea631b9b2e7ae6216c6680" elif [ "${shortname}" == "etl" ]; then - remote_fileurl="http://linuxgsm.download/WolfensteinEnemyTerritory/etlegacy-v2.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" + remote_fileurl="http://linuxgsm.download/WolfensteinEnemyTerritory/etlegacy-v2.78.1-i386-et-260b.tar.xz"; local_filedir="${tmpdir}"; local_filename="etlegacy-v2.78.1-i386-et-260b.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="7c08b52cb09b30eadb98ea05ef780fc7" elif [ "${shortname}" == "mohaa" ]; then remote_fileurl="http://linuxgsm.download/MedalofHonorAlliedAssault/moh_revival_v1.12_RC3.5.1.tar.xz"; local_filedir="${tmpdir}"; local_filename="moh_revival_v1.12_RC3.5.1.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="7c664538999252eeaf2b6d9949416480" elif [ "${shortname}" == "ns" ]; then From 72cf56bd2740f7026ce40f03fb5b1ce279b3a218 Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 2 Dec 2021 23:24:40 +0100 Subject: [PATCH 07/21] fix(sf): add multihome parameter (#3667) --- lgsm/config-default/config-lgsm/sfserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/sfserver/_default.cfg b/lgsm/config-default/config-lgsm/sfserver/_default.cfg index 229eb1f0b4..45ca1151a6 100644 --- a/lgsm/config-default/config-lgsm/sfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sfserver/_default.cfg @@ -15,7 +15,7 @@ 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" +startparameters="FactoryGame -multihome=${ip} -ServerQueryPort=${queryport} -BeaconPort=${beaconport} -Port=${port} -log -unattended" #### LinuxGSM Settings #### From 4b95e7f120c8909dd87eaf990a7268b5134c58ea Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 20 Dec 2021 21:39:00 +0100 Subject: [PATCH 08/21] fix(details): check as well queryport via steam (#3719) --- lgsm/config-default/config-lgsm/colserver/_default.cfg | 2 +- lgsm/config-default/config-lgsm/dodrserver/_default.cfg | 2 +- lgsm/config-default/config-lgsm/stnserver/_default.cfg | 2 +- lgsm/config-default/config-lgsm/vhserver/_default.cfg | 2 +- lgsm/functions/info_distro.sh | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lgsm/config-default/config-lgsm/colserver/_default.cfg b/lgsm/config-default/config-lgsm/colserver/_default.cfg index b9bd78594f..450b767653 100644 --- a/lgsm/config-default/config-lgsm/colserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/colserver/_default.cfg @@ -116,7 +116,7 @@ steamcmdforcewindows="no" branch="" betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server -steammaster="false" +steammaster="true" ## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill diff --git a/lgsm/config-default/config-lgsm/dodrserver/_default.cfg b/lgsm/config-default/config-lgsm/dodrserver/_default.cfg index 3bf88cf465..41d55374bb 100644 --- a/lgsm/config-default/config-lgsm/dodrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodrserver/_default.cfg @@ -121,7 +121,7 @@ steamcmdforcewindows="no" branch="" betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server -steammaster="false" +steammaster="true" ## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill diff --git a/lgsm/config-default/config-lgsm/stnserver/_default.cfg b/lgsm/config-default/config-lgsm/stnserver/_default.cfg index 339d1ee229..0b9510d4cd 100644 --- a/lgsm/config-default/config-lgsm/stnserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/stnserver/_default.cfg @@ -119,7 +119,7 @@ steamcmdforcewindows="no" branch="" betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server -steammaster="false" +steammaster="true" ## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill diff --git a/lgsm/config-default/config-lgsm/vhserver/_default.cfg b/lgsm/config-default/config-lgsm/vhserver/_default.cfg index 286be4787a..89babe3246 100644 --- a/lgsm/config-default/config-lgsm/vhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vhserver/_default.cfg @@ -124,7 +124,7 @@ steamcmdforcewindows="no" branch="" betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server -steammaster="false" +steammaster="true" ## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh index 43a6aa4e07..3e3051d2d9 100755 --- a/lgsm/functions/info_distro.sh +++ b/lgsm/functions/info_distro.sh @@ -291,11 +291,11 @@ if [ -z "${displaymasterserver}" ]; 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}':'${port}'&format=json' | jq '.response.servers[]|.addr' | wc -l 2>/dev/null)" + 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}':'${port}'&format=json' | jq '.response.servers[]|.addr' | wc -l 2>/dev/null)" + 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" From a0d970758c96cc50c593be5c63b8a858fd53bc12 Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 20 Dec 2021 21:55:50 +0100 Subject: [PATCH 09/21] feat(newserver): Crafting Dead (#3691) --- .../config-lgsm/cdserver/_default.cfg | 180 ++++++++++++++++++ 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-16.04.csv | 1 + lgsm/data/ubuntu-18.04.csv | 1 + lgsm/data/ubuntu-20.04.csv | 1 + lgsm/data/ubuntu-21.04.csv | 1 + lgsm/functions/info_game.sh | 22 +++ lgsm/functions/info_messages.sh | 13 +- 17 files changed, 228 insertions(+), 1 deletion(-) create mode 100644 lgsm/config-default/config-lgsm/cdserver/_default.cfg diff --git a/lgsm/config-default/config-lgsm/cdserver/_default.cfg b/lgsm/config-default/config-lgsm/cdserver/_default.cfg new file mode 100644 index 0000000000..50eb14bf13 --- /dev/null +++ b/lgsm/config-default/config-lgsm/cdserver/_default.cfg @@ -0,0 +1,180 @@ +################################## +######## 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 #### + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="-batchmode -nographics" + +#### 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="685100" +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="Crafting Dead" +engine="unity3d" +glibc="2.15" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}" +executabledir="${serverfiles}" +executable="./crafting_dead.x86_64" +servercfgdir="${systemdir}" +servercfg="properties.json" +servercfgdefault="properties.json" +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/almalinux-8.csv b/lgsm/data/almalinux-8.csv index 08ae83a106..4b9942c89a 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -17,6 +17,7 @@ bs bt,libicu bt1944 cc +cd cmw cod,compat-libstdc++-33.i686 cod2,compat-libstdc++-33.i686 diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index eb64cfb863..97ea6298dd 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -17,6 +17,7 @@ bs bt,libicu bt1944 cc +cd cmw cod,compat-libstdc++-33.i686 cod2,compat-libstdc++-33.i686 diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index d33fbe00af..6218227d2a 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -17,6 +17,7 @@ bs bt,libicu bt1944 cc +cd cmw cod,compat-libstdc++-33.i686 cod2,compat-libstdc++-33.i686 diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index 2024e85fa7..634c58a1c2 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -17,6 +17,7 @@ bs bt,libicu-dev bt1944 cc +cd cmw cod,libstdc++5:i386 cod2,libstdc++5:i386 diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index 27dc5cb745..8b49da2c5a 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -17,6 +17,7 @@ bs bt,libicu-dev bt1944 cc +cd cmw cod,libstdc++5:i386 cod2,libstdc++5:i386 diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index 139d5fd80b..adda69a37b 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -17,6 +17,7 @@ bs bt,libicu-dev bt1944 cc +cd cmw cod,libstdc++5:i386 cod2,libstdc++5:i386 diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index 1334a5f6cf..6b4f933723 100644 --- a/lgsm/data/rhel-7.csv +++ b/lgsm/data/rhel-7.csv @@ -17,6 +17,7 @@ bs bt,libicu bt1944 cc +cd cmw cod,compat-libstdc++-33.i686 cod2,compat-libstdc++-33.i686 diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index 1334a5f6cf..6b4f933723 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -17,6 +17,7 @@ bs bt,libicu bt1944 cc +cd cmw cod,compat-libstdc++-33.i686 cod2,compat-libstdc++-33.i686 diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index 08ae83a106..4b9942c89a 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -17,6 +17,7 @@ bs bt,libicu bt1944 cc +cd cmw cod,compat-libstdc++-33.i686 cod2,compat-libstdc++-33.i686 diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index cbd0f330ed..13ae66a0da 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -15,6 +15,7 @@ bs,bsserver,Blade Symphony bt,btserver,Barotrauma bt1944,bt1944server,Battalion 1944 cc,ccserver,Codename CURE +cd,cdserver,Crafting Dead cmw,cmwserver,Chivalry: Medieval Warfare cod,codserver,Call of Duty cod2,cod2server,Call of Duty 2 diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index 415d9abbf5..d56c0172a5 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -17,6 +17,7 @@ bs bt,libicu-dev bt1944 cc +cd cmw cod,libstdc++5:i386 cod2,libstdc++5:i386 diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index 2024e85fa7..634c58a1c2 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -17,6 +17,7 @@ bs bt,libicu-dev bt1944 cc +cd cmw cod,libstdc++5:i386 cod2,libstdc++5:i386 diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index c9fa981f09..5fdad7d618 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -17,6 +17,7 @@ bs bt,libicu-dev bt1944 cc +cd cmw cod,libstdc++5:i386 cod2,libstdc++5:i386 diff --git a/lgsm/data/ubuntu-21.04.csv b/lgsm/data/ubuntu-21.04.csv index a3ca2d84ef..352d6d203f 100644 --- a/lgsm/data/ubuntu-21.04.csv +++ b/lgsm/data/ubuntu-21.04.csv @@ -17,6 +17,7 @@ bs bt,libicu-dev bt1944 cc +cd cmw cod,libstdc++5:i386 cod2,libstdc++5:i386 diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index ad29b5a2cd..7d505a98a2 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -258,6 +258,26 @@ fn_info_game_bt1944(){ rconport=$((port+2)) } +fn_info_game_cd(){ + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + port="${zero}" + rconenabled="false" + rconport="${zero}" + rconpassword="${unavailable}" + steamport="${zero}" + maxplayers="${zero}" + else + servername=$(jq -r '.game_title' "${servercfgfullpath}") + port=$(jq -r '.game_port' "${servercfgfullpath}") + steamport=$(jq -r '.steam_port_messages' "${servercfgfullpath}") + rconenabled=$(jq -r '.rcon' "${servercfgfullpath}") + rconport=$(jq -r '.rcon_port' "${servercfgfullpath}") + rconpassword=$(jq -r '.rcon_password' "${servercfgfullpath}") + maxplayers=$(jq -r '.player_count' "${servercfgfullpath}") + fi +} + fn_info_game_cmw(){ # Config if [ ! -f "${servercfgfullpath}" ]; then @@ -2209,6 +2229,8 @@ elif [ "${shortname}" == "bt" ]; then fn_info_game_bt elif [ "${shortname}" == "bt1944" ]; then fn_info_game_bt1944 +elif [ "${shortname}" == "cd" ]; then + fn_info_game_cd elif [ "${shortname}" == "cmw" ]; then fn_info_game_cmw elif [ "${shortname}" == "cod" ]; then diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index 0337f2d92e..7b9b913097 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" "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" "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" @@ -859,6 +859,15 @@ fn_info_message_bt1944(){ } | column -s $'\t' -t } +fn_info_messages_cd(){ + { + fn_port "header" + fn_port "Game" port udp + fn_port "Steam" steamport udp + fn_port "RCON" rconport tcp + } | column -s $'\t' -t +} + fn_info_message_cmw(){ fn_info_message_password_strip { @@ -1615,6 +1624,8 @@ fn_info_message_select_engine(){ fn_info_message_bt elif [ "${shortname}" == "bt1944" ]; then fn_info_message_bt1944 + elif [ "${shortname}" == "cd" ]; then + fn_info_messages_cd elif [ "${shortname}" == "csgo" ]; then fn_info_message_csgo elif [ "${shortname}" == "cmw" ]; then From 54bf33264da3fcc55f9682a4ef23848fbee8705e Mon Sep 17 00:00:00 2001 From: Marcin Jakubowski Date: Mon, 20 Dec 2021 22:07:23 +0100 Subject: [PATCH 10/21] feat(newserver): DayZ (#3557) * feat(dayzserver): add base dayz support * feat(dayzserver): add game info support * fix(dayzserver): fix dayz mods if run in debug * feat(dayzserver): add install game config * fix(dayzserver): fix shortname in install_config * feat(dayzserver): download config from remote * fix(dayzserver): fix default server cfg file * fix(dayzserver): temporarily use default debug cmd * fix(dayzserver): fix DayZ info game ports * feat(dayzserver): add change port config location * refactor(dayzserver): cleaner reading of server variables * fix(dayzserver): fix DayZ debug parameters. * fix(dayzserver): add dayz to dependency files * fix(dayzserver): add gotify allerts to dayz config --- .../config-lgsm/dayzserver/_default.cfg | 202 ++++++++++++++++++ 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-16.04.csv | 1 + lgsm/data/ubuntu-18.04.csv | 1 + lgsm/data/ubuntu-20.04.csv | 1 + lgsm/data/ubuntu-21.04.csv | 1 + lgsm/functions/info_game.sh | 30 +++ lgsm/functions/info_messages.sh | 14 +- lgsm/functions/install_config.sh | 8 + 18 files changed, 267 insertions(+), 1 deletion(-) create mode 100644 lgsm/config-default/config-lgsm/dayzserver/_default.cfg diff --git a/lgsm/config-default/config-lgsm/dayzserver/_default.cfg b/lgsm/config-default/config-lgsm/dayzserver/_default.cfg new file mode 100644 index 0000000000..45042cf07d --- /dev/null +++ b/lgsm/config-default/config-lgsm/dayzserver/_default.cfg @@ -0,0 +1,202 @@ +################################## +######## 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' + +## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters +ip="0.0.0.0" +port="2302" + +## DayZ Modules +# Add mods with relative paths: +# mods/@cf +# To load the "Community framework for DayZ SA" module found in the +# directory serverfiles/mods/@cf. Load several mods as: +# mods="mods/@cf\;mods/@dayz-expansion\;mods/@deerisle" +mods="" + +## Server-side Mods +servermods="" + +## Path to BattlEye +# Leave empty for default +bepath="" + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="-ip=${ip} -port=${port} -config=${servercfgfullpath} -mod=${mods} -servermod=${servermods} -bepath=${bepath} -limitFPS=60 -dologs -adminlog -freezeCheck" + +#### 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="1042420" +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="DayZ" +engine="enfusion" +glibc="2.27" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}" +executabledir="${serverfiles}" +executable="./DayZServer" +servercfgdir="${systemdir}/cfg" +servercfg="${selfname}.server.cfg" +servercfgdefault="server.cfg" +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 4b9942c89a..39c49c153f 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -30,6 +30,7 @@ cscz csgo css,ncurses-libs.i686 dab +dayz dmc dod dodr diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index 97ea6298dd..db84ecc189 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -30,6 +30,7 @@ cscz csgo css,ncurses-libs.i686 dab +dayz dmc dod dodr diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index 6218227d2a..8084d9e0d5 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -30,6 +30,7 @@ cscz csgo css,ncurses-libs.i686 dab +dayz dmc dod dodr diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index 634c58a1c2..19d9b18284 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -30,6 +30,7 @@ cscz csgo css,libtinfo5:i386 dab +dayz dmc dod dodr diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index 8b49da2c5a..926d6d255e 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -30,6 +30,7 @@ cscz csgo css,libtinfo5:i386 dab +dayz dmc dod dodr diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index adda69a37b..d6886018ce 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -30,6 +30,7 @@ cscz csgo css,libtinfo5:i386 dab +dayz dmc dod dodr diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index 6b4f933723..5438404b10 100644 --- a/lgsm/data/rhel-7.csv +++ b/lgsm/data/rhel-7.csv @@ -30,6 +30,7 @@ cscz csgo css,ncurses-libs.i686 dab +dayz dmc dod dodr diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index 6b4f933723..5438404b10 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -30,6 +30,7 @@ cscz csgo css,ncurses-libs.i686 dab +dayz dmc dod dodr diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index 4b9942c89a..39c49c153f 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -30,6 +30,7 @@ cscz csgo css,ncurses-libs.i686 dab +dayz dmc dod dodr diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 13ae66a0da..2ad5675793 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -28,6 +28,7 @@ cscz,csczserver,Counter-Strike: Condition Zero csgo,csgoserver,Counter-Strike: Global Offensive css,cssserver,Counter-Strike: Source dab,dabserver,Double Action: Boogaloo +dayz,dayzserver,DayZ dmc,dmcserver,Deathmatch Classic dod,dodserver,Day of Defeat dodr,dodrserver,Day of Dragons diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index d56c0172a5..7ff5197209 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -30,6 +30,7 @@ cscz csgo css,libtinfo5:i386 dab +dayz dmc dod dodr diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index 634c58a1c2..19d9b18284 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -30,6 +30,7 @@ cscz csgo css,libtinfo5:i386 dab +dayz dmc dod dodr diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index 5fdad7d618..a2fa9c28e3 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -30,6 +30,7 @@ cscz csgo css,libtinfo5:i386 dab +dayz dmc dod dodr diff --git a/lgsm/data/ubuntu-21.04.csv b/lgsm/data/ubuntu-21.04.csv index 352d6d203f..4274c4331e 100644 --- a/lgsm/data/ubuntu-21.04.csv +++ b/lgsm/data/ubuntu-21.04.csv @@ -30,6 +30,7 @@ cscz csgo css,libtinfo5:i386 dab +dayz dmc dod dodr diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index 7d505a98a2..70c8a3caa0 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -462,6 +462,34 @@ fn_info_game_dodr(){ queryport=${queryport:-"27015"} } +fn_info_game_dayz(){ + # Config + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + adminpassword="${unavailable}" + serverpassword="${unavailable}" + maxplayers="${zero}" + else + 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}") + queryport=$(sed -nr 's/^steamQueryPort\s*=\s*([0-9]+)\s*;/\1/p' "${servercfgfullpath}") + + # Not Set + servername=${servername:-"NOT SET"} + adminpassword=${adminpassword:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + queryport=${queryport:-"27016"} + fi + + # Parameters + port=${port:-"2302"} + steammasterport=$((port+2)) + battleeyeport=$((port+4)) +} + fn_info_game_dst(){ # Config if [ ! -f "${clustercfgfullpath}" ]; then @@ -2245,6 +2273,8 @@ elif [ "${shortname}" == "codwaw" ]; then fn_info_game_codwaw elif [ "${shortname}" == "col" ]; then fn_info_game_col +elif [ "${shortname}" == "dayz" ]; then + fn_info_game_dayz elif [ "${shortname}" == "dodr" ]; then fn_info_game_dodr elif [ "${shortname}" == "dst" ]; then diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index 7b9b913097..a431bd54aa 100755 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -669,7 +669,7 @@ fn_info_message_ports_edit(){ fi done # engines/games that require editing the start parameters. - local ports_edit_array=( "av" "col" "fctr" "goldsrc" "hw" "iw3.0" "ioquake3" "qfusion" "rust" "scpsl" "scpslsm" "sol" "spark" "source" "unreal4" "arma3" "unt" "vh" ) + local ports_edit_array=( "av" "col" "fctr" "goldsrc" "hw" "iw3.0" "ioquake3" "qfusion" "rust" "scpsl" "scpslsm" "sol" "spark" "source" "unreal4" "arma3" "dayz" "unt" "vh" ) for port_edit in "${ports_edit_array[@]}"; do if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]||[ "${shortname}" == "${port_edit}" ]; then startparameterslocation="${configdirserver}" @@ -938,6 +938,16 @@ fn_info_message_csgo(){ } | column -s $'\t' -t } +fn_info_message_dayz(){ + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query Steam" queryport udp + fn_port "Steam Master" steammasterport udp + fn_port "BattleEye" battleeyeport udp + } | column -s $'\t' -t +} + fn_info_message_dodr(){ { fn_port "header" @@ -1642,6 +1652,8 @@ fn_info_message_select_engine(){ fn_info_message_codwaw elif [ "${shortname}" == "col" ]; then fn_info_message_col + elif [ "${shortname}" == "dayz" ]; then + fn_info_message_dayz elif [ "${shortname}" == "dodr" ]; then fn_info_message_dodr elif [ "${shortname}" == "dst" ]; then diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index d8b496c382..a5fa7bb7ec 100755 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -351,6 +351,14 @@ elif [ "${shortname}" == "css" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations +elif [ "${shortname}" == "dayz" ]; then + gamedirname="DayZ" + fn_check_cfgdir + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "dod" ]; then gamedirname="DayOfDefeat" array_configs+=( server.cfg ) From 169775cc9234c24a061a4e4e46ceef17453a07bc Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 20 Dec 2021 22:08:34 +0100 Subject: [PATCH 11/21] fix(squad): enable steammaster (#3721) --- lgsm/config-default/config-lgsm/squadserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/squadserver/_default.cfg b/lgsm/config-default/config-lgsm/squadserver/_default.cfg index 1adfe68e05..85affef381 100644 --- a/lgsm/config-default/config-lgsm/squadserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/squadserver/_default.cfg @@ -120,7 +120,7 @@ steamcmdforcewindows="no" branch="" betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server -steammaster="false" +steammaster="true" ## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill From f06dfc45c3ad8b5680899edcd798486a4d340fe2 Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 20 Dec 2021 22:28:34 +0100 Subject: [PATCH 12/21] feat(newserver): The Isle (#3720) --- .../config-lgsm/tiserver/_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-16.04.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/info_game.sh | 12 ++ lgsm/functions/info_messages.sh | 8 + lgsm/functions/install_config.sh | 7 + 20 files changed, 230 insertions(+) create mode 100644 lgsm/config-default/config-lgsm/tiserver/_default.cfg diff --git a/lgsm/config-default/config-lgsm/tiserver/_default.cfg b/lgsm/config-default/config-lgsm/tiserver/_default.cfg new file mode 100644 index 0000000000..1de6910b52 --- /dev/null +++ b/lgsm/config-default/config-lgsm/tiserver/_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 #### + +## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters +ip="0.0.0.0" +port="7777" +queryport="27015" +# Possible maps, see: https://isle.fandom.com/wiki/The_Isle_Server_Settings_and_Configuration#Optional_Maps +map="" + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="${map} -MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -log" + +#### 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="412680" +steamcmdforcewindows="no" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="evrima" +betapassword="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="true" + +## 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="The Isle" +engine="unreal4" +glibc="2.17" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}/TheIsle" +executabledir="${systemdir}/Binaries/Linux" +executable="./TheIsleServer-Linux-Shipping" +servercfgdir="${systemdir}/Saved/Config/LinuxServer" +servercfg="Game.ini" +servercfgdefault="Game.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" diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index 39c49c153f..808267bb01 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -105,6 +105,7 @@ sven terraria tf2,libcurl.i686 tfc +ti ts ts3 tu diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index db84ecc189..9f989f42ac 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -105,6 +105,7 @@ sven terraria tf2,libcurl.i686 tfc +ti ts ts3 tu diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index 8084d9e0d5..79c45b8db9 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -104,6 +104,7 @@ sven terraria tf2,libcurl.i686 tfc +ti ts ts3 tu diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index 19d9b18284..b127eed9d9 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -105,6 +105,7 @@ sven,libssl1.1:i386,zlib1g:i386 terraria tf2,libcurl4-gnutls-dev:i386 tfc +ti ts ts3 tu diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index 926d6d255e..9ea1992f1a 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -105,6 +105,7 @@ sven,libssl1.1:i386,zlib1g:i386 terraria tf2,libcurl4-gnutls-dev:i386 tfc +ti ts ts3 tu diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index d6886018ce..b204d55b2b 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -105,6 +105,7 @@ sven,libssl1.1:i386,zlib1g:i386 terraria tf2,libcurl4-gnutls-dev:i386 tfc +ti ts ts3 tu diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index 5438404b10..a7b3254ec7 100644 --- a/lgsm/data/rhel-7.csv +++ b/lgsm/data/rhel-7.csv @@ -105,6 +105,7 @@ sven terraria tf2,libcurl.i686 tfc +ti ts ts3 tu diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index 5438404b10..a7b3254ec7 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -105,6 +105,7 @@ sven terraria tf2,libcurl.i686 tfc +ti ts ts3 tu diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index 39c49c153f..808267bb01 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -105,6 +105,7 @@ sven terraria tf2,libcurl.i686 tfc +ti ts ts3 tu diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 2ad5675793..7e71a94cc8 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -103,6 +103,7 @@ sven,svenserver,Sven Co-op terraria,terrariaserver,Terraria tf2,tf2server,Team Fortress 2 tfc,tfcserver,Team Fortress Classic +ti,tiserver,The Isle ts,tsserver,The Specialists ts3,ts3server,Teamspeak 3 tu,tuserver,Tower Unite diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index 7ff5197209..3882cec617 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -105,6 +105,7 @@ sven,libssl1.1:i386,zlib1g:i386 terraria tf2,libcurl4-gnutls-dev:i386 tfc +ti ts ts3 tu diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index 19d9b18284..b127eed9d9 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -105,6 +105,7 @@ sven,libssl1.1:i386,zlib1g:i386 terraria tf2,libcurl4-gnutls-dev:i386 tfc +ti ts ts3 tu diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index a2fa9c28e3..6276526d66 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -105,6 +105,7 @@ sven,libssl1.1:i386,zlib1g:i386 terraria tf2,libcurl4-gnutls-dev:i386 tfc +ti ts ts3 tu diff --git a/lgsm/data/ubuntu-21.04.csv b/lgsm/data/ubuntu-21.04.csv index 4274c4331e..7ed62f1b13 100644 --- a/lgsm/data/ubuntu-21.04.csv +++ b/lgsm/data/ubuntu-21.04.csv @@ -105,6 +105,7 @@ sven,libssl1.1:i386,zlib1g:i386 terraria,libsdl tf2,libcurl4-gnutls-dev:i386 tfc +ti ts ts3 tu diff --git a/lgsm/data/ubuntu-21.10.csv b/lgsm/data/ubuntu-21.10.csv index a3ca2d84ef..6780fd8c79 100644 --- a/lgsm/data/ubuntu-21.10.csv +++ b/lgsm/data/ubuntu-21.10.csv @@ -103,6 +103,7 @@ sven,libssl1.1:i386,zlib1g:i386 terraria,libsdl tf2,libcurl4-gnutls-dev:i386 tfc +ti ts ts3 tu diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index a3ca2d84ef..6780fd8c79 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -103,6 +103,7 @@ sven,libssl1.1:i386,zlib1g:i386 terraria,libsdl tf2,libcurl4-gnutls-dev:i386 tfc +ti ts ts3 tu diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index 70c8a3caa0..754f6183d5 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -1819,6 +1819,16 @@ fn_info_game_stn(){ fi } +fn_info_game_ti(){ + if [ -f "${servercfgfullpath}" ]; then + servername=$(sed -nr 's/^ServerName="(.*)"/\1/p' "${servercfgfullpath}") + maxplayers=$(sed -nr 's/^MaxPlayerCount=([0-9]+)/\1/' "${servercfgfullpath}") + else + servername="${unavailable}" + maxplayers="${zero}" + fi +} + fn_info_game_ts3(){ # Config if [ ! -f "${servercfgfullpath}" ]; then @@ -2367,6 +2377,8 @@ elif [ "${shortname}" == "stn" ]; then fn_info_game_stn elif [ "${shortname}" == "terraria" ]; then fn_info_game_terraria +elif [ "${shortname}" == "ti" ]; then + fn_info_game_ti elif [ "${shortname}" == "ts3" ]; then fn_info_game_ts3 elif [ "${shortname}" == "tu" ]; then diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index a431bd54aa..13e6987c19 100755 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -1433,6 +1433,12 @@ fn_info_message_st(){ } | column -s $'\t' -t } +fn_info_message_ti(){ + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp +} + fn_info_message_ts3(){ { fn_port "header" @@ -1742,6 +1748,8 @@ fn_info_message_select_engine(){ fn_info_message_stn elif [ "${shortname}" == "terraria" ]; then fn_info_message_terraria + elif [ "${shortname}" == "ti" ]; then + fn_info_message_ti elif [ "${shortname}" == "ts3" ]; then fn_info_message_ts3 elif [ "${shortname}" == "tu" ]; then diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index a5fa7bb7ec..7832e9cd27 100755 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -765,6 +765,13 @@ elif [ "${shortname}" == "tfc" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations +elif [ "${shortname}" == "ti" ]; then + gamedirname="TheIsle" + array_configs+=( Game.ini ) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "ts" ]; then gamedirname="TheSpecialists" array_configs+=( server.cfg ) From 0e6e09da2bf340d410dfec607de8aeb4a6416423 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 20 Dec 2021 21:53:20 +0000 Subject: [PATCH 13/21] fix: remove duplicate dependency --- lgsm/data/debian-10.csv | 2 +- lgsm/data/debian-11.csv | 2 +- lgsm/data/debian-9.csv | 2 +- lgsm/data/ubuntu-16.04.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 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index b127eed9d9..5f066b1ee1 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,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils +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 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 9ea1992f1a..ca7b2a2085 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,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils +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 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 b204d55b2b..36f7523569 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,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils +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 steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd ac ahl diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index 3882cec617..1b23b1836c 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -1,4 +1,4 @@ -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 +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 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 b127eed9d9..5f066b1ee1 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,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils +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 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 6276526d66..4809d4b970 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,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils +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 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 7ed62f1b13..18918e4432 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,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils +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 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 6780fd8c79..d12f194471 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,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils +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 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 6780fd8c79..d12f194471 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,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils +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 steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd ac ahl From 5c139444c885a213561c8285c3338d24778b0730 Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 20 Dec 2021 22:54:39 +0100 Subject: [PATCH 14/21] fix(pstbs): enable steammaster (#3722) --- lgsm/config-default/config-lgsm/pstbsserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg index 9478ad42c2..69501dbf34 100644 --- a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg @@ -124,7 +124,7 @@ steamcmdforcewindows="no" branch="" betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server -steammaster="false" +steammaster="true" ## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill From a82ac53618e775344fe655e83a68c9d8aca61dbe Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 20 Dec 2021 23:14:08 +0100 Subject: [PATCH 15/21] fix(fix_steamcmd): fix to use link for steamclient.so via link (#3695) * fix(steamcmd): steamclient.so hardlink instead of copy --- lgsm/functions/fix_steamcmd.sh | 61 ++++++++++++++++++++++++++++------ 1 file changed, 51 insertions(+), 10 deletions(-) diff --git a/lgsm/functions/fix_steamcmd.sh b/lgsm/functions/fix_steamcmd.sh index 5fb151badf..abac31cfb4 100755 --- a/lgsm/functions/fix_steamcmd.sh +++ b/lgsm/functions/fix_steamcmd.sh @@ -25,6 +25,8 @@ fn_fix_steamclient_so(){ cp "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${2}/steamclient.so" elif [ -f "${steamcmddir}/linux32/steamclient.so" ]; then cp "${steamcmddir}/linux32/steamclient.so" "${2}/steamclient.so" + elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux32/steamclient.so" ]; then + cp "${HOME}/.local/share/Steam/steamcmd/linux32/steamclient.so" "${2}/steamclient.so" fi fn_fix_msg_end fi @@ -40,6 +42,8 @@ fn_fix_steamclient_so(){ cp "${HOME}/.steam/steamcmd/linux64/steamclient.so" "${2}/steamclient.so" elif [ -f "${steamcmddir}/linux64/steamclient.so" ]; then cp "${steamcmddir}/linux64/steamclient.so" "${2}/steamclient.so" + elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux64/steamclient.so" ]; then + cp "${HOME}/.local/share/Steam/steamcmd/linux64/steamclient.so" "${2}/steamclient.so" fi fn_fix_msg_end fi @@ -47,27 +51,64 @@ fn_fix_steamclient_so(){ } # Helps fix: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam,or a local steamclient.so. -if [ ! -f "${HOME}/.steam/sdk64/steamclient.so" ]; then - fixname="steamclient.so sdk64" +steamsdk64="${HOME}/.steam/sdk64" +steamclientsdk64="${steamsdk64}/steamclient.so" +# remove any old unlinked versions of steamclient.so +if [ -f "${steamclientsdk64}" ]; then + if [ "$(stat -c '%h' "${steamclientsdk64}")" -eq 1 ]; then + fixname="steamclient.so sdk64 -- remove old file" + fn_fix_msg_start + rm -f "${steamclientsdk64}" + fn_fix_msg_end + fi +fi + +# place new hardlink for the file to the disk +if [ ! -f "${steamclientsdk64}" ]; then + fixname="steamclient.so sdk64 hardlink" fn_fix_msg_start - mkdir -p "${HOME}/.steam/sdk64" + if [ ! -d "${steamsdk64}" ]; then + mkdir -p "${steamsdk64}" + fi if [ -f "${HOME}/.steam/steamcmd/linux64/steamclient.so" ]; then - cp "${HOME}/.steam/steamcmd/linux64/steamclient.so" "${HOME}/.steam/sdk64/steamclient.so" + ln "${HOME}/.steam/steamcmd/linux64/steamclient.so" "${steamclientsdk64}" elif [ -f "${steamcmddir}/linux64/steamclient.so" ]; then - cp "${steamcmddir}/linux64/steamclient.so" "${HOME}/.steam/sdk64/steamclient.so" + ln "${steamcmddir}/linux64/steamclient.so" "${steamclientsdk64}" + elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux64/steamclient.so" ]; then + ln "${HOME}/.local/share/Steam/steamcmd/linux64/steamclient.so" "${steamclientsdk64}" + else + fn_print_fail_nl "Could not copy any steamclient.so 64bit for the gameserver" fi fn_fix_msg_end fi # Helps fix: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam,or a local steamclient.so. -if [ ! -f "${HOME}/.steam/sdk32/steamclient.so" ]; then - fixname="steamclient.so sdk32" +steamsdk32="${HOME}/.steam/sdk32" +steamclientsdk32="${HOME}/.steam/sdk32/steamclient.so" +if [ -f "${steamclientsdk32}" ]; then + if [ " $(stat -c '%h' "${steamclientsdk32}")" -eq 1 ]; then + fixname="steamclient.so sdk32 -- remove old file" + fn_fix_msg_start + rm -f "${steamclientsdk32}" + fn_fix_msg_end + fi +fi + +# place new hardlink for the file to the disk +if [ ! -f "${steamclientsdk32}" ]; then + fixname="steamclient.so sdk32 link" fn_fix_msg_start - mkdir -p "${HOME}/.steam/sdk32" + if [ ! -d "${steamsdk32}" ]; then + mkdir -p "${steamsdk32}" + fi if [ -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" ]; then - cp "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${HOME}/.steam/sdk32/steamclient.so" + ln "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${steamclientsdk32}" elif [ -f "${steamcmddir}/linux32/steamclient.so" ]; then - cp "${steamcmddir}/linux32/steamclient.so" "${HOME}/.steam/sdk32/steamclient.so" + ln "${steamcmddir}/linux32/steamclient.so" "${steamclientsdk32}" + elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux32/steamclient.so" ]; then + ln "${HOME}/.local/share/Steam/steamcmd/linux32/steamclient.so" "${steamclientsdk32}" + else + fn_print_fail_nl "Could not copy any steamclient.so 32bit for the gameserver" fi fn_fix_msg_end fi From 1c3e5048ebb0abf8f2e631d1259e3a1eafbb4feb Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 21 Dec 2021 22:07:32 +0000 Subject: [PATCH 16/21] feat: give warning if distro is not supported by vendor (#3723) --- lgsm/functions/check_deps.sh | 8 ++++++++ lgsm/functions/info_distro.sh | 17 +++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh index fab923bd74..340a6456b0 100755 --- a/lgsm/functions/check_deps.sh +++ b/lgsm/functions/check_deps.sh @@ -316,6 +316,14 @@ if [ "${commandname}" == "INSTALL" ]; then fi fi +# Will warn user if their distro is no longer supported by the vendor. +if [ -n "${distrosupport}" ]; then + if [ "${distrosupport}" == "unsupported" ]; then + fn_print_warning_nl "${distroname} is no longer supported by the vendor. Upgrading is recommended." + fn_script_log_warn "${distroname} is no longer supported by the vendor. Upgrading is recommended." + fi +fi + info_distro.sh if [ ! -f "${tmpdir}/dependency-no-check.tmp" ]&&[ ! -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh index 3e3051d2d9..472c9c5b28 100755 --- a/lgsm/functions/info_distro.sh +++ b/lgsm/functions/info_distro.sh @@ -80,6 +80,23 @@ else distroversioncsv="${distroversion}" fi +# Check if distro supported by distro vendor. +if [ "$(command -v distro-info 2>/dev/null)" ]; then + distrosunsupported="$(distro-info --unsupported)" + distrosunsupported_array=( "${distrosunsupported}" ) + for distrounsupported in "${distrosunsupported_array[@]}"; do + if [ "${distrounsupported}" == "${distrocodename}" ]; then + distrosupport=unsupported + break + else + distrosupport=supported + fi + done +else + distrosupport=unknown +fi + +echo "${distrosupport}" ## Glibc version # e.g: 1.17 glibcversion="$(ldd --version | sed -n '1s/.* //p')" From de6240fd0ceeef73750e03eb331ae6b2181efdde Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Tue, 21 Dec 2021 23:08:07 +0100 Subject: [PATCH 17/21] fix: #1868 mods lowercase conversion (#3717) * Finally fixes #1868 mods lowercase conversion Sample output: Installing DarkRP ================================= creating mod download directory /home/ulti/lgsm/mods/tmp...OK #=#=- # # ################################################################################################################################################################################################################################################ 100.0% -#O=- # # # extracting darkrp-master.zip...OK converting DarkRP files to lowercase...Found 19 uppercase files out of 588, converting...OK building darkrp-files.txt...OK copying DarkRP to /home/ulti/serverfiles/garrysmod/gamemodes...OK tidy up darkrp-files.txt...OK clearing mod download directory /home/ulti/lgsm/mods/tmp...OK DarkRP installed * removed unused variable --- lgsm/functions/mods_core.sh | 44 +++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/lgsm/functions/mods_core.sh b/lgsm/functions/mods_core.sh index 7e46f7977f..47ac70cb2a 100755 --- a/lgsm/functions/mods_core.sh +++ b/lgsm/functions/mods_core.sh @@ -33,33 +33,39 @@ fn_mod_install_files(){ # Convert mod files to lowercase if needed. fn_mod_lowercase(){ + # Checking lowercase settings from mods array definition if [ "${modlowercase}" == "LowercaseOn" ]; then - echo -en "converting ${modprettyname} files to lowercase..." fn_sleep_time fn_script_log_info "Converting ${modprettyname} files to lowercase" - fileswc=$(find "${extractdir}" -depth | wc -l) - echo -en "\r" + # Total files and directories for the mod, to output to the user + fileswc=$(find "${extractdir}" | wc -l) + # Total uppercase files and directories for the mod, to output to the user + filesupperwc=$(find "${extractdir}" -name '*[[:upper:]]*' | wc -l) + fn_script_log_info "Found ${filesupperwc} uppercase files out of ${fileswc}, converting" + echo -en "Found ${filesupperwc} uppercase files out of ${fileswc}, converting..." + # Convert files and directories starting from the deepest to prevent issues (-depth argument) while read -r src; do - dst=$(dirname "${src}$(/)basename" "${src}" | tr '[:upper:]' '[:lower:]') - if [ "${src}" != "${dst}" ] - then - [ ! -e "${dst}" ] && mv -T "${src}" "${dst}" || echo -e "${src} was not renamed" + # We have to convert only the last file from the path, otherwise we will fail to convert anything if a parent dir has any uppercase + # therefore, we have to separate the end of the filename to only lowercase it rather than the whole line + # Gather parent dir, filename lowercase filename, and set lowercase destination name + latestparentdir=$(dirname "${src}") + latestfilelc=$(basename "${src}" | tr '[:upper:]' '[:lower:]') + dst="${latestparentdir}/${latestfilelc}" + # Only convert if destination does not already exist for some reason + if [ ! -e "${dst}" ]; then + # Finally we can rename the file + mv "${src}" "${dst}" + # Exit if it fails for any reason local exitcode=$? - ((renamedwc++)) + if [ "${exitcode}" != 0 ]; then + fn_print_fail_eol_nl + core_exit.sh + fi fi - echo -en "${renamedwc} / ${totalfileswc} / ${fileswc} converting ${modprettyname} files to lowercase..." $'\r' - ((totalfileswc++)) - done < <(find "${extractdir}" -depth) - echo -en "${renamedwc} / ${totalfileswc} / ${fileswc} converting ${modprettyname} files to lowercase..." - - if [ "${exitcode}" != 0 ]; then - fn_print_fail_eol_nl - core_exit.sh - else + done < <(find "${extractdir}" -depth -name '*[[:upper:]]*') fn_print_ok_eol_nl - fi - fi + fi } # Create ${modcommand}-files.txt containing the full extracted file/directory list. From 1c603b7449383a937cb3c3cee89604caac9eac70 Mon Sep 17 00:00:00 2001 From: Viktor Vilhelm Sonesten Date: Wed, 22 Dec 2021 13:32:14 +0100 Subject: [PATCH 18/21] fix(pzserver): start with --ip instead of -ip (#3724) `-ip` is not parsed correctly by the new build 41 release. See https://github.com/GameServerManagers/LinuxGSM/discussions/3711#discussioncomment-1844368 --- lgsm/config-default/config-lgsm/pzserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/pzserver/_default.cfg b/lgsm/config-default/config-lgsm/pzserver/_default.cfg index a9dfb40b25..2d284187f2 100644 --- a/lgsm/config-default/config-lgsm/pzserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pzserver/_default.cfg @@ -13,7 +13,7 @@ ip="0.0.0.0" adminpassword="CHANGE_ME" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-ip ${ip} -adminpassword \"${adminpassword}\" -servername ${selfname}" +startparameters="--ip ${ip} -adminpassword \"${adminpassword}\" -servername ${selfname}" #### LinuxGSM Settings #### From 588453a43ae73f2e0bc2d1628ea8281de15a354e Mon Sep 17 00:00:00 2001 From: Christian Date: Fri, 31 Dec 2021 22:12:30 +0100 Subject: [PATCH 19/21] fix(cd): add config install (#3726) --- lgsm/functions/install_config.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 7832e9cd27..76de7867f7 100755 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -274,6 +274,13 @@ elif [ "${shortname}" == "bmdm" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations +elif [ "${shortname}" == "cd" ]; then + gamedirname="CraftingDead" + array_configs+=( properties.json ) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "cod" ]; then gamedirname="CallOfDuty" array_configs+=( server.cfg ) From 043f9da769b17eab3c763e657d367645a6206333 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 31 Dec 2021 21:23:00 +0000 Subject: [PATCH 20/21] Release v21.5.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 725cd297b1..4e857553e4 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.4.1" +modulesversion="v21.5.0" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index 1eff0d00f3..76edddfa33 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v21.4.1" +version="v21.5.0" shortname="core" gameservername="core" commandname="CORE" diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index 138864098d..8dfad01c60 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.4.1" +version="v21.5.0" shortname="fctr" gameservername="fctrserver" commandname="CORE" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 86637f5b25..c4b2bba4aa 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.4.1" +version="v21.5.0" shortname="jc2" gameservername="jc2server" commandname="CORE" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 447b8b9e3a..382dd4e122 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.4.1" +version="v21.5.0" shortname="mc" gameservername="mcserver" commandname="CORE" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 3c160f009a..aec69cdd1a 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.4.1" +version="v21.5.0" shortname="ts3" gameservername="ts3server" commandname="CORE" From dda4af8a0a3e1a63c15fd19010088b6e26904ae3 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 31 Dec 2021 21:28:24 +0000 Subject: [PATCH 21/21] fix ti message --- lgsm/functions/info_messages.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index 13e6987c19..a5ad5852e9 100755 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -1434,9 +1434,11 @@ fn_info_message_st(){ } fn_info_message_ti(){ - fn_port "header" - fn_port "Game" port udp - fn_port "Query" queryport udp + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t } fn_info_message_ts3(){