[Asterisk-Users] Re: Logrotate

Tony Mountifield tony at softins.clara.co.uk
Thu Jun 30 09:20:33 MST 2005


In article <04e201c57d82$95edb050$600fa8c0 at hiltonpc>,
Hilton Williams <hilton at datatex.co.za> wrote:
> 
> Asterisk at Home uses the following file:
> 
> /var/log/asterisk/*log {
>    missingok
>    rotate 5
>    weekly
>    create 0640 asterisk asterisk
>    postrotate
>        /usr/sbin/asterisk -rx 'logger reload' > /dev/null 2> /dev/null
>    endscript
> }
> /var/log/asterisk/full {
>    missingok
>    rotate 5
>    daily
>    create 0640 asterisk asterisk
>    postrotate
>        /usr/sbin/asterisk -rx 'logger reload' > /dev/null 2> /dev/null
>    endscript
> }

The above doesn't catch /var/log/asterisk/messages, which should be
added to the first entry.

Also, both entries should also have the "sharedscripts" directive,
so that "logger reload" will only be called once after all the rotates,
instead of separately for each file.

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