mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-26 01:48:45 +00:00
change scripts to start the ElasticSearch main class (a wrapper around Bootstrap) just so the process name will look nicely on jps
This commit is contained in:
parent
c097735196
commit
bc882182ab
@ -116,16 +116,16 @@ launch_service()
|
|||||||
es_parms="$es_parms -Des-pidfile=$pidpath"
|
es_parms="$es_parms -Des-pidfile=$pidpath"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# The es-daemon option will tell Bootstrap to close stdout/stderr,
|
# The es-daemon option will tell ElasticSearch to close stdout/stderr,
|
||||||
# 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 $CLASSPATH $props \
|
||||||
org.elasticsearch.bootstrap.Bootstrap
|
org.elasticsearch.bootstrap.ElasticSearch
|
||||||
else
|
else
|
||||||
# Startup Bootstrap, 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 $CLASSPATH $props \
|
||||||
org.elasticsearch.bootstrap.Bootstrap <&- &
|
org.elasticsearch.bootstrap.ElasticSearch <&- &
|
||||||
[ ! -z $pidpath ] && printf "%d" $! > $pidpath
|
[ ! -z $pidpath ] && printf "%d" $! > $pidpath
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Binary file not shown.
@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
* Licensed to Elastic Search and Shay Banon under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. Elastic Search licenses this
|
||||||
|
* file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.elasticsearch.bootstrap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A wrapper around {@link Bootstrap} just so the process will look nicely on things like jps.
|
||||||
|
*/
|
||||||
|
public class ElasticSearch extends Bootstrap {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
Bootstrap.main(args);
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user