Gentoo Archives: gentoo-user

From: Dale <dalek1967@×××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] logrotate desn't create new empty files
Date: Fri, 03 Aug 2007 14:46:45
Message-Id: 46B33E98.3060702@bellsouth.net
In Reply to: [gentoo-user] logrotate desn't create new empty files by Jakob
1 Jakob wrote:
2 > Hi all,
3 >
4 > I'm running logrotate on my homeserver and the logs are rotated
5 > correctly but after rotating it should create new empty log files and
6 > that doesnt work.
7 >
8 > here are my confs:
9 > /etc/logrotate.conf:
10 > # $Header: /var/cvsroot/gentoo-x86/app-admin/logrotate/files/logrotate.conf,v
11 > 1.2 2004/07/18 01:58:24 dragonheart Exp $
12 > #
13 > # Logrotate default configuration file for Gentoo Linux
14 > #
15 > # See "man logrotate" for details
16 >
17 > # rotate log files weekly
18 > weekly
19 > #daily
20 >
21 > # keep 4 weeks worth of backlogs
22 > rotate 10
23 >
24 > # create new (empty) log files after rotating old ones
25 > create
26 >
27 > # uncomment this if you want your log files compressed
28 > compress
29 >
30 > # packages can drop log rotation information into this directory
31 > include /etc/logrotate.d
32 >
33 > notifempty
34 > nomail
35 > noolddir
36 >
37 > # no packages own lastlog or wtmp -- we'll rotate them here
38 > /var/log/wtmp {
39 > monthly
40 > create 0664 root utmp
41 > rotate 1
42 > }
43 >
44 > # system-specific logs may be also be configured here.
45 >
46 > and /etc/logrotate.d/syslog-ng:
47 > # $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.logrotate,v
48 > 1.2 2004/07/18 02:25:02 dragonheart Exp $
49 > #
50 > # Syslog-ng logrotate snippet for Gentoo Linux
51 > # contributed by Michael Sterrett
52 > #
53 >
54 > /var/log/messages {
55 > dateext
56 > olddir /var/log/
57 > copy
58 > create 0600 root root
59 > size 5000k
60 > sharedscripts
61 > postrotate
62 > /etc/init.d/syslog-ng reload > /dev/null 2>&1 || true
63 > endscript
64 > }
65 >
66 > I thought create will do this but it doesn't work and my logs getting
67 > bigger and bigger.
68 > What did I do wron?
69 >
70 > Regards
71 >
72 > Jakob
73 >
74
75 The command touch should work. Not sure on the permissions though.
76
77 Dale
78
79 :-) :-)
80 --
81 gentoo-user@g.o mailing list