summaryrefslogtreecommitdiff
path: root/databases/py-carbon/files
diff options
context:
space:
mode:
authorriz <riz>2015-12-11 21:40:50 +0000
committerriz <riz>2015-12-11 21:40:50 +0000
commit894720eb694cb756ee0e7e2e2d87fe17943ee099 (patch)
tree2dba19198ac25ade9968a00cd3ea06da79fa082b /databases/py-carbon/files
parentab07a65d23144d151ea24a0322ddfed03941ffd6 (diff)
downloadpkgsrc-894720eb694cb756ee0e7e2e2d87fe17943ee099.tar.gz
Add py-carbon 0.9.15, from pkgsrc-wip.
Carbon is a backend data caching and persistence daemon for Graphite. See https://github.com/graphite-project/ for more information.
Diffstat (limited to 'databases/py-carbon/files')
-rw-r--r--databases/py-carbon/files/carbon-aggregator.sh73
-rw-r--r--databases/py-carbon/files/carbon-cache.sh73
-rw-r--r--databases/py-carbon/files/carbon-relay.sh73
3 files changed, 219 insertions, 0 deletions
diff --git a/databases/py-carbon/files/carbon-aggregator.sh b/databases/py-carbon/files/carbon-aggregator.sh
new file mode 100644
index 00000000000..386c90e6069
--- /dev/null
+++ b/databases/py-carbon/files/carbon-aggregator.sh
@@ -0,0 +1,73 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: carbon-aggregator.sh,v 1.1 2015/12/11 21:40:50 riz Exp $
+#
+# PROVIDE: carbon-aggregator
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+
+if [ -f /etc/rc.subr ]; then
+ . /etc/rc.subr
+fi
+
+name="carbon_aggregator"
+rcvar=$name
+command="@PREFIX@/bin/carbon-aggregator.py"
+config="--config=@PKG_SYSCONFDIR@/carbon.conf"
+graphite_user="@GRAPHITE_USER@"
+graphite_group="@GRAPHITE_GROUP@"
+graphite_dir="@GRAPHITE_DIR@"
+extra_commands="status"
+start_cmd="${name}_start"
+stop_cmd="${name}_stop"
+status_cmd="${name}_status"
+start_precmd='setproclimits'
+
+setproclimits()
+{
+ local climit
+ climit=$(ulimit -n)
+ if [ "$climit" -lt 4096 ]; then
+ ulimit -n 4096
+ fi
+}
+
+carbon_aggregator_start()
+{
+ @SU@ -m ${graphite_user} -c "${command} ${config} start"
+}
+
+carbon_aggregator_stop()
+{
+ @SU@ -m ${graphite_user} -c "${command} ${config} stop"
+}
+
+carbon_aggregator_status()
+{
+ @SU@ -m ${graphite_user} -c "${command} ${config} status"
+}
+
+
+if [ -f /etc/rc.subr -a -f /etc/rc.conf ]; then
+ load_rc_config $name
+ run_rc_command "$1"
+else
+ if [ -f /etc/rc.conf ]; then
+ . /etc/rc.conf
+ fi
+ case $1 in
+ start)
+ ${start_cmd}
+ ;;
+ stop)
+ ${stop_cmd}
+ ;;
+ restart)
+ ${stop_cmd} && ${start_cmd}
+ ;;
+ *)
+ @ECHO@ "Usage: $0 {start|stop|restart}" 1>&2
+ exit 64
+ ;;
+ esac
+fi
diff --git a/databases/py-carbon/files/carbon-cache.sh b/databases/py-carbon/files/carbon-cache.sh
new file mode 100644
index 00000000000..5d90ab4a381
--- /dev/null
+++ b/databases/py-carbon/files/carbon-cache.sh
@@ -0,0 +1,73 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: carbon-cache.sh,v 1.1 2015/12/11 21:40:50 riz Exp $
+#
+# PROVIDE: carbon-cache
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+
+if [ -f /etc/rc.subr ]; then
+ . /etc/rc.subr
+fi
+
+name="carbon_cache"
+rcvar=$name
+command="@PREFIX@/bin/carbon-cache.py"
+config="--config=@PKG_SYSCONFDIR@/carbon.conf"
+graphite_user="@GRAPHITE_USER@"
+graphite_group="@GRAPHITE_GROUP@"
+graphite_dir="@GRAPHITE_DIR@"
+extra_commands="status"
+start_cmd="${name}_start"
+stop_cmd="${name}_stop"
+status_cmd="${name}_status"
+start_precmd='setproclimits'
+
+setproclimits()
+{
+ local climit
+ climit=$(ulimit -n)
+ if [ "$climit" -lt 4096 ]; then
+ ulimit -n 4096
+ fi
+}
+
+carbon_cache_start()
+{
+ @SU@ -m ${graphite_user} -c "${command} ${config} start"
+}
+
+carbon_cache_stop()
+{
+ @SU@ -m ${graphite_user} -c "${command} ${config} stop"
+}
+
+carbon_cache_status()
+{
+ @SU@ -m ${graphite_user} -c "${command} ${config} status"
+}
+
+
+if [ -f /etc/rc.subr -a -f /etc/rc.conf ]; then
+ load_rc_config $name
+ run_rc_command "$1"
+else
+ if [ -f /etc/rc.conf ]; then
+ . /etc/rc.conf
+ fi
+ case $1 in
+ start)
+ ${start_cmd}
+ ;;
+ stop)
+ ${stop_cmd}
+ ;;
+ restart)
+ ${stop_cmd} && ${start_cmd}
+ ;;
+ *)
+ @ECHO@ "Usage: $0 {start|stop|restart}" 1>&2
+ exit 64
+ ;;
+ esac
+fi
diff --git a/databases/py-carbon/files/carbon-relay.sh b/databases/py-carbon/files/carbon-relay.sh
new file mode 100644
index 00000000000..8b62b468ce9
--- /dev/null
+++ b/databases/py-carbon/files/carbon-relay.sh
@@ -0,0 +1,73 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: carbon-relay.sh,v 1.1 2015/12/11 21:40:50 riz Exp $
+#
+# PROVIDE: carbon-relay
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+
+if [ -f /etc/rc.subr ]; then
+ . /etc/rc.subr
+fi
+
+name="carbon_relay"
+rcvar=$name
+command="@PREFIX@/bin/carbon-relay.py"
+config="--config=@PKG_SYSCONFDIR@/carbon.conf"
+graphite_user="@GRAPHITE_USER@"
+graphite_group="@GRAPHITE_GROUP@"
+graphite_dir="@GRAPHITE_DIR@"
+extra_commands="status"
+start_cmd="${name}_start"
+stop_cmd="${name}_stop"
+status_cmd="${name}_status"
+start_precmd='setproclimits'
+
+setproclimits()
+{
+ local climit
+ climit=$(ulimit -n)
+ if [ "$climit" -lt 4096 ]; then
+ ulimit -n 4096
+ fi
+}
+
+carbon_relay_start()
+{
+ @SU@ -m ${graphite_user} -c "${command} ${config} start"
+}
+
+carbon_relay_stop()
+{
+ @SU@ -m ${graphite_user} -c "${command} ${config} stop"
+}
+
+carbon_relay_status()
+{
+ @SU@ -m ${graphite_user} -c "${command} ${config} status"
+}
+
+
+if [ -f /etc/rc.subr -a -f /etc/rc.conf ]; then
+ load_rc_config $name
+ run_rc_command "$1"
+else
+ if [ -f /etc/rc.conf ]; then
+ . /etc/rc.conf
+ fi
+ case $1 in
+ start)
+ ${start_cmd}
+ ;;
+ stop)
+ ${stop_cmd}
+ ;;
+ restart)
+ ${stop_cmd} && ${start_cmd}
+ ;;
+ *)
+ @ECHO@ "Usage: $0 {start|stop|restart}" 1>&2
+ exit 64
+ ;;
+ esac
+fi