#!/bin/sh POOLPAGE=/var/www/time.mattrude.com/status TEMPLATESDIR=/var/www/time.mattrude.com/scripts/templates mkdir -p $POOLPAGE cd $POOLPAGE cat /dev/null > out.template echo "

Time Server Hosts

" >> out.template for X in `cat /var/www/time.mattrude.com/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 > $POOLPAGE/index.html # Build the indexs for the hosts. for X in `cat /var/www/time.mattrude.com/rrd/list-of-systems` do mkdir -p $POOLPAGE/$X cat /dev/null > out.template sed -e s/POOL/$X/g $TEMPLATESDIR/template-host >> out.template sync cat out.template $TEMPLATESDIR/index-tail > $X/index.html rm -f out.template for a in clients offset jitter frequency sjit cjit wander disp do mkdir -p $POOLPAGE/$X/$a cat /dev/null > out.template sed -e s/POOL/$X/g $TEMPLATESDIR/template-by-type |sed -e s/TYPE/$a/g >> out.template sync cat out.template $TEMPLATESDIR/index-tail > $X/$a/index.html rm -f out.template done done chown -R apache:apache $POOLPAGE