]> git.openstreetmap.org Git - chef.git/commitdiff
imagery: limit mapserver restart to only where it exists
authorGrant Slater <github@firefishy.com>
Tue, 3 Dec 2024 13:25:04 +0000 (13:25 +0000)
committerGrant Slater <github@firefishy.com>
Tue, 3 Dec 2024 13:25:04 +0000 (13:25 +0000)
cookbooks/imagery/resources/site.rb

index 23771a4fcfd4409d42b485d731051f51fa540b76..d8b8e11e6e104df20a4418bbc4c09f1a487fa06c 100644 (file)
@@ -146,16 +146,19 @@ action :create do
     exec_start "/bin/systemctl --quiet stop mapserv-fcgi-#{new_resource.site}.service"
     sandbox true
     restrict_address_families "AF_UNIX"
     exec_start "/bin/systemctl --quiet stop mapserv-fcgi-#{new_resource.site}.service"
     sandbox true
     restrict_address_families "AF_UNIX"
+    not_if { new_resource.uses_tiler }
   end
 
   systemd_timer "mapserv-fcgi-#{new_resource.site}-stop" do
     on_boot_sec "10m"
     on_unit_inactive_sec "1h"
     randomized_delay_sec "10m"
   end
 
   systemd_timer "mapserv-fcgi-#{new_resource.site}-stop" do
     on_boot_sec "10m"
     on_unit_inactive_sec "1h"
     randomized_delay_sec "10m"
+    not_if { new_resource.uses_tiler }
   end
 
   service "mapserv-fcgi-#{new_resource.site}-stop.timer" do
     action [:enable, :start]
   end
 
   service "mapserv-fcgi-#{new_resource.site}-stop.timer" do
     action [:enable, :start]
+    not_if { new_resource.uses_tiler }
   end
 
   ssl_certificate new_resource.site do
   end
 
   ssl_certificate new_resource.site do