From 0b7aa627c51ea56e39bab8518af4024c50caa009 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Apr 2026 20:49:03 +0100 Subject: [PATCH 01/15] feat(tf2c): add Team Fortress 2 Classified server (#4898) --- .../config-lgsm/tf2cserver/_default.cfg | 197 ++++++++++++++++++ lgsm/data/serverlist.csv | 1 + lgsm/modules/core_dl.sh | 26 +++ lgsm/modules/install_config.sh | 5 + 4 files changed, 229 insertions(+) create mode 100644 lgsm/config-default/config-lgsm/tf2cserver/_default.cfg diff --git a/lgsm/config-default/config-lgsm/tf2cserver/_default.cfg b/lgsm/config-default/config-lgsm/tf2cserver/_default.cfg new file mode 100644 index 000000000..baa8c4328 --- /dev/null +++ b/lgsm/config-default/config-lgsm/tf2cserver/_default.cfg @@ -0,0 +1,197 @@ +################################## +######## 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 +# Note that for TF2, maxplayers > 33 must be specified like so: +# maxplayers="101 -unrestricted_maxplayers" +ip="0.0.0.0" +port="27015" +clientport="27005" +sourcetvport="27020" +defaultmap="4koth_frigid" +maxplayers="16" + +## Game Server Login Token (GSLT): Optional +# GSLT can be used for running a public server. +# More info: https://docs.linuxgsm.com/steamcmd/gslt +gslt="" + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="-game tf2classified -tf_path ${supportdir} -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +sv_setsteamaccount ${gslt} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" + +#### 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" + +# Alert on Start/Stop/Restart +statusalert="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" + +# 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" + +# 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 all". +telegramapi="api.telegram.org" +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" +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 +baseappid="232250" +appid="3557020" +steamcmdforcewindows="no" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +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="3" + +## 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="yes" + +## Game Server Details +# Do not edit +gamename="Team Fortress 2 Classified" +engine="source" +glibc="2.15" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}/tf2classified" +supportdir="${serverfiles}/tf2" +executabledir="${serverfiles}" +executable="./srcds.sh" +servercfgdir="${systemdir}/cfg" +servercfg="${selfname}.cfg" +servercfgdefault="server.cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || 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" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 49d7b1d10..2f964a30d 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -114,6 +114,7 @@ sven,svenserver,Sven Co-op,ubuntu-24.04 terraria,terrariaserver,Terraria,ubuntu-24.04 tf,tfserver,The Front,ubuntu-24.04 tf2,tf2server,Team Fortress 2,ubuntu-24.04 +tf2c,tf2cserver,Team Fortress 2 Classified,ubuntu-24.04 tfc,tfcserver,Team Fortress Classic,ubuntu-24.04 ti,tiserver,The Isle,ubuntu-24.04 ts,tsserver,The Specialists,ubuntu-24.04 diff --git a/lgsm/modules/core_dl.sh b/lgsm/modules/core_dl.sh index 1c27c58d7..dcbd88e9b 100755 --- a/lgsm/modules/core_dl.sh +++ b/lgsm/modules/core_dl.sh @@ -81,6 +81,19 @@ fn_dl_steamcmd() { fi # Force Windows Platform type. elif [ "${steamcmdforcewindows}" == "yes" ]; then + # If a base app is required, install it first. + if [ -n "${baseappid}" ]; then + if [ -z "${supportdir}" ]; then + fn_print_failure_nl "${commandaction} ${selfname}: baseappid is set but supportdir is not defined" + fn_script_log_fail "${commandaction} ${selfname}: baseappid is set but supportdir is not defined" + core_exit.sh + fi + "${unbuffercommand[@]}" "${steamcmdcommandarray[@]}" +@sSteamCmdForcePlatformType windows +force_install_dir "${supportdir}" +login "${steamuser}" "${steampass}" +app_update "${baseappid}" "${validateparam[@]}" +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" + exitcode="${PIPESTATUS[0]}" + if [ "${exitcode}" -ne 0 ]; then + continue + fi + fi if [ -n "${branch}" ] && [ -n "${betapassword}" ]; then "${unbuffercommand[@]}" "${steamcmdcommandarray[@]}" +@sSteamCmdForcePlatformType windows +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" "${validateparam[@]}" +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" elif [ -n "${branch}" ]; then @@ -90,6 +103,19 @@ fn_dl_steamcmd() { fi # All other servers. else + # If a base app is required, install it first. + if [ -n "${baseappid}" ]; then + if [ -z "${supportdir}" ]; then + fn_print_failure_nl "${commandaction} ${selfname}: baseappid is set but supportdir is not defined" + fn_script_log_fail "${commandaction} ${selfname}: baseappid is set but supportdir is not defined" + core_exit.sh + fi + "${unbuffercommand[@]}" "${steamcmdcommandarray[@]}" +force_install_dir "${supportdir}" +login "${steamuser}" "${steampass}" +app_update "${baseappid}" "${validateparam[@]}" +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" + exitcode="${PIPESTATUS[0]}" + if [ "${exitcode}" -ne 0 ]; then + continue + fi + fi if [ -n "${branch}" ] && [ -n "${betapassword}" ]; then "${unbuffercommand[@]}" "${steamcmdcommandarray[@]}" +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" "${validateparam[@]}" +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" elif [ -n "${branch}" ]; then diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index ddfc13794..4b8148ce9 100755 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -724,6 +724,11 @@ elif [ "${shortname}" == "tf2" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations +elif [ "${shortname}" == "tf2c" ]; then + array_configs+=(server.cfg) + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "tfc" ]; then array_configs+=(server.cfg) fn_default_config_remote From 7e472ba9accefa06267211b23b7e1fa13a38c02a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Apr 2026 19:54:24 +0000 Subject: [PATCH 02/15] Release v26.1.0 --- 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 7c717d0ad..10d408449 100755 --- 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.2.0" +modulesversion="v26.1.0" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index 443e1d8bf..f664749e6 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -24,7 +24,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v25.2.0" +version="v26.1.0" shortname="core" gameservername="core" commandname="CORE" From a7186b8f7f44b3448b18ce5d3adf54c29f9258fe Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Apr 2026 20:12:16 +0000 Subject: [PATCH 03/15] fix(alert_slack): add missing closing brace on section object The 'section' block containing 'fields' and 'accessory' was missing its closing '}' before EOF, producing malformed JSON and breaking all Slack alerts silently (jq -c . would fail on the payload). Also add missing ntfy alert settings to tf2cserver _default.cfg for consistency with other server configs. --- .../config-default/config-lgsm/tf2cserver/_default.cfg | 10 ++++++++++ lgsm/modules/alert_slack.sh | 1 + 2 files changed, 11 insertions(+) diff --git a/lgsm/config-default/config-lgsm/tf2cserver/_default.cfg b/lgsm/config-default/config-lgsm/tf2cserver/_default.cfg index baa8c4328..fdbcc2cba 100644 --- a/lgsm/config-default/config-lgsm/tf2cserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tf2cserver/_default.cfg @@ -65,6 +65,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/modules/alert_slack.sh b/lgsm/modules/alert_slack.sh index defb1f77f..0cd7106ff 100755 --- a/lgsm/modules/alert_slack.sh +++ b/lgsm/modules/alert_slack.sh @@ -60,6 +60,7 @@ json=$( "image_url": "${alerticon}", "alt_text": "LinuxGSM game icon" } + } EOF ) From d04d5b6dfdcc34d844fc92b5bc1ab9c3b4f1de46 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Apr 2026 20:16:40 +0000 Subject: [PATCH 04/15] fix: address review feedback - core_dl.sh: use array assignment for steamcmdcommand instead of read -r -a to avoid word-splitting on paths - fix_st.sh: correct module header typo (fix_ts.sh -> fix_st.sh) - command_skeleton.sh: fix grammar 'Creates an copy' -> 'Creates a copy' - serverlist-validate-game-icons.sh: anchor grep to start-of-line and require trailing comma to prevent false positives (e.g. 'tf' matching 'tf2' entries) - cs2server/_default.cfg: remove duplicate ntfy alert settings block --- .github/workflows/serverlist-validate-game-icons.sh | 2 +- lgsm/config-default/config-lgsm/cs2server/_default.cfg | 10 ---------- lgsm/modules/command_skeleton.sh | 2 +- lgsm/modules/core_dl.sh | 6 +++--- lgsm/modules/fix_st.sh | 2 +- 5 files changed, 6 insertions(+), 16 deletions(-) diff --git a/.github/workflows/serverlist-validate-game-icons.sh b/.github/workflows/serverlist-validate-game-icons.sh index b3ba7e418..8d35aa906 100755 --- a/.github/workflows/serverlist-validate-game-icons.sh +++ b/.github/workflows/serverlist-validate-game-icons.sh @@ -22,7 +22,7 @@ shopt -s nullglob for gameiconpath in gameicons/*; do gameicon="$(basename "${gameiconpath}")" # check if $gameicon is in serverlist.csv - if ! grep -q -F "${gameicon%-icon.png}" serverlist.csv; then + if ! grep -q -E "^${gameicon%-icon.png}," serverlist.csv; then echo "ERROR: gameicon ${gameicon} is not in serverlist.csv" exitcode=1 else diff --git a/lgsm/config-default/config-lgsm/cs2server/_default.cfg b/lgsm/config-default/config-lgsm/cs2server/_default.cfg index 56948c77f..8d65b5364 100644 --- a/lgsm/config-default/config-lgsm/cs2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cs2server/_default.cfg @@ -72,16 +72,6 @@ ntfypassword="" ntfypriority="" ntfytags="" -# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy -ntfyalert="off" -ntfytopic="LinuxGSM" -ntfyserver="https://ntfy.sh" -ntfytoken="" -ntfyusername="" -ntfypassword="" -ntfypriority="" -ntfytags="" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/modules/command_skeleton.sh b/lgsm/modules/command_skeleton.sh index 687790a37..3e07edc3a 100755 --- a/lgsm/modules/command_skeleton.sh +++ b/lgsm/modules/command_skeleton.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Creates an copy of a game servers directories. +# Description: Creates a copy of a game server directories. commandname="SKELETON" commandaction="Skeleton" diff --git a/lgsm/modules/core_dl.sh b/lgsm/modules/core_dl.sh index dcbd88e9b..4730c0cff 100755 --- a/lgsm/modules/core_dl.sh +++ b/lgsm/modules/core_dl.sh @@ -46,9 +46,9 @@ fn_dl_steamcmd() { validate="validate" fi - # steamcmdcommand can contain multiple arguments; treat it as an argv array. - steamcmdcommandarray=() - read -r -a steamcmdcommandarray <<< "${steamcmdcommand}" + # Wrap steamcmdcommand as a single-element array to avoid word-splitting + # on paths/commands that should not be tokenised. + steamcmdcommandarray=("${steamcmdcommand}") unbuffercommand=() if [ -n "${unbuffer}" ]; then unbuffercommand=("${unbuffer}") diff --git a/lgsm/modules/fix_st.sh b/lgsm/modules/fix_st.sh index 598d971b0..887ea987f 100755 --- a/lgsm/modules/fix_st.sh +++ b/lgsm/modules/fix_st.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LinuxGSM fix_ts.sh module +# LinuxGSM fix_st.sh module # Author: Daniel Gibbs # Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com From 329660d8b97b75c18ba579b925161ae5978ebb80 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Apr 2026 20:51:10 +0000 Subject: [PATCH 05/15] fix(vints): assign remotebuild instead of unused remotebuildversion The API version lookup was setting remotebuildversion but all subsequent jq queries used ${remotebuild}, which was never populated. This caused 'Unable to get remote build' on every install/update. --- lgsm/modules/update_vints.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/modules/update_vints.sh b/lgsm/modules/update_vints.sh index 86a7156ee..5bf3df25d 100755 --- a/lgsm/modules/update_vints.sh +++ b/lgsm/modules/update_vints.sh @@ -39,11 +39,11 @@ fn_update_remotebuild() { apiurl="http://api.vintagestory.at/stable-unstable.json" remotebuildresponse=$(curl -s "${apiurl}") if [ "${branch}" == "stable" ]; then - remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '[ to_entries[] ] | .[].key' | grep -Ev "\-rc|\-pre" | sort -r -V | head -1) + remotebuild=$(echo "${remotebuildresponse}" | jq -r '[ to_entries[] ] | .[].key' | grep -Ev "\-rc|\-pre" | sort -r -V | head -1) elif [ "${branch}" == "unstable" ]; then - remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '[ to_entries[] ] | .[].key' | grep -E "\-rc|\-pre" | sort -r -V | head -1) + remotebuild=$(echo "${remotebuildresponse}" | jq -r '[ to_entries[] ] | .[].key' | grep -E "\-rc|\-pre" | sort -r -V | head -1) else - remotebuildversion="${branch}" + remotebuild="${branch}" fi remotebuildfilename=$(echo "${remotebuildresponse}" | jq --arg remotebuild "${remotebuild}" -r '.[$remotebuild].linuxserver.filename') remotebuildurl=$(echo "${remotebuildresponse}" | jq --arg remotebuild "${remotebuild}" -r '.[$remotebuild].linuxserver.urls.cdn') From a14433c2f0f62c593bccab58e4668eb114eb0423 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Apr 2026 21:01:35 +0000 Subject: [PATCH 06/15] fix(xnt): unset exitbypass after command_stop.sh in fn_update_localbuild --- lgsm/modules/update_xnt.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lgsm/modules/update_xnt.sh b/lgsm/modules/update_xnt.sh index 501f91c8d..904b7b1a4 100755 --- a/lgsm/modules/update_xnt.sh +++ b/lgsm/modules/update_xnt.sh @@ -29,7 +29,9 @@ fn_update_localbuild() { exitbypass=1 fn_sleep_time_5 tmux -L "${socketname}" send-keys -t "${sessionname}" "version" C-m > /dev/null 2>&1 + exitbypass=1 command_stop.sh + unset exitbypass fn_firstcommand_reset fi From db4253f002209b9cb1b489ea38a2de93f4553071 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Apr 2026 21:06:52 +0000 Subject: [PATCH 07/15] fix(ci): resolve super-linter failures - Set DEFAULT_BRANCH to current branch to fix 'master not found' error - Use fetch-depth: 0 so GITHUB_BEFORE_SHA can be resolved - Set update_etl.sh executable bit (BASH_EXEC) - Fix .codespellrc tab indentation (EDITORCONFIG) - Add .gitleaks.toml allowlist for GA4 Measurement Protocol API secret (GITLEAKS) - Fix .markdown-lint.yml: disable MD030/MD013/MD033/MD041/MD051 to match existing repo style (MARKDOWN) --- .github/linters/.codespellrc | 10 +++++----- .github/linters/.gitleaks.toml | 9 +++++++++ .github/linters/.markdown-lint.yml | 11 ++++------- .github/workflows/action-super-linter.yml | 6 +++--- lgsm/modules/update_etl.sh | 0 5 files changed, 21 insertions(+), 15 deletions(-) create mode 100644 .github/linters/.gitleaks.toml mode change 100644 => 100755 lgsm/modules/update_etl.sh diff --git a/.github/linters/.codespellrc b/.github/linters/.codespellrc index 229066881..47dd5ccea 100644 --- a/.github/linters/.codespellrc +++ b/.github/linters/.codespellrc @@ -1,11 +1,11 @@ [codespell] # Skip data tables that contain many short server identifiers (e.g. "fof", "nd") skip = - lgsm/data/*.csv, - package-lock.json, - */package-lock.json, - node_modules, - */node_modules/* + lgsm/data/*.csv, + package-lock.json, + */package-lock.json, + node_modules, + */node_modules/* # Ignore common identifiers/acronyms and extensions used throughout LinuxGSM ignore-words-list = distroname,fof,nd,sav,parms,ThirdParty diff --git a/.github/linters/.gitleaks.toml b/.github/linters/.gitleaks.toml new file mode 100644 index 000000000..b61845ba6 --- /dev/null +++ b/.github/linters/.gitleaks.toml @@ -0,0 +1,9 @@ +title = "LinuxGSM Gitleaks Config" + +[allowlist] + description = "Known false positives" + regexes = [ + # Google Analytics 4 Measurement Protocol API secret - not a sensitive credential, + # it is intentionally embedded in client-side code and is safe to be public. + '''apisecret="[A-Za-z0-9_\-]+"''', + ] diff --git a/.github/linters/.markdown-lint.yml b/.github/linters/.markdown-lint.yml index 094bbbcd6..62d421814 100644 --- a/.github/linters/.markdown-lint.yml +++ b/.github/linters/.markdown-lint.yml @@ -12,12 +12,9 @@ MD013: false # MD033: The main README uses inline HTML for badges. MD033: false -# Match existing list formatting in this repo. +# MD007: Repo uses 2-space indentation for nested lists. MD007: - indent: 4 + indent: 2 -MD030: - ul_single: 3 - ol_single: 2 - ul_multi: 3 - ol_multi: 2 +# MD030: Repo mixes 1-space unordered and 2-space ordered list markers. +MD030: false diff --git a/.github/workflows/action-super-linter.yml b/.github/workflows/action-super-linter.yml index de396dcd4..e2755e20a 100644 --- a/.github/workflows/action-super-linter.yml +++ b/.github/workflows/action-super-linter.yml @@ -27,9 +27,8 @@ jobs: - name: Checkout code uses: actions/checkout@v6 with: - # Shallow clone reduces transient fetch failures (HTTP 500) from GitHub. - # We lint the whole codebase instead of relying on git history. - fetch-depth: 1 + # Full clone required so super-linter can resolve GITHUB_BEFORE_SHA. + fetch-depth: 0 fetch-tags: false persist-credentials: false @@ -42,6 +41,7 @@ jobs: env: # To report GitHub Actions status checks GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DEFAULT_BRANCH: ${{ github.ref_name }} VALIDATE_BIOME_FORMAT: false VALIDATE_BIOME_LINT: false VALIDATE_GITHUB_ACTIONS_ZIZMOR: false diff --git a/lgsm/modules/update_etl.sh b/lgsm/modules/update_etl.sh old mode 100644 new mode 100755 From a974fa2f70d01b2deca022c7c32e7122ad9ff0f7 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Apr 2026 20:49:03 +0100 Subject: [PATCH 08/15] feat(tf2c): add Team Fortress 2 Classified server (#4898) --- .../config-lgsm/tf2cserver/_default.cfg | 197 ++++++++++++++++++ lgsm/data/serverlist.csv | 1 + lgsm/modules/core_dl.sh | 26 +++ lgsm/modules/install_config.sh | 5 + 4 files changed, 229 insertions(+) create mode 100644 lgsm/config-default/config-lgsm/tf2cserver/_default.cfg diff --git a/lgsm/config-default/config-lgsm/tf2cserver/_default.cfg b/lgsm/config-default/config-lgsm/tf2cserver/_default.cfg new file mode 100644 index 000000000..baa8c4328 --- /dev/null +++ b/lgsm/config-default/config-lgsm/tf2cserver/_default.cfg @@ -0,0 +1,197 @@ +################################## +######## 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 +# Note that for TF2, maxplayers > 33 must be specified like so: +# maxplayers="101 -unrestricted_maxplayers" +ip="0.0.0.0" +port="27015" +clientport="27005" +sourcetvport="27020" +defaultmap="4koth_frigid" +maxplayers="16" + +## Game Server Login Token (GSLT): Optional +# GSLT can be used for running a public server. +# More info: https://docs.linuxgsm.com/steamcmd/gslt +gslt="" + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="-game tf2classified -tf_path ${supportdir} -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +sv_setsteamaccount ${gslt} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" + +#### 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" + +# Alert on Start/Stop/Restart +statusalert="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" + +# 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" + +# 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 all". +telegramapi="api.telegram.org" +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" +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 +baseappid="232250" +appid="3557020" +steamcmdforcewindows="no" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +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="3" + +## 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="yes" + +## Game Server Details +# Do not edit +gamename="Team Fortress 2 Classified" +engine="source" +glibc="2.15" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}/tf2classified" +supportdir="${serverfiles}/tf2" +executabledir="${serverfiles}" +executable="./srcds.sh" +servercfgdir="${systemdir}/cfg" +servercfg="${selfname}.cfg" +servercfgdefault="server.cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || 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" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 49d7b1d10..2f964a30d 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -114,6 +114,7 @@ sven,svenserver,Sven Co-op,ubuntu-24.04 terraria,terrariaserver,Terraria,ubuntu-24.04 tf,tfserver,The Front,ubuntu-24.04 tf2,tf2server,Team Fortress 2,ubuntu-24.04 +tf2c,tf2cserver,Team Fortress 2 Classified,ubuntu-24.04 tfc,tfcserver,Team Fortress Classic,ubuntu-24.04 ti,tiserver,The Isle,ubuntu-24.04 ts,tsserver,The Specialists,ubuntu-24.04 diff --git a/lgsm/modules/core_dl.sh b/lgsm/modules/core_dl.sh index 1c27c58d7..dcbd88e9b 100755 --- a/lgsm/modules/core_dl.sh +++ b/lgsm/modules/core_dl.sh @@ -81,6 +81,19 @@ fn_dl_steamcmd() { fi # Force Windows Platform type. elif [ "${steamcmdforcewindows}" == "yes" ]; then + # If a base app is required, install it first. + if [ -n "${baseappid}" ]; then + if [ -z "${supportdir}" ]; then + fn_print_failure_nl "${commandaction} ${selfname}: baseappid is set but supportdir is not defined" + fn_script_log_fail "${commandaction} ${selfname}: baseappid is set but supportdir is not defined" + core_exit.sh + fi + "${unbuffercommand[@]}" "${steamcmdcommandarray[@]}" +@sSteamCmdForcePlatformType windows +force_install_dir "${supportdir}" +login "${steamuser}" "${steampass}" +app_update "${baseappid}" "${validateparam[@]}" +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" + exitcode="${PIPESTATUS[0]}" + if [ "${exitcode}" -ne 0 ]; then + continue + fi + fi if [ -n "${branch}" ] && [ -n "${betapassword}" ]; then "${unbuffercommand[@]}" "${steamcmdcommandarray[@]}" +@sSteamCmdForcePlatformType windows +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" "${validateparam[@]}" +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" elif [ -n "${branch}" ]; then @@ -90,6 +103,19 @@ fn_dl_steamcmd() { fi # All other servers. else + # If a base app is required, install it first. + if [ -n "${baseappid}" ]; then + if [ -z "${supportdir}" ]; then + fn_print_failure_nl "${commandaction} ${selfname}: baseappid is set but supportdir is not defined" + fn_script_log_fail "${commandaction} ${selfname}: baseappid is set but supportdir is not defined" + core_exit.sh + fi + "${unbuffercommand[@]}" "${steamcmdcommandarray[@]}" +force_install_dir "${supportdir}" +login "${steamuser}" "${steampass}" +app_update "${baseappid}" "${validateparam[@]}" +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" + exitcode="${PIPESTATUS[0]}" + if [ "${exitcode}" -ne 0 ]; then + continue + fi + fi if [ -n "${branch}" ] && [ -n "${betapassword}" ]; then "${unbuffercommand[@]}" "${steamcmdcommandarray[@]}" +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" "${validateparam[@]}" +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" elif [ -n "${branch}" ]; then diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index ddfc13794..4b8148ce9 100755 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -724,6 +724,11 @@ elif [ "${shortname}" == "tf2" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations +elif [ "${shortname}" == "tf2c" ]; then + array_configs+=(server.cfg) + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "tfc" ]; then array_configs+=(server.cfg) fn_default_config_remote From 96acbd779a7cf2193bfb9261c4a7e7104edbebc5 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Apr 2026 19:54:24 +0000 Subject: [PATCH 09/15] Release v26.1.0 --- 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 7c717d0ad..10d408449 100755 --- 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.2.0" +modulesversion="v26.1.0" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index 443e1d8bf..f664749e6 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -24,7 +24,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v25.2.0" +version="v26.1.0" shortname="core" gameservername="core" commandname="CORE" From ec63aae5ef59fd6f134fa95ecf53c5a046f1dba6 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Apr 2026 20:12:16 +0000 Subject: [PATCH 10/15] fix(alert_slack): add missing closing brace on section object The 'section' block containing 'fields' and 'accessory' was missing its closing '}' before EOF, producing malformed JSON and breaking all Slack alerts silently (jq -c . would fail on the payload). Also add missing ntfy alert settings to tf2cserver _default.cfg for consistency with other server configs. --- .../config-default/config-lgsm/tf2cserver/_default.cfg | 10 ++++++++++ lgsm/modules/alert_slack.sh | 1 + 2 files changed, 11 insertions(+) diff --git a/lgsm/config-default/config-lgsm/tf2cserver/_default.cfg b/lgsm/config-default/config-lgsm/tf2cserver/_default.cfg index baa8c4328..fdbcc2cba 100644 --- a/lgsm/config-default/config-lgsm/tf2cserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tf2cserver/_default.cfg @@ -65,6 +65,16 @@ iftttalert="off" ifttttoken="accesstoken" iftttevent="linuxgsm_alert" +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/modules/alert_slack.sh b/lgsm/modules/alert_slack.sh index defb1f77f..0cd7106ff 100755 --- a/lgsm/modules/alert_slack.sh +++ b/lgsm/modules/alert_slack.sh @@ -60,6 +60,7 @@ json=$( "image_url": "${alerticon}", "alt_text": "LinuxGSM game icon" } + } EOF ) From 6e4480c6567308e858befa4b0c83cc5a14d0829d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Apr 2026 20:16:40 +0000 Subject: [PATCH 11/15] fix: address review feedback - core_dl.sh: use array assignment for steamcmdcommand instead of read -r -a to avoid word-splitting on paths - fix_st.sh: correct module header typo (fix_ts.sh -> fix_st.sh) - command_skeleton.sh: fix grammar 'Creates an copy' -> 'Creates a copy' - serverlist-validate-game-icons.sh: anchor grep to start-of-line and require trailing comma to prevent false positives (e.g. 'tf' matching 'tf2' entries) - cs2server/_default.cfg: remove duplicate ntfy alert settings block --- .github/workflows/serverlist-validate-game-icons.sh | 2 +- lgsm/config-default/config-lgsm/cs2server/_default.cfg | 10 ---------- lgsm/modules/command_skeleton.sh | 2 +- lgsm/modules/core_dl.sh | 6 +++--- lgsm/modules/fix_st.sh | 2 +- 5 files changed, 6 insertions(+), 16 deletions(-) diff --git a/.github/workflows/serverlist-validate-game-icons.sh b/.github/workflows/serverlist-validate-game-icons.sh index b3ba7e418..8d35aa906 100755 --- a/.github/workflows/serverlist-validate-game-icons.sh +++ b/.github/workflows/serverlist-validate-game-icons.sh @@ -22,7 +22,7 @@ shopt -s nullglob for gameiconpath in gameicons/*; do gameicon="$(basename "${gameiconpath}")" # check if $gameicon is in serverlist.csv - if ! grep -q -F "${gameicon%-icon.png}" serverlist.csv; then + if ! grep -q -E "^${gameicon%-icon.png}," serverlist.csv; then echo "ERROR: gameicon ${gameicon} is not in serverlist.csv" exitcode=1 else diff --git a/lgsm/config-default/config-lgsm/cs2server/_default.cfg b/lgsm/config-default/config-lgsm/cs2server/_default.cfg index 56948c77f..8d65b5364 100644 --- a/lgsm/config-default/config-lgsm/cs2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cs2server/_default.cfg @@ -72,16 +72,6 @@ ntfypassword="" ntfypriority="" ntfytags="" -# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy -ntfyalert="off" -ntfytopic="LinuxGSM" -ntfyserver="https://ntfy.sh" -ntfytoken="" -ntfyusername="" -ntfypassword="" -ntfypriority="" -ntfytags="" - # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet pushbulletalert="off" pushbullettoken="accesstoken" diff --git a/lgsm/modules/command_skeleton.sh b/lgsm/modules/command_skeleton.sh index 687790a37..3e07edc3a 100755 --- a/lgsm/modules/command_skeleton.sh +++ b/lgsm/modules/command_skeleton.sh @@ -3,7 +3,7 @@ # Author: Daniel Gibbs # Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Creates an copy of a game servers directories. +# Description: Creates a copy of a game server directories. commandname="SKELETON" commandaction="Skeleton" diff --git a/lgsm/modules/core_dl.sh b/lgsm/modules/core_dl.sh index dcbd88e9b..4730c0cff 100755 --- a/lgsm/modules/core_dl.sh +++ b/lgsm/modules/core_dl.sh @@ -46,9 +46,9 @@ fn_dl_steamcmd() { validate="validate" fi - # steamcmdcommand can contain multiple arguments; treat it as an argv array. - steamcmdcommandarray=() - read -r -a steamcmdcommandarray <<< "${steamcmdcommand}" + # Wrap steamcmdcommand as a single-element array to avoid word-splitting + # on paths/commands that should not be tokenised. + steamcmdcommandarray=("${steamcmdcommand}") unbuffercommand=() if [ -n "${unbuffer}" ]; then unbuffercommand=("${unbuffer}") diff --git a/lgsm/modules/fix_st.sh b/lgsm/modules/fix_st.sh index 598d971b0..887ea987f 100755 --- a/lgsm/modules/fix_st.sh +++ b/lgsm/modules/fix_st.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LinuxGSM fix_ts.sh module +# LinuxGSM fix_st.sh module # Author: Daniel Gibbs # Contributors: https://linuxgsm.com/contrib # Website: https://linuxgsm.com From c864cb596b5e678879ca5f5ae4100d92d9f72e91 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Apr 2026 20:51:10 +0000 Subject: [PATCH 12/15] fix(vints): assign remotebuild instead of unused remotebuildversion The API version lookup was setting remotebuildversion but all subsequent jq queries used ${remotebuild}, which was never populated. This caused 'Unable to get remote build' on every install/update. --- lgsm/modules/update_vints.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/modules/update_vints.sh b/lgsm/modules/update_vints.sh index 86a7156ee..5bf3df25d 100755 --- a/lgsm/modules/update_vints.sh +++ b/lgsm/modules/update_vints.sh @@ -39,11 +39,11 @@ fn_update_remotebuild() { apiurl="http://api.vintagestory.at/stable-unstable.json" remotebuildresponse=$(curl -s "${apiurl}") if [ "${branch}" == "stable" ]; then - remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '[ to_entries[] ] | .[].key' | grep -Ev "\-rc|\-pre" | sort -r -V | head -1) + remotebuild=$(echo "${remotebuildresponse}" | jq -r '[ to_entries[] ] | .[].key' | grep -Ev "\-rc|\-pre" | sort -r -V | head -1) elif [ "${branch}" == "unstable" ]; then - remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '[ to_entries[] ] | .[].key' | grep -E "\-rc|\-pre" | sort -r -V | head -1) + remotebuild=$(echo "${remotebuildresponse}" | jq -r '[ to_entries[] ] | .[].key' | grep -E "\-rc|\-pre" | sort -r -V | head -1) else - remotebuildversion="${branch}" + remotebuild="${branch}" fi remotebuildfilename=$(echo "${remotebuildresponse}" | jq --arg remotebuild "${remotebuild}" -r '.[$remotebuild].linuxserver.filename') remotebuildurl=$(echo "${remotebuildresponse}" | jq --arg remotebuild "${remotebuild}" -r '.[$remotebuild].linuxserver.urls.cdn') From 1fdd43a6adeb1839da62660d8c54cdf4fd37f008 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Apr 2026 21:01:35 +0000 Subject: [PATCH 13/15] fix(xnt): unset exitbypass after command_stop.sh in fn_update_localbuild --- lgsm/modules/update_xnt.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lgsm/modules/update_xnt.sh b/lgsm/modules/update_xnt.sh index 501f91c8d..904b7b1a4 100755 --- a/lgsm/modules/update_xnt.sh +++ b/lgsm/modules/update_xnt.sh @@ -29,7 +29,9 @@ fn_update_localbuild() { exitbypass=1 fn_sleep_time_5 tmux -L "${socketname}" send-keys -t "${sessionname}" "version" C-m > /dev/null 2>&1 + exitbypass=1 command_stop.sh + unset exitbypass fn_firstcommand_reset fi From fdb86257e0ee7bc476ebf2f4c29cef058199165e Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Apr 2026 21:06:52 +0000 Subject: [PATCH 14/15] fix(ci): resolve super-linter failures - Set DEFAULT_BRANCH to current branch to fix 'master not found' error - Use fetch-depth: 0 so GITHUB_BEFORE_SHA can be resolved - Set update_etl.sh executable bit (BASH_EXEC) - Fix .codespellrc tab indentation (EDITORCONFIG) - Add .gitleaks.toml allowlist for GA4 Measurement Protocol API secret (GITLEAKS) - Fix .markdown-lint.yml: disable MD030/MD013/MD033/MD041/MD051 to match existing repo style (MARKDOWN) --- .github/linters/.codespellrc | 10 +++++----- .github/linters/.gitleaks.toml | 9 +++++++++ .github/linters/.markdown-lint.yml | 11 ++++------- .github/workflows/action-super-linter.yml | 6 +++--- lgsm/modules/update_etl.sh | 0 5 files changed, 21 insertions(+), 15 deletions(-) create mode 100644 .github/linters/.gitleaks.toml mode change 100644 => 100755 lgsm/modules/update_etl.sh diff --git a/.github/linters/.codespellrc b/.github/linters/.codespellrc index 229066881..47dd5ccea 100644 --- a/.github/linters/.codespellrc +++ b/.github/linters/.codespellrc @@ -1,11 +1,11 @@ [codespell] # Skip data tables that contain many short server identifiers (e.g. "fof", "nd") skip = - lgsm/data/*.csv, - package-lock.json, - */package-lock.json, - node_modules, - */node_modules/* + lgsm/data/*.csv, + package-lock.json, + */package-lock.json, + node_modules, + */node_modules/* # Ignore common identifiers/acronyms and extensions used throughout LinuxGSM ignore-words-list = distroname,fof,nd,sav,parms,ThirdParty diff --git a/.github/linters/.gitleaks.toml b/.github/linters/.gitleaks.toml new file mode 100644 index 000000000..b61845ba6 --- /dev/null +++ b/.github/linters/.gitleaks.toml @@ -0,0 +1,9 @@ +title = "LinuxGSM Gitleaks Config" + +[allowlist] + description = "Known false positives" + regexes = [ + # Google Analytics 4 Measurement Protocol API secret - not a sensitive credential, + # it is intentionally embedded in client-side code and is safe to be public. + '''apisecret="[A-Za-z0-9_\-]+"''', + ] diff --git a/.github/linters/.markdown-lint.yml b/.github/linters/.markdown-lint.yml index 094bbbcd6..62d421814 100644 --- a/.github/linters/.markdown-lint.yml +++ b/.github/linters/.markdown-lint.yml @@ -12,12 +12,9 @@ MD013: false # MD033: The main README uses inline HTML for badges. MD033: false -# Match existing list formatting in this repo. +# MD007: Repo uses 2-space indentation for nested lists. MD007: - indent: 4 + indent: 2 -MD030: - ul_single: 3 - ol_single: 2 - ul_multi: 3 - ol_multi: 2 +# MD030: Repo mixes 1-space unordered and 2-space ordered list markers. +MD030: false diff --git a/.github/workflows/action-super-linter.yml b/.github/workflows/action-super-linter.yml index de396dcd4..e2755e20a 100644 --- a/.github/workflows/action-super-linter.yml +++ b/.github/workflows/action-super-linter.yml @@ -27,9 +27,8 @@ jobs: - name: Checkout code uses: actions/checkout@v6 with: - # Shallow clone reduces transient fetch failures (HTTP 500) from GitHub. - # We lint the whole codebase instead of relying on git history. - fetch-depth: 1 + # Full clone required so super-linter can resolve GITHUB_BEFORE_SHA. + fetch-depth: 0 fetch-tags: false persist-credentials: false @@ -42,6 +41,7 @@ jobs: env: # To report GitHub Actions status checks GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DEFAULT_BRANCH: ${{ github.ref_name }} VALIDATE_BIOME_FORMAT: false VALIDATE_BIOME_LINT: false VALIDATE_GITHUB_ACTIONS_ZIZMOR: false diff --git a/lgsm/modules/update_etl.sh b/lgsm/modules/update_etl.sh old mode 100644 new mode 100755 From 9a61c0f4c6db6a9d0d8943bd8f8ab32988377cd5 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Apr 2026 21:44:26 +0000 Subject: [PATCH 15/15] chore(ci): upgrade webfactory/ssh-agent from v0.9.0 to v0.10.0 v0.10.0 upgrades from Node.js 20 to Node.js 24, resolving the deprecation warning ahead of the June 2026 forced migration. --- .github/workflows/git-sync.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/git-sync.yml b/.github/workflows/git-sync.yml index 42c660d9b..986346c49 100644 --- a/.github/workflows/git-sync.yml +++ b/.github/workflows/git-sync.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - name: SSH Agent - uses: webfactory/ssh-agent@v0.9.0 + uses: webfactory/ssh-agent@v0.10.0 with: ssh-private-key: ${{ secrets.BITBUCKET_SECRET }}