1*31714Sbostic#!/bin/sh - 2*31714Sbostic# 3*31714Sbostic# @(#)weekly 5.1 (Berkeley) 06/30/87 4*31714Sbostic# 5*31714Sbostichost=`hostname | sed -e 's/\..*//'` 6*31714Sbosticecho "Subject: $host weekly run output" 7*31714Sbostic 8*31714Sbostic#echo "" 9*31714Sbostic#echo "Removing old .o files:" 10*31714Sbostic#find /usr/src -name '*.o' -atime +21 -print -a -exec rm -f {} \; 11*31714Sbostic 12*31714Sbosticif [ -f /usr/lib/uucp/clean.weekly ]; then 13*31714Sbostic echo "" 14*31714Sbostic echo "Cleaning up UUCP:" 15*31714Sbostic echo /usr/lib/uucp/clean.weekly | su daemon 16*31714Sbosticfi 17*31714Sbostic 18*31714Sbosticecho "" 19*31714Sbosticecho "Rotating messages:" 20*31714Sbosticcd /usr/adm 21*31714Sbosticif [ -f messages.2 ]; then mv -f messages.2 messages.3; fi 22*31714Sbosticif [ -f messages.1 ]; then mv -f messages.1 messages.2; fi 23*31714Sbosticif [ -f messages.0 ]; then mv -f messages.0 messages.1; fi 24*31714Sbosticmv -f messages messages.0 25*31714Sbosticcp /dev/null messages 26*31714Sbosticchmod 644 messages 27*31714Sbostickill -1 `cat /etc/syslog.pid` 28*31714Sbosticcd / 29*31714Sbostic 30*31714Sbosticecho "" 31*31714Sbosticecho "Rebuilding catman:" 32*31714Sbostic/etc/catman 33*31714Sbostic 34*31714Sbostic# not until su can run a uid with no shell 35*31714Sbostic#echo "" 36*31714Sbostic#echo "Rebuilding find database:" 37*31714Sbostic#su nobody << EOF 38*31714Sbostic# /usr/lib/find/updatedb 39*31714Sbostic#EOF 40