137397Sbostic#!/bin/sh - 237397Sbostic# 3*62845Sbostic# @(#)monthly 8.1 (Berkeley) 06/09/93 437397Sbostic# 537397Sbostic 652151Sbostichost=`hostname` 737397Sbosticecho "Subject: $host monthly run output" 837397Sbostic 937397Sbostic# echo "" 1037397Sbostic# echo "Doing login accounting:" 1137397Sbostic# ac -p | sort -nr +1 1237397Sbostic 1337397Sbosticecho "" 1450052Sbosticecho -n "Rotating log files:" 1550737Sbosticcd /var/log 1654372Sbosticfor i in ftp.log kerberos.log lpd-errs wtmp; do 1750052Sbostic echo -n " $i" 1850052Sbostic if [ -f $i.5 ]; then mv -f $i.5 $i.6; fi 1950052Sbostic if [ -f $i.4 ]; then mv -f $i.4 $i.5; fi 2050052Sbostic if [ -f $i.3 ]; then mv -f $i.3 $i.4; fi 2150052Sbostic if [ -f $i.2 ]; then mv -f $i.2 $i.3; fi 2250052Sbostic if [ -f $i.1 ]; then mv -f $i.1 $i.2; fi 2350052Sbostic if [ -f $i.0 ]; then mv -f $i.0 $i.1; fi 2450052Sbostic if [ -f $i ]; then mv -f $i $i.0; fi 2550052Sbostic >$i 2650052Sbosticdone 2755275Sbostickill -1 `cat /var/run/syslog.pid` 2850051Sbosticecho "" 29