View | Details | Raw Unified | Return to bug 239874 | Differences between
and this patch

Collapse All | Expand All

(-)sysutils/consul/Makefile (-3 / +21 lines)
Lines 1-7 Link Here
1
# $FreeBSD$
1
# $FreeBSD$
2
2
3
PORTNAME=	consul
3
PORTNAME=	consul
4
PORTVERSION=	1.5.1
4
PORTVERSION=	1.5.3
5
DISTVERSIONPREFIX=	v
5
DISTVERSIONPREFIX=	v
6
CATEGORIES=	sysutils
6
CATEGORIES=	sysutils
7
7
Lines 26-37 Link Here
26
26
27
PLIST_FILES=	bin/consul
27
PLIST_FILES=	bin/consul
28
28
29
USERS=		consul
29
ETCDIR=		${PREFIX}/etc/${PORTNAME}.d
30
GROUPS=		consul
30
CONSUL_USER?=	consul
31
CONSUL_GROUP?=	consul
32
CONSUL_DATADIR?=/var/db/${PORTNAME}
31
33
34
USERS=		${CONSUL_USER}
35
GROUPS=		${CONSUL_GROUP}
36
37
SUB_LIST=	ETCDIR=${ETCDIR} \
38
		CONSUL_USER=${CONSUL_USER} \
39
		CONSUL_GROUP=${CONSUL_GROUP} \
40
		CONSUL_DATADIR=${CONSUL_DATADIR}
41
32
post-extract:
42
post-extract:
33
	${MKDIR} ${WRKSRC}/vendor/github.com/${GH_ACCOUNT}/${PORTNAME}
43
	${MKDIR} ${WRKSRC}/vendor/github.com/${GH_ACCOUNT}/${PORTNAME}
34
	${LN} -s ${WRKSRC}/api ${WRKSRC}/vendor/github.com/${GH_ACCOUNT}/${PORTNAME}/api
44
	${LN} -s ${WRKSRC}/api ${WRKSRC}/vendor/github.com/${GH_ACCOUNT}/${PORTNAME}/api
35
	${LN} -s ${WRKSRC}/sdk ${WRKSRC}/vendor/github.com/${GH_ACCOUNT}/${PORTNAME}/sdk
45
	${LN} -s ${WRKSRC}/sdk ${WRKSRC}/vendor/github.com/${GH_ACCOUNT}/${PORTNAME}/sdk
36
46
47
pre-install:
48
	${MKDIR} ${STAGEDIR}${ETCDIR}
49
	${MKDIR} ${STAGEDIR}${CONSUL_DATADIR}
50
51
post-install:
52
	@${ECHO_CMD} "@dir(${CONSUL_USER},${CONSUL_GROUP},750) ${ETCDIR}" >> ${TMPPLIST}
53
	@${ECHO_CMD} "@dir(${CONSUL_USER},${CONSUL_GROUP},750) ${CONSUL_DATADIR}" >> ${TMPPLIST}
54
37
.include <bsd.port.mk>
55
.include <bsd.port.mk>
(-)sysutils/consul/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1558709843
1
TIMESTAMP = 1565859009
2
SHA256 (hashicorp-consul-v1.5.1_GH0.tar.gz) = b8376369b16987e87d3fcda20eb9463144737dbc7dfddd13cba6db9f8f427fd9
2
SHA256 (hashicorp-consul-v1.5.3_GH0.tar.gz) = f36f1e516346864a7a61b0917df0e82ef9a83eb792885f9f032cca99a594bc82
3
SIZE (hashicorp-consul-v1.5.1_GH0.tar.gz) = 21123963
3
SIZE (hashicorp-consul-v1.5.3_GH0.tar.gz) = 21743194
(-)sysutils/consul/files/consul.in (-26 / +36 lines)
Lines 6-52 Link Here
6
# REQUIRE: LOGIN
6
# REQUIRE: LOGIN
7
# KEYWORD: shutdown
7
# KEYWORD: shutdown
8
#
8
#
9
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
9
# Add consul_enable="YES" to /etc/rc.conf to enable Consul
10
# to enable this service:
11
#
10
#
12
# consul_enable (bool):	Set to NO by default.
11
# Additional variables you can define are:
13
#				Set it to YES to enable consul.
12
#
14
# consul_user (user):        Set user to run consul.
13
# consul_debug:		Set it to YES to enable Consul debugging to syslog
15
#                               Default is "consul".
14
#			Default: NO
16
# consul_group (group):      Set group to run consul.
15
# consul_user:		Username to run Consul
17
#                               Default is "consul".
16
#			Default: %%CONSUL_USER%%
18
# consul_dir (dir):          Set dir to run consul in.
17
# consul_datadir:	Directory for the agent to store state
19
#                               Default is "/var/db/consul".
18
#			Default: %%CONSUL_DATADIR%%
19
# consul_pidfile:	Full path of the Consul PID file
20
#			Default: /var/run/consul.pid
21
# consul_env:		Set environment variables used with Consul
22
#			Default: 
23
# consul_args:		Additional command-line options
24
#			Default: 
20
25
21
. /etc/rc.subr
26
. /etc/rc.subr
22
27
23
name=consul
28
name=consul
24
rcvar=consul_enable
29
rcvar=consul_enable
30
31
restart_precmd="consul_checkconfig"
32
reload_precmd="consul_checkconfig"
33
configtest_cmd="consul_checkconfig"
25
extra_commands="reload configtest"
34
extra_commands="reload configtest"
26
35
27
load_rc_config $name
36
load_rc_config $name
28
37
29
: ${consul_enable:="NO"}
38
: ${consul_enable:=NO}
30
: ${consul_user:="consul"}
39
: ${consul_user:=%%CONSUL_USER%%}
31
: ${consul_group:="consul"}
40
: ${consul_datadir:=%%CONSUL_DATADIR%%}
32
: ${consul_dir:="/var/db/consul"}
41
: ${consul_pidfile:=/var/run/consul.pid}
33
42
34
pidfile=/var/run/consul.pid
43
if checkyesno consul_debug; then
44
	consul_syslog_flags="-T ${name}"
45
fi
46
47
pidfile=${consul_pidfile}
48
required_dirs="%%ETCDIR%% ${consul_datadir}"
49
35
procname="%%PREFIX%%/bin/consul"
50
procname="%%PREFIX%%/bin/consul"
36
command="/usr/sbin/daemon"
51
command="/usr/sbin/daemon"
37
command_args="-f -p ${pidfile} /usr/bin/env ${consul_env} ${procname} agent -data-dir=${consul_dir} -config-dir=%%PREFIX%%/etc/consul.d ${consul_args}"
52
command_consul="/usr/bin/env ${consul_env} ${procname} agent -data-dir=${consul_datadir} -config-dir=%%ETCDIR%% ${consul_args}"
53
command_args="-f ${consul_syslog_flags} -p ${pidfile} -u ${consul_user} -t ${name} ${command_consul}"
54
unset consul_user
38
55
39
start_precmd=consul_startprecmd
56
consul_checkconfig()
40
41
consul_startprecmd()
42
{
57
{
43
        if [ ! -e ${pidfile} ]; then
58
	echo "Performing sanity check on ${name} configuration:"
44
                install -o ${consul_user} -g ${consul_group} /dev/null ${pidfile};
59
	eval ${procname} validate %%ETCDIR%%
45
        fi
46
47
        if [ ! -d ${consul_dir} ]; then
48
                install -d -o ${consul_user} -g ${consul_group} ${consul_dir}
49
        fi
50
}
60
}
51
61
52
run_rc_command "$1"
62
run_rc_command "$1"

Return to bug 239874