summaryrefslogtreecommitdiffstats
path: root/abs
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2009-06-15 20:35:46 (GMT)
committerJames Meyer <james.meyer@operamail.com>2009-06-15 20:35:46 (GMT)
commite47d97e366a8eae8d5d71ef692b930fcfd953e53 (patch)
treec5123d619dcff119ab706b9a2800aa475210675d /abs
parentb760ec370e5f2265ee619e394d44b7fd8b3e2346 (diff)
downloadlinhes_pkgbuild-e47d97e366a8eae8d5d71ef692b930fcfd953e53.zip
linhes_pkgbuild-e47d97e366a8eae8d5d71ef692b930fcfd953e53.tar.gz
linhes_pkgbuild-e47d97e366a8eae8d5d71ef692b930fcfd953e53.tar.bz2
rrd_stats: add pkg to repo.
the configfile needs to be tweaked for each install, but the basics are there.
Diffstat (limited to 'abs')
-rw-r--r--abs/extra-testing/rrd_stats/PKGBUILD2
-rw-r--r--abs/extra-testing/rrd_stats/rrd_stats.install61
-rw-r--r--abs/extra-testing/rrd_stats/rrd_stats.tgzbin6603 -> 6598 bytes
3 files changed, 51 insertions, 12 deletions
diff --git a/abs/extra-testing/rrd_stats/PKGBUILD b/abs/extra-testing/rrd_stats/PKGBUILD
index 8e027d5..a171aa6 100644
--- a/abs/extra-testing/rrd_stats/PKGBUILD
+++ b/abs/extra-testing/rrd_stats/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=rrd_stats
pkgver=1
-pkgrel=9
+pkgrel=11
pkgdesc="graph system stats"
arch=('i686' 'x86_64')
url=""
diff --git a/abs/extra-testing/rrd_stats/rrd_stats.install b/abs/extra-testing/rrd_stats/rrd_stats.install
index be3d2e9..d6aa4ed 100644
--- a/abs/extra-testing/rrd_stats/rrd_stats.install
+++ b/abs/extra-testing/rrd_stats/rrd_stats.install
@@ -1,22 +1,61 @@
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 -
+ 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 rrd_hddtemp.pl
+ if [ $? != 0 ]
+ then
+ line="*/5 * * * * /usr/bin/rrd_hddtemp.pl > /dev/null"
+ (crontab -l; echo "$line") | crontab -
+ fi
+
+ echo $ct | grep -q rrd_disk.pl
+ if [ $? != 0 ]
+ then
+ line="*/5 * * * * /usr/bin/rrd_disk.pl > /dev/null"
+ (crontab -l; echo "$line") | crontab -
+ fi
+
+ echo $ct | grep -q rrd_traffic.pl
+ if [ $? != 0 ]
+ then
+ line="*/5 * * * * /usr/bin/rrd_traffic.pl > /dev/null"
+ (crontab -l; echo "$line") | crontab -
+ fi
+
+ echo $ct | grep -q rrd_mem.pl
+ if [ $? != 0 ]
+ then
+ line="*/5 * * * * /usr/bin/rrd_mem.pl > /dev/null"
+ (crontab -l; echo "$line") | crontab -
+ fi
+
+ echo $ct | grep -q rrd_cpu.pl
+ if [ $? != 0 ]
+ then
+ line="*/5 * * * * /usr/bin/rrd_cpu.pl > /dev/null"
+ (crontab -l; echo "$line") | crontab -
+ fi
+
}
post_upgrade() {
- /bin/true
+ post_install $1
}
pre_remove() {
crontab -l | grep -v 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/extra-testing/rrd_stats/rrd_stats.tgz b/abs/extra-testing/rrd_stats/rrd_stats.tgz
index 66d2e06..2d66428 100644
--- a/abs/extra-testing/rrd_stats/rrd_stats.tgz
+++ b/abs/extra-testing/rrd_stats/rrd_stats.tgz
Binary files differ