aboutsummaryrefslogtreecommitdiff
path: root/security/stunnel
diff options
context:
space:
mode:
authorPeter Pentchev <roam@FreeBSD.org>2004-12-30 15:37:50 +0000
committerPeter Pentchev <roam@FreeBSD.org>2004-12-30 15:37:50 +0000
commit13afd20c89952627e820506d67cafee54c3757ea (patch)
tree78446737b7b76b1cb0fe319180f071659222dbd1 /security/stunnel
parentb43cfbc3c7f32f807876f71e53336fa7dd67ed14 (diff)
downloadports-13afd20c89952627e820506d67cafee54c3757ea.tar.gz
ports-13afd20c89952627e820506d67cafee54c3757ea.zip
Notes
Diffstat (limited to 'security/stunnel')
-rw-r--r--security/stunnel/Makefile16
-rw-r--r--security/stunnel/files/stunnel.in50
-rw-r--r--security/stunnel/files/stunnel.sh50
-rw-r--r--security/stunnel/pkg-plist2
4 files changed, 79 insertions, 39 deletions
diff --git a/security/stunnel/Makefile b/security/stunnel/Makefile
index 26c91fff863f..bf61841b913c 100644
--- a/security/stunnel/Makefile
+++ b/security/stunnel/Makefile
@@ -7,7 +7,7 @@
PORTNAME= stunnel
PORTVERSION= 4.06
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= security
MASTER_SITES= http://www.stunnel.org/download/stunnel/src/ \
ftp://stunnel.mirt.net/stunnel/OBSOLETE/ \
@@ -19,6 +19,7 @@ COMMENT= SSL encryption wrapper for standard network daemons
USE_OPENSSL= YES
USE_REINPLACE= YES
USE_LIBTOOL_VER= 15
+USE_RC_SUBR= YES
GNU_CONFIGURE= yes
CONFIGURE_TARGET= --target=${MACHINE_ARCH}-portbld-freebsd${OSREL}
@@ -50,9 +51,9 @@ post-patch:
.endif
post-install:
- @${SED} "s+!!PREFIX!!+${PREFIX}+g" < ${FILESDIR}/stunnel.sh \
- > ${PREFIX}/etc/rc.d/stunnel.sh.sample
- @${CHMOD} 755 ${PREFIX}/etc/rc.d/stunnel.sh.sample
+ ${SED} "s+!!PREFIX!!+${PREFIX}+g; s+!!RC_SUBR!!+${RC_SUBR}+g" \
+ < ${FILESDIR}/stunnel.sh > ${WRKDIR}/stunnel.sh
+ ${INSTALL_SCRIPT} ${WRKDIR}/stunnel.sh ${PREFIX}/etc/rc.d/
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} \
${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${ECHO} ""
@@ -62,6 +63,13 @@ post-install:
@${ECHO} "And don't forget to check out the FAQ at http://www.stunnel.org/"
@${ECHO} "**************************************************************************"
@${ECHO} ""
+ @${ECHO} "*********************** WARNING! WARNING! WARNING! ***********************"
+ @${ECHO} "The stunnel startup script has been converted to rc_subr"
+ @${ECHO} "format now. You have to set at least the stunnel_enable"
+ @${ECHO} "variable, and maybe also stunnel_config and stunnel_pidfile,"
+ @${ECHO} "if you want stunnel to be started automatically at boot time!"
+ @${ECHO} "**************************************************************************"
+ @${ECHO} ""
cert:
@${ECHO} ""
diff --git a/security/stunnel/files/stunnel.in b/security/stunnel/files/stunnel.in
index 8edeb0c175dc..23059f7e72a4 100644
--- a/security/stunnel/files/stunnel.in
+++ b/security/stunnel/files/stunnel.in
@@ -1,25 +1,41 @@
#!/bin/sh
#
-# A sample stunnel startup script written by martti.kuparinen@ericsson.com
-#
# $FreeBSD$
#
-# Where is the program
-STUNNEL="!!PREFIX!!/sbin/stunnel"
+# PROVIDE: stunnel
+# REQUIRE: NETWORKING SERVERS
+# BEFORE: DAEMON
+# KEYWORD: shutdown
+
+#
+# Add the following line to /etc/rc.conf to enable mysql:
+# stunnel_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable stunnel.
+# stunnel_config (str): Default "!!PREFIX!!/etc/stunnel/stunnel.conf"
+# Set it to the full path to the config file
+# that stunnel will use during the automated
+# start-up.
+# stunnel_pidfile (str): Default "!!PREFIX!!/var/stunnel/stunnel.pid"
+# Set it to the value of 'pidfile' in
+# the stunnel.conf file.
+#
+
+. !!RC_SUBR!!
+
+name="stunnel"
+rcvar=`set_rcvar`
+stunnel_config="!!PREFIX!!/etc/stunnel/${name}.conf"
+stunnel_pidfile="!!PREFIX!!/var/stunnel/${name}.pid"
+command="!!PREFIX!!/sbin/stunnel"
+
+[ -z "$stunnel_enable" ] && stunnel_enable="NO"
+
+load_rc_config $name
-case "$1" in
- start)
- ${STUNNEL} !!PREFIX!!/etc/stunnel/stunnel.conf
- ;;
+command_args=${stunnel_config}
+pidfile=${stunnel_pidfile}
- stop)
- killall `basename ${STUNNEL}`
- ;;
+required_files="${stunnel_config}"
- *)
- echo ""
- echo "Usage: `basename $0` { start | stop }"
- echo ""
- ;;
-esac
+run_rc_command "$1"
diff --git a/security/stunnel/files/stunnel.sh b/security/stunnel/files/stunnel.sh
index 8edeb0c175dc..23059f7e72a4 100644
--- a/security/stunnel/files/stunnel.sh
+++ b/security/stunnel/files/stunnel.sh
@@ -1,25 +1,41 @@
#!/bin/sh
#
-# A sample stunnel startup script written by martti.kuparinen@ericsson.com
-#
# $FreeBSD$
#
-# Where is the program
-STUNNEL="!!PREFIX!!/sbin/stunnel"
+# PROVIDE: stunnel
+# REQUIRE: NETWORKING SERVERS
+# BEFORE: DAEMON
+# KEYWORD: shutdown
+
+#
+# Add the following line to /etc/rc.conf to enable mysql:
+# stunnel_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable stunnel.
+# stunnel_config (str): Default "!!PREFIX!!/etc/stunnel/stunnel.conf"
+# Set it to the full path to the config file
+# that stunnel will use during the automated
+# start-up.
+# stunnel_pidfile (str): Default "!!PREFIX!!/var/stunnel/stunnel.pid"
+# Set it to the value of 'pidfile' in
+# the stunnel.conf file.
+#
+
+. !!RC_SUBR!!
+
+name="stunnel"
+rcvar=`set_rcvar`
+stunnel_config="!!PREFIX!!/etc/stunnel/${name}.conf"
+stunnel_pidfile="!!PREFIX!!/var/stunnel/${name}.pid"
+command="!!PREFIX!!/sbin/stunnel"
+
+[ -z "$stunnel_enable" ] && stunnel_enable="NO"
+
+load_rc_config $name
-case "$1" in
- start)
- ${STUNNEL} !!PREFIX!!/etc/stunnel/stunnel.conf
- ;;
+command_args=${stunnel_config}
+pidfile=${stunnel_pidfile}
- stop)
- killall `basename ${STUNNEL}`
- ;;
+required_files="${stunnel_config}"
- *)
- echo ""
- echo "Usage: `basename $0` { start | stop }"
- echo ""
- ;;
-esac
+run_rc_command "$1"
diff --git a/security/stunnel/pkg-plist b/security/stunnel/pkg-plist
index dc1e0639b529..5bcefb9da850 100644
--- a/security/stunnel/pkg-plist
+++ b/security/stunnel/pkg-plist
@@ -1,4 +1,4 @@
-etc/rc.d/stunnel.sh.sample
+etc/rc.d/stunnel.sh
etc/stunnel/stunnel.conf-sample
lib/libstunnel.so
lib/libstunnel.a