add stop timeout and start mode for windows service.bat
fixes #3938 fixes #3962 (cherry picked from commit f1d6ccc5845ca8f93177c0de3da59a2f37f67818)
This commit is contained in:
parent
fb9cd5a562
commit
64e4883e2e
|
@ -175,7 +175,10 @@ set JVM_ES_JAVA_OPTS=%ES_JAVA_OPTS: =#%
|
||||||
set JVM_OPTS=%JVM_OPTS%;%JVM_ES_JAVA_OPTS%
|
set JVM_OPTS=%JVM_OPTS%;%JVM_ES_JAVA_OPTS%
|
||||||
)
|
)
|
||||||
|
|
||||||
"%EXECUTABLE%" //IS//%SERVICE_ID% --StartClass org.elasticsearch.bootstrap.ElasticSearch --StopClass org.elasticsearch.bootstrap.ElasticSearch --StartMethod main --StopMethod close --Classpath "%ES_CLASSPATH%" --JvmSs %JVM_SS% --JvmMs %JVM_XMS% --JvmMx %JVM_XMX% --JvmOptions %JVM_OPTS% ++JvmOptions %ES_PARAMS% %LOG_OPTS% --PidFile "%SERVICE_ID%.pid" --DisplayName "Elasticsearch %ES_VERSION% (%SERVICE_ID%)" --Description "Elasticsearch %ES_VERSION% Windows Service - http://elasticsearch.org" --Jvm "%JVM_DLL%" --StartMode jvm --StopMode jvm --StartPath "%ES_HOME%"
|
if "%ES_START_TYPE%" == "" set ES_START_TYPE=manual
|
||||||
|
if "%ES_STOP_TIMEOUT%" == "" set ES_STOP_TIMEOUT=0
|
||||||
|
|
||||||
|
"%EXECUTABLE%" //IS//%SERVICE_ID% --Startup %ES_START_TYPE% --StopTimeout %ES_STOP_TIMEOUT% --StartClass org.elasticsearch.bootstrap.ElasticSearch --StopClass org.elasticsearch.bootstrap.ElasticSearch --StartMethod main --StopMethod close --Classpath "%ES_CLASSPATH%" --JvmSs %JVM_SS% --JvmMs %JVM_XMS% --JvmMx %JVM_XMX% --JvmOptions %JVM_OPTS% ++JvmOptions %ES_PARAMS% %LOG_OPTS% --PidFile "%SERVICE_ID%.pid" --DisplayName "Elasticsearch %ES_VERSION% (%SERVICE_ID%)" --Description "Elasticsearch %ES_VERSION% Windows Service - http://elasticsearch.org" --Jvm "%JVM_DLL%" --StartMode jvm --StopMode jvm --StartPath "%ES_HOME%"
|
||||||
|
|
||||||
|
|
||||||
if not errorlevel 1 goto installed
|
if not errorlevel 1 goto installed
|
||||||
|
|
Loading…
Reference in New Issue