logrotate config file

2007-12-24 21:54:00

Can anyone enlighten me on the syntax of the logrotate config file?

I have searched the archives and elsewhere and haven't figured this
out. I saw one reference to the errors keyword not being supported; I
removed that but still don't have anything working; just errors and a
coredump :-(

Below is my /etc/logrotate.conf:

{prodweb:root}# cat /etc/logrotate.conf
weekly
rotate 5
create
compress

/var/apache/logs/* {
rotate 5
weekly
compress
}

When I run logrotate, I get:

{prodweb:root}# logrotate -v /etc/logrotate.conf
reading config file /etc/logrotate.conf
error: /etc/logrotate.conf:1 unexpected text
error: /etc/logrotate.conf:2 unexpected text
reading config info for /var/apache/logs/* {
error: /etc/logrotate.conf:3 unexpected text
error: /etc/logrotate.conf:4 unexpected text
error: /etc/logrotate.conf:5 lines must begin with a keyword or a
filename (possibly in double quotes)
error: /etc/logrotate.conf:6 lines must begin with a keyword or a
filename (possibly in double quotes)
error: /etc/logrotate.conf:7 lines must begin with a keyword or a
filename (possibly in double quotes)
Segmentation Fault(coredump)

What is the unexpected text? From the man page, these should be ok. If
anyone can help, I would appreciate it. I thought this would be quite
easy!

Thanks,

Gene

--
Gene Matthews
Matthews Midrange Consulting, Inc.
(678) 923-8327
(877) 882-6291 (toll free)
http://mmc-inc.com

Comments

Got something to say?

You must be logged in to post a comment.