e292cda968
carbon-relay-ng is a middleware that sit's between graphite capable metrics collectors and and carbon instances such as databases/go-carbon and databases/py-carbon. It can do sharding and replication to any carbon storage. WWW: https://github.com/graphite-ng/carbon-relay-ng PR: 226824 Submitted by: Andreas Andersson <a.andersson.thn@gmail.com>
43 lines
1.1 KiB
Bash
43 lines
1.1 KiB
Bash
#!/bin/sh
|
|
|
|
# $FreeBSD$
|
|
#
|
|
# PROVIDE: carbon_relay_ng
|
|
# REQUIRE: LOGIN
|
|
# KEYWORD: shutdown
|
|
|
|
# Add the following lines to /etc/rc.conf to enable carbon_relay_ng
|
|
# carbon_relay_ng_enable="YES"
|
|
#
|
|
# carbon_relay_ng_enable (bool): Set to YES to enable carbon_relay_ng
|
|
# Default: NO
|
|
# carbon_relay_ng_conf (str): carbon_relay_ng configration file
|
|
# Default: empty
|
|
# carbon_relay_ng_user (str): carbon_relay_ng daemon user
|
|
# Default: carbon
|
|
# carbon_relay_ng_group (str): carbon_relay_ng daemon group
|
|
# Default: carbon
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="carbon_relay_ng"
|
|
rcvar=carbon_relay_ng_enable
|
|
load_rc_config $name
|
|
|
|
: ${carbon_relay_ng_enable:="NO"}
|
|
: ${carbon_relay_ng_user:="carbon"}
|
|
: ${carbon_relay_ng_group:="carbon"}
|
|
: ${carbon_relay_ng_conf:=""}
|
|
|
|
pidfile="/var/run/carbon-relay-ng/${name}.pid"
|
|
procname="%%PREFIX%%/bin/carbon-relay-ng"
|
|
command=/usr/sbin/daemon
|
|
command_args="-f -c -p ${pidfile} ${procname} ${carbon_relay_ng_conf}"
|
|
start_precmd="carbon_relay_ng_precmd"
|
|
|
|
carbon_relay_ng_precmd()
|
|
{
|
|
install -o ${carbon_relay_ng_user} /dev/null ${pidfile}
|
|
}
|
|
|
|
run_rc_command "$1"
|