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