Skip to content

Commit

Permalink
[cli] Add kibana-encryption-keys.bat
Browse files Browse the repository at this point in the history
kibana-encryption-keys.bat was not added in the original feature pull
request.  This adds the batch file and support for the Windows CLI.
  • Loading branch information
jbudz committed Jun 14, 2021
1 parent e55a93c commit 2ba386a
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions src/dev/build/tasks/bin/scripts/kibana-encryption-keys.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@echo off

SETLOCAL ENABLEDELAYEDEXPANSION

set SCRIPT_DIR=%~dp0
for %%I in ("%SCRIPT_DIR%..") do set DIR=%%~dpfI

set NODE=%DIR%\node\node.exe

If Not Exist "%NODE%" (
Echo unable to find usable node.js executable.
Exit /B 1
)

set CONFIG_DIR=%KBN_PATH_CONF%
If [%KBN_PATH_CONF%] == [] (
set "CONFIG_DIR=%DIR%\config"
)

IF EXIST "%CONFIG_DIR%\node.options" (
for /F "usebackq eol=# tokens=*" %%i in ("%CONFIG_DIR%\node.options") do (
If [!NODE_OPTIONS!] == [] (
set "NODE_OPTIONS=%%i"
) Else (
set "NODE_OPTIONS=!NODE_OPTIONS! %%i"
)
)
)

TITLE Kibana Encryption Keys
"%NODE%" "%DIR%\src\cli_encryption_keys\dist" %*

:finally

ENDLOCAL

0 comments on commit 2ba386a

Please sign in to comment.