#!/bin/bash

cd <%= @options[:app].path %>/current

exec 2>&1
exec <%= node[:runit][:chpst_bin] %> \
  -u <%= @options[:app].owner %>:<%= @options[:app].group %> \
  <%= @options[:bundler] ? "#{@options[:bundle_command]} exec" : '' %> \
  <%= @options[:smells_like_rack] ? 'unicorn' : 'unicorn_rails' %> \
  -E <%= @options[:rails_env] %> \
  -c /etc/unicorn/<%= @options[:app].application.name %>.rb

#!/bin/bash

export HOME=<%= @options[:app].path %>

cd <%= @options[:app].path %>/current

exec 2>&1
exec <%= node[:runit][:chpst_bin] %> \
  -u <%= @options[:app].owner %>:<%= @options[:app].group %> \
  <%= @options[:bundler] ? "#{@options[:bundle_command]} exec" : '' %> \
  <%= @options[:smells_like_rack] ? 'unicorn' : 'unicorn_rails' %> \
  -E <%= @options[:rails_env] %> \
  -c /etc/unicorn/<%= @options[:app].application.name %>.rb

Add HOME env var to satisfy readline
[COOK-4395] Add HOME env var to satisfy readline
