How can I disable the lighttpd daemon on startup in Ubuntu

Alain Jacomet Forte picture Alain Jacomet Forte · Feb 27, 2013 · Viewed 10.4k times · Source

I'm setting up lighty according to this guide, and I don't really have an use for the lighttpd daemon that was installed (this is the one that resides in /etc/init.d/lighttpd). I don't want a webserver running all the time, except when I'm working. I want to just call lighttpd -Df lighttpd.conf when I need to.

How can I disable this ?

Answer

Kinetic picture Kinetic · Mar 7, 2013

You can disable lighttpd on boot with the following command.

sudo update-rc.d -f lighttpd remove

This is a script which will remove the lighttpd start up script from the following locations:

/etc/rc0.d
/etc/rc1.d
/etc/rc2.d
/etc/rc3.d
/etc/rc4.d
/etc/rc5.d
/etc/rc6.d
/etc/rcS.d

Hope that helps