capistrano-deploy-management 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
@@ -5,13 +5,14 @@ module CapistranoDeployManagement
|
|
5
5
|
|
6
6
|
set(:unicorn_config) { "#{current_path}/config/unicorn.rb" }
|
7
7
|
set(:unicorn_pidfile) { "#{deploy_to}/shared/pids/unicorn.pid" }
|
8
|
-
set(:unicorn_pid) { "cat #{
|
8
|
+
set(:unicorn_pid) { "cat #{deploy_to}/shared/pids/unicorn.pid" }
|
9
9
|
|
10
10
|
namespace :unicorn do
|
11
11
|
desc 'Restart unicorn.'
|
12
12
|
task :restart, :roles => :app, :except => {:no_release => true} do
|
13
13
|
# unicorn.stop
|
14
14
|
unicorn.start
|
15
|
+
# run "cd #{current_path} && kill -USR2 #{unicorn_pid}"
|
15
16
|
end
|
16
17
|
|
17
18
|
desc 'Start unicorn.'
|
@@ -23,7 +24,7 @@ module CapistranoDeployManagement
|
|
23
24
|
task :stop, :roles => :app, :except => {:no_release => true} do
|
24
25
|
# run "if test -s #{unicorn_pidfile}; then cd #{current_path} && kill $(#{unicorn_pid}) fi"
|
25
26
|
# above line fails with error -c: line 1: syntax error: unexpected end of file
|
26
|
-
run "cd #{current_path} && kill $(#{unicorn_pid})"
|
27
|
+
run "cd #{current_path} && kill -QUIT $(#{unicorn_pid})"
|
27
28
|
end
|
28
29
|
end
|
29
30
|
|