aboutsummaryrefslogtreecommitdiff
path: root/net/portfwd
diff options
context:
space:
mode:
authorRyan Steinmetz <zi@FreeBSD.org>2016-03-23 00:29:52 +0000
committerRyan Steinmetz <zi@FreeBSD.org>2016-03-23 00:29:52 +0000
commit2efb8456d72ac84173116ff486d9a0bbba9c2f70 (patch)
tree6e972300cdf657123923790a69eef1dbc580a78e /net/portfwd
parent0461dcb5ae41eb6f6e6638b58490d5cde28cbe70 (diff)
downloadports-2efb8456d72ac84173116ff486d9a0bbba9c2f70.tar.gz
ports-2efb8456d72ac84173116ff486d9a0bbba9c2f70.zip
Notes
Diffstat (limited to 'net/portfwd')
-rw-r--r--net/portfwd/Makefile5
-rw-r--r--net/portfwd/files/portfwd.in28
2 files changed, 32 insertions, 1 deletions
diff --git a/net/portfwd/Makefile b/net/portfwd/Makefile
index 65f3603419f7..38c2214b5136 100644
--- a/net/portfwd/Makefile
+++ b/net/portfwd/Makefile
@@ -3,6 +3,7 @@
PORTNAME= portfwd
PORTVERSION= 0.29
+PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= SF
@@ -15,6 +16,7 @@ OPTIONS_DEFINE= DOCS EXAMPLES
GNU_CONFIGURE= yes
USES= gmake
+USE_RC_SUBR= ${PORTNAME}
post-patch:
@${REINPLACE_CMD} -e "s|-Wall -ggdb -O3|${CFLAGS}|g" \
@@ -25,6 +27,7 @@ post-patch:
post-install:
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
- @${INSTALL_DATA} ${WRKSRC}/cfg/*.cfg ${STAGEDIR}${EXAMPLESDIR}
+ ${INSTALL_DATA} ${WRKSRC}/cfg/*.cfg ${STAGEDIR}${EXAMPLESDIR}
+ ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${STAGEDIR}${PREFIX}/etc/rc.d
.include <bsd.port.mk>
diff --git a/net/portfwd/files/portfwd.in b/net/portfwd/files/portfwd.in
new file mode 100644
index 000000000000..a5de411f1ce1
--- /dev/null
+++ b/net/portfwd/files/portfwd.in
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: portfwd
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add the following line to /etc/rc.conf to enable the portfwd daemon:
+#
+# portfwd_enable="YES"
+#
+
+. /etc/rc.subr
+
+name=portfwd
+rcvar=portfwd_enable
+
+load_rc_config ${name}
+
+: ${portfwd_enable:="NO"}
+: ${portfwd_config:="%%PREFIX%%/etc/portfwd.conf"}
+
+required_files="${portfwd_config}"
+command="/usr/sbin/daemon"
+command_args="-f -r %%PREFIX%%/sbin/portfwd -g -c ${portfwd_config}"
+
+run_rc_command "$1"