Skip to content

Commit

Permalink
Default to passwordless server. Update documentation to reflect this.
Browse files Browse the repository at this point in the history
  • Loading branch information
joedwards32 committed Jan 14, 2025
1 parent 9b64edf commit ff2cfc5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ CS2_RCON_PORT="" (Optional, use a simple TCP proxy to have RCON liste
Useful for services like AWS Fargate which do not support mixed protocol ports.)
CS2_LAN="0" (0 - LAN mode disabled, 1 - LAN Mode enabled)
CS2_RCONPW="changeme" (RCON password)
CS2_PW="changeme" (CS2 server password)
CS2_PW="" (Optional, CS2 server password)
CS2_MAXPLAYERS=10 (Max players)
CS2_ADDITIONAL_ARGS="" (Optional additional arguments to pass into cs2)
```
Expand Down
1 change: 0 additions & 1 deletion bookworm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ ENV CS2_SERVERNAME="cs2 private server" \
CS2_RCON_PORT="" \
CS2_MAXPLAYERS=10 \
CS2_RCONPW="changeme" \
CS2_PW="changeme" \
CS2_MAPGROUP="mg_active" \
CS2_STARTMAP="de_inferno" \
CS2_GAMEALIAS="" \
Expand Down
8 changes: 6 additions & 2 deletions bookworm/etc/entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fi
# Download and extract custom config bundle
if [[ ! -z $CS2_CFG_URL ]]; then
echo "Downloading config pack from ${CS2_CFG_URL}"

TEMP_DIR=$(mktemp -d)
TEMP_FILE="${TEMP_DIR}/$(basename ${CS2_CFG_URL})"
wget -qO "${TEMP_FILE}" "${CS2_CFG_URL}"
Expand Down Expand Up @@ -135,6 +135,10 @@ if [[ ! -z $CS2_HOST_WORKSHOP_MAP ]]; then
CS2_HOST_WORKSHOP_MAP_ARGS="+host_workshop_map ${CS2_HOST_WORKSHOP_MAP}"
fi

if [[ ! -z $CS2_PW ]]; then
CS2_PW_ARGS="+sv_password ${CS2_PW}"
fi

# Start Server

if [[ ! -z $CS2_RCON_PORT ]]; then
Expand All @@ -156,7 +160,7 @@ eval "./cs2" -dedicated \
"${CS2_MP_MATCH_END_CHANGELEVEL}" \
+rcon_password "${CS2_RCONPW}" \
"${SV_SETSTEAMACCOUNT_ARGS}" \
+sv_password "${CS2_PW}" \
"${CS2_PW_ARGS}" \
+sv_lan "${CS2_LAN}" \
+tv_port "${TV_PORT}" \
"${CS2_ADDITIONAL_ARGS}"
Expand Down
2 changes: 1 addition & 1 deletion examples/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
- CS2_RCON_PORT # (Optional, use a simple TCP proxy to have RCON listen on an alternative port. Useful for services like AWS Fargate which do not support mixed protocol ports.)
- CS2_LAN=0 # (0 - LAN mode disabled, 1 - LAN Mode enabled)
- CS2_RCONPW=changeme # (RCON password)
- CS2_PW=changeme # (CS2 server password)
- CS2_PW # (Optional, CS2 server password)
- CS2_MAXPLAYERS=10 # (Max players)
- CS2_ADDITIONAL_ARGS # (Optional additional arguments to pass into cs2)
- CS2_CFG_URL # HTTP/HTTPS URL to fetch a Tar Gzip bundle, Tar or Zip archive of configuration files/mods
Expand Down

0 comments on commit ff2cfc5

Please sign in to comment.