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