changed /etc/[daily,weekly,monthly] to not rotate the logfiles by
"hand", changed /etc/crontab to call /usr/sbin/newsyslog every hour (the entry was there before - but we haven't had any newsyslog until today :-) and changed /etc/inetd.conf to also contain (commentet out) entries for rpc.rquotad and rpc.sprayd (taken from NetBSD)
This commit is contained in:
parent
160ce17a34
commit
7c1caee10f
@ -1,6 +1,6 @@
|
||||
# /etc/crontab - root's crontab for FreeBSD
|
||||
#
|
||||
# $Id: crontab,v 1.10 1995/05/27 01:55:21 ache Exp $
|
||||
# $Id: crontab,v 1.11 1995/11/19 17:21:09 ache Exp $
|
||||
# From: Id: crontab,v 1.6 1993/05/31 02:03:57 cgd Exp
|
||||
#
|
||||
SHELL=/bin/sh
|
||||
@ -12,7 +12,7 @@ HOME=/var/log
|
||||
*/5 * * * * root /usr/libexec/atrun
|
||||
#
|
||||
# rotate log files every hour, if necessary
|
||||
#0 * * * * root /usr/bin/newsyslog
|
||||
0 * * * * root /usr/sbin/newsyslog
|
||||
#
|
||||
# remove system messages older than 21 days
|
||||
#0 1 * * * daemon /usr/bin/msgs -c
|
||||
|
30
etc/daily
30
etc/daily
@ -34,19 +34,6 @@ if [ -f /etc/news.expire ]; then
|
||||
/etc/news.expire
|
||||
fi
|
||||
|
||||
if [ -d /var/account ] ; then
|
||||
echo ""
|
||||
echo "Purging accounting records:"
|
||||
cd /var/account
|
||||
if [ -f acct.2 ] ; then mv -f acct.2 acct.3 ; fi
|
||||
if [ -f acct.1 ] ; then mv -f acct.1 acct.2 ; fi
|
||||
if [ -f acct.0 ] ; then mv -f acct.0 acct.1 ; fi
|
||||
if [ -f acct ] ; then
|
||||
cp -pf acct acct.0
|
||||
sa -s > /dev/null
|
||||
fi
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Backup passwd and group files:"
|
||||
if [ ! -f $bak/master.passwd.bak ] ; then
|
||||
@ -90,23 +77,6 @@ echo ""
|
||||
echo "Running calendar:"
|
||||
calendar -a
|
||||
|
||||
echo ""
|
||||
echo "Rotating mail log:"
|
||||
cd /var/log
|
||||
rm -f maillog.7
|
||||
if [ -f maillog.6 ]; then mv -f maillog.6 maillog.7; fi
|
||||
if [ -f maillog.5 ]; then mv -f maillog.5 maillog.6; fi
|
||||
if [ -f maillog.4 ]; then mv -f maillog.4 maillog.5; fi
|
||||
if [ -f maillog.3 ]; then mv -f maillog.3 maillog.4; fi
|
||||
if [ -f maillog.2 ]; then mv -f maillog.2 maillog.3; fi
|
||||
if [ -f maillog.1 ]; then mv -f maillog.1 maillog.2; fi
|
||||
if [ -f maillog.0 ]; then mv -f maillog.0 maillog.1; fi
|
||||
mv -f maillog maillog.0
|
||||
cp /dev/null maillog
|
||||
chmod 644 maillog
|
||||
kill -1 `cat /var/run/syslog.pid`
|
||||
cd /
|
||||
|
||||
if [ -d /var/spool/uucp -a -f /etc/uuclean.daily ]; then
|
||||
echo ""
|
||||
echo "Cleaning up UUCP:"
|
||||
|
@ -42,6 +42,8 @@ rkinit stream tcp nowait root /usr/libexec/rkinitd rkinitd
|
||||
#rusersd/1-2 dgram rpc/udp wait root /usr/libexec/rpc.rusersd rpc.rusersd
|
||||
#walld/1 dgram rpc/udp wait root /usr/libexec/rpc.rwalld rpc.rwalld
|
||||
#pcnfsd/1-2 dgram rpc/udp wait root /usr/libexec/rpc.pcnfsd rpc.pcnfsd
|
||||
#rquotad/1 dgram rpc/udp wait root /usr/libexec/rpc.rquotad rpc.rquotad
|
||||
#sprayd/1 dgram rpc/udp wait root /usr/libexec/rpc.sprayd rpc.sprayd
|
||||
#
|
||||
# example entry for the pop3 server
|
||||
#pop3 stream tcp nowait root /usr/local/libexec/popper popper
|
||||
|
16
etc/monthly
16
etc/monthly
@ -10,19 +10,3 @@ 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 ""
|
||||
|
22
etc/weekly
22
etc/weekly
@ -41,28 +41,6 @@ if [ -f /usr/libexec/uucp/clean.weekly ]; then
|
||||
echo "Cleaning up UUCP:"
|
||||
echo /usr/libexec/uucp/clean.weekly | su daemon
|
||||
fi
|
||||
echo ""
|
||||
|
||||
echo "Rotating messages:"
|
||||
cd /var/log
|
||||
if [ -f messages.2 ]; then mv -f messages.2 messages.3; fi
|
||||
if [ -f messages.1 ]; then mv -f messages.1 messages.2; fi
|
||||
if [ -f messages.0 ]; then mv -f messages.0 messages.1; fi
|
||||
mv -f messages messages.0
|
||||
cp /dev/null messages
|
||||
chmod 644 messages
|
||||
kill -1 `cat /var/run/syslog.pid`
|
||||
cd /
|
||||
|
||||
echo "Rotating cron log:"
|
||||
cd /var/cron
|
||||
if [ -f log.2 ]; then mv -f log.2 log.3; fi
|
||||
if [ -f log.1 ]; then mv -f log.1 log.2; fi
|
||||
if [ -f log.0 ]; then mv -f log.0 log.1; fi
|
||||
mv -f log log.0
|
||||
cp /dev/null log
|
||||
chmod 600 log
|
||||
cd /
|
||||
|
||||
echo ""
|
||||
echo "Rebuilding locate database:"
|
||||
|
Loading…
Reference in New Issue
Block a user