summaryrefslogtreecommitdiff
path: root/community/vnstat
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/vnstat
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/vnstat')
-rw-r--r--community/vnstat/PKGBUILD33
-rw-r--r--community/vnstat/vnstat.install16
2 files changed, 49 insertions, 0 deletions
diff --git a/community/vnstat/PKGBUILD b/community/vnstat/PKGBUILD
new file mode 100644
index 000000000..c50e19e51
--- /dev/null
+++ b/community/vnstat/PKGBUILD
@@ -0,0 +1,33 @@
+# $Id: PKGBUILD 20111 2010-07-02 14:00:19Z tdziedzic $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+
+pkgname=vnstat
+pkgver=1.10
+pkgrel=5
+pkgdesc="A console-based network traffic monitor"
+arch=('i686' 'x86_64')
+url="http://humdi.net/vnstat/"
+license=('GPL')
+depends=('bash')
+makedepends=('gd')
+optdepends=('gd: image output')
+backup=(etc/vnstat.conf)
+install=vnstat.install
+source=(http://humdi.net/vnstat/$pkgname-$pkgver.tar.gz
+ http://humdi.net/vnstat/init.d/arch/vnstat)
+md5sums=('95421d968689130590348ceb80ff74a8'
+ 'e89a566dd7514ff0d2d3fc77b2d4ca7e')
+
+build() {
+ mkdir -p $pkgdir/etc
+
+ cd $srcdir/$pkgname-$pkgver
+
+ make all
+ make DESTDIR=$pkgdir install
+
+ install -D -m0755 $srcdir/vnstat $pkgdir/etc/rc.d/vnstat && \
+ install -D -m0644 examples/vnstat.cron $pkgdir/usr/share/doc/vnstat/examples/vnstat.cron && \
+ install -D -m0755 examples/vnstat.cgi $pkgdir/usr/share/doc/vnstat/examples/vnstat.cgi && \
+ sed -i 's#root##' $pkgdir/usr/share/doc/vnstat/examples/vnstat.cron
+}
diff --git a/community/vnstat/vnstat.install b/community/vnstat/vnstat.install
new file mode 100644
index 000000000..364684142
--- /dev/null
+++ b/community/vnstat/vnstat.install
@@ -0,0 +1,16 @@
+post_install() {
+ echo '==> Testing the kernel ...'
+ /usr/bin/vnstat --testkernel
+ echo '==> Every interface you want to monitor has to be introduced to vnStat!'
+ echo '==> eg. vnstat -u -i eth0'
+ echo '==> An example of a crontab to update vnStats database every 5 minutes'
+ echo '==> has been put in /usr/share/doc/vnstat/examples/vnstat.cron'
+ echo '==> Additionally, vnstat includes a daemon which can be added to your'
+ echo '==> rc.conf to update the database.'
+ echo '==> DO NOT HAVE BOTH THE CRON AND RC SCRIPTS ACTIVE AT THE SAME TIME.'
+ echo '==>'
+ echo '==> Webbased statistics can be generated using:'
+ echo '==> /usr/share/doc/vnstat/examples/vnstat.cgi'
+ /bin/true
+}
+