diff options
-rw-r--r-- | security/isakmpd/Makefile | 9 | ||||
-rw-r--r-- | security/isakmpd/files/isakmpd.sh | 23 |
2 files changed, 31 insertions, 1 deletions
diff --git a/security/isakmpd/Makefile b/security/isakmpd/Makefile index f61f41b5258..99d7faf5170 100644 --- a/security/isakmpd/Makefile +++ b/security/isakmpd/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.19 2002/04/03 12:31:56 martti Exp $ +# $NetBSD: Makefile,v 1.20 2002/04/04 09:42:27 martti Exp $ # DISTNAME= isakmpd-20020403 @@ -33,5 +33,12 @@ post-patch: < ${WRKSRC}/$${i}.orig > ${WRKSRC}/$${i}; \ done +pre-install: + @${SED} ${FILES_SUBST_SED} ${FILESDIR}/isakmpd.sh > ${WRKDIR}/isakmpd.sh + +post-install: + ${INSTALL_SCRIPT} ${WRKDIR}/isakmpd.sh ${PREFIX}/etc/rc.d/isakmpd + .include "../../security/openssl/buildlink.mk" +.include "../../mk/bsd.pkg.install.mk" .include "../../mk/bsd.pkg.mk" diff --git a/security/isakmpd/files/isakmpd.sh b/security/isakmpd/files/isakmpd.sh new file mode 100644 index 00000000000..e8f5c820f36 --- /dev/null +++ b/security/isakmpd/files/isakmpd.sh @@ -0,0 +1,23 @@ +#!/bin/sh +# +# $NetBSD: isakmpd.sh,v 1.1 2002/04/04 09:42:30 martti Exp $ +# + +case "$1" in + start) + if [ -r /etc/isakmpd/isakmpd.conf ]; then + echo 'Starting isakmpd' + @PREFIX@/sbin/isakmpd + fi + ;; + stop) + if [ -f /var/run/isakmpd.pid ]; then + echo 'Stopping isakmpd' + kill `cat /var/run/isakmpd.pid` + rm -f /var/run/isakmpd.pid + fi + ;; + *) + echo "$0 start | stop" + ;; +esac |