This is not the best method as one have to change all present and future scripts
tinc run, but ok.
Thank you
Roberto
-----Original Message-----
From: tinc [mailto:tinc-bounces at tinc-vpn.org] On Behalf Of Guus Sliepen
Sent: marted? 26 gennaio 2016 10.13
To: tinc at tinc-vpn.org
Subject: Re: Persistent tun/tap
On Tue, Jan 26, 2016 at 07:25:55AM +0000, mlist wrote:
> It would be nice if in a next tinc release you'll add some service
variables tinc propagates to its scripts.
> So for example you can define in tinc.conf env variables like:
>
> SERVICE1> ...
> SERVICEn>
> and tinc will propagates all SERVICEx Variables found in tinc.conf to all
scripts it calls. One can use theoretically infinite Env Var for custom behavior
(like custom debug messages, conditional iptables rules load or something else),
without lot of coding for you.
>
> Using a multi separated scripts called on state change, as you choice, is
right, but make difficult to set common env var if you don't make a tinc
inside mechanism like that.
I will not add this feature to tinc. You can easily do this yourself by
adding these environment variables to a separate file, and sourcing it
in the scripts that tinc calls. For example:
/etc/tinc/netname/variables:
SERVICE1=foo
/etc/tinc/netname/tinc-up:
#!/bin/sh
. /etc/tinc/netname/variables
echo SERVICE1=$SERVICE1
--
Met vriendelijke groet / with kind regards,
Guus Sliepen <guus at tinc-vpn.org>