-
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.
Browse files
Browse the repository at this point in the history
…2399) Backport 8ccad5c from #2371 Signed-off-by: Peter Nied <[email protected]> (cherry picked from commit ffc64e5) Co-authored-by: Peter Nied <[email protected]>
- Loading branch information
1 parent
1dc4d44
commit 0428622
Showing
3 changed files
with
24 additions
and
15 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,11 +1,14 @@ | ||
@echo off | ||
set SCRIPT_DIR=%~dp0 | ||
set DIR=%~dp0 | ||
|
||
rem comparing to empty string makes this equivalent to bash -v check on env var | ||
if not "%OPENSEARCH_JAVA_HOME%" == "" ( | ||
if defined OPENSEARCH_JAVA_HOME ( | ||
set BIN_PATH="%OPENSEARCH_JAVA_HOME%\bin\java.exe" | ||
) else ( | ||
) else if defined JAVA_HOME ( | ||
set BIN_PATH="%JAVA_HOME%\bin\java.exe" | ||
) else ( | ||
echo Unable to find java runtime | ||
echo OPENSEARCH_JAVA_HOME or JAVA_HOME must be defined | ||
exit /b 1 | ||
) | ||
|
||
%BIN_PATH% -cp "%SCRIPT_DIR%\..\..\opendistro_security_ssl\*;%SCRIPT_DIR%\..\deps\*;%SCRIPT_DIR%\..\*;%SCRIPT_DIR%\..\..\..\lib\*" org.opensearch.security.tools.AuditConfigMigrater %* | ||
%BIN_PATH% -cp "%DIR%\..\*;%DIR%\..\..\..\lib\*;%DIR%\..\deps\*" 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
@echo off | ||
set SCRIPT_DIR=%~dp0 | ||
set DIR=%~dp0 | ||
|
||
rem comparing to empty string makes this equivalent to bash -v check on env var | ||
if not "%OPENSEARCH_JAVA_HOME%" == "" ( | ||
if defined OPENSEARCH_JAVA_HOME ( | ||
set BIN_PATH="%OPENSEARCH_JAVA_HOME%\bin\java.exe" | ||
) else ( | ||
) else if defined JAVA_HOME ( | ||
set BIN_PATH="%JAVA_HOME%\bin\java.exe" | ||
) else ( | ||
echo Unable to find java runtime | ||
echo OPENSEARCH_JAVA_HOME or JAVA_HOME must be defined | ||
exit /b 1 | ||
) | ||
|
||
%BIN_PATH% -cp "%SCRIPT_DIR%\..\..\opendistro_security_ssl\*;%SCRIPT_DIR%\..\deps\*;%SCRIPT_DIR%\..\*;%SCRIPT_DIR%\..\..\..\lib\*" org.opensearch.security.tools.Hasher %* | ||
%BIN_PATH% -cp "%DIR%\..\*;%DIR%\..\..\..\lib\*;%DIR%\..\deps\*" 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
@echo off | ||
set SCRIPT_DIR=%~dp0 | ||
set DIR=%~dp0 | ||
|
||
rem comparing to empty string makes this equivalent to bash -v check on env var | ||
if not "%OPENSEARCH_JAVA_HOME%" == "" ( | ||
if defined OPENSEARCH_JAVA_HOME ( | ||
set BIN_PATH="%OPENSEARCH_JAVA_HOME%\bin\java.exe" | ||
) else ( | ||
) else if defined JAVA_HOME ( | ||
set BIN_PATH="%JAVA_HOME%\bin\java.exe" | ||
) else ( | ||
echo Unable to find java runtime | ||
echo OPENSEARCH_JAVA_HOME or JAVA_HOME must be defined | ||
exit /b 1 | ||
) | ||
|
||
%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 | ||
%BIN_PATH% -Dorg.apache.logging.log4j.simplelog.StatusLogger.level=OFF -cp "%DIR%\..\*;%DIR%\..\..\..\lib\*;%DIR%\..\deps\*" org.opensearch.security.tools.SecurityAdmin %* 2> nul |