comparison logstash.rc @ 34:8ed811f9a0bd

update config files for 1.2.1 syntax changes
author Carl Byington <carl@five-ten-sg.com>
date Wed, 25 Sep 2013 15:09:22 -0700
parents 610835fb4209
children
comparison
equal deleted inserted replaced
33:0faebb0b0fa4 34:8ed811f9a0bd
26 DESC="Logstash Daemon" 26 DESC="Logstash Daemon"
27 JAVA=$(which java 2>/dev/null) 27 JAVA=$(which java 2>/dev/null)
28 CONFIGFILE=/etc/logstash/logstash.conf 28 CONFIGFILE=/etc/logstash/logstash.conf
29 LOGFILE=/var/log/logstash/logstash.log 29 LOGFILE=/var/log/logstash/logstash.log
30 JARNAME=/usr/share/java/logstash.jar 30 JARNAME=/usr/share/java/logstash.jar
31 ARGS="$JAVAARGS -jar $JARNAME agent --config $CONFIGFILE --log $LOGFILE $AGENTARGS -- $WEBARGS" 31 ARGS="$JAVAARGS -jar $JARNAME agent --config $CONFIGFILE --log $LOGFILE $AGENTARGS"
32 PIDFILE=/var/run/logstash.pid 32 PIDFILE=/var/run/logstash.pid
33 base=logstash 33 base=logstash
34 34
35 # Exit if java is not installed 35 # Exit if java is not installed
36 if [ ! -x "$JAVA" ]; then 36 if [ ! -x "$JAVA" ]; then
45 # 45 #
46 do_start() { 46 do_start() {
47 cd $HOME 47 cd $HOME
48 pid=$( 48 pid=$(
49 exec sudo -u logstash /bin/bash - <<EOF 49 exec sudo -u logstash /bin/bash - <<EOF
50 $JAVA $ARGS >&2 & 50 $JAVA $ARGS </dev/null >/dev/null 2>/dev/null &
51 echo \$! 51 echo \$!
52 EOF 52 EOF
53 ) 53 )
54 echo $pid >$PIDFILE 54 echo $pid >$PIDFILE
55 [ -n "$pid" ] && success $"$base startup" || failure $"$base startup" 55 [ -n "$pid" ] && success $"$base startup" || failure $"$base startup"