[Asterisk-Users] Re: Logger rotate & master.csv

Tony Mountifield tony at softins.clara.co.uk
Tue May 23 02:08:24 MST 2006


In article <1148374219.27846.3.camel at guru.puzzled.xs4all.nl>,
Patrick <asterisk at puzzled.xs4all.nl> wrote:
> On Tue, 2006-05-23 at 10:10 +0200, Asterisk wrote:
> > Hi guys,
> > 
> >  
> > 
> > I have noticed that 'logger rotate' command only rotates log files in
> > the /var/log/asterisk directory, but not in the subdirectories. How
> > could I rotate my /var/log/asterisk/cdr-custom/Master.csv log file?
> 
> I use this script which lives in /etc/logrotate.d/ on my CentOS 4.3 box:
> 
> /var/log/asterisk/messages /var/log/asterisk/event_log /var/log/asterisk/queue_log
> /var/log/asterisk/h323_log /var/log/asterisk/cdr-custom/Master.csv {
>     missingok
>     notifempty
>     create 0640 asterisk asterisk
>     sharedscripts
>     postrotate
> 	/usr/sbin/asterisk -rx 'logger rotate' >/dev/null 2>/dev/null || true
>     endscript
> }

If logrotate is doing the rotation of the files, then I think you only
need asterisk to do "logger reload", not "logger rotate".

Cheers
Tony
-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org



More information about the asterisk-users mailing list