comparison logstash.rc @ 7:e4ba03940224

fix startup script
author Carl Byington <carl@five-ten-sg.com>
date Fri, 22 Mar 2013 10:50:16 -0700
parents 6b7beb807d14
children 4899fb1b3eb3
comparison
equal deleted inserted replaced
6:ccedd213595c 7:e4ba03940224
47 # 47 #
48 do_start() { 48 do_start() {
49 cd $HOME 49 cd $HOME
50 pid=$( 50 pid=$(
51 exec sudo -u logstash /bin/bash - <<EOF 51 exec sudo -u logstash /bin/bash - <<EOF
52 $JAVA $ARGS 52 $JAVA $ARGS &
53 echo \$! 53 echo \$!
54 EOF 54 EOF
55 ) 55 )
56 #pid=$(su logstash -c 'echo -e "'"$JAVA $ARGS"' </dev/null >'"$LOGFILE"' 2>&1 & \n echo \$!" | bash')
57 echo $pid >$PIDFILE 56 echo $pid >$PIDFILE
58 [ -n "$pid" ] && success $"$base startup" || failure $"$base startup" 57 [ -n "$pid" ] && success $"$base startup" || failure $"$base startup"
59 } 58 }
60 59
61 60