mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-08-02 05:32:16 +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 \
|
jq \
|
||||||
mysql-client \
|
mysql-client \
|
||||||
tzdata \
|
tzdata \
|
||||||
|
rsync \
|
||||||
python python-dev py2-pip
|
python python-dev py2-pip
|
||||||
|
|
||||||
RUN pip install mcstatus
|
RUN pip install mcstatus
|
||||||
|
|||||||
@@ -54,8 +54,12 @@ done
|
|||||||
|
|
||||||
if [ "$TYPE" = "SPIGOT" ]; then
|
if [ "$TYPE" = "SPIGOT" ]; then
|
||||||
if [ -d /plugins ]; then
|
if [ -d /plugins ]; then
|
||||||
|
# Copy all of the plugins directory first to include initial configs
|
||||||
echo Copying any Bukkit plugins over
|
echo Copying any Bukkit plugins over
|
||||||
cp -r /plugins /data
|
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
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user