diff --git a/README.md b/README.md index a4dfe1d..a03727c 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ STEAMGUARD="" (Optional, Steam Guard key if enabled. Use your most ```dockerfile CS2_SERVERNAME="changeme" (Set the visible name for your private server) -CS2_IP=0.0.0.0 (CS2 server listening IP address, 0.0.0.0 - all IP addresses on the local machine, empty - IP identified automatically) +CS2_IP="" (CS2 server listening IP address, 0.0.0.0 - all IP addresses on the local machine, empty - IP identified automatically) CS2_PORT=27015 (CS2 server listen port tcp_udp) 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.) diff --git a/bullseye/etc/entry.sh b/bullseye/etc/entry.sh index 235c216..cae0ca0 100644 --- a/bullseye/etc/entry.sh +++ b/bullseye/etc/entry.sh @@ -19,7 +19,6 @@ cp /etc/server.cfg "${STEAMAPPDIR}"/game/csgo/cfg/server.cfg sed -i -e "s/{{SERVER_HOSTNAME}}/${CS2_SERVERNAME}/g" \ -e "s/{{SERVER_PW}}/${CS2_PW}/g" \ -e "s/{{SERVER_RCON_PW}}/${CS2_RCONPW}/g" \ - -e "s/{{SERVER_LAN}}/${CS2_LAN}/g" \ -e "s/{{TV_ENABLE}}/${TV_ENABLE}/g" \ -e "s/{{TV_PORT}}/${TV_PORT}/g" \ -e "s/{{TV_AUTORECORD}}/${TV_AUTORECORD}/g" \ @@ -65,6 +64,12 @@ else CS2_GAME_MODE_ARGS="+game_alias ${CS2_GAMEALIAS}" fi +if [[ -z $CS2_IP ]]; then + CS2_IP_ARGS="" +else + CS2_IP_ARGS="-ip ${CS2_IP}" +fi + # Start Server if [[ ! -z $CS2_RCON_PORT ]]; then @@ -73,7 +78,7 @@ if [[ ! -z $CS2_RCON_PORT ]]; then fi eval "./cs2" -dedicated \ - -ip "${CS2_IP}" -port "${CS2_PORT}" \ + "${CS2_IP_ARGS}" -port "${CS2_PORT}" \ -console \ -usercon \ -maxplayers "${CS2_MAXPLAYERS}" \ @@ -82,6 +87,7 @@ eval "./cs2" -dedicated \ +map "${CS2_STARTMAP}" \ +rcon_password "${CS2_RCONPW}" \ +sv_password "${CS2_PW}" \ + +sv_lan "${CS2_LAN}" \ "${CS2_ADDITIONAL_ARGS}" # Post Hook diff --git a/bullseye/etc/server.cfg b/bullseye/etc/server.cfg index eea3fd4..007e8a4 100644 --- a/bullseye/etc/server.cfg +++ b/bullseye/etc/server.cfg @@ -1,7 +1,6 @@ // Server Defaults hostname "{{SERVER_HOSTNAME}}" // Set server hostname -sv_lan {{SERVER_LAN}} // If a server is a LAN server there is no heartbeat, no Steam authentication, and no non-class C addresses // Passwords