mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
Added use of REMOVE_OLD_MODS to /mods processing
This commit is contained in:
parent
b06f1115d4
commit
6f1f8d7806
@ -297,7 +297,7 @@ or downloading a world with the `WORLD` option.
|
||||
|
||||
There are two additional volumes that can be mounted; `/mods` and `/config`.
|
||||
Any files in either of these filesystems will be copied over to the main
|
||||
`/data` filesystem before starting Minecraft.
|
||||
`/data` filesystem before starting Minecraft. If you want old mods to be removed as the `/mods` content is updated, then add `-e REMOVE_OLD_MODS=TRUE`.
|
||||
|
||||
This works well if you want to have a common set of modules in a separate
|
||||
location, but still have multiple worlds with different server requirements
|
||||
|
@ -54,7 +54,10 @@ done
|
||||
if [ -d /mods ]; then
|
||||
log "Copying any mods over..."
|
||||
mkdir -p /data/mods
|
||||
rsync -a --out-format="update:%f:Last Modified %M" --prune-empty-dirs --update /mods /data
|
||||
if isTrue "${REMOVE_OLD_MODS}"; then
|
||||
rsyncArgs=(--delete)
|
||||
fi
|
||||
rsync -a --out-format="update:%f:Last Modified %M" "${rsyncArgs[@]}" --prune-empty-dirs --update /mods /data
|
||||
fi
|
||||
|
||||
[ -d /data/config ] || mkdir /data/config
|
||||
|
Loading…
Reference in New Issue
Block a user