<% if @joins_namespace_of -%>
JoinsNamespaceOf=<%= Array(@joins_namespace_of).join(" ") %>
<% end -%>
+<% if @stop_when_unneeded -%>
+StopWhenUnneeded=<%= @stop_when_unneeded %>
+<% end -%>
[Service]
<% if @type -%>
<% if @working_directory -%>
WorkingDirectory=<%= @working_directory %>
<% end -%>
+<% if @umask -%>
+UMask=<%= @umask %>
+<% end -%>
<% if @exec_start_pre -%>
<% if @dropin -%>
ExecStartPre=
<% 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 -%>
<% if @restart -%>
Restart=<%= @restart %>
<% end -%>
+<% if @restart_sec -%>
+RestartSec=<%= @restart_sec %>
+<% end -%>
<% if @timeout_start_sec -%>
TimeoutStartSec=<%= @timeout_start_sec %>
<% end -%>