elasticsearch script: Change CLASSPATH to ES_CLASSPATH, closes #818.
This commit is contained in:
parent
ae0eed937b
commit
dc0e493cce
|
@ -9,7 +9,7 @@
|
|||
# This script relies on few environment variables to determine startup
|
||||
# behavior, those variables are:
|
||||
#
|
||||
# CLASSPATH -- A Java classpath containing everything necessary to run.
|
||||
# ES_CLASSPATH -- A Java classpath containing everything necessary to run.
|
||||
# JAVA_OPTS -- Additional arguments to the JVM for heap size, etc
|
||||
# ES_JAVA_OPTS -- External Java Opts on top of the defaults set
|
||||
#
|
||||
|
@ -93,15 +93,15 @@ elif [ -r $ES_INCLUDE ]; then
|
|||
. $ES_INCLUDE
|
||||
fi
|
||||
|
||||
if [ -z $CLASSPATH ]; then
|
||||
echo "You must set the CLASSPATH var" >&2
|
||||
if [ -z $ES_CLASSPATH ]; then
|
||||
echo "You must set the ES_CLASSPATH var" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Special-case path variables.
|
||||
case "`uname`" in
|
||||
CYGWIN*)
|
||||
CLASSPATH=`cygpath -p -w "$CLASSPATH"`
|
||||
ES_CLASSPATH=`cygpath -p -w "$ES_CLASSPATH"`
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -120,11 +120,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 $CLASSPATH $props \
|
||||
exec $JAVA $JAVA_OPTS $ES_JAVA_OPTS $es_parms -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 $CLASSPATH $props \
|
||||
exec $JAVA $JAVA_OPTS $ES_JAVA_OPTS $es_parms -cp $ES_CLASSPATH $props \
|
||||
org.elasticsearch.bootstrap.ElasticSearch <&- &
|
||||
[ ! -z $pidpath ] && printf "%d" $! > $pidpath
|
||||
fi
|
||||
|
@ -139,7 +139,7 @@ eval set -- "$args"
|
|||
while true; do
|
||||
case "$1" in
|
||||
-v)
|
||||
$JAVA $JAVA_OPTS $ES_JAVA_OPTS $es_parms -cp $CLASSPATH $props \
|
||||
$JAVA $JAVA_OPTS $ES_JAVA_OPTS $es_parms -cp $ES_CLASSPATH $props \
|
||||
org.elasticsearch.Version
|
||||
exit 0
|
||||
;;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
CLASSPATH=$CLASSPATH:$ES_HOME/lib/elasticsearch-@ES_VERSION@.jar:$ES_HOME/lib/*:$ES_HOME/lib/sigar/*
|
||||
ES_CLASSPATH=$ES_CLASSPATH:$ES_HOME/lib/elasticsearch-@ES_VERSION@.jar:$ES_HOME/lib/*:$ES_HOME/lib/sigar/*
|
||||
|
||||
if [ "x$ES_MIN_MEM" = "x" ]; then
|
||||
ES_MIN_MEM=256m
|
||||
|
|
Loading…
Reference in New Issue