nixpkgs/pkgs/servers/search/elasticsearch/es-home-2.x.patch
Markus Wotringer 4bc9e8a785 elasticsearch2: init at 2.2.0
changes by @globin:
 * updated 2.1.0 to 2.2.0
 * moved to a new derivation

closes #11446

Signed-off-by: Robin Gloster <mail@glob.in>
2016-02-13 15:03:09 +00:00

31 lines
868 B
Diff

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`