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

Dmitry Karpov d.p.karpov at gmail.com
Mon Sep 7 04:48:41 PDT 2015


I have a template for creating the backup:

backup at .service <mailto: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/20150907/8c4be880/attachment-0001.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/20150907/8c4be880/attachment-0001.bin>


More information about the systemd-devel mailing list