]> git.openstreetmap.org Git - chef.git/blob - cookbooks/systemd/templates/default/service.erb
Add support for systemd timer units
[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 <% if @wants -%>
9 Wants=<%= Array(@wants).join(" ") %>
10 <% end -%>
11
12 [Service]
13 Type=<%= @type %>
14 <% if @limit_nofile -%>
15 LimitNOFILE=<%= @limit_nofile %>
16 <% end -%>
17 <% if @limit_as -%>
18 LimitAS=<%= @limit_as %>
19 <% end -%>
20 <% if @limit_cpu -%>
21 LimitCPU=<%= @limit_cpu %>
22 <% end -%>
23 <% if @memory_low -%>
24 MemoryLow=<%= @memory_low %>
25 <% end -%>
26 <% if @memory_high -%>
27 MemoryHigh=<%= @memory_high %>
28 <% end -%>
29 <% if @memory_max -%>
30 MemoryMax=<%= @memory_max %>
31 <% end -%>
32 <% @environment.each do |name,value| -%>
33 Environment="<%= name %>=<%= value %>"
34 <% end -%>
35 <% if @environment_file -%>
36 EnvironmentFile=<%= @environment_file %>
37 <% end -%>
38 <% if @user -%>
39 User=<%= @user %>
40 <% end -%>
41 <% if @group -%>
42 Group=<%= @group %>
43 <% end -%>
44 <% if @working_directory -%>
45 WorkingDirectory=<%= @working_directory %>
46 <% end -%>
47 <% if @exec_start_pre -%>
48 ExecStartPre=<%= @exec_start_pre %>
49 <% end -%>
50 ExecStart=<%= @exec_start %>
51 <% if @exec_start_post -%>
52 ExecStartPost=<%= @exec_start_post %>
53 <% end -%>
54 <% if @exec_stop -%>
55 ExecStop=<%= @exec_stop %>
56 <% end -%>
57 <% if @exec_reload -%>
58 ExecReload=<%= @exec_reload %>
59 <% end -%>
60 <% if @runtime_directory -%>
61 RuntimeDirectory=<%= @runtime_directory %>
62 <% end -%>
63 <% if @runtime_directory_mode -%>
64 RuntimeDirectoryMode=<%= sprintf("0%o", @runtime_directory_mode) %>
65 <% end -%>
66 <% if @standard_input -%>
67 StandardInput=<%= @standard_input %>
68 <% end -%>
69 <% if @standard_output -%>
70 StandardOutput=<%= @standard_output %>
71 <% end -%>
72 <% if @standard_error -%>
73 StandardError=<%= @standard_error %>
74 <% end -%>
75 <% if @private_tmp -%>
76 PrivateTmp=<%= @private_tmp %>
77 <% end -%>
78 <% if @private_devices -%>
79 PrivateDevices=<%= @private_devices %>
80 <% end -%>
81 <% if @private_network -%>
82 PrivateNetwork=<%= @private_network %>
83 <% end -%>
84 <% if @protect_system -%>
85 ProtectSystem=<%= @protect_system %>
86 <% end -%>
87 <% if @protect_home -%>
88 ProtectHome=<%= @protect_home %>
89 <% end -%>
90 <% if @no_new_privileges -%>
91 NoNewPrivileges=<%= @no_new_privileges %>
92 <% end -%>
93 <% if @success_exit_status -%>
94 SuccessExitStatus=<%= Array(@success_exit_status).join(" ") %>
95 <% end -%>
96 <% if @restart -%>
97 Restart=<%= @restart %>
98 <% end -%>
99 <% if @timeout_sec -%>
100 TimeoutSec=<%= @timeout_sec %>
101 <% end -%>
102 <% if @pid_file -%>
103 PIDFile=<%= @pid_file %>
104 <% end -%>
105
106 [Install]
107 WantedBy=multi-user.target