fill server.cfg directly
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
d8a5c6a064
commit
c3494df3b5
@ -1,7 +1,6 @@
|
||||
FROM cm2network/steamcmd:latest
|
||||
|
||||
COPY start.sh /home/steam/start.sh
|
||||
COPY server.cfg /home/steam/server.cfg
|
||||
|
||||
WORKDIR /home/steam/
|
||||
|
||||
|
@ -6,8 +6,11 @@ services:
|
||||
environment:
|
||||
- CVAR_HOSTNAME=My left 4 dead server
|
||||
- CVAR_RCON_PASSWORD=password123
|
||||
- CVAR_SV_ALLOW_LOBBY_CONNECT_ONLY=0
|
||||
- CVAR_SV_CONSISTENCY=1
|
||||
- CAVR_SV_VOICEENABLE=1
|
||||
- CVAR_MP_DISABLE_AUTOKICK=1
|
||||
volume:
|
||||
volumes:
|
||||
- ./motd.txt:/motd.txt:ro
|
||||
- ./host:txt:/host.txt:ro
|
||||
ports:
|
||||
|
12
server.cfg
12
server.cfg
@ -1,12 +0,0 @@
|
||||
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_lan "0"
|
||||
sv_cheats "0"
|
7
start.sh
7
start.sh
@ -8,10 +8,7 @@ echo "### Installing / Updateing l4d2 ###"
|
||||
|
||||
echo "### Creating config ###"
|
||||
|
||||
cd $HOME/server
|
||||
cp $HOME/server.cfg $HOME/server/left4dead2/cfg/server.cfg
|
||||
|
||||
env | awk -F "=" '/^CVAR_/ {sub("CVAR_","",$1); print tolower($1),($2 ~ /^[0-9]+$/)?$2:"\""$2"\""}' > docker_server.cfg
|
||||
env | awk -F "=" '/^CVAR_/ {sub("CVAR_","",$1); print tolower($1),($2 ~ /^[0-9]+$/)?$2:"\""$2"\""}' > $HOME/server/left4dead2/cfg/server.cfg
|
||||
|
||||
echo "### Using follwing config: "
|
||||
cat $HOME/server/left4dead2/cfg/server.cfg
|
||||
@ -31,4 +28,4 @@ fi
|
||||
|
||||
echo "### Starting l4d2 ###"
|
||||
|
||||
$HOME/server/srcds_run -console -game left4dead2 +maxplayers 16 -maxclients 16 -ip 0.0.0.0 +map c1m1_hotel +exec docker_server.cfg
|
||||
$HOME/server/srcds_run -console -game left4dead2 +maxplayers 16 -maxclients 16 -ip 0.0.0.0 +map c1m1_hotel
|
||||
|
Loading…
Reference in New Issue
Block a user