1 # DO NOT EDIT - This file is being maintained by Chef
5 Description=<%= @description %>
7 <% if @condition_path_exists -%>
8 ConditionPathExists=<%= Array(@condition_path_exists).join(" ") %>
10 <% if @condition_path_exists_glob -%>
11 ConditionPathExistsGlob=<%= Array(@condition_path_exists_glob).join(" ") %>
14 After=<%= Array(@after).join(" ") %>
17 Conflicts=<%= Array(@conflicts).join(" ") %>
20 Wants=<%= Array(@wants).join(" ") %>
27 <% if @limit_nofile -%>
28 LimitNOFILE=<%= @limit_nofile %>
31 LimitAS=<%= @limit_as %>
34 LimitCPU=<%= @limit_cpu %>
37 MemoryLow=<%= @memory_low %>
39 <% if @memory_high -%>
40 MemoryHigh=<%= @memory_high %>
43 MemoryMax=<%= @memory_max %>
45 <% @environment.each do |name,value| -%>
46 Environment="<%= name %>=<%= value %>"
48 <% if @environment_file -%>
49 EnvironmentFile=<%= @environment_file %>
57 <% if @dynamic_user -%>
58 DynamicUser=<%= @dynamic_user %>
60 <% if @working_directory -%>
61 WorkingDirectory=<%= @working_directory %>
63 <% if @exec_start_pre -%>
67 <% Array(@exec_start_pre).each do |exec_start_pre| -%>
68 ExecStartPre=<%= exec_start_pre %>
75 <% Array(@exec_start).each do |exec_start| -%>
76 ExecStart=<%= exec_start %>
79 <% if @exec_start_post -%>
83 <% Array(@exec_start_post).each do |exec_start_post| -%>
84 ExecStartPost=<%= exec_start_post %>
91 ExecStop=<%= @exec_stop %>
93 <% if @exec_reload -%>
97 ExecReload=<%= @exec_reload %>
99 <% if @runtime_directory -%>
100 RuntimeDirectory=<%= @runtime_directory %>
102 <% if @runtime_directory_mode -%>
103 RuntimeDirectoryMode=<%= sprintf("0%o", @runtime_directory_mode) %>
105 <% if @runtime_max_sec -%>
106 RuntimeMaxSec=<%= @runtime_max_sec %>
108 <% if @standard_input -%>
109 StandardInput=<%= @standard_input %>
111 <% if @standard_output -%>
112 StandardOutput=<%= @standard_output %>
114 <% if @standard_error -%>
115 StandardError=<%= @standard_error %>
117 <% if @protect_proc && node[:lsb][:release].to_f >= 22.04 -%>
118 ProtectProc=<%= @protect_proc %>
120 <% if @proc_subset && node[:lsb][:release].to_f >= 22.04 -%>
121 ProcSubset=<%= @proc_subset %>
123 <% if @no_new_privileges -%>
124 NoNewPrivileges=<%= @no_new_privileges %>
126 <% if @capability_bounding_set -%>
127 CapabilityBoundingSet=<%= Array(@capability_bounding_set).sort.uniq.join(" ") %>
129 <% if @protect_system -%>
130 ProtectSystem=<%= @protect_system %>
132 <% if @protect_home -%>
133 ProtectHome=<%= @protect_home %>
135 <% if @read_write_paths -%>
136 ReadWritePaths=<%= Array(@read_write_paths).sort.uniq.join(" ") %>
138 <% if @read_only_paths -%>
139 ReadOnlyPaths=<%= Array(@read_only_paths).sort.uniq.join(" ") %>
141 <% if @inaccessible_paths -%>
142 InaccessiblePaths=<%= Array(@inaccessible_paths).sort.uniq.join(" ") %>
144 <% if @private_tmp -%>
145 PrivateTmp=<%= @private_tmp %>
147 <% if @private_devices -%>
148 PrivateDevices=<%= @private_devices %>
150 <% if @private_network -%>
151 PrivateNetwork=<%= @private_network %>
153 <% if @private_ipc && node[:lsb][:release].to_f >= 22.04 -%>
154 PrivateIPC=<%= @private_ipc %>
156 <% if @private_users -%>
157 PrivateUsers=<%= @private_users %>
159 <% if @protect_hostname -%>
160 ProtectHostname=<%= @protect_hostname %>
162 <% if @protect_clock -%>
163 ProtectClock=<%= @protect_clock %>
165 <% if @protect_kernel_tunables -%>
166 ProtectKernelTunables=<%= @protect_kernel_tunables %>
168 <% if @protect_kernel_modules -%>
169 ProtectKernelModules=<%= @protect_kernel_modules %>
171 <% if @protect_kernel_logs -%>
172 ProtectKernelLogs=<%= @protect_kernel_logs %>
174 <% if @protect_control_groups -%>
175 ProtectControlGroups=<%= @protect_control_groups %>
177 <% if @restrict_address_families -%>
178 RestrictAddressFamilies=<%= Array(@restrict_address_families).sort.uniq.join(" ") %>
180 <% if @restrict_namespaces -%>
181 RestrictNamespaces=<%= Array(@restrict_namespaces).sort.uniq.join(" ") %>
183 <% if @lock_personality -%>
184 LockPersonality=<%= @lock_personality %>
186 <% if @memory_deny_write_execute -%>
187 MemoryDenyWriteExecute=<%= @memory_deny_write_execute %>
189 <% if @restrict_realtime -%>
190 RestrictRealtime=<%= @restrict_realtime %>
192 <% if @restrict_suid_sgid -%>
193 RestrictSUIDSGID=<%= @restrict_suid_sgid %>
195 <% if @remove_ipc -%>
196 RemoveIPC=<%= @remove_ipc %>
198 <% if @system_call_filter -%>
199 SystemCallFilter=<%= Array(@system_call_filter).join(" ") %>
201 <% if @system_call_architectures -%>
202 SystemCallArchitectures=<%= Array(@system_call_architectures).sort.uniq.join(" ") %>
205 TasksMax=<%= @tasks_max %>
207 <% if @success_exit_status -%>
208 SuccessExitStatus=<%= Array(@success_exit_status).join(" ") %>
211 Restart=<%= @restart %>
213 <% if @timeout_start_sec -%>
214 TimeoutStartSec=<%= @timeout_start_sec %>
216 <% if @timeout_stop_sec -%>
217 TimeoutStopSec=<%= @timeout_stop_sec %>
219 <% if @timeout_abort_sec -%>
220 TimeoutAbortSec=<%= @timeout_abort_sec %>
222 <% if @timeout_sec -%>
223 TimeoutSec=<%= @timeout_sec %>
226 PIDFile=<%= @pid_file %>
231 <% if @io_scheduling_class -%>
232 IOSchedulingClass=<%= @io_scheduling_class %>
234 <% if @io_scheduling_priority -%>
235 IOSchedulingPriority=<%= @io_scheduling_priority %>
238 KillMode=<%= @kill_mode %>
240 <% unless @dropin -%>
243 WantedBy=multi-user.target