Skip to content

Instantly share code, notes, and snippets.

@alexole
Last active March 30, 2021 15:08
Show Gist options
  • Save alexole/4e9c349a3f5ef715cc1ddde3728db4ee to your computer and use it in GitHub Desktop.
Save alexole/4e9c349a3f5ef715cc1ddde3728db4ee to your computer and use it in GitHub Desktop.
sudo dnf config-manager \
--add-repo \
https://download.docker.com/linux/fedora/docker-ce.repo
sudo dnf install -y docker-ce docker-ce-cli containerd.io
sudo systemctl start docker
docker run -d -p 27000-27015:27000-27015/udp -p 6003:6003/udp -p 7002:7002/udp cm2network/steamcmd
# login to container
docker run -p 27015:27015/udp -p 27015:27015 -it cm2network/steamcmd bash
cat << EOF > cs.txt
login anonymous
force_install_dir ./cs
@ShutdownOnFailedCommand 0
app_update 90
app_update 90 validate
quit
EOF
./steamcmd.sh +runscript cs.txt # Re-run until succeeds
cat << EOF > ./cs/cstrike/server.cfg
// Use this file to configure your DEDICATED server.
// This config file is executed on server start.
// disable autoaim
sv_aim 0
// disable clients' ability to pause the server
pausable 0
// default server name. Change to "Bob's Server", etc.
hostname "Team Brute Force"
// maximum client movement speed
sv_maxspeed 320
// 20 minute timelimit
mp_timelimit 20
sv_cheats 0
// load ban files
//exec listip.cfg
//exec banned.cfg
rcon_password "<rcon_password>"
sv_password "<password>"
mp_roundtime 3
mp_freezetime 3
EOF
cd ./cs
./hlds_run -game cstrike -console +maxplayers 8 +map de_dust2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment