lib/capper/templates/unicorn.rb.erb in capper-0.8.3 vs lib/capper/templates/unicorn.rb.erb in capper-0.9.0

- old
+ new

@@ -11,29 +11,29 @@ # Help ensure your application will always spawn in the symlinked # "current" directory that Capistrano sets up. working_directory "<%= current_path %>" # listen on Unix domain socket and let nginx proxy -listen "<%= shared_path %>/pids/unicorn.sock" +listen "<%= pid_path %>/unicorn.sock" # nuke workers after 30 seconds instead of 60 seconds (the default) timeout <%= unicorn_timeout %> # Location of the pidfile. Should not be changed unless you # know what you are doing. -pid "<%= shared_path %>/pids/unicorn.pid" +pid "<%= unicorn_pidfile %>" # use syslogger if available begin require "syslogger" logger Syslogger.new("<%= application %>-unicorn", Syslog::LOG_PID, Syslog::LOG_LOCAL1) rescue end # these do not seem to support syslog -stderr_path "<%= shared_path %>/log/unicorn.stderr.log" -stdout_path "<%= shared_path %>/log/unicorn.stdout.log" +stderr_path "<%= log_path %>/unicorn.stderr.log" +stdout_path "<%= log_path %>/unicorn.stdout.log" # combine REE with "preload_app true" for memory savings # http://rubyenterpriseedition.com/faq.html#adapt_apps_for_cow preload_app true @@ -64,10 +64,10 @@ # This allows a new master process to incrementally # phase out the old master process with SIGTTOU to avoid a # thundering herd (especially in the "preload_app false" case) # when doing a transparent upgrade. The last worker spawned # will then kill off the old master process with a SIGQUIT. - old_pid = "<%= shared_path %>/pids/unicorn.pid.oldbin" + old_pid = "<%= unicorn_pidfile %>.oldbin" if old_pid != server.pid begin sig = (worker.nr + 1) >= server.worker_processes ? :QUIT : :TTOU Process.kill(sig, File.read(old_pid).to_i) rescue Errno::ENOENT, Errno::ESRCH