This blog post provides a step-by-step guide that works worry free :
Thanks to the author !
As the versions are regularly upgraded, I would suggest you to parse the file : /etc/init.d/unifi and update the path (java home and controller application, if needed). Then, run the commands :
update-rc.d unifi defaults
Then, test the startup script with :
This man-page gives you instructions about managing services at startup : http://manpages.ubuntu.com/manpages/hardy/man8/update-rc.d.8.html