Sha256: 9d6ecd649ddb5fc7dfdec022783b51aa01f38d91ba6de629ab45c08051a8699d

Contents?: true

Size: 510 Bytes

Versions: 6

Compression:

Stored size: 510 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/503.html #{current_path}/public/system/503.html"
    end

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
elocal_capistrano-1.0.5 lib/elocal_capistrano/maintenance.rb
elocal_capistrano-1.0.4 lib/elocal_capistrano/maintenance.rb
elocal_capistrano-1.0.3 lib/elocal_capistrano/maintenance.rb
elocal_capistrano-1.0.2 lib/elocal_capistrano/maintenance.rb
elocal_capistrano-1.0.1 lib/elocal_capistrano/maintenance.rb
elocal_capistrano-1.0.0 lib/elocal_capistrano/maintenance.rb