diff --git a/bin/elasticsearch b/bin/elasticsearch index 7f765a8b8bf..5c0d042df7b 100755 --- a/bin/elasticsearch +++ b/bin/elasticsearch @@ -111,7 +111,7 @@ launch_service() pidpath=$1 foreground=$2 props=$3 - es_parms="-Delasticsearch -Des.path.home=$ES_HOME" + es_parms="-Delasticsearch" if [ "x$pidpath" != "x" ]; then es_parms="$es_parms -Des-pidfile=$pidpath" @@ -121,11 +121,11 @@ launch_service() # but it's up to us not to background. if [ "x$foreground" != "x" ]; then es_parms="$es_parms -Des-foreground=yes" - exec "$JAVA" $JAVA_OPTS $ES_JAVA_OPTS "$es_parms" -cp "$ES_CLASSPATH" $props \ + exec "$JAVA" $JAVA_OPTS $ES_JAVA_OPTS $es_parms -Des.path.home="$ES_HOME" -cp "$ES_CLASSPATH" $props \ org.elasticsearch.bootstrap.ElasticSearch else # Startup ElasticSearch, background it, and write the pid. - exec "$JAVA" $JAVA_OPTS $ES_JAVA_OPTS "$es_parms" -cp "$ES_CLASSPATH" $props \ + exec "$JAVA" $JAVA_OPTS $ES_JAVA_OPTS $es_parms -Des.path.home="$ES_HOME" -cp "$ES_CLASSPATH" $props \ org.elasticsearch.bootstrap.ElasticSearch <&- & [ ! -z "$pidpath" ] && printf '%d' $! > "$pidpath" fi @@ -140,7 +140,7 @@ eval set -- "$args" while true; do case $1 in -v) - "$JAVA" $JAVA_OPTS $ES_JAVA_OPTS "$es_parms" -cp "$ES_CLASSPATH" $props \ + "$JAVA" $JAVA_OPTS $ES_JAVA_OPTS $es_parms -Des.path.home="$ES_HOME" -cp "$ES_CLASSPATH" $props \ org.elasticsearch.Version exit 0 ;;