diff options
Diffstat (limited to 'net-mgmt/carbon-relay-ng/files')
-rw-r--r-- | net-mgmt/carbon-relay-ng/files/carbon-relay-ng.in | 43 | ||||
-rw-r--r-- | net-mgmt/carbon-relay-ng/files/patch-Makefile | 8 | ||||
-rw-r--r-- | net-mgmt/carbon-relay-ng/files/patch-examples_carbon-relay-ng.ini | 14 |
3 files changed, 65 insertions, 0 deletions
diff --git a/net-mgmt/carbon-relay-ng/files/carbon-relay-ng.in b/net-mgmt/carbon-relay-ng/files/carbon-relay-ng.in new file mode 100644 index 000000000000..ff203b8aaa3d --- /dev/null +++ b/net-mgmt/carbon-relay-ng/files/carbon-relay-ng.in @@ -0,0 +1,43 @@ +#!/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" diff --git a/net-mgmt/carbon-relay-ng/files/patch-Makefile b/net-mgmt/carbon-relay-ng/files/patch-Makefile new file mode 100644 index 000000000000..dd7c197eaa14 --- /dev/null +++ b/net-mgmt/carbon-relay-ng/files/patch-Makefile @@ -0,0 +1,8 @@ +--- Makefile.orig 2018-03-21 11:37:45 UTC ++++ Makefile +@@ -1,4 +1,4 @@ +-VERSION=$(shell git describe --tags --always | sed 's/^v//') ++VERSION?=$(shell git describe --tags --always | sed 's/^v//') + + + build: diff --git a/net-mgmt/carbon-relay-ng/files/patch-examples_carbon-relay-ng.ini b/net-mgmt/carbon-relay-ng/files/patch-examples_carbon-relay-ng.ini new file mode 100644 index 000000000000..5e9a636f3309 --- /dev/null +++ b/net-mgmt/carbon-relay-ng/files/patch-examples_carbon-relay-ng.ini @@ -0,0 +1,14 @@ +--- examples/carbon-relay-ng.ini.orig 2018-03-21 13:32:07 UTC ++++ examples/carbon-relay-ng.ini +@@ -10,9 +10,9 @@ max_procs = 2 + admin_addr = "0.0.0.0:2004" + http_addr = "0.0.0.0:8081" + #spool_dir = "/var/spool/carbon-relay-ng" +-spool_dir = "spool" ++spool_dir = "/var/run/carbon-relay-ng/spool" + #pid_file = "/var/run/carbon-relay-ng.pid" +-pid_file = "carbon-relay-ng.pid" ++#pid_file = "carbon-relay-ng.pid" + + ## Logging ## + # one of critical error warning notice info debug |