From b760ec370e5f2265ee619e394d44b7fd8b3e2346 Mon Sep 17 00:00:00 2001
From: James Meyer <james.meyer@operamail.com>
Date: Mon, 15 Jun 2009 00:03:27 -0500
Subject: rrd_stats: add to repo ref FS#146

---
 abs/extra-testing/rrd_stats/PKGBUILD          |  20 ++++++++++++++++++++
 abs/extra-testing/rrd_stats/rrd_stats.install |  22 ++++++++++++++++++++++
 abs/extra-testing/rrd_stats/rrd_stats.tgz     | Bin 0 -> 6603 bytes
 3 files changed, 42 insertions(+)
 create mode 100644 abs/extra-testing/rrd_stats/PKGBUILD
 create mode 100644 abs/extra-testing/rrd_stats/rrd_stats.install
 create mode 100644 abs/extra-testing/rrd_stats/rrd_stats.tgz

diff --git a/abs/extra-testing/rrd_stats/PKGBUILD b/abs/extra-testing/rrd_stats/PKGBUILD
new file mode 100644
index 0000000..8e027d5
--- /dev/null
+++ b/abs/extra-testing/rrd_stats/PKGBUILD
@@ -0,0 +1,20 @@
+pkgname=rrd_stats
+pkgver=1
+pkgrel=9
+pkgdesc="graph system stats"
+arch=('i686' 'x86_64')
+url=""
+license=('GPL')
+source=(rrd_stats.tgz)
+depends=('hddtemp'  'sysstat'  'xmbmon'  'rrdtool'  'perl'  'local-website')
+backup=('etc/rrdsettings.cfg' 'data/srv/httpd/htdocs/index-rrd.html')
+install=rrd_stats.install
+build() {
+  cd $startdir/src/$pkgname
+  cp -a * $startdir/pkg
+  mkdir -p $startdir/pkg/var/lib/rrd
+  echo "RRD files are used by rrd_stats" > $startdir/pkg/var/lib/rrd/README
+  mv $startdir/pkg/data/srv/httpd/htdocs/rrd/index.html $startdir/pkg/data/srv/httpd/htdocs/rrd/index-rrd.html
+  chown -R http:users $startdir/pkg/data/srv/httpd
+  chmod -R 755 $startdir/pkg/data/srv/httpd
+}
diff --git a/abs/extra-testing/rrd_stats/rrd_stats.install b/abs/extra-testing/rrd_stats/rrd_stats.install
new file mode 100644
index 0000000..be3d2e9
--- /dev/null
+++ b/abs/extra-testing/rrd_stats/rrd_stats.install
@@ -0,0 +1,22 @@
+post_install() {
+	line="*/5 * * * *       /usr/local/bin/rrd_hddtemp.pl > /dev/null"
+	(crontab -l; echo "$line") | crontab -
+	line="*/5 * * * *       /usr/local/bin/rrd_disk.pl > /dev/null"
+	(crontab -l; echo "$line") | crontab -
+	line="*/5 * * * *       /usr/local/bin/rrd_traffic.pl > /dev/null"
+	(crontab -l; echo "$line") | crontab -
+	line="*/5 * * * *       /usr/local/bin/rrd_mem.pl > /dev/null"
+	(crontab -l; echo "$line") | crontab -
+	line="*/5 * * * *       /usr/local/bin/rrd_cpu.pl > /dev/null"
+	(crontab -l; echo "$line") | crontab -
+}
+
+post_upgrade() {
+ 	/bin/true
+}
+
+
+pre_remove() {
+	crontab -l | grep -v rrd_ | crontab - 
+
+}
diff --git a/abs/extra-testing/rrd_stats/rrd_stats.tgz b/abs/extra-testing/rrd_stats/rrd_stats.tgz
new file mode 100644
index 0000000..66d2e06
Binary files /dev/null and b/abs/extra-testing/rrd_stats/rrd_stats.tgz differ
-- 
cgit v0.12