Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
68 lines (62 sloc) 1.28 KB
#!/bin/sh
#
# kibana -- startup script for kibana4
#
# chkconfig: - 85 15
# processname: kibana
# pidfile: /var/run/kibana.pid
# description: Kibana is a webui to visualize data
#
### BEGIN INIT INFO
# Provides: kibana
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: start and stop kibana
### END INIT INFO
#
#
. /etc/init.d/functions
PIDFILE="/var/run/kibana.pid"
KIBANA_DIR="/opt/kibana/"
start() {
echo -n "Starting Kibana Daemon: "
if [ -f $PIDFILE ]; then
PID=`cat $PIDFILE`
echo Kibana already running: $PID
exit 1;
else
cd $KIBANA_DIR
PID=`./bin/kibana >/dev/null 2>&1 & echo $! > $PIDFILE`
echo `cat $PIDFILE`
fi
}
stop() {
echo -n "Shutting down Kibana Daemon: "
echo
killproc kibana
echo
rm -f /var/lock/subsys/kibana
return 0
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status kibana
;;
restart)
stop
start
;;
*)
echo "Usage: {start|stop|status|restart}"
exit 1
;;
esac
exit $?