From 55b5f6821f2b7794b7817b904a2acdc8d483d9d9 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Wed, 6 Jan 2021 22:38:18 -0600 Subject: [PATCH 1/5] Fixed ops and white-list setup for CurseForge modpacks named with spaces For #717 --- start-minecraftFinalSetup | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/start-minecraftFinalSetup b/start-minecraftFinalSetup index 93ce7499..545dfc10 100644 --- a/start-minecraftFinalSetup +++ b/start-minecraftFinalSetup @@ -146,11 +146,11 @@ JVM_OPTS="-Xms${INIT_MEMORY} -Xmx${MAX_MEMORY} ${JVM_OPTS}" function copyFilesForCurseForge() { # copy player modification files unconditionally since their # processing into json is additive anyway - [ -f /data/ops.txt ] && cp -f /data/ops.txt ${FTB_DIR}/ - [ -f /data/white-list.txt ] && cp -f /data/white-list.txt ${FTB_DIR}/ + [ -f /data/ops.txt ] && cp -f /data/ops.txt "${FTB_DIR}/" + [ -f /data/white-list.txt ] && cp -f /data/white-list.txt "${FTB_DIR}/" if [ ! -e "${FTB_DIR}/server-icon.png" -a -e /data/server-icon.png ]; then - cp -f /data/server-icon.png ${FTB_DIR}/ + cp -f /data/server-icon.png "${FTB_DIR}/" fi cp -f /data/eula.txt "${FTB_DIR}/" From d1cbce3f89ba04827ddce7a3fc82975a99f36682 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Wed, 6 Jan 2021 22:49:22 -0600 Subject: [PATCH 2/5] docs: Clarified usage of VERSION with FORGE type For #716 --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ca19395b..aa2e1014 100644 --- a/README.md +++ b/README.md @@ -237,12 +237,13 @@ If you're looking for a simple way to deploy this to the Amazon Web Services Clo ## Running a Forge Server -Enable Forge server mode by adding a `-e TYPE=FORGE` to your command-line. -By default the container will run the `RECOMMENDED` version of [Forge server](http://www.minecraftforge.net/wiki/) -but you can also choose to run a specific version with `-e FORGEVERSION=10.13.4.1448`. +Enable [Forge server](http://www.minecraftforge.net/wiki/) mode by adding a `-e TYPE=FORGE` to your command-line. + +The overall version is specified by `VERSION`, [as described in the section above](#versions) and will run the recommended Forge version by default. You can also choose to run a specific Forge version with `FORGEVERSION`, such as `-e FORGEVERSION=10.13.4.1448`. $ docker run -d -v /path/on/host:/data \ - -e TYPE=FORGE -e FORGEVERSION=10.13.4.1448 \ + -e TYPE=FORGE \ + -e VERSION=1.12.2 -e FORGEVERSION=10.13.4.1448 \ -p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server To use a pre-downloaded Forge installer, place it in the attached `/data` directory and From bb2b9eeea9683ecfedd95424f77f22928ac86da5 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Thu, 7 Jan 2021 11:02:19 -0600 Subject: [PATCH 3/5] docs: Changed FORGEVERSION example to use a valid combination For #716 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index aa2e1014..637c5597 100644 --- a/README.md +++ b/README.md @@ -239,11 +239,11 @@ If you're looking for a simple way to deploy this to the Amazon Web Services Clo Enable [Forge server](http://www.minecraftforge.net/wiki/) mode by adding a `-e TYPE=FORGE` to your command-line. -The overall version is specified by `VERSION`, [as described in the section above](#versions) and will run the recommended Forge version by default. You can also choose to run a specific Forge version with `FORGEVERSION`, such as `-e FORGEVERSION=10.13.4.1448`. +The overall version is specified by `VERSION`, [as described in the section above](#versions) and will run the recommended Forge version by default. You can also choose to run a specific Forge version with `FORGEVERSION`, such as `-e FORGEVERSION=14.23.5.2854`. $ docker run -d -v /path/on/host:/data \ -e TYPE=FORGE \ - -e VERSION=1.12.2 -e FORGEVERSION=10.13.4.1448 \ + -e VERSION=1.12.2 -e FORGEVERSION=14.23.5.2854 \ -p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server To use a pre-downloaded Forge installer, place it in the attached `/data` directory and From 8c6ca5e9993048fb16bb6d56c05720399eb38c3f Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Thu, 7 Jan 2021 20:03:42 -0600 Subject: [PATCH 4/5] Restored the ability for PAPERBUILD to be used with TYPE=PAPER For #715 --- start-deployPaper | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/start-deployPaper b/start-deployPaper index e76caa6b..9233f7a0 100644 --- a/start-deployPaper +++ b/start-deployPaper @@ -17,8 +17,8 @@ if [[ $PAPER_DOWNLOAD_URL ]]; then else # PaperMC API v2 docs : https://papermc.io/api/docs/swagger-ui/index.html?configUrl=/api/openapi/swagger-config - build=$(curl -fsSL "https://papermc.io/api/v2/projects/paper/versions/${VANILLA_VERSION}" -H "accept: application/json" \ - | jq '.builds[-1]') + build=${PAPERBUILD:=$(curl -fsSL "https://papermc.io/api/v2/projects/paper/versions/${VANILLA_VERSION}" -H "accept: application/json" \ + | jq '.builds[-1]')} case $? in 0) ;; From fdf5fb46bc767413706f41db07a574ea0fe9afde Mon Sep 17 00:00:00 2001 From: Dubhar <77026787+Dubhar@users.noreply.github.com> Date: Sat, 9 Jan 2021 18:03:21 +0100 Subject: [PATCH 5/5] fix/681 (#719) * [shellcheck] prevent globbing * fix/681 remove old PaperMC before downloading new Fixes #681 Co-authored-by: Dubhar --- start-deployPaper | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/start-deployPaper b/start-deployPaper index 9233f7a0..5bc7a02c 100644 --- a/start-deployPaper +++ b/start-deployPaper @@ -28,7 +28,7 @@ else VANILLA_VERSION=$(echo "$versions" | jq -r '.versions[-1]') log "WARN: using ${VANILLA_VERSION} since that's the latest provided by PaperMC" # re-execute the current script with the newly computed version - exec $0 "$@" + exec "$0" "$@" fi log "ERROR: ${VANILLA_VERSION} is not published by PaperMC" log " Set VERSION to one of the following: " @@ -56,6 +56,10 @@ else zarg=(-z "$SERVER") fi + log "Removing old PaperMC versions ..." + paperJarSearchString=${SERVER/$build/[0-9]*} + find . -name "$paperJarSearchString" ! -name "$SERVER" -delete -print + log "Downloading PaperMC $VANILLA_VERSION (build $build) ..." curl -fsSL -o "$SERVER" "${zarg[@]}" \ "https://papermc.io/api/v2/projects/paper/versions/${VANILLA_VERSION}/builds/${build}/downloads/${SERVER}" \ @@ -71,4 +75,4 @@ export TYPE=SPIGOT export SKIP_LOG4J_CONFIG=true # Continue to Final Setup -exec ${SCRIPTS:-/}start-finalSetupWorld $@ +exec ${SCRIPTS:-/}start-finalSetupWorld "$@"