Skip to content

Commit

Permalink
imagery: limit mapserver restart to only where it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
Firefishy committed Dec 3, 2024
1 parent b173c49 commit f77abe2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cookbooks/imagery/resources/site.rb
Original file line number Diff line number Diff line change
Expand Up @@ -146,16 +146,19 @@
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"
not_if { new_resource.uses_tiler }
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
Expand Down

0 comments on commit f77abe2

Please sign in to comment.