]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/systemd/templates/default/service.erb
systemd: add requires and array support for exec_stop
[chef.git] / cookbooks / systemd / templates / default / service.erb
index 858dbb3278fe9a2dc7384d540d3dc37c1ef69139..0685a70cae8c4bfc53ea723f09d0be9a0efb38ba 100644 (file)
@@ -19,6 +19,9 @@ Conflicts=<%= Array(@conflicts).join(" ") %>
 <% if @wants -%>
 Wants=<%= Array(@wants).join(" ") %>
 <% end -%>
+<% if @requires -%>
+Requires=<%= Array(@requires).join(" ") %>
+<% end -%>
 <% if @joins_namespace_of -%>
 JoinsNamespaceOf=<%= Array(@joins_namespace_of).join(" ") %>
 <% end -%>
@@ -91,8 +94,10 @@ ExecStartPost=<%= exec_start_post %>
 <% if @dropin -%>
 ExecStop=
 <% end -%>
+<% Array(@exec_stop).each do |exec_stop| -%>
 ExecStop=<%= @exec_stop %>
 <% end -%>
+<% end -%>
 <% if @exec_reload -%>
 <% if @dropin -%>
 ExecReload=