Here will be explained how to setup Daemon Tools for Ubuntu environment, but is similar for other environments too.
What is Daemon Tools:
daemontools is a collection of tools for managing UNIX services. supervise monitors a service, it starts the service and restarts the service if it dies. Setting up a new service is easy, all supervise needs is a directory with a run script that runs the service.
1. install daemontools:
sudo apt-get install daemontools
2. After installation is done we need to make daemontools run on startup and to do that we need to create
/etc/init dir. Content of
svscan.conf file is described at Start Daemon Tools .
# svscan - daemontools # # This service starts daemontools start on runlevel  stop on runlevel [^12345] respawn exec /usr/bin/svscanboot
We need now to start
svscan service via command
sudo service svscan start
svscan to run on system boot.
svscan.confscript will start svscanboot service which is responsible for starting svscan in
svscanstarts and monitors a collection of services and also starts one supervise process for each service defined in
supervisestarts and monitors a single service.