mirror of
https://git.freebsd.org/ports.git
synced 2025-07-12 14:59:13 -04:00
dashboard for Elasticsearch. Kibana is a snap to setup and start using. Kibana strives to be easy to get started with, while also being flexible and powerful, just like Elasticsearch. Kibana 6.x is compatible with Elasticsearch 6.x WWW: https://www.elastic.co/products/kibana
45 lines
1,015 B
Bash
45 lines
1,015 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: kibana
|
|
# REQUIRE: DAEMON
|
|
# KEYWORD: shutdown
|
|
|
|
. /etc/rc.subr
|
|
|
|
name=kibana
|
|
rcvar=kibana_enable
|
|
|
|
load_rc_config $name
|
|
|
|
: ${kibana_enable:="NO"}
|
|
: ${kibana_config:="%%PREFIX%%/etc/kibana.yml"}
|
|
: ${kibana_user:="www"}
|
|
: ${kibana_group:="www"}
|
|
: ${kibana_log:="/var/log/kibana.log"}
|
|
|
|
required_files="${kibana_config}"
|
|
pidfile="/var/run/${name}/${name}.pid"
|
|
start_precmd="kibana_precmd"
|
|
procname="%%LOCALBASE%%/bin/node"
|
|
command="/usr/sbin/daemon"
|
|
command_args="-f -p ${pidfile} env BABEL_DISABLE_CACHE=1 ${procname} %%WWWDIR%%/src/cli serve --config ${kibana_config} --log-file ${kibana_log}"
|
|
|
|
kibana_precmd()
|
|
{
|
|
if [ ! -d $(dirname ${pidfile}) ]; then
|
|
install -d -o ${kibana_user} -g ${kibana_group} $(dirname ${pidfile})
|
|
fi
|
|
|
|
if [ ! -f ${kibana_log} ]; then
|
|
install -o ${kibana_user} -g ${kibana_group} -m 640 /dev/null ${kibana_log}
|
|
fi
|
|
|
|
if [ ! -d %%WWWDIR%%/optimize ]; then
|
|
install -d -o ${kibana_user} -g ${kibana_group} %%WWWDIR%%/optimize
|
|
fi
|
|
}
|
|
|
|
run_rc_command "$1"
|