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 @limit_nofile -%>
34 LimitNOFILE=<%= @limit_nofile %>
37 LimitAS=<%= @limit_as %>
40 LimitCPU=<%= @limit_cpu %>
43 MemoryLow=<%= @memory_low %>
45 <% if @memory_high -%>
46 MemoryHigh=<%= @memory_high %>
49 MemoryMax=<%= @memory_max %>
51 <% @environment.each do |name,value| -%>
52 Environment="<%= name %>=<%= value %>"
54 <% if @environment_file -%>
55 EnvironmentFile=<%= @environment_file %>
63 <% if @dynamic_user -%>
64 DynamicUser=<%= @dynamic_user %>
66 <% if @working_directory -%>
67 WorkingDirectory=<%= @working_directory %>
69 <% if @exec_start_pre -%>
73 <% Array(@exec_start_pre).each do |exec_start_pre| -%>
74 ExecStartPre=<%= exec_start_pre %>
81 <% Array(@exec_start).each do |exec_start| -%>
82 ExecStart=<%= exec_start %>
85 <% if @exec_start_post -%>
89 <% Array(@exec_start_post).each do |exec_start_post| -%>
90 ExecStartPost=<%= exec_start_post %>
97 <% Array(@exec_stop).each do |exec_stop| -%>
98 ExecStop=<%= exec_stop %>
101 <% if @exec_reload -%>
105 ExecReload=<%= @exec_reload %>
107 <% if @runtime_directory -%>
108 RuntimeDirectory=<%= @runtime_directory %>
110 <% if @runtime_directory_mode -%>
111 RuntimeDirectoryMode=<%= sprintf("0%o", @runtime_directory_mode) %>
113 <% if @runtime_max_sec -%>
114 RuntimeMaxSec=<%= @runtime_max_sec %>
116 <% if @standard_input -%>
117 StandardInput=<%= @standard_input %>
119 <% if @standard_output -%>
120 StandardOutput=<%= @standard_output %>
122 <% if @standard_error -%>
123 StandardError=<%= @standard_error %>
125 <% if @protect_proc && node[:lsb][:release].to_f >= 22.04 -%>
126 ProtectProc=<%= @protect_proc %>
128 <% if @proc_subset && node[:lsb][:release].to_f >= 22.04 -%>
129 ProcSubset=<%= @proc_subset %>
131 <% if @no_new_privileges -%>
132 NoNewPrivileges=<%= @no_new_privileges %>
134 <% if @capability_bounding_set -%>
135 CapabilityBoundingSet=<%= Array(@capability_bounding_set).sort.uniq.join(" ") %>
137 <% if @protect_system -%>
138 ProtectSystem=<%= @protect_system %>
140 <% if @protect_home -%>
141 ProtectHome=<%= @protect_home %>
143 <% if @read_write_paths -%>
144 ReadWritePaths=<%= Array(@read_write_paths).sort.uniq.join(" ") %>
146 <% if @read_only_paths -%>
147 ReadOnlyPaths=<%= Array(@read_only_paths).sort.uniq.join(" ") %>
149 <% if @inaccessible_paths -%>
150 InaccessiblePaths=<%= Array(@inaccessible_paths).sort.uniq.join(" ") %>
152 <% if @private_tmp -%>
153 PrivateTmp=<%= @private_tmp %>
155 <% if @private_devices -%>
156 PrivateDevices=<%= @private_devices %>
158 <% if @private_network -%>
159 PrivateNetwork=<%= @private_network %>
161 <% if @private_ipc && node[:lsb][:release].to_f >= 22.04 -%>
162 PrivateIPC=<%= @private_ipc %>
164 <% if @private_users -%>
165 PrivateUsers=<%= @private_users %>
167 <% if @protect_hostname -%>
168 ProtectHostname=<%= @protect_hostname %>
170 <% if @protect_clock -%>
171 ProtectClock=<%= @protect_clock %>
173 <% if @protect_kernel_tunables -%>
174 ProtectKernelTunables=<%= @protect_kernel_tunables %>
176 <% if @protect_kernel_modules -%>
177 ProtectKernelModules=<%= @protect_kernel_modules %>
179 <% if @protect_kernel_logs -%>
180 ProtectKernelLogs=<%= @protect_kernel_logs %>
182 <% if @protect_control_groups -%>
183 ProtectControlGroups=<%= @protect_control_groups %>
185 <% if @restrict_address_families -%>
186 RestrictAddressFamilies=<%= Array(@restrict_address_families).sort.uniq.join(" ") %>
188 <% if @restrict_namespaces -%>
189 RestrictNamespaces=<%= Array(@restrict_namespaces).sort.uniq.join(" ") %>
191 <% if @lock_personality -%>
192 LockPersonality=<%= @lock_personality %>
194 <% if @memory_deny_write_execute -%>
195 MemoryDenyWriteExecute=<%= @memory_deny_write_execute %>
197 <% if @restrict_realtime -%>
198 RestrictRealtime=<%= @restrict_realtime %>
200 <% if @restrict_suid_sgid -%>
201 RestrictSUIDSGID=<%= @restrict_suid_sgid %>
203 <% if @remove_ipc -%>
204 RemoveIPC=<%= @remove_ipc %>
206 <% if @system_call_filter -%>
207 SystemCallFilter=<%= Array(@system_call_filter).join(" ") %>
209 <% if @system_call_architectures -%>
210 SystemCallArchitectures=<%= Array(@system_call_architectures).sort.uniq.join(" ") %>
213 TasksMax=<%= @tasks_max %>
215 <% if @success_exit_status -%>
216 SuccessExitStatus=<%= Array(@success_exit_status).join(" ") %>
219 Restart=<%= @restart %>
221 <% if @timeout_start_sec -%>
222 TimeoutStartSec=<%= @timeout_start_sec %>
224 <% if @timeout_stop_sec -%>
225 TimeoutStopSec=<%= @timeout_stop_sec %>
227 <% if @timeout_abort_sec -%>
228 TimeoutAbortSec=<%= @timeout_abort_sec %>
230 <% if @timeout_sec -%>
231 TimeoutSec=<%= @timeout_sec %>
234 PIDFile=<%= @pid_file %>
239 <% if @io_scheduling_class -%>
240 IOSchedulingClass=<%= @io_scheduling_class %>
242 <% if @io_scheduling_priority -%>
243 IOSchedulingPriority=<%= @io_scheduling_priority %>
246 KillMode=<%= @kill_mode %>
248 <% unless @dropin -%>
251 WantedBy=multi-user.target