Skip to content

Commit f33bfdf

Browse files
authored
feat(new server): Counter Strike 2 (#4356)
* cs2 * config * fix: remove lo code * config * params * source2 * game info * messages * config changes * dirs * config * refactor: refactor info message functions in alert.sh, command_details.sh, command_dev_query_raw.sh, and command_postdetails.sh - Refactored the info message functions in multiple files to have consistent naming conventions. - Renamed fn_info_message_* functions to fn_info_messages_* for clarity and consistency. - Updated function calls accordingly. * refactor: remove unnecessary code duplication in info_game.sh The commit removes duplicated code for retrieving server information from the game configuration file. Specifically, it removes redundant lines related to rconpassword, rconport, and serverpassword. This improves code readability and maintainability. * cs2 * cs2 * cs2 icon * remove lo * remove file * remove lo * update url * ignore games with no configs * remove configs from games that have non * details check fix * details check * details check * ignore systemdir check if running github actions * fix name
1 parent ab0fb4f commit f33bfdf

38 files changed

+507
-259
lines changed

.github/workflows/details-check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ jobs:
5959
6060
- name: Download config
6161
run: |
62-
if [ -z "${{ steps.sets-servercfgname.outputs.servercfgname }}" ]; then
62+
if [ "${{ steps.sets-servercfgname.outputs.servercfgname }}" == "" ]; then
6363
echo "This game server has no config file."
6464
else
6565
curl -f -o config "https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/main/${{ matrix.shortname }}/${{ steps.sets-servercfgname.outputs.servercfgname }}"
6666
fi
6767
- name: Display config
6868
run: |
69-
if [ -z "${{ steps.sets-servercfgname.outputs.servercfgname }}" ]; then
69+
if [ "${{ steps.sets-servercfgname.outputs.servercfgname }}" == "" ]; then
7070
echo "This game server has no config file."
7171
else
7272
cat config

.github/workflows/detals-check-generate-matrix.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
curl "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/master/lgsm/data/serverlist.csv" | grep -v '^[[:blank:]]*$' > serverlist.csv
3+
curl "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/${GITHUB_REF#refs/heads/}/lgsm/data/serverlist.csv" | grep -v '^[[:blank:]]*$' > serverlist.csv
44

55
echo -n "{" > "shortnamearray.json"
66
echo -n "\"include\":[" >> "shortnamearray.json"
Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
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+
## SteamCMD Login | https://docs.linuxgsm.com/steamcmd#steamcmd-login
12+
steamuser="username"
13+
steampass='password'
14+
15+
## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters
16+
# https://docs.linuxgsm.com/game-servers/counter-strike-2
17+
# [Game Modes] gametype gamemode gamemodeflags skirmishid mapgroup (you can mix these across all Game Modes except Danger Zone, but use only one)
18+
# Arms Race 1 0 0 0 mg_armsrace
19+
# Boom! Headshot! 1 2 0 6 mg_skirmish_headshots
20+
# Classic Casual 0 0 0 0 mg_casualsigma, mg_casualdelta
21+
# Classic Competitive (Default) 0 1 0 0 mg_active, mg_reserves, mg_hostage, mg_de_dust2, ...
22+
# Classic Competitive (Short Match) 0 1 32 0 mg_active, mg_reserves, mg_hostage, mg_de_dust2, ...
23+
# Danger Zone 6 0 0 0 mg_dz_blacksite (map: dz_blacksite), mg_dz_sirocco (map: dz_sirocco)
24+
# Deathmatch (Default) 1 2 0 0 mg_deathmatch
25+
# Deathmatch (Free For All) 1 2 32 0 mg_deathmatch
26+
# Deathmatch (Team vs Team) 1 2 4 0 mg_deathmatch
27+
# Demolition 1 1 0 0 mg_demolition
28+
# Flying Scoutsman 0 0 0 3 mg_skirmish_flyingscoutsman
29+
# Hunter-Gatherers 1 2 0 7 mg_skirmish_huntergatherers
30+
# Retakes 0 0 0 12 mg_skirmish_retakes
31+
# Stab Stab Zap 0 0 0 1 mg_skirmish_stabstabzap
32+
# Trigger Discipline 0 0 0 4 mg_skirmish_triggerdiscipline
33+
# Wingman 0 2 0 0 mg_de_prime, mg_de_blagai, mg_de_vertigo, mg_de_inferno, mg_de_overpass, mg_de_cbble, mg_de_train, mg_de_shortnuke, mg_de_shortdust, mg_de_lake
34+
gametype="0"
35+
gamemode="1"
36+
gamemodeflags="0"
37+
skirmishid="0"
38+
mapgroup="mg_active"
39+
ip="0.0.0.0"
40+
port="27015"
41+
defaultmap="de_dust2"
42+
maxplayers="16"
43+
tickrate="64"
44+
45+
## Game Server Login Token (GSLT): Required
46+
# GSLT is required for running a public server.
47+
# More info: https://docs.linuxgsm.com/steamcmd/gslt
48+
gslt=""
49+
50+
## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
51+
startparameters="-dedicated +sv_setsteamaccount ${gslt} +map ${defaultmap} +game_type 0 +game_mode 1 +sv_logfile 1 -serverlogging +exec ${selfname}.cfg"
52+
53+
#### LinuxGSM Settings ####
54+
55+
## LinuxGSM Stats
56+
# Send useful stats to LinuxGSM developers.
57+
# https://docs.linuxgsm.com/configuration/linuxgsm-stats
58+
# (on|off)
59+
stats="off"
60+
61+
## Notification Alerts
62+
# (on|off)
63+
64+
# Display IP | https://docs.linuxgsm.com/alerts#display-ip
65+
displayip=""
66+
67+
# More info | https://docs.linuxgsm.com/alerts#more-info
68+
postalert="off"
69+
70+
# Alert on Start/Stop/Restart
71+
statusalert="off"
72+
73+
# Discord Alerts | https://docs.linuxgsm.com/alerts/discord
74+
discordalert="off"
75+
discordwebhook="webhook"
76+
77+
# Email Alerts | https://docs.linuxgsm.com/alerts/email
78+
emailalert="off"
79+
80+
emailfrom=""
81+
82+
# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify
83+
gotifyalert="off"
84+
gotifytoken="token"
85+
gotifywebhook="webhook"
86+
87+
# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt
88+
iftttalert="off"
89+
ifttttoken="accesstoken"
90+
iftttevent="linuxgsm_alert"
91+
92+
# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet
93+
pushbulletalert="off"
94+
pushbullettoken="accesstoken"
95+
channeltag=""
96+
97+
# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover
98+
pushoveralert="off"
99+
pushovertoken="accesstoken"
100+
pushoveruserkey="userkey"
101+
102+
# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat
103+
rocketchatalert="off"
104+
rocketchatwebhook="webhook"
105+
106+
# Slack Alerts | https://docs.linuxgsm.com/alerts/slack
107+
slackalert="off"
108+
slackwebhook="webhook"
109+
110+
# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram
111+
# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring".
112+
# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help".
113+
telegramapi="api.telegram.org"
114+
telegramalert="off"
115+
telegramtoken="accesstoken"
116+
telegramchatid=""
117+
curlcustomstring=""
118+
119+
## Updating | https://docs.linuxgsm.com/commands/update
120+
updateonstart="off"
121+
122+
## Backup | https://docs.linuxgsm.com/commands/backup
123+
maxbackups="4"
124+
maxbackupdays="30"
125+
stoponbackup="on"
126+
127+
## Logging | https://docs.linuxgsm.com/features/logging
128+
consolelogging="on"
129+
logdays="7"
130+
131+
## Monitor | https://docs.linuxgsm.com/commands/monitor
132+
# Query delay time
133+
querydelay="1"
134+
135+
## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors
136+
ansi="on"
137+
138+
#### Advanced Settings ####
139+
140+
## Message Display Time | https://docs.linuxgsm.com/features/message-display-time
141+
sleeptime="0.5"
142+
143+
## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd
144+
# Server appid
145+
appid="730"
146+
steamcmdforcewindows="no"
147+
# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch
148+
branch=""
149+
betapassword=""
150+
# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server
151+
steammaster="true"
152+
153+
## Stop Mode | https://docs.linuxgsm.com/features/stop-mode
154+
# 1: tmux kill
155+
# 2: CTRL+c
156+
# 3: quit
157+
# 4: quit 120s
158+
# 5: stop
159+
# 6: q
160+
# 7: exit
161+
# 8: 7 Days to Die
162+
# 9: GoldSrc
163+
# 10: Avorion
164+
# 11: end
165+
stopmode="9"
166+
167+
## Query mode
168+
# 1: session only
169+
# 2: gamedig (gsquery fallback)
170+
# 3: gamedig
171+
# 4: gsquery
172+
# 5: tcp
173+
querymode="2"
174+
querytype="protocol-valve"
175+
176+
## Console type
177+
consoleverbose="yes"
178+
consoleinteract="yes"
179+
180+
## Game Server Details
181+
# Do not edit
182+
gamename="Counter-Strike 2"
183+
engine="source2"
184+
glibc="2.31"
185+
186+
#### Directories ####
187+
# Edit with care
188+
189+
## Game Server Directories
190+
systemdir="${serverfiles}/game/csgo"
191+
executabledir="${serverfiles}/game/bin/linuxsteamrt64"
192+
executable="./cs2"
193+
servercfgdir="${systemdir}/cfg"
194+
servercfg="${selfname}.cfg"
195+
servercfgdefault="server.cfg"
196+
servercfgfullpath="${servercfgdir}/${servercfg}"
197+
198+
## Backup Directory
199+
backupdir="${lgsmdir}/backup"
200+
201+
## Logging Directories
202+
[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log"
203+
gamelogdir="${systemdir}/logs"
204+
lgsmlogdir="${logdir}/script"
205+
consolelogdir="${logdir}/console"
206+
lgsmlog="${lgsmlogdir}/${selfname}-script.log"
207+
consolelog="${consolelogdir}/${selfname}-console.log"
208+
alertlog="${lgsmlogdir}/${selfname}-alert.log"
209+
postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log"
210+
211+
## Logs Naming
212+
lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log"
213+
consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log"
214+
215+
## Log Parameters
216+
logtimestamp="off"
217+
logtimestampformat="%Y-%m-%d %H:%M:%S"

lgsm/config-default/config-lgsm/inssserver/_default.cfg

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,6 @@ glibc="2.17"
168168
systemdir="${serverfiles}/Insurgency"
169169
executabledir="${systemdir}/Binaries/Linux"
170170
executable="./InsurgencyServer-Linux-Shipping"
171-
servercfgdir="${systemdir}/Saved/Config/LinuxServer"
172-
servercfg="Game.ini"
173-
servercfgdefault="Game.ini"
174171

175172
## Backup Directory
176173
backupdir="${lgsmdir}/backup"

lgsm/config-default/config-lgsm/sbotsserver/_default.cfg

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,6 @@ glibc="2.17"
157157
systemdir="${serverfiles}"
158158
executabledir="${systemdir}/blank1/Binaries/Linux"
159159
executable="./blank1Server-Linux-Shipping"
160-
servercfgdir="${systemdir}/blank1/Saved/Config/LinuxServer"
161-
servercfg="Game.ini"
162-
servercfgdefault="Game.ini"
163-
servercfgfullpath="${servercfgdir}/${servercfg}"
164-
165160
## Backup Directory
166161
backupdir="${lgsmdir}/backup"
167162

lgsm/data/almalinux-8.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ coduo,compat-libstdc++-33.i686
2929
codwaw
3030
col
3131
cs
32+
cs2
3233
cscz
3334
csgo
3435
css,ncurses-libs.i686
@@ -64,7 +65,6 @@ kf
6465
kf2
6566
l4d
6667
l4d2
67-
lo
6868
mc,java-17-openjdk
6969
mcb,libnsl
7070
mh

lgsm/data/almalinux-9.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ coduo,compat-libstdc++-33.i686
2929
codwaw
3030
col
3131
cs
32+
cs2
3233
cscz
3334
csgo
3435
css,ncurses-libs.i686
@@ -64,7 +65,6 @@ kf
6465
kf2
6566
l4d
6667
l4d2
67-
lo
6868
mc,java-17-openjdk
6969
mcb,libnsl
7070
mh

lgsm/data/centos-7.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ coduo,compat-libstdc++-33.i686
2929
codwaw
3030
col
3131
cs
32+
cs2
3233
cscz
3334
csgo
3435
css,ncurses-libs.i686
@@ -64,7 +65,6 @@ kf
6465
kf2
6566
l4d
6667
l4d2
67-
lo
6868
mc,java-11-openjdk
6969
mcb,libnsl
7070
mh

lgsm/data/centos-8.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ coduo,compat-libstdc++-33.i686
2929
codwaw
3030
col
3131
cs
32+
cs2
3233
cscz
3334
csgo
3435
css,ncurses-libs.i686
@@ -64,7 +65,6 @@ kf
6465
kf2
6566
l4d
6667
l4d2
67-
lo
6868
mc,java-17-openjdk
6969
mcb,libnsl
7070
mh

lgsm/data/centos-9.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ coduo,compat-libstdc++-33.i686
2929
codwaw
3030
col
3131
cs
32+
cs2
3233
cscz
3334
csgo
3435
css,ncurses-libs.i686
@@ -64,7 +65,6 @@ kf
6465
kf2
6566
l4d
6667
l4d2
67-
lo
6868
mc,java-17-openjdk
6969
mcb,libnsl
7070
mh

0 commit comments

Comments
 (0)