aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/darkstat
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2007-10-06 05:53:35 +0800
committermiwi <miwi@FreeBSD.org>2007-10-06 05:53:35 +0800
commit72d4491db4ff8430677b4f7eb19e0460af167eb9 (patch)
treeffa0bd7c06c1334954a28d3dda8c59a282f4d6fe /net-mgmt/darkstat
parent2e2d949d1ed151e5e53e1bdfe97342926edced5d (diff)
downloadfreebsd-ports-gnome-72d4491db4ff8430677b4f7eb19e0460af167eb9.tar.gz
freebsd-ports-gnome-72d4491db4ff8430677b4f7eb19e0460af167eb9.tar.zst
freebsd-ports-gnome-72d4491db4ff8430677b4f7eb19e0460af167eb9.zip
- Update to 3.0.707
PR: 116869 Submitted by: Emil Mikulic <emil@cs.rmit.edu.au> (maintainer)
Diffstat (limited to 'net-mgmt/darkstat')
-rw-r--r--net-mgmt/darkstat/Makefile4
-rw-r--r--net-mgmt/darkstat/distinfo6
-rw-r--r--net-mgmt/darkstat/files/darkstat.in59
3 files changed, 65 insertions, 4 deletions
diff --git a/net-mgmt/darkstat/Makefile b/net-mgmt/darkstat/Makefile
index a9b77f1812fb..f325e3c1c206 100644
--- a/net-mgmt/darkstat/Makefile
+++ b/net-mgmt/darkstat/Makefile
@@ -6,13 +6,15 @@
#
PORTNAME= darkstat
-PORTVERSION= 3.0.619
+PORTVERSION= 3.0.707
CATEGORIES= net-mgmt
MASTER_SITES= http://dmr.ath.cx/net/darkstat/
MAINTAINER= emil@cs.rmit.edu.au
COMMENT= Network statistics gatherer and reporter
+USE_RC_SUBR= darkstat
+
USE_BZIP2= yes
GNU_CONFIGURE= yes
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
diff --git a/net-mgmt/darkstat/distinfo b/net-mgmt/darkstat/distinfo
index 3b0a5719b4a7..af4fcaf2b455 100644
--- a/net-mgmt/darkstat/distinfo
+++ b/net-mgmt/darkstat/distinfo
@@ -1,3 +1,3 @@
-MD5 (darkstat-3.0.619.tar.bz2) = b30e6b51cb3cf84254476c1140f08e17
-SHA256 (darkstat-3.0.619.tar.bz2) = e50ad3431f8c3c8172c878b7b9073e99a4802ad202739a6dad792cb8f7cfc1be
-SIZE (darkstat-3.0.619.tar.bz2) = 82508
+MD5 (darkstat-3.0.707.tar.bz2) = 91c70f96498dd679b21330214361e4dc
+SHA256 (darkstat-3.0.707.tar.bz2) = 243bd77f93acbb6832f5ef1cc4b03abe823006c129f88fe5724697e1c0857644
+SIZE (darkstat-3.0.707.tar.bz2) = 90459
diff --git a/net-mgmt/darkstat/files/darkstat.in b/net-mgmt/darkstat/files/darkstat.in
new file mode 100644
index 000000000000..fd87a6ffe09a
--- /dev/null
+++ b/net-mgmt/darkstat/files/darkstat.in
@@ -0,0 +1,59 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: darkstat
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+
+# Add the following lines to /etc/rc.conf to enable `darkstat':
+#
+# darkstat_enable="YES"
+# darkstat_interface="fxp0" # change to suit your configuration
+#
+# Optional configuration flags:
+#
+# darkstat_dir="/var/run/darkstat"
+# darkstat_pidname="darkstat.pid"
+# darkstat_dropuser="nobody"
+# darkstat_flags=""
+# - examples: [ --no-promisc ] [ --no-dns ] [ -p port ]
+# [ -b bindaddr ] [ -f filter ] [ -l network/netmask ]
+# [ --daylog filename ] [ --import filename ] [ --export filename ]
+#
+# - DON'T pass -i, --chroot, --pidfile, or --user here
+#
+# Please refer to the darkstat(1) manual page for full documentation.
+
+. %%RC_SUBR%%
+
+name=darkstat
+rcvar=`set_rcvar`
+
+command=%%PREFIX%%/sbin/$name
+start_precmd=darkstat_prestart
+
+load_rc_config $name
+: ${darkstat_enable="NO"}
+: ${darkstat_dir="/var/run/darkstat"}
+: ${darkstat_pidname="darkstat.pid"}
+: ${darkstat_dropuser="nobody"}
+: ${darkstat_flags=""}
+pidfile="${darkstat_dir}/${darkstat_pidname}"
+
+darkstat_prestart()
+{
+ if [ "x${darkstat_interface}" = "x" ]; then
+ err 1 "You must define \$darkstat_interface."
+ fi
+ mkdir -p ${darkstat_dir}
+ chown ${darkstat_dropuser} ${darkstat_dir}
+ chmod u+wx ${darkstat_dir}
+}
+
+darkstat_flags="-i ${darkstat_interface} --chroot ${darkstat_dir} \
+--pidfile ${darkstat_pidname} --user ${darkstat_dropuser} \
+${darkstat_flags}"
+
+run_rc_command "$1"