From f74b6d76a9c8067044c41d64023ec6313e167bdb Mon Sep 17 00:00:00 2001 From: albert Date: Tue, 30 Aug 2011 10:25:17 -0400 Subject: [PATCH] added maintenance file --- config/deploy.rb | 6 ++++-- public/maintenance.html.bak | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 public/maintenance.html.bak diff --git a/config/deploy.rb b/config/deploy.rb index fd1f13541..44a0574ff 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -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 diff --git a/public/maintenance.html.bak b/public/maintenance.html.bak new file mode 100644 index 000000000..1a425fcb2 --- /dev/null +++ b/public/maintenance.html.bak @@ -0,0 +1,21 @@ + + + + Downbooru + + + +

The site is down for maintenance.

+

Check Twitter for updates.

+ +