Skip to content

Commit 7cb4e76

Browse files
committed
Add TF2 Classified server
1 parent 31031c6 commit 7cb4e76

File tree

4 files changed

+209
-0
lines changed

4 files changed

+209
-0
lines changed
Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
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, 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+
# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet
69+
pushbulletalert="off"
70+
pushbullettoken="accesstoken"
71+
channeltag=""
72+
73+
# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover
74+
pushoveralert="off"
75+
pushovertoken="accesstoken"
76+
pushoveruserkey="userkey"
77+
78+
# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat
79+
rocketchatalert="off"
80+
rocketchatwebhook="webhook"
81+
82+
# Slack Alerts | https://docs.linuxgsm.com/alerts/slack
83+
slackalert="off"
84+
slackwebhook="webhook"
85+
86+
# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram
87+
# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring".
88+
# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all".
89+
telegramapi="api.telegram.org"
90+
telegramalert="off"
91+
telegramtoken="accesstoken"
92+
telegramchatid=""
93+
telegramthreadid=""
94+
telegramsilentnotification="false"
95+
curlcustomstring=""
96+
97+
## Updating | https://docs.linuxgsm.com/commands/update
98+
updateonstart="off"
99+
100+
## Backup | https://docs.linuxgsm.com/commands/backup
101+
maxbackups="4"
102+
maxbackupdays="30"
103+
stoponbackup="on"
104+
105+
## Logging | https://docs.linuxgsm.com/features/logging
106+
consolelogging="on"
107+
logdays="7"
108+
109+
## Monitor | https://docs.linuxgsm.com/commands/monitor
110+
# Query delay time
111+
querydelay="1"
112+
113+
## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors
114+
ansi="on"
115+
116+
#### Advanced Settings ####
117+
118+
## Message Display Time | https://docs.linuxgsm.com/features/message-display-time
119+
sleeptime="0.5"
120+
121+
## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd
122+
# Server appid
123+
baseappid="232250"
124+
appid="3557020"
125+
steamcmdforcewindows="no"
126+
# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch
127+
branch=""
128+
betapassword=""
129+
# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server
130+
steammaster="true"
131+
132+
## Stop Mode | https://docs.linuxgsm.com/features/stop-mode
133+
# 1: tmux kill
134+
# 2: CTRL+c
135+
# 3: quit
136+
# 4: quit 120s
137+
# 5: stop
138+
# 6: q
139+
# 7: exit
140+
# 8: 7 Days to Die
141+
# 9: GoldSrc
142+
# 10: Avorion
143+
# 11: end
144+
stopmode="3"
145+
146+
## Query mode
147+
# 1: session only
148+
# 2: gamedig (gsquery fallback)
149+
# 3: gamedig
150+
# 4: gsquery
151+
# 5: tcp
152+
querymode="2"
153+
querytype="protocol-valve"
154+
155+
## Console type
156+
consoleverbose="yes"
157+
consoleinteract="yes"
158+
159+
## Game Server Details
160+
# Do not edit
161+
gamename="Team Fortress 2 Classified"
162+
engine="source"
163+
glibc="2.15"
164+
165+
#### Directories ####
166+
# Edit with care
167+
168+
## Game Server Directories
169+
systemdir="${serverfiles}/tf2classified"
170+
supportdir="${serverfiles}/tf2"
171+
executabledir="${serverfiles}"
172+
executable="./srcds.sh"
173+
servercfgdir="${systemdir}/cfg"
174+
servercfg="${selfname}.cfg"
175+
servercfgdefault="server.cfg"
176+
servercfgfullpath="${servercfgdir}/${servercfg}"
177+
178+
## Backup Directory
179+
backupdir="${lgsmdir}/backup"
180+
181+
## Logging Directories
182+
[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log"
183+
gamelogdir="${systemdir}/logs"
184+
lgsmlogdir="${logdir}/script"
185+
consolelogdir="${logdir}/console"
186+
lgsmlog="${lgsmlogdir}/${selfname}-script.log"
187+
consolelog="${consolelogdir}/${selfname}-console.log"
188+
alertlog="${lgsmlogdir}/${selfname}-alert.log"
189+
postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log"
190+
191+
## Logs Naming
192+
lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log"
193+
consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log"
194+
195+
## Log Parameters
196+
logtimestamp="off"
197+
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
@@ -73,6 +73,9 @@ fn_dl_steamcmd() {
7373
${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}"
7474
elif [ -n "${branch}" ]; then
7575
${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}"
76+
elif [ -n "${baseappid}" ]; then
77+
${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +force_install_dir "${supportdir}" +login "${steamuser}" "${steampass}" +app_update "${appid}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}"
78+
${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}"
7679
else
7780
${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}"
7881
fi
@@ -82,6 +85,9 @@ fn_dl_steamcmd() {
8285
${unbuffer} ${steamcmdcommand} +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}"
8386
elif [ -n "${branch}" ]; then
8487
${unbuffer} ${steamcmdcommand} +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" -beta "${branch}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}"
88+
elif [ -n "${baseappid}" ]; then
89+
${unbuffer} ${steamcmdcommand} +force_install_dir "${supportdir}" +login "${steamuser}" "${steampass}" +app_update "${baseappid}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}"
90+
${unbuffer} ${steamcmdcommand} +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}"
8591
else
8692
${unbuffer} ${steamcmdcommand} +force_install_dir "${serverfiles}" +login "${steamuser}" "${steampass}" +app_update "${appid}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}"
8793
fi

lgsm/modules/install_config.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,11 @@ elif [ "${shortname}" == "sven" ]; then
696696
fn_default_config_remote
697697
fn_set_config_vars
698698
fn_list_config_locations
699+
elif [ "${shortname}" == "tf2classified" ]; then
700+
array_configs+=(server.cfg)
701+
fn_default_config_remote
702+
fn_set_config_vars
703+
fn_list_config_locations
699704
elif [ "${shortname}" == "tf2" ]; then
700705
array_configs+=(server.cfg)
701706
fn_default_config_remote

0 commit comments

Comments
 (0)