mirror of
https://github.com/msmhq/msm.git
synced 2024-08-30 18:12:35 +00:00
Fixes #180 by checking java is installed before starting a server
This commit is contained in:
parent
175eb17428
commit
d6689011c7
4
init/msm
4
init/msm
@ -157,6 +157,7 @@ error_exit() {
|
||||
LOGS_NOT_ROLLED) code=72;;
|
||||
CONF_ERROR) code=73;;
|
||||
FATAL_ERROR) code=74;;
|
||||
JAVA_NOT_INSTALLED) code=75;;
|
||||
esac
|
||||
|
||||
echo "${2:-"Unknown Error"}" 1>&2
|
||||
@ -1357,6 +1358,9 @@ server_start() {
|
||||
if server_is_running "$1"; then
|
||||
echo "Server \"${SERVER_NAME[$1]}\" is already running!"
|
||||
else
|
||||
if ! which java > /dev/null; then
|
||||
error_exit JAVA_NOT_INSTALLED "Could not start server as Java is not installed."
|
||||
fi
|
||||
server_ensure_jar "$1"
|
||||
server_ensure_links "$1"
|
||||
server_worlds_to_ram "$1"
|
||||
|
Loading…
Reference in New Issue
Block a user