Tinc Log rotation fails

Guus Sliepen guus at tinc-vpn.org
Thu Nov 29 14:25:51 CET 2012


On Thu, Nov 29, 2012 at 12:58:40PM +0000, Kassemos, David wrote:

> This may have already been addressed, and I apologize if it has, but here is my issue.
> 
> I have separated the TINCD log from syslog to isolate the VPN activity.
> By starting with daemon with the  --logfile= switch
> 
> It seems to work fine except that once log rotation takes place, the daemon does not recreate the log, nor will it write to the new log even if an empty file is put into place.
> 
> The only way to re-establish the log writing is to restart the tincd service.
> 
> Any help on this issue would be greatly appreciated.

You should send a HUP signal to the tinc daemon after you have rotated the
logs, otherwise tinc keeps writing to the old log file. For example, if you use
logrotate, and want daily rotation up to one week, then add this to logrotate.conf:

/var/log/tinc.netname.log {
	rotate 7
	daily
	postrotate
		/usr/sbin/tincd -n netname -kHUP
	endscript
}

Or if you are using tinc 1.1, use "/usr/sbin/tincctl -n netname reload"
instead. If that still doesn't work, let me know.

-- 
Met vriendelijke groet / with kind regards,
     Guus Sliepen <guus at tinc-vpn.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://www.tinc-vpn.org/pipermail/tinc/attachments/20121129/055d32d2/attachment.pgp>


More information about the tinc mailing list