15445a329Sbostic#!/bin/sh - 25445a329Sbostic# 3*8c19929fSbostic# @(#)monthly 8.1 (Berkeley) 06/09/93 45445a329Sbostic# 55445a329Sbostic 607f63ef9Sbostichost=`hostname` 75445a329Sbosticecho "Subject: $host monthly run output" 85445a329Sbostic 95445a329Sbostic# echo "" 105445a329Sbostic# echo "Doing login accounting:" 115445a329Sbostic# ac -p | sort -nr +1 125445a329Sbostic 135445a329Sbosticecho "" 1407a4d69cSbosticecho -n "Rotating log files:" 153003708bSbosticcd /var/log 16f3bbea4eSbosticfor i in ftp.log kerberos.log lpd-errs wtmp; do 1707a4d69cSbostic echo -n " $i" 1807a4d69cSbostic if [ -f $i.5 ]; then mv -f $i.5 $i.6; fi 1907a4d69cSbostic if [ -f $i.4 ]; then mv -f $i.4 $i.5; fi 2007a4d69cSbostic if [ -f $i.3 ]; then mv -f $i.3 $i.4; fi 2107a4d69cSbostic if [ -f $i.2 ]; then mv -f $i.2 $i.3; fi 2207a4d69cSbostic if [ -f $i.1 ]; then mv -f $i.1 $i.2; fi 2307a4d69cSbostic if [ -f $i.0 ]; then mv -f $i.0 $i.1; fi 2407a4d69cSbostic if [ -f $i ]; then mv -f $i $i.0; fi 2507a4d69cSbostic >$i 2607a4d69cSbosticdone 27b636433dSbostickill -1 `cat /var/run/syslog.pid` 289dcb396fSbosticecho "" 29