Wednesday, November 23, 2005

 

lighttpd with daemontools on Debian


I love lighty, daemontools and Debian.
There are 3 step to combine them (assuming you have lighttpd already installed).

Step 1

Install daemontools.
$ apt-get install daemontools-installer
$ get-daemontools
$ build-daemontools
(I am using /service-style.)

Step 2

Create run script.
$ mkdir /service/lighttpd
$ cat <<EOF > /service/lighttpd/run
#!/bin/sh
exec /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf -D
EOF
(lighttpd will be started automagically)

Step 3

Remove lighttpd from init.d
$ update-rc.d -f lighttpd remove


Now, use svstat and svc as usual :)

Thats all folks!

This page is powered by Blogger. Isn't yours?