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