Sha256: 39eb99b781f0a418dffbb60c654e1a565ee390fea260f28d77199bf00812e72f

Contents?: true

Size: 580 Bytes

Versions: 9

Compression:

Stored size: 580 Bytes

Contents

define :nginx_site, :enable => true do
  if params[:enable]
    execute "nxensite #{params[:name]}" do
      command "/usr/sbin/nxensite #{params[:name]}"
      notifies :reload, resources(:service => "nginx")
      not_if do ::File.symlink?("#{node[:nginx][:dir]}/sites-enabled/#{params[:name]}") end
    end
  else
    execute "nxdissite #{params[:name]}" do
      command "/usr/sbin/nxdissite #{params[:name]}"
      notifies :reload, resources(:service => "nginx")
      only_if do ::File.symlink?("#{node[:nginx][:dir]}/sites-enabled/#{params[:name]}") end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
mana-0.0.10 cookbooks/nginx/definitions/nginx_site.rb
mana-0.0.8 cookbooks/nginx/definitions/nginx_site.rb
mana-0.0.7 cookbooks/nginx/definitions/nginx_site.rb
mana-0.0.6 cookbooks/nginx/definitions/nginx_site.rb
mana-0.0.5 cookbooks/nginx/definitions/nginx_site.rb
mana-0.0.4 cookbooks/nginx/definitions/nginx_site.rb
mana-0.0.3 cookbooks/nginx/definitions/nginx_site.rb
mana-0.0.2 cookbooks/nginx/definitions/nginx_site.rb
mana-0.0.1 cookbooks/nginx/definitions/nginx_site.rb