]> git.openstreetmap.org Git - chef.git/commitdiff
systemd: add RuntimeDirectoryPreserve support
authorGrant Slater <github@firefishy.com>
Thu, 9 May 2024 00:17:49 +0000 (01:17 +0100)
committerGrant Slater <github@firefishy.com>
Thu, 9 May 2024 00:17:49 +0000 (01:17 +0100)
cookbooks/systemd/resources/service.rb
cookbooks/systemd/templates/default/service.erb

index 4a2480489d63a02b7e220e901fedc631d09ccffa..3a9f0b893e2d19337b755dc29dac4d821039d898 100644 (file)
@@ -55,6 +55,7 @@ property :exec_reload, String
 property :runtime_max_sec, Integer
 property :runtime_directory, String
 property :runtime_directory_mode, Integer
+property :runtime_directory_preserve, [true, false, String]
 property :state_directory, String
 property :state_directory_mode, Integer
 property :cache_directory, String
index b979703dd709da3a9a5690b2ed92fa2f2ba21e85..197d8bddf80dd6972be5d9eb550f69f6d6d8ff79 100644 (file)
@@ -127,6 +127,9 @@ RuntimeDirectory=<%= @runtime_directory %>
 <% if @runtime_directory_mode -%>
 RuntimeDirectoryMode=<%= sprintf("0%o", @runtime_directory_mode) %>
 <% end -%>
+<% if @runtime_directory_preserve -%>
+RuntimeDirectoryPreserve=<%= @runtime_directory_preserve %>
+<% end -%>
 <% if @state_directory -%>
 StateDirectory=<%= @state_directory %>
 <% end -%>