Forum Moderators: phranque
/var/log/httpd/*log {
rotate 150
weekly
missingok
notifempty
sharedscripts
compress
prerotate
grep -E "(cmd¦root)\.exe" /var/log/httpd/access_log¦cut -d " " -f 1,4¦tac¦sort -u -k 1,1 >> /var/log/usage/nimda.txt
grep "default.ida" /var/log/httpd/access_log¦cut -d " " -f 1,4¦tac¦sort -u -k 1,1 >> /var/log/usage/codered.txt
grep "CONNECT" /var/log/httpd/access_log¦cut -d " " -f 1,4¦tac¦sort -u -k 1,1 >> /var/log/usage/proxies.txt
endscript
postrotate
apachectl graceful
endscript
}
as you see you can add anything you want just before logrotate.
if you still want to add a script to cron.daily see /etc/crontab
(of course the above are for MY system - your linux may be configured in differrent way)