Answer the question
In order to leave comments, you need to log in
How to set up systemd?
Help set up dependencies in systemd. You need to organize two services according to the following algorithm:
1. The first service starts before the second, even if the second service was started first
2. If one service was stopped, then the other should also stop
3. If one of the services fell, the second should stop with the failed status.
As I understand it, you need to use Requires, After, Before. Then you can control the startup sequence. But I can’t make it so that if one service suddenly falls, then the second service also “falls”.
********************************
# Service1
[Unit]
Requires=service2.service
Before=service2.service
********************************
#Service2
[Unit]
Requires=service1.service
After=service1.service
Answer the question
In order to leave comments, you need to log in
According to paragraph 2.3, I think this will do:
Read more man systemd.unit
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question