Robin Bowes
unread,Nov 19, 2009, 11:28:08 AM11/19/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to capis...@googlegroups.com
Hi,
I've got the following block in my capfile:
# Custom tasks for our hosting environment.
namespace :remote do
desc <<-DESC
Create directory required by copy_remote_dir.
DESC
task :create_copy_remote_dir, :roles => :web do
print " creating #{copy_remote_dir}.\n"
run "mkdir -p #{copy_remote_dir}"
end
end
I want to add a task that restarts some services post-deploy. It will be
something like:
desc <<-DESC
Restart services on remote node
DESC
task :restart_services, :roles => :web do
print " restarting services.\n"
run "sv restart send_*"
end
My question: where do I put that?
Does it just go in the "namespace :remote block? ie:
# Custom tasks for our hosting environment.
namespace :remote do
desc <<-DESC
Create directory required by copy_remote_dir.
DESC
task :create_copy_remote_dir, :roles => :web do
print " creating #{copy_remote_dir}.\n"
run "mkdir -p #{copy_remote_dir}"
end
desc <<-DESC
Restart services on remote node
DESC
task :restart_services, :roles => :web do
print " restarting services.\n"
run "sv restart send_*"
end
end
R.