Dear Thorsten and Julien,

I refer to bug 323171 in the Debian BTS:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=323171

I have been working on this problem for a little while now and have
found a solution. If you are still interested in the case, I have
some ideas.

First of all, the cause of this problem is in the stunnel4 configuration
file for logrotate. It contains a 'postrotate' command that restarts
stunnel each morning (in a defalut setup). Here's the snippet from
/etc/logrotate.d/stunnel4:

         postrotate
           /etc/init.d/stunnel4 restart > /dev/null
         endscript

Removing this line of course solves the problem, but causes another one;
namely the logfile won't be split when rotating occurs. Consequently,
log rotation is broken, as the new logfile is empty, and the old renamed
one is still appended to.

Logrotate features a command called 'copytruncate' to solve this
situation. It's not perfect but I believe it does the same thing better.
Instead of moving the old logfile and creating a new one, the old
logfile is copied and then emptied. This causes a (very short) timeslice
of logging to be lost.

As a side note; when using 'copytruncate', the command 'create' is
overridden.

Could this behaviour be more desireable as default than all stunnels
being restarted in the morning? In my case, for example, long backup
runs with bacula over stunnel are otherwise impossible.

Best regards,
Johan Ehnberg

--
Johan Ehnberg
[EMAIL PROTECTED]
"Windows? No... I don't think so."



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to