[SOLVED] Re: TINC config files layout not human or script friendly

Anne-Gwenn Kettunen anwen at asphodelium.eu
Mon Jan 12 13:39:11 CET 2015


Le 12/01/2015 13:17, md at rpzdesign.com a écrit :
> Hello Tinc users & Guss:
>
> I was sleeping last night and I figured out how to accomplish everything
> I ranted about below with no source code changes to TINC.
>
> The first thing to do is create TEMPLATES for tinc.conf, tinc-up, and
> the NODE files.
>
> Then during the startup script, use the linux cp command and sed to copy
> the template to the correct name and sed to text replace "variables"
> with correct values.
>
> For example, in the tinc.conf, have the line  Name = [NAME] and sed can
> find and replace that text with the proper value supplied in a single
> configuration file, THE STARTUP script!
>
> The public key can also be replaced by sed using [PUBLIC KEY]
>
> Another script can run on a cron job and replace
>
> Now all I have to do is every so often, upload a new public and private
> key file to the nodes and then remotely call the reload script which
> will use sed to manipulate the templates and copy the files to the right
> locations with the right values.
>
> Sorry for my earlier rant, only through frustration do we get inspiration!
>
> Cheers all,
>
> md

You might be interested by that: https://bitbucket.org/Anwen/tincgen/
(it's still a work in progress, though it would become useless with 1.1)


More information about the tinc mailing list