On Wed, Sep 30, 2015 at 11:07:56PM +0800, Aron Xu wrote:

> Adding systemd service unit is really appreciated.
> 
> However the patch in initial report does not work for me unfortunately
> because I'm using the alternative way of init scripts that boots
> several different networks, written in /etc/tinc/nets.boot, with their
> own configurations in respective directories.

Indeed. In the tinc 1.1~pre11 package, which is in experimental, there
are service units that are templates to allow you to manage multiple
tinc instances using systemd without having to manually add service unit
files. They can also be found here:

http://tinc-vpn.org/git/browse?p=tinc;a=tree;f=systemd;hb=refs/heads/1.1

You'd then be able to run:

systemctl enable tinc@foo
systemctl start tinc@foo

Where foo is any tinc net you have configured. There is also a generic
tinc service that allows you to start/stop all enabled instances at
once, like so:

systemctl start tinc

Let me know if you think this works better for you.

> Also for a bit more correctness, the required target should be
> network-online.target instead of network.target.

Well, tinc itself does not require the network to be online. In fact, it
doesn't need any network configuration at all, except if you use things
like BindToInterface in tinc.conf, and in general it's best to have the
firewall configured before starting any services. So I think
network.target is the correct dependency.

-- 
Met vriendelijke groet / with kind regards,
      Guus Sliepen <[email protected]>

Attachment: signature.asc
Description: Digital signature

Reply via email to