From ab134d25da61fd740b274565d71861a484e4322e Mon Sep 17 00:00:00 2001 From: Niklas Date: Mon, 12 Apr 2021 17:35:34 +0200 Subject: [PATCH] preset config --- .gitignore | 1 + Dockerfile | 1 + server.cfg | 14 ++++++++++++++ start.sh | 1 + 4 files changed, 17 insertions(+) create mode 100644 server.cfg diff --git a/.gitignore b/.gitignore index 1d5ca22..6a92282 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ !start.sh !README.md !.drone.yml +!server.cfg \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 360dd61..7938687 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,7 @@ FROM cm2network/steamcmd:latest COPY start.sh /home/steam/start.sh +COPY server.cfg /home/steam/server.cfg WORKDIR /home/steam/ diff --git a/server.cfg b/server.cfg new file mode 100644 index 0000000..8dbc501 --- /dev/null +++ b/server.cfg @@ -0,0 +1,14 @@ +hostname "Left4Dead2 Server" + +sv_allow_lobby_connect_only "0" + +mp_disable_autokick "1" +sv_alltalk "0" +sv_consistency "1" +sv_voiceenable "1" + +sv_log_onefile "0" +sv_logbans "1" +sv_lan "0" +sv_pure "1" +sv_cheats "0" diff --git a/start.sh b/start.sh index 387989d..fe24ac9 100755 --- a/start.sh +++ b/start.sh @@ -9,6 +9,7 @@ echo "### Installing / Updateing l4d2 ###" echo "### Creating config ###" cd $HOME/server +cp $HOME/server.cfg server.cfg env | awk -F "=" '/^CVAR_/ {sub("CVAR_","",$1); print tolower($1),($2 ~ /^[0-9]+$/)?$2:"\""$2"\""}' > docker_server.cfg