I have been trying to use the following simple task to restart mongrel
(note I'm running a single instance):
task :restart, :roles => :app do
run "cd #{current_path} && mongrel_rails stop"
run "cd #{current_path} && mongrel_rails start -e production -p
#{mongrel_port} -d"
end
And looking at the output of the deploy I get:
!!! PID file log/mongrel.pid does not exist. Not running?
mongrel::stop reported an error. Use mongrel_rails mongrel::stop -h to
get help.
So i've been working on a more reliable restart task that will kill my
mongrel process, remove the pid file and then start mongrel:
task :restart, :roles => :app do
run "kill `ps | grep #{mongrel_port} | egrep -v grep | awk '{print
$2}'`"
run "rm ~/#{application}/shared/log/mongrel.pid -f"
run "cd #{current_path} && mongrel_rails start -e production -p
#{mongrel_port} -d"
end
Now if I run these three lines straight on the server, they work fine.
However, during a deploy it chokes on the kill command:
kill: usage: kill [-s sigspec | -n signum | -sigspec] [pid | job]...
or kill -l [sigspec]
Does anyone have any ideas how I can get around this problem?
Any help much appreciated,
Paul.
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---