imagery: move notify to after create
authorGrant Slater <git@firefishy.com>
Wed, 5 Sep 2018 22:30:55 +0000 (23:30 +0100)
committerGrant Slater <git@firefishy.com>
Wed, 5 Sep 2018 22:30:55 +0000 (23:30 +0100)
cookbooks/imagery/resources/layer.rb

index 6057ede0088f1efd75584358dc6582e5a4a07114..ad41ecd4eb6e91d1f263d39f8a88dd532e80fafc 100644 (file)
@@ -61,7 +61,6 @@ action :create do
     group "root"
     mode 0o644
     variables new_resource.to_hash
-    notifies :restart, "service[mapserv-fcgi-#{new_resource.site}]"
   end
 
   # Disable legacy service
@@ -116,4 +115,5 @@ end
 def after_created
   notifies :create, "imagery_site[#{site}]"
   notifies :reload, "service[nginx]"
+  notifies :restart, "service[mapserv-fcgi-#{site}]"
 end