Created
March 2, 2009 16:30
-
-
Save phuesler/72844 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :web do | |
desc "Custom task to disable web" | |
task :disable, :roles => :web, :except => {:no_release => true} do | |
require 'erb' | |
on_rollback {run "rm #{shared_path}/system/maintenance.html"} | |
template = File.read(File.join(File.dirname(__FILE__), "deploy", "templates", "maintenance.html.erb")) | |
result = ERB.new(template).result(binding) | |
put result, "#{shared_path}/system/maintenance.html", :mode => 0644 | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment