diff --git a/start-minecraftFinalSetup b/start-minecraftFinalSetup index 3fd2a21c..21b933cf 100644 --- a/start-minecraftFinalSetup +++ b/start-minecraftFinalSetup @@ -160,6 +160,19 @@ fi 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}/ + + if [ ! -e "${FTB_DIR}/server-icon.png" -a -e /data/server-icon.png ]; then + cp -f /data/server-icon.png ${FTB_DIR}/ + fi + + cp -f /data/eula.txt "${FTB_DIR}/" +} + mcServerRunnerArgs="--stop-duration 60s" if [[ ${TYPE} == "CURSE_INSTANCE" ]]; then if isTrue ${DEBUG_EXEC}; then @@ -169,6 +182,8 @@ if [[ ${TYPE} == "CURSE_INSTANCE" ]]; then --cf-instance-file "${CURSE_INSTANCE_JSON}" \ java $JVM_XX_OPTS $JVM_OPTS $expandedDOpts -jar _SERVERJAR_ "$@" $EXTRA_ARGS elif [[ ${TYPE} == "FEED-THE-BEAST" && "${SERVER}" ]]; then + copyFilesForCurseForge + cd "${FTB_DIR}" log "Starting CurseForge server in ${FTB_DIR}..." if isTrue ${DEBUG_EXEC}; then @@ -176,36 +191,27 @@ elif [[ ${TYPE} == "FEED-THE-BEAST" && "${SERVER}" ]]; then fi exec mc-server-runner ${bootstrapArgs} ${mcServerRunnerArgs} java $JVM_XX_OPTS $JVM_OPTS $expandedDOpts -jar $(basename "${SERVER}") "$@" $EXTRA_ARGS elif [[ ${TYPE} == "FEED-THE-BEAST" ]]; then - mcServerRunnerArgs="${mcServerRunnerArgs} --shell bash" + mcServerRunnerArgs="${mcServerRunnerArgs} --shell bash" - # 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}/ + copyFilesForCurseForge - if [ ! -e "${FTB_DIR}/server-icon.png" -a -e /data/server-icon.png ]; then - cp -f /data/server-icon.png ${FTB_DIR}/ - fi - - cp -f /data/eula.txt "${FTB_DIR}/" - - cat > "${FTB_DIR}/settings-local.sh" < "${FTB_DIR}/settings-local.sh" <