Add optional nogui

If set via ENV, disable GUI on server.
This commit is contained in:
Dan Schaper 2017-05-19 19:53:45 -07:00 committed by GitHub
parent c4a92f6706
commit 6a565692a0

View file

@ -503,10 +503,15 @@ if [ "$TYPE" = "SPIGOT" ]; then
fi
fi
if [[ $CONSOLE = false ]]; then
EXTRA_ARGS=--noconsole
else
EXTRA_ARGS=""
# Optional disable console
if [[ ${CONSOLE} = false ]]; then
EXTRA_ARGS+="--noconsole"
fi
# Optional disable GUI for headless servers
if [[ ${GUI} = false ]]; then
EXTRA_ARGS="${EXTRA_ARGS} nogui"
fi
# put these prior JVM_OPTS at the end to give any memory settings there higher precedence