Asterisk Logrotate

From KlavoWiki
Revision as of 04:59, 7 December 2009 by David (Sọ̀rọ̀ | contribs) (Created page with 'If you would like to do a logrotate on your Asterisk files create the following file:<br> '''/etc/logrotate.d/asterisk''' <pre> /var/log/asterisk/messages /var/log/asterisk/*log …')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

If you would like to do a logrotate on your Asterisk files create the following file:
/etc/logrotate.d/asterisk

/var/log/asterisk/messages /var/log/asterisk/*log {
   missingok
   rotate 5
   weekly
   create 0640 root root
   postrotate
       /usr/sbin/asterisk -rx 'logger reload' > /dev/null 2> /dev/null
   endscript
}