mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-21 16:46:23 +00:00
feat(minecraft-server): update spigot plugins using /plugins if newer
Deep copy and *.jar files in /plugins and update the corresponding files in the /data/plugins dir.
This commit is contained in:
@@ -14,6 +14,7 @@ RUN apk add --no-cache -U \
|
||||
jq \
|
||||
mysql-client \
|
||||
tzdata \
|
||||
rsync \
|
||||
python python-dev py2-pip
|
||||
|
||||
RUN pip install mcstatus
|
||||
|
||||
@@ -54,8 +54,12 @@ done
|
||||
|
||||
if [ "$TYPE" = "SPIGOT" ]; then
|
||||
if [ -d /plugins ]; then
|
||||
# Copy all of the plugins directory first to include initial configs
|
||||
echo Copying any Bukkit plugins over
|
||||
cp -r /plugins /data
|
||||
# Copy plugins over using rsync to allow deeply nested updates of plugins
|
||||
# only updates files if the source file is newer and print updated files
|
||||
rsync -a --out-format="update:%f:Last Modified %M" --prune-empty-dirs --include '*/' --include '*.txt' --exclude '*' --update /plugins /data/plugins
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user