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
|
pidpath=$1
|
||||||
foreground=$2
|
foreground=$2
|
||||||
props=$3
|
props=$3
|
||||||
es_parms="-Delasticsearch -Des.path.home=$ES_HOME"
|
es_parms="-Delasticsearch"
|
||||||
|
|
||||||
if [ "x$pidpath" != "x" ]; then
|
if [ "x$pidpath" != "x" ]; then
|
||||||
es_parms="$es_parms -Des-pidfile=$pidpath"
|
es_parms="$es_parms -Des-pidfile=$pidpath"
|
||||||
|
@ -121,11 +121,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 "$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
|
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 "$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 <&- &
|
org.elasticsearch.bootstrap.ElasticSearch <&- &
|
||||||
[ ! -z "$pidpath" ] && printf '%d' $! > "$pidpath"
|
[ ! -z "$pidpath" ] && printf '%d' $! > "$pidpath"
|
||||||
fi
|
fi
|
||||||
|
@ -140,7 +140,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 "$ES_CLASSPATH" $props \
|
"$JAVA" $JAVA_OPTS $ES_JAVA_OPTS $es_parms -Des.path.home="$ES_HOME" -cp "$ES_CLASSPATH" $props \
|
||||||
org.elasticsearch.Version
|
org.elasticsearch.Version
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in New Issue