From a9c5b21221e70b635c4318289b0b3100658f97e4 Mon Sep 17 00:00:00 2001 From: Patrick Li Date: Sat, 9 Mar 2002 17:57:58 +0000 Subject: Add sample startup script PR: 35701 Submitted by: Kimura Fuyuki --- security/fwlogwatch/Makefile | 3 +++ security/fwlogwatch/files/fwlogwatch.sh.sample | 22 ++++++++++++++++++++++ security/fwlogwatch/pkg-plist | 1 + 3 files changed, 26 insertions(+) create mode 100644 security/fwlogwatch/files/fwlogwatch.sh.sample (limited to 'security/fwlogwatch') 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 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 -- cgit v1.2.3