mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
Auto-merging via docker-versions-create
This commit is contained in:
commit
185fccf712
@ -11,21 +11,8 @@ fi
|
||||
CURSE_URL_BASE=${CURSE_URL_BASE:-https://minecraft.curseforge.com/projects}
|
||||
|
||||
# Remove old mods/plugins
|
||||
if isTrue ${REMOVE_OLD_MODS}; then
|
||||
remove_mods_dest="/data/mods"
|
||||
case ${TYPE} in
|
||||
SPIGOT|BUKKIT|PAPER)
|
||||
remove_mods_dest="/data/plugins"
|
||||
;;
|
||||
esac
|
||||
|
||||
# only try to remove existing mods dir
|
||||
if [ -d "$remove_mods_dest" ]; then
|
||||
log "Removing old mods in $remove_mods_dest..."
|
||||
find $remove_mods_dest -mindepth 1 -maxdepth ${REMOVE_OLD_MODS_DEPTH:-16} -wholename "${REMOVE_OLD_MODS_INCLUDE:-*}" -not -wholename "${REMOVE_OLD_MODS_EXCLUDE}" -delete
|
||||
else
|
||||
log "Directory $remove_mods_dest does not exist; removing nothing."
|
||||
fi
|
||||
if isTrue ${REMOVE_OLD_MODS:-false}; then
|
||||
find /data/mods /data/plugins -mindepth 1 -maxdepth ${REMOVE_OLD_MODS_DEPTH:-16} -wholename "${REMOVE_OLD_MODS_INCLUDE:-*}" -not -wholename "${REMOVE_OLD_MODS_EXCLUDE}" -delete
|
||||
fi
|
||||
|
||||
# If supplied with a URL for a modpack (simple zip of jars), download it and unpack
|
||||
|
@ -181,7 +181,7 @@ function customizeServerProps {
|
||||
}
|
||||
|
||||
# Deploy server.properties file
|
||||
if [[ ${TYPE} == "FEED-THE-BEAST" ]]; then
|
||||
if [[ ${TYPE} == "CURSEFORGE" ]]; then
|
||||
export SERVER_PROPERTIES="${FTB_DIR}/server.properties"
|
||||
log "detected FTB, changing properties path to ${SERVER_PROPERTIES}"
|
||||
fi
|
||||
|
@ -7,7 +7,7 @@ isDebugging && set -x
|
||||
: ${LEVEL:=world}
|
||||
export LEVEL
|
||||
|
||||
if [ $TYPE = "FEED-THE-BEAST" ]; then
|
||||
if [ $TYPE = "CURSEFORGE" ]; then
|
||||
worldDest=$FTB_DIR/$LEVEL
|
||||
else
|
||||
worldDest=/data/$LEVEL
|
||||
|
12
start-spiget
12
start-spiget
@ -16,7 +16,7 @@ containsJars() {
|
||||
if [[ $line =~ $pat ]]; then
|
||||
return 0
|
||||
fi
|
||||
done <<< $(unzip -l "$file")
|
||||
done <<<$(unzip -l "$file")
|
||||
|
||||
return 1
|
||||
}
|
||||
@ -46,10 +46,14 @@ getResourceFromSpiget() {
|
||||
}
|
||||
|
||||
if [[ ${SPIGET_RESOURCES} ]]; then
|
||||
if isTrue ${REMOVE_OLD_MODS:-false}; then
|
||||
rm -rf /data/plugins
|
||||
REMOVE_OLD_MODS=false
|
||||
fi
|
||||
|
||||
log "Getting plugins via Spiget"
|
||||
IFS=',' read -r -a resources <<< "${SPIGET_RESOURCES}"
|
||||
for resource in "${resources[@]}"
|
||||
do
|
||||
IFS=',' read -r -a resources <<<"${SPIGET_RESOURCES}"
|
||||
for resource in "${resources[@]}"; do
|
||||
getResourceFromSpiget "${resource}"
|
||||
done
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user