Making service survives reboot on Ubuntu

Posted on: Mon, 03/23/2009 - 20:15 By: dae
Tags

This might seems trivial to many people. However, I don't really know how to have some of my SysV init scripts being executed every time a machine restart. For Fedora, this is very simple using chkconfig. However, I don't know what is its equivalence on Ubuntu.

Googling around and I found that the command is actually update-rc.d. A default modus operandi is

update-rc.d foobar defaults

where foobar is my init script. This will place links to /etc/init.d/foobar on appropriate run levels.