Browse Source

Merge branch 'develop' into fix/steamcmd-libtinfo

pull/4899/head
Daniel Gibbs 1 month ago
committed by GitHub
parent
commit
dcb662d7d0
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 10
      .github/linters/.codespellrc
  2. 9
      .github/linters/.gitleaks.toml
  3. 11
      .github/linters/.markdown-lint.yml
  4. 6
      .github/workflows/action-super-linter.yml
  5. 2
      .github/workflows/git-sync.yml
  6. 2
      .github/workflows/serverlist-validate-game-icons.sh
  7. 10
      lgsm/config-default/config-lgsm/cs2server/_default.cfg
  8. 207
      lgsm/config-default/config-lgsm/tf2cserver/_default.cfg
  9. 1
      lgsm/data/serverlist.csv
  10. 1
      lgsm/modules/alert_slack.sh
  11. 2
      lgsm/modules/command_skeleton.sh
  12. 32
      lgsm/modules/core_dl.sh
  13. 2
      lgsm/modules/core_modules.sh
  14. 2
      lgsm/modules/fix_st.sh
  15. 5
      lgsm/modules/install_config.sh
  16. 0
      lgsm/modules/update_etl.sh
  17. 6
      lgsm/modules/update_vints.sh
  18. 2
      lgsm/modules/update_xnt.sh
  19. 2
      linuxgsm.sh

10
.github/linters/.codespellrc

@ -1,11 +1,11 @@
[codespell] [codespell]
# Skip data tables that contain many short server identifiers (e.g. "fof", "nd") # Skip data tables that contain many short server identifiers (e.g. "fof", "nd")
skip = skip =
lgsm/data/*.csv, lgsm/data/*.csv,
package-lock.json, package-lock.json,
*/package-lock.json, */package-lock.json,
node_modules, node_modules,
*/node_modules/* */node_modules/*
# Ignore common identifiers/acronyms and extensions used throughout LinuxGSM # Ignore common identifiers/acronyms and extensions used throughout LinuxGSM
ignore-words-list = distroname,fof,nd,sav,parms,ThirdParty ignore-words-list = distroname,fof,nd,sav,parms,ThirdParty

9
.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_\-]+"''',
]

11
.github/linters/.markdown-lint.yml

@ -12,12 +12,9 @@ MD013: false
# MD033: The main README uses inline HTML for badges. # MD033: The main README uses inline HTML for badges.
MD033: false MD033: false
# Match existing list formatting in this repo. # MD007: Repo uses 2-space indentation for nested lists.
MD007: MD007:
indent: 4 indent: 2
MD030: # MD030: Repo mixes 1-space unordered and 2-space ordered list markers.
ul_single: 3 MD030: false
ol_single: 2
ul_multi: 3
ol_multi: 2

6
.github/workflows/action-super-linter.yml

@ -27,9 +27,8 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v6 uses: actions/checkout@v6
with: with:
# Shallow clone reduces transient fetch failures (HTTP 500) from GitHub. # Full clone required so super-linter can resolve GITHUB_BEFORE_SHA.
# We lint the whole codebase instead of relying on git history. fetch-depth: 0
fetch-depth: 1
fetch-tags: false fetch-tags: false
persist-credentials: false persist-credentials: false
@ -42,6 +41,7 @@ jobs:
env: env:
# To report GitHub Actions status checks # To report GitHub Actions status checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_BRANCH: ${{ github.ref_name }}
VALIDATE_BIOME_FORMAT: false VALIDATE_BIOME_FORMAT: false
VALIDATE_BIOME_LINT: false VALIDATE_BIOME_LINT: false
VALIDATE_GITHUB_ACTIONS_ZIZMOR: false VALIDATE_GITHUB_ACTIONS_ZIZMOR: false

2
.github/workflows/git-sync.yml

@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: SSH Agent - name: SSH Agent
uses: webfactory/ssh-agent@v0.9.0 uses: webfactory/ssh-agent@v0.10.0
with: with:
ssh-private-key: ${{ secrets.BITBUCKET_SECRET }} ssh-private-key: ${{ secrets.BITBUCKET_SECRET }}

2
.github/workflows/serverlist-validate-game-icons.sh

@ -22,7 +22,7 @@ shopt -s nullglob
for gameiconpath in gameicons/*; do for gameiconpath in gameicons/*; do
gameicon="$(basename "${gameiconpath}")" gameicon="$(basename "${gameiconpath}")"
# check if $gameicon is in serverlist.csv # 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" echo "ERROR: gameicon ${gameicon} is not in serverlist.csv"
exitcode=1 exitcode=1
else else

10
lgsm/config-default/config-lgsm/cs2server/_default.cfg

@ -72,16 +72,6 @@ ntfypassword=""
ntfypriority="" ntfypriority=""
ntfytags="" 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 # Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet
pushbulletalert="off" pushbulletalert="off"
pushbullettoken="accesstoken" pushbullettoken="accesstoken"

207
lgsm/config-default/config-lgsm/tf2cserver/_default.cfg

@ -0,0 +1,207 @@
##################################
######## 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 protected]"
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"
# 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"
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"

1
lgsm/data/serverlist.csv

@ -114,6 +114,7 @@ sven,svenserver,Sven Co-op,ubuntu-24.04
terraria,terrariaserver,Terraria,ubuntu-24.04 terraria,terrariaserver,Terraria,ubuntu-24.04
tf,tfserver,The Front,ubuntu-24.04 tf,tfserver,The Front,ubuntu-24.04
tf2,tf2server,Team Fortress 2,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 tfc,tfcserver,Team Fortress Classic,ubuntu-24.04
ti,tiserver,The Isle,ubuntu-24.04 ti,tiserver,The Isle,ubuntu-24.04
ts,tsserver,The Specialists,ubuntu-24.04 ts,tsserver,The Specialists,ubuntu-24.04

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

1
lgsm/modules/alert_slack.sh

@ -60,6 +60,7 @@ json=$(
"image_url": "${alerticon}", "image_url": "${alerticon}",
"alt_text": "LinuxGSM game icon" "alt_text": "LinuxGSM game icon"
} }
}
EOF EOF
) )

2
lgsm/modules/command_skeleton.sh

@ -3,7 +3,7 @@
# Author: Daniel Gibbs # Author: Daniel Gibbs
# Contributors: https://linuxgsm.com/contrib # Contributors: https://linuxgsm.com/contrib
# Website: https://linuxgsm.com # Website: https://linuxgsm.com
# Description: Creates an copy of a game servers directories. # Description: Creates a copy of a game server directories.
commandname="SKELETON" commandname="SKELETON"
commandaction="Skeleton" commandaction="Skeleton"

32
lgsm/modules/core_dl.sh

@ -46,9 +46,9 @@ fn_dl_steamcmd() {
validate="validate" validate="validate"
fi fi
# steamcmdcommand can contain multiple arguments; treat it as an argv array. # Wrap steamcmdcommand as a single-element array to avoid word-splitting
steamcmdcommandarray=() # on paths/commands that should not be tokenised.
read -r -a steamcmdcommandarray <<< "${steamcmdcommand}" steamcmdcommandarray=("${steamcmdcommand}")
unbuffercommand=() unbuffercommand=()
if [ -n "${unbuffer}" ]; then if [ -n "${unbuffer}" ]; then
unbuffercommand=("${unbuffer}") unbuffercommand=("${unbuffer}")
@ -81,6 +81,19 @@ fn_dl_steamcmd() {
fi fi
# Force Windows Platform type. # Force Windows Platform type.
elif [ "${steamcmdforcewindows}" == "yes" ]; then 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 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}" "${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 elif [ -n "${branch}" ]; then
@ -90,6 +103,19 @@ fn_dl_steamcmd() {
fi fi
# All other servers. # All other servers.
else 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 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}" "${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 elif [ -n "${branch}" ]; then

2
lgsm/modules/core_modules.sh

@ -8,7 +8,7 @@
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
modulesversion="v25.2.0" modulesversion="v26.1.0"
# Core # Core

2
lgsm/modules/fix_st.sh

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
# LinuxGSM fix_ts.sh module # LinuxGSM fix_st.sh module
# Author: Daniel Gibbs # Author: Daniel Gibbs
# Contributors: https://linuxgsm.com/contrib # Contributors: https://linuxgsm.com/contrib
# Website: https://linuxgsm.com # Website: https://linuxgsm.com

5
lgsm/modules/install_config.sh

@ -724,6 +724,11 @@ elif [ "${shortname}" == "tf2" ]; then
fn_default_config_remote fn_default_config_remote
fn_set_config_vars fn_set_config_vars
fn_list_config_locations 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 elif [ "${shortname}" == "tfc" ]; then
array_configs+=(server.cfg) array_configs+=(server.cfg)
fn_default_config_remote fn_default_config_remote

0
lgsm/modules/update_etl.sh

6
lgsm/modules/update_vints.sh

@ -39,11 +39,11 @@ fn_update_remotebuild() {
apiurl="http://api.vintagestory.at/stable-unstable.json" apiurl="http://api.vintagestory.at/stable-unstable.json"
remotebuildresponse=$(curl -s "${apiurl}") remotebuildresponse=$(curl -s "${apiurl}")
if [ "${branch}" == "stable" ]; then 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 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 else
remotebuildversion="${branch}" remotebuild="${branch}"
fi fi
remotebuildfilename=$(echo "${remotebuildresponse}" | jq --arg remotebuild "${remotebuild}" -r '.[$remotebuild].linuxserver.filename') remotebuildfilename=$(echo "${remotebuildresponse}" | jq --arg remotebuild "${remotebuild}" -r '.[$remotebuild].linuxserver.filename')
remotebuildurl=$(echo "${remotebuildresponse}" | jq --arg remotebuild "${remotebuild}" -r '.[$remotebuild].linuxserver.urls.cdn') remotebuildurl=$(echo "${remotebuildresponse}" | jq --arg remotebuild "${remotebuild}" -r '.[$remotebuild].linuxserver.urls.cdn')

2
lgsm/modules/update_xnt.sh

@ -29,7 +29,9 @@ fn_update_localbuild() {
exitbypass=1 exitbypass=1
fn_sleep_time_5 fn_sleep_time_5
tmux -L "${socketname}" send-keys -t "${sessionname}" "version" C-m > /dev/null 2>&1 tmux -L "${socketname}" send-keys -t "${sessionname}" "version" C-m > /dev/null 2>&1
exitbypass=1
command_stop.sh command_stop.sh
unset exitbypass
fn_firstcommand_reset fn_firstcommand_reset
fi fi

2
linuxgsm.sh

@ -24,7 +24,7 @@ if [ -f ".dev-debug" ]; then
set -x set -x
fi fi
version="v25.2.0" version="v26.1.0"
shortname="core" shortname="core"
gameservername="core" gameservername="core"
commandname="CORE" commandname="CORE"

Loading…
Cancel
Save