System:
- RHEL 7.4, systemd 219
Units:
- binary1.service
- binary2.service
- binary2.timer
What I want:
- When starting and stopping binary1.service, binary2.timer will be started and stopped.
- When bianry2.timer is started and stopped, binary2.timer will start and stop, but not affect the state of binary1.service.
Problem:
- I have tried using a variety of combinations with Requires, After, PartOf, and BindsTo. I cant seem to find the right combination to make this work. The closet I have is
#binary1.service
[Unit]
BindsTo=binary2.timer
Which will start and stop binary2.timer is binary1.service is started or stopped. However If bianry2.timer is started or stopped, this will effect the service of binary1.service.
What am I missing?