]> 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 6d2b85e81fac20b5eb8eee12a8f1a18c0582e435..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 -%>
@@ -26,6 +35,9 @@ User=<%= @user %>
 <% if @group -%>
 Group=<%= @group %>
 <% end -%>
+<% if @working_directory -%>
+WorkingDirectory=<%= @working_directory %>
+<% end -%>
 <% if @exec_start_pre -%>
 ExecStartPre=<%= @exec_start_pre %>
 <% end -%>
@@ -39,6 +51,12 @@ ExecStop=<%= @exec_stop %>
 <% if @exec_reload -%>
 ExecReload=<%= @exec_reload %>
 <% end -%>
+<% if @runtime_directory -%>
+RuntimeDirectory=<%= @runtime_directory %>
+<% end -%>
+<% if @runtime_directory_mode -%>
+RuntimeDirectoryMode=<%= sprintf("0%o", @runtime_directory_mode) %>
+<% end -%>
 <% if @standard_input -%>
 StandardInput=<%= @standard_input %>
 <% end -%>
@@ -63,6 +81,12 @@ ProtectSystem=<%= @protect_system %>
 <% if @protect_home -%>
 ProtectHome=<%= @protect_home %>
 <% end -%>
+<% 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 -%>