Sha256: 2ef4339f3236e01029e77bae64e22ddcb67e8659394a7e2ba3bbc47ea2171883
Contents?: true
Size: 603 Bytes
Versions: 39
Compression:
Stored size: 603 Bytes
Contents
namespace :maintenance do desc "Enable maintenance: set MESSAGE='We should be back in approximately 2 hours'" task :enable do on roles(:web) do |host, user| within current_path do message = ENV["MESSAGE"] || "" upload! StringIO.new(message), "#{current_path}/tmp/maintenance.txt" invoke 'deploy:restart' end end end desc "Disable maintenance mode" task :disable do on roles(:web) do |host, user| within current_path do execute :rm, "#{current_path}/tmp/maintenance.txt" invoke 'deploy:restart' end end end end
Version data entries
39 entries across 39 versions & 1 rubygems