diff -rupN a/bin/elasticsearch b/bin/elasticsearch --- a/bin/elasticsearch 2015-08-05 17:52:05.740819671 +0200 +++ b/bin/elasticsearch 2015-08-05 17:22:34.664657364 +0200 @@ -83,7 +83,10 @@ while [ -h "$SCRIPT" ] ; do done # determine elasticsearch home -ES_HOME=`dirname "$SCRIPT"`/.. +if [ -z "$ES_HOME" ]; then + echo "You must set the ES_HOME var" >&2 + exit 1 +fi # make ELASTICSEARCH_HOME absolute ES_HOME=`cd "$ES_HOME"; pwd` diff -rupN a/bin/plugin b/bin/plugin --- a/bin/plugin 2015-08-05 17:57:07.903088815 +0200 +++ b/bin/plugin 2015-08-05 17:57:38.979808139 +0200 @@ -16,7 +16,10 @@ while [ -h "$SCRIPT" ] ; do done # determine elasticsearch home -ES_HOME=`dirname "$SCRIPT"`/.. +if [ -z "$ES_HOME" ]; then + echo "You must set the ES_HOME var" >&2 + exit 1 +fi # make ELASTICSEARCH_HOME absolute ES_HOME=`cd "$ES_HOME"; pwd` @@ -105,4 +105,4 @@ export HOSTNAME=`hostname -s` -eval "$JAVA" $JAVA_OPTS $ES_JAVA_OPTS -Xmx64m -Xms16m -Delasticsearch -Des.path.home=\""$ES_HOME"\" $properties -cp \""$ES_HOME/lib/*"\" org.elasticsearch.plugins.PluginManager $args \ No newline at end of file +eval "$JAVA" $JAVA_OPTS $ES_JAVA_OPTS -Xmx64m -Xms16m -Delasticsearch -Des.path.home="$ES_HOME" $properties -cp "$ES_CLASSPATH/lib/*" org.elasticsearch.plugins.PluginManager $args