blob: 80a3f5d4d395b6ab0b5e58a500b7941ed4e222bb (
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
|
#!/sbin/runscript
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
depend() {
need localmount
}
start() {
ebegin "Starting grafana server"
touch /var/run/grafana.pid
chown ${GRAFANA_USER}:${GRAFANA_GROUP} /var/run/grafana.pid
start-stop-daemon --start -b \
--chdir /usr/share/grafana \
--user ${GRAFANA_USER}:${GRAFANA_GROUP} \
--exec /usr/sbin/grafana -- \
-pidfile=/var/run/grafana.pid \
-config=/etc/grafana/grafana.ini \
cfg:default.paths.data=/var/lib/grafana \
cfg:default.paths.logs=/var/log/grafana
eend $?
}
stop() {
ebegin "Stopping grafana server"
start-stop-daemon --stop \
--pidfile /var/run/grafana.pid \
--user "${GRAFANA_USER}" \
--retry=TERM/20/KILL/5
eend $?
}
|