From 205ce93dbf7723999974f0e8e6e4d6f60147a87a Mon Sep 17 00:00:00 2001 From: Patrick Lauer <patrick@gentoo.org> Date: Wed, 22 Jun 2016 12:34:05 +0200 Subject: www-apps/grafana-bin: Initial import, ebuild borrowed from Adjust overlay Package-Manager: portage-2.3.0_rc1 --- www-apps/grafana-bin/files/grafana.confd | 7 +++++++ www-apps/grafana-bin/files/grafana.initd | 34 ++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 www-apps/grafana-bin/files/grafana.confd create mode 100644 www-apps/grafana-bin/files/grafana.initd (limited to 'www-apps/grafana-bin/files') diff --git a/www-apps/grafana-bin/files/grafana.confd b/www-apps/grafana-bin/files/grafana.confd new file mode 100644 index 000000000000..207ef765f653 --- /dev/null +++ b/www-apps/grafana-bin/files/grafana.confd @@ -0,0 +1,7 @@ +# Config file for /etc/init.d/grafana + +# The user to run your application as. +GRAFANA_USER=grafana + +# The group to run your application as. +GRAFANA_GROUP=grafana 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 $? +} -- cgit v1.2.3-65-gdbad