1

I have some templated Base Services. Let's call them basis@foo.service, basis@bar.service (and optionally more basis@xyz.service) . And I have a more complex service which should be started after all of these Base Services. Let's call this service complex.service

How can I make the complex.service start after all base services are started? What is the correct way for the file complex.service?

[Unit]
After=basis@.service
...

or

[Unit]
After=basis@*.service
...
0

After takes just a list of unit names, so it is After=basis@foo.service basis@bar.service basis@xyz.service, or from the other end Before=complex.service in basis@.service.

  • In my Case: The List of the units for After=... is not completely known at the moment of writing the complex.service file. – powerpete Mar 19 at 8:21
  • @powerpete Then go with Before? – Michał Politowski Mar 19 at 8:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.