1
0
mirror of https://github.com/msmhq/msm.git synced 2024-08-30 18:12:35 +00:00

Use error_exit() to report eula error message

This commit is contained in:
Marcus Whybrow 2015-07-25 07:47:58 +01:00
parent 52a0581d10
commit 0455eb0236

View File

@ -158,6 +158,7 @@ error_exit() {
CONF_ERROR) code=73;; CONF_ERROR) code=73;;
FATAL_ERROR) code=74;; FATAL_ERROR) code=74;;
JAVA_NOT_INSTALLED) code=75;; JAVA_NOT_INSTALLED) code=75;;
EULA_UNACCEPTED) code=76;;
esac esac
echo "${2:-"Unknown Error"}" 1>&2 echo "${2:-"Unknown Error"}" 1>&2
@ -1425,8 +1426,7 @@ server_start() {
if [[ -f "${SERVER_PATH[$1]}"/eula.txt ]]; then if [[ -f "${SERVER_PATH[$1]}"/eula.txt ]]; then
if ! grep -q -i 'eula=true' "${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." error_exit EULA_UNACCEPTED "Could not start the server as you first need to agree to a EULA. See eula.txt for more info."
return
fi fi
fi fi