From 248559cc4a14502a66f6e3af4d92f7f297d59a80 Mon Sep 17 00:00:00 2001 From: Djeeberjr Date: Tue, 16 Nov 2021 16:55:36 +0100 Subject: [PATCH] update url env --- Dockerfile | 2 ++ README.md | 5 ++++- start.sh | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index cd04ad1..c5fddee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,4 +3,6 @@ RUN mkdir -p /home/steam/server COPY start.sh /home/steam/start.sh VOLUME "/home/steam/server" WORKDIR /home/steam/ +ENV METAMOD_DL_URL "https://mms.alliedmods.net/mmsdrop/1.11/mmsource-1.11.0-git1145-linux.tar.gz" +ENV SOURCEMOD_DL_URL "https://sm.alliedmods.net/smdrop/1.10/sourcemod-1.10.0-git6524-linux.tar.gz" ENTRYPOINT /home/steam/start.sh diff --git a/README.md b/README.md index 5b90455..1c80bb1 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Left 4 dead 2 server. +Left 4 dead 2 server. With Metamod and Sourcemod. # Ports - 27015 @@ -15,3 +15,6 @@ So for example to set the RCON password set the enviroment variable `CVAR_RCON_P Try to avoid variables with the word `CVAR_` and avoid `=` in it. A list of available cvars can be found [here](https://developer.valvesoftware.com/wiki/List_of_L4D2_Cvars). + +If there is a new version of Metamod or Sourcemod and is not yet set in the image you can manually set the download URL in `METAMOD_DL_URL` and `SOURCEMOD_DL_URL`. +It will only get update if the addon directory is empty. diff --git a/start.sh b/start.sh index ff9048d..54bbb00 100755 --- a/start.sh +++ b/start.sh @@ -7,12 +7,12 @@ set -e if [ ! -e "$HOME/server/left4dead2/addons/metamod.vdf" ]; then echo "Installing Metamod" - curl https://mms.alliedmods.net/mmsdrop/1.11/mmsource-1.11.0-git1145-linux.tar.gz -o /tmp/metamod.tar.gz + curl "$METAMOD_DL_URL" -o /tmp/metamod.tar.gz tar -xf /tmp/metamod.tar.gz -C "$HOME/server/left4dead2" rm /tmp/metamod.tar.gz echo "Install Sourcemod" - curl https://sm.alliedmods.net/smdrop/1.10/sourcemod-1.10.0-git6524-linux.tar.gz -o /tmp/sourcemod.tar.gz + curl "$SOURCEMOD_DL_URL" -o /tmp/sourcemod.tar.gz tar -xf /tmp/sourcemod.tar.gz -C "$HOME/server/left4dead2" rm /tmp/sourcemod.tar.gz fi