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(" ") %>
23 Requires=<%= Array(@requires).join(" ") %>
25 <% if @joins_namespace_of -%>
26 JoinsNamespaceOf=<%= Array(@joins_namespace_of).join(" ") %>
28 <% if @stop_when_unneeded -%>
29 StopWhenUnneeded=<%= @stop_when_unneeded %>
36 <% if @notify_access -%>
37 NotifyAccess=<%= @notify_access %>
39 <% if @limit_nofile -%>
40 LimitNOFILE=<%= @limit_nofile %>
43 LimitAS=<%= @limit_as %>
46 LimitCPU=<%= @limit_cpu %>
49 LimitCORE=<%= @limit_core %>
52 MemoryLow=<%= @memory_low %>
54 <% if @memory_high -%>
55 MemoryHigh=<%= @memory_high %>
58 MemoryMax=<%= @memory_max %>
60 <% @environment.each do |name,value| -%>
61 Environment="<%= name %>=<%= value %>"
63 <% if @environment_file -%>
64 EnvironmentFile=<%= @environment_file %>
72 <% if @dynamic_user -%>
73 DynamicUser=<%= @dynamic_user %>
75 <% if @working_directory -%>
76 WorkingDirectory=<%= @working_directory %>
81 <% if @exec_start_pre -%>
85 <% Array(@exec_start_pre).each do |exec_start_pre| -%>
86 ExecStartPre=<%= exec_start_pre %>
93 <% Array(@exec_start).each do |exec_start| -%>
94 ExecStart=<%= exec_start %>
97 <% if @exec_start_post -%>
101 <% Array(@exec_start_post).each do |exec_start_post| -%>
102 ExecStartPost=<%= exec_start_post %>
109 <% Array(@exec_stop).each do |exec_stop| -%>
110 ExecStop=<%= exec_stop %>
113 <% if @exec_stop_post -%>
117 <% Array(@exec_stop_post).each do |exec_stop_post| -%>
118 ExecStopPost=<%= exec_stop_post %>
121 <% if @exec_reload -%>
125 ExecReload=<%= @exec_reload %>
127 <% if @runtime_max_sec -%>
128 RuntimeMaxSec=<%= @runtime_max_sec %>
130 <% if @runtime_directory -%>
131 RuntimeDirectory=<%= @runtime_directory %>
133 <% if @runtime_directory_mode -%>
134 RuntimeDirectoryMode=<%= sprintf("0%o", @runtime_directory_mode) %>
136 <% if @runtime_directory_preserve -%>
137 RuntimeDirectoryPreserve=<%= @runtime_directory_preserve %>
139 <% if @state_directory -%>
140 StateDirectory=<%= @state_directory %>
142 <% if @state_directory_mode -%>
143 StateDirectoryMode=<%= sprintf("0%o", @state_directory_mode) %>
145 <% if @cache_directory -%>
146 CacheDirectory=<%= @cache_directory %>
148 <% if @cache_directory_mode -%>
149 CacheDirectoryMode=<%= sprintf("0%o", @cache_directory_mode) %>
151 <% if @logs_directory -%>
152 LogsDirectory=<%= @logs_directory %>
154 <% if @logs_directory_mode -%>
155 LogsDirectoryMode=<%= sprintf("0%o", @logs_directory_mode) %>
157 <% if @configuration_directory -%>
158 ConfigurationDirectory=<%= @configuration_directory %>
160 <% if @configuration_directory_mode -%>
161 ConfigurationDirectoryMode=<%= sprintf("0%o", @configuration_directory_mode) %>
163 <% if @standard_input -%>
164 StandardInput=<%= @standard_input %>
166 <% if @standard_output -%>
167 StandardOutput=<%= @standard_output %>
169 <% if @standard_error -%>
170 StandardError=<%= @standard_error %>
172 <% if @protect_proc && node[:lsb][:release].to_f >= 22.04 -%>
173 ProtectProc=<%= @protect_proc %>
175 <% if @proc_subset && node[:lsb][:release].to_f >= 22.04 -%>
176 ProcSubset=<%= @proc_subset %>
178 <% if @bind_paths -%>
179 BindPaths=<%= Array(@bind_paths).sort.uniq.join(" ") %>
181 <% if @bind_read_only_paths -%>
182 BindReadOnlyPaths=<%= Array(@bind_read_only_paths).sort.uniq.join(" ") %>
184 <% if @no_new_privileges -%>
185 NoNewPrivileges=<%= @no_new_privileges %>
187 <% if @capability_bounding_set -%>
188 CapabilityBoundingSet=<%= Array(@capability_bounding_set).sort.uniq.join(" ") %>
190 <% if @ambient_capabilities -%>
191 AmbientCapabilities=<%= Array(@ambient_capabilities).sort.uniq.join(" ") %>
193 <% if @protect_system -%>
194 ProtectSystem=<%= @protect_system %>
196 <% if @protect_home -%>
197 ProtectHome=<%= @protect_home %>
199 <% if @read_write_paths -%>
200 ReadWritePaths=<%= Array(@read_write_paths).sort.uniq.join(" ") %>
202 <% if @read_only_paths -%>
203 ReadOnlyPaths=<%= Array(@read_only_paths).sort.uniq.join(" ") %>
205 <% if @inaccessible_paths -%>
206 InaccessiblePaths=<%= Array(@inaccessible_paths).sort.uniq.join(" ") %>
208 <% if @private_tmp -%>
209 PrivateTmp=<%= @private_tmp %>
211 <% if @private_devices -%>
212 PrivateDevices=<%= @private_devices %>
214 <% if @private_network -%>
215 PrivateNetwork=<%= @private_network %>
217 <% if @private_ipc && node[:lsb][:release].to_f >= 22.04 -%>
218 PrivateIPC=<%= @private_ipc %>
220 <% if @private_users -%>
221 PrivateUsers=<%= @private_users %>
223 <% if @protect_hostname -%>
224 ProtectHostname=<%= @protect_hostname %>
226 <% if @protect_clock -%>
227 ProtectClock=<%= @protect_clock %>
229 <% if @protect_kernel_tunables -%>
230 ProtectKernelTunables=<%= @protect_kernel_tunables %>
232 <% if @protect_kernel_modules -%>
233 ProtectKernelModules=<%= @protect_kernel_modules %>
235 <% if @protect_kernel_logs -%>
236 ProtectKernelLogs=<%= @protect_kernel_logs %>
238 <% if @protect_control_groups -%>
239 ProtectControlGroups=<%= @protect_control_groups %>
241 <% if @restrict_address_families -%>
242 RestrictAddressFamilies=<%= Array(@restrict_address_families).sort.uniq.join(" ") %>
244 <% if @restrict_namespaces -%>
245 RestrictNamespaces=<%= Array(@restrict_namespaces).sort.uniq.join(" ") %>
247 <% if @lock_personality -%>
248 LockPersonality=<%= @lock_personality %>
250 <% if @memory_deny_write_execute -%>
251 MemoryDenyWriteExecute=<%= @memory_deny_write_execute %>
253 <% if @restrict_realtime -%>
254 RestrictRealtime=<%= @restrict_realtime %>
256 <% if @restrict_suid_sgid -%>
257 RestrictSUIDSGID=<%= @restrict_suid_sgid %>
259 <% if @remove_ipc -%>
260 RemoveIPC=<%= @remove_ipc %>
262 <% if @system_call_filter -%>
263 SystemCallFilter=<%= Array(@system_call_filter).join(" ") %>
265 <% if @system_call_architectures -%>
266 SystemCallArchitectures=<%= Array(@system_call_architectures).sort.uniq.join(" ") %>
269 TasksMax=<%= @tasks_max %>
271 <% if @success_exit_status -%>
272 SuccessExitStatus=<%= Array(@success_exit_status).join(" ") %>
275 Restart=<%= @restart %>
277 <% if @restart_sec -%>
278 RestartSec=<%= @restart_sec %>
280 <% if @timeout_start_sec -%>
281 TimeoutStartSec=<%= @timeout_start_sec %>
283 <% if @timeout_stop_sec -%>
284 TimeoutStopSec=<%= @timeout_stop_sec %>
286 <% if @timeout_abort_sec -%>
287 TimeoutAbortSec=<%= @timeout_abort_sec %>
289 <% if @timeout_sec -%>
290 TimeoutSec=<%= @timeout_sec %>
293 PIDFile=<%= @pid_file %>
298 <% if @io_scheduling_class -%>
299 IOSchedulingClass=<%= @io_scheduling_class %>
301 <% if @io_scheduling_priority -%>
302 IOSchedulingPriority=<%= @io_scheduling_priority %>
305 KillMode=<%= @kill_mode %>
307 <% unless @dropin -%>
310 WantedBy=multi-user.target