hyperboria / bugs

Peer-to-peer IPv6 networking, secure and near-zero-conf.
154 stars 17 forks source link

Create systemd socket activation. #81

Open Kubuxu opened 8 years ago

Kubuxu commented 8 years ago

In future the socket activation IMHO should be standard way of starting cjdns. Thanks to that configurators don't have to know anything about cjdroute placement to start cjdns and it makes starting it much much easier,

I would like to hear your input about socket activation in general.

In this scheme configurator would connect /run/cjdns/cjdns.socket UNIX socket which causes new instance of cjdns to start. It then has to send initial configuration (admin info and private key) and switch to admin port.

This is experimental and needs yet to be tested. (possibly by allowing current configurator to be stand-alone).

Implementation for initd systems is possible (inetd).

kyrias commented 8 years ago

using /usr/bin/env is completely superfluous since just cjdroute would look it up according to $PATH anyway.

Kubuxu commented 8 years ago

The trap was reworked to be C program. I'd need some external configuration to test it (or I might have to start writing my own).