summaryrefslogtreecommitdiff
blob: 9effc545218e93699132c1c4d59a0b0019b699e3 (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
32
33
34
35
36
37
38
39
#!/sbin/runscript
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

command="/opt/kibana/bin/kibana"
pidfile="/run/kibana.pid"
KIBANA_USER=${KIBANA_USER:="kibana"}

depend() {
	need elasticsearch
}

start() {
	ebegin "Starting ${SVCNAME}"

	checkpath -d -o "${KIBANA_USER}" -m750 "/var/log/kibana"

	start-stop-daemon --start \
		--user $KIBANA_USER \
		--background \
		--make-pidfile \
		--pidfile $pidfile \
		--stdout /var/log/kibana/kibana.log \
		--stderr /var/log/kibana/kibana.err \
		--exec $command
	
	eend $?
}

stop() {
	ebegin "Stopping ${SVCNAME}"
	
	start-stop-daemon --stop \
		--pidfile $pidfile

	
	eend $?
}