]> git.openstreetmap.org Git - chef.git/commitdiff
Add support for additional systemd service timeout options
authorTom Hughes <tom@compton.nu>
Fri, 8 Jul 2022 07:49:13 +0000 (08:49 +0100)
committerTom Hughes <tom@compton.nu>
Fri, 8 Jul 2022 07:49:13 +0000 (08:49 +0100)
cookbooks/systemd/resources/service.rb
cookbooks/systemd/templates/default/service.erb

index 4b53051d39c176364d13f3d2bf8794303f4aa25e..aa575189defcf9c495d7a972a55821e8072f984c 100644 (file)
@@ -69,6 +69,9 @@ property :inaccessible_paths, [String, Array]
 property :restrict_address_families, [String, Array]
 property :no_new_privileges, [true, false]
 property :tasks_max, Integer
+property :timeout_start_sec, Integer
+property :timeout_stop_sec, Integer
+property :timeout_abort_sec, Integer
 property :timeout_sec, Integer
 property :pid_file, String
 property :nice, Integer
index 7786ab6090e0a93102c4c1867e3a66a55df8e41b..4fba56c0f7cdc905df3b80980bbd438766eeec48 100644 (file)
@@ -144,6 +144,15 @@ SuccessExitStatus=<%= Array(@success_exit_status).join(" ") %>
 <% if @restart -%>
 Restart=<%= @restart %>
 <% end -%>
+<% if @timeout_start_sec -%>
+TimeoutStartSec=<%= @timeout_start_sec %>
+<% end -%>
+<% if @timeout_stop_sec -%>
+TimeoutStopSec=<%= @timeout_stop_sec %>
+<% end -%>
+<% if @timeout_abort_sec -%>
+TimeoutAbortSec=<%= @timeout_abort_sec %>
+<% end -%>
 <% if @timeout_sec -%>
 TimeoutSec=<%= @timeout_sec %>
 <% end -%>