xref: /original-bsd/etc/monthly (revision 02e832b2)
1#!/bin/sh -
2#
3#	@(#)monthly	5.9 (Berkeley) 07/15/92
4#
5
6host=`hostname`
7echo "Subject: $host monthly run output"
8
9# echo ""
10# echo "Doing login accounting:"
11# ac -p | sort -nr +1
12
13echo ""
14echo -n "Rotating log files:"
15cd /var/log
16for i in ftp.log 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
27kill -1 `cat /var/run/syslog.pid`
28echo ""
29