fixed always returning 1 if launching in background without pidpath
This commit is contained in:
parent
22b2aa69d1
commit
a96391224a
|
@ -121,14 +121,16 @@ launch_service()
|
||||||
es_parms="$es_parms -Des.foreground=yes"
|
es_parms="$es_parms -Des.foreground=yes"
|
||||||
exec "$JAVA" $JAVA_OPTS $ES_JAVA_OPTS $es_parms -Des.path.home="$ES_HOME" -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
|
||||||
|
execval=$?
|
||||||
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 -Des.path.home="$ES_HOME" -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 <&- &
|
||||||
|
execval=$?
|
||||||
[ ! -z "$pidpath" ] && printf '%d' $! > "$pidpath"
|
[ ! -z "$pidpath" ] && printf '%d' $! > "$pidpath"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
return $?
|
return $execval
|
||||||
}
|
}
|
||||||
|
|
||||||
# Parse any command line options.
|
# Parse any command line options.
|
||||||
|
|
Loading…
Reference in New Issue