Daemon Tools
daemontools
A collection of programs written by DJB.
Most this page is about using the svc and svstat commands in working with qmail. The same ideas can be applied to djbdns as well (dnscache for instance).
See also
It is typical for qmail to run under the supervise command. If so, these commands will tell supervise that qmail should be stopped.
svc -d /service/qmail
svc -d /service/qread
svc -d /service/qstat
svc -d /service/smtpd
OK let say that fails for some reason, here is a more bullyish approach.
svc -k /service/qmail
svc -k /service/qread
svc -k /service/qstat
svc -k /service/smtpd
Check qmail processes
svstat /service/qmail
svstat /service/qread
svstat /service/qstat
svstat /service/smtpd
(re)Start same
svc -u /service/qmail
svc -u /service/qread
svc -u /service/qstat
svc -u /service/smtpd
Check, stop and start djbdns (/dnscache/) processes
svstat /service/dnscache
/service/dnscache: up (pid 1336) 2421 seconds
svc -d /service/dnscache
svstat /service/dnscache
/service/dnscache: down 3 seconds, normally up
svc -u /service/dnscache
svstat /service/dnscache
/service/dnscache: up (pid 1869) 2 seconds
Regarding supervise, it may look in /service/, /etc/service/ or /etc/sv/
On Ubuntu it will be /etc/service/
Here are some of the more interesting svc flags
-u = up/enable
-d = down/disable
-t = restart
-k = kill (if -d doesn't work)