Ubuntu – Best way to start a program at boot on Ubuntu Server

bootstartupUbuntu

I have a server running Ubuntu Server 11.10 and I have some programs I want to start at boot time such as Nginx, my Unicorn workers etc.

In fact, I know how to start my programmes either by adding a script to /etc/init.d/ or to /etc/init/ via Startup.

What I want to know is if there is a "good way" or "best way" to do it.
Maybe there is a more sustainable way considering the future evolutions of Ubuntu.

Best Answer

As with all things Linux, there are a bunch of different ways to do this.

The best way, though, is to write upstart files for the apps you need to start on boot. Upstart replaces the legacy sysV init system.