#!/bin/sh

# creation history
# date          author  purpose
# 02/13/97 	T.Boss  creation
# 03/07/97	T.Boss	added datatools log to rotation strategy
# 03/12/97	T.Boss	changed to have 1-7 represent generations, not
#			days of the week.  More intuitive 
# 04/04/97	T.Boss	added restart of swatch program on rotated log b/c
#			cat /dev/null interupts swatch montior
# 04/08/97	T.Boss	removed swatch stuff..will restart in seperate script
# 7/8/97	T.Boss	ported to dali from max; changed file locations, etc

LOGLIST="/u/datatools/0/log/datatools.log \
         /u/sybase11/install/prod11_backup.errorlog"

#DOW=`date +%w`

for LOGFILE in $LOGLIST
do
   #echo $LOGFILE
   rm -rf $LOGFILE.7
   mv $LOGFILE.6 $LOGFILE.7
   mv $LOGFILE.5 $LOGFILE.6
   mv $LOGFILE.4 $LOGFILE.5
   mv $LOGFILE.3 $LOGFILE.4
   mv $LOGFILE.2 $LOGFILE.3
   mv $LOGFILE.1 $LOGFILE.2
   cp $LOGFILE $LOGFILE.1
   cat /dev/null > $LOGFILE
done