#!/bin/bash . /etc/profile cd /usr/local/spamassassin/automc/svn/rule-qa/automc ; . config date=date ; [ -x /opt/sfw/bin/gdate ] && date=gdate egrep=egrep ; [ -x /usr/sfw/bin/gegrep ] && egrep=gegrep # ensure we're running on or after 0830 UTC, because cron can't; it's # in a different timezone, and we have daylight savings to contend with if TZ=UTC $date | $egrep -q '^... ... .. (03|04|05|06|07|09|10|11|12|13):'; then exit fi mv ${MCTMP%/*}/LOG.before ${MCTMP%/*}/LOG.before.old exec > ${MCTMP%/*}/LOG.before 2>&1 set -x PATH=$PATH:/usr/local/bin rm -rf $MCTMP; mkdir -p $MCTMP # and discard the old logfile [[ -e ${MCTMP%/*}/LOG.after ]] && mv ${MCTMP%/*}/LOG.after ${MCTMP%/*}/LOG.after.old