Adding new services
Any service which we want to add needs to have a folder placed in /etc/runit on deepOfix. It needs to have a run script inside the folder. To tell runit about this service, create a link to the service folder in /var/service.
root@host# mkdir /etc/runit/cups root@host# cat > /etc/runit/cups/run #!/bin/sh exec 2>&1 exec cupsd -f ^D root@host# ln -s /etc/runit/cups /var/service
Adding logging to a service
To add logging to a service, create a subfolder in the service folder in /etc/runit. Add a run script in this folder to run the logging daemon.
root@host# cat > /var/service/cups/log/run #!/bin/sh exec svlogd -tt /var/log/cups/main/ ^D root@host#
This sets up logging using the svlogd logging daemon for the cups service.
Modifying boot-time behavior
By default, all services in /var/service directory start at bootup. We can force a service not to start by creating a file named down in the service directory.
root@host# touch /var/service/cups/down