Adds a validation for plugins script to check if java is set

This does the same validation as in elasticearch bin script
This commit is contained in:
André Carvalho 2015-09-17 10:34:36 -03:00
parent a1e83f6f4f
commit 9ab6e01f4d
1 changed files with 5 additions and 0 deletions

View File

@ -65,6 +65,11 @@ else
JAVA=`which java`
fi
if [ ! -x "$JAVA" ]; then
echo "Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME"
exit 1
fi
# real getopt cannot be used because we need to hand options over to the PluginManager
while [ $# -gt 0 ]; do
case $1 in