[Asterisk-Users] logrotate and logger reload

Bob Knight bk at minusw.com
Fri Jun 9 12:28:11 MST 2006


I have one system that went totally crazy on me.
It went into an infinite loop rotating * message and log files.
 From the asterisk console I kept seeing the message about re-loading
logger.conf over and over and it just kept creating more and more files.
I baby set many different * boxes all running the same script without 
this problem.
Here is my cron script:

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

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

-- 
Bob Knight
[-w] the work option
bk at minusw.com
925-449-9163




More information about the asterisk-users mailing list