summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Lauer <patrick@gentoo.org>2016-06-22 12:34:05 +0200
committerPatrick Lauer <patrick@gentoo.org>2016-06-22 12:35:42 +0200
commit205ce93dbf7723999974f0e8e6e4d6f60147a87a (patch)
treedb5e20bba9e8f1b32ee510cd3b0d3a700a1daeca /www-apps/grafana-bin/files/grafana.initd
parentapp-office/lyx: version bump 2.1.5 (diff)
downloadgentoo-205ce93dbf7723999974f0e8e6e4d6f60147a87a.tar.gz
gentoo-205ce93dbf7723999974f0e8e6e4d6f60147a87a.tar.bz2
gentoo-205ce93dbf7723999974f0e8e6e4d6f60147a87a.zip
www-apps/grafana-bin: Initial import, ebuild borrowed from Adjust overlay
Package-Manager: portage-2.3.0_rc1
Diffstat (limited to 'www-apps/grafana-bin/files/grafana.initd')
-rw-r--r--www-apps/grafana-bin/files/grafana.initd34
1 files changed, 34 insertions, 0 deletions
diff --git a/www-apps/grafana-bin/files/grafana.initd b/www-apps/grafana-bin/files/grafana.initd
new file mode 100644
index 000000000000..ecbd2e22d814
--- /dev/null
+++ b/www-apps/grafana-bin/files/grafana.initd
@@ -0,0 +1,34 @@
+#!/sbin/runscript
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need localmount
+}
+
+start() {
+ ebegin "Starting grafana server"
+
+ start-stop-daemon --start -b \
+ --chdir /usr/share/grafana \
+ --user ${GRAFANA_USER}:${GRAFANA_GROUP} \
+ --exec /usr/bin/grafana-server -- \
+ -pidfile=/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 /run/grafana.pid \
+ --user "${GRAFANA_USER}" \
+ --retry=TERM/20/KILL/5
+
+ eend $?
+}