<% if @joins_namespace_of -%>
JoinsNamespaceOf=<%= Array(@joins_namespace_of).join(" ") %>
<% end -%>
+<% if @stop_when_unneeded -%>
+StopWhenUnneeded=<%= @stop_when_unneeded %>
+<% end -%>
[Service]
<% if @type -%>
<% if @runtime_directory_mode -%>
RuntimeDirectoryMode=<%= sprintf("0%o", @runtime_directory_mode) %>
<% end -%>
+<% if @runtime_directory_preserve -%>
+RuntimeDirectoryPreserve=<%= @runtime_directory_preserve %>
+<% end -%>
<% if @state_directory -%>
StateDirectory=<%= @state_directory %>
<% end -%>