fix the script to really work with spaces in the path
This commit is contained in:
parent
c14db4dd21
commit
682be7c63a
|
@ -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
|
||||
;;
|
||||
|
|
Loading…
Reference in New Issue