2015-05-25 36 views
0

我想麒麟添加到我的應用程序,在我的部署腳本麒麟過程中,我有這樣的行補充說:殺上部署

namespace :deploy do 
    task :restart do 
    run "if [ -f #{unicorn_pid} ] && [ -e /proc/$(cat #{unicorn_pid}) ]; then kill -0 `cat #{unicorn_pid}`; else cd #{deploy_to}/current && bundle exec unicorn_rails -C#{unicorn_conf} -E #{rails_env} -D; fi" 
    end 
    task :start do 
    run "bundle exec unicorn_rails -C#{unicorn_conf} -E #{rails_env} -D" 
    end 
    task :stop do 
    run "if [ -f #{unicorn_pid} ] && [ -e /proc/$(cat #{unicorn_pid}) ]; then kill -QUIT `cat #{unicorn_pid}`; fi" 
    end 

    task :load_rvm do 
    run '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"' # Load RVM into a shell session *as a function* 
    end 
end 

但是當我運行部署腳本我有任務,這個錯誤「重啓「:

kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec] 

回答

0

Kill命令不會採取-0選項。那一定是-9