#! /bin/csh
#
#	Copyright 1990 Sony Corp.
#	Copyright 1990 Performance Systems International Inc.
#	Copyright 1988,1989 NYSERNet Inc.
#	All Rights Reserved.
#
# the following two lines help the process know where it is
# and where it is going in the file system
# the first line must be hardcoded
set ROOT=/export/DIST/snmp/report
if (-e $ROOT/config/report-env) then
  source $ROOT/config/report-env
else
  exit(1)
endif
chdir $ROOT

set weekdaynow = `date +%w`
set monthnow = `date +%m`
set date = `date +%m%d%y`
#
# do daily report immediately
#
chdir $ROOT/daily/bin
dailymain $date
#
# check to see if it is time to do weekly stuff
#
if ($?DOWEEKLY) then
  if ($GENWEEKLY == $weekdaynow) then
    chdir $ROOT/weekly/bin
    weeklymain $date
  endif
endif
