From: Grant Slater Date: Wed, 12 Feb 2025 14:36:56 +0000 (+0000) Subject: systemd: Add limit core dump support X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/d9c688a5eb41acff0736bfa8a98a78ca9c7960e5?ds=sidebyside systemd: Add limit core dump support --- diff --git a/cookbooks/systemd/resources/service.rb b/cookbooks/systemd/resources/service.rb index 11ca0e28c..8b380c306 100644 --- a/cookbooks/systemd/resources/service.rb +++ b/cookbooks/systemd/resources/service.rb @@ -36,6 +36,7 @@ property :notify_access, String, :is => %w[none main exec all] property :limit_nofile, Integer property :limit_as, [Integer, String] property :limit_cpu, [Integer, String] +property :limit_core, [Integer, String] property :memory_low, [Integer, String] property :memory_high, [Integer, String] property :memory_max, [Integer, String] diff --git a/cookbooks/systemd/templates/default/service.erb b/cookbooks/systemd/templates/default/service.erb index 92d70de85..eee220691 100644 --- a/cookbooks/systemd/templates/default/service.erb +++ b/cookbooks/systemd/templates/default/service.erb @@ -45,6 +45,9 @@ LimitAS=<%= @limit_as %> <% if @limit_cpu -%> LimitCPU=<%= @limit_cpu %> <% end -%> +<% if @limit_core -%> +LimitCORE=<%= @limit_core %> +<% end -%> <% if @memory_low -%> MemoryLow=<%= @memory_low %> <% end -%>