Created
July 7, 2013 01:49
-
-
Save nodesocket/5941945 to your computer and use it in GitHub Desktop.
Kibana init.d service script.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
for the new kibana4, check out https://github.com/akabdog/scripts/blob/master/kibana4_init