diff --git a/Dockerfile b/Dockerfile index 880bc86..64ca2d6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,4 +8,7 @@ USER steam 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/entrypoint.sh diff --git a/entrypoint.sh b/entrypoint.sh index 667cae3..3cd42b0 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -4,6 +4,20 @@ set -eo pipefail /home/steam/steamcmd/steamcmd.sh +login anonymous +force_install_dir /home/steam/server +app_update 740 +quit + +if [ ! -e "$HOME/server/csgo/addons/metamod.vdf" ]; then + echo "Installing Metamod" + curl "$METAMOD_DL_URL" -o /tmp/metamod.tar.gz + tar -xf /tmp/metamod.tar.gz -C "$HOME/server/csgo" + rm /tmp/metamod.tar.gz + + echo "Install Sourcemod" + curl "$SOURCEMOD_DL_URL" -o /tmp/sourcemod.tar.gz + tar -xf /tmp/sourcemod.tar.gz -C "$HOME/server/csgo" + rm /tmp/sourcemod.tar.gz +fi + + SRCDS_ARGS="-usercon" if [ -n "$GSLT" ]; then