summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2004-07-24 05:54:52 +0000
committerMike Frysinger <vapier@gentoo.org>2004-07-24 05:54:52 +0000
commit4566f2168a845ad8f86a7dbed2f1d86ddfa4b622 (patch)
tree93286c5dd36d47845a1d9000112399cada87cc54 /net-analyzer/vnstat
parentRemoving old versions. Moving auto* and doxygen out of RDEPEND. (Manifest re... (diff)
downloadgentoo-2-4566f2168a845ad8f86a7dbed2f1d86ddfa4b622.tar.gz
gentoo-2-4566f2168a845ad8f86a7dbed2f1d86ddfa4b622.tar.bz2
gentoo-2-4566f2168a845ad8f86a7dbed2f1d86ddfa4b622.zip
install crontab into /etc/cron.d instead
Diffstat (limited to 'net-analyzer/vnstat')
-rw-r--r--net-analyzer/vnstat/files/vnstat.cron6
-rw-r--r--net-analyzer/vnstat/vnstat-1.4.ebuild7
2 files changed, 7 insertions, 6 deletions
diff --git a/net-analyzer/vnstat/files/vnstat.cron b/net-analyzer/vnstat/files/vnstat.cron
index 716405fe50c8..9315bcefc5df 100644
--- a/net-analyzer/vnstat/files/vnstat.cron
+++ b/net-analyzer/vnstat/files/vnstat.cron
@@ -1,8 +1,6 @@
#!/bin/bash
-# uncomment this line to enable this cron script
-exit 0
-
-if [ `ls /var/lib/vnstat/ | wc -l` -ge 1 ] ; then
+# run vnstat if installed and at least one database exists
+if [ -x /usr/bin/vnstat ] && [ `ls /var/lib/vnstat/ | wc -l` -ge 1 ] ; then
exec /usr/bin/vnstat -u
fi
diff --git a/net-analyzer/vnstat/vnstat-1.4.ebuild b/net-analyzer/vnstat/vnstat-1.4.ebuild
index 1213871c2a4b..a0e5e20b2d9b 100644
--- a/net-analyzer/vnstat/vnstat-1.4.ebuild
+++ b/net-analyzer/vnstat/vnstat-1.4.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/vnstat/vnstat-1.4.ebuild,v 1.5 2004/07/10 15:40:48 kugelfang Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/vnstat/vnstat-1.4.ebuild,v 1.6 2004/07/24 05:54:52 vapier Exp $
DESCRIPTION="Console-based network traffic monitor that keeps statistics of network usage"
HOMEPAGE="http://humdi.net/vnstat/"
@@ -21,7 +21,7 @@ src_install() {
keepdir /var/lib/vnstat
dobin src/vnstat || die
- insinto /etc/cron.hourly
+ insinto /etc/cron.d
newins ${FILESDIR}/vnstat.cron vnstat
doman man/vnstat.1
@@ -41,4 +41,7 @@ pkg_postinst() {
einfo "Repeat the following command for every interface you"
einfo "wish to monitor (replace eth0):"
einfo " vnstat -u -i eth0"
+
+ einfo "Note: if an interface transfers more than ~4GB in"
+ einfo "the time between cron runs, you may miss traffic"
}