Sha256: de8380ed47da9b7e6f6fe3b7eec49797e02b414ab42ff5d5a10ac3baffb4c382

Contents?: true

Size: 1.04 KB

Versions: 10

Compression:

Stored size: 1.04 KB

Contents

etc_nginx = '/etc/nginx'

if tagged?('debian|ubuntu')
  sites_available = 'sites-available'
  sites_enabled = 'sites-enabled'
end


site_path = "#{etc_nginx}/#{sites_available}/rmails"
locals = {
    :hostnames => lookup('hostname'),
    :awstats_out => lookup('awstats#data_path'),
    :rmails_root => rails_root
}
render(
    :file   => "#{dist}nginx/rmails.erb",
    :to     => site_path,
    :mode   => 0664,
    :locals => locals
)
shell_manager.chown('root', 'rmails', site_path)
# make path for access.log
shell_manager.mkdir_p "/var/log/nginx/#{lookup('hostname')}"


unless File.symlink? "#{etc_nginx}/#{sites_enabled}/0_rmails"
  shell_manager.ln_s  "#{etc_nginx}/#{sites_available}/rmails",
                      "#{etc_nginx}/#{sites_enabled}/0_rmails"
end

shell_manager.mkdir_p "/etc/thin"
locals = {
    :rmails_root => rails_root
}
render(
    :file   => "#{dist}rmails/thin.yml.erb",
    :to     => "/etc/thin/rmails.yml",
    :mode   => 0664,
    :locals => locals,
    :backup => false
)
shell_manager.chown('root', 'rmails', "/etc/thin/rmails.yml")

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rmails-0.2.5 system/recipes/05_setup_nginx.rb
rmails-0.2.4 system/recipes/05_setup_nginx.rb
rmails-0.2.3 system/recipes/05_setup_nginx.rb
rmails-0.2.2 system/recipes/05_setup_nginx.rb
rmails-0.2.1 system/recipes/05_setup_nginx.rb
rmails-0.2.0 system/recipes/05_setup_nginx.rb
rmails-0.1.6 system/recipes/05_setup_nginx.rb
rmails-0.1.5 system/recipes/05_setup_nginx.rb
rmails-0.1.4 system/recipes/05_setup_nginx.rb
rmails-0.1.3 system/recipes/05_setup_nginx.rb