Sha256: 566e27bb5f5488dd2d1622a9005ae84e6b329d12f34e94a156bdb63097784cbf

Contents?: true

Size: 675 Bytes

Versions: 11

Compression:

Stored size: 675 Bytes

Contents

namespace :sphinx do 
  
  # Log rotate tasks
  namespace :logrotate do
    desc <<-DESC
    Install logrotated conf for sphinx.
  
    *sphinx_logrotate_path*: Sphinx logrotate paths. _Defaults to <tt>{shared_path}/log/query.log {shared_path}/log/searchd.log</tt>_
    DESC
    task :install do
      fetch_or_default(:sphinx_logrotate_path, "#{shared_path}/log/query.log #{shared_path}/log/searchd.log")
    
      set :logrotate_name, "sphinx_#{application}"
      set :logrotate_log_path, sphinx_logrotate_path
      set :logrotate_options, [ { :rotate => 7 }, :daily, :missingok, :notifempty, :copytruncate ]
    
      logrotated.install_conf      
    end
  end
  
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
calas-capitate-0.3.6 lib/recipes/logrotate/sphinx.rb
capitate-0.2.14 lib/recipes/logrotate/sphinx.rb
capitate-0.2.15 lib/recipes/logrotate/sphinx.rb
capitate-0.2.13 lib/recipes/logrotate/sphinx.rb
capitate-0.2.11 lib/recipes/logrotate/sphinx.rb
capitate-0.3.3 lib/recipes/logrotate/sphinx.rb
capitate-0.3.1 lib/recipes/logrotate/sphinx.rb
capitate-0.3.2 lib/recipes/logrotate/sphinx.rb
capitate-0.3.4 lib/recipes/logrotate/sphinx.rb
capitate-0.3.5 lib/recipes/logrotate/sphinx.rb
capitate-0.3.6 lib/recipes/logrotate/sphinx.rb