aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorpat <pat@FreeBSD.org>2002-03-10 01:57:58 +0800
committerpat <pat@FreeBSD.org>2002-03-10 01:57:58 +0800
commit009b5fd2e39664c3e8328e481a672d5955620e69 (patch)
treea63a9a7f24b034003dc0983c154b4b642a7807d8 /security
parent2eace67d151e5fa6b209d8642ce72afcd021da50 (diff)
downloadfreebsd-ports-graphics-009b5fd2e39664c3e8328e481a672d5955620e69.tar.gz
freebsd-ports-graphics-009b5fd2e39664c3e8328e481a672d5955620e69.tar.zst
freebsd-ports-graphics-009b5fd2e39664c3e8328e481a672d5955620e69.zip
Add sample startup script
PR: 35701 Submitted by: Kimura Fuyuki <fuyuki@mj.0038.net>
Diffstat (limited to 'security')
-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 d6bb4dee9d9..160aec4a63d 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 00000000000..b360fe59b71
--- /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 ad03dee451b..29c9ff47c9c 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