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
|
# This script relies on few environment variables to determine startup
|
||||||
# behavior, those variables are:
|
# 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
|
# JAVA_OPTS -- Additional arguments to the JVM for heap size, etc
|
||||||
# ES_JAVA_OPTS -- External Java Opts on top of the defaults set
|
# ES_JAVA_OPTS -- External Java Opts on top of the defaults set
|
||||||
#
|
#
|
||||||
|
@ -93,15 +93,15 @@ elif [ -r $ES_INCLUDE ]; then
|
||||||
. $ES_INCLUDE
|
. $ES_INCLUDE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z $CLASSPATH ]; then
|
if [ -z $ES_CLASSPATH ]; then
|
||||||
echo "You must set the CLASSPATH var" >&2
|
echo "You must set the ES_CLASSPATH var" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Special-case path variables.
|
# Special-case path variables.
|
||||||
case "`uname`" in
|
case "`uname`" in
|
||||||
CYGWIN*)
|
CYGWIN*)
|
||||||
CLASSPATH=`cygpath -p -w "$CLASSPATH"`
|
ES_CLASSPATH=`cygpath -p -w "$ES_CLASSPATH"`
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -120,11 +120,11 @@ launch_service()
|
||||||
# but it's up to us not to background.
|
# but it's up to us not to background.
|
||||||
if [ "x$foreground" != "x" ]; then
|
if [ "x$foreground" != "x" ]; then
|
||||||
es_parms="$es_parms -Des-foreground=yes"
|
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
|
org.elasticsearch.bootstrap.ElasticSearch
|
||||||
else
|
else
|
||||||
# Startup ElasticSearch, background it, and write the pid.
|
# 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 <&- &
|
org.elasticsearch.bootstrap.ElasticSearch <&- &
|
||||||
[ ! -z $pidpath ] && printf "%d" $! > $pidpath
|
[ ! -z $pidpath ] && printf "%d" $! > $pidpath
|
||||||
fi
|
fi
|
||||||
|
@ -139,7 +139,7 @@ eval set -- "$args"
|
||||||
while true; do
|
while true; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-v)
|
-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
|
org.elasticsearch.Version
|
||||||
exit 0
|
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
|
if [ "x$ES_MIN_MEM" = "x" ]; then
|
||||||
ES_MIN_MEM=256m
|
ES_MIN_MEM=256m
|
||||||
|
|
Loading…
Reference in New Issue