I setup a task many months ago and realized it was pretty simple and well isolated so I figured I'd set this up as a PR and let you give it a look. Since I use capistrano to deploy to production, I needed a command line method (via SSH) to take the website down and put it into maintenance mode. Check this out, syntax is simple:
# Via Sake:
sake dev/tasks/MaintenanceMode on
# Via the CLI script directly:
php framework/cli-script.php dev/tasks/MaintenanceMode on
I setup a task many months ago and realized it was pretty simple and well isolated so I figured I'd set this up as a PR and let you give it a look. Since I use capistrano to deploy to production, I needed a command line method (via SSH) to take the website down and put it into maintenance mode. Check this out, syntax is simple:
See here for example documentation: https://github.com/patricknelson/silverstripe-maintenance-mode/tree/feature-cli-task