aboutsummaryrefslogtreecommitdiffstats
path: root/testing/grafana/grafana.initd
diff options
context:
space:
mode:
authorKonstantin Kulikov <k.kulikov2@gmail.com>2019-08-02 18:43:05 +0000
committerLeo <thinkabit.ukim@gmail.com>2019-08-11 21:41:26 -0300
commite28d2e1f07e57e163b15dba7de2efc372cc06c5a (patch)
treee933a94ecb3383a2b09813620abc37324ec3ac19 /testing/grafana/grafana.initd
parent292c4bf77ed44d27e54df201fa5b89867888ca4e (diff)
downloadaports-e28d2e1f07e57e163b15dba7de2efc372cc06c5a.tar.bz2
aports-e28d2e1f07e57e163b15dba7de2efc372cc06c5a.tar.xz
testing/grafana: new aport
Diffstat (limited to 'testing/grafana/grafana.initd')
-rw-r--r--testing/grafana/grafana.initd20
1 files changed, 20 insertions, 0 deletions
diff --git a/testing/grafana/grafana.initd b/testing/grafana/grafana.initd
new file mode 100644
index 0000000000..a3458f9129
--- /dev/null
+++ b/testing/grafana/grafana.initd
@@ -0,0 +1,20 @@
+#!/sbin/openrc-run
+
+command="/usr/sbin/grafana-server"
+command_args="$GRAFANA_OPTS"
+command_background=yes
+command_user=grafana:grafana
+pidfile="/run/$RC_SVCNAME.pid"
+
+depend() {
+ need net
+ after firewall
+}
+
+start_pre() {
+ checkpath -d -o grafana:grafana -m755 $GRAFANA_HOME \
+ $GRAFANA_HOME/provisioning \
+ $GRAFANA_HOME/provisioning/dashboards \
+ $GRAFANA_HOME/provisioning/datasources \
+ $GRAFANA_HOME/provisioning/notifiers
+}