Created
December 29, 2014 23:12
-
-
Save vyorkin/3e8a29f702a4ec7b8988 to your computer and use it in GitHub Desktop.
cap3 maintenance mode
This file contains hidden or 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 :maintenance do | |
| desc "Maintenance start (edit config/maintenance.yml to provide parameters)" | |
| task :start do | |
| on roles(:web) do | |
| upload! "config/maintenance.yml", "#{current_path}/tmp/maintenance.yml" | |
| end | |
| end | |
| desc "Maintenance stop" | |
| task :stop do | |
| on roles(:web) do | |
| execute "rm #{current_path}/tmp/maintenance.yml" | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment