Waiting for a daemontools service to stop

Posted by also on Server Fault See other posts from Server Fault or by also
Published on 2011-01-02T21:57:10Z Indexed on 2011/01/02 22:55 UTC
Read the original article Hit count: 194

Filed under:
|
|

I'm running a service under daemontools that take several seconds to stop when sent the TERM signal. I need to stop it in a script, and then wait for the process to stop before continuing to take a LVM snapshot or restarting the service.

Does daemontools provide a way to do this? If not, what's the best way? I was thinking of sleeping while svcok exits with 0, but it seems like this should be a common problem with an easier solution. Thoughts?

© Server Fault or respective owner

Related posts about linux

Related posts about scripting