Logrotate?

I was looking around, and noticed there wasn’t an entry for asterisk in /etc/logrotate.d/. Are logs rotated, and if so, how, and where do I configure it? Using FPBX 2.9, asterisk 1.8.

Make a file called “asterisk” in /etc/logrotate.d with something like this:

/var/log/asterisk/full /var/log/asterisk/*log {
        missingok
        rotate 4
        weekly
        create 0640 asterisk asterisk
        postrotate
                /usr/sbin/asterisk -rx "logger reload" > /dev/null 2>/dev/null
        endscript
}

Bill

I have deployed 3 FreePBX distro installations in the last month and all have the following in /etc/logrotate.d/asterisk.

/var/log/asterisk/queue_log {
daily
missingok
rotate 30
notifempty
sharedscripts
create 0640 asterisk asterisk
}

/var/spool/mail/asterisk /var/spool/mail/root /var/log/asterisk/messages /var/log/asterisk/event_log /var/log/asterisk/full /var/log/asterisk/dtmf {
daily
missingok
rotate 7
notifempty
sharedscripts
create 0640 asterisk asterisk
postrotate
/usr/sbin/asterisk -rx ‘logger reload’ > /dev/null 2> /dev/null
endscript
}