diff options
author | Andreas Klemm <andreas@FreeBSD.org> | 2001-03-25 13:23:36 +0000 |
---|---|---|
committer | Andreas Klemm <andreas@FreeBSD.org> | 2001-03-25 13:23:36 +0000 |
commit | 5586d3519b183b278f2e1603716563771b2c3e43 (patch) | |
tree | 9460f19647e43f4e430a0854f563538293635ae3 /net/flowscan | |
parent | add grc (diff) |
- additional important port changes
- modify sample startup script
- run in background properly
- use variables for progs (grep, perl, kill, ...)
- style (use $var consistently, spaces after io redirection)
- install startup script as cflowd-flowscan.sh.sample
to get an order, cflowd ports startup script will be named
cflowd-base.sh.sample, so that cflowd will be started first.
Notes
Notes:
svn path=/head/; revision=40346
Diffstat (limited to 'net/flowscan')
-rw-r--r-- | net/flowscan/Makefile | 4 | ||||
-rw-r--r-- | net/flowscan/files/flowscan.sh | 29 | ||||
-rw-r--r-- | net/flowscan/pkg-plist | 2 |
3 files changed, 24 insertions, 11 deletions
diff --git a/net/flowscan/Makefile b/net/flowscan/Makefile index 99c5b0a804bc..ed3c83927f37 100644 --- a/net/flowscan/Makefile +++ b/net/flowscan/Makefile @@ -7,7 +7,7 @@ PORTNAME= flowscan PORTVERSION= 1.006 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= net MASTER_SITES= http://net.doit.wisc.edu/~plonka/FlowScan/ DISTFILES= FlowScan-${PORTVERSION}.tar.gz @@ -34,7 +34,7 @@ pre-install: post-install: @ ${INSTALL_SCRIPT} ${FILESDIR}/flowscan.sh \ - /usr/local/etc/rc.d/flowscan.sh.sample + /usr/local/etc/rc.d/cflowd-flowscan.sh.sample .for i in CampusIO.cf Napster_subnets.boulder SubNetIO.cf flowscan.cf \ local_nets.boulder our_subnets.boulder @ ${INSTALL_DATA} ${WRKSRC}/cf/${i} \ diff --git a/net/flowscan/files/flowscan.sh b/net/flowscan/files/flowscan.sh index df8911baac5f..08e88d0a35a8 100644 --- a/net/flowscan/files/flowscan.sh +++ b/net/flowscan/files/flowscan.sh @@ -1,3 +1,5 @@ +#! /bin/sh + # rc script for flowscan # Andreas Klemm <andreas@FreeBSD.org>, So 25 Mär 2001 12:46:10 CEST # $FreeBSD$ @@ -7,20 +9,31 @@ if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then exit 1 fi -bindir=${PREFIX}/var/db/flows/bin -logfile=${PREFIX}/var/db/flows/flowscan.log +awk=/usr/bin/awk +bindir=$PREFIX/var/db/flows/bin +grep=/usr/bin/grep +kill=/bin/kill +logfile=$PREFIX/var/db/flows/flowscan.log perl=/usr/bin/perl -scandir=${PREFIX}/var/db/flows +scandir=$PREFIX/var/db/flows case "$1" in 'start') - cd ${scandir} \ - && ${perl} ${bindir}/flowscan \ - >>${logfile} 2>&1 </dev/null \ - >/dev/null + [ -x $bindir/flowscan ] \ + && ( cd $scandir \ + && $perl $bindir/flowscan \ + >> $logfile 2>&1 </dev/null \ + > /dev/null & ) \ + && echo -n " flowscan" ;; 'stop') - killall flowscan + pid=`ps -ax | $grep "$perl $bindir/flowscan" | $awk '{ print $1 }'` + if [ -n "$pid" ]; then + echo "killing flowscan" + $kill $pid + fi ;; esac + +exit 0 diff --git a/net/flowscan/pkg-plist b/net/flowscan/pkg-plist index dd9bc50e2be7..73505a3c85a2 100644 --- a/net/flowscan/pkg-plist +++ b/net/flowscan/pkg-plist @@ -1,4 +1,4 @@ -etc/rc.d/flowscan.sh.sample +etc/rc.d/cflowd-flowscan.sh.sample var/db/flows/bin/flowscan var/db/flows/bin/FlowScan.pm var/db/flows/bin/CampusIO.pm |