]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/systemd/templates/default/service.erb
Apply memory limits to mapserv
[chef.git] / cookbooks / systemd / templates / default / service.erb
index ffc0efb7203e5da5696596f6109abba04c355e86..b3e0c13e297fbc2b425fa866f3ef7520ca2b29a1 100644 (file)
@@ -14,6 +14,15 @@ Type=<%= @type %>
 <% if @limit_nofile -%>
 LimitNOFILE=<%= @limit_nofile %>
 <% end -%>
+<% if @memory_low -%>
+MemoryLow=<%= @memory_low %>
+<% end -%>
+<% if @memory_high -%>
+MemoryHigh=<%= @memory_high %>
+<% end -%>
+<% if @memory_max -%>
+MemoryMax=<%= @memory_max %>
+<% end -%>
 <% @environment.each do |name,value| -%>
 Environment="<%= name %>=<%= value %>"
 <% end -%>
@@ -75,6 +84,9 @@ ProtectHome=<%= @protect_home %>
 <% if @no_new_privileges -%>
 NoNewPrivileges=<%= @no_new_privileges %>
 <% end -%>
+<% if @success_exit_status -%>
+SuccessExitStatus=<%= Array(@success_exit_status).join(" ") %>
+<% end -%>
 <% if @restart -%>
 Restart=<%= @restart %>
 <% end -%>