aboutsummaryrefslogtreecommitdiff
path: root/databases/py-carbon/files
diff options
context:
space:
mode:
authorPhilip M. Gollucci <pgollucci@FreeBSD.org>2012-02-22 03:40:39 +0000
committerPhilip M. Gollucci <pgollucci@FreeBSD.org>2012-02-22 03:40:39 +0000
commitf599927a28da41ec2afbb238f691c1f32c2db345 (patch)
tree2fcdf5f8b714c80ffd6d1c398080250ced6abbdb /databases/py-carbon/files
parent7541702155f79edf349fad5c5ac6aeb0d13572c0 (diff)
downloadports-f599927a28da41ec2afbb238f691c1f32c2db345.tar.gz
ports-f599927a28da41ec2afbb238f691c1f32c2db345.zip
Notes
Diffstat (limited to 'databases/py-carbon/files')
-rw-r--r--databases/py-carbon/files/carbon.in57
-rw-r--r--databases/py-carbon/files/patch-setup.cfg6
-rw-r--r--databases/py-carbon/files/patch-setup.py15
-rw-r--r--databases/py-carbon/files/pkg_message.in19
4 files changed, 97 insertions, 0 deletions
diff --git a/databases/py-carbon/files/carbon.in b/databases/py-carbon/files/carbon.in
new file mode 100644
index 000000000000..8fc587b1e5cf
--- /dev/null
+++ b/databases/py-carbon/files/carbon.in
@@ -0,0 +1,57 @@
+#!/bin/sh
+#
+# PROVIDE: carbon
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# carbon_enable (bool): Set to NO by default.
+# Set it to YES to enable it.
+# carbon_conf_dir: Directory where sabnzbd configuration
+# data is stored.
+# Default: /usr/local/sabnzbd
+# carbon_user: The user account sabnzbd daemon runs as what
+# you want it to be. It uses 'www' user by
+# default. Do not sets it as empty or it will run
+# as root.
+# carbon_group: The group account sabnzbd daemon runs as what
+# you want it to be. It uses 'www' group by
+# default. Do not sets it as empty or it will run
+# as wheel.
+
+. /etc/rc.subr
+
+name="carbon"
+rcvar=${name}_enable
+
+load_rc_config ${name}
+
+: ${carbon_enable:="NO"}
+: ${carbon_user:="root"}
+: ${carbon_group:="wheel"}
+: ${carbon_conf:="/usr/local/etc/carbon/carbon.conf"}
+: ${carbon_debug:="NO"}
+: ${carbon_logdir:="/usr/local/graphite/storage/log"}
+: ${carbon_pidfile:="/var/run/carbon.pid"}
+
+status_cmd="${name}_status"
+stop_cmd="${name}_stop"
+
+command_interpreter="/usr/local/bin/python2.7"
+command="/usr/local/bin/carbon-cache.py"
+command_args="--config=${carbon_conf} --logdir ${carbon_logdir} --pidfile ${carbon_pidfile} start"
+
+carbon_stop() {
+ echo "Stopping $name"
+
+ /usr/local/bin/carbon-cache.py --config=${carbon_conf} --pidfile ${carbon_pidfile} stop
+}
+
+carbon_status() {
+ /usr/local/bin/carbon-cache.py --config=${carbon_conf} --pidfile ${carbon_pidfile} status
+
+}
+
+run_rc_command "$1"
+
diff --git a/databases/py-carbon/files/patch-setup.cfg b/databases/py-carbon/files/patch-setup.cfg
new file mode 100644
index 000000000000..b6e77f6467a8
--- /dev/null
+++ b/databases/py-carbon/files/patch-setup.cfg
@@ -0,0 +1,6 @@
+--- setup.cfg.org 2011-05-05 20:55:25.000000000 -0400
++++ setup.cfg 2011-05-05 20:55:31.000000000 -0400
+@@ -1,3 +1 @@
+ [install]
+-prefix = /opt/graphite
+-install-lib = %(prefix)s/lib
diff --git a/databases/py-carbon/files/patch-setup.py b/databases/py-carbon/files/patch-setup.py
new file mode 100644
index 000000000000..2153d33e841e
--- /dev/null
+++ b/databases/py-carbon/files/patch-setup.py
@@ -0,0 +1,15 @@
+--- setup.py.orig 2011-04-03 22:20:13.000000000 -0400
++++ setup.py 2011-05-05 22:03:42.000000000 -0400
+@@ -12,9 +12,9 @@
+ setup_kwargs = dict()
+
+
+-storage_dirs = [ ('storage/whisper',[]), ('storage/lists',[]),
+- ('storage/log',[]), ('storage/rrd',[]) ]
+-conf_files = [ ('conf', glob('conf/*.example')) ]
++storage_dirs = [ ('/var/db/graphite/storage/whisper',[]), ('/var/db/graphite/storage/lists',[]),
++ ('/var/db/graphite/storage/log',[]), ('/var/db/graphite/storage/rrd',[]) ]
++conf_files = [ ('/usr/local/etc/carbon', glob('conf/*.example')) ]
+
+ setup(
+ name='carbon',
diff --git a/databases/py-carbon/files/pkg_message.in b/databases/py-carbon/files/pkg_message.in
new file mode 100644
index 000000000000..71daf8b5e9e8
--- /dev/null
+++ b/databases/py-carbon/files/pkg_message.in
@@ -0,0 +1,19 @@
+* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+This port now includes an rc script:
+
+%%PREFIX%%/etc/rc.d/carbon
+
+Add:
+
+carbon_enable="YES"
+
+to /etc/rc.conf, then start it via:
+
+%%PREFIX%%/etc/rc.d/carbon start
+
+Once started, finish setting up Graphite
+
+
+* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+