From: Grant Slater Date: Tue, 5 Oct 2021 23:47:53 +0000 (+0100) Subject: Add systemd service RuntimeMaxSec X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/1bc290ecce828f4a28d096c383815d2aa9199253 Add systemd service RuntimeMaxSec --- diff --git a/cookbooks/systemd/resources/service.rb b/cookbooks/systemd/resources/service.rb index abfacb650..4b53051d3 100644 --- a/cookbooks/systemd/resources/service.rb +++ b/cookbooks/systemd/resources/service.rb @@ -48,6 +48,7 @@ property :exec_stop, String property :exec_reload, String property :runtime_directory, String property :runtime_directory_mode, Integer +property :runtime_max_sec, Integer property :standard_input, String, :is => %w[null tty tty-force tty-fail socket] property :standard_output, String, diff --git a/cookbooks/systemd/templates/default/service.erb b/cookbooks/systemd/templates/default/service.erb index eff7b8308..7786ab609 100644 --- a/cookbooks/systemd/templates/default/service.erb +++ b/cookbooks/systemd/templates/default/service.erb @@ -93,6 +93,9 @@ RuntimeDirectory=<%= @runtime_directory %> <% if @runtime_directory_mode -%> RuntimeDirectoryMode=<%= sprintf("0%o", @runtime_directory_mode) %> <% end -%> +<% if @runtime_max_sec -%> +RuntimeMaxSec=<%= @runtime_max_sec %> +<% end -%> <% if @standard_input -%> StandardInput=<%= @standard_input %> <% end -%>