A Debian (or any Debian derivative) start up script for unicorn. You will to change: the name of the /etc/{default,init.d}/unicorn to reflect the name of the application; the lines that check and then source /etc/default/unicorn (lines 5 & 6) and the INIT INFO line: "Provides" & "Short-Description" lines (8 & 13). There should be no reason to change anything anything else in /etc/init.d/unicorn.
h2.Bundler
You might find that bundler just works (unlikely) or (more likely) you will have to fuck around until it does. So if it doesn't work the following:
- add ruby_path=/bin to /etc/defaults/unicorn
- sed 's/^DAEMON=.*$/DAEMON=$ruby_path/bundle exec unicorn"
probably will.