HOWTO Setup Logrotate

From Research
Revision as of 19:41, 22 January 2008 by Gordp (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Biggest headache is that /var/log/auth.log and vsftpd.log do not rotate :-(

Fix this by creating /etc/logrotate.d/vsftpd:

/var/log/vsftpd.log {
    weekly
    sharedscripts
    missingok
    notifempty
    postrotate
    /etc/init.d/vsftpd restart > /dev/null 2>&1 || true
    endscript
}

Edit the portion of /etc/logrotate.d/syslog-ng to look like this:

# Authentication
/var/log/auth.log {
    weekly
    sharedscripts
    missingok
    postrotate
   /etc/init.d/syslog-ng reload > /dev/null 2>&1 || true
   endscript
}