]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/systemd/templates/default/service.erb
Add support for additional systemd service timeout options
[chef.git] / cookbooks / systemd / templates / default / service.erb
index 0d4abbcefe493eedab4a3679a9829bcb78f82a2e..4fba56c0f7cdc905df3b80980bbd438766eeec48 100644 (file)
@@ -4,9 +4,18 @@
 <% if @description -%>
 Description=<%= @description %>
 <% end -%>
+<% if @condition_path_exists -%>
+ConditionPathExists=<%= Array(@condition_path_exists).join(" ") %>
+<% end -%>
+<% if @condition_path_exists_glob -%>
+ConditionPathExistsGlob=<%= Array(@condition_path_exists_glob).join(" ") %>
+<% end -%>
 <% if @after -%>
 After=<%= Array(@after).join(" ") %>
 <% end -%>
+<% if @conflicts -%>
+Conflicts=<%= Array(@conflicts).join(" ") %>
+<% end -%>
 <% if @wants -%>
 Wants=<%= Array(@wants).join(" ") %>
 <% end -%>
@@ -49,18 +58,33 @@ Group=<%= @group %>
 WorkingDirectory=<%= @working_directory %>
 <% end -%>
 <% if @exec_start_pre -%>
+<% if @dropin -%>
+ExecStartPre=
+<% end -%>
 ExecStartPre=<%= @exec_start_pre %>
 <% end -%>
 <% if @exec_start -%>
+<% if @dropin -%>
+ExecStart=
+<% end -%>
 ExecStart=<%= @exec_start %>
 <% end -%>
 <% if @exec_start_post -%>
+<% if @dropin -%>
+ExecStartPost=
+<% end -%>
 ExecStartPost=<%= @exec_start_post %>
 <% end -%>
 <% if @exec_stop -%>
+<% if @dropin -%>
+ExecStop=
+<% end -%>
 ExecStop=<%= @exec_stop %>
 <% end -%>
 <% if @exec_reload -%>
+<% if @dropin -%>
+ExecReload=
+<% end -%>
 ExecReload=<%= @exec_reload %>
 <% end -%>
 <% if @runtime_directory -%>
@@ -69,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 -%>
@@ -93,6 +120,15 @@ ProtectSystem=<%= @protect_system %>
 <% if @protect_home -%>
 ProtectHome=<%= @protect_home %>
 <% end -%>
+<% if @read_write_paths -%>
+ReadWritePaths=<%= Array(@read_write_paths).join(" ") %>
+<% end -%>
+<% if @read_only_paths -%>
+ReadOnlyPaths=<%= Array(@read_only_paths).join(" ") %>
+<% end -%>
+<% if @inaccessible_paths -%>
+InaccessiblePaths=<%= Array(@inaccessible_paths).join(" ") %>
+<% end -%>
 <% if @restrict_address_families -%>
 RestrictAddressFamilies=<%= Array(@restrict_address_families).join(" ") %>
 <% end -%>
@@ -108,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 -%>