mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 01:13:23 -04:00
We have decided to trust node's default options as the best default for Kibana. Fixes #5598
24 lines
598 B
Bash
Executable file
24 lines
598 B
Bash
Executable file
#!/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"
|
|
test -x "$NODE" || NODE=$(which node)
|
|
if [ ! -x "$NODE" ]; then
|
|
echo "unable to find usable node.js executable."
|
|
exit 1
|
|
fi
|
|
|
|
exec "${NODE}" $NODE_OPTIONS "${DIR}/src/cli" ${@}
|