Skip to content

Commit b13b7a6

Browse files
committed
feat(tf2classified): add Team Fortress 2 Classified server
Add support for Team Fortress 2 Classified dedicated server (Steam appid 3557020). The server requires TF2 base files (appid 232250) to be installed to a separate support directory (-tf_path). Introduces baseappid config variable: when set, SteamCMD first downloads the base app to supportdir, then the main appid to serverfiles. Closes #4876
1 parent 9dfbb8e commit b13b7a6

4 files changed

Lines changed: 220 additions & 0 deletions

File tree

Lines changed: 208 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,208 @@
1+
##################################
2+
######## Default Settings ########
3+
##################################
4+
# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN!
5+
# Copy settings from here and use them in either:
6+
# common.cfg - applies settings to every instance.
7+
# [instance].cfg - applies settings to a specific instance.
8+
9+
#### Game Server Settings ####
10+
11+
## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters
12+
# Note that for TF2 Classified, maxplayers > 33 must be specified like so:
13+
# maxplayers="101 -unrestricted_maxplayers"
14+
ip="0.0.0.0"
15+
port="27015"
16+
clientport="27005"
17+
sourcetvport="27020"
18+
defaultmap="cp_badlands"
19+
maxplayers="16"
20+
21+
## Game Server Login Token (GSLT): Optional
22+
# GSLT can be used for running a public server.
23+
# More info: https://docs.linuxgsm.com/steamcmd/gslt
24+
gslt=""
25+
26+
## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
27+
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}"
28+
29+
#### LinuxGSM Settings ####
30+
31+
## LinuxGSM Stats
32+
# Send useful stats to LinuxGSM developers.
33+
# https://docs.linuxgsm.com/configuration/linuxgsm-stats
34+
# (on|off)
35+
stats="off"
36+
37+
## Notification Alerts
38+
# (on|off)
39+
40+
# Display IP | https://docs.linuxgsm.com/alerts#display-ip
41+
displayip=""
42+
43+
# More info | https://docs.linuxgsm.com/alerts#more-info
44+
postalert="off"
45+
46+
# Alert on Start/Stop/Restart
47+
statusalert="off"
48+
49+
# Discord Alerts | https://docs.linuxgsm.com/alerts/discord
50+
discordalert="off"
51+
discordwebhook="webhook"
52+
53+
# Email Alerts | https://docs.linuxgsm.com/alerts/email
54+
emailalert="off"
55+
email="email@example.com"
56+
emailfrom=""
57+
58+
# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify
59+
gotifyalert="off"
60+
gotifytoken="token"
61+
gotifywebhook="webhook"
62+
63+
# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt
64+
iftttalert="off"
65+
ifttttoken="accesstoken"
66+
iftttevent="linuxgsm_alert"
67+
68+
# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy
69+
ntfyalert="off"
70+
ntfytopic="LinuxGSM"
71+
ntfyserver="https://ntfy.sh"
72+
ntfytoken=""
73+
ntfyusername=""
74+
ntfypassword=""
75+
ntfypriority=""
76+
ntfytags=""
77+
78+
# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet
79+
pushbulletalert="off"
80+
pushbullettoken="accesstoken"
81+
channeltag=""
82+
83+
# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover
84+
pushoveralert="off"
85+
pushovertoken="accesstoken"
86+
pushoveruserkey="userkey"
87+
88+
# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat
89+
rocketchatalert="off"
90+
rocketchatwebhook="webhook"
91+
92+
# Slack Alerts | https://docs.linuxgsm.com/alerts/slack
93+
slackalert="off"
94+
slackwebhook="webhook"
95+
96+
# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram
97+
# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring".
98+
# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all".
99+
telegramapi="api.telegram.org"
100+
telegramalert="off"
101+
telegramtoken="accesstoken"
102+
telegramchatid=""
103+
telegramthreadid=""
104+
telegramsilentnotification="false"
105+
curlcustomstring=""
106+
107+
## Updating | https://docs.linuxgsm.com/commands/update
108+
updateonstart="off"
109+
110+
## Backup | https://docs.linuxgsm.com/commands/backup
111+
maxbackups="4"
112+
maxbackupdays="30"
113+
stoponbackup="on"
114+
115+
## Logging | https://docs.linuxgsm.com/features/logging
116+
consolelogging="on"
117+
logdays="7"
118+
119+
## Monitor | https://docs.linuxgsm.com/commands/monitor
120+
# Query delay time
121+
querydelay="1"
122+
123+
## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors
124+
ansi="on"
125+
126+
#### Advanced Settings ####
127+
128+
## Message Display Time | https://docs.linuxgsm.com/features/message-display-time
129+
sleeptime="0.5"
130+
131+
## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd
132+
# Server appid
133+
# baseappid: base game files required by this server (downloaded to supportdir)
134+
baseappid="232250"
135+
appid="3557020"
136+
steamcmdforcewindows="no"
137+
# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch
138+
branch=""
139+
betapassword=""
140+
# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server
141+
steammaster="true"
142+
143+
## Stop Mode | https://docs.linuxgsm.com/features/stop-mode
144+
# 1: tmux kill
145+
# 2: CTRL+c
146+
# 3: quit
147+
# 4: quit 120s
148+
# 5: stop
149+
# 6: q
150+
# 7: exit
151+
# 8: 7 Days to Die
152+
# 9: GoldSrc
153+
# 10: Avorion
154+
# 11: end
155+
stopmode="3"
156+
157+
## Query mode
158+
# 1: session only
159+
# 2: gamedig (gsquery fallback)
160+
# 3: gamedig
161+
# 4: gsquery
162+
# 5: tcp
163+
querymode="2"
164+
querytype="protocol-valve"
165+
166+
## Console type
167+
consoleverbose="yes"
168+
consoleinteract="yes"
169+
170+
## Game Server Details
171+
# Do not edit
172+
gamename="Team Fortress 2 Classified"
173+
engine="source"
174+
glibc="2.15"
175+
176+
#### Directories ####
177+
# Edit with care
178+
179+
## Game Server Directories
180+
systemdir="${serverfiles}/tf2classified"
181+
supportdir="${serverfiles}/tf2"
182+
executabledir="${serverfiles}"
183+
executable="./srcds.sh"
184+
servercfgdir="${systemdir}/cfg"
185+
servercfg="${selfname}.cfg"
186+
servercfgdefault="server.cfg"
187+
servercfgfullpath="${servercfgdir}/${servercfg}"
188+
189+
## Backup Directory
190+
backupdir="${lgsmdir}/backup"
191+
192+
## Logging Directories
193+
[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log"
194+
gamelogdir="${systemdir}/logs"
195+
lgsmlogdir="${logdir}/script"
196+
consolelogdir="${logdir}/console"
197+
lgsmlog="${lgsmlogdir}/${selfname}-script.log"
198+
consolelog="${consolelogdir}/${selfname}-console.log"
199+
alertlog="${lgsmlogdir}/${selfname}-alert.log"
200+
postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log"
201+
202+
## Logs Naming
203+
lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log"
204+
consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log"
205+
206+
## Log Parameters
207+
logtimestamp="off"
208+
logtimestampformat="%Y-%m-%d %H:%M:%S"

lgsm/data/serverlist.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ sven,svenserver,Sven Co-op,ubuntu-24.04
114114
terraria,terrariaserver,Terraria,ubuntu-24.04
115115
tf,tfserver,The Front,ubuntu-24.04
116116
tf2,tf2server,Team Fortress 2,ubuntu-24.04
117+
tf2classified,tf2classifiedserver,Team Fortress 2 Classified,ubuntu-24.04
117118
tfc,tfcserver,Team Fortress Classic,ubuntu-24.04
118119
ti,tiserver,The Isle,ubuntu-24.04
119120
ts,tsserver,The Specialists,ubuntu-24.04

lgsm/modules/core_dl.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ fn_dl_steamcmd() {
8585
"${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}"
8686
elif [ -n "${branch}" ]; then
8787
"${unbuffercommand[@]}" "${steamcmdcommandarray[@]}" +@sSteamCmdForcePlatformType windows +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" "${validateparam[@]}" +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}"
88+
elif [ -n "${baseappid}" ]; then
89+
"${unbuffercommand[@]}" "${steamcmdcommandarray[@]}" +@sSteamCmdForcePlatformType windows +force_install_dir "${supportdir}" +login "${steamuser}" "${steampass}" +app_update "${baseappid}" "${validateparam[@]}" +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}"
90+
"${unbuffercommand[@]}" "${steamcmdcommandarray[@]}" +@sSteamCmdForcePlatformType windows +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" "${validateparam[@]}" +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}"
8891
else
8992
"${unbuffercommand[@]}" "${steamcmdcommandarray[@]}" +@sSteamCmdForcePlatformType windows +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" "${validateparam[@]}" +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}"
9093
fi
@@ -94,6 +97,9 @@ fn_dl_steamcmd() {
9497
"${unbuffercommand[@]}" "${steamcmdcommandarray[@]}" +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" "${validateparam[@]}" +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}"
9598
elif [ -n "${branch}" ]; then
9699
"${unbuffercommand[@]}" "${steamcmdcommandarray[@]}" +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" "${validateparam[@]}" +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}"
100+
elif [ -n "${baseappid}" ]; then
101+
"${unbuffercommand[@]}" "${steamcmdcommandarray[@]}" +force_install_dir "${supportdir}" +login "${steamuser}" "${steampass}" +app_update "${baseappid}" "${validateparam[@]}" +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}"
102+
"${unbuffercommand[@]}" "${steamcmdcommandarray[@]}" +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" "${validateparam[@]}" +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}"
97103
else
98104
"${unbuffercommand[@]}" "${steamcmdcommandarray[@]}" +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" "${validateparam[@]}" +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}"
99105
fi

lgsm/modules/install_config.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -724,6 +724,11 @@ elif [ "${shortname}" == "tf2" ]; then
724724
fn_default_config_remote
725725
fn_set_config_vars
726726
fn_list_config_locations
727+
elif [ "${shortname}" == "tf2classified" ]; then
728+
array_configs+=(server.cfg)
729+
fn_default_config_remote
730+
fn_set_config_vars
731+
fn_list_config_locations
727732
elif [ "${shortname}" == "tfc" ]; then
728733
array_configs+=(server.cfg)
729734
fn_default_config_remote

0 commit comments

Comments
 (0)