aboutsummaryrefslogtreecommitdiff
path: root/security/fwlogwatch
diff options
context:
space:
mode:
authorPatrick Li <pat@FreeBSD.org>2002-03-09 17:57:58 +0000
committerPatrick Li <pat@FreeBSD.org>2002-03-09 17:57:58 +0000
commita9c5b21221e70b635c4318289b0b3100658f97e4 (patch)
tree9d31e8703c1fff2818a7f4ac56936ed888be8133 /security/fwlogwatch
parent382d3f7a250f97c8343012adaa5958df1f5e8bef (diff)
downloadports-a9c5b21221e70b635c4318289b0b3100658f97e4.tar.gz
ports-a9c5b21221e70b635c4318289b0b3100658f97e4.zip
Add sample startup script
PR: 35701 Submitted by: Kimura Fuyuki <fuyuki@mj.0038.net>
Notes
Notes: svn path=/head/; revision=55770
Diffstat (limited to 'security/fwlogwatch')
-rw-r--r--security/fwlogwatch/Makefile3
-rw-r--r--security/fwlogwatch/files/fwlogwatch.sh.sample22
-rw-r--r--security/fwlogwatch/pkg-plist1
3 files changed, 26 insertions, 0 deletions
diff --git a/security/fwlogwatch/Makefile b/security/fwlogwatch/Makefile
index d6bb4dee9d94..160aec4a63d3 100644
--- a/security/fwlogwatch/Makefile
+++ b/security/fwlogwatch/Makefile
@@ -29,4 +29,7 @@ post-patch:
s,/usr/local,${PREFIX},g" ${WRKSRC}/main.h
@${PERL} -pi -e "s,/etc,${PREFIX}/etc,g" ${WRKSRC}/${MAN8}
+post-install:
+ @${INSTALL_SCRIPT} ${FILESDIR}/fwlogwatch.sh.sample ${PREFIX}/etc/rc.d
+
.include <bsd.port.mk>
diff --git a/security/fwlogwatch/files/fwlogwatch.sh.sample b/security/fwlogwatch/files/fwlogwatch.sh.sample
new file mode 100644
index 000000000000..b360fe59b717
--- /dev/null
+++ b/security/fwlogwatch/files/fwlogwatch.sh.sample
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
+ echo "$0: Cannot determine the PREFIX" >&2
+ exit 1
+fi
+
+case "$1" in
+start)
+ if [ -x ${PREFIX}/sbin/fwlogwatch ]; then
+ ${PREFIX}/sbin/fwlogwatch -R && echo -n ' fwlogwatch'
+ fi
+ ;;
+stop)
+ killall fwlogwatch && echo -n ' fwlogwatch'
+ ;;
+*)
+ echo "Usage: `basename $0` {start|stop}" >&2
+ ;;
+esac
+
+exit 0
diff --git a/security/fwlogwatch/pkg-plist b/security/fwlogwatch/pkg-plist
index ad03dee451b1..29c9ff47c9c4 100644
--- a/security/fwlogwatch/pkg-plist
+++ b/security/fwlogwatch/pkg-plist
@@ -1,5 +1,6 @@
etc/fwlogwatch.config
etc/fwlogwatch.template
+etc/rc.d/fwlogwatch.sh.sample
sbin/fwlogwatch
sbin/fwlw_notify
sbin/fwlw_respond