diff Kibana.rc @ 27:76544ad0561d

switch kibana to ruby gem rather than jruby
author Carl Byington <carl@five-ten-sg.com>
date Mon, 06 May 2013 23:31:24 -0700
parents 610835fb4209
children
line wrap: on
line diff
--- a/Kibana.rc	Fri May 03 08:04:08 2013 -0700
+++ b/Kibana.rc	Mon May 06 23:31:24 2013 -0700
@@ -22,12 +22,6 @@
 . /etc/sysconfig/Kibana
 
 DESC="Kibana Daemon"
-JAVA=$(which java 2>/dev/null)
-if [ "$(which jruby 2>/dev/null)" == '' ]; then
-    JRUBY_CMD="$JAVA $JAVAARGS -jar /usr/share/jruby.jar"
-else
-    JRUBY_CMD="jruby"
-fi
 LOGFILE=/var/log/Kibana/Kibana.log
 PIDFILE=/var/run/Kibana.pid
 base=Kibana
@@ -38,17 +32,14 @@
 # Function that starts the daemon/service
 #
 do_start() {
-    cd /usr/share/java/Kibana
+    cd /home/kibana
     pid=$(
     exec sudo -u kibana /bin/bash - <<EOF
-        export GEM_HOME=$(pwd)
-        export GEM_PATH=
-        export JAVA_MEM=$JAVA_MEM
-        export JAVA_STACK=$JAVA_STACK
         export KIBANA_HOST=$KIBANA_HOST
         export KIBANA_PORT=$KIBANA_PORT
         export KIBANA_ES=$KIBANA_ES
-        $JRUBY_CMD kibana.rb >>$LOGFILE 2>&1 &
+        export KIBANA_CONFIG=$KIBANA_CONFIG
+        kibana >>$LOGFILE 2>&1 &
         echo \$!
 EOF
     )