summaryrefslogtreecommitdiffstats
path: root/ftp/ftpsesame
diff options
context:
space:
mode:
authorsem <sem@FreeBSD.org>2006-05-01 08:05:56 +0000
committersem <sem@FreeBSD.org>2006-05-01 08:05:56 +0000
commitfd48e8a4be77f1030fea2d4e12d61a28947c7f6b (patch)
treea1e436780cf18c04c80a32cd1543350f61580964 /ftp/ftpsesame
parent3670d13db55397ed0fea0119448a409782fc67f3 (diff)
downloadFreeBSD-ports-fd48e8a4be77f1030fea2d4e12d61a28947c7f6b.zip
FreeBSD-ports-fd48e8a4be77f1030fea2d4e12d61a28947c7f6b.tar.gz
- Add a startup script
- Add MASTER_SITE_LOCAL as a second masete site - Fix IGNORE message to satisfy portlint
Diffstat (limited to 'ftp/ftpsesame')
-rw-r--r--ftp/ftpsesame/Makefile9
-rw-r--r--ftp/ftpsesame/files/ftpsesame.sh.in47
2 files changed, 53 insertions, 3 deletions
diff --git a/ftp/ftpsesame/Makefile b/ftp/ftpsesame/Makefile
index 39d5d21..8565132 100644
--- a/ftp/ftpsesame/Makefile
+++ b/ftp/ftpsesame/Makefile
@@ -8,20 +8,23 @@
PORTNAME= ftpsesame
PORTVERSION= 0.95
CATEGORIES= ftp
-MASTER_SITES= http://www.sentia.org/downloads/
+MASTER_SITES= http://www.sentia.org/downloads/ \
+ ${MASTER_SITE_LOCAL}
+MASTER_SITE_SUBDIR= sem
MAINTAINER= sem@FreeBSD.org
-COMMENT= Helper for the FTP protocol get through your pf firewall
+COMMENT= Helper for the FTP protocol to get through your pf firewall
MAN8= ftpsesame.8
PLIST_FILES= bin/ftpsesame
+USE_RC_SUBR= ftpsesame.sh
MAKE_ARGS= PREFIX=${PREFIX} MANPREFIX=${MANPREFIX}
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 502106
-IGNORE= There is no pf(4) in the base system
+IGNORE= there is no pf(4) in the base system
.endif
.include <bsd.port.post.mk>
diff --git a/ftp/ftpsesame/files/ftpsesame.sh.in b/ftp/ftpsesame/files/ftpsesame.sh.in
new file mode 100644
index 0000000..7ada9ae
--- /dev/null
+++ b/ftp/ftpsesame/files/ftpsesame.sh.in
@@ -0,0 +1,47 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: ftpsesame
+# REQUIRE: NETWORKING
+# KEYWORD: shutdown
+
+#
+# Add the following line to /etc/rc.conf to enable ftpsesame
+#
+# ftpsesame_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable.
+# ftpsesame_interface (str): Interface name where ftp sessions will listen.
+# (Usualy an external interface)
+# ftpsesame_flags (str): Additional options (See ftpsesame(8)).
+#
+
+. %%RC_SUBR%%
+
+name=ftpsesame
+rcvar=`set_rcvar`
+command=%%PREFIX%%/bin/${name}
+pidfile="/var/run/${name}.pid"
+
+start_postcmd=start_postcmd
+stop_postcmd=stop_postcmd
+
+start_postcmd()
+{
+ ps -axo pid,comm | awk '/ftpsesame/ {print $1}' > ${pidfile}
+}
+
+stop_postcmd()
+{
+ rm -f ${pidfile}
+}
+
+# set defaults
+ftpsesame_enable=${ftpsesame_enable:-"NO"}
+ftpsesame_interface=${ftpsesame_interface-""}
+ftpsesame_flags=${ftpsesame_flags-""}
+
+load_rc_config $name
+command_args=${ftpsesame_interface:+"-i ${ftpsesame_interface}"}
+run_rc_command "$1"
OpenPOWER on IntegriCloud