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

Collapse All | Expand All

(-)security/stunnel/Makefile (-1 / +6 lines)
Lines 35-40 GNU_CONFIGURE= yes Link Here
35
CONFIGURE_ARGS=	--localstatedir=/var/tmp --enable-static --disable-systemd \
35
CONFIGURE_ARGS=	--localstatedir=/var/tmp --enable-static --disable-systemd \
36
		--with-ssl="${OPENSSLBASE}"
36
		--with-ssl="${OPENSSLBASE}"
37
SHEBANG_FILES=	src/stunnel3.in
37
SHEBANG_FILES=	src/stunnel3.in
38
SUB_FILES=	pid.conf
39
SUB_LIST=	STUNNEL_PIDFILE=${STUNNEL_PIDFILE} \
40
		STUNNEL_USER=${STUNNEL_USER} \
41
		STUNNEL_GROUP=${STUNNEL_GROUP}
38
42
39
OPTIONS_DEFINE=			DOCS EXAMPLES FIPS IPV6 LIBWRAP
43
OPTIONS_DEFINE=			DOCS EXAMPLES FIPS IPV6 LIBWRAP
40
OPTIONS_SINGLE=			THREAD
44
OPTIONS_SINGLE=			THREAD
Lines 50-55 FORK_DESC= Use the fork(3) threading model Link Here
50
PTHREAD_DESC=			Use the pthread(3) threading model
54
PTHREAD_DESC=			Use the pthread(3) threading model
51
UCONTEXT_DESC=			Use the ucontext(3) threading model
55
UCONTEXT_DESC=			Use the ucontext(3) threading model
52
56
57
STUNNEL_PIDFILE=	/var/run/stunnel/stunnel.pid
53
STUNNEL_USER?=	stunnel
58
STUNNEL_USER?=	stunnel
54
STUNNEL_GROUP?=	stunnel
59
STUNNEL_GROUP?=	stunnel
55
60
Lines 109-115 post-build: Link Here
109
114
110
post-install:
115
post-install:
111
	${MKDIR} ${STAGEDIR}${ETCDIR}/conf.d/
116
	${MKDIR} ${STAGEDIR}${ETCDIR}/conf.d/
112
	${INSTALL_DATA} ${FILESDIR}/pid.conf ${STAGEDIR}${ETCDIR}/conf.d/00-pid.conf
117
	${INSTALL_DATA} ${WRKDIR}/pid.conf ${STAGEDIR}${ETCDIR}/conf.d/00-pid.conf
113
118
114
cert:
119
cert:
115
	@${ECHO} ""
120
	@${ECHO} ""
(-)security/stunnel/files/pid.conf (-1 lines)
Removed Link Here
1
pid = /var/run/stunnel.pid
(-)security/stunnel/files/pid.conf.in (+1 lines)
Added Link Here
1
pid = %%STUNNEL_PIDFILE%%
(-)security/stunnel/files/stunnel.in (-2 / +16 lines)
Lines 13-21 Link Here
13
#				Set it to the full path to the config file
13
#				Set it to the full path to the config file
14
#				that stunnel will use during the automated
14
#				that stunnel will use during the automated
15
#				start-up.
15
#				start-up.
16
# stunnel_pidfile (str):	Default "%%PREFIX%%/var/stunnel/stunnel.pid"
16
# stunnel_pidfile (str):	Default "%%STUNNEL_PIDFILE%%"
17
#				Set it to the value of 'pid' in
17
#				Set it to the value of 'pid' in
18
#				the stunnel.conf file.
18
#				the stunnel.conf file.
19
# stunnel_uid (str):		Default "%%STUNNEL_USER%%"
20
# stunnel_gid (str):		Default "%%STUNNEL_GROUP%%"
19
#
21
#
20
22
21
. /etc/rc.subr
23
. /etc/rc.subr
Lines 27-33 load_rc_config $name Link Here
27
29
28
: ${stunnel_enable="NO"}
30
: ${stunnel_enable="NO"}
29
: ${stunnel_config="%%ETCDIR%%/${name}.conf"}
31
: ${stunnel_config="%%ETCDIR%%/${name}.conf"}
30
: ${stunnel_pidfile="/var/run/${name}.pid"}
32
: ${stunnel_pidfile="%%STUNNEL_PIDFILE%%"}
33
: ${stunnel_uid="%%STUNNEL_USER%%"}
34
: ${stunnel_gid="%%STUNNEL_GROUP%%"}
31
35
32
command="%%PREFIX%%/bin/stunnel"
36
command="%%PREFIX%%/bin/stunnel"
33
command_args=${stunnel_config}
37
command_args=${stunnel_config}
Lines 35-38 pidfile=${stunnel_pidfile} Link Here
35
39
36
required_files="${stunnel_config}"
40
required_files="${stunnel_config}"
37
41
42
start_precmd=stunnel_start_precmd
43
44
stunnel_start_precmd () {
45
	local piddir
46
	piddir=`/usr/bin/dirname "${pidfile}"`
47
	if [ ! -d "${piddir}" ] ; then
48
		/usr/bin/install -d -o "${stunnel_uid}" -g "${stunnel_gid}" "${piddir}"
49
	fi
50
}
51
38
run_rc_command "$1"
52
run_rc_command "$1"

Return to bug 249151