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