42ity / fty-sensor-gpio

Agent to manage GPIO sensors and devices
Other
0 stars 9 forks source link

Problem: Agent is not restarted after fty-asset #27

Closed aquette closed 7 years ago

aquette commented 7 years ago

Solution: Add a WantedBy=fty-asset.service The Requires and After "fty-asset.service" allows to express the dependency on fty-asset.service. This means that stopping fty-asset will also stop fty-sensor-gpio. However, to automatically restart fty-sensor-gpio when fty-asset is (re)started, the WantedBy field is required

Signed-off-by: Arnaud Quette ArnaudQuette@Eaton.com

jimklimov commented 7 years ago

Was this tested by e.g. systemctl disable and systemctl enable of this unit? It seems that requiring and being wanted by the same unit is a logical loop and so would cause issues or be denied at runtime. Maybe Requisite is a stronger better option - if this proves to be a problem?