description "Margarine daemon process."

setuid <%= node['margarine']['user'] %>
setgid <%= node['margarine']['group'] %>

console output

start on ((
     started network-interface
 or  started network-manager
 or  started networking)
 and started rsyslog)

stop on runlevel [!345]

<% if node['margarine']['install']['method'] == 'source' -%>
env PYTHONPATH=<%= node['margarine']['install']['path'] %>
<% end -%>
exec <%= node['margarine']['install']['method'] =~ /source|vagrant/ ? node['margarine']['install']['path'] : '' %>/bin/<%= @service %>

description "Margarine Daemon: <%= @service %>"
author "Alex Brandt <alunduil@alunduil.com>"

setuid <%= node['margarine']['user'] %>
setgid <%= node['margarine']['group'] %>

console log

start on ((
     started network-interface
 or  started network-manager
 or  started networking)
 and started rsyslog)

stop on runlevel [!345]

<% if node['margarine']['install']['method'] =~ /source|vagrant/ -%>
env PYTHONPATH=<%= node['margarine']['install']['path'] %>
<% end -%>
exec <%= node['margarine']['install']['method'] =~ /source|vagrant/ ? node['margarine']['install']['path'] : '' %>/bin/<%= @service %>

Add vagrant logic to PYTHONPATH in upstart job.
Add vagrant logic to PYTHONPATH in upstart job.
