aboutsummaryrefslogtreecommitdiffstats
path: root/testing/kibana/kibana.initd
blob: cdcf6d69d1d3f5d37138325b89664873af3d768c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/sbin/openrc-run
supervisor=supervise-daemon
description="Visualize and manage your ElasticSearch data"
name="Kibana"

: ${command_user:="kibana"}
: ${command_group:="$(id -gn $user)"}
: ${logs_dir:="/var/log/kibana"}
: ${work_dir:="/var/tmp/kibana"}
: ${conf_file:="/etc/kibana/kibana.yml"}

pidfile="/run/kibana/$RC_SVCNAME.pid"
supervise_daemon_args="-u $command_user -g $command_group -p $pidfile"
command=/usr/share/webapps/kibana/bin/kibana
command_args="--config $conf_file 1>>$logs_dir/kibana.log 2>>$logs_dir/error.log"

export BABEL_CACHE_PATH=/var/tmp/kibana/.babelcache.json

depends() {
        use net
	after firewall
}

start_pre() {
	for dir in \
		"$logs_dir" \
		"$work_dir" \
		"${pidfile%/kibana.pid}" \
		; do checkpath -d -o $command_user:$command_group -m755 $dir
	done
}