-
-
Save jeffgeiger/6378597 to your computer and use it in GitHub Desktop.
Modified to use RVM.
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="/kibana" | |
source /etc/profile.d/rvm.sh | |
RUBY=$(which ruby) | |
case "$1" in | |
start) | |
$RUBY $KIBANA_PATH/kibana-daemon.rb $1 | |
RETVAL=$? | |
;; | |
stop) | |
$RUBY $KIBANA_PATH/kibana-daemon.rb $1 | |
RETVAL=$? | |
;; | |
restart) | |
$RUBY $KIBANA_PATH/kibana-daemon.rb $1 | |
RETVAL=$? | |
;; | |
status) | |
$RUBY $KIBANA_PATH/kibana-daemon.rb $1 | |
;; | |
force-reload) | |
$RUBY $KIBANA_PATH/kibana-daemon.rb zap | |
$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