386BSD 0.1 development
authorWilliam F. Jolitz <wjolitz@soda.berkeley.edu>
Mon, 17 Jun 1991 15:13:52 +0000 (07:13 -0800)
committerWilliam F. Jolitz <wjolitz@soda.berkeley.edu>
Mon, 17 Jun 1991 15:13:52 +0000 (07:13 -0800)
Work on file usr/othersrc/etc/monthly

Co-Authored-By: Lynne Greer Jolitz <ljolitz@cardio.ucsf.edu>
Synthesized-from: 386BSD-0.1

usr/othersrc/etc/monthly [new file with mode: 0644]

diff --git a/usr/othersrc/etc/monthly b/usr/othersrc/etc/monthly
new file mode 100644 (file)
index 0000000..e48ddd7
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/sh -
+#
+#      @(#)monthly     5.5 (Berkeley) 6/17/91
+#
+
+host=`hostname -s`
+echo "Subject: $host monthly run output"
+
+# echo ""
+# echo "Doing login accounting:"
+# ac -p | sort -nr +1
+
+echo ""
+echo -n "Rotating log files:"
+#cd /var/log
+for i in kerberos.log lpd-errs wtmp; do
+       echo -n " $i"
+       if [ -f $i.5 ]; then mv -f $i.5 $i.6; fi
+       if [ -f $i.4 ]; then mv -f $i.4 $i.5; fi
+       if [ -f $i.3 ]; then mv -f $i.3 $i.4; fi
+       if [ -f $i.2 ]; then mv -f $i.2 $i.3; fi
+       if [ -f $i.1 ]; then mv -f $i.1 $i.2; fi
+       if [ -f $i.0 ]; then mv -f $i.0 $i.1; fi
+       if [ -f $i ]; then mv -f $i $i.0; fi
+       >$i
+done
+echo ""