Sha256: a24047422742ca4fc2bc2489b48007cd8a7d9762562200c441826605fd30dcb1

Contents?: true

Size: 543 Bytes

Versions: 1

Compression:

Stored size: 543 Bytes

Contents

Capistrano::Configuration.instance.load do
  namespace :maintenance do
    desc "Show the maintenence page and return a 503 error for every new HTTP request."
    task :begin, :roles => :app do
      run "mkdir -p #{current_path}/public/system && cp #{current_path}/public/inactive.maintenance.html #{current_path}/public/system/maintenance.html"
    end

    desc "Turn off the maintenance page and resume normal operations."
    task :end, :roles => :app do
      run "rm -f #{current_path}/public/system/maintenance.html"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
elocal_capistrano-1.0.8 lib/elocal_capistrano/maintenance.rb