summaryrefslogtreecommitdiff
path: root/dev-python/carbon/files/carbon.initd2
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-05-17 00:01:35 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-05-17 00:01:35 +0100
commit6c9dc10e04cd513437e046ccca0e51a3d6d4dc7c (patch)
treeb7183e321a607f857cc5c62cfbd5bae7cbfb3982 /dev-python/carbon/files/carbon.initd2
parent66113e7871aede225d661473925cea4cce9e6d23 (diff)
gentoo auto-resync : 17:05:2024 - 00:01:35
Diffstat (limited to 'dev-python/carbon/files/carbon.initd2')
-rw-r--r--dev-python/carbon/files/carbon.initd253
1 files changed, 0 insertions, 53 deletions
diff --git a/dev-python/carbon/files/carbon.initd2 b/dev-python/carbon/files/carbon.initd2
deleted file mode 100644
index ff1509747ef1..000000000000
--- a/dev-python/carbon/files/carbon.initd2
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-export GRAPHITE_CONF_DIR=/etc/carbon
-export GRAPHITE_STORAGE_DIR=/var/lib/carbon
-
-INSTANCE=${SVCNAME#*.}
-if [ "${INSTANCE}" = "${SVCNAME}" ]; then
- INSTANCE="a"
-fi
-
-PIDFILE="/var/run/${SVCNAME}.pid"
-PROGRAMNAME=${SVCNAME%%.*}
-
-CARBON_CONFIG=${CARBON_CONFIG:-/etc/carbon/carbon.conf}
-
-depend() {
- use net
-}
-
-
-start_pre() {
- if [ ! -f ${CARBON_CONFIG} ] ; then
- eend "Missing ${CARBON_CONFIG}"
- fi
- case "${PROGRAMNAME}" in
- "carbon-relay" )
- if `grep -q "^RELAY_METHOD = rules$" ${CARBON_CONFIG}`; then
- [ -f /etc/carbon/relay-rules.conf ] || eend "Missing relay-rules.conf"
- fi
- ;;
- "carbon-aggregator" )
- [ -f /etc/carbon/aggregation-rules.conf ] || eend "Missing missing aggregation-rules.conf"
- ;;
- esac
-}
-
-start() {
- ebegin "Starting ${PROGRAMNAME} instance ${INSTANCE}"
- start-stop-daemon --start --exec /usr/bin/${PROGRAMNAME}.py \
- --pidfile ${PIDFILE} \
- -- --pidfile ${PIDFILE} --instance ${INSTANCE} \
- --logdir /var/log/carbon/ --config ${CARBON_CONFIG} start >/dev/null
- eend $? "Failed to start ${SVCNAME}"
-}
-
-stop() {
- ebegin "Stopping ${PROGRAMNAME} instance ${INSTANCE}"
- start-stop-daemon --stop \
- --pidfile ${PIDFILE}
- eend $? "Failed to stop ${SVCNAME}"
-}