#!/bin/sh # # driver for nightly mass-checks on the zone. run from cron as: # 10 9,10 * * * /home/automc-stable/svn/spamassassin/build/automc/run_nightly > /var/www/buildbot.spamassassin.org/bbmass/stable_nightly_masschecks.txt 2>&1 # # details: http://wiki.apache.org/spamassassin/NightlyMassCheck # add usernames who you want to do nightlies for here: nightly_users=" zmi doc jm " # and where the $HOMEs are: nightly_trees="/home/bbmass-stable/mc-nightly" # ensure we're running after 0900 UTC; complex due to daylight savings. # If we're running in the 08xx UTC hour-space, sleep for 1 hour; when # we wake, we will be in 09xx. ( TIME="%e,%U,%S"; TZ=UTC; export TIME TZ if date | egrep '^... ... .. 08:'; then date; echo "sleeping for 1 hour to compensate for DST" sleep 3600 ; date fi ) # create the targets files: /home/automc-stable/svn/spamassassin/build/automc/populate_cor_nightly echo "run_nightly starting at" ; date # and run each mass-check using "corpus-nightly" for user in $nightly_users ; do dir="$nightly_trees/$user" echo "Starting corpus-nightly for $user ($dir)" ( HOME=$dir # oh Solaris, you really suck PERL=/local/perl586/bin/perl PATH=$PATH:/usr/sfw/bin:/opt/sfw/bin:/opt/SUNWspro/bin:/usr/X/bin:/usr/ucb:/usr/sbin:/usr/ccs/bin:/opt/subversion-1.1.4/bin:/usr/apache2/bin:/local/bin export HOME PERL PATH # use bash to work around Solaris breakage nice bash $dir/svn/masses/rule-qa/corpus-nightly ) 2>&1 | tee "$dir/corpus-nightly.log" done