···11+diff -Naur a/bin/elasticsearch-env b/bin/elasticsearch-env
22+--- a/bin/elasticsearch-env 2017-12-12 13:31:51.000000000 +0100
33++++ b/bin/elasticsearch-env 2017-12-18 19:51:12.282809695 +0100
44+@@ -19,18 +19,10 @@
55+ fi
66+ done
77+88+-# determine Elasticsearch home; to do this, we strip from the path until we find
99+-# bin, and then strip bin (there is an assumption here that there is no nested
1010+-# directory under bin also named bin)
1111+-ES_HOME=`dirname "$SCRIPT"`
1212+-
1313+-# now make ES_HOME absolute
1414+-ES_HOME=`cd "$ES_HOME"; pwd`
1515+-
1616+-while [ "`basename "$ES_HOME"`" != "bin" ]; do
1717+- ES_HOME=`dirname "$ES_HOME"`
1818+-done
1919+-ES_HOME=`dirname "$ES_HOME"`
2020++if [ -z "$ES_HOME" ]; then
2121++ echo "You must set the ES_HOME var" >&2
2222++ exit 1
2323++fi
2424+2525+ # now set the classpath
2626+ ES_CLASSPATH="$ES_HOME/lib/*"