pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/grafana grafana: Add SMF manifest, based on PR#52612



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6572795fac15
branches:  trunk
changeset: 370193:6572795fac15
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Fri Oct 13 12:28:19 2017 +0000

description:
grafana: Add SMF manifest, based on PR#52612

diffstat:

 www/grafana/Makefile               |   4 +++-
 www/grafana/files/smf/manifest.xml |  29 +++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+), 1 deletions(-)

diffs (51 lines):

diff -r 2a70fc5276cc -r 6572795fac15 www/grafana/Makefile
--- a/www/grafana/Makefile      Fri Oct 13 10:45:57 2017 +0000
+++ b/www/grafana/Makefile      Fri Oct 13 12:28:19 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2017/07/23 07:20:42 wiz Exp $
+# $NetBSD: Makefile,v 1.4 2017/10/13 12:28:19 jperkin Exp $
 
 GITHUB_PROJECT=        grafana
 DISTNAME=      grafana-4.4.1
@@ -53,6 +53,8 @@
 BUILD_DEFS+=           GRAFANA_USER GRAFANA_GROUP VARBASE
 FILES_SUBST+=          GRAFANA_USER=${GRAFANA_USER:Q}
 FILES_SUBST+=          GRAFANA_GROUP=${GRAFANA_GROUP:Q}
+FILES_SUBST+=          DATADIR=${DATADIR:Q}
+
 GRAFANA_USER?=         grafana
 GRAFANA_GROUP?=                grafana
 OWN_DIRS_PERMS+=       ${DATADIR} ${GRAFANA_USER} ${GRAFANA_GROUP} 0700
diff -r 2a70fc5276cc -r 6572795fac15 www/grafana/files/smf/manifest.xml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/grafana/files/smf/manifest.xml        Fri Oct 13 12:28:19 2017 +0000
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<service_bundle type='manifest' name='grafana:default'>
+  <service name='@SMF_PREFIX@/@SMF_NAME@' type='service' version='1'>
+    <create_default_instance enabled='false' />
+    <single_instance />
+    <dependency name='network' grouping='require_all' restart_on='none' type='service'>
+      <service_fmri value='svc:/milestone/network:default' />
+    </dependency>
+    <dependency name='fs-local' grouping='require_all' restart_on='none' type='service'>
+      <service_fmri value='svc:/system/filesystem/local:default' />
+    </dependency>
+    <method_context working_directory="@PREFIX@/share/grafana">
+      <method_credential user='@GRAFANA_USER@' group='@GRAFANA_GROUP@' />
+    </method_context>
+    <exec_method type='method' name='start'
+      exec='@PREFIX@/bin/grafana-server -config @PKG_SYSCONFDIR@/grafana.conf -pidfile @DATADIR@/grafana.pid &amp;'
+      timeout_seconds="60" />
+    <exec_method type='method' name='stop' exec=':kill' timeout_seconds="60" />
+    <template>
+      <common_name>
+        <loctext xml:lang='C'>Grafana Visualization Server</loctext>
+      </common_name>
+      <documentation>
+        <doc_link name='homepage' uri='http://docs.grafana.org' />
+      </documentation>
+    </template>
+  </service>
+</service_bundle>



Home | Main Index | Thread Index | Old Index