[Nix-dev] logrotate
Mathijs Kwik
mathijs at bluescreen303.nl
Thu Feb 16 18:32:52 CET 2012
Thanks,
I don't run a httpd though, so I took that out.
The rest is fine for a default I think.
2012/2/15 Lluís Batlle i Rossell <viric at viric.name>:
> On Wed, Feb 15, 2012 at 07:46:47AM +0100, Mathijs Kwik wrote:
>> I enabled services.logrotate, but I found it comes with an empty config.
>> Can someone please share his config? I'm lazy :)
>>
>> Perhaps we can come up with a nice default config that's suitable for
>> most people?
>
> Ehm. I'm guilty I think. :)
>
> Here is mine, for a /var/log on tmpfs of 32MB:
>
> logrotate = {
> enable = true;
> config = ''
> compress
>
> /var/log/messages /var/log/warn /var/log/mail {
> rotate 3
> size 500k
> sharedscripts
> postrotate
> source /etc/bashrc
> kill -HUP `cat /var/run/syslogd.pid`
> endscript
> }
>
> /var/log/httpd/* {
> rotate 3
> size 500k
> sharedscripts
> postrotate
> source /etc/bashrc
> kill -HUP `cat /var/run/httpd/httpd.pid`
> endscript
> }
> '';
> };
>
> If that's fine for a default config, it's easy to commit.
>
> Regards,
> Lluís
More information about the nix-dev
mailing list