Current section
Files
Jump to
Current section
Files
templates/init_scripts/upstart.conf.eex
description "<%= description %>"
setuid <%= uid %>
setgid <%= gid %>
start on runlevel [2345]
stop on runlevel [016]
expect stop
respawn
env MIX_ENV=prod
export MIX_ENV
<%= if uid == "root" do %>
env HOME=/root
<% else %>
env HOME=/home/<%= uid %>
<% end %>
export HOME
pre-start exec /bin/sh <%= base_path %>/<%= name %>/bin/<%= name %> start
post-stop exec /bin/sh <%= base_path %>/<%= name %>/bin/<%= name %> stop