Problem with tinc.log and logrotate.

Ramses II ramses.sevilla at gmail.com
Fri Apr 26 13:05:10 CEST 2013


Hi Guus,

-----Mensaje original-----
De: tinc-bounces at tinc-vpn.org [mailto:tinc-bounces at tinc-vpn.org] En nombre
de Guus Sliepen
Enviado el: viernes, 26 de abril de 2013 12:43
Para: tinc at tinc-vpn.org
Asunto: Re: Problem with tinc.log and logrotate.

On Fri, Apr 26, 2013 at 12:21:25PM +0200, Ramses II wrote:

> Well, because I want to have a log file by day, I have created a 
> logrotate file (/etc/logrotate.d/tinc) that contains the following lines:
> 
> -----------------------------------------
> /var/log/tinc.log {
>   missingok
>   rotate 7
>   daily
>   create 0640 root root

Add the following:

  postrotate
    kill -HUP `cat /var/run/tinc.pid`
  endscript

> }
> -----------------------------------------

Now I have the following in logrotate file (tinc):

-----------------------------------------
/var/log/tinc.log {
  missingok
  rotate 7
  daily
  create 0640 root root
  postrotate
    kill -HUP `cat /var/run/tinc.pid`
  endscript
}
-----------------------------------------

I run "logrotate -f /etc/logrotate.d/tinc" and the same situation, creates
the new "tinc.log" but it goes report in the "tinc.log.4" file:

----------- tinc.log.4 ------------------
.
.
1366973321 tinc[14882]: Got HUP signal
.
.
-----------------------------------------

Another idea?


Best regards,

Ramsés



More information about the tinc mailing list