[systemd-devel] systemd and templates

Colin Guthrie gmane at colin.guthr.ie
Tue Jul 10 10:15:57 PDT 2012


'Twas brillig, and Lennart Poettering at 09/07/12 23:54 did gyre and gimble:
> On Mon, 25.06.12 09:43, Michal Sekletar (msekleta at redhat.com) wrote:
> 
>> Another feature which systemd currently doesn't support and it's
>> closely related to previous issues, is starting instances based on
>> configuration. There should be an option to enable a behavior, when
>> instances of template are created and started automatically based on
>> configuration files for a particular deamon and controlled via common
>> target as described above.
> 
> Can you elaborate on this? Would generators work for you?
> 
> http://www.freedesktop.org/wiki/Software/systemd/Generators
> 
> (Sorry for not responding earlier!)

I think a combination of generators and the PartOf= stuff you've
mentioned recently should suffice for this (e.g. a generator for openvpn
could look for /etc/openvpn/*.conf and create instances for each file it
finds all controlled (and started by) a common target and stopped when
the target is stopped, but with independent control when needed also
(cf. PartOf vs. BindTo - assuming I'm understanding all this fu
correctly :D).

Col


-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/





More information about the systemd-devel mailing list