3

Is there any way to delay a unit from starting up once another unit goes inactive? I have a startup process (oneshot.service) that runs as a one-shot and sets up the environment for all other processes to utilize and then exits (which makes the service report inactive).

However, I want to wait till that process is done before kicking off all the other processes. I was hoping there would be some type of signal or something that other service files could queue off of. Using the "After=oneshot.service" doesn't yield what I want as it will start up other processes before the oneshot.service finishes.

A more practical example is having a SNMPD SubAgent delay it's startup until after the SNMPD Agent is up and running... otherwise there is no communication between the Agent and Subagent unless you startup the Subagent an unknown amount of time after the SNMPD Agent is started.

1 Answer 1

0

Did you try the RemainAfterExit=yes in your oneshot.service service?

That way the service will still marked as active

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .