View | Details | Raw Unified | Return to bug 226937
Collapse All | Expand All

(-)databases/go-carbon/Makefile (-1 / +1 lines)
Lines 3-9 Link Here
3
PORTNAME=		go-carbon
3
PORTNAME=		go-carbon
4
DISTVERSIONPREFIX=	v
4
DISTVERSIONPREFIX=	v
5
DISTVERSION=		0.12.0
5
DISTVERSION=		0.12.0
6
PORTREVISION=		1
6
PORTREVISION=		2
7
CATEGORIES=		databases
7
CATEGORIES=		databases
8
8
9
MAINTAINER=		a.andersson.thn@gmail.com
9
MAINTAINER=		a.andersson.thn@gmail.com
(-)databases/go-carbon/files/go-carbon.in (-14 / +18 lines)
Lines 21-55 Link Here
21
21
22
. /etc/rc.subr
22
. /etc/rc.subr
23
23
24
name="go-carbon"
24
name="go_carbon"
25
rcvar="go_carbon_enable"
25
rcvar="go_carbon_enable"
26
load_rc_config $name
26
27
27
: ${go_carbon_enable:="NO"}
28
: ${go_carbon_enable:="NO"}
28
: ${go_carbon_user:="carbon"}
29
: ${go_carbon_user:="carbon"}
29
: ${go_carbon_config:="/usr/local/etc/go-carbon/go-carbon.conf"}
30
: ${go_carbon_config:="/usr/local/etc/go-carbon/go-carbon.conf"}
30
31
31
start_cmd="go_carbon_start"
32
stop_cmd="go_carbon_stop"
33
status_cmd="go_carbon_status"
34
procname="/usr/local/bin/go-carbon"
35
pidfile="/var/run/$name.pid"
32
pidfile="/var/run/$name.pid"
33
procname="%%PREFIX%%/bin/go-carbon"
34
command=/usr/sbin/daemon
35
command_args="-f -c -p ${pidfile} ${procname} -config ${go_carbon_config}"
36
36
37
extra_commands="reload"
38
reload_command="go_carbon_reload"
39
start_precmd="go_carbon_precmd"
40
37
# read configuration and set defaults
41
# read configuration and set defaults
38
load_rc_config "$name"
42
load_rc_config "$name"
39
43
40
go_carbon_start()
44
go_carbon_precmd()
41
{
45
{
42
	${procname} -config ${go_carbon_config} -daemon -pidfile ${pidfile}
46
	install -o ${go_carbon_user} /dev/null ${pidfile}
43
}
47
}
44
48
45
go_carbon_stop()
49
carbonapi_reload()
46
{
50
{
47
	kill -TERM `cat /var/run/go-carbon.pid`
51
	if [ -n "$pid" ]; then
52
		kill -HUP $pid
53
		echo "go-carbon config reloaded."
54
	else
55
		echo "go-carbon not running."
56
	fi
48
}
57
}
49
58
50
go_carbon_status()
51
{
52
	echo "go-carbon is running as pid" `cat /var/run/go-carbon.pid`
53
}
54
55
run_rc_command "$1"
59
run_rc_command "$1"

Return to bug 226937