Adding bat and shell scripts for starting the node server

This commit is contained in:
Chris Cowan 2015-01-11 12:23:04 -07:00
parent 9e28e8bdbd
commit a7cb09a028
2 changed files with 41 additions and 0 deletions

View file

@ -0,0 +1,20 @@
@echo off
SETLOCAL
set SCRIPT_DIR=%~dp0
for %%I in ("%SCRIPT_DIR%..") do set DIR=%%~dpfI
set NODE=%FULL_PATH%\node\node.exe
set SERVER=%DIR%/src/bin/kibana.js
set NODE_ENV="production"
TITLE Kibana Server @@version
%NODE% %SERVER%
:finally
ENDLOCAL

View file

@ -0,0 +1,21 @@
#!/bin/sh
SCRIPT=$0
# SCRIPT may be an arbitrarily deep series of symlinks. Loop until we have the concrete path.
while [ -h "$SCRIPT" ] ; do
ls=$(ls -ld "$SCRIPT")
# Drop everything prior to ->
link=$(expr "$ls" : '.*-> \(.*\)$')
if expr "$link" : '/.*' > /dev/null; then
SCRIPT="$link"
else
SCRIPT=$(dirname "$SCRIPT")/"$link"
fi
done
DIR=$(dirname "${SCRIPT}")/..
NODE=${DIR}/node/bin/node
SERVER=${DIR}/src/bin/kibana.js
NODE_ENV="production" exec "${NODE}" ${SERVER}