Asterisk logrotate

From My Notepad
Jump to: navigation, search
vi /etc/logrotate.d/asterisk
/var/log/asterisk/messages /var/log/asterisk/console /var/log/asterisk/full /var/log/asterisk/debug /var/log/asterisk/*log {
   missingok
   compress
   rotate 8
   weekly
   create 0640 root root
   postrotate
       /usr/sbin/asterisk -rx 'logger reload' > /dev/null 2> /dev/null
   endscript
}

/var/log/asterisk/cdr-csv/*csv {
  missingok
  compress
  rotate 5
  monthly
  create 0640 root root
}

/var/log/asterisk/cdr-custom/*csv {
  missingok
  compress
  rotate 5
  monthly
  create 0640 root root
}