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:
Michael Reichenbach committed 2018-12-14 08:13:19 +01:00
1 parent 2e353c084a
commit fd4e9d93e0
2 files changed
+5

No files matched your search

+1
View File
@@ -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