Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
### Usage: cap set_worker_status port=8081 balancer=mongrel_cluster status=ENABLED ### Must have balancer-manager handler enabled and curl on target. desc "Change a given mod_proxy_balancer worker's 'status'." task :set_worker_status, :roles => :web do WORKER_PORT = ENV['port'] LBM_PORT = ENV['lbm'] || '9090' BALANCER = ENV['balancer'] STATUS = ENV['status'] raise "Usage: rake #{ARGV[0]} port=MONGREL_PORT balancer=aggregator_mongrel_cluster status=ENABLE|DISABLE" unless WORKER_PORT and BALANCER and STATUS run "curl -s -o /dev/null http://127.0.0.1:#{LBM_PORT}/\\?b=#{BALANCER}\\&w=http://127.0.0.1:#{WORKER_PORT}\\&dw\\=#{STATUS}" end ### Trackback: http://geminstallthat.wordpress.com/2008/08/15/disable-mongrel-mod_proxy_balancer-workers-via-capistrano/
This paste will be private.
From the Design Piracy series on my blog: