X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/e20fc2961c6d4dca7387cd0b5a6dc61a8fef4664..fedddc7182f1f441b607ab8eb7644ac60924f129:/cookbooks/systemd/templates/default/service.erb diff --git a/cookbooks/systemd/templates/default/service.erb b/cookbooks/systemd/templates/default/service.erb index 188404508..eff7b8308 100644 --- a/cookbooks/systemd/templates/default/service.erb +++ b/cookbooks/systemd/templates/default/service.erb @@ -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 -%> @@ -93,6 +117,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 -%> @@ -123,6 +156,9 @@ IOSchedulingClass=<%= @io_scheduling_class %> <% if @io_scheduling_priority -%> IOSchedulingPriority=<%= @io_scheduling_priority %> <% end -%> +<% if @kill_mode -%> +KillMode=<%= @kill_mode %> +<% end -%> <% unless @dropin -%> [Install]