I think the "locking" is already done by systemd. When units specify an ordering, it seems that one unit will only start when the other has shut down:
"Given two units with any ordering dependency between them, if one unit is shut down and the other is started up, the shutdown is ordered before the start-up"
I think the "locking" is already done by systemd. When units specify an ordering, it seems that one unit will only start when the other has shut down:
"Given two units with any ordering dependency between them, if one unit is shut down and the other is started up, the shutdown is ordered before the start-up"