1 |
On Monday 10 May 2010 09:46:11 Helmut Jarausch wrote: |
2 |
> Hi, |
3 |
> I have the following file as /etc/logrotate.d/denyhosts |
4 |
> /var/log/denyhosts { |
5 |
> missingok |
6 |
> notifempty |
7 |
> create 0640 root root |
8 |
> sharedscripts |
9 |
> prerotate |
10 |
> /etc/init.d/denyhosts stop |
11 |
> endscript |
12 |
> postrotate |
13 |
> /etc/init.d/denyhosts start |
14 |
> endscript |
15 |
> } |
16 |
> |
17 |
> But this causes errors |
18 |
> reading config info for /var/log/denyhosts |
19 |
> error: denyhosts:1 lines must begin with a keyword or a filename (possibly |
20 |
> in double quotes) error: denyhosts:2 unexpected text |
21 |
> error: denyhosts:3 unexpected text |
22 |
> error: denyhosts:4 unexpected text |
23 |
> error: denyhosts:5 unexpected text |
24 |
> error: denyhosts:prerotate or postrotate without endscript |
25 |
|
26 |
|
27 |
That file is correct, so I'd first check the file that is read *before* that |
28 |
one, looking for things like missing end braces etc etc |
29 |
|
30 |
logrotate -d /etc/logrotate.conf will show the read order |
31 |
|
32 |
|
33 |
-- |
34 |
alan dot mckinnon at gmail dot com |