Default to passwordless server. Update documentation to reflect this.

This commit is contained in:
John Edwards 2025-01-14 14:35:34 +00:00
parent 9b64edf1e3
commit ff2cfc51d3
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.) 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_LAN="0" (0 - LAN mode disabled, 1 - LAN Mode enabled)
CS2_RCONPW="changeme" (RCON password) CS2_RCONPW="changeme" (RCON password)
CS2_PW="changeme" (CS2 server password) CS2_PW="" (Optional, CS2 server password)
CS2_MAXPLAYERS=10 (Max players) CS2_MAXPLAYERS=10 (Max players)
CS2_ADDITIONAL_ARGS="" (Optional additional arguments to pass into cs2) 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_RCON_PORT="" \
CS2_MAXPLAYERS=10 \ CS2_MAXPLAYERS=10 \
CS2_RCONPW="changeme" \ CS2_RCONPW="changeme" \
CS2_PW="changeme" \
CS2_MAPGROUP="mg_active" \ CS2_MAPGROUP="mg_active" \
CS2_STARTMAP="de_inferno" \ CS2_STARTMAP="de_inferno" \
CS2_GAMEALIAS="" \ CS2_GAMEALIAS="" \

View file

@ -35,7 +35,7 @@ fi
# Download and extract custom config bundle # Download and extract custom config bundle
if [[ ! -z $CS2_CFG_URL ]]; then if [[ ! -z $CS2_CFG_URL ]]; then
echo "Downloading config pack from ${CS2_CFG_URL}" echo "Downloading config pack from ${CS2_CFG_URL}"
TEMP_DIR=$(mktemp -d) TEMP_DIR=$(mktemp -d)
TEMP_FILE="${TEMP_DIR}/$(basename ${CS2_CFG_URL})" TEMP_FILE="${TEMP_DIR}/$(basename ${CS2_CFG_URL})"
wget -qO "${TEMP_FILE}" "${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}" CS2_HOST_WORKSHOP_MAP_ARGS="+host_workshop_map ${CS2_HOST_WORKSHOP_MAP}"
fi fi
if [[ ! -z $CS2_PW ]]; then
CS2_PW_ARGS="+sv_password ${CS2_PW}"
fi
# Start Server # Start Server
if [[ ! -z $CS2_RCON_PORT ]]; then if [[ ! -z $CS2_RCON_PORT ]]; then
@ -156,7 +160,7 @@ eval "./cs2" -dedicated \
"${CS2_MP_MATCH_END_CHANGELEVEL}" \ "${CS2_MP_MATCH_END_CHANGELEVEL}" \
+rcon_password "${CS2_RCONPW}" \ +rcon_password "${CS2_RCONPW}" \
"${SV_SETSTEAMACCOUNT_ARGS}" \ "${SV_SETSTEAMACCOUNT_ARGS}" \
+sv_password "${CS2_PW}" \ "${CS2_PW_ARGS}" \
+sv_lan "${CS2_LAN}" \ +sv_lan "${CS2_LAN}" \
+tv_port "${TV_PORT}" \ +tv_port "${TV_PORT}" \
"${CS2_ADDITIONAL_ARGS}" "${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_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_LAN=0 # (0 - LAN mode disabled, 1 - LAN Mode enabled)
- CS2_RCONPW=changeme # (RCON password) - CS2_RCONPW=changeme # (RCON password)
- CS2_PW=changeme # (CS2 server password) - CS2_PW # (Optional, CS2 server password)
- CS2_MAXPLAYERS=10 # (Max players) - CS2_MAXPLAYERS=10 # (Max players)
- CS2_ADDITIONAL_ARGS # (Optional additional arguments to pass into cs2) - 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 - CS2_CFG_URL # HTTP/HTTPS URL to fetch a Tar Gzip bundle, Tar or Zip archive of configuration files/mods