mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-13 08:25:26 +00:00
In #9474, we exported the hostname in the bin/elasticsearch scripts so that it could be used as a variable in the elasticsearch.yml file but did not do the same for plugin manager. When using the hostname variable in elasticsearch.yml and trying to use the plugin manager, initialization will fail because the property could not be resolved. This change will allow the hostname to be resolved in the same manner as the service scripts. Closes #10902
26 lines
472 B
Batchfile
26 lines
472 B
Batchfile
@echo off
|
|
|
|
SETLOCAL
|
|
|
|
if NOT DEFINED JAVA_HOME goto err
|
|
|
|
set SCRIPT_DIR=%~dp0
|
|
for %%I in ("%SCRIPT_DIR%..") do set ES_HOME=%%~dpfI
|
|
|
|
TITLE Elasticsearch Plugin Manager ${project.version}
|
|
|
|
SET HOSTNAME=%COMPUTERNAME%
|
|
|
|
"%JAVA_HOME%\bin\java" %JAVA_OPTS% %ES_JAVA_OPTS% -Xmx64m -Xms16m -Des.path.home="%ES_HOME%" -cp "%ES_HOME%/lib/*;" "org.elasticsearch.plugins.PluginManager" %*
|
|
goto finally
|
|
|
|
|
|
:err
|
|
echo JAVA_HOME environment variable must be set!
|
|
pause
|
|
|
|
|
|
:finally
|
|
|
|
ENDLOCAL
|