fix memory leak introduced in -r7.43; asethetic cleanups
[unix-history] / usr / src / etc / monthly
CommitLineData
31a38bef
KB
1#!/bin/sh -
2#
32e3fbdd 3# @(#)monthly 5.7 (Berkeley) %G%
31a38bef
KB
4#
5
32e3fbdd 6host=`hostname`
31a38bef
KB
7echo "Subject: $host monthly run output"
8
9# echo ""
10# echo "Doing login accounting:"
11# ac -p | sort -nr +1
12
13echo ""
826361bd 14echo -n "Rotating log files:"
a5b5a364 15cd /var/log
826361bd
KB
16for i in kerberos.log lpd-errs wtmp; do
17 echo -n " $i"
18 if [ -f $i.5 ]; then mv -f $i.5 $i.6; fi
19 if [ -f $i.4 ]; then mv -f $i.4 $i.5; fi
20 if [ -f $i.3 ]; then mv -f $i.3 $i.4; fi
21 if [ -f $i.2 ]; then mv -f $i.2 $i.3; fi
22 if [ -f $i.1 ]; then mv -f $i.1 $i.2; fi
23 if [ -f $i.0 ]; then mv -f $i.0 $i.1; fi
24 if [ -f $i ]; then mv -f $i $i.0; fi
25 >$i
26done
fa2453d6 27echo ""