mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[bin/kibana] find node in patch if no local node
This commit is contained in:
parent
e809f4b718
commit
8d7ae77f56
2 changed files with 20 additions and 10 deletions
|
@ -6,15 +6,20 @@ set SCRIPT_DIR=%~dp0
|
|||
for %%I in ("%SCRIPT_DIR%..") do set DIR=%%~dpfI
|
||||
|
||||
set NODE=%DIR%\node\node.exe
|
||||
set SERVER=%DIR%\src\server\cli
|
||||
set CONFIG_PATH=%DIR%\config\kibana.yml
|
||||
for /f %%i in ('WHERE node') do (set SYS_NODE=%%i)
|
||||
|
||||
TITLE Kibana Server @@version
|
||||
If Not Exist "%NODE%" (
|
||||
IF Exist "%SYS_NODE%" (
|
||||
set NODE=%SYS_NODE%
|
||||
) else (
|
||||
Echo unable to find usable node.js executable.
|
||||
Exit /B 1
|
||||
)
|
||||
)
|
||||
|
||||
"%NODE%" "%SERVER%" %*
|
||||
TITLE Kibana Server
|
||||
"%NODE%" "%DIR%\src\cli" %*
|
||||
|
||||
:finally
|
||||
|
||||
ENDLOCAL
|
||||
|
||||
|
||||
|
|
13
bin/kibana.sh
Normal file → Executable file
13
bin/kibana.sh
Normal file → Executable file
|
@ -13,9 +13,14 @@ while [ -h "$SCRIPT" ] ; do
|
|||
fi
|
||||
done
|
||||
|
||||
DIR=$(dirname "${SCRIPT}")/..
|
||||
NODE=${DIR}/node/bin/node
|
||||
SERVER=${DIR}/src/server/cli
|
||||
DIR="$(dirname "${SCRIPT}")/.."
|
||||
NODE="${DIR}/node/bin/node"
|
||||
test -x "$NODE" || NODE=$(which node)
|
||||
if [ ! -x "$NODE" ]; then
|
||||
echo "unable to find usable node.js executable."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CONFIG_PATH="${DIR}/config/kibana.yml" exec "${NODE}" ${SERVER} ${@}
|
||||
|
||||
CONFIG_PATH="${DIR}/config/kibana.yml" exec "${NODE}" "${DIR}/src/cli" ${@}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue