added maintenance file

This commit is contained in:
albert
2011-08-30 10:25:17 -04:00
parent 79e2ed236b
commit f74b6d76a9
2 changed files with 25 additions and 2 deletions

View File

@@ -64,12 +64,14 @@ namespace :deploy do
namespace :web do
desc "Present a maintenance page to visitors."
task :disable do
run "mv #{current_path}/public/maintenance.html.bak #{current_path}/public/maintenance.html"
maintenance_html_path = "#{current_path}/public/maintenance.html.bak"
run "if [ -e #{maintenance_html_path} ] ; then mv #{maintenance_html_path} #{current_path}/public/maintenance.html ; fi"
end
desc "Makes the application web-accessible again."
task :enable do
run "mv #{current_path}/public/maintenance.html #{current_path}/public/maintenance.html.bak"
maintenance_html_path = "#{current_path}/public/maintenance.html"
run "if [ -e #{maintenance_html_path} ] ; then mv #{maintenance_html_path} #{current_path}/public/maintenance.html.bak ; fi"
end
end
end