cs16-dm-server: CS 1.6 deathmatch server in Docker
One-command setup (SteamCMD + pinned, checksum-verified ReHLDS / ReGameDLL / Metamod-R / AMXX / ReAPI / ReUnion / CSDM-ReAPI / YaPB / GunGame), .env settings, ./cs menu (map, DM/GunGame mode, bots, kill counter, restart, update), own plugins (extras, rtv, mode switch), all-time kill counter, watchdog + nightly backup, docs for admins and players. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
commit
7e9cbee14d
33 files changed
+1890
No files matched your search
Executable
+28
@@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
# Container entry point: writes the .env values into the game configs, then starts the server.
|
||||
# Runs at every container start, so edit .env (not these files) and run: docker compose up -d
|
||||
set -e
|
||||
C=/cs/hlds/cstrike
|
||||
clean() { printf '%s' "$1" | tr -d '"\r'; } # no double quotes inside cfg strings
|
||||
|
||||
{
|
||||
echo "// written from .env by tools/start.sh at every start: edit .env instead"
|
||||
echo "hostname \"$(clean "$CS_HOSTNAME")\""
|
||||
} > $C/env.cfg
|
||||
|
||||
# secrets.cfg holds the RCON + join password: readable only by the server user
|
||||
umask 077
|
||||
{
|
||||
echo "// written by tools/start.sh at every start (RCON: secrets/rcon-password.txt, join: CS_PASSWORD in .env)"
|
||||
echo "rcon_password \"$(tr -d '"\r\n' < /cs/secrets/rcon-password.txt)\""
|
||||
echo "sv_password \"$(clean "$CS_PASSWORD")\""
|
||||
} > $C/secrets.cfg
|
||||
umask 022
|
||||
|
||||
sed -i -e "s/^yb_quota \".*\"/yb_quota \"${CS_BOTS:-0}\"/" \
|
||||
-e "s/^yb_difficulty \".*\"/yb_difficulty \"${CS_BOT_DIFFICULTY:-2}\"/" \
|
||||
$C/addons/yapb/conf/yapb.cfg
|
||||
|
||||
cd /cs/hlds
|
||||
exec ./hlds_run -game cstrike -port "${CS_PORT:-27015}" +maxplayers "${CS_MAXPLAYERS:-16}" \
|
||||
+map "${CS_MAP:-de_dust2}" -pingboost 2 -norestart +log on
|
||||
Reference in new issue
Block a user