]> git.openstreetmap.org Git - chef.git/blob - cookbooks/systemd/templates/default/service.erb
0d4abbcefe493eedab4a3679a9829bcb78f82a2e
[chef.git] / cookbooks / systemd / templates / default / service.erb
1 # DO NOT EDIT - This file is being maintained by Chef
2
3 [Unit]
4 <% if @description -%>
5 Description=<%= @description %>
6 <% end -%>
7 <% if @after -%>
8 After=<%= Array(@after).join(" ") %>
9 <% end -%>
10 <% if @wants -%>
11 Wants=<%= Array(@wants).join(" ") %>
12 <% end -%>
13
14 [Service]
15 <% if @type -%>
16 Type=<%= @type %>
17 <% end -%>
18 <% if @limit_nofile -%>
19 LimitNOFILE=<%= @limit_nofile %>
20 <% end -%>
21 <% if @limit_as -%>
22 LimitAS=<%= @limit_as %>
23 <% end -%>
24 <% if @limit_cpu -%>
25 LimitCPU=<%= @limit_cpu %>
26 <% end -%>
27 <% if @memory_low -%>
28 MemoryLow=<%= @memory_low %>
29 <% end -%>
30 <% if @memory_high -%>
31 MemoryHigh=<%= @memory_high %>
32 <% end -%>
33 <% if @memory_max -%>
34 MemoryMax=<%= @memory_max %>
35 <% end -%>
36 <% @environment.each do |name,value| -%>
37 Environment="<%= name %>=<%= value %>"
38 <% end -%>
39 <% if @environment_file -%>
40 EnvironmentFile=<%= @environment_file %>
41 <% end -%>
42 <% if @user -%>
43 User=<%= @user %>
44 <% end -%>
45 <% if @group -%>
46 Group=<%= @group %>
47 <% end -%>
48 <% if @working_directory -%>
49 WorkingDirectory=<%= @working_directory %>
50 <% end -%>
51 <% if @exec_start_pre -%>
52 ExecStartPre=<%= @exec_start_pre %>
53 <% end -%>
54 <% if @exec_start -%>
55 ExecStart=<%= @exec_start %>
56 <% end -%>
57 <% if @exec_start_post -%>
58 ExecStartPost=<%= @exec_start_post %>
59 <% end -%>
60 <% if @exec_stop -%>
61 ExecStop=<%= @exec_stop %>
62 <% end -%>
63 <% if @exec_reload -%>
64 ExecReload=<%= @exec_reload %>
65 <% end -%>
66 <% if @runtime_directory -%>
67 RuntimeDirectory=<%= @runtime_directory %>
68 <% end -%>
69 <% if @runtime_directory_mode -%>
70 RuntimeDirectoryMode=<%= sprintf("0%o", @runtime_directory_mode) %>
71 <% end -%>
72 <% if @standard_input -%>
73 StandardInput=<%= @standard_input %>
74 <% end -%>
75 <% if @standard_output -%>
76 StandardOutput=<%= @standard_output %>
77 <% end -%>
78 <% if @standard_error -%>
79 StandardError=<%= @standard_error %>
80 <% end -%>
81 <% if @private_tmp -%>
82 PrivateTmp=<%= @private_tmp %>
83 <% end -%>
84 <% if @private_devices -%>
85 PrivateDevices=<%= @private_devices %>
86 <% end -%>
87 <% if @private_network -%>
88 PrivateNetwork=<%= @private_network %>
89 <% end -%>
90 <% if @protect_system -%>
91 ProtectSystem=<%= @protect_system %>
92 <% end -%>
93 <% if @protect_home -%>
94 ProtectHome=<%= @protect_home %>
95 <% end -%>
96 <% if @restrict_address_families -%>
97 RestrictAddressFamilies=<%= Array(@restrict_address_families).join(" ") %>
98 <% end -%>
99 <% if @no_new_privileges -%>
100 NoNewPrivileges=<%= @no_new_privileges %>
101 <% end -%>
102 <% if @tasks_max -%>
103 TasksMax=<%= @tasks_max %>
104 <% end -%>
105 <% if @success_exit_status -%>
106 SuccessExitStatus=<%= Array(@success_exit_status).join(" ") %>
107 <% end -%>
108 <% if @restart -%>
109 Restart=<%= @restart %>
110 <% end -%>
111 <% if @timeout_sec -%>
112 TimeoutSec=<%= @timeout_sec %>
113 <% end -%>
114 <% if @pid_file -%>
115 PIDFile=<%= @pid_file %>
116 <% end -%>
117 <% if @nice -%>
118 Nice=<%= @nice %>
119 <% end -%>
120 <% if @io_scheduling_class -%>
121 IOSchedulingClass=<%= @io_scheduling_class %>
122 <% end -%>
123 <% if @io_scheduling_priority -%>
124 IOSchedulingPriority=<%= @io_scheduling_priority %>
125 <% end -%>
126 <% if @kill_mode -%>
127 KillMode=<%= @kill_mode %>
128 <% end -%>
129 <% unless @dropin -%>
130
131 [Install]
132 WantedBy=multi-user.target
133 <% end -%>