Skip to content

Commit

Permalink
fix: remove plugins before copying from /plugins (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik1000 committed May 29, 2024
1 parent f88f30e commit 6ddff3d
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions scripts/run-bungeecord.sh
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,16 @@ if [[ $pruningPrefix ]]; then
pruneOlder "$pruningPrefix"
fi

# Remove old plugins as long as REMOVE_OLD_PLUGINS or REMOVE_OLD_MODS is set to true
# REMOVE_OLD_MODS is available to be consistent with the docker-minecraft-server image
# Note that only REMOVE_OLD_MODS_EXCLUDE and REMOVE_OLD_MODS_INCLUDE are supported.
if isTrue "${REMOVE_OLD_PLUGINS:-false}" || isTrue "${REMOVE_OLD_MODS:-false}"; then
log "Removing old plugins including:${REMOVE_OLD_MODS_INCLUDE} excluding:${REMOVE_OLD_MODS_EXCLUDE}"
removeOldMods $BUNGEE_HOME/plugins
REMOVE_OLD_PLUGINS=false
REMOVE_OLD_MODS=false
fi

if [ -d /plugins ]; then
log "Copying BungeeCord plugins over..."
cp -ru /plugins $BUNGEE_HOME
Expand All @@ -375,16 +385,6 @@ if [[ "$PLUGINS" ]]; then
"$PLUGINS"
fi

# Remove old plugins as long as REMOVE_OLD_PLUGINS or REMOVE_OLD_MODS is set to true
# REMOVE_OLD_MODS is available to be consistent with the docker-minecraft-server image
# Note that only REMOVE_OLD_MODS_EXCLUDE and REMOVE_OLD_MODS_INCLUDE are supported.
if isTrue "${REMOVE_OLD_PLUGINS:-false}" || isTrue "${REMOVE_OLD_MODS:-false}"; then
log "Removing old plugins including:${REMOVE_OLD_MODS_INCLUDE} excluding:${REMOVE_OLD_MODS_EXCLUDE}"
removeOldMods $BUNGEE_HOME/plugins
REMOVE_OLD_PLUGINS=false
REMOVE_OLD_MODS=false
fi

# Download plugins from spigotmc and put them in the plugins folder
if [[ ${SPIGET_PLUGINS} ]]; then
log "Getting plugins via Spiget"
Expand Down

0 comments on commit 6ddff3d

Please sign in to comment.