X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/09bf3029df3d69817a84fae6cbbddbac696376aa..15219fdfa4b2d38fd413e91e5aab3d409449f26a:/cookbooks/systemd/templates/default/service.erb diff --git a/cookbooks/systemd/templates/default/service.erb b/cookbooks/systemd/templates/default/service.erb index 151b01790..0d4abbcef 100644 --- a/cookbooks/systemd/templates/default/service.erb +++ b/cookbooks/systemd/templates/default/service.erb @@ -1,7 +1,9 @@ # DO NOT EDIT - This file is being maintained by Chef [Unit] +<% if @description -%> Description=<%= @description %> +<% end -%> <% if @after -%> After=<%= Array(@after).join(" ") %> <% end -%> @@ -10,7 +12,9 @@ Wants=<%= Array(@wants).join(" ") %> <% end -%> [Service] +<% if @type -%> Type=<%= @type %> +<% end -%> <% if @limit_nofile -%> LimitNOFILE=<%= @limit_nofile %> <% end -%> @@ -47,7 +51,9 @@ WorkingDirectory=<%= @working_directory %> <% if @exec_start_pre -%> ExecStartPre=<%= @exec_start_pre %> <% end -%> +<% if @exec_start -%> ExecStart=<%= @exec_start %> +<% end -%> <% if @exec_start_post -%> ExecStartPost=<%= @exec_start_post %> <% end -%> @@ -87,9 +93,15 @@ ProtectSystem=<%= @protect_system %> <% if @protect_home -%> ProtectHome=<%= @protect_home %> <% end -%> +<% if @restrict_address_families -%> +RestrictAddressFamilies=<%= Array(@restrict_address_families).join(" ") %> +<% end -%> <% if @no_new_privileges -%> NoNewPrivileges=<%= @no_new_privileges %> <% end -%> +<% if @tasks_max -%> +TasksMax=<%= @tasks_max %> +<% end -%> <% if @success_exit_status -%> SuccessExitStatus=<%= Array(@success_exit_status).join(" ") %> <% end -%> @@ -102,6 +114,20 @@ TimeoutSec=<%= @timeout_sec %> <% if @pid_file -%> PIDFile=<%= @pid_file %> <% end -%> +<% if @nice -%> +Nice=<%= @nice %> +<% end -%> +<% if @io_scheduling_class -%> +IOSchedulingClass=<%= @io_scheduling_class %> +<% end -%> +<% if @io_scheduling_priority -%> +IOSchedulingPriority=<%= @io_scheduling_priority %> +<% end -%> +<% if @kill_mode -%> +KillMode=<%= @kill_mode %> +<% end -%> +<% unless @dropin -%> [Install] WantedBy=multi-user.target +<% end -%>