logroate not working in 2.5.11-20
The bug found in the 2.5.11-20 version..
BuG= Logrotate not working because /etc/logrotate.d/clamd-custom need changes.
/var/log/clamav/clamd.log {
compress
daily
dateext
maxage 700
rotate 50
missingok
notifempty
size +50M
==>**olddir /var/log/clamd/OLD/** <==
sharedscripts
postrotate
/etc/init.d/sendmail stop
/etc/init.d/sendmail-rx stop
/etc/init.d/amavis stop
/etc/init.d/clamd stop
sleep 30
killall -9 sendmail
killall -9 sendmail-rx
killall -9 amavis
killall -9 clamd
sleep 5
/etc/init.d/clamd start
/etc/init.d/amavis start
/etc/init.d/sendmail start
/etc/init.d/sendmail-rx start
endscript
}
2) IN above ==> define line path is no giving incorect. Because
The above clamd directory is not avalable in /var/log/. The actule
Path is require /var/log/clamv/OLD. logrotate will rotate in OLD directory in same path where
the logs are going.
We need to follow the following steps to fix the bugs...
1) Chane the following line in /etc/logrotate.d/clamd-custom
olddir /var/log/clamd/OLD
Set as... follow.
olddir /var/log/clamv/OLD
2) #cd /var/log/clamv
3) #mkdir OLD
4) check the file logrotate in
/etc/cron.hourly/
5) restart the syslog...
6) #/etc/cron.hourly/logrotate ( run first time it manualy... and check the log rotate is
working properly. )
7) If some .gz files created in /var/adm/log/OLD then logrotate is working properly.
- Login to post comments
- Printer-friendly version
- Send to friend