forked from voxpupuli/puppet-prometheus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdaemon.launchd.erb
31 lines (31 loc) · 1.04 KB
/
daemon.launchd.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key> <string>io.<%= @name %>.daemon</string>
<key>UserName</key> <string><%= @user %></string>
<key>GroupName</key> <string><%= @group %></string>
<% if @service_enable %>
<key>Disabled</key> <false/>
<% else %>
<key>Disabled></key> <true/>
<% end %>
<key>RunAtLoad</key> <true/>
<key>KeepAlive</key> <true/>
<key>EnvironmentVariables</key>
<dict>
<% @env_vars.each do |key, value| -%>
<key><%= key %></key>
<string><%= value %></string>
<% end -%>
</dict>
<key>ProgramArguments</key>
<array>
<string><%= @bin_dir %>/<%= @bin_name %></string>
<% require 'shellwords' %>
<% for extra_option in Shellwords.split(@options) %>
<string><%= extra_option %></string>
<% end %>
</array>
</dict>
</plist>