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 %>
75 <% if @exec_start_pre -%>
79 <% Array(@exec_start_pre).each do |exec_start_pre| -%>
80 ExecStartPre=<%= exec_start_pre %>
87 <% Array(@exec_start).each do |exec_start| -%>
88 ExecStart=<%= exec_start %>
91 <% if @exec_start_post -%>
95 <% Array(@exec_start_post).each do |exec_start_post| -%>
96 ExecStartPost=<%= exec_start_post %>
103 <% Array(@exec_stop).each do |exec_stop| -%>
104 ExecStop=<%= exec_stop %>
107 <% if @exec_stop_post -%>
111 <% Array(@exec_stop_post).each do |exec_stop_post| -%>
112 ExecStopPost=<%= exec_stop_post %>
115 <% if @exec_reload -%>
119 ExecReload=<%= @exec_reload %>
121 <% if @runtime_max_sec -%>
122 RuntimeMaxSec=<%= @runtime_max_sec %>
124 <% if @runtime_directory -%>
125 RuntimeDirectory=<%= @runtime_directory %>
127 <% if @runtime_directory_mode -%>
128 RuntimeDirectoryMode=<%= sprintf("0%o", @runtime_directory_mode) %>
130 <% if @runtime_directory_preserve -%>
131 RuntimeDirectoryPreserve=<%= @runtime_directory_preserve %>
133 <% if @state_directory -%>
134 StateDirectory=<%= @state_directory %>
136 <% if @state_directory_mode -%>
137 StateDirectoryMode=<%= sprintf("0%o", @state_directory_mode) %>
139 <% if @cache_directory -%>
140 CacheDirectory=<%= @cache_directory %>
142 <% if @cache_directory_mode -%>
143 CacheDirectoryMode=<%= sprintf("0%o", @cache_directory_mode) %>
145 <% if @logs_directory -%>
146 LogsDirectory=<%= @logs_directory %>
148 <% if @logs_directory_mode -%>
149 LogsDirectoryMode=<%= sprintf("0%o", @logs_directory_mode) %>
151 <% if @configuration_directory -%>
152 ConfigurationDirectory=<%= @configuration_directory %>
154 <% if @configuration_directory_mode -%>
155 ConfigurationDirectoryMode=<%= sprintf("0%o", @configuration_directory_mode) %>
157 <% if @standard_input -%>
158 StandardInput=<%= @standard_input %>
160 <% if @standard_output -%>
161 StandardOutput=<%= @standard_output %>
163 <% if @standard_error -%>
164 StandardError=<%= @standard_error %>
166 <% if @protect_proc && node[:lsb][:release].to_f >= 22.04 -%>
167 ProtectProc=<%= @protect_proc %>
169 <% if @proc_subset && node[:lsb][:release].to_f >= 22.04 -%>
170 ProcSubset=<%= @proc_subset %>
172 <% if @bind_paths -%>
173 BindPaths=<%= Array(@bind_paths).sort.uniq.join(" ") %>
175 <% if @bind_read_only_paths -%>
176 BindReadOnlyPaths=<%= Array(@bind_read_only_paths).sort.uniq.join(" ") %>
178 <% if @no_new_privileges -%>
179 NoNewPrivileges=<%= @no_new_privileges %>
181 <% if @capability_bounding_set -%>
182 CapabilityBoundingSet=<%= Array(@capability_bounding_set).sort.uniq.join(" ") %>
184 <% if @ambient_capabilities -%>
185 AmbientCapabilities=<%= Array(@ambient_capabilities).sort.uniq.join(" ") %>
187 <% if @protect_system -%>
188 ProtectSystem=<%= @protect_system %>
190 <% if @protect_home -%>
191 ProtectHome=<%= @protect_home %>
193 <% if @read_write_paths -%>
194 ReadWritePaths=<%= Array(@read_write_paths).sort.uniq.join(" ") %>
196 <% if @read_only_paths -%>
197 ReadOnlyPaths=<%= Array(@read_only_paths).sort.uniq.join(" ") %>
199 <% if @inaccessible_paths -%>
200 InaccessiblePaths=<%= Array(@inaccessible_paths).sort.uniq.join(" ") %>
202 <% if @private_tmp -%>
203 PrivateTmp=<%= @private_tmp %>
205 <% if @private_devices -%>
206 PrivateDevices=<%= @private_devices %>
208 <% if @private_network -%>
209 PrivateNetwork=<%= @private_network %>
211 <% if @private_ipc && node[:lsb][:release].to_f >= 22.04 -%>
212 PrivateIPC=<%= @private_ipc %>
214 <% if @private_users -%>
215 PrivateUsers=<%= @private_users %>
217 <% if @protect_hostname -%>
218 ProtectHostname=<%= @protect_hostname %>
220 <% if @protect_clock -%>
221 ProtectClock=<%= @protect_clock %>
223 <% if @protect_kernel_tunables -%>
224 ProtectKernelTunables=<%= @protect_kernel_tunables %>
226 <% if @protect_kernel_modules -%>
227 ProtectKernelModules=<%= @protect_kernel_modules %>
229 <% if @protect_kernel_logs -%>
230 ProtectKernelLogs=<%= @protect_kernel_logs %>
232 <% if @protect_control_groups -%>
233 ProtectControlGroups=<%= @protect_control_groups %>
235 <% if @restrict_address_families -%>
236 RestrictAddressFamilies=<%= Array(@restrict_address_families).sort.uniq.join(" ") %>
238 <% if @restrict_namespaces -%>
239 RestrictNamespaces=<%= Array(@restrict_namespaces).sort.uniq.join(" ") %>
241 <% if @lock_personality -%>
242 LockPersonality=<%= @lock_personality %>
244 <% if @memory_deny_write_execute -%>
245 MemoryDenyWriteExecute=<%= @memory_deny_write_execute %>
247 <% if @restrict_realtime -%>
248 RestrictRealtime=<%= @restrict_realtime %>
250 <% if @restrict_suid_sgid -%>
251 RestrictSUIDSGID=<%= @restrict_suid_sgid %>
253 <% if @remove_ipc -%>
254 RemoveIPC=<%= @remove_ipc %>
256 <% if @system_call_filter -%>
257 SystemCallFilter=<%= Array(@system_call_filter).join(" ") %>
259 <% if @system_call_architectures -%>
260 SystemCallArchitectures=<%= Array(@system_call_architectures).sort.uniq.join(" ") %>
263 TasksMax=<%= @tasks_max %>
265 <% if @success_exit_status -%>
266 SuccessExitStatus=<%= Array(@success_exit_status).join(" ") %>
269 Restart=<%= @restart %>
271 <% if @restart_sec -%>
272 RestartSec=<%= @restart_sec %>
274 <% if @timeout_start_sec -%>
275 TimeoutStartSec=<%= @timeout_start_sec %>
277 <% if @timeout_stop_sec -%>
278 TimeoutStopSec=<%= @timeout_stop_sec %>
280 <% if @timeout_abort_sec -%>
281 TimeoutAbortSec=<%= @timeout_abort_sec %>
283 <% if @timeout_sec -%>
284 TimeoutSec=<%= @timeout_sec %>
287 PIDFile=<%= @pid_file %>
292 <% if @io_scheduling_class -%>
293 IOSchedulingClass=<%= @io_scheduling_class %>
295 <% if @io_scheduling_priority -%>
296 IOSchedulingPriority=<%= @io_scheduling_priority %>
299 KillMode=<%= @kill_mode %>
301 <% unless @dropin -%>
304 WantedBy=multi-user.target