diff options
author | Patrick Lauer <patrick@gentoo.org> | 2016-07-18 17:33:01 +0200 |
---|---|---|
committer | Patrick Lauer <patrick@gentoo.org> | 2016-07-18 17:35:34 +0200 |
commit | 21e1ed587a5f803da0b927a8f3f95e3e5f624a11 (patch) | |
tree | 210d79f41fe645100604a2403b116b8e0a4b2604 /www-apps/grafana-bin/files | |
parent | media-gfx/gimp: Support gegl 0.3.8 (bug #586828) (diff) | |
download | gentoo-21e1ed587a5f803da0b927a8f3f95e3e5f624a11.tar.gz gentoo-21e1ed587a5f803da0b927a8f3f95e3e5f624a11.tar.bz2 gentoo-21e1ed587a5f803da0b927a8f3f95e3e5f624a11.zip |
www-apps/grafana-bin: Fix pidfile handling
Package-Manager: portage-2.3.0
Diffstat (limited to 'www-apps/grafana-bin/files')
-rw-r--r-- | www-apps/grafana-bin/files/grafana.initd.2 | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/www-apps/grafana-bin/files/grafana.initd.2 b/www-apps/grafana-bin/files/grafana.initd.2 new file mode 100644 index 000000000000..14b0b1fdfa04 --- /dev/null +++ b/www-apps/grafana-bin/files/grafana.initd.2 @@ -0,0 +1,35 @@ +#!/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 \ + --make-pidfile \ + --pidfile /run/grafana.pid \ + --chdir /usr/share/grafana \ + --user ${GRAFANA_USER}:${GRAFANA_GROUP} \ + --exec /usr/bin/grafana-server -- \ + -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 $? +} |