summaryrefslogtreecommitdiffstats
path: root/abs/not_built/extra/rrd_stats
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2012-12-01 18:26:09 (GMT)
committerJames Meyer <james.meyer@operamail.com>2012-12-01 18:26:22 (GMT)
commite2c33b0fae1fa4af8bbbfc917eb8e13a3ac0cb37 (patch)
treebee3fe89f2988dd244e11791755e129aa8c03b14 /abs/not_built/extra/rrd_stats
parent8132c218cfc1f1acb1c6d12154e0d4ca075e77f2 (diff)
downloadlinhes_pkgbuild-e2c33b0fae1fa4af8bbbfc917eb8e13a3ac0cb37.zip
linhes_pkgbuild-e2c33b0fae1fa4af8bbbfc917eb8e13a3ac0cb37.tar.gz
linhes_pkgbuild-e2c33b0fae1fa4af8bbbfc917eb8e13a3ac0cb37.tar.bz2
Mass move of uncompiled packages to abs_not_built.
The will sit here for a bit, and then will be removed completely if no one claims them.
Diffstat (limited to 'abs/not_built/extra/rrd_stats')
-rw-r--r--abs/not_built/extra/rrd_stats/PKGBUILD31
-rw-r--r--abs/not_built/extra/rrd_stats/rrd_stats.install34
-rw-r--r--abs/not_built/extra/rrd_stats/rrd_stats.tgzbin0 -> 18248 bytes
-rw-r--r--abs/not_built/extra/rrd_stats/run_rrd.sh8
4 files changed, 73 insertions, 0 deletions
diff --git a/abs/not_built/extra/rrd_stats/PKGBUILD b/abs/not_built/extra/rrd_stats/PKGBUILD
new file mode 100644
index 0000000..b000185
--- /dev/null
+++ b/abs/not_built/extra/rrd_stats/PKGBUILD
@@ -0,0 +1,31 @@
+pkgname=rrd_stats
+pkgver=1
+pkgrel=20
+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'
+ 'data/srv/httpd/htdocs/cgi-bin/rrd.cgi' 'usr/bin/rrd_python.py')
+install=rrd_stats.install
+
+build() {
+
+ /bin/true
+
+}
+
+package() {
+
+ cd ${srcdir}/${pkgname}
+ cp -a * ${pkgdir}/
+ install -d ${pkgdir}/var/lib/rrd
+ echo "RRD files are used by rrd_stats" > ${pkgdir}/var/lib/rrd/README
+ mv ${pkgdir}/data/srv/httpd/htdocs/rrd/index.html ${pkgdir}/data/srv/httpd/htdocs/rrd/index-rrd.html
+ chown -R http:users ${pkgdir}/data/srv/httpd
+ chmod -R 755 ${pkgdir}/data/srv/httpd
+
+}
+md5sums=('1be3b8b684853908aab62aa5130ae30f')
diff --git a/abs/not_built/extra/rrd_stats/rrd_stats.install b/abs/not_built/extra/rrd_stats/rrd_stats.install
new file mode 100644
index 0000000..126e4f0
--- /dev/null
+++ b/abs/not_built/extra/rrd_stats/rrd_stats.install
@@ -0,0 +1,34 @@
+post_install() {
+ PFIX="/data/srv/httpd/htdocs/rrd"
+ if [ ! -e $PFIX/index.html.orig ]
+ then
+ mv $PFIX/index.html $PFIX/index.html.orig
+ ln -s $PFIX/index-rrd.html $PFIX/index.html
+ fi
+
+ ct=`crontab -l`
+ echo $ct | grep -q run_rrd.sh
+ if [ $? != 0 ]
+ then
+ line="*/5 * * * * /usr/bin/run_rrd.sh > /dev/null"
+ (crontab -l; echo "$line") | crontab -
+ fi
+
+
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+
+pre_remove() {
+ crontab -l | grep -v run_rrd | crontab -
+ PFIX="/data/srv/httpd/htdocs/rrd"
+ if [ -e $PFIX/index.html.orig ]
+ then
+ rm $PFIX/index.html
+ mv $PFIX/index.html.orig $PFIX/index.html
+ fi
+
+}
diff --git a/abs/not_built/extra/rrd_stats/rrd_stats.tgz b/abs/not_built/extra/rrd_stats/rrd_stats.tgz
new file mode 100644
index 0000000..7dde039
--- /dev/null
+++ b/abs/not_built/extra/rrd_stats/rrd_stats.tgz
Binary files differ
diff --git a/abs/not_built/extra/rrd_stats/run_rrd.sh b/abs/not_built/extra/rrd_stats/run_rrd.sh
new file mode 100644
index 0000000..19150a4
--- /dev/null
+++ b/abs/not_built/extra/rrd_stats/run_rrd.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+RRD='hddtemp disk traffic mem cpu usage ups'
+DIR='/usr/bin'
+#
+for x in $RRD
+do
+ $DIR/rrd_${x}.pl >& /dev/null
+done