On 18/02/2009, at 11:54, Jean-Philippe Moal wrote:
> > Hi, > > Raimon Fernandez Sirera a écrit : >> Hello, >> >> >> I'm using now Thin as a web server, and I've added a new task to my >> config/deploy.rb >> >> Basically I want to stop the servers and start again, and for testing >> purposes, also I want to disable the web before and enable it after >> the restarted. >> >> I'm having problems trying to use the cap deploy:web:disable / >> enable, >> if I use only the run "thin stop -C /etc/thin/xxxxxx.yml" and run >> "thin start -C /etc/thin/xxxxxx.yml" all works perfect. >> >> How I can do it ? >> >> I've tried using the cap shell but without luck ... >> >> >> here is my task: >> ---------------------------------------------------------------------------- >> desc "Stops and restarts de Thin Servers of xxxxxxxxx" >> task :restart do > > Don't you want to use deploy:restart instead ? I was using deploy:restart when I was using mongrel, but now I'm using Thin, and now I just need one or two commands, I don't need to execute a file (spin, ...) >> run "cap deploy:web:disable" > run is used to execute commands on the server, not the local > machine, so here it > certainly won't do what you expect. > I don't know how to launch a task from another so I would use a > before hook : > before "restart, "deploy:web:disable" ok, I suppose there must be a way to call a task from another task ... >> run "thin stop -C /etc/thin/xxxxxx.yml" >> run "thin start -C /etc/thin/xxxxxx.yml" >> run "cap deploy:web:enable" > > Same here. > >> end >> >> >> and also, how I can see the tasks of capistrano, for creating new >> ones >> based on them ? > > cap -T lists all the available tasks. For the definition you should > see the > source code (/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.4/ in my > linux box). > >> >> I want to customize the maintenance.html page. > > I don't think capistrano has anything to do with this static page > which should > be in your public/ dir. yes, it has as far as I know, at least it creates it and deletes it, and I can only customize two variables, but the main language it's english and I need to translate it. maybe this standar page is somewhere accessible ... >> I suppose If I create some tasks with the same name as the ones >> currently defines, capistrano will take mines ? > > Yes ok, thanks! >> thanks, > > Have fun :-) and as much! :-) thanks, r. --~--~---------~--~----~------------~-------~--~----~ To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/capistrano -~----------~----~----~----~------~----~------~--~---
