From 4a3e7ad0c7b426293479231d4475c2c0ab2854cb Mon Sep 17 00:00:00 2001 From: Djeeberjr Date: Mon, 15 Nov 2021 00:02:04 +0100 Subject: [PATCH] added insecure mode --- docker-compose.yml | 3 ++- start.sh | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 6e26afb..31fac74 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,9 +7,10 @@ services: - CVAR_HOSTNAME=My left 4 dead server - CVAR_RCON_PASSWORD=password123 - CVAR_SV_ALLOW_LOBBY_CONNECT_ONLY=0 - - CVAR_SV_CONSISTENCY=1 + - CVAR_SV_CONSISTENCY=0 - CAVR_SV_VOICEENABLE=1 - CVAR_MP_DISABLE_AUTOKICK=1 + - INSECURE=true - "MOTD_FILE_CONTENT=Put your MODT here. \n Multiline is also supported." - "HOST_FILE_CONTENT=Same with the host file \n diff --git a/start.sh b/start.sh index c900ed1..ff9048d 100755 --- a/start.sh +++ b/start.sh @@ -25,4 +25,11 @@ env | awk -F "=" '/^CVAR_/ {sub("CVAR_","",$1); print tolower($1),($2 ~ /^[0-9]+ cat /home/steam/server/left4dead2/cfg/server.cfg -"$HOME/server/srcds_run" -console -game left4dead2 +maxplayers 16 -maxclients 16 -ip 0.0.0.0 +SRCDS_ARGS="" + +if [ -n "$INSECURE" ]; then + SRCDS_ARGS="${SRCDS_ARGS} -insecure" + echo "Running with VAC disabled." +fi + +"$HOME/server/srcds_run" -console -game left4dead2 +maxplayers 16 -maxclients 16 -ip 0.0.0.0 $SRCDS_ARGS