[systemd-devel] run no more than one of foo at .service at a time

Johannes Ernst johannes.ernst at gmail.com
Mon Oct 5 15:53:20 PDT 2015


> On Oct 5, 2015, at 14:29, David Timothy Strauss <david at davidstrauss.net> wrote:
> 
> If you only want one instance running, why not just create one service and reconfigure/restart it?
> 
Because the service dependencies are totally different.

> 
> On Mon, Oct 5, 2015, 09:04 Johannes Ernst <johannes.ernst at gmail.com <mailto:johannes.ernst at gmail.com>> wrote:
> I have a foo at .service. When started as
>         systemctl start foo at abc
> I’d like all other currently active foo@… services to stop, and vice versa. All of the foo at .services are supposed to be mutually exclusive with each other.
> 
> In foo at .service, I attempted:
>         Conflicts: foo at .service
> but that does not seem to do the trick (Starting foo at abc produces "Dependency Conflicts=foo at abc.service dropped”)
> 
> I’d like to avoid having to enumerate foo at abc, foo at def etc. in the Conflicts section.
> 
> Ideas?
> 
> Thanks,
> 
> 
> 
> Johannes.
> 
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org <mailto:systemd-devel at lists.freedesktop.org>
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel <http://lists.freedesktop.org/mailman/listinfo/systemd-devel>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20151005/b0eebfc8/attachment.html>


More information about the systemd-devel mailing list