summaryrefslogtreecommitdiff
path: root/www/grafana2/files
diff options
context:
space:
mode:
authorCharlie Root <root@db.2.localnet.cc>2015-05-03 19:59:03 +0000
committerCharlie Root <root@db.2.localnet.cc>2015-05-03 19:59:03 +0000
commitbf985688beeed2958d059c99935af10f84374810 (patch)
tree8a6176c003c16dce3a26eabdfa600be649b9573e /www/grafana2/files
downloadfreebsd-ports-grafana-bf985688beeed2958d059c99935af10f84374810.tar.gz
freebsd-ports-grafana-bf985688beeed2958d059c99935af10f84374810.zip
grafana
Diffstat (limited to 'www/grafana2/files')
-rw-r--r--www/grafana2/files/grafana2.in48
-rw-r--r--www/grafana2/files/patch-package.json21
2 files changed, 69 insertions, 0 deletions
diff --git a/www/grafana2/files/grafana2.in b/www/grafana2/files/grafana2.in
new file mode 100644
index 0000000..2ef263c
--- /dev/null
+++ b/www/grafana2/files/grafana2.in
@@ -0,0 +1,48 @@
+#!/bin/sh
+# $FreeBSD$
+
+# PROVIDE: grafana2
+# REQUIRE: DAEMON NETWORKING
+# BEFORE: LOGIN
+# KEYWORD: shutdown
+
+# Add the following lines to /etc/rc.conf to enable grafana2b:
+# grafana2_enable="YES"
+#
+# grafana2_enable (bool): Set to YES to enable grafana2
+# Default: NO
+# grafana2_ini (str): grafana2 configuration file
+# Default: ${PREFIX}/etc/grafana2.conf
+# grafana2_user (str): grafana2 daemon user
+# Default: grafana2
+# grafana2_group (str): grafana2 daemon group
+# Default: grafana2
+# grafana2_flags (str): Extra flags passed to grafana2
+
+. /etc/rc.subr
+
+name="grafana2"
+rcvar=grafana2_enable
+
+: ${grafana2_enable:="NO"}
+: ${grafana2_homepath:="%%GRAFANA_HOMEDIR%%"}
+: ${grafana2_user:="%%GRAFANA_USER%%"}
+: ${grafana2_group:="%%GRAFANA_GROUP%%"}
+: ${grafana2_flags:=""}
+: ${grafana2_ini:="%%PREFIX%%/etc/${name}.ini"}
+: ${grafana2_options:="${grafana2b_flags} -homepath=${grafana2_homepath} -config=${grafana2_ini}"}
+
+# daemon
+grafana2_pidfile="%%GRAFANA_PIDFILE%%"
+procname="%%PREFIX%%/bin/${name}"
+command=/usr/sbin/daemon
+command_args=" -f -c -p ${grafana2_pidfile} sh -c \\\"${procname} ${grafana2_options} 2>&1| logger -t ${name}\\\""
+start_precmd="grafana2_precmd"
+
+grafana2_precmd()
+{
+ install -o ${grafana2_user} /dev/null ${grafana2_pidfile}
+}
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/www/grafana2/files/patch-package.json b/www/grafana2/files/patch-package.json
new file mode 100644
index 0000000..dd1ba71
--- /dev/null
+++ b/www/grafana2/files/patch-package.json
@@ -0,0 +1,21 @@
+karma-phantomjs-launcher depends on npmjs package 'phantomjs' which
+deliberately downloads big phantomjs binary that we don't need/want.
+
+--- package.json.orig 2015-05-03 16:30:35 UTC
++++ package.json
+@@ -35,15 +35,6 @@
+ "grunt-usemin": "3.0.0",
+ "jshint-stylish": "~0.1.5",
+ "karma": "~0.12.31",
+- "karma-chrome-launcher": "~0.1.4",
+- "karma-coffee-preprocessor": "~0.1.2",
+- "karma-coverage": "0.3.1",
+- "karma-coveralls": "0.1.5",
+- "karma-expect": "~1.1.0",
+- "karma-mocha": "~0.1.4",
+- "karma-phantomjs-launcher": "0.1.4",
+- "karma-requirejs": "0.2.2",
+- "karma-script-launcher": "0.1.0",
+ "load-grunt-tasks": "0.2.0",
+ "mocha": "2.2.4",
+ "requirejs": "2.1.17",