On Monday 10 May 2010 09:46:11 Helmut Jarausch wrote:
> Hi,
> I have the following file as /etc/logrotate.d/denyhosts
> /var/log/denyhosts {
> missingok
> notifempty
> create 0640 root root
> sharedscripts
> prerotate
> /etc/init.d/denyhosts stop
> endscript
> postrotate
> /etc/init.d/denyhosts start
> endscript
> }
>
> But this causes errors
> reading config info for /var/log/denyhosts
> error: denyhosts:1 lines must begin with a keyword or a filename (possibly
> in double quotes) error: denyhosts:2 unexpected text
> error: denyhosts:3 unexpected text
> error: denyhosts:4 unexpected text
> error: denyhosts:5 unexpected text
> error: denyhosts:prerotate or postrotate without endscript
That file is correct, so I'd first check the file that is read *before* that
one, looking for things like missing end braces etc etc
logrotate -d /etc/logrotate.conf will show the read order
--
alan dot mckinnon at gmail dot com