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_directory -%>
119 RuntimeDirectory=<%= @runtime_directory %>
121 <% if @runtime_directory_mode -%>
122 RuntimeDirectoryMode=<%= sprintf("0%o", @runtime_directory_mode) %>
124 <% if @runtime_max_sec -%>
125 RuntimeMaxSec=<%= @runtime_max_sec %>
127 <% if @standard_input -%>
128 StandardInput=<%= @standard_input %>
130 <% if @standard_output -%>
131 StandardOutput=<%= @standard_output %>
133 <% if @standard_error -%>
134 StandardError=<%= @standard_error %>
136 <% if @protect_proc && node[:lsb][:release].to_f >= 22.04 -%>
137 ProtectProc=<%= @protect_proc %>
139 <% if @proc_subset && node[:lsb][:release].to_f >= 22.04 -%>
140 ProcSubset=<%= @proc_subset %>
142 <% if @no_new_privileges -%>
143 NoNewPrivileges=<%= @no_new_privileges %>
145 <% if @capability_bounding_set -%>
146 CapabilityBoundingSet=<%= Array(@capability_bounding_set).sort.uniq.join(" ") %>
148 <% if @ambient_capabilities -%>
149 AmbientCapabilities=<%= Array(@ambient_capabilities).sort.uniq.join(" ") %>
151 <% if @protect_system -%>
152 ProtectSystem=<%= @protect_system %>
154 <% if @protect_home -%>
155 ProtectHome=<%= @protect_home %>
157 <% if @read_write_paths -%>
158 ReadWritePaths=<%= Array(@read_write_paths).sort.uniq.join(" ") %>
160 <% if @read_only_paths -%>
161 ReadOnlyPaths=<%= Array(@read_only_paths).sort.uniq.join(" ") %>
163 <% if @inaccessible_paths -%>
164 InaccessiblePaths=<%= Array(@inaccessible_paths).sort.uniq.join(" ") %>
166 <% if @private_tmp -%>
167 PrivateTmp=<%= @private_tmp %>
169 <% if @private_devices -%>
170 PrivateDevices=<%= @private_devices %>
172 <% if @private_network -%>
173 PrivateNetwork=<%= @private_network %>
175 <% if @private_ipc && node[:lsb][:release].to_f >= 22.04 -%>
176 PrivateIPC=<%= @private_ipc %>
178 <% if @private_users -%>
179 PrivateUsers=<%= @private_users %>
181 <% if @protect_hostname -%>
182 ProtectHostname=<%= @protect_hostname %>
184 <% if @protect_clock -%>
185 ProtectClock=<%= @protect_clock %>
187 <% if @protect_kernel_tunables -%>
188 ProtectKernelTunables=<%= @protect_kernel_tunables %>
190 <% if @protect_kernel_modules -%>
191 ProtectKernelModules=<%= @protect_kernel_modules %>
193 <% if @protect_kernel_logs -%>
194 ProtectKernelLogs=<%= @protect_kernel_logs %>
196 <% if @protect_control_groups -%>
197 ProtectControlGroups=<%= @protect_control_groups %>
199 <% if @restrict_address_families -%>
200 RestrictAddressFamilies=<%= Array(@restrict_address_families).sort.uniq.join(" ") %>
202 <% if @restrict_namespaces -%>
203 RestrictNamespaces=<%= Array(@restrict_namespaces).sort.uniq.join(" ") %>
205 <% if @lock_personality -%>
206 LockPersonality=<%= @lock_personality %>
208 <% if @memory_deny_write_execute -%>
209 MemoryDenyWriteExecute=<%= @memory_deny_write_execute %>
211 <% if @restrict_realtime -%>
212 RestrictRealtime=<%= @restrict_realtime %>
214 <% if @restrict_suid_sgid -%>
215 RestrictSUIDSGID=<%= @restrict_suid_sgid %>
217 <% if @remove_ipc -%>
218 RemoveIPC=<%= @remove_ipc %>
220 <% if @system_call_filter -%>
221 SystemCallFilter=<%= Array(@system_call_filter).join(" ") %>
223 <% if @system_call_architectures -%>
224 SystemCallArchitectures=<%= Array(@system_call_architectures).sort.uniq.join(" ") %>
227 TasksMax=<%= @tasks_max %>
229 <% if @success_exit_status -%>
230 SuccessExitStatus=<%= Array(@success_exit_status).join(" ") %>
233 Restart=<%= @restart %>
235 <% if @timeout_start_sec -%>
236 TimeoutStartSec=<%= @timeout_start_sec %>
238 <% if @timeout_stop_sec -%>
239 TimeoutStopSec=<%= @timeout_stop_sec %>
241 <% if @timeout_abort_sec -%>
242 TimeoutAbortSec=<%= @timeout_abort_sec %>
244 <% if @timeout_sec -%>
245 TimeoutSec=<%= @timeout_sec %>
248 PIDFile=<%= @pid_file %>
253 <% if @io_scheduling_class -%>
254 IOSchedulingClass=<%= @io_scheduling_class %>
256 <% if @io_scheduling_priority -%>
257 IOSchedulingPriority=<%= @io_scheduling_priority %>
260 KillMode=<%= @kill_mode %>
262 <% unless @dropin -%>
265 WantedBy=multi-user.target