2020-07-06 22:16:51 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
. ${SCRIPTS:-/}start-utils
|
|
|
|
|
2020-07-09 00:07:53 +00:00
|
|
|
: ${PLUGINS_SYNC_UPDATE:=true}
|
|
|
|
|
|
|
|
isDebugging && set -x
|
|
|
|
|
2020-07-06 22:16:51 +00:00
|
|
|
if [ -d /plugins ]; then
|
|
|
|
case ${TYPE} in
|
|
|
|
SPIGOT|BUKKIT|PAPER)
|
|
|
|
mkdir -p /data/plugins
|
|
|
|
log "Copying plugins over..."
|
2020-07-09 00:07:53 +00:00
|
|
|
if isTrue ${PLUGINS_SYNC_UPDATE}; then
|
|
|
|
updateArg="--update"
|
|
|
|
fi
|
2020-07-06 22:16:51 +00:00
|
|
|
# Copy plugins over using rsync to allow deeply nested updates of plugins
|
2020-07-09 00:07:53 +00:00
|
|
|
rsync -a --out-format="update:%f:Last Modified %M" --prune-empty-dirs $updateArg /plugins /data
|
2020-07-06 22:16:51 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
|
|
|
exec ${SCRIPTS:-/}start-finalSetupServerProperties $@
|