[systemd-devel] socket activated services and correct dependency mapping

James Hogarth james.hogarth at gmail.com
Sat Jul 25 03:29:59 PDT 2015


On 24 Jul 2015 11:55, "Dimitri John Ledkov" <dimitri.j.ledkov at intel.com>
wrote:
>
> On 24 July 2015 at 10:38, James Hogarth <james.hogarth at gmail.com> wrote:
> > I want a user to be able to systemctl start sslh and use listening
> > addresses in /etc/sslh.cfg as always (so I'm reluctant to put a
> > straight Sockets= in the service unit file) but as it stands the lazy
>
> You can write a generator which will parse /etc/sshlh.cfg and drop e.g.
> $1/sslh.socket.d/sshlh-cfg.conf
>
> with contents
> [Socket]
> ListenStream=...
>
> That way e.g. you can enforce that config file is still fully honoured
> as canonical place to set ports.
>
> Checkout generators at
> http://www.freedesktop.org/wiki/Software/systemd/Generators/
>
> Or e.g. look at /run/systemd for things that got generated by various
> stuff (e.g. like the fstab generator).
>

Oh I love that idea! It didn't even occur to me but it's perfect for it...

The configuration file is designed to be read with libconfig anyway which
is already on the system making it pretty trivial.

Thanks for that reminder - will arrange this later on this week :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150725/f39a0997/attachment-0001.html>


More information about the systemd-devel mailing list