Skip to content

Instantly share code, notes, and snippets.

@nodesocket
Created July 7, 2013 01:49
Show Gist options
  • Save nodesocket/5941945 to your computer and use it in GitHub Desktop.
Save nodesocket/5941945 to your computer and use it in GitHub Desktop.
Kibana init.d service script.
#!/bin/bash
### BEGIN INIT INFO
# Provides: kibana
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Make sense of a mountain of logs.
### END INIT INFO
#
# chkconfig: 2345 20 80
#
KIBANA_PATH="/srv/kibana"
case "$1" in
start)
/usr/bin/ruby $KIBANA_PATH/kibana-daemon.rb $1
RETVAL=$?
;;
stop)
/usr/bin/ruby $KIBANA_PATH/kibana-daemon.rb $1
RETVAL=$?
;;
restart)
/usr/bin/ruby $KIBANA_PATH/kibana-daemon.rb $1
RETVAL=$?
;;
status)
/usr/bin/ruby $KIBANA_PATH/kibana-daemon.rb $1
;;
force-reload)
/usr/bin/ruby $KIBANA_PATH/kibana-daemon.rb zap
/usr/bin/ruby $KIBANA_PATH/kibana-daemon.rb start
RETVAL=$?
;;
*)
echo "Usage: $0 {start|stop|restart|status|force-reload}"
exit 1
esac
exit $RETVAL
@panophobicPanda
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment