How to keep a oneshot service running

0

0

I've a service A of type oneshot, which triggers another service B of type forking. Service A BindsTo service B and Service A runs before Service B.

  1. When I start the service A, the status of service A shows "Active: active (exited)" but I don't want it to show exited.
  2. When service B stops due to some error when condition ConditionPathExists fails, the status of service A is still "Active: active (exited)" but I don't want it to still show as active.

So I've two problems here, I was thinking, since service A is oneshot, it's not able to notice when service service B stops. Is there a workaround to avoid these problems that people generally do and maybe I'm not aware of. Like maybe running some continuous script with loop that doesn't take lot of CPU. Did anyone face this situation? I don't want to merge the services because they do different things.

user41965

Posted 2019-07-15T03:52:34.703

Reputation: 1

No answers