maillogの世代管理を、デフォルトの4週間から1年(54週)に延ばす。
# cd /etc/logrotate.d/
# cp syslog mail
# vi mail
/var/log/maillog {
rotate 54
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
endscript
}
# vi syslog
/var/log/messages /var/log/secure /var/log/spooler /var/log/boot.log /var/log/cron {
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
endscript
}
コメント
コメントを投稿