From 03a471cd0ff180d7c6daa20219ee7e4a766f80c3 Mon Sep 17 00:00:00 2001 From: Djeeberjr Date: Thu, 15 Sep 2022 13:28:44 +0200 Subject: [PATCH] added mod exclude --- docker-compose.yml | 1 + entrypoint.sh | 21 +++++++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 7a91dc2..0b59c63 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,6 +8,7 @@ services: STEAM_USER: testo STEAM_PASSWORD: testo WORKSHOP_COLLECTION: 1400118996 + MOD_EXCLUDE: 667953829,1210050323,925018569,837729515,2041057379 volumes: - arma3_dev_game:/home/steam/server - arma3_dev_mods:/home/steam/volumes/mods diff --git a/entrypoint.sh b/entrypoint.sh index 71b0106..ca8411f 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -51,18 +51,23 @@ mkdir -p "$MOD_LINK_DIR" rm -f "$MOD_LINK_DIR"/* MODS_TO_LOAD="" +MOD_EXCLUDE=${MOD_EXCLUDE:=""} for mod_id in $(curl -s "https://steamcommunity.com/sharedfiles/filedetails/?id=$WORKSHOP_COLLECTION" | grep -E 'id="sharedfile_[0-9]+"' | sed 's/.*id="sharedfile_\([0-9]\+\)".*/\1/') do - # Check if directory exists - if [ ! -d "$VOLUME_HOME/mods/$mod_id" ]; then - echo "Could not find mod directory for $mod_id" - echo "Try to download it first" - exit 1 - fi - ln -s "$VOLUME_HOME/mods/$mod_id" "$MOD_LINK_DIR/$mod_id" - MODS_TO_LOAD="${MODS_TO_LOAD}mods/${mod_id};" + # Check if mod is excluded + if [[ "$MOD_EXCLUDE" == *"$mod_id"* ]]; then + # Check if directory exists + if [ ! -d "$VOLUME_HOME/mods/$mod_id" ]; then + echo "Could not find mod directory for $mod_id" + echo "Try to download it first" + exit 1 + fi + + ln -s "$VOLUME_HOME/mods/$mod_id" "$MOD_LINK_DIR/$mod_id" + MODS_TO_LOAD="${MODS_TO_LOAD}mods/${mod_id};" + fi done if [ -n "$MODS_TO_LOAD" ]; then