nixpkgs/pkgs/servers/search/elasticsearch/es-home-2.x.patch

32 lines
868 B
Diff
Raw Normal View History

diff -rupN a/bin/elasticsearch b/bin/elasticsearch
--- a/bin/elasticsearch 2015-11-18 21:48:18.000000000 +0100
+++ b/bin/elasticsearch 2015-12-04 00:52:21.032475098 +0100
@@ -72,7 +72,11 @@ 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-11-18 21:48:18.000000000 +0100
+++ b/bin/plugin 2015-12-04 00:52:55.947453619 +0100
@@ -17,7 +17,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`