[systemd-devel] how-to run instantiated units from templates one after the other

Dmitry Karpov d.p.karpov at gmail.com
Fri Sep 18 11:34:44 PDT 2015


I have a template for creating the backup:

backup at .service

[Unit]

Description=Instance %i

[Service]

ExecStart=/bin/sh -c "echo do backup job for %i"

[Install]

WantedBy=maintenance.target        

and some target:

maintenance.target

[Unit]

Description=target for maintenance

StopWhenUnneeded=yes         

As can be seen, instances from backup@ start with maintenance.target. But they run in parallel.

There is some way to run them one after the other?

I thought that specifying Conflicts=backup@*.service in the template should lead to this, but it is not.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150918/7d126578/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2550 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150918/7d126578/attachment.bin>


More information about the systemd-devel mailing list