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

38 lines
1.3 KiB
Diff
Raw Normal View History

2015-08-19 23:18:32 +01:00
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`
2015-08-19 23:18:32 +01:00
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`
2015-09-15 00:52:44 +01:00
@@ -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