Permalink
Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time. Cannot retrieve contributors at this time
executable file 43 lines (38 sloc) 1.09 KB
#!/bin/sh
# Run logstash from source
#
# This is most useful when done from a git checkout.
#
# Usage:
# bin/logstash <command> [arguments]
#
# See 'bin/logstash help' for a list of commands.
#
# NOTE: One extra command is available 'deps'
# The 'deps' command will install dependencies for logstash.
# Defaults you can override with environment variables
LS_HEAP_SIZE="${LS_HEAP_SIZE:=500m}"
unset CDPATH
basedir=$(cd `dirname $0`/..; pwd)
. "${basedir}/bin/logstash.lib.sh"
setup
# Export these so that they can be picked up by file input (and others?).
export HOME SINCEDB_DIR
case $1 in
deps) install_deps ;;
env) env "$@" ;;
-*)
if [ -z "$VENDORED_JRUBY" ] ; then
exec "${RUBYCMD}" "${basedir}/lib/logstash/runner.rb" "agent" "$@"
else
exec "${JAVACMD}" $JAVA_OPTS "-jar" "$JRUBY_JAR" "${basedir}/lib/logstash/runner.rb" "agent" "$@"
fi
;;
*)
if [ -z "$VENDORED_JRUBY" ] ; then
exec "${RUBYCMD}" "${basedir}/lib/logstash/runner.rb" "$@"
else
exec "${JAVACMD}" $JAVA_OPTS "-jar" "$JRUBY_JAR" "${basedir}/lib/logstash/runner.rb" "$@"
fi
;;
esac