mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-12-14 14:22:27 +00:00
parent
1c9274ad96
commit
46270f6bd5
1 changed files with 10 additions and 9 deletions
|
@ -74,6 +74,14 @@ fi
|
||||||
# put these prior JVM_OPTS at the end to give any memory settings there higher precedence
|
# put these prior JVM_OPTS at the end to give any memory settings there higher precedence
|
||||||
echo "Setting initial memory to ${INIT_MEMORY:=${MEMORY}} and max to ${MAX_MEMORY:=${MEMORY}}"
|
echo "Setting initial memory to ${INIT_MEMORY:=${MEMORY}} and max to ${MAX_MEMORY:=${MEMORY}}"
|
||||||
|
|
||||||
|
expandedDOpts=
|
||||||
|
if [ -n "$JVM_DD_OPTS" ]; then
|
||||||
|
for dopt in $JVM_DD_OPTS
|
||||||
|
do
|
||||||
|
expandedDOpts="${expandedDOpts} -D${dopt/:/=}"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ ${TYPE} == "FEED-THE-BEAST" ]]; then
|
if [[ ${TYPE} == "FEED-THE-BEAST" ]]; then
|
||||||
if [ ! -e ${FTB_DIR}/ops.json -a -e /data/ops.txt ]; then
|
if [ ! -e ${FTB_DIR}/ops.json -a -e /data/ops.txt ]; then
|
||||||
cp -f /data/ops.txt ${FTB_DIR}/
|
cp -f /data/ops.txt ${FTB_DIR}/
|
||||||
|
@ -88,7 +96,7 @@ if [[ ${TYPE} == "FEED-THE-BEAST" ]]; then
|
||||||
cat > ${FTB_DIR}/settings-local.sh <<EOF
|
cat > ${FTB_DIR}/settings-local.sh <<EOF
|
||||||
export MIN_RAM="${INIT_MEMORY}"
|
export MIN_RAM="${INIT_MEMORY}"
|
||||||
export MAX_RAM="${MAX_MEMORY}"
|
export MAX_RAM="${MAX_MEMORY}"
|
||||||
export JAVA_PARAMETERS="-Xms${INIT_MEMORY}"
|
export JAVA_PARAMETERS="-Xms${INIT_MEMORY} $expandedDOpts"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cd ${FTB_DIR}
|
cd ${FTB_DIR}
|
||||||
|
@ -100,13 +108,6 @@ else
|
||||||
bootstrapArgs="--bootstrap /data/bootstrap.txt"
|
bootstrapArgs="--bootstrap /data/bootstrap.txt"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$JVM_DD_OPTS" ]; then
|
|
||||||
for dopt in $JVM_DD_OPTS
|
|
||||||
do
|
|
||||||
JVM_OPTS="${JVM_OPTS} -D${dopt/:/=}"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
JVM_OPTS="-Xms${INIT_MEMORY} -Xmx${MAX_MEMORY} ${JVM_OPTS}"
|
JVM_OPTS="-Xms${INIT_MEMORY} -Xmx${MAX_MEMORY} ${JVM_OPTS}"
|
||||||
exec mc-server-runner ${bootstrapArgs} java $JVM_XX_OPTS $JVM_OPTS -jar $SERVER "$@" $EXTRA_ARGS
|
exec mc-server-runner ${bootstrapArgs} java $JVM_XX_OPTS $JVM_OPTS $expandedDOpts -jar $SERVER "$@" $EXTRA_ARGS
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue