Compare commits

..

6 Commits

Author SHA1 Message Date
ae95e1b037 fixed rename mods [CI SKIP] 2022-09-18 21:42:55 +02:00
d6ec41c269 fixed exclude
All checks were successful
continuous-integration/drone/push Build is passing
2022-09-15 13:34:56 +02:00
03a471cd0f added mod exclude
All checks were successful
continuous-integration/drone/push Build is passing
2022-09-15 13:28:44 +02:00
725af3fcbd no simlink for missions
All checks were successful
continuous-integration/drone/push Build is passing
2022-09-05 18:00:37 +02:00
3b67e47cb6 improved mod download script
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-30 16:05:41 +02:00
f91d8b3580 link mission dir 2022-08-30 16:05:20 +02:00
4 changed files with 39 additions and 15 deletions

View File

@@ -12,8 +12,9 @@ RUN mkdir -p /home/steam/server && \
USER steam
VOLUME /home/steam/server
VOLUME /home/steam/server/mpmissions
# VOLUME /home/steam/volumes/missions
VOLUME /home/steam/volumes/config
VOLUME /home/steam/volumes/missions
VOLUME /home/steam/volumes/mods
VOLUME /home/steam/volumes/servermods

View File

@@ -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

View File

@@ -15,15 +15,15 @@ PAYLOAD=$(cat <<EOF
set -e
WORKSHOP_DIR="/home/steam/Steam/steamapps/workshop/content"
MOD_DIR="\$WORKSHOP_DIR/107410"
mkdir -p \$WORKSHOP_DIR
rm -rf \$WORKSHOP_DIR/content
ln -s /home/steam/mount "\$WORKSHOP_DIR/107410"
ln -s /home/steam/mount "\$MOD_DIR"
echo -n "Username: "
read username
echo "Perform initial login. Exit after successfull login. To login type login username"
echo "Perform initial login."
/home/steam/steamcmd/steamcmd.sh +login \$username +quit
@@ -40,14 +40,25 @@ do
echo "quit";
} > "\$tmpFile"
echo "Downloading mod \$mod_id"
echo "### DOWNLOADING MOD \$mod_id ###"
until /home/steam/steamcmd/steamcmd.sh +runscript "\$tmpFile"; do echo -e "###\nLets try that again\n###"; done
echo -e "###\nDownload finished\n###"
echo "### DOWNLOAD FINISHED ###"
done
echo "### FIX CASE ###"
IFS=\$'\n'
for SRC in \$(find "\$MOD_DIR/" -depth -type f -name '*.pbo' -o -type f -name '*.bisign')
do
DST=\$(dirname "\${SRC}")/\$(basename "\${SRC}" | tr '\[A-Z\]' '\[a-z\]')
if [ "\${SRC}" != "\${DST}" ]
then
[ ! -e "\${DST}" ] && mv -vT "\${SRC}" "\${DST}"
fi
done
# for f in \$(find /home/steam/mount -type f -name '*.pbo' -o -type f -name '*.bisign'); do mv -v "\$f" "\$(echo \$f | tr '[A-Z]' '[a-z]')"; done
EOF
)

View File

@@ -51,24 +51,35 @@ 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
SERVER_ARGS="${SERVER_ARGS} -mod=${MODS_TO_LOAD::-1}"
fi
#
# LINK MISSIONS
#
# rm -r /home/steam/server/mpmissions
# ln -s "$VOLUME_HOME/missions" "/home/steam/server/mpmissions"
# SERVER_ARGS="${SERVER_ARGS} -serverMod=${SERVER_MODS}"