]> git.openstreetmap.org Git - chef.git/blob - cookbooks/systemd/templates/default/service.erb
systemd: add pidfile support
[chef.git] / cookbooks / systemd / templates / default / service.erb
1 # DO NOT EDIT - This file is being maintained by Chef
2
3 [Unit]
4 Description=<%= @description %>
5 <% if @after -%>
6 After=<%= Array(@after).join(" ") %>
7 <% end -%>
8
9 [Service]
10 Type=<%= @type %>
11 <% if @limit_nofile -%>
12 LimitNOFILE=<%= @limit_nofile %>
13 <% end -%>
14 <% @environment.each do |name,value| -%>
15 Environment="<%= name %>=<%= value %>"
16 <% end -%>
17 <% if @environment_file -%>
18 EnvironmentFile=<%= @environment_file %>
19 <% end -%>
20 <% if @user -%>
21 User=<%= @user %>
22 <% end -%>
23 <% if @group -%>
24 Group=<%= @group %>
25 <% end -%>
26 <% if @exec_start_pre -%>
27 ExecStartPre=<%= @exec_start_pre %>
28 <% end -%>
29 ExecStart=<%= @exec_start %>
30 <% if @exec_start_post -%>
31 ExecStartPost=<%= @exec_start_post %>
32 <% end -%>
33 <% if @exec_stop -%>
34 ExecStop=<%= @exec_stop %>
35 <% end -%>
36 <% if @exec_reload -%>
37 ExecReload=<%= @exec_reload %>
38 <% end -%>
39 <% if @restart -%>
40 Restart=<%= @restart %>
41 <% end -%>
42 <% if @timeout_sec -%>
43 TimeoutSec=<%= @timeout_sec %>
44 <% end -%>
45 <% if @pid_file -%>
46 PIDFile=<%= @pid_file %>
47 <% end -%>
48
49 [Install]
50 WantedBy=multi-user.target