diff --git a/init/msm b/init/msm index 3c1ff3a..701e618 100755 --- a/init/msm +++ b/init/msm @@ -158,6 +158,7 @@ error_exit() { CONF_ERROR) code=73;; FATAL_ERROR) code=74;; JAVA_NOT_INSTALLED) code=75;; + EULA_UNACCEPTED) code=76;; esac echo "${2:-"Unknown Error"}" 1>&2 @@ -1422,13 +1423,12 @@ server_start() { # Wait for the server to fully start server_log_dots_for_lines "$1" "$time_now" "${SERVER_CONSOLE_EVENT_OUTPUT_START[$1]}" "${SERVER_CONSOLE_EVENT_TIMEOUT_START[$1]}" - - if [[ -f "${SERVER_PATH[$1]}"/eula.txt ]]; then - if ! grep -q -i 'eula=true' "${SERVER_PATH[$1]}"/eula.txt; then - echo " You need to agree to the EULA in order to run the server. Go to eula.txt for more info." - return - fi - fi + + if [[ -f "${SERVER_PATH[$1]}"/eula.txt ]]; then + if ! grep -q -i 'eula=true' "${SERVER_PATH[$1]}"/eula.txt; then + error_exit EULA_UNACCEPTED "Could not start the server as you first need to agree to a EULA. See eula.txt for more info." + fi + fi echo " Done." fi