0

Is it possible to have a systemd unit that binds to the existence of two devices, such that the unit is only started when both of the devices exist? When one or the other disappears, we should stop the resulting unit.

For example, myservice.service below will be started/stopped to match the presence/absence of /dev/ttyACM0:

# depend on serial port and quit when it disappears
BindsTo=dev-ttyACM0.device

Is it possible to set it to BindsTo a union of two devices?

PBJ
  • 123
  • 3

0 Answers0