- 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.
This commit is contained in:
parent
323aa7a8f0
commit
5586d3519b
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=40346
@ -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} \
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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} \
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user