unicorn.god.erb: kill old master on restart

This commit is contained in:
Bob Potter 2012-02-03 16:01:20 -06:00
parent 3fe37d2a54
commit 7072baef73
1 changed files with 1 additions and 1 deletions

View File

@ -1,5 +1,5 @@
# Unicorn specific
w.pid_file = "<%= engine.directory + "/tmp/pids/unicorn.pid" %>"
w.stop = "kill -QUIT `cat #{w.pid_file}`"
w.restart = "kill -USR2 `cat #{w.pid_file}`"
w.restart = "kill -USR2 `cat #{w.pid_file}` && sleep 20 && kill -QUIT #{w.pid_file}.oldbin"
w.behavior(:clean_pid_file)