From 5a667ae8b8cffecae84faea4b3900f0798c17722 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 Feb 2025 00:37:34 +0000 Subject: [PATCH 01/38] fix: put bfv and bf1942 back to ubuntu 22.04 --- lgsm/data/serverlist.csv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index d75bee3b5..68f25de70 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -10,8 +10,8 @@ av,avserver,Avorion,ubuntu-24.04 bb,bbserver,BrainBread,ubuntu-24.04 bb2,bb2server,BrainBread 2,ubuntu-24.04 bd,bdserver,Base Defense,ubuntu-24.04 -bf1942,bf1942server,Battlefield 1942,ubuntu-24.04 -bfv,bfvserver,Battlefield: Vietnam,ubuntu-24.04 +bf1942,bf1942server,Battlefield 1942,ubuntu-22.04 +bfv,bfvserver,Battlefield: Vietnam,ubuntu-22.04 bmdm,bmdmserver,Black Mesa: Deathmatch,ubuntu-24.04 bo,boserver,Ballistic Overkill,ubuntu-24.04 bs,bsserver,Blade Symphony,ubuntu-24.04 From 69735b3cb33bd21231d977f3d19eb500dd49b4fa Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 Feb 2025 00:38:14 +0000 Subject: [PATCH 02/38] Release v25.1.2 --- lgsm/modules/core_modules.sh | 2 +- linuxgsm.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index 4c72f127b..6a0764166 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v25.1.1" +modulesversion="v25.1.2" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index 9d689231c..41862a8d8 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -24,7 +24,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v25.1.1" +version="v25.1.2" shortname="core" gameservername="core" commandname="CORE" From 9be745f115af223243d65284b2fc0eb4cff04cd8 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 24 Feb 2025 21:57:19 +0000 Subject: [PATCH 03/38] fix(hz): update config location --- lgsm/config-default/config-lgsm/hzserver/_default.cfg | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lgsm/config-default/config-lgsm/hzserver/_default.cfg b/lgsm/config-default/config-lgsm/hzserver/_default.cfg index b610594e7..98b6dda1e 100644 --- a/lgsm/config-default/config-lgsm/hzserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hzserver/_default.cfg @@ -12,7 +12,6 @@ ip="0.0.0.0" port="7777" queryport="27015" -servername="LinuxGSM" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters startparameters="-log -port=${port} -queryport=${queryport} -steamservername=${servername}" @@ -157,8 +156,8 @@ glibc="2.17" systemdir="${serverfiles}/TSSGame" executabledir="${systemdir}/Binaries/Linux" executable="./TSSGameServer-Linux-Shipping" -servercfgdir="${systemdir}/Saved/Config/LinuxServer" -servercfg="GameUserSettings.ini" +servercfgdir="${systemdir}" +servercfg="GameServerSettings.ini" servercfgdefault="GameUserSettings.ini" servercfgfullpath="${servercfgdir}/${servercfg}" From 64980655f48af7b22cfa4fc42d10a737d9be211d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 24 Feb 2025 22:28:37 +0000 Subject: [PATCH 04/38] feat: bypass termbin if site is down --- lgsm/modules/command_postdetails.sh | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/lgsm/modules/command_postdetails.sh b/lgsm/modules/command_postdetails.sh index 61d537440..7f5f67304 100644 --- a/lgsm/modules/command_postdetails.sh +++ b/lgsm/modules/command_postdetails.sh @@ -58,18 +58,27 @@ else fi fn_print_dots "termbin.com" -link=$(cat "${postdetailslog}" | nc termbin.com 9999 | tr -d '\n\0') -fn_print_ok_nl "termbin.com for 30D" -fn_script_log_pass "termbin.com for 30D" -pdurl="${link}" +link=$(cat "${postdetailslog}" | { + nc -w 3 termbin.com 9999 + echo $? > /tmp/nc_exit_status +} | tr -d '\n\0') +nc_exit_status=$(cat /tmp/nc_exit_status) +if [ "${nc_exit_status}" -ne 0 ]; then + fn_print_error_nl "Failed to post to termbin.com" + fn_script_log_error "Failed to post to termbin.com" +else + fn_print_ok_nl "termbin.com for 30D" + fn_script_log_pass "termbin.com for 30D" + pdurl="${link}" -if [ "${firstcommandname}" == "POST-DETAILS" ]; then - echo -e "" - echo -e "Please share the following url for support: " - echo -e "${italic}${pdurl}${default}" + if [ "${firstcommandname}" == "POST-DETAILS" ]; then + echo -e "" + echo -e "Please share the following url for support: " + echo -e "${italic}${pdurl}${default}" + fi + fn_script_log_info "${pdurl}" + alerturl="${pdurl}" fi -fn_script_log_info "${pdurl}" -alerturl="${pdurl}" if [ -z "${exitbypass}" ]; then core_exit.sh From 3c313de2ba2bfbc87235cf96938680ad22cdd0b2 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 7 Mar 2025 16:25:33 +0000 Subject: [PATCH 05/38] fix(armar): update dependency name to libcurl4t64 for Ubuntu 24.04 --- lgsm/data/ubuntu-24.04.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/data/ubuntu-24.04.csv b/lgsm/data/ubuntu-24.04.csv index aacb0ca7d..dccd1f753 100644 --- a/lgsm/data/ubuntu-24.04.csv +++ b/lgsm/data/ubuntu-24.04.csv @@ -5,7 +5,7 @@ ahl ahl2 ark arma3 -armar,libcurl4 +armar,libcurl4t64 ats av bb From b2eb64532b4458c9f59fd880f9872ad79b7ecfab Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 7 Mar 2025 16:27:57 +0000 Subject: [PATCH 06/38] fix(alert): Restore more info in alert --- lgsm/modules/alert_discord.sh | 113 +++++++++++++++++++--------------- 1 file changed, 63 insertions(+), 50 deletions(-) diff --git a/lgsm/modules/alert_discord.sh b/lgsm/modules/alert_discord.sh index 2b50f0c01..1ed3da441 100644 --- a/lgsm/modules/alert_discord.sh +++ b/lgsm/modules/alert_discord.sh @@ -10,68 +10,81 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" json=$( cat << EOF { - "username": "LinuxGSM", - "avatar_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg", - "file": "content", - "embeds": [ - { - "author": { - "name": "LinuxGSM Alert", - "url": "", - "icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg" - }, - "title": "${alerttitle}", - "url": "", - "description": "", - "color": "${alertcolourdec}", - "type": "content", - "thumbnail": { - "url": "${alerticon}" - }, - "fields": [ - { - "name": "Server Name", - "value": "${servername}" - }, - { - "name": "Information", - "value": "${alertmessage}" - }, - { - "name": "Game", - "value": "${gamename}", - "inline": true - }, - { - "name": "Server Time", - "value": "$(date)", - "inline": true - } + "username": "LinuxGSM", + "avatar_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg", + "file": "content", + "embeds": [ + { + "author": { + "name": "LinuxGSM Alert", + "url": "", + "icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg" + }, + "title": "${alerttitle}", + "url": "", + "description": "", + "color": "${alertcolourdec}", + "type": "content", + "thumbnail": { + "url": "${alerticon}" + }, + "fields": [ + { + "name": "Server Name", + "value": "${servername}" + }, + { + "name": "Information", + "value": "${alertmessage}" + }, + { + "name": "Game", + "value": "${gamename}", + "inline": true + }, + { + "name": "Server Time", + "value": "$(date)", + "inline": true + } EOF ) if [ -n "${querytype}" ]; then json+=$( cat << EOF - , - { - "name": "Is my Game Server Online?", - "value": "https://ismygameserver.online/${imgsoquerytype}/${alertip}:${queryport}", - "inline": true - } + , + { + "name": "Is my Game Server Online?", + "value": "https://ismygameserver.online/${imgsoquerytype}/${alertip}:${queryport}", + "inline": true + } +EOF + ) +fi + +if [ -n "{alerturl}" ]; then + json+=$( + cat << EOF + , + { + "name": "More info", + "value": "${alerturl}", + "inline": true + } EOF ) fi json+=$( cat << EOF - ], - "footer": { - "icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg", - "text": "Sent by LinuxGSM ${version}" - } - } - ] + ], + "footer": { + "icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg", + "text": "Sent by LinuxGSM ${version}" + } + } + ] } EOF ) From 7e937133f14d54ef72df76f4ee69483dfb748dd2 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 8 Mar 2025 21:46:33 +0000 Subject: [PATCH 07/38] fix(tf): change queryport to udp --- lgsm/modules/info_messages.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index fd6ebc447..4f1f00268 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -1658,7 +1658,7 @@ fn_info_messages_tf() { { fn_port "header" fn_port "Game" port udp - fn_port "Query" queryport tcp + fn_port "Query" queryport udp fn_port "Beacon" beaconport udp fn_port "Shutdown" shutdownport tcp } | column -s $'\t' -t From b133c444caf73405efa9c6f949c76d92774d6890 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 8 Mar 2025 21:49:47 +0000 Subject: [PATCH 08/38] fix(tf): update anticheat to UseEAC --- lgsm/config-default/config-lgsm/tfserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/tfserver/_default.cfg b/lgsm/config-default/config-lgsm/tfserver/_default.cfg index fbce96a44..53fde059d 100644 --- a/lgsm/config-default/config-lgsm/tfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tfserver/_default.cfg @@ -33,7 +33,7 @@ servertags="LinuxGSM" steamsocket="0" # Use Steam Socket. 0 = off; 1 = on. Use Steam Servers for network penetration. Enable this if you don't have a public IP but you want to allow players from outside your network to join your server. If disabled, only you and other players on your LAN can join. If you have a public IP, you do not need to enable this. ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="ProjectWar_Start?DedicatedServer?MaxPlayers=${maxplayers} -server -game -log -MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -BeaconPort=${beaconport} -ShutDownServicePort=${shutdownport} -ConfigServerName='${selfname}' -OutIPAddress=${publicip} -ServerTags='${servertags}' -UseSteamSocket=${steamsocket} -UserDir='${serverfiles}/${selfname}' -ServerName='${servername}' -EnableParallelCharacterMovementTickFunction -EnableParallelCharacterTickFunction -UseDynamicPhysicsScene -Game.PhysicsVehicle=false -ansimalloc -Game.MaxFrameRate=35 -MaxQueueSize=${maxqueuesize} -QueueValidTime=${queuevalidtime} -QueueThreshold=${maxplayers} -ServerFightModeType=${gamemode} -IsCanSelfDamage=${damageself} -IsCanFriendDamage=${damageallies} -SaveWorldInterval=${saveinterval} -GMOverlapRatio=2 -GreenHand=${greenhand} -SensitiveWords=${allowsensitivewords} -UseACE=${anticheat} -ServerAdminAccounts='${serveradmins}' -IsShowGmTitle=${adminlabel} -ServerPassword='${serverpassword}'" +startparameters="ProjectWar_Start?DedicatedServer?MaxPlayers=${maxplayers} -server -game -log -MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -BeaconPort=${beaconport} -ShutDownServicePort=${shutdownport} -ConfigServerName='${selfname}' -OutIPAddress=${publicip} -ServerTags='${servertags}' -UseSteamSocket=${steamsocket} -UserDir='${serverfiles}/${selfname}' -ServerName='${servername}' -EnableParallelCharacterMovementTickFunction -EnableParallelCharacterTickFunction -UseDynamicPhysicsScene -Game.PhysicsVehicle=false -ansimalloc -Game.MaxFrameRate=35 -MaxQueueSize=${maxqueuesize} -QueueValidTime=${queuevalidtime} -QueueThreshold=${maxplayers} -ServerFightModeType=${gamemode} -IsCanSelfDamage=${damageself} -IsCanFriendDamage=${damageallies} -SaveWorldInterval=${saveinterval} -GMOverlapRatio=2 -GreenHand=${greenhand} -SensitiveWords=${allowsensitivewords} -UseEAC=${anticheat} -ServerAdminAccounts='${serveradmins}' -IsShowGmTitle=${adminlabel} -ServerPassword='${serverpassword}'" #### LinuxGSM Settings #### From 916e9f5e91e27503bb053b456c8958a2448fe8f6 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 8 Mar 2025 21:54:56 +0000 Subject: [PATCH 09/38] fix: remove Precision Alignment from mods list --- lgsm/modules/mods_list.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/lgsm/modules/mods_list.sh b/lgsm/modules/mods_list.sh index d6622d1b2..f6f8301bd 100644 --- a/lgsm/modules/mods_list.sh +++ b/lgsm/modules/mods_list.sh @@ -189,7 +189,6 @@ mod_info_spinnertool=(MOD "spinnertool" "Spinner Tool" "https://github.com/dvdvi mod_info_surfacefrictiontool=(MOD "surfacefrictiontool" "Surface Friction Tool" "https://github.com/dvdvideo1234/surfacefrictiontool/archive/master.zip" "surfacefrictiontool-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/SurfaceFrictionTool" "Controls the surface friction of a prop") mod_info_magneticdipole=(MOD "magneticdipole" "Magnetic Dipole" "https://github.com/dvdvideo1234/magneticdipole/archive/master.zip" "magneticdipole-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/MagneticDipole" "Magnet entity that runs forces on its poles. Supports wire") mod_info_environmentorganizer=(MOD "environmentorganizer" "Environment Organizer" "https://github.com/dvdvideo1234/environmentorganizer/archive/master.zip" "environmentorganizer-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/EnvironmentOrganizer" "Installs routines designed for server settings adjustment") -mod_info_precision_alignment=(MOD "precision-alignment" "Precision Alignment" "https://github.com/Mista-Tea/precision-alignment/archive/master.zip" "precision-alignment-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/Mista-Tea/precision-alignment" "Creates precise constraints and aligments") mod_info_improved_stacker=(MOD "improved-stacker" "Improved Stacker" "https://github.com/Mista-Tea/improved-stacker/archive/master.zip" "improved-stacker-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/Mista-Tea/improved-stacker" "Stacks entities in the direction chosen") mod_info_improved_weight=(MOD "improved-weight" "Improved Weight" "https://github.com/Mista-Tea/improved-weight/archive/master.zip" "improved-weight-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/Mista-Tea/improved-weight" "Weight tool but with more features") mod_info_improved_antinoclip=(MOD "improved-antinoclip" "Improved Antinoclip" "https://github.com/Mista-Tea/improved-antinoclip/archive/master.zip" "improved-antinoclip-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/Mista-Tea/improved-antinoclip" "Controls clipping trough an object") From d56742bee857023cc8c11da86c4dc62a0da3c8b5 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 Mar 2025 16:42:10 +0000 Subject: [PATCH 10/38] fix(monitor): will now restart instead of update if restart requested --- lgsm/modules/command_monitor.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/modules/command_monitor.sh b/lgsm/modules/command_monitor.sh index 7feb05455..5fa3c3000 100644 --- a/lgsm/modules/command_monitor.sh +++ b/lgsm/modules/command_monitor.sh @@ -167,7 +167,7 @@ fn_monitor_check_update_source() { fn_script_log_info "Checking update: ${selfname} has requested an update and needs to be restarted" alert="update-request" alert.sh - command_update.sh + command_restart.sh core_exit.sh fi fi From f657ee74052336d59b66746bd2954714326b7dc2 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 Mar 2025 22:26:12 +0000 Subject: [PATCH 11/38] fix: dependencies not being removed if not required --- lgsm/modules/check_deps.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lgsm/modules/check_deps.sh b/lgsm/modules/check_deps.sh index dcc9c890c..8cbdf626c 100644 --- a/lgsm/modules/check_deps.sh +++ b/lgsm/modules/check_deps.sh @@ -251,12 +251,15 @@ fn_deps_detector() { if [ "${deptocheck}" == "libsdl2-2.0-0:i386" ] && [ -z "${appid}" ]; then array_deps_required=("${array_deps_required[@]/libsdl2-2.0-0:i386/}") steamcmdstatus=1 + return elif [ "${deptocheck}" == "steamcmd" ] && [ -z "${appid}" ]; then array_deps_required=("${array_deps_required[@]/steamcmd/}") steamcmdstatus=1 + return elif [ "${deptocheck}" == "steamcmd" ] && [ "${distroid}" == "debian" ] && ! grep -qE '[^deb]+non-free([^-]|$)' /etc/apt/sources.list; then array_deps_required=("${array_deps_required[@]/steamcmd/}") steamcmdstatus=1 + return # Java: Added for users using Oracle JRE to bypass check. elif [[ ${deptocheck} == "openjdk"* ]] || [[ ${deptocheck} == "java"* ]]; then # Is java already installed? From 71d551e29130c5923a505cc1f54fa32fe9bf5705 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 Mar 2025 22:50:41 +0000 Subject: [PATCH 12/38] fix(vints): update dependency requirement dotnet-runtime-7.0 --- lgsm/data/almalinux-8.csv | 2 +- lgsm/data/almalinux-9.csv | 2 +- lgsm/data/centos-7.csv | 2 +- lgsm/data/centos-8.csv | 2 +- lgsm/data/centos-9.csv | 2 +- lgsm/data/debian-10.csv | 2 +- lgsm/data/debian-11.csv | 2 +- lgsm/data/debian-12.csv | 2 +- lgsm/data/debian-13.csv | 2 +- lgsm/data/debian-9.csv | 2 +- lgsm/data/rhel-7.csv | 2 +- lgsm/data/rhel-8.csv | 2 +- lgsm/data/rhel-9.csv | 2 +- lgsm/data/rocky-8.csv | 2 +- lgsm/data/rocky-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-22.04.csv | 2 +- lgsm/data/ubuntu-23.04.csv | 2 +- lgsm/data/ubuntu-23.10.csv | 2 +- lgsm/data/ubuntu-24.04.csv | 2 +- lgsm/modules/check_deps.sh | 6 +++--- 23 files changed, 25 insertions(+), 25 deletions(-) diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index d4d2456bd..08d91f8fc 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -127,7 +127,7 @@ ut2k4 ut3 ut99 vh,glibc-devel,libatomic,pulseaudio-libs-devel -vints,aspnetcore-runtime-7.0 +vints,dotnet-runtime-7.0 vpmc,java-21-openjdk vs wet diff --git a/lgsm/data/almalinux-9.csv b/lgsm/data/almalinux-9.csv index 7dae6338e..a16722c2f 100644 --- a/lgsm/data/almalinux-9.csv +++ b/lgsm/data/almalinux-9.csv @@ -127,7 +127,7 @@ ut2k4 ut3 ut99 vh,glibc-devel,libatomic,pulseaudio-libs-devel -vints,aspnetcore-runtime-7.0 +vints,dotnet-runtime-7.0 vpmc,java-21-openjdk vs wet diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index 266b358ba..7b467fa00 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -127,7 +127,7 @@ ut2k4 ut3 ut99 vh,glibc-devel,libatomic,pulseaudio-libs-devel -vints,aspnetcore-runtime-7.0 +vints,dotnet-runtime-7.0 vpmc,java-11-openjdk vs wet diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index bd5b72c33..4b9fd2133 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -127,7 +127,7 @@ ut2k4 ut3 ut99 vh,glibc-devel,libatomic,pulseaudio-libs-devel -vints,aspnetcore-runtime-7.0 +vints,dotnet-runtime-7.0 vpmc,java-17-openjdk vs wet diff --git a/lgsm/data/centos-9.csv b/lgsm/data/centos-9.csv index 893f3698c..c6ff3a272 100644 --- a/lgsm/data/centos-9.csv +++ b/lgsm/data/centos-9.csv @@ -127,7 +127,7 @@ ut2k4 ut3 ut99 vh,glibc-devel,libatomic,pulseaudio-libs-devel -vints,aspnetcore-runtime-7.0 +vints,dotnet-runtime-7.0 vpmc,java-17-openjdk vs wet diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index bfbf4dac0..74d82e158 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -127,7 +127,7 @@ ut2k4 ut3 ut99 vh,libc6-dev,libatomic1,libpulse-dev -vints,aspnetcore-runtime-7.0 +vints,dotnet-runtime-7.0 vpmc,openjdk-11-jre vs wet diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index 61a20b15f..33b7deaf9 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -127,7 +127,7 @@ ut2k4 ut3 ut99 vh,libc6-dev,libatomic1,libpulse-dev -vints,aspnetcore-runtime-7.0 +vints,dotnet-runtime-7.0 vpmc,openjdk-11-jre vs wet diff --git a/lgsm/data/debian-12.csv b/lgsm/data/debian-12.csv index 5fa249e15..06fd9e52c 100644 --- a/lgsm/data/debian-12.csv +++ b/lgsm/data/debian-12.csv @@ -127,7 +127,7 @@ ut2k4 ut3 ut99 vh,libc6-dev,libatomic1,libpulse-dev -vints,aspnetcore-runtime-7.0 +vints,dotnet-runtime-7.0 vpmc,openjdk-17-jre vs wet diff --git a/lgsm/data/debian-13.csv b/lgsm/data/debian-13.csv index 4002eb0e9..7d775040e 100644 --- a/lgsm/data/debian-13.csv +++ b/lgsm/data/debian-13.csv @@ -127,7 +127,7 @@ ut2k4 ut3 ut99 vh,libc6-dev,libatomic1,libpulse-dev -vints,aspnetcore-runtime-7.0 +vints,dotnet-runtime-7.0 vpmc,openjdk-21-jre vs wet diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index d00f64969..02acceacd 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -127,7 +127,7 @@ ut2k4 ut3 ut99 vh,libc6-dev,libatomic1,libpulse-dev -vints,aspnetcore-runtime-7.0 +vints,dotnet-runtime-7.0 vpmc,openjdk-8-jre vs wet diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index 7800136bb..90c9df07e 100644 --- a/lgsm/data/rhel-7.csv +++ b/lgsm/data/rhel-7.csv @@ -127,7 +127,7 @@ ut2k4 ut3 ut99 vh,glibc-devel,libatomic,pulseaudio-libs-devel -vints,aspnetcore-runtime-7.0 +vints,dotnet-runtime-7.0 vpmc,java-11-openjdk vs wet diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index f8bb1d492..0298bd0b0 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -127,7 +127,7 @@ ut2k4 ut3 ut99 vh,glibc-devel,libatomic,pulseaudio-libs-devel -vints,aspnetcore-runtime-7.0 +vints,dotnet-runtime-7.0 vpmc,java-21-openjdk vs wet diff --git a/lgsm/data/rhel-9.csv b/lgsm/data/rhel-9.csv index 7dae6338e..a16722c2f 100644 --- a/lgsm/data/rhel-9.csv +++ b/lgsm/data/rhel-9.csv @@ -127,7 +127,7 @@ ut2k4 ut3 ut99 vh,glibc-devel,libatomic,pulseaudio-libs-devel -vints,aspnetcore-runtime-7.0 +vints,dotnet-runtime-7.0 vpmc,java-21-openjdk vs wet diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index f8bb1d492..0298bd0b0 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -127,7 +127,7 @@ ut2k4 ut3 ut99 vh,glibc-devel,libatomic,pulseaudio-libs-devel -vints,aspnetcore-runtime-7.0 +vints,dotnet-runtime-7.0 vpmc,java-21-openjdk vs wet diff --git a/lgsm/data/rocky-9.csv b/lgsm/data/rocky-9.csv index 7dae6338e..a16722c2f 100644 --- a/lgsm/data/rocky-9.csv +++ b/lgsm/data/rocky-9.csv @@ -127,7 +127,7 @@ ut2k4 ut3 ut99 vh,glibc-devel,libatomic,pulseaudio-libs-devel -vints,aspnetcore-runtime-7.0 +vints,dotnet-runtime-7.0 vpmc,java-21-openjdk vs wet diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index 1327946e5..436bdecb8 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -127,7 +127,7 @@ ut2k4 ut3 ut99 vh,libc6-dev,libatomic1,libpulse-dev -vints,aspnetcore-runtime-7.0 +vints,dotnet-runtime-7.0 vpmc,openjdk-8-jre vs wet diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index d693fba00..3b24ff37f 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -127,7 +127,7 @@ ut2k4 ut3 ut99 vh,libc6-dev,libatomic1,libpulse-dev -vints,aspnetcore-runtime-7.0 +vints,dotnet-runtime-7.0 vpmc,openjdk-11-jre vs wet diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index 193054da8..f19436d6a 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -127,7 +127,7 @@ ut2k4 ut3 ut99 vh,libc6-dev,libatomic1,libpulse-dev -vints,aspnetcore-runtime-7.0 +vints,dotnet-runtime-7.0 vpmc,openjdk-11-jre vs wet diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index 1b8849bba..f8a48ccce 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -127,7 +127,7 @@ ut2k4 ut3 ut99 vh,libc6-dev,libatomic1,libpulse-dev -vints,aspnetcore-runtime-7.0 +vints,dotnet-runtime-7.0 vpmc,openjdk-21-jre vs wet diff --git a/lgsm/data/ubuntu-23.04.csv b/lgsm/data/ubuntu-23.04.csv index 2ed8416a2..c14964d2d 100644 --- a/lgsm/data/ubuntu-23.04.csv +++ b/lgsm/data/ubuntu-23.04.csv @@ -127,7 +127,7 @@ ut2k4 ut3 ut99 vh,libc6-dev,libatomic1,libpulse-dev -vints,aspnetcore-runtime-7.0 +vints,dotnet-runtime-7.0 vpmc,openjdk-21-jre vs wet diff --git a/lgsm/data/ubuntu-23.10.csv b/lgsm/data/ubuntu-23.10.csv index 2ed8416a2..c14964d2d 100644 --- a/lgsm/data/ubuntu-23.10.csv +++ b/lgsm/data/ubuntu-23.10.csv @@ -127,7 +127,7 @@ ut2k4 ut3 ut99 vh,libc6-dev,libatomic1,libpulse-dev -vints,aspnetcore-runtime-7.0 +vints,dotnet-runtime-7.0 vpmc,openjdk-21-jre vs wet diff --git a/lgsm/data/ubuntu-24.04.csv b/lgsm/data/ubuntu-24.04.csv index dccd1f753..bd220a501 100644 --- a/lgsm/data/ubuntu-24.04.csv +++ b/lgsm/data/ubuntu-24.04.csv @@ -127,7 +127,7 @@ ut2k4 ut3 ut99 vh,libc6-dev,libatomic1,libpulse-dev -vints,aspnetcore-runtime-8.0 +vints,dotnet-runtime-7.0 vpmc,openjdk-21-jre vs wet diff --git a/lgsm/modules/check_deps.sh b/lgsm/modules/check_deps.sh index 8cbdf626c..7145eff0a 100644 --- a/lgsm/modules/check_deps.sh +++ b/lgsm/modules/check_deps.sh @@ -9,8 +9,8 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_install_dotnet_repo() { if [ "${distroid}" == "ubuntu" ]; then - # if package aspnetcore-runtime-7.0 is unavailable in ubuntu repos, add the microsoft repo. - if ! apt-cache show aspnetcore-runtime-7.0 > /dev/null 2>&1; then + # if package dotnet-runtime-7.0 is unavailable in ubuntu repos, add the microsoft repo. + if ! apt-cache show dotnet-runtime-7.0 > /dev/null 2>&1; then fn_fetch_file "https://packages.microsoft.com/config/ubuntu/${distroversion}/packages-microsoft-prod.deb" "" "" "" "/tmp" "packages-microsoft-prod.deb" "" "" "" "" sudo dpkg -i /tmp/packages-microsoft-prod.deb fi @@ -282,7 +282,7 @@ fn_deps_detector() { monoinstalled=false fi # .NET Core: A .NET Core repo needs to be installed. - elif [ "${deptocheck}" == "aspnetcore-runtime-7.0" ]; then + elif [ "${deptocheck}" == "dotnet-runtime-7.0" ]; then # .NET is not installed. if [ -n "${dotnetversion}" ]; then depstatus=0 From 1719101444e18adff331e5343308d695ff3dcc65 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 Mar 2025 23:07:38 +0000 Subject: [PATCH 13/38] fix: install microsoft repo dotnet-7.0 not available in standard repos --- lgsm/modules/check_deps.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/modules/check_deps.sh b/lgsm/modules/check_deps.sh index 7145eff0a..5667876e5 100644 --- a/lgsm/modules/check_deps.sh +++ b/lgsm/modules/check_deps.sh @@ -284,7 +284,7 @@ fn_deps_detector() { # .NET Core: A .NET Core repo needs to be installed. elif [ "${deptocheck}" == "dotnet-runtime-7.0" ]; then # .NET is not installed. - if [ -n "${dotnetversion}" ]; then + if dotnet --list-runtimes | grep -q "Microsoft.NETCore.App 7.0"; then depstatus=0 dotnetinstalled=true else From d56a95ad9ba03e5cf462f1dd5530997c1c1cb1c9 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 Mar 2025 23:20:35 +0000 Subject: [PATCH 14/38] fix(vints): roll back to Ubuntu 22.04 docker --- lgsm/data/serverlist.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 68f25de70..3b8121a26 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -126,7 +126,7 @@ ut2k4,ut2k4server,Unreal Tournament 2004,ubuntu-24.04 ut3,ut3server,Unreal Tournament 3,ubuntu-24.04 ut99,ut99server,Unreal Tournament 99,ubuntu-24.04 vh,vhserver,Valheim,ubuntu-24.04 -vints,vintsserver,Vintage Story,ubuntu-24.04 +vints,vintsserver,Vintage Story,ubuntu-22.04 vpmc,vpmcserver,Velocity Proxy MC,ubuntu-24.04 vs,vsserver,Vampire Slayer,ubuntu-24.04 wet,wetserver,Wolfenstein: Enemy Territory,ubuntu-24.04 From d0e8127fcf48647bfb6331e2cbccc2ba8b43270e Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 10 Mar 2025 09:44:14 +0000 Subject: [PATCH 15/38] feat(eco): add usertoken parameter --- lgsm/config-default/config-lgsm/ecoserver/_default.cfg | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg index c08f37072..0c18318e9 100644 --- a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg @@ -8,8 +8,11 @@ #### Game Server Settings #### +## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters +usertoken="" + ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-nogui" +startparameters="-nogui -userToken=${usertoken}" #### LinuxGSM Settings #### From c87f48f5ec3df0eea5a40fa62c4938707a87b19d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 10 Mar 2025 10:06:25 +0000 Subject: [PATCH 16/38] fix(jc2): update query name to jc2m --- lgsm/config-default/config-lgsm/jc2server/_default.cfg | 2 +- lgsm/modules/query_gsquery.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lgsm/config-default/config-lgsm/jc2server/_default.cfg b/lgsm/config-default/config-lgsm/jc2server/_default.cfg index 21932e205..5a82bbad9 100644 --- a/lgsm/config-default/config-lgsm/jc2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc2server/_default.cfg @@ -134,7 +134,7 @@ stopmode="2" # 4: gsquery # 5: tcp querymode="2" -querytype="jc2mp" +querytype="jc2m" ## Console type consoleverbose="yes" diff --git a/lgsm/modules/query_gsquery.py b/lgsm/modules/query_gsquery.py index 245a606e1..4dbde90dd 100644 --- a/lgsm/modules/query_gsquery.py +++ b/lgsm/modules/query_gsquery.py @@ -11,7 +11,7 @@ import socket import sys engine_types = ('protocol-valve', 'protocol-quake2', 'protocol-quake3', 'protocol-gamespy1', - 'protocol-unreal2', 'ut3', 'minecraft', 'minecraftbe', 'jc2mp', 'mumbleping', 'soldat', 'teeworlds') + 'protocol-unreal2', 'ut3', 'minecraft', 'minecraftbe', 'jc2m', 'mumbleping', 'soldat', 'teeworlds') class gsquery: @@ -23,7 +23,7 @@ class gsquery: idtech3query = ('protocol-quake3', 'iw3.0', 'ioquake3', 'qfusion') minecraftquery = ('minecraft', 'lwjgl2') minecraftbequery = ('minecraftbe') - jc2mpquery = ('jc2mp') + jc2mquery = ('jc2m') mumblequery = ('mumbleping') soldatquery = ('soldat') twquery = ('teeworlds') @@ -40,7 +40,7 @@ class gsquery: self.query_prompt_string = b'\xff\xff\xff\xffstatus\x00' elif self.argument.engine in self.idtech3query: self.query_prompt_string = b'\xff\xff\xff\xffgetstatus' - elif self.argument.engine in self.jc2mpquery: + elif self.argument.engine in self.jc2mquery: self.query_prompt_string = b'\xFE\xFD\x09\x10\x20\x30\x40' elif self.argument.engine in self.minecraftquery: self.query_prompt_string = b'\xFE\xFD\x09\x3d\x54\x1f\x93' From 3cd3009adf2fb35c01a9ba567115008cab30bb9e Mon Sep 17 00:00:00 2001 From: Justus557 <59891919+FeneralGeldmarschall@users.noreply.github.com> Date: Sun, 15 Jun 2025 22:53:17 +0200 Subject: [PATCH 17/38] fix(backup): add -h flag to backup tar command so it follows symlinks (#4780) --- lgsm/modules/command_backup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/modules/command_backup.sh b/lgsm/modules/command_backup.sh index f427e8b00..2c8f4bcda 100644 --- a/lgsm/modules/command_backup.sh +++ b/lgsm/modules/command_backup.sh @@ -126,7 +126,7 @@ fn_backup_compression() { core_exit.sh fi - tar --use-compress-program=pigz -cf "${backupdir}/${backupname}.tar.gz" -C "${rootdir}" --exclude "${excludedir}" --exclude "${lockdir}" --exclude "${tmpdir}" ./. + tar --use-compress-program=pigz -hcf "${backupdir}/${backupname}.tar.gz" -C "${rootdir}" --exclude "${excludedir}" --exclude "${lockdir}" --exclude "${tmpdir}" ./. exitcode=$? if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol From 63d0f8159927c88d91124ccb03f6c0efabffe337 Mon Sep 17 00:00:00 2001 From: FlaminSarge Date: Sun, 15 Jun 2025 13:54:23 -0700 Subject: [PATCH 18/38] docs(tf2/hl2dm): Add note about unrestricted_maxplayers param (#4783) --- lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg | 2 ++ lgsm/config-default/config-lgsm/tf2server/_default.cfg | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg index c429a6c8e..7ce4dd073 100644 --- a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg @@ -9,6 +9,8 @@ #### Game Server Settings #### ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters +# Note that for HL2DM, maxplayers > 33 must be specified like so: +# maxplayers="101 -unrestricted_maxplayers" ip="0.0.0.0" port="27015" clientport="27005" diff --git a/lgsm/config-default/config-lgsm/tf2server/_default.cfg b/lgsm/config-default/config-lgsm/tf2server/_default.cfg index 600249013..74fd359ab 100644 --- a/lgsm/config-default/config-lgsm/tf2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/tf2server/_default.cfg @@ -9,6 +9,8 @@ #### Game Server Settings #### ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters +# Note that for TF2, maxplayers > 33 must be specified like so: +# maxplayers="101 -unrestricted_maxplayers" ip="0.0.0.0" port="27015" clientport="27005" From 783db0a175f70bbcf39785eb7e5852fd5c36938b Mon Sep 17 00:00:00 2001 From: Stephan Schaffner Date: Sun, 15 Jun 2025 23:19:07 +0200 Subject: [PATCH 19/38] fix(alert): resolve more info missing from discord alert (#4771) * Fixing missing more Info * minor bug --------- Co-authored-by: Hornochs Co-authored-by: Daniel Gibbs --- lgsm/modules/alert_discord.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lgsm/modules/alert_discord.sh b/lgsm/modules/alert_discord.sh index 1ed3da441..1440b6a96 100644 --- a/lgsm/modules/alert_discord.sh +++ b/lgsm/modules/alert_discord.sh @@ -46,6 +46,11 @@ json=$( "name": "Server Time", "value": "$(date)", "inline": true + }, + { + "name": "More info", + "value": "${alerturl}", + "inline": true } EOF ) @@ -63,7 +68,7 @@ EOF ) fi -if [ -n "{alerturl}" ]; then +if [ -n "${alerturl}" ]; then json+=$( cat << EOF , From dffed7b29897044b7121f503a3e08ce15ee2e524 Mon Sep 17 00:00:00 2001 From: Awesomerly Date: Sun, 15 Jun 2025 17:20:19 -0400 Subject: [PATCH 20/38] feat(mods): update sourcemod to 1.12 (#4767) --- lgsm/modules/mods_list.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/modules/mods_list.sh b/lgsm/modules/mods_list.sh index f6f8301bd..89412e65d 100644 --- a/lgsm/modules/mods_list.sh +++ b/lgsm/modules/mods_list.sh @@ -61,7 +61,7 @@ metamodsourcelatestfile=$(wget "${metamodsourcescrapeurl}" -q -O -) metamodsourcedownloadurl="https://www.metamodsource.net/latest.php?os=linux&version=${metamodsourceversion}" metamodsourceurl="${metamodsourcedownloadurl}" # Sourcemod -sourcemodversion="1.11" +sourcemodversion="1.12" sourcemodscrapeurl="https://sm.alliedmods.net/smdrop/${sourcemodversion}/sourcemod-latest-linux" sourcemodlatestfile=$(wget "${sourcemodscrapeurl}" -q -O -) sourcemoddownloadurl="https://www.sourcemod.net/latest.php?os=linux&version=${sourcemodversion}" From 6847401b0406b7eb7691ee0476bd1a60b588e649 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 19 Jun 2025 20:20:36 +0100 Subject: [PATCH 21/38] chore: pre-load details in workflow --- .github/workflows/details-check.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/details-check.yml b/.github/workflows/details-check.yml index 748a77991..f52d12c5a 100644 --- a/.github/workflows/details-check.yml +++ b/.github/workflows/details-check.yml @@ -68,6 +68,10 @@ jobs: else curl -f -o config "https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/main/${{ matrix.shortname }}/${{ steps.sets-servercfgname.outputs.servercfgname }}" fi + + - name: Pre-load LinuxGSM + run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server details + - name: Display config run: | if [ "${{ steps.sets-servercfgname.outputs.servercfgname }}" == "" ]; then From 35db6a891829e0def1a576bb12455341604feb1c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 19 Jun 2025 22:07:24 +0100 Subject: [PATCH 22/38] chore: changed workflow to fail-fast false --- .github/workflows/update-check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-check.yml b/.github/workflows/update-check.yml index 932e3ea2a..2f2f7babc 100644 --- a/.github/workflows/update-check.yml +++ b/.github/workflows/update-check.yml @@ -13,12 +13,12 @@ concurrency: jobs: update-check: if: github.repository_owner == 'GameServerManagers' - continue-on-error: true runs-on: ubuntu-latest strategy: + fail-fast: false matrix: - shortname: [css, fctr, jk2, mc, mcb, mta, pmc, ts3, ut99, vints] + shortname: [css, fctr, jk2, mc, mcb, mta, pmc, ts3, ut99, vints, xnt] steps: - name: Download linuxgsm.sh From 1c91b9b36c0d11abaf66e03d55c072d53096a42c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 19 Jun 2025 22:23:05 +0100 Subject: [PATCH 23/38] fix:(xnt): add missing code to check-update --- lgsm/modules/command_check_update.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lgsm/modules/command_check_update.sh b/lgsm/modules/command_check_update.sh index ee4c8ccb3..38f8b4ddc 100644 --- a/lgsm/modules/command_check_update.sh +++ b/lgsm/modules/command_check_update.sh @@ -32,6 +32,8 @@ elif [ "${shortname}" == "vints" ]; then update_vints.sh elif [ "${shortname}" == "ut99" ]; then update_ut99.sh +elif [ "${shortname}" == "xnt" ]; then + update_xnt.sh else update_steamcmd.sh fi From 3622b288c84495ca8beead27274ece034ac15218 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 19 Jun 2025 23:19:38 +0100 Subject: [PATCH 24/38] fix(xnt): version command not completing carriage return --- lgsm/modules/update_xnt.sh | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/lgsm/modules/update_xnt.sh b/lgsm/modules/update_xnt.sh index f043a4227..c00233aa7 100644 --- a/lgsm/modules/update_xnt.sh +++ b/lgsm/modules/update_xnt.sh @@ -1,9 +1,9 @@ #!/bin/bash -# LinuxGSM command_ut99.sh module +# LinuxGSM command_xnt.sh module # Author: Daniel Gibbs # Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Handles updating of Unreal Tournament 99 servers. +# Description: Handles updating of Xontic servers. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" @@ -17,10 +17,21 @@ fn_update_dl() { fn_update_localbuild() { # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" - + check_status.sh # Send version command to Xonotic server. - tmux -L "${socketname}" send-keys -t "${sessionname}" "version\r" > /dev/null 2>&1 - fn_sleep_time_1 + if [ "${status}" != "0" ]; then + tmux -L "${socketname}" send-keys -t "${sessionname}" "version" C-m > /dev/null 2>&1 + fn_sleep_time_1 + else + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + fn_sleep_time_5 + tmux -L "${socketname}" send-keys -t "${sessionname}" "version" C-m > /dev/null 2>&1 + command_stop.sh + fn_firstcommand_reset + fi # Uses log file to get local build. localbuild=$(grep "SVQC version: xonotic-v" "${consolelogdir}"/* 2> /dev/null | tail -1 | sed 's/.*SVQC version: \(xonotic-v[0-9.]*\).*/\1/' | tr -d '\000-\011\013-\037') From 61d4866b3413b3f0627b1939a7de6892276fb40c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 20 Jun 2025 00:23:45 +0100 Subject: [PATCH 25/38] fix: remove redundant fetch of default config for multiple game types --- lgsm/modules/install_config.sh | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index db6b1e5cf..3d6fe5374 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -289,7 +289,6 @@ elif [ "${shortname}" == "bt" ]; then elif [ "${shortname}" == "btl" ]; then fn_check_cfgdir array_configs+=(Game.ini) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations @@ -370,7 +369,6 @@ elif [ "${shortname}" == "cs" ]; then fn_list_config_locations elif [ "${shortname}" == "cs2" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations @@ -483,7 +481,6 @@ elif [ "${shortname}" == "hldms" ]; then fn_list_config_locations elif [ "${shortname}" == "ohd" ]; then array_configs+=(Admins.cfg Engine.ini Game.ini MapCycle.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations @@ -585,7 +582,6 @@ elif [ "${shortname}" == "pvkii" ]; then fn_list_config_locations elif [ "${shortname}" == "pw" ]; then array_configs+=(PalWorldSettings.ini) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations @@ -614,13 +610,11 @@ elif [ "${shortname}" == "q2" ]; then fn_list_config_locations elif [ "${shortname}" == "q3" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "q4" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations @@ -784,7 +778,6 @@ elif [ "${shortname}" == "wmc" ]; then fn_list_config_locations elif [ "${shortname}" == "xnt" ]; then array_configs+=(server.cfg) - fn_fetch_default_config fn_default_config_remote fn_set_config_vars fn_list_config_locations From 9eabf2e2f99d02db97d2a1309064c107a8f44850 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 20 Jun 2025 00:32:05 +0100 Subject: [PATCH 26/38] fix(xnt): add call to fix_xnt.sh for configuration setup --- lgsm/modules/install_config.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index 3d6fe5374..b73e7b4b2 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -777,6 +777,7 @@ elif [ "${shortname}" == "wmc" ]; then fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "xnt" ]; then + fix_xnt.sh array_configs+=(server.cfg) fn_default_config_remote fn_set_config_vars From 8f01d1bd9504db645d3107e5c3b9683b1d617cde Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 21 Jun 2025 19:19:11 +0100 Subject: [PATCH 27/38] fix(check): update allowed commands to include RESTART in various checks (#4278) --- lgsm/modules/check.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lgsm/modules/check.sh b/lgsm/modules/check.sh index 59ac2a329..3922aec21 100644 --- a/lgsm/modules/check.sh +++ b/lgsm/modules/check.sh @@ -31,7 +31,7 @@ if [ "${commandname}" != "INSTALL" ] && [ "${commandname}" != "UPDATE-LGSM" ] && check_system_dir.sh fi -allowed_commands_array=(START DEBUG) +allowed_commands_array=(DEBUG RESTART START) for allowed_command in "${allowed_commands_array[@]}"; do if [ "${allowed_command}" == "${commandname}" ]; then check_executable.sh @@ -39,7 +39,7 @@ for allowed_command in "${allowed_commands_array[@]}"; do done if [ "$(whoami)" != "root" ]; then - allowed_commands_array=(DEBUG START INSTALL) + allowed_commands_array=(DEBUG RESTART START INSTALL) for allowed_command in "${allowed_commands_array[@]}"; do if [ "${allowed_command}" == "${commandname}" ]; then check_glibc.sh @@ -54,21 +54,21 @@ for allowed_command in "${allowed_commands_array[@]}"; do fi done -allowed_commands_array=(BACKUP DEBUG DETAILS START UPDATE) +allowed_commands_array=(BACKUP DEBUG DETAILS RESTART START UPDATE) for allowed_command in "${allowed_commands_array[@]}"; do if [ "${allowed_command}" == "${commandname}" ]; then check_deps.sh fi done -allowed_commands_array=(CONSOLE DEBUG MONITOR START STOP) +allowed_commands_array=(CONSOLE DEBUG MONITOR RESTART START STOP) for allowed_command in "${allowed_commands_array[@]}"; do if [ "${allowed_command}" == "${commandname}" ]; then check_config.sh fi done -allowed_commands_array=(DEBUG DETAILS DEV-QUERY-RAW MONITOR POST_DETAILS START STOP POST-DETAILS) +allowed_commands_array=(DEBUG DETAILS DEV-QUERY-RAW MONITOR POST_DETAILS RESTART START STOP POST-DETAILS) for allowed_command in "${allowed_commands_array[@]}"; do if [ "${allowed_command}" == "${commandname}" ]; then if [ -z "${installflag}" ]; then @@ -77,7 +77,7 @@ for allowed_command in "${allowed_commands_array[@]}"; do fi done -allowed_commands_array=(DEBUG START UPDATE VALIDATE CHECK-UPDATE) +allowed_commands_array=(DEBUG RESTART START UPDATE VALIDATE CHECK-UPDATE) for allowed_command in "${allowed_commands_array[@]}"; do if [ "${allowed_command}" == "${commandname}" ]; then if [ "${appid}" ]; then @@ -86,21 +86,21 @@ for allowed_command in "${allowed_commands_array[@]}"; do fi done -allowed_commands_array=(CHANGE-PASSWORD DETAILS MONITOR START STOP UPDATE VALIDATE POST-DETAILS) +allowed_commands_array=(CHANGE-PASSWORD DETAILS MONITOR RESTART START STOP UPDATE VALIDATE POST-DETAILS) for allowed_command in "${allowed_commands_array[@]}"; do if [ "${allowed_command}" == "${commandname}" ]; then check_status.sh fi done -allowed_commands_array=(DEBUG START INSTALL) +allowed_commands_array=(DEBUG RESTART START INSTALL) for allowed_command in "${allowed_commands_array[@]}"; do if [ "${allowed_command}" == "${commandname}" ]; then check_system_requirements.sh fi done -allowed_commands_array=(DETAILS MONITOR START STOP UPDATE VALIDATE POST-DETAILS) +allowed_commands_array=(DETAILS MONITOR RESTART START STOP UPDATE VALIDATE POST-DETAILS) for allowed_command in "${allowed_commands_array[@]}"; do if [ "${allowed_command}" == "${commandname}" ]; then check_gamedig.sh From 62710410ed687d069607b51fd0ee67fd0b2027cf Mon Sep 17 00:00:00 2001 From: Steve Axtmann Date: Sat, 21 Jun 2025 22:53:09 +0200 Subject: [PATCH 28/38] feat(fastdl): add goldsrc support for the fastdl command (#4472) * feat(hldmserver): add support for the fastdl command * fix(mods): set exit code to 0 when user cancels mod installation/removal * fix(fastdl): update bzip2 support check and adjust FastDL command conditions --------- Co-authored-by: Daniel Gibbs --- lgsm/modules/command_fastdl.sh | 35 ++++++++++++++-------------- lgsm/modules/command_mods_install.sh | 1 + lgsm/modules/command_mods_remove.sh | 1 + lgsm/modules/core_getopt.sh | 2 +- 4 files changed, 21 insertions(+), 18 deletions(-) diff --git a/lgsm/modules/command_fastdl.sh b/lgsm/modules/command_fastdl.sh index e3437bc1f..3b8165444 100644 --- a/lgsm/modules/command_fastdl.sh +++ b/lgsm/modules/command_fastdl.sh @@ -21,13 +21,6 @@ luasvautorundir="${systemdir}/lua/autorun/server" luafastdlfile="lgsm_cl_force_fastdl.lua" luafastdlfullpath="${luasvautorundir}/${luafastdlfile}" -# Check if bzip2 is installed. -if [ ! "$(command -v bzip2 2> /dev/null)" ]; then - fn_print_fail "bzip2 is not installed" - fn_script_log_fail "bzip2 is not installed" - core_exit.sh -fi - # Header fn_print_header fn_print_nl "More info: ${italic}https://docs.linuxgsm.com/commands/fastdl" @@ -112,13 +105,13 @@ fn_fastdl_dirs() { # Using this gist https://gist.github.com/agunnerson-ibm/efca449565a3e7356906 fn_human_readable_file_size() { local abbrevs=( - $((1 << 60)):ZB - $((1 << 50)):EB - $((1 << 40)):TB - $((1 << 30)):GB - $((1 << 20)):MB - $((1 << 10)):KB - $((1)):bytes + "1152921504606846976:ZB" + "1125899906842624:EB" + "1099511627776:TB" + "1073741824:GB" + "1048576:MB" + "1024:KB" + "1:bytes" ) local bytes="${1}" @@ -225,11 +218,17 @@ fn_fastdl_preview() { fn_script_log_fail "Generating file list." core_exit.sh fi - fn_print_nl "about to compress ${totalfiles} files, total size $(fn_human_readable_file_size "${filesizetotal}" 0)" + + if [ "${engine}" == "source" ]; then + echo -e "about to compress ${totalfiles} files, total size $(fn_human_readable_file_size "${filesizetotal}" 0)" + elif [ "${engine}" == "goldsrc" ]; then + echo -e "about to copy ${totalfiles} files, total size $(fn_human_readable_file_size "${filesizetotal}" 0)" + fi + fn_script_log_info "${totalfiles} files, total size $(fn_human_readable_file_size "${filesizetotal}" 0)" rm -f "${tmpdir:?}/fastdl_files_to_compress.txt" if ! fn_prompt_yn "Continue?" Y; then - fn_script_log "User exited" + exitcode=0 core_exit.sh fi } @@ -431,7 +430,9 @@ fn_fastdl_preview fn_clear_old_fastdl fn_fastdl_dirs fn_fastdl_build -fn_fastdl_bzip2 +if [ "${engine}" == "source" ]; then + fn_fastdl_bzip2 +fi # Finished message. fn_print_nl "Fastdl files are located in:" fn_print_nl "${fastdldir}" diff --git a/lgsm/modules/command_mods_install.sh b/lgsm/modules/command_mods_install.sh index 4401e2c56..e76f3f1fa 100644 --- a/lgsm/modules/command_mods_install.sh +++ b/lgsm/modules/command_mods_install.sh @@ -88,6 +88,7 @@ if [ -f "${modsinstalledlistfullpath}" ]; then fn_script_log_warn "${modprettyname} is already installed" echo -e " * Any configs may be overwritten." if ! fn_prompt_yn "Continue?" Y; then + exitcode=0 core_exit.sh fi fn_script_log_info "User selected to continue" diff --git a/lgsm/modules/command_mods_remove.sh b/lgsm/modules/command_mods_remove.sh index 6dc52d95f..589046b11 100644 --- a/lgsm/modules/command_mods_remove.sh +++ b/lgsm/modules/command_mods_remove.sh @@ -47,6 +47,7 @@ done fn_print_warning_nl "You are about to remove ${cyan}${usermodselect}${default}." echo -e " * Any custom files/configuration will be removed." if ! fn_prompt_yn "Continue?" Y; then + exitcode=0 core_exit.sh fi diff --git a/lgsm/modules/core_getopt.sh b/lgsm/modules/core_getopt.sh index 9a5704663..8997ff3a0 100644 --- a/lgsm/modules/core_getopt.sh +++ b/lgsm/modules/core_getopt.sh @@ -96,7 +96,7 @@ fi ## Game server exclusive commands. # FastDL command. -if [ "${engine}" == "source" ]; then +if [ "${engine}" == "source" ] || [ "${engine}" == "goldsrc" ]; then currentopt+=("${cmd_fastdl[@]}") fi From c90c8fefb6ee25cf29c31987712e9fe4229cb344 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 21 Jun 2025 23:52:55 +0100 Subject: [PATCH 29/38] fix(send): will no longer ask to start the server #4621 --- lgsm/modules/command_send.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lgsm/modules/command_send.sh b/lgsm/modules/command_send.sh index de021599d..20ef188e3 100644 --- a/lgsm/modules/command_send.sh +++ b/lgsm/modules/command_send.sh @@ -30,12 +30,8 @@ if [ "${status}" != "0" ]; then tmux -L "${socketname}" send-keys -t "${sessionname}" "${commandtosend}" ENTER fn_script_log_pass "Command \"${commandtosend}\" sent to console" else - fn_print_error_nl "Server not running" - fn_script_log_error "Failed to access: Server not running" - if fn_prompt_yn "Do you want to start the server?" Y; then - exitbypass=1 - command_start.sh - fi + fn_print_error_nl "Unable to send command to console. Server not running" + fn_script_log_error "Unable to send command to console. Server not running" fi core_exit.sh From 2fd56ebeca3adb616f9562305d1836ae90f7c9ca Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 22 Jun 2025 02:06:01 +0100 Subject: [PATCH 30/38] fix(core_exit): correct log file path for dev-debug module order --- lgsm/modules/core_exit.sh | 4 ++-- linuxgsm.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/modules/core_exit.sh b/lgsm/modules/core_exit.sh index 5f55dfcd1..1dd6e2f46 100644 --- a/lgsm/modules/core_exit.sh +++ b/lgsm/modules/core_exit.sh @@ -13,8 +13,8 @@ fn_exit_dev_debug() { echo -e "${moduleselfname} exiting with code: ${exitcode}" if [ -f "${rootdir}/dev-debug.log" ]; then grep -a "modulefile=" "${rootdir}/dev-debug.log" | sed 's/modulefile=//g' > "${rootdir}/dev-debug-module-order.log" - elif [ -f "${lgsmlogdir}/dev-debug.log" ]; then - grep -a "modulefile=" "${lgsmlogdir}/dev-debug.log" | sed 's/modulefile=//g' > "${rootdir}/dev-debug-module-order.log" + elif [ -f "${logdir}/dev-debug.log" ]; then + grep -a "modulefile=" "${logdir}/dev-debug.log" | sed 's/modulefile=//g' > "${logdir}/dev-debug-module-order.log" fi fi } diff --git a/linuxgsm.sh b/linuxgsm.sh index 6d6f7251f..f6cfe03cf 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -32,7 +32,7 @@ rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") lgsmdir="${rootdir}/lgsm" [ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" -lgsmlogdir="${logdir}/lgsm" +lgsmlogdir="${logdir}/script" steamcmddir="${HOME}/.steam/steamcmd" [ -n "${LGSM_SERVERFILES}" ] && serverfiles="${LGSM_SERVERFILES}" || serverfiles="${rootdir}/serverfiles" modulesdir="${lgsmdir}/modules" From 04f1654db2d98ec0c8f94d2abb72447a43d117fa Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 22 Jun 2025 02:34:50 +0100 Subject: [PATCH 31/38] fix(logging): define log file path for script logging --- linuxgsm.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/linuxgsm.sh b/linuxgsm.sh index f6cfe03cf..2be308d9c 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -33,6 +33,7 @@ selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") lgsmdir="${rootdir}/lgsm" [ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" lgsmlogdir="${logdir}/script" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" steamcmddir="${HOME}/.steam/steamcmd" [ -n "${LGSM_SERVERFILES}" ] && serverfiles="${LGSM_SERVERFILES}" || serverfiles="${rootdir}/serverfiles" modulesdir="${lgsmdir}/modules" From e4c712d411348cdec88e98f7f0d8bb185c3328a0 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 27 Jun 2025 09:57:29 +0100 Subject: [PATCH 32/38] feat(backup): add support for multiple compression methods in backup (#4795) * feat(backup): add support for multiple compression methods in backup process * fix(backup): update backup file extensions to support multiple compression formats --- lgsm/modules/command_backup.sh | 60 ++++++++++++++++++++++++---------- lgsm/modules/info_distro.sh | 6 ++-- 2 files changed, 45 insertions(+), 21 deletions(-) diff --git a/lgsm/modules/command_backup.sh b/lgsm/modules/command_backup.sh index 2c8f4bcda..aeedcbb36 100644 --- a/lgsm/modules/command_backup.sh +++ b/lgsm/modules/command_backup.sh @@ -13,13 +13,13 @@ fn_firstcommand_set # Trap to remove lockfile on quit. fn_backup_trap() { echo -e "" - echo -en "backup ${backupname}.tar.gz..." + echo -en "backup ${backupname}.${compressext}..." fn_print_canceled_eol_nl - fn_script_log_info "Backup ${backupname}.tar.gz: CANCELED" - rm -f "${backupdir:?}/${backupname}.tar.gz" | tee -a "${lgsmlog}" - echo -en "backup ${backupname}.tar.gz..." + fn_script_log_info "Backup ${backupname}.${compressext}: CANCELED" + rm -f "${backupdir:?}/${backupname}.${compressext}" | tee -a "${lgsmlog}" + echo -en "backup ${backupname}.${compressext}..." fn_print_removed_eol_nl - fn_script_log_info "Backup ${backupname}.tar.gz: REMOVED" + fn_script_log_info "Backup ${backupname}.${compressext}: REMOVED" # Remove backup lockfile. rm -f "${lockdir:?}/backup.lock" fn_backup_start_server @@ -110,23 +110,47 @@ fn_backup_create_lockfile() { trap fn_backup_trap INT } +fn_select_compression() { + if command -v zstd > /dev/null 2>&1; then + compressprog="zstd" + compressext="tar.zst" + compressflag="--zstd" + elif command -v pigz > /dev/null 2>&1; then + compressprog="pigz" + compressext="tar.gz" + compressflag="--use-compress-program=pigz" + elif command -v gzip > /dev/null 2>&1; then + compressprog="gzip" + compressext="tar.gz" + compressflag="--gzip" + else + compressprog="" + compressext="tar" + compressflag="" + fi +} + # Compressing files. fn_backup_compression() { - # Tells how much will be compressed using rootdirduexbackup value from info_distro and prompt for continue. + fn_print_info "A total of ${rootdirduexbackup} will be compressed." - fn_script_log_info "A total of ${rootdirduexbackup} will be compressed: ${backupdir}/${backupname}.tar.gz" - fn_print_dots "Backup (${rootdirduexbackup}) ${backupname}.tar.gz, in progress ..." - fn_script_log_info "Backup ${rootdirduexbackup} ${backupname}.tar.gz, in progress" + fn_script_log_info "A total of ${rootdirduexbackup} will be compressed: ${backupdir}/${backupname}.${compressext}" + fn_print_dots "Backup (${rootdirduexbackup}) ${backupname}.${compressext}, in progress ..." + fn_script_log_info "Backup ${rootdirduexbackup} ${backupname}.${compressext}, in progress" excludedir=$(fn_backup_relpath) - # Check that excludedir is a valid path. if [ ! -d "${excludedir}" ]; then fn_print_fail_nl "Problem identifying the previous backup directory for exclusion." fn_script_log_fail "Problem identifying the previous backup directory for exclusion" core_exit.sh fi - tar --use-compress-program=pigz -hcf "${backupdir}/${backupname}.tar.gz" -C "${rootdir}" --exclude "${excludedir}" --exclude "${lockdir}" --exclude "${tmpdir}" ./. + if [ -n "${compressflag}" ]; then + tar ${compressflag} -hcf "${backupdir}/${backupname}.${compressext}" -C "${rootdir}" --exclude "${excludedir}" --exclude "${lockdir}" --exclude "${tmpdir}" ./. + else + tar -hcf "${backupdir}/${backupname}.${compressext}" -C "${rootdir}" --exclude "${excludedir}" --exclude "${lockdir}" --exclude "${tmpdir}" ./. + fi + exitcode=$? if [ "${exitcode}" -ne 0 ]; then fn_print_fail_eol @@ -136,8 +160,8 @@ fn_backup_compression() { fn_script_log_fail "Starting backup" else fn_print_ok_eol - fn_print_ok_nl "Completed: ${italic}${backupname}.tar.gz${default}, total size $(du -sh "${backupdir}/${backupname}.tar.gz" | awk '{print $1}')" - fn_script_log_pass "Backup created: ${backupname}.tar.gz, total size $(du -sh "${backupdir}/${backupname}.tar.gz" | awk '{print $1}')" + fn_print_ok "Completed: ${italic}${backupname}.${compressext}${default}, total size $(du -sh "${backupdir}/${backupname}.${compressext}" | awk '{print $1}')" + fn_script_log_pass "Backup created: ${backupname}.${compressext}, total size $(du -sh "${backupdir}/${backupname}.${compressext}" | awk '{print $1}')" alert="backup" alert.sh fi @@ -152,7 +176,7 @@ fn_backup_prune() { # How many backups exceed maxbackups. backupquotadiff=$((backupcount - maxbackups)) # How many backups exceed maxbackupdays. - backupsoudatedcount=$(find "${backupdir}"/ -type f -name "*.tar.gz" -mtime +"${maxbackupdays}" | wc -l) + backupsoudatedcount=$(find "${backupdir}"/ -type f -name "*.tar.*" -mtime +"${maxbackupdays}" | wc -l) # If anything can be cleared. if [ "${backupquotadiff}" -gt "0" ] || [ "${backupsoudatedcount}" -gt "0" ]; then fn_print_dots "Pruning" @@ -167,7 +191,7 @@ fn_backup_prune() { fn_print_dots "Pruning: Clearing ${backupquotadiff} backup(s)" fn_script_log_info "Pruning: Clearing ${backupquotadiff} backup(s)" # Clear backups over quota. - find "${backupdir}"/ -type f -name "*.tar.gz" -printf '%T@ %p\n' | sort -rn | tail -${backupquotadiff} | cut -f2- -d" " | xargs rm + find "${backupdir}"/ -type f -name "*.tar.*" -printf '%T@ %p\n' | sort -rn | tail -${backupquotadiff} | cut -f2- -d" " | xargs rm fn_print_ok_nl "Pruning: Clearing ${backupquotadiff} backup(s)" fn_script_log_pass "Pruning: Cleared ${backupquotadiff} backup(s)" # If maxbackupdays is used over maxbackups. @@ -190,7 +214,7 @@ fn_backup_prune() { fn_backup_relpath() { # Written by CedarLUG as a "realpath --relative-to" alternative in bash. # Populate an array of tokens initialized from the rootdir components. - declare -a rdirtoks=($(readlink -f "${rootdir}" | sed "s/\// /g")) + mapfile -t rdirtoks < <(readlink -f "${rootdir}" | sed "s/\//\n/g") if [ ${#rdirtoks[@]} -eq 0 ]; then fn_print_fail_nl "Problem assessing rootdir during relative path assessment" fn_script_log_fail "Problem assessing rootdir during relative path assessment: ${rootdir}" @@ -198,7 +222,7 @@ fn_backup_relpath() { fi # Populate an array of tokens initialized from the backupdir components. - declare -a bdirtoks=($(readlink -f "${backupdir}" | sed "s/\// /g")) + mapfile -t bdirtoks < <(readlink -f "${backupdir}" | sed "s/\//\n/g") if [ ${#bdirtoks[@]} -eq 0 ]; then fn_print_fail_nl "Problem assessing backupdir during relative path assessment" fn_script_log_fail "Problem assessing backupdir during relative path assessment: ${rootdir}" @@ -243,7 +267,7 @@ fn_backup_start_server() { fn_print_dots "" check.sh core_logs.sh - +fn_select_compression fn_backup_check_lockfile fn_backup_init fn_backup_stop_server diff --git a/lgsm/modules/info_distro.sh b/lgsm/modules/info_distro.sh index 67a9fd5df..a986edf1f 100644 --- a/lgsm/modules/info_distro.sh +++ b/lgsm/modules/info_distro.sh @@ -252,11 +252,11 @@ if [ -d "${backupdir}" ]; then backupcount=0 # If there are backups in backup dir. - if [ "$(find "${backupdir}" -name "*.tar.gz" | wc -l)" -ne "0" ]; then + if [ "$(find "${backupdir}" -name "*.tar.*" | wc -l)" -ne "0" ]; then # number of backups. - backupcount="$(find "${backupdir}"/*.tar.gz | wc -l)" # integer + backupcount="$(find "${backupdir}"/*.tar.* | wc -l)" # integer # most recent backup. - lastbackup="$(ls -1t "${backupdir}"/*.tar.gz | head -1)" # string + lastbackup="$(ls -1t "${backupdir}"/*.tar.* | head -1)" # string # date of most recent backup. lastbackupdate="$(date -r "${lastbackup}")" # string # no of days since last backup. From d472d662219dac1702273aae8fa96b7ecfac066b Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 27 Jun 2025 10:06:42 +0100 Subject: [PATCH 33/38] fix(backup): reorder backup functions to ensure lockfile creation occurs before initialisation --- lgsm/modules/command_backup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/modules/command_backup.sh b/lgsm/modules/command_backup.sh index aeedcbb36..5892a81eb 100644 --- a/lgsm/modules/command_backup.sh +++ b/lgsm/modules/command_backup.sh @@ -269,10 +269,10 @@ check.sh core_logs.sh fn_select_compression fn_backup_check_lockfile +fn_backup_create_lockfile fn_backup_init fn_backup_stop_server fn_backup_dir -fn_backup_create_lockfile fn_backup_compression fn_backup_prune fn_backup_start_server From fc4b2f33fe7fe1733fe44050f8962e99d29a9ddd Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 27 Jun 2025 11:29:06 +0100 Subject: [PATCH 34/38] fix(mods_list): update Metamod:Source and Sourcemod versions to latest releases --- lgsm/modules/mods_list.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/mods_list.sh b/lgsm/modules/mods_list.sh index 89412e65d..bbefc5ea2 100644 --- a/lgsm/modules/mods_list.sh +++ b/lgsm/modules/mods_list.sh @@ -55,13 +55,13 @@ amxxtslatestfile="amxmodx-${amxxtsversion}-${amxxtsmod}-linux.tar.gz" amxxtsdownloadurl="https://www.amxmodx.org/release/${amxxtslatestfile}" amxxtsurl="${amxxtsdownloadurl}" # Metamod:Source -metamodsourceversion="1.11" +metamodsourceversion="1.12" metamodsourcescrapeurl="https://mms.alliedmods.net/mmsdrop/${metamodsourceversion}/mmsource-latest-linux" metamodsourcelatestfile=$(wget "${metamodsourcescrapeurl}" -q -O -) metamodsourcedownloadurl="https://www.metamodsource.net/latest.php?os=linux&version=${metamodsourceversion}" metamodsourceurl="${metamodsourcedownloadurl}" # Sourcemod -sourcemodversion="1.12" +sourcemodversion="1.13" sourcemodscrapeurl="https://sm.alliedmods.net/smdrop/${sourcemodversion}/sourcemod-latest-linux" sourcemodlatestfile=$(wget "${sourcemodscrapeurl}" -q -O -) sourcemoddownloadurl="https://www.sourcemod.net/latest.php?os=linux&version=${sourcemodversion}" From de27a6acc44c5f08dc763d0fc107031c0f9fc6de Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 25 Jul 2025 14:03:58 +0000 Subject: [PATCH 35/38] feat(devcontainer): add initial devcontainer configuration for Ubuntu environment --- .devcontainer/devcontainer.json | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..b6287a9df --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,21 @@ +{ + "name": "Ubuntu", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", + "features": { + "ghcr.io/devcontainers-extra/features/prettier:1": {}, + "ghcr.io/devcontainers-extra/features/shellcheck:1": {} + }, + "customizations": { + "vscode": { + "extensions": [ + "editorconfig.editorconfig", + "esbenp.prettier-vscode", + "ms-python.python", + "redhat.vscode-yaml", + "timonwong.shellcheck", + "yzhang.markdown-all-in-one" + ] + } + }, + "postCreateCommand": "npm install --save-dev prettier-plugin-sh" +} From 7cc48be50114b85671cdb86a1eb9328f51fb6c12 Mon Sep 17 00:00:00 2001 From: magistratus-de Date: Sat, 9 Aug 2025 00:15:35 +0200 Subject: [PATCH 36/38] fix: correct if statement (#4801) correction of a minor error Co-authored-by: Daniel Gibbs --- lgsm/modules/alert_email.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/modules/alert_email.sh b/lgsm/modules/alert_email.sh index aa13494d1..81c01e25b 100644 --- a/lgsm/modules/alert_email.sh +++ b/lgsm/modules/alert_email.sh @@ -15,7 +15,7 @@ else mail -s "${alerttitle}" "${email}" < "${alertlog}" fi exitcode=$? -if [ "${exitcode}" -ne 0 ]; then +if [ "${exitcode}" -eq 0 ]; then fn_print_ok_nl "Sending Email alert: ${email}" fn_script_log_pass "Sending Email alert: ${email}" else From 471485117c7dcb5178920af57350cd1efb3c17a5 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 9 Aug 2025 01:36:24 +0100 Subject: [PATCH 37/38] feat(unreal): consolidate map compression scripts (#4805) * fix(compress_unreal2_maps): streamline file removal and compression process * lint * feat(unreal): consolidate map compression scripts * Removed `compress_ut99_maps.sh` and integrated its functionality into `compress_unreal_maps.sh`. * Updated `core_getopt.sh` to reference the new unified compression script. * Cleaned up `core_modules.sh` by removing the obsolete function for `compress_ut99_maps.sh`. * Added `core_exit.sh` call to `install_ut2k4_key.sh` for consistent exit handling. * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix(compress_unreal_maps): correct array usage in file compression loop * Updated the loop to iterate over the `exts` array correctly using `"${exts[@]}"` instead of `${exts}`. * This change ensures proper handling of file extensions during the compression process. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .shellcheckrc | 1 + lgsm/modules/compress_unreal2_maps.sh | 35 ------------ lgsm/modules/compress_unreal_maps.sh | 80 +++++++++++++++++++++++++++ lgsm/modules/compress_ut99_maps.sh | 35 ------------ lgsm/modules/core_getopt.sh | 9 ++- lgsm/modules/core_modules.sh | 5 -- lgsm/modules/install_ut2k4_key.sh | 1 + 7 files changed, 86 insertions(+), 80 deletions(-) create mode 100644 .shellcheckrc delete mode 100644 lgsm/modules/compress_unreal2_maps.sh create mode 100644 lgsm/modules/compress_unreal_maps.sh delete mode 100644 lgsm/modules/compress_ut99_maps.sh diff --git a/.shellcheckrc b/.shellcheckrc new file mode 100644 index 000000000..026ee646c --- /dev/null +++ b/.shellcheckrc @@ -0,0 +1 @@ +disable=SC2154 diff --git a/lgsm/modules/compress_unreal2_maps.sh b/lgsm/modules/compress_unreal2_maps.sh deleted file mode 100644 index 58824cbc7..000000000 --- a/lgsm/modules/compress_unreal2_maps.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -# LinuxGSM compress_unreal2_maps.sh module -# Author: Daniel Gibbs -# Contributors: https://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Compresses unreal maps. - -commandname="MAP-COMPRESSOR" -commandaction="Compressing Maps" -moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_firstcommand_set - -check.sh -fn_print_header -echo -e "Will compress all maps in:" -echo -e "" -pwd -echo -e "" -echo -e "Compressed maps saved to:" -echo -e "" -echo -e "${compressedmapsdir}" -echo -e "" -if ! fn_prompt_yn "Start compression?" Y; then - exitcode=0 - core_exit.sh -fi -mkdir -pv "${compressedmapsdir}" > /dev/null 2>&1 -rm -rfv "${serverfiles:?}/Maps/"*.ut2.uz2 -cd "${systemdir}" || exit -for map in "${serverfiles}/Maps/"*; do - ./ucc-bin compress "${map}" --nohomedir -done -mv -fv "${serverfiles}/Maps/"*.ut2.uz2 "${compressedmapsdir}" - -core_exit.sh diff --git a/lgsm/modules/compress_unreal_maps.sh b/lgsm/modules/compress_unreal_maps.sh new file mode 100644 index 000000000..6b97e03d9 --- /dev/null +++ b/lgsm/modules/compress_unreal_maps.sh @@ -0,0 +1,80 @@ +#!/bin/bash +# LinuxGSM compress_unreal_maps.sh module +# Author: Daniel Gibbs +# Contributors: https://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Compresses unreal and unreal2 resources. + +commandname="MAP-COMPRESSOR" +commandaction="Compressing Maps" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +check.sh +fn_print_header +echo -e "Will compress all maps in:" +echo -e "" +pwd +echo -e "" +echo -e "Compressed maps saved to:" +echo -e "" +echo -e "${compressedmapsdir}" +echo -e "" +totalseconds=3 +for seconds in {3..1}; do + fn_print_warn "map compression starting in: ${totalseconds}" + totalseconds=$((totalseconds - 1)) + fn_sleep_time_1 + if [ "${seconds}" == "0" ]; then + break + fi +done +fn_print_nl +mkdir -pv "${compressedmapsdir}" > /dev/null 2>&1 + +# List of extensions to compress +exts=(ut2 kfm rom u ucl upl int utx uax ukx usx unr umx umod uzx) + +# Remove old compressed files using find +for ext in "${exts[@]}"; do + mapfile -t oldfiles < <(find "${serverfiles}" -name "*.${ext}.uz2" -type f) + if [ ${#oldfiles[@]} -gt 0 ]; then + echo -e "found ${#oldfiles[@]} old compressed file(s) to remove for extension: ${ext}" + fi + for file in "${oldfiles[@]}"; do + if rm -f "$file"; then + echo -en "removing file [ ${italic}$(basename "$file")${default} ]\c" + fn_print_ok_eol_nl + else + echo -en "removing file [ ${italic}$(basename "$file")${default} ]\c" + fn_print_fail_eol_nl + fi + done +done + +cd "${systemdir}" || exit + +# Find and compress files, then move .uz2 to compressedmapsdir +for ext in "${exts[@]}"; do + # Collect all files with the current extension into an array + mapfile -t files < <(find "${serverfiles}" -name "*.${ext}" -type f) + for file in "${files[@]}"; do + echo -en "compressing file [ ${italic}$(basename "$file") -> $(basename "$file").uz2${default} ]\c" + if ! ./ucc-bin compress "${file}" --nohomedir > /dev/null 2>&1; then + fn_print_fail_eol_nl + core_exit.sh + else + fn_print_ok_eol_nl + fi + + if ! mv -f "${file}.uz2" "${compressedmapsdir}" > /dev/null 2>&1; then + echo -en "moving compressed file [ ${italic}$(basename "$file").uz2 -> ${compressedmapsdir}/$(basename "$file").uz2${default} ]\c" + fn_print_fail_eol_nl + core_exit.sh + fi + done +done + +fn_print_ok_nl "Compression complete: All compressed files moved to: ${compressedmapsdir}" + +core_exit.sh diff --git a/lgsm/modules/compress_ut99_maps.sh b/lgsm/modules/compress_ut99_maps.sh deleted file mode 100644 index 885c32d9a..000000000 --- a/lgsm/modules/compress_ut99_maps.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -# LinuxGSM compress_ut99_maps.sh module -# Author: Daniel Gibbs -# Contributors: https://linuxgsm.com/contrib -# Website: https://linuxgsm.com -# Description: Compresses unreal maps. - -commandname="MAP-COMPRESSOR" -commandaction="Compressing Maps" -moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_firstcommand_set - -check.sh -fn_print_header -echo -e "Will compress all maps in:" -echo -e "" -pwd -echo -e "" -echo -e "Compressed maps saved to:" -echo -e "" -echo -e "${compressedmapsdir}" -echo -e "" -if ! fn_prompt_yn "Start compression?" Y; then - exitcode=0 - core_exit.sh -fi -mkdir -pv "${compressedmapsdir}" > /dev/null 2>&1 -rm -rfv "${serverfiles:?}/Maps/"*.unr.uz -cd "${systemdir}" || exit -for map in "${serverfiles}/Maps/"*; do - ./ucc-bin compress "${map}" --nohomedir -done -mv -fv "${serverfiles}/Maps/"*.unr.uz "${compressedmapsdir}" - -core_exit.sh diff --git a/lgsm/modules/core_getopt.sh b/lgsm/modules/core_getopt.sh index 8997ff3a0..295f9900b 100644 --- a/lgsm/modules/core_getopt.sh +++ b/lgsm/modules/core_getopt.sh @@ -42,8 +42,7 @@ cmd_change_password=("pw;change-password" "command_ts3_server_pass.sh" "Change T cmd_install_default_resources=("ir;install-default-resources" "command_install_resources_mta.sh" "Install the MTA default resources.") cmd_fullwipe=("fw;full-wipe;wa;wipeall" "serverwipe=1; command_wipe.sh" "Reset the map and remove blueprint data.") cmd_mapwipe=("mw;map-wipe;w;wipe;wi" "mapwipe=1; command_wipe.sh" "Reset the map and keep blueprint data.") -cmd_map_compressor_u99=("mc;map-compressor" "compress_ut99_maps.sh" "Compresses all ${gamename} server maps.") -cmd_map_compressor_u2=("mc;map-compressor" "compress_unreal2_maps.sh" "Compresses all ${gamename} server maps.") +cmd_map_compressor_unreal=("mc;map-compressor" "compress_unreal_maps.sh" "Compresses all ${gamename} server maps.") cmd_install_cdkey=("cd;server-cd-key" "install_ut2k4_key.sh" "Add your server cd key.") cmd_install_dst_token=("ct;cluster-token" "install_dst_token.sh" "Configure cluster token.") cmd_install_squad_license=("li;license" "install_squad_license.sh" "Add your Squad server license.") @@ -113,13 +112,13 @@ fi # Unreal exclusive. if [ "${engine}" == "unreal2" ]; then if [ "${shortname}" == "ut2k4" ]; then - currentopt+=("${cmd_install_cdkey[@]}" "${cmd_map_compressor_u2[@]}") + currentopt+=("${cmd_install_cdkey[@]}" "${cmd_map_compressor_unreal[@]}") else - currentopt+=("${cmd_map_compressor_u2[@]}") + currentopt+=("${cmd_map_compressor_unreal[@]}") fi fi if [ "${engine}" == "unreal" ]; then - currentopt+=("${cmd_map_compressor_u99[@]}") + currentopt+=("${cmd_map_compressor_unreal[@]}") fi # DST exclusive. diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index e5e6d1e5d..2116e5366 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -275,11 +275,6 @@ compress_unreal2_maps.sh() { fn_fetch_module } -compress_ut99_maps.sh() { - modulefile="${FUNCNAME[0]}" - fn_fetch_module -} - # Mods mods_list.sh() { diff --git a/lgsm/modules/install_ut2k4_key.sh b/lgsm/modules/install_ut2k4_key.sh index 2829da8d6..963a52f10 100644 --- a/lgsm/modules/install_ut2k4_key.sh +++ b/lgsm/modules/install_ut2k4_key.sh @@ -27,3 +27,4 @@ else echo -e "./${selfname} server-cd-key" fi echo -e "" +core_exit.sh From e2397f126b2e40a96991af86bfecf74542e4fa69 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 9 Aug 2025 01:40:09 +0100 Subject: [PATCH 38/38] feat(devcontainer): update devcontainer configuration for improved tooling * Changed container name to "BASH Dev Container" * Added additional features: `actionlint`, `checkov`, `markdownlint-cli`, and `github-cli` * Updated VSCode extensions for enhanced development experience a --- .devcontainer/devcontainer.json | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index b6287a9df..339a0a150 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,21 +1,29 @@ { - "name": "Ubuntu", + "name": "BASH Dev Container", "image": "mcr.microsoft.com/devcontainers/base:ubuntu", "features": { - "ghcr.io/devcontainers-extra/features/prettier:1": {}, - "ghcr.io/devcontainers-extra/features/shellcheck:1": {} + "ghcr.io/devcontainers-community/npm-features/prettier:1": { + "plugins": "prettier-plugin-sh" + }, + "ghcr.io/devcontainers-extra/features/actionlint:1": {}, + "ghcr.io/devcontainers-extra/features/checkov:1": {}, + "ghcr.io/devcontainers-extra/features/markdownlint-cli:1": {}, + "ghcr.io/devcontainers-extra/features/shellcheck:1": {}, + "ghcr.io/devcontainers-extra/features/yamllint:2": {}, + "ghcr.io/devcontainers/features/github-cli:1": {} }, "customizations": { "vscode": { "extensions": [ - "editorconfig.editorconfig", - "esbenp.prettier-vscode", - "ms-python.python", + "DavidAnson.vscode-markdownlint", + "github.vscode-github-actions", + "GitHub.vscode-pull-request-github", + "hashicorp.terraform", + "ms-azuretools.vscode-azureterraform", "redhat.vscode-yaml", "timonwong.shellcheck", "yzhang.markdown-all-in-one" ] } - }, - "postCreateCommand": "npm install --save-dev prettier-plugin-sh" + } }