mc: adjust MAX_RAM in settings.cfg for some CurseForge modpacks

Fixes #285
This commit is contained in:
Geoff Bourne 2019-01-26 16:35:00 -06:00
parent d368978949
commit a63f474109

View File

@ -101,6 +101,11 @@ export MAX_RAM="${MAX_MEMORY}"
export JAVA_PARAMETERS="-Xms${INIT_MEMORY} $expandedDOpts"
EOF
# patch CurseForge cfg file, if present
if [ -f ${FTB_DIR}/settings.cfg ]; then
sed -i "/MAX_RAM=.*/ c MAX_RAM=${MAX_MEMORY};" ${FTB_DIR}/settings.cfg
fi
cd ${FTB_DIR}
echo "Running FTB ${FTB_SERVER_START} in ${FTB_DIR} ..."
exec mc-server-runner ${mcServerRunnerArgs} ${FTB_SERVER_START}