Commit 7e277a5dbc553c45dfeda022b57d0e7c01945c28
1 parent
b36028dc
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
sleep until existe unicorn.pid.oldbin file
Showing
1 changed file
with
4 additions
and
1 deletions
Show diff stats
script/production
... | ... | @@ -40,7 +40,10 @@ app_server_stop() { |
40 | 40 | app_server_restart() { |
41 | 41 | # see unicorn_rails(1) and "Signal handling" in unicorn documentation |
42 | 42 | kill -s USR2 $(cat tmp/pids/unicorn.pid) |
43 | - sleep 5 | |
43 | + while [ ! -f tmp/pids/unicorn.pid.oldbin ] | |
44 | + do | |
45 | + sleep 1 | |
46 | + done | |
44 | 47 | kill -s QUIT $(cat tmp/pids/unicorn.pid.oldbin) |
45 | 48 | } |
46 | 49 | ... | ... |