go-serviceman/manager/dist/Library/LaunchDaemons/_rdns_.plist.tmpl

74 lines
1.5 KiB
Cheetah
Raw Normal View History

2019-07-01 08:44:48 +00:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>{{ .ReverseDNS }}</string>
<key>ProgramArguments</key>
<array>
{{- if .Interpreter }}
<string>{{ .Interpreter }}</string>
{{- end }}
2019-07-02 06:02:09 +00:00
<string>{{ .Exec }}</string>
2019-07-01 08:44:48 +00:00
{{- range $arg := .Argv }}
<string>{{ $arg }}</string>
{{- end }}
</array>
{{- if .Envs }}
<key>EnvironmentVariables</key>
<dict>
{{- range $key, $value := .Envs }}
<key>{{ $key }}</key>
<string>{{ $value }}</string>
{{- end }}
</dict>
{{- end }}
{{if .User -}}
<key>UserName</key>
<string>{{ .User }}</string>
{{end -}}
{{if .Group -}}
2019-07-01 08:44:48 +00:00
<key>GroupName</key>
<string>{{ .Group }}</string>
<key>InitGroups</key>
<true/>
{{end -}}
<key>RunAtLoad</key>
<true/>
{{ if .Restart -}}
<key>KeepAlive</key>
<true/>
<!--dict>
<key>Crashed</key>
<true/>
<key>NetworkState</key>
<true/>
<key>SuccessfulExit</key>
<false/>
</dict-->
{{ end -}}
{{ if .Production -}}
<key>SoftResourceLimits</key>
<dict>
<key>NumberOfFiles</key>
<integer>8192</integer>
</dict>
<key>HardResourceLimits</key>
<dict/>
{{ end -}}
2019-07-02 06:02:09 +00:00
{{ if .Workdir -}}
2019-07-01 08:44:48 +00:00
<key>WorkingDirectory</key>
2019-07-02 06:02:09 +00:00
<string>{{ .Workdir }}</string>
2019-07-01 08:44:48 +00:00
2019-07-02 06:02:09 +00:00
{{ end -}}
2019-07-01 08:44:48 +00:00
<key>StandardErrorPath</key>
2019-07-02 06:25:16 +00:00
<string>{{ .Logdir }}/{{ .Name }}.log</string>
2019-07-01 08:44:48 +00:00
<key>StandardOutPath</key>
2019-07-02 06:25:16 +00:00
<string>{{ .Logdir }}/{{ .Name }}.log</string>
2019-07-01 08:44:48 +00:00
</dict>
</plist>