On 11/8/05, Jerrett Taylor
<jerrett-7g3wz9A/6AxWk0Htik3J/w@public.gmane.org>
wrote:> it would work if the params to specify a path worked correctly, and if
> you could pass a password (assuming you are not on a shared box).. both
> of which i believe zed is working on
>
> in the meantime you can manually start it, and use switchtower to issue
> a HUP signal to gracefully restart it
>
Actually, I managed to figure out a workable solution:
desc "Restart SCGI"
task :restart, :roles => :app do
run "cd #{current_path} && scgi_ctrl restart" do |channel,
stream, data|
if data =~ /^Password:/
logger.info "#{channel[:host]} asked for password"
channel.send_data "mypassword\n"
end
end
end
The only problem is, it always seems to fire off the last version of
the application... does anyone know if updating the symlink occurs
after the restart? I guess that would be odd.
m