[mc] Use G1 GC by default and simplify max memory setting

For #126
This commit is contained in:
Geoff Bourne
2017-02-14 22:15:36 -06:00
parent 134eaedf23
commit f5dbbcc2c6
3 changed files with 12 additions and 6 deletions
+7 -2
View File
@@ -490,6 +490,11 @@ else
EXTRA_ARGS=""
fi
if [[ ! -z $MAX_MEMORY ]]; then
# put prior JVM_OPTS at the end to give any memory settings there higher precedence
JVM_OPTS="-Xms${MAX_MEMORY} -Xmx${MAX_MEMORY} ${JVM_OPTS}"
fi
set -x
if [[ ${TYPE} == "FEED-THE-BEAST" ]]; then
echo "Running FTB server modpack start ..."
exec sh ${FTB_SERVER_START}
@@ -497,8 +502,8 @@ else
# If we have a bootstrap.txt file... feed that in to the server stdin
if [ -f /data/bootstrap.txt ];
then
exec java $JVM_OPTS -jar $SERVER "$@" $EXTRA_ARGS < /data/bootstrap.txt
exec java $JVM_XX_OPTS $JVM_OPTS -jar $SERVER "$@" $EXTRA_ARGS < /data/bootstrap.txt
else
exec java $JVM_OPTS -jar $SERVER "$@" $EXTRA_ARGS
exec java $JVM_XX_OPTS $JVM_OPTS -jar $SERVER "$@" $EXTRA_ARGS
fi
fi