X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/c4abdded449ba9f2905f78fb9d2c017a49f99b17..ab9cda839738c28e54d47676383d054b0680d06a:/cookbooks/nginx/definitions/nginx_site.rb diff --git a/cookbooks/nginx/definitions/nginx_site.rb b/cookbooks/nginx/definitions/nginx_site.rb index 51228d632..f6e1f3a4d 100644 --- a/cookbooks/nginx/definitions/nginx_site.rb +++ b/cookbooks/nginx/definitions/nginx_site.rb @@ -30,14 +30,12 @@ define :nginx_site, :action => [ :create ], :variables => {} do group "root" mode 0644 variables params[:variables].merge(:name => name, :directory => directory) - notifies :reload, resources(:service => "nginx") + notifies :restart, "service[nginx]" end - end - - if site_action.include?(:delete) + elsif site_action.include?(:delete) file "/etc/nginx/conf.d/#{name}.conf" do action :delete - notifies :restart, resources(:service => "nginx") + notifies :restart, "service[nginx]" end end end