Skip to content

Commit

Permalink
fix(tf2-mge): verify plugins' checksums (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
garrappachc authored Jan 7, 2022
1 parent 0537b9b commit 69186ac
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 11 deletions.
32 changes: 21 additions & 11 deletions packages/tf2-mge/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
FROM melkortf/tf2-sourcemod
LABEL maintainer="garrappachc@gmail.com"

RUN rm $SERVER_DIR/tf/addons/sourcemod/plugins/{nextmap,funcommands,funvotes}.smx
COPY checksum.md5 .

RUN wget -nv "https://github.com/sapphonie/MGEMod/archive/master.zip" -O "mgemod.zip" \
&& unzip mgemod.zip \
&& cp -r MGEMod-master/addons "$SERVER_DIR/tf/" \
&& rm -rf MGEMod-master \
&& rm -f mgemod.zip \
&& wget -nv "https://www.sourcemod.net/vbcompiler.php?file_id=170330" -O "${SERVER_DIR}/tf/addons/sourcemod/plugins/afk_manager4.smx" \
&& wget -nv "https://forums.alliedmods.net/attachment.php?attachmentid=166646&d=1510967008" -O "${SERVER_DIR}/tf/addons/sourcemod/translations/afk_manager.phrases.txt" \
&& wget -nv "https://github.com/sbpp/sourcebans-pp/releases/download/1.6.3/sourcebans-pp-1.6.3.plugin-only.tar.gz" \
&& tar xf "sourcebans-pp-1.6.3.plugin-only.tar.gz" -C "${SERVER_DIR}/tf" --strip-components=1 \
&& rm -rf "sourcebans-pp-1.6.3.plugin-only.tar.gz"
RUN rm "${SERVER_DIR}/tf/addons/sourcemod/plugins/"{funcommands,funvotes}.smx

RUN \
# download plugins
wget -nv "https://github.com/sapphonie/MGEMod/archive/master.zip" -O "mgemod.zip" \
&& SOURCEBANS_FILE_NAME="sourcebans-pp-1.6.3.plugin-only.tar.gz" \
&& wget -nv "https://github.com/sbpp/sourcebans-pp/releases/download/1.6.3/${SOURCEBANS_FILE_NAME}" \
&& wget -nv "https://www.sourcemod.net/vbcompiler.php?file_id=170330" -O "afk_manager4.smx" \
&& wget -nv "https://forums.alliedmods.net/attachment.php?attachmentid=166646&d=1510967008" -O "afk_manager.phrases.txt" \
# verify checksums
&& md5sum -c checksum.md5 \
# install plugins
&& unzip -q "mgemod.zip" && cp -r "MGEMod-master/addons" "${SERVER_DIR}/tf/" \
&& tar xf "${SOURCEBANS_FILE_NAME}" -C "${SERVER_DIR}/tf" --strip-components=1 \
&& mv "afk_manager4.smx" "${SERVER_DIR}/tf/addons/sourcemod/plugins/afk_manager4.smx" \
&& mv "afk_manager.phrases.txt" "${SERVER_DIR}/tf/addons/sourcemod/translations/afk_manager.phrases.txt" \
# cleanup
&& rm -r "MGEMod-master" "mgemod.zip" \
&& rm "${SOURCEBANS_FILE_NAME}" \
&& rm "checksum.md5"

ENV SELECTED_MAP="mge_training_v8_beta4b"

Expand Down
3 changes: 3 additions & 0 deletions packages/tf2-mge/checksum.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bea658e4250975674b0307a49bb85120 afk_manager4.smx
708628b1e39014e28f7119dc7f096041 afk_manager.phrases.txt
4fa177bc3c9fec76cbba10c51ea53d4e mgemod.zip

0 comments on commit 69186ac

Please sign in to comment.