-
Notifications
You must be signed in to change notification settings - Fork 282
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for OPENSEARCH_JAVA_HOME (#1603)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
- Loading branch information
Showing
6 changed files
with
46 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
@echo off | ||
set SCRIPT_DIR=%~dp0 | ||
"%JAVA_HOME%\bin\java" -cp "%SCRIPT_DIR%\..\..\opendistro_security_ssl\*;%SCRIPT_DIR%\..\deps\*;%SCRIPT_DIR%\..\*;%SCRIPT_DIR%\..\..\..\lib\*" org.opensearch.security.tools.AuditConfigMigrater %* | ||
|
||
rem comparing to empty string makes this equivalent to bash -v check on env var | ||
if not "%OPENSEARCH_JAVA_HOME%" == "" ( | ||
set BIN_PATH="%OPENSEARCH_JAVA_HOME%\bin\java.exe" | ||
) else ( | ||
set BIN_PATH="%JAVA_HOME%\bin\java.exe" | ||
) | ||
|
||
%BIN_PATH% -cp "%SCRIPT_DIR%\..\..\opendistro_security_ssl\*;%SCRIPT_DIR%\..\deps\*;%SCRIPT_DIR%\..\*;%SCRIPT_DIR%\..\..\..\lib\*" org.opensearch.security.tools.AuditConfigMigrater %* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
@echo off | ||
set SCRIPT_DIR=%~dp0 | ||
"%JAVA_HOME%\bin\java" -cp "%SCRIPT_DIR%\..\..\opendistro_security_ssl\*;%SCRIPT_DIR%\..\deps\*;%SCRIPT_DIR%\..\*;%SCRIPT_DIR%\..\..\..\lib\*" org.opensearch.security.tools.Hasher %* | ||
|
||
rem comparing to empty string makes this equivalent to bash -v check on env var | ||
if not "%OPENSEARCH_JAVA_HOME%" == "" ( | ||
set BIN_PATH="%OPENSEARCH_JAVA_HOME%\bin\java.exe" | ||
) else ( | ||
set BIN_PATH="%JAVA_HOME%\bin\java.exe" | ||
) | ||
|
||
%BIN_PATH% -cp "%SCRIPT_DIR%\..\..\opendistro_security_ssl\*;%SCRIPT_DIR%\..\deps\*;%SCRIPT_DIR%\..\*;%SCRIPT_DIR%\..\..\..\lib\*" org.opensearch.security.tools.Hasher %* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
@echo off | ||
set SCRIPT_DIR=%~dp0 | ||
"%JAVA_HOME%\bin\java" -Dorg.apache.logging.log4j.simplelog.StatusLogger.level=OFF -cp "%SCRIPT_DIR%\..\..\opendistro_security-ssl\*;%SCRIPT_DIR%\..\deps\*;%SCRIPT_DIR%\..\*;%SCRIPT_DIR%\..\..\..\lib\*" org.opensearch.security.tools.SecurityAdmin %* 2> nul | ||
|
||
rem comparing to empty string makes this equivalent to bash -v check on env var | ||
if not "%OPENSEARCH_JAVA_HOME%" == "" ( | ||
set BIN_PATH="%OPENSEARCH_JAVA_HOME%\bin\java.exe" | ||
) else ( | ||
set BIN_PATH="%JAVA_HOME%\bin\java.exe" | ||
) | ||
|
||
%BIN_PATH% -Dorg.apache.logging.log4j.simplelog.StatusLogger.level=OFF -cp "%SCRIPT_DIR%\..\..\opendistro_security-ssl\*;%SCRIPT_DIR%\..\deps\*;%SCRIPT_DIR%\..\*;%SCRIPT_DIR%\..\..\..\lib\*" org.opensearch.security.tools.SecurityAdmin %* 2> nul |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters