From ec9dbe5fa9e188ecada18dafdb96de87a5b9a394 Mon Sep 17 00:00:00 2001 From: Matt Rude Date: Sat, 7 May 2011 21:16:20 -0500 Subject: moving the index names --- scripts/do-build-index | 21 +++++++++++++++++++++ scripts/do-mung-newhost | 16 ---------------- scripts/do-newntpstat | 5 +++++ 3 files changed, 26 insertions(+), 16 deletions(-) create mode 100755 scripts/do-build-index delete mode 100755 scripts/do-mung-newhost (limited to 'scripts') diff --git a/scripts/do-build-index b/scripts/do-build-index new file mode 100755 index 0000000..b868fe6 --- /dev/null +++ b/scripts/do-build-index @@ -0,0 +1,21 @@ +#!/bin/sh + +POOLPAGE=/usr/local/www/data/status +TEMPLATESDIR=/usr/local/www/data/scripts/templates + +cd $POOLPAGE +cat /dev/null > out.template + +for X in `cat /usr/local/www/data/rrd/list-of-systems` +do + sed -e s/POOL/$X/g $TEMPLATESDIR/template >> out.template +done + +for X in `cat /usr/local/www/data/rrd/list-of-systems` +do + sed -e s/POOL/$X/g $TEMPLATESDIR/template2 >> out.template +done + +sync +cat $TEMPLATESDIR/index-head out.template $TEMPLATESDIR/index-tail > index.html +rm -f out.template diff --git a/scripts/do-mung-newhost b/scripts/do-mung-newhost deleted file mode 100755 index b0219b9..0000000 --- a/scripts/do-mung-newhost +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -POOLPAGE=/usr/local/www/data/status -TEMPLATESDIR=/usr/local/www/data/scripts/templates - -cd $POOLPAGE -cat /dev/null > out.template - -for X in `cat /usr/local/www/data/rrd/list-of-systems` -do - sed -e s/POOL/$X/g $TEMPLATESDIR/template >> out.template -done - -sync -cat $TEMPLATESDIR/index-head out.template $TEMPLATESDIR/index-tail > index.html -rm -f out.template diff --git a/scripts/do-newntpstat b/scripts/do-newntpstat index 8f4e1d7..bae8b37 100755 --- a/scripts/do-newntpstat +++ b/scripts/do-newntpstat @@ -1,5 +1,6 @@ #! /bin/sh +mkdir -p ../rrd/ case "$1" in "") echo "Missing system name."; exit 1 esac @@ -19,3 +20,7 @@ ${RRD_BIN}/rrdtool create $1.rrd \ RRA:LAST:0.5:12:2304 #end + +mv $1.rrd ../rrd/ +echo $1 >> ../rrd/list-of-systems +./do-build-index -- cgit v1.2.3-59-ga6da