0

I have a A.conf init file in ubuntu 14.04, where it depends on B as follows :

start on stopped B

i.e. A should start after another service B has stopped. Can anyone please let me know what is the equivalent of this in systemd ?

2
  • @muru : can you please restore the tags for ubuntu 14.04 and 16.04. They are very much relevant as one uses upstart and other systemd. And people working on these might face similar issues.
    – user111
    Sep 11, 2018 at 12:06
  • that's what the upstart and systemd tags are for. It's mostly irrelevant which particular release of Ubuntu they're on. And people working on other releases might also face similar issues.
    – muru
    Sep 11, 2018 at 13:11

1 Answer 1

0

I'm guessing service B in this example is a script that runs once, not a long-running service? If so, you can specify B as a "oneshot" type service, and just configure A to be After=B.

If you're trying to get A to come up if B fails, you can directly specify OnFailure=A in B.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .