summaryrefslogtreecommitdiff
path: root/www/grafana2/files/grafana2.in
diff options
context:
space:
mode:
Diffstat (limited to 'www/grafana2/files/grafana2.in')
-rw-r--r--www/grafana2/files/grafana2.in49
1 files changed, 0 insertions, 49 deletions
diff --git a/www/grafana2/files/grafana2.in b/www/grafana2/files/grafana2.in
deleted file mode 100644
index 4a97b79dd99f..000000000000
--- a/www/grafana2/files/grafana2.in
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/sh
-
-# $FreeBSD$
-#
-# PROVIDE: grafana2
-# REQUIRE: LOGIN
-# KEYWORD: shutdown
-
-# Add the following lines to /etc/rc.conf to enable grafana
-# grafana_enable="YES"
-#
-# grafana2_enable (bool): Set to YES to enable grafana
-# Default: NO
-# grafana2_conf (str): grafana configration file
-# Default: ${PREFIX}/etc/grafana.cfg
-# grafana2_user (str): grafana daemon user
-# Default: %%GRAFANA_USER%%
-# grafana2_group (str): grafana daemon group
-# Default: %%GRAFANA_GROUP%%
-
-. /etc/rc.subr
-
-name="grafana2"
-rcvar=grafana2_enable
-
-: ${grafana2_enable:="NO"}
-: ${grafana2_user:="%%GRAFANA_USER%%"}
-: ${grafana2_group:="%%GRAFANA_GROUP%%"}
-: ${grafana2_flags:=""}
-: ${grafana2_conf:="%%PREFIX%%/etc/${name}.conf"}
-: ${grafana2_options:="-config=${grafana2_conf} -homepath=%%GRAFANAHOMEDIR%%"}
-
-pidfile="%%GRAFANAPIDDIR%%${name}.pid"
-procname="%%PREFIX%%/bin/grafana-server"
-command=/usr/sbin/daemon
-command_args="-f -c -p ${pidfile} ${procname} ${grafana2_options}"
-start_precmd="grafana_precmd"
-
-grafana_precmd()
-{
- chown ${grafana2_user}:${grafana2_group} %%GRAFANADATADIR%%
- chown ${grafana2_user}:${grafana2_group} %%GRAFANALOGDIR%%
- chown ${grafana2_user}:${grafana2_group} %%GRAFANAHOMEDIR%%data/log/
- install -d -o ${grafana2_user} %%GRAFANAPIDDIR%%
- install -o ${grafana2_user} /dev/null ${pidfile}
-}
-
-load_rc_config $name
-run_rc_command "$1"