Sha256: 5dd5d77cb9610d4c95cb0ab4b0a3ff9434b0cf0e6187d3daf5b65ad72ed663ea
Contents?: true
Size: 1.14 KB
Versions: 18
Compression:
Stored size: 1.14 KB
Contents
Capistrano::Configuration.instance(:must_exist).load do namespace :nginx do desc "Start Nginx on the app slices." task :start, :roles => :app do sudo "/etc/init.d/nginx start" end desc "Restart the Nginx processes on the app slices." task :restart , :roles => :app do sudo "/etc/init.d/nginx restart" end desc "Stop the Nginx processes on the app slices." task :stop , :roles => :app do sudo "/etc/init.d/nginx stop" end desc "Tail the nginx access logs for this application" task :tail, :roles => :app do run "tail -f /var/log/engineyard/nginx/#{application}.access.log" do |channel, stream, data| puts "#{channel[:server]}: #{data}" unless data =~ /^10\.[01]\.0/ # skips lb pull pages break if stream == :err end end desc "Tail the nginx error logs on the app slices" task :tail_error, :roles => :app do run "tail -f /var/log/engineyard/nginx/error.log" do |channel, stream, data| puts "#{channel[:server]}: #{data}" unless data =~ /^10\.[01]\.0/ # skips lb pull pages break if stream == :err end end end end
Version data entries
18 entries across 18 versions & 1 rubygems