summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormartti <martti@pkgsrc.org>2002-04-04 09:42:27 +0000
committermartti <martti@pkgsrc.org>2002-04-04 09:42:27 +0000
commitbfdb1ddf87240e6024cff96b911f0a85729f0a01 (patch)
treeefc371b5281b8cc9f6f156c01c390e38e172c86e
parent9b48289c2ce9ef84f4ad84dc1cdd772b3975dcf3 (diff)
downloadpkgsrc-bfdb1ddf87240e6024cff96b911f0a85729f0a01.tar.gz
Install a simle startup script (${PREFIX}/etc/rc.d/isakmpd)
-rw-r--r--security/isakmpd/Makefile9
-rw-r--r--security/isakmpd/files/isakmpd.sh23
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