Created
September 22, 2011 23:08
-
-
Save Drewzar/1236293 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
description "@app_name" | |
author "Vitrue, Inc" | |
start on startup | |
stop on shutdown | |
script | |
export HOME="/root" | |
<%- @env_vars.each do |k, v| -%> | |
export <%= k %>=<%= v %> | |
<%- end -%> | |
cd /data/<%= @app_name %>/current | |
sudo -E <%= "-u #{@node_user}" if @node_user %> <%= @node_bin %> <%= @main %> <%= @app_args %> 2>&1 >> log/<%= @app_name %>.log | |
end script | |
<%- if @post_stop %> | |
post-stop script | |
<%- @env_vars.each do |k, v| -%> | |
export <%= k %>=<%= v %> | |
<%- end -%> | |
cd /data/<%= @app_name %>/current | |
sudo -E <%= @node_bin %> <%= @post_stop_script %> | |
end script | |
<%- end -%> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment