From 06ba6de894ea5a79a85b2fd4ebbc1faf3eeaba36 Mon Sep 17 00:00:00 2001 From: James Meyer Date: Thu, 18 Jun 2009 09:58:31 -0500 Subject: rrd_stats: add rrd_ups. Also add run_rrd.sh to cron. There were enough rrd scripts that cron was getting a bit messy. People who installed earlier rrd_stats will need to cleanup their crontab manually. --- abs/extra-testing/rrd_stats/PKGBUILD | 2 +- abs/extra-testing/rrd_stats/rrd_stats.install | 41 ++------------------------ abs/extra-testing/rrd_stats/rrd_stats.tgz | Bin 6603 -> 7454 bytes abs/extra-testing/rrd_stats/run_rrd.sh | 8 +++++ 4 files changed, 12 insertions(+), 39 deletions(-) create mode 100644 abs/extra-testing/rrd_stats/run_rrd.sh diff --git a/abs/extra-testing/rrd_stats/PKGBUILD b/abs/extra-testing/rrd_stats/PKGBUILD index 9e52ee4..40f0536 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=15 +pkgrel=16 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 e63b0eb..126e4f0 100644 --- a/abs/extra-testing/rrd_stats/rrd_stats.install +++ b/abs/extra-testing/rrd_stats/rrd_stats.install @@ -7,45 +7,10 @@ post_install() { fi ct=`crontab -l` - echo $ct | grep -q rrd_hddtemp.pl + echo $ct | grep -q run_rrd.sh 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 - - echo $ct | grep -q rrd_usage.pl - if [ $? != 0 ] - then - line="*/5 * * * * /usr/bin/rrd_usage.pl > /dev/null" + line="*/5 * * * * /usr/bin/run_rrd.sh > /dev/null" (crontab -l; echo "$line") | crontab - fi @@ -58,7 +23,7 @@ post_upgrade() { pre_remove() { - crontab -l | grep -v rrd_ | crontab - + crontab -l | grep -v run_rrd | crontab - PFIX="/data/srv/httpd/htdocs/rrd" if [ -e $PFIX/index.html.orig ] then diff --git a/abs/extra-testing/rrd_stats/rrd_stats.tgz b/abs/extra-testing/rrd_stats/rrd_stats.tgz index 7b28be3..c141ffa 100644 Binary files a/abs/extra-testing/rrd_stats/rrd_stats.tgz and b/abs/extra-testing/rrd_stats/rrd_stats.tgz differ diff --git a/abs/extra-testing/rrd_stats/run_rrd.sh b/abs/extra-testing/rrd_stats/run_rrd.sh new file mode 100644 index 0000000..19150a4 --- /dev/null +++ b/abs/extra-testing/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 -- cgit v0.12