#!/bin/sh 

#=======================================================
#
# These four definitions specify the binary paths for
# nova and clyde and the writable document and log root
# for the web server.
#
#=======================================================
#
clyde_bin=/srvtools/bin/stats
nova_bin=/project/npac_srvtools/bin/stats
docroot=/servers/npac_http/html
#logroot=/e/p/C067
logroot=/e/s/log
#tmp=/var/tmp                       NOT USED HERE!

echo '['`date`'] Starting: run.sh'

#   Run script on clyde to build a statistics file wwwstat.html
#
#    $clyde_bin/wwwstat.sh

#
#   Run a script on nova to build the graphics.
#
#  rsh nova.npac.syr.edu $nova_bin/gwstat.sh
/usr/local/bin/ssh  nova.npac.syr.edu $nova_bin/gwstat.sh


#
#   Run a script to update the monthly graphs for each year.
#   only really need to do this once each month.
#
if (test `date +%d` = "01") then
  echo "1st of the month"
  $clyde_bin/run_month.sh
fi

#
#   Finish
#
echo '['`date`'] Finished: run.sh'
exit
