Skip to content

Instantly share code, notes, and snippets.

@mipearson
Created October 7, 2014 00:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mipearson/1532bd67e554dcf92df5 to your computer and use it in GitHub Desktop.
Save mipearson/1532bd67e554dcf92df5 to your computer and use it in GitHub Desktop.
description "Start up the <%= @service_type %> service for <%= @name %>"
start on runlevel [2345]
stop on runlevel [06]
umask 0022
chdir <%= @app_dir %>/current
setuid <%= @name %>
setgid www-data
console log
pre-start script
. <%= @home_dir %>/environment.sh
exec bundle exec unicorn -c <%= @app_dir %>/current/config/unicorn.rb -E production -D
end script
post-stop exec kill `cat tmp/unicorn.pid` || true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment