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 @no_new_privileges -%>
167 NoNewPrivileges=<%= @no_new_privileges %>
169 <% if @capability_bounding_set -%>
170 CapabilityBoundingSet=<%= Array(@capability_bounding_set).sort.uniq.join(" ") %>
172 <% if @ambient_capabilities -%>
173 AmbientCapabilities=<%= Array(@ambient_capabilities).sort.uniq.join(" ") %>
175 <% if @protect_system -%>
176 ProtectSystem=<%= @protect_system %>
178 <% if @protect_home -%>
179 ProtectHome=<%= @protect_home %>
181 <% if @read_write_paths -%>
182 ReadWritePaths=<%= Array(@read_write_paths).sort.uniq.join(" ") %>
184 <% if @read_only_paths -%>
185 ReadOnlyPaths=<%= Array(@read_only_paths).sort.uniq.join(" ") %>
187 <% if @inaccessible_paths -%>
188 InaccessiblePaths=<%= Array(@inaccessible_paths).sort.uniq.join(" ") %>
190 <% if @private_tmp -%>
191 PrivateTmp=<%= @private_tmp %>
193 <% if @private_devices -%>
194 PrivateDevices=<%= @private_devices %>
196 <% if @private_network -%>
197 PrivateNetwork=<%= @private_network %>
199 <% if @private_ipc && node[:lsb][:release].to_f >= 22.04 -%>
200 PrivateIPC=<%= @private_ipc %>
202 <% if @private_users -%>
203 PrivateUsers=<%= @private_users %>
205 <% if @protect_hostname -%>
206 ProtectHostname=<%= @protect_hostname %>
208 <% if @protect_clock -%>
209 ProtectClock=<%= @protect_clock %>
211 <% if @protect_kernel_tunables -%>
212 ProtectKernelTunables=<%= @protect_kernel_tunables %>
214 <% if @protect_kernel_modules -%>
215 ProtectKernelModules=<%= @protect_kernel_modules %>
217 <% if @protect_kernel_logs -%>
218 ProtectKernelLogs=<%= @protect_kernel_logs %>
220 <% if @protect_control_groups -%>
221 ProtectControlGroups=<%= @protect_control_groups %>
223 <% if @restrict_address_families -%>
224 RestrictAddressFamilies=<%= Array(@restrict_address_families).sort.uniq.join(" ") %>
226 <% if @restrict_namespaces -%>
227 RestrictNamespaces=<%= Array(@restrict_namespaces).sort.uniq.join(" ") %>
229 <% if @lock_personality -%>
230 LockPersonality=<%= @lock_personality %>
232 <% if @memory_deny_write_execute -%>
233 MemoryDenyWriteExecute=<%= @memory_deny_write_execute %>
235 <% if @restrict_realtime -%>
236 RestrictRealtime=<%= @restrict_realtime %>
238 <% if @restrict_suid_sgid -%>
239 RestrictSUIDSGID=<%= @restrict_suid_sgid %>
241 <% if @remove_ipc -%>
242 RemoveIPC=<%= @remove_ipc %>
244 <% if @system_call_filter -%>
245 SystemCallFilter=<%= Array(@system_call_filter).join(" ") %>
247 <% if @system_call_architectures -%>
248 SystemCallArchitectures=<%= Array(@system_call_architectures).sort.uniq.join(" ") %>
251 TasksMax=<%= @tasks_max %>
253 <% if @success_exit_status -%>
254 SuccessExitStatus=<%= Array(@success_exit_status).join(" ") %>
257 Restart=<%= @restart %>
259 <% if @timeout_start_sec -%>
260 TimeoutStartSec=<%= @timeout_start_sec %>
262 <% if @timeout_stop_sec -%>
263 TimeoutStopSec=<%= @timeout_stop_sec %>
265 <% if @timeout_abort_sec -%>
266 TimeoutAbortSec=<%= @timeout_abort_sec %>
268 <% if @timeout_sec -%>
269 TimeoutSec=<%= @timeout_sec %>
272 PIDFile=<%= @pid_file %>
277 <% if @io_scheduling_class -%>
278 IOSchedulingClass=<%= @io_scheduling_class %>
280 <% if @io_scheduling_priority -%>
281 IOSchedulingPriority=<%= @io_scheduling_priority %>
284 KillMode=<%= @kill_mode %>
286 <% unless @dropin -%>
289 WantedBy=multi-user.target