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 ? > 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" > 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. > > I suppose If I create some tasks with the same name as the ones > currently defines, capistrano will take mines ? Yes > > > thanks, Have fun :-) > > > r. > > > > --~--~---------~--~----~------------~-------~--~----~ To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/capistrano -~----------~----~----~----~------~----~------~--~---
