From a21ef973dcba015abeda313b4631b800227edfda Mon Sep 17 00:00:00 2001 From: Phil Kauffman Date: Thu, 31 Dec 2015 09:35:52 -0600 Subject: [PATCH] Check to start in foreground Adds a check to see if the server should be started in the foreground and does so if $FOREGROUND == 1 --- libexec/mcwrapper | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libexec/mcwrapper b/libexec/mcwrapper index fb2300e..3ac683b 100755 --- a/libexec/mcwrapper +++ b/libexec/mcwrapper @@ -483,7 +483,11 @@ function start_minecraft { pushd $MINECRAFT_SERVER_DIR_PATH &> /dev/null set_up_pipe - create_pid $(start_minecraft_in_background) + if [[ $FOREGROUND -eq 1 ]]; then + create_pid $(start_minecraft_in_foreground) + else + create_pid $(start_minecraft_in_background) + fi # sleep for one second to make sure that the process actually started properly. sleep 1