On Tue, Mar 06, 2001 at 08:18:29AM -0500, Duncan Hill a ecrit:
> I'm playing with logrotate, and have run into something.  Namely, the
> fact that log rotate calls the older logs .1, .2, .3 etc.  Is it
> possible, within logrotate, to specify that these files get a date
> instead?  Or, can Apache write log files with a date in the name
> dynamically?

This is how I do it:

/web/logs/acces.skip.tm.fr {
daily
postrotate
        /usr/bin/killall -HUP httpd 2> /dev/null || true
        DAY=$(date -d 'yesterday' '+%d')
        mv /web/logs/acces.skip.tm.fr.1 /web/logs/acces.skip.tm.fr.$DAY
endscript
}

Emmanuel



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to