How To Fix Unsupervised Daemontools Log Scripts

I am using daemontools and was having trouble with the log files. The log script was not being supervised, nothing I did seemed to make it work. svstat /service/test/log returned unable to open supervise/ok: file does not exist.

The problem was that svscan had picked up on my service before the log directory existed. And no matter what I did (including restarting the service), it wasn’t noticing the log directory. I couldn’t get it to notice the filesystem change because I made real directories in /service for each service, not symlinks.

One solution would be to reboot, but rebooting a unix box is equivalent to admitting failure. I stopped my service, moved the service files to /var/local/services/test, then symlinked the service directory into /service.


Related Posts

  1. iPhone/iPad UISearchBar and UISearchDisplayController Asynchronous Example
  2. Rails Fragment Caching With Multiple Accounts
  3. git fatal empty ident not allowed
  4. Jekyll Exclude Files
  5. My 5 Must-have vim Plugins
You should follow me on Twitter: @patrickxb