sv_lan induced segfault and CS2_IP fixes

This commit is contained in:
John Edwards 2023-11-05 21:09:57 +00:00
parent 47b89294f1
commit 2830f2132f
3 changed files with 9 additions and 4 deletions

View file

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

View file

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