]> git.openstreetmap.org Git - chef.git/commitdiff
systemd: add killmode support
authorGrant Slater <git@firefishy.com>
Tue, 3 Dec 2019 22:23:48 +0000 (22:23 +0000)
committerGrant Slater <git@firefishy.com>
Tue, 3 Dec 2019 22:23:48 +0000 (22:23 +0000)
cookbooks/systemd/resources/service.rb
cookbooks/systemd/templates/default/service.erb

index 4758f7af57f52b07fa056d7536b146b3246d8b5c..dfb6864c5acf180bcaae39bfb18a8fb467609abe 100644 (file)
@@ -65,6 +65,8 @@ property :pid_file, String
 property :nice, Integer
 property :io_scheduling_class, [Integer, String]
 property :io_scheduling_priority, Integer
+property :kill_mode, String,
+         :is => %w[control-group process mixed none]
 
 action :create do
   service_variables = new_resource.to_hash
index 188404508470b65fb3c9f69e672a0c81a06a6796..0d4abbcefe493eedab4a3679a9829bcb78f82a2e 100644 (file)
@@ -123,6 +123,9 @@ IOSchedulingClass=<%= @io_scheduling_class %>
 <% if @io_scheduling_priority -%>
 IOSchedulingPriority=<%= @io_scheduling_priority %>
 <% end -%>
+<% if @kill_mode -%>
+KillMode=<%= @kill_mode %>
+<% end -%>
 <% unless @dropin -%>
 
 [Install]