mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-11 07:22:22 +00:00
- Update to 1.2.4.20060412
- Provide rc script - Fix ipv6 dependency - Various fixes PR: ports/95032 Submitted by: Janos Mohacsi <janos.mohacsi@bsd.hu>
This commit is contained in:
parent
502affb309
commit
d1ace2a653
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=160457
@ -6,28 +6,25 @@
|
||||
#
|
||||
|
||||
PORTNAME= nfsen
|
||||
PORTVERSION= 1.2.3
|
||||
PORTVERSION= 1.2.4.20060412
|
||||
CATEGORIES= net-mgmt
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \
|
||||
http://nfsen.sourceforge.net/
|
||||
MASTER_SITE_SUBDIR= ${PORTNAME}
|
||||
DISTNAME= ${PORTNAME}-snapshot-20060412
|
||||
|
||||
MAINTAINER= janos.mohacsi@bsd.hu
|
||||
COMMENT= Web based frontend to nfdump netflow collector
|
||||
|
||||
RUN_DEPENDS= ${SITE_PERL}/RRDp.pm:${PORTSDIR}/net/rrdtool
|
||||
|
||||
.if defined(WITH_IPV6) && !defined(NO_INET6)
|
||||
RUN_DEPENDS+= nfdump:${PORTSDIR}/net-mgmt/nfdump-devel
|
||||
.else
|
||||
RUN_DEPENDS+= nfdump:${PORTSDIR}/net-mgmt/nfdump
|
||||
.endif
|
||||
RUN_DEPENDS= ${SITE_PERL}/RRDp.pm:${PORTSDIR}/net/rrdtool \
|
||||
nfdump:${PORTSDIR}/net-mgmt/nfdump
|
||||
|
||||
USE_ICONV= yes
|
||||
USE_PERL5= yes
|
||||
USE_PHP= session pcre
|
||||
NO_BUILD= yes
|
||||
PLIST_SUB+= PORTNAME=${PORTNAME}
|
||||
USE_RC_SUBR= nfsen.sh
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
@ -35,19 +32,35 @@ PLIST_SUB+= PORTNAME=${PORTNAME}
|
||||
IGNORE= requires at least perl 5.6.0
|
||||
.endif
|
||||
|
||||
pre-everything::
|
||||
@${ECHO_MSG} ""
|
||||
@${ECHO_MSG} "*****************************************************"
|
||||
@${ECHO_MSG} "Before upgrading you may backup the original profile "
|
||||
@${ECHO_MSG} "stat data:"
|
||||
@${ECHO_MSG} "cd ${WRKSRC}/helpers"
|
||||
@${ECHO_MSG} "./mk_backup.sh /path/to/your/profilestatdir /path/to/backupdir"
|
||||
@${ECHO_MSG} "*****************************************************"
|
||||
@${ECHO_MSG} ""
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},' -e 's,%%PORTNAME%%,${PORTNAME},' \
|
||||
${WRKSRC}/etc/nfsen-dist.conf
|
||||
@${REINPLACE_CMD} -e 's,%%PERL%%,${PERL},' -e 's,%%PREFIX%%,${PREFIX},' ${WRKSRC}/install.pl
|
||||
@${RM} ${WRKSRC}/etc/nfsen-dist.conf.*
|
||||
@${REINPLACE_CMD} -e 's,%%PERL%%,${PERL},' -e 's,%%PREFIX%%,${PREFIX},' ${WRKSRC}/install.pl
|
||||
|
||||
do-install:
|
||||
@${MKDIR} ${PREFIX}/var/${PORTNAME}/profiles/live
|
||||
@${MKDIR} ${PREFIX}/libexec/${PORTNAME}
|
||||
${INSTALL_DATA} ${WRKSRC}/installer-items/CopyRecursive.pm ${PREFIX}/libexec/${PORTNAME}/
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/install.pl ${PREFIX}/bin/nfsen-reconfigure
|
||||
cd ${WRKSRC} ;${PERL} ${WRKSRC}/install.pl ${WRKSRC}/etc/nfsen-dist.conf
|
||||
@${ECHO_MSG} "Configure your ${LOCALBASE}/etc/nfsen.conf to have necessary profiles ";
|
||||
@${ECHO_MSG} "Then run 'nfsen-reconfigure ${LOCALBASE}/etc/nfsen.conf' to correctly setup profile files";
|
||||
${INSTALL_DATA} ${WRKSRC}/installer-items/RRDconvertv1.pm ${PREFIX}/libexec/${PORTNAME}/
|
||||
@ if [ -f ${PREFIX}/etc/nfsen.conf ] ; then \
|
||||
${ECHO_MSG} "installing with existing nfsen.conf"; \
|
||||
cd ${WRKSRC} ;${PERL} ${WRKSRC}/install.pl ${PREFIX}/etc/nfsen.conf; \
|
||||
else \
|
||||
${ECHO_MSG} "installing with sample nfsen.conf"; \
|
||||
cd ${WRKSRC} ;${PERL} ${WRKSRC}/install.pl ${WRKSRC}/etc/nfsen-dist.conf; \
|
||||
fi
|
||||
@${ECHO_MSG} "Configure your ${LOCALBASE}/etc/nfsen.conf to have necessary sources ";
|
||||
@${ECHO_MSG} "Then run 'nfsen -R ${LOCALBASE}/etc/nfsen.conf' to correctly setup source, RRD, and profile files";
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
@ -1,3 +1,3 @@
|
||||
MD5 (nfsen-1.2.3.tar.gz) = bb18418d021526fea40bc3f88a837bc1
|
||||
SHA256 (nfsen-1.2.3.tar.gz) = dcd362f082d6a92b4400c69bf1784c3ee0c0e95a5c7c617ece36698ce7cba535
|
||||
SIZE (nfsen-1.2.3.tar.gz) = 3331295
|
||||
MD5 (nfsen-snapshot-20060412.tar.gz) = 9bec47c899d6d232479da57824725130
|
||||
SHA256 (nfsen-snapshot-20060412.tar.gz) = e34e1f28233a81b92ddb36129a7ff1072d5005208e1ce76231dd89029a93aa46
|
||||
SIZE (nfsen-snapshot-20060412.tar.gz) = 3357678
|
||||
|
86
net-mgmt/nfsen-devel/files/nfsen.sh.in
Normal file
86
net-mgmt/nfsen-devel/files/nfsen.sh.in
Normal file
@ -0,0 +1,86 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||
DAEMON=%%PREFIX%%/bin/nfsen.rc
|
||||
NAME=nfsen
|
||||
|
||||
test -x $DAEMON || exit 0
|
||||
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting $NAME"
|
||||
$DAEMON start
|
||||
echo "."
|
||||
;;
|
||||
stop)
|
||||
echo -n "Stopping $NAME "
|
||||
$DAEMON stop
|
||||
echo "."
|
||||
;;
|
||||
restart|force-reload)
|
||||
#
|
||||
# If the "reload" option is implemented, move the "force-reload"
|
||||
# option to the "reload" entry above. If not, "force-reload" is
|
||||
# just the same as "restart".
|
||||
#
|
||||
echo -n "Restarting $NAME"
|
||||
$DAEMON stop
|
||||
sleep 1
|
||||
$DAEMON start
|
||||
echo "."
|
||||
;;
|
||||
*)
|
||||
N=/tmp/nfsen-1.2.4.20060325/etc/rc.d/${NAME}.sh
|
||||
# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
|
||||
echo "Usage: $N {start|stop|restart|force-reload}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
#! /bin/sh
|
||||
#
|
||||
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||
DAEMON=/usr/local/bin/nfsen.rc
|
||||
NAME=nfsen
|
||||
|
||||
test -x $DAEMON || exit 0
|
||||
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting $NAME"
|
||||
$DAEMON start
|
||||
echo "."
|
||||
;;
|
||||
stop)
|
||||
echo -n "Stopping $NAME "
|
||||
$DAEMON stop
|
||||
echo "."
|
||||
;;
|
||||
restart|force-reload)
|
||||
#
|
||||
# If the "reload" option is implemented, move the "force-reload"
|
||||
# option to the "reload" entry above. If not, "force-reload" is
|
||||
# just the same as "restart".
|
||||
#
|
||||
echo -n "Restarting $NAME"
|
||||
$DAEMON stop
|
||||
sleep 1
|
||||
$DAEMON start
|
||||
echo "."
|
||||
;;
|
||||
*)
|
||||
N=/tmp/nfsen-1.2.4.20060325/etc/rc.d/${NAME}.sh
|
||||
# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
|
||||
echo "Usage: $N {start|stop|restart|force-reload}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
@ -17,7 +17,7 @@ $FreeBSD$
|
||||
#
|
||||
# Where to install the NfSen Perl modules
|
||||
-$LIBEXECDIR="${BASEDIR}/libexec";
|
||||
+$LIBEXECDIR="${BASEDIR}/libexec/%%PORTNAME%%/";
|
||||
+$LIBEXECDIR="${BASEDIR}/libexec/%%PORTNAME%%";
|
||||
|
||||
#
|
||||
# Where to install the config files
|
||||
@ -55,6 +55,15 @@ $FreeBSD$
|
||||
|
||||
#
|
||||
# Where go all the frontend plugins
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
#
|
||||
# nfdump tools path
|
||||
-$PREFIX = '/usr/local/bin';
|
||||
+$PREFIX = '%%PREFIX%%/bin';
|
||||
|
||||
#
|
||||
# BASEDIR unrelated vars:
|
||||
@@ -82,7 +82,7 @@
|
||||
# This may be a different or the same uid than your web server.
|
||||
# Note: This user must be in group $WWWGROUP, otherwise nfcapd
|
||||
@ -64,10 +73,10 @@ $FreeBSD$
|
||||
|
||||
# user and group of the web server process
|
||||
# All netflow processing will be done with this user
|
||||
@@ -105,7 +105,7 @@
|
||||
@@ -106,7 +106,7 @@
|
||||
|
||||
%sources = (
|
||||
'upstream1' => { 'port' => '9995', 'col' => '#0000ff' },
|
||||
'upstream1' => { 'port' => '9995', 'col' => '#0000ff', 'type' => 'netflow' },
|
||||
- 'peer1' => { 'port' => '9996', 'col' => '#ff0000' },
|
||||
+# 'peer1' => { 'port' => '9996', 'col' => '#ff0000' },
|
||||
);
|
||||
|
@ -4,26 +4,26 @@ $FreeBSD$
|
||||
--- install.pl.orig
|
||||
+++ install.pl
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/perl -I installer-items
|
||||
-#!/usr/bin/perl
|
||||
+#!%%PERL%% -I %%PREFIX%%/libexec/nfsen
|
||||
#
|
||||
#
|
||||
# Copyright (c) 2004, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
@@ -56,33 +56,7 @@
|
||||
@@ -81,33 +81,7 @@
|
||||
# Get Perl
|
||||
sub GetPerl {
|
||||
|
||||
- my $whichperl;
|
||||
- my $ans;
|
||||
- chomp($whichperl = `which perl`);
|
||||
- if ( length $whichperl ) {
|
||||
- $whichperl = FindCommand("perl");
|
||||
- if ( defined $whichperl ) {
|
||||
- print "Perl to use: [$whichperl] ";
|
||||
- chomp($ans = <STDIN>);
|
||||
- if ( length $ans ) {
|
||||
- $whichperl = $ans;
|
||||
- }
|
||||
- } else {
|
||||
- print "No Perl found in PATH. Please specify where to find perl [] ";
|
||||
- print "No Perl found in your PATH. Please specify where to find perl [] ";
|
||||
- chomp($whichperl = <STDIN>);
|
||||
- }
|
||||
-
|
||||
|
@ -1,21 +1,22 @@
|
||||
bin/nfsen
|
||||
bin/nfsen-reconfigure
|
||||
bin/nfsen-run
|
||||
bin/nfsen.rc
|
||||
bin/pid_check.pl
|
||||
bin/nfsend
|
||||
bin/testPlugin
|
||||
@unexec if cmp -s %D/etc/nfsen.conf %D/etc/nfsen-dist.conf; then rm -f %D/etc/nfsen.conf; fi
|
||||
etc/nfsen-dist.conf
|
||||
@exec [ -f %D/etc/nfsen.conf ] || cp %D/etc/nfsen-dist.conf %D/etc/nfsen.conf
|
||||
etc/nfsen-shell-param
|
||||
etc/nfsen-dist.conf
|
||||
libexec/%%PORTNAME%%/CopyRecursive.pm
|
||||
libexec/%%PORTNAME%%/GenGraph.pl
|
||||
libexec/%%PORTNAME%%/Log.pm
|
||||
libexec/%%PORTNAME%%/NfConf.pm
|
||||
libexec/%%PORTNAME%%/NfProfile.pm
|
||||
libexec/%%PORTNAME%%/NfSen.pm
|
||||
libexec/%%PORTNAME%%/NfSenRC.pm
|
||||
libexec/%%PORTNAME%%/NfSenRRD.pm
|
||||
libexec/%%PORTNAME%%/Nfcomm.pm
|
||||
libexec/%%PORTNAME%%/Nfsources.pm
|
||||
libexec/%%PORTNAME%%/Notification.pm
|
||||
libexec/%%PORTNAME%%/RRDconvertv1.pm
|
||||
libexec/%%PORTNAME%%/plugins/demoplugin.pm
|
||||
www/%%PORTNAME%%/conf.php
|
||||
www/%%PORTNAME%%/EmptyGraph.gif
|
||||
@ -47,7 +48,6 @@ www/%%PORTNAME%%/doc/DisabledSources.png
|
||||
www/%%PORTNAME%%/doc/InputEnd.png
|
||||
www/%%PORTNAME%%/doc/Navigating.png
|
||||
www/%%PORTNAME%%/doc/NewProfile.png
|
||||
www/%%PORTNAME%%/doc/NfSen.html
|
||||
www/%%PORTNAME%%/doc/OutOfData.png
|
||||
www/%%PORTNAME%%/doc/ProcessingControls.png
|
||||
www/%%PORTNAME%%/doc/ProcessingOutput.png
|
||||
@ -66,6 +66,7 @@ www/%%PORTNAME%%/doc/dirstruct.png
|
||||
www/%%PORTNAME%%/doc/edit.png
|
||||
www/%%PORTNAME%%/doc/exiisting.png
|
||||
www/%%PORTNAME%%/doc/flows.png
|
||||
www/%%PORTNAME%%/doc/index.html
|
||||
www/%%PORTNAME%%/doc/linegraph.png
|
||||
www/%%PORTNAME%%/doc/nfsen-options.png
|
||||
www/%%PORTNAME%%/doc/overview.png
|
||||
@ -80,21 +81,7 @@ www/%%PORTNAME%%/doc/views.png
|
||||
@dirrm www/%%PORTNAME%%/doc
|
||||
@dirrm www/%%PORTNAME%%
|
||||
@exec mkdir -p %D/var/%%PORTNAME%%/profiles/live/upstream1
|
||||
var/%%PORTNAME%%/profiles/live/flows.rrd
|
||||
var/%%PORTNAME%%/profiles/live/flows_tcp.rrd
|
||||
var/%%PORTNAME%%/profiles/live/flows_udp.rrd
|
||||
var/%%PORTNAME%%/profiles/live/flows_icmp.rrd
|
||||
var/%%PORTNAME%%/profiles/live/flows_other.rrd
|
||||
var/%%PORTNAME%%/profiles/live/packets.rrd
|
||||
var/%%PORTNAME%%/profiles/live/packets_tcp.rrd
|
||||
var/%%PORTNAME%%/profiles/live/packets_udp.rrd
|
||||
var/%%PORTNAME%%/profiles/live/packets_icmp.rrd
|
||||
var/%%PORTNAME%%/profiles/live/packets_other.rrd
|
||||
var/%%PORTNAME%%/profiles/live/traffic.rrd
|
||||
var/%%PORTNAME%%/profiles/live/traffic_tcp.rrd
|
||||
var/%%PORTNAME%%/profiles/live/traffic_udp.rrd
|
||||
var/%%PORTNAME%%/profiles/live/traffic_icmp.rrd
|
||||
var/%%PORTNAME%%/profiles/live/traffic_other.rrd
|
||||
var/%%PORTNAME%%/profiles/live/upstream1.rrd
|
||||
var/%%PORTNAME%%/profiles/live/profile.dat
|
||||
@exec mkdir -p %D/var/%%PORTNAME%%/run
|
||||
@exec mkdir -p %D/var/%%PORTNAME%%/filters
|
||||
|
@ -6,28 +6,25 @@
|
||||
#
|
||||
|
||||
PORTNAME= nfsen
|
||||
PORTVERSION= 1.2.3
|
||||
PORTVERSION= 1.2.4.20060412
|
||||
CATEGORIES= net-mgmt
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \
|
||||
http://nfsen.sourceforge.net/
|
||||
MASTER_SITE_SUBDIR= ${PORTNAME}
|
||||
DISTNAME= ${PORTNAME}-snapshot-20060412
|
||||
|
||||
MAINTAINER= janos.mohacsi@bsd.hu
|
||||
COMMENT= Web based frontend to nfdump netflow collector
|
||||
|
||||
RUN_DEPENDS= ${SITE_PERL}/RRDp.pm:${PORTSDIR}/net/rrdtool
|
||||
|
||||
.if defined(WITH_IPV6) && !defined(NO_INET6)
|
||||
RUN_DEPENDS+= nfdump:${PORTSDIR}/net-mgmt/nfdump-devel
|
||||
.else
|
||||
RUN_DEPENDS+= nfdump:${PORTSDIR}/net-mgmt/nfdump
|
||||
.endif
|
||||
RUN_DEPENDS= ${SITE_PERL}/RRDp.pm:${PORTSDIR}/net/rrdtool \
|
||||
nfdump:${PORTSDIR}/net-mgmt/nfdump
|
||||
|
||||
USE_ICONV= yes
|
||||
USE_PERL5= yes
|
||||
USE_PHP= session pcre
|
||||
NO_BUILD= yes
|
||||
PLIST_SUB+= PORTNAME=${PORTNAME}
|
||||
USE_RC_SUBR= nfsen.sh
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
@ -35,19 +32,35 @@ PLIST_SUB+= PORTNAME=${PORTNAME}
|
||||
IGNORE= requires at least perl 5.6.0
|
||||
.endif
|
||||
|
||||
pre-everything::
|
||||
@${ECHO_MSG} ""
|
||||
@${ECHO_MSG} "*****************************************************"
|
||||
@${ECHO_MSG} "Before upgrading you may backup the original profile "
|
||||
@${ECHO_MSG} "stat data:"
|
||||
@${ECHO_MSG} "cd ${WRKSRC}/helpers"
|
||||
@${ECHO_MSG} "./mk_backup.sh /path/to/your/profilestatdir /path/to/backupdir"
|
||||
@${ECHO_MSG} "*****************************************************"
|
||||
@${ECHO_MSG} ""
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},' -e 's,%%PORTNAME%%,${PORTNAME},' \
|
||||
${WRKSRC}/etc/nfsen-dist.conf
|
||||
@${REINPLACE_CMD} -e 's,%%PERL%%,${PERL},' -e 's,%%PREFIX%%,${PREFIX},' ${WRKSRC}/install.pl
|
||||
@${RM} ${WRKSRC}/etc/nfsen-dist.conf.*
|
||||
@${REINPLACE_CMD} -e 's,%%PERL%%,${PERL},' -e 's,%%PREFIX%%,${PREFIX},' ${WRKSRC}/install.pl
|
||||
|
||||
do-install:
|
||||
@${MKDIR} ${PREFIX}/var/${PORTNAME}/profiles/live
|
||||
@${MKDIR} ${PREFIX}/libexec/${PORTNAME}
|
||||
${INSTALL_DATA} ${WRKSRC}/installer-items/CopyRecursive.pm ${PREFIX}/libexec/${PORTNAME}/
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/install.pl ${PREFIX}/bin/nfsen-reconfigure
|
||||
cd ${WRKSRC} ;${PERL} ${WRKSRC}/install.pl ${WRKSRC}/etc/nfsen-dist.conf
|
||||
@${ECHO_MSG} "Configure your ${LOCALBASE}/etc/nfsen.conf to have necessary profiles ";
|
||||
@${ECHO_MSG} "Then run 'nfsen-reconfigure ${LOCALBASE}/etc/nfsen.conf' to correctly setup profile files";
|
||||
${INSTALL_DATA} ${WRKSRC}/installer-items/RRDconvertv1.pm ${PREFIX}/libexec/${PORTNAME}/
|
||||
@ if [ -f ${PREFIX}/etc/nfsen.conf ] ; then \
|
||||
${ECHO_MSG} "installing with existing nfsen.conf"; \
|
||||
cd ${WRKSRC} ;${PERL} ${WRKSRC}/install.pl ${PREFIX}/etc/nfsen.conf; \
|
||||
else \
|
||||
${ECHO_MSG} "installing with sample nfsen.conf"; \
|
||||
cd ${WRKSRC} ;${PERL} ${WRKSRC}/install.pl ${WRKSRC}/etc/nfsen-dist.conf; \
|
||||
fi
|
||||
@${ECHO_MSG} "Configure your ${LOCALBASE}/etc/nfsen.conf to have necessary sources ";
|
||||
@${ECHO_MSG} "Then run 'nfsen -R ${LOCALBASE}/etc/nfsen.conf' to correctly setup source, RRD, and profile files";
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
@ -1,3 +1,3 @@
|
||||
MD5 (nfsen-1.2.3.tar.gz) = bb18418d021526fea40bc3f88a837bc1
|
||||
SHA256 (nfsen-1.2.3.tar.gz) = dcd362f082d6a92b4400c69bf1784c3ee0c0e95a5c7c617ece36698ce7cba535
|
||||
SIZE (nfsen-1.2.3.tar.gz) = 3331295
|
||||
MD5 (nfsen-snapshot-20060412.tar.gz) = 9bec47c899d6d232479da57824725130
|
||||
SHA256 (nfsen-snapshot-20060412.tar.gz) = e34e1f28233a81b92ddb36129a7ff1072d5005208e1ce76231dd89029a93aa46
|
||||
SIZE (nfsen-snapshot-20060412.tar.gz) = 3357678
|
||||
|
86
net-mgmt/nfsen/files/nfsen.sh.in
Normal file
86
net-mgmt/nfsen/files/nfsen.sh.in
Normal file
@ -0,0 +1,86 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||
DAEMON=%%PREFIX%%/bin/nfsen.rc
|
||||
NAME=nfsen
|
||||
|
||||
test -x $DAEMON || exit 0
|
||||
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting $NAME"
|
||||
$DAEMON start
|
||||
echo "."
|
||||
;;
|
||||
stop)
|
||||
echo -n "Stopping $NAME "
|
||||
$DAEMON stop
|
||||
echo "."
|
||||
;;
|
||||
restart|force-reload)
|
||||
#
|
||||
# If the "reload" option is implemented, move the "force-reload"
|
||||
# option to the "reload" entry above. If not, "force-reload" is
|
||||
# just the same as "restart".
|
||||
#
|
||||
echo -n "Restarting $NAME"
|
||||
$DAEMON stop
|
||||
sleep 1
|
||||
$DAEMON start
|
||||
echo "."
|
||||
;;
|
||||
*)
|
||||
N=/tmp/nfsen-1.2.4.20060325/etc/rc.d/${NAME}.sh
|
||||
# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
|
||||
echo "Usage: $N {start|stop|restart|force-reload}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
#! /bin/sh
|
||||
#
|
||||
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||
DAEMON=/usr/local/bin/nfsen.rc
|
||||
NAME=nfsen
|
||||
|
||||
test -x $DAEMON || exit 0
|
||||
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting $NAME"
|
||||
$DAEMON start
|
||||
echo "."
|
||||
;;
|
||||
stop)
|
||||
echo -n "Stopping $NAME "
|
||||
$DAEMON stop
|
||||
echo "."
|
||||
;;
|
||||
restart|force-reload)
|
||||
#
|
||||
# If the "reload" option is implemented, move the "force-reload"
|
||||
# option to the "reload" entry above. If not, "force-reload" is
|
||||
# just the same as "restart".
|
||||
#
|
||||
echo -n "Restarting $NAME"
|
||||
$DAEMON stop
|
||||
sleep 1
|
||||
$DAEMON start
|
||||
echo "."
|
||||
;;
|
||||
*)
|
||||
N=/tmp/nfsen-1.2.4.20060325/etc/rc.d/${NAME}.sh
|
||||
# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
|
||||
echo "Usage: $N {start|stop|restart|force-reload}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
@ -17,7 +17,7 @@ $FreeBSD$
|
||||
#
|
||||
# Where to install the NfSen Perl modules
|
||||
-$LIBEXECDIR="${BASEDIR}/libexec";
|
||||
+$LIBEXECDIR="${BASEDIR}/libexec/%%PORTNAME%%/";
|
||||
+$LIBEXECDIR="${BASEDIR}/libexec/%%PORTNAME%%";
|
||||
|
||||
#
|
||||
# Where to install the config files
|
||||
@ -55,6 +55,15 @@ $FreeBSD$
|
||||
|
||||
#
|
||||
# Where go all the frontend plugins
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
#
|
||||
# nfdump tools path
|
||||
-$PREFIX = '/usr/local/bin';
|
||||
+$PREFIX = '%%PREFIX%%/bin';
|
||||
|
||||
#
|
||||
# BASEDIR unrelated vars:
|
||||
@@ -82,7 +82,7 @@
|
||||
# This may be a different or the same uid than your web server.
|
||||
# Note: This user must be in group $WWWGROUP, otherwise nfcapd
|
||||
@ -64,10 +73,10 @@ $FreeBSD$
|
||||
|
||||
# user and group of the web server process
|
||||
# All netflow processing will be done with this user
|
||||
@@ -105,7 +105,7 @@
|
||||
@@ -106,7 +106,7 @@
|
||||
|
||||
%sources = (
|
||||
'upstream1' => { 'port' => '9995', 'col' => '#0000ff' },
|
||||
'upstream1' => { 'port' => '9995', 'col' => '#0000ff', 'type' => 'netflow' },
|
||||
- 'peer1' => { 'port' => '9996', 'col' => '#ff0000' },
|
||||
+# 'peer1' => { 'port' => '9996', 'col' => '#ff0000' },
|
||||
);
|
||||
|
@ -4,26 +4,26 @@ $FreeBSD$
|
||||
--- install.pl.orig
|
||||
+++ install.pl
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/perl -I installer-items
|
||||
-#!/usr/bin/perl
|
||||
+#!%%PERL%% -I %%PREFIX%%/libexec/nfsen
|
||||
#
|
||||
#
|
||||
# Copyright (c) 2004, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
|
||||
@@ -56,33 +56,7 @@
|
||||
@@ -81,33 +81,7 @@
|
||||
# Get Perl
|
||||
sub GetPerl {
|
||||
|
||||
- my $whichperl;
|
||||
- my $ans;
|
||||
- chomp($whichperl = `which perl`);
|
||||
- if ( length $whichperl ) {
|
||||
- $whichperl = FindCommand("perl");
|
||||
- if ( defined $whichperl ) {
|
||||
- print "Perl to use: [$whichperl] ";
|
||||
- chomp($ans = <STDIN>);
|
||||
- if ( length $ans ) {
|
||||
- $whichperl = $ans;
|
||||
- }
|
||||
- } else {
|
||||
- print "No Perl found in PATH. Please specify where to find perl [] ";
|
||||
- print "No Perl found in your PATH. Please specify where to find perl [] ";
|
||||
- chomp($whichperl = <STDIN>);
|
||||
- }
|
||||
-
|
||||
|
@ -1,21 +1,22 @@
|
||||
bin/nfsen
|
||||
bin/nfsen-reconfigure
|
||||
bin/nfsen-run
|
||||
bin/nfsen.rc
|
||||
bin/pid_check.pl
|
||||
bin/nfsend
|
||||
bin/testPlugin
|
||||
@unexec if cmp -s %D/etc/nfsen.conf %D/etc/nfsen-dist.conf; then rm -f %D/etc/nfsen.conf; fi
|
||||
etc/nfsen-dist.conf
|
||||
@exec [ -f %D/etc/nfsen.conf ] || cp %D/etc/nfsen-dist.conf %D/etc/nfsen.conf
|
||||
etc/nfsen-shell-param
|
||||
etc/nfsen-dist.conf
|
||||
libexec/%%PORTNAME%%/CopyRecursive.pm
|
||||
libexec/%%PORTNAME%%/GenGraph.pl
|
||||
libexec/%%PORTNAME%%/Log.pm
|
||||
libexec/%%PORTNAME%%/NfConf.pm
|
||||
libexec/%%PORTNAME%%/NfProfile.pm
|
||||
libexec/%%PORTNAME%%/NfSen.pm
|
||||
libexec/%%PORTNAME%%/NfSenRC.pm
|
||||
libexec/%%PORTNAME%%/NfSenRRD.pm
|
||||
libexec/%%PORTNAME%%/Nfcomm.pm
|
||||
libexec/%%PORTNAME%%/Nfsources.pm
|
||||
libexec/%%PORTNAME%%/Notification.pm
|
||||
libexec/%%PORTNAME%%/RRDconvertv1.pm
|
||||
libexec/%%PORTNAME%%/plugins/demoplugin.pm
|
||||
www/%%PORTNAME%%/conf.php
|
||||
www/%%PORTNAME%%/EmptyGraph.gif
|
||||
@ -47,7 +48,6 @@ www/%%PORTNAME%%/doc/DisabledSources.png
|
||||
www/%%PORTNAME%%/doc/InputEnd.png
|
||||
www/%%PORTNAME%%/doc/Navigating.png
|
||||
www/%%PORTNAME%%/doc/NewProfile.png
|
||||
www/%%PORTNAME%%/doc/NfSen.html
|
||||
www/%%PORTNAME%%/doc/OutOfData.png
|
||||
www/%%PORTNAME%%/doc/ProcessingControls.png
|
||||
www/%%PORTNAME%%/doc/ProcessingOutput.png
|
||||
@ -66,6 +66,7 @@ www/%%PORTNAME%%/doc/dirstruct.png
|
||||
www/%%PORTNAME%%/doc/edit.png
|
||||
www/%%PORTNAME%%/doc/exiisting.png
|
||||
www/%%PORTNAME%%/doc/flows.png
|
||||
www/%%PORTNAME%%/doc/index.html
|
||||
www/%%PORTNAME%%/doc/linegraph.png
|
||||
www/%%PORTNAME%%/doc/nfsen-options.png
|
||||
www/%%PORTNAME%%/doc/overview.png
|
||||
@ -80,21 +81,7 @@ www/%%PORTNAME%%/doc/views.png
|
||||
@dirrm www/%%PORTNAME%%/doc
|
||||
@dirrm www/%%PORTNAME%%
|
||||
@exec mkdir -p %D/var/%%PORTNAME%%/profiles/live/upstream1
|
||||
var/%%PORTNAME%%/profiles/live/flows.rrd
|
||||
var/%%PORTNAME%%/profiles/live/flows_tcp.rrd
|
||||
var/%%PORTNAME%%/profiles/live/flows_udp.rrd
|
||||
var/%%PORTNAME%%/profiles/live/flows_icmp.rrd
|
||||
var/%%PORTNAME%%/profiles/live/flows_other.rrd
|
||||
var/%%PORTNAME%%/profiles/live/packets.rrd
|
||||
var/%%PORTNAME%%/profiles/live/packets_tcp.rrd
|
||||
var/%%PORTNAME%%/profiles/live/packets_udp.rrd
|
||||
var/%%PORTNAME%%/profiles/live/packets_icmp.rrd
|
||||
var/%%PORTNAME%%/profiles/live/packets_other.rrd
|
||||
var/%%PORTNAME%%/profiles/live/traffic.rrd
|
||||
var/%%PORTNAME%%/profiles/live/traffic_tcp.rrd
|
||||
var/%%PORTNAME%%/profiles/live/traffic_udp.rrd
|
||||
var/%%PORTNAME%%/profiles/live/traffic_icmp.rrd
|
||||
var/%%PORTNAME%%/profiles/live/traffic_other.rrd
|
||||
var/%%PORTNAME%%/profiles/live/upstream1.rrd
|
||||
var/%%PORTNAME%%/profiles/live/profile.dat
|
||||
@exec mkdir -p %D/var/%%PORTNAME%%/run
|
||||
@exec mkdir -p %D/var/%%PORTNAME%%/filters
|
||||
|
Loading…
Reference in New Issue
Block a user