Merge pull request #148 from joedwards32/147-support-passwordless-servers

Default to passwordless server. Update documentation to reflect this.
This commit is contained in:
John Edwards 2025-01-23 20:36:05 +00:00 committed by GitHub
commit 4f1a095bf6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 8 additions and 5 deletions

View file

@ -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)
```

View file

@ -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="" \

View file

@ -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}"
@ -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
@ -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}"

View file

@ -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