Daemontools is a small set of very useful utilities, from Dan Bernstein. They are mainly used for controlling processes, and maintaining logfiles. For more information, please see http://cr.yp.to/daemontools.html

Lets install daemontools


# cd /usr/ports/sysutils/daemontools
# make install clean

If you get a pop-up window when you do this, Just hit TAB and then click OK.

We now need to create the /service directory to get svscan running. We do that by:


# mkdir /service

You will now want to start the svscan server by running:


# csh -cf '/usr/local/bin/svscanboot &'

Run the following command to check and see if svscan is running


# ps -auxw | grep svscan

You should get something similar to the following:


root 384 0.0 0.0 1652 8 con- I 16Jul05 0:00.01 /bin/sh /command/svscanboot
root 404 0.0 0.0 1244 140 con- S 16Jul05 9:04.68 svscan /service

We now need to tell FreeBSD to start daemontools on startup. Here is the command that tells freebsd to do that:


# echo "csh -cf '/usr/local/bin/svscanboot &'" >> /etc/rc.local

Before we continue on, we want to delete the startup script thats created when we installed daemontools:


# rm /usr/local/etc/rc.d/svscan