The cause of multiple spurious supervise directories.

You've come to this page because you've asked a question similar to the following:
My directory holding all of my service directories is /service. I expect to find supervise directories under all of my /service/* and /service/*/log directories (and their equivalent "real" locations); but I am finding them in other places as well. What have I done wrong ? How can I correct it ?

This is the Frequently Given Answer to that question.

You've erroneously, at some point, invoked svscan on the wrong directory. Most probably, you ran it from your interactive shell giving it no command line arguments, and didn't happen to be in your /service directory at the time. Alternatively, you might not have installated daemontools correctly, by omitting the command line argument to svscan in your startup script or inittab entry.

You need to rectify this situation in three stages, which you must perform in the correct order:

  1. You must find and kill the spurious extra svscan process that you started, if it is still running. If you don't do this first, it will thwart your later efforts.

  2. You must cause the supervise processes that svscan started to bring their services into the down state and then exit, by running:

    svc -dx *
    sleep 10
    svc -dx */log

    If you don't do this before removing the spurious supervise directories, you'll end up with supervise processes that you have no means for controlling.

  3. You must remove the spurious supervise directories and their content.

© Copyright 2002-2002 Jonathan de Boyne Pollard. "Moral" rights asserted.
Permission is hereby granted to copy and to distribute this web page in its original, unmodified form as long as its last modification datestamp is preserved.