diff --git a/service_darwin.go b/service_darwin.go index 83797142..727ef2cb 100644 --- a/service_darwin.go +++ b/service_darwin.go @@ -290,46 +290,58 @@ func (s *darwinLaunchdService) SystemLogger(errs chan<- error) (Logger, error) { return newSysLogger(s.Name, errs) } -var launchdConfig = ` - - - +var launchdConfig = ` + + + + Disabled + + {{- if .EnvVars}} EnvironmentVariables - {{range $k, $v := .EnvVars -}} - {{html $k}} - {{html $v}} - {{end -}} + {{- range $k, $v := .EnvVars}} + {{html $k}} + {{html $v}} + {{- end}} - Label - {{html .Name}} - ProgramArguments - - {{html .Path}} - {{range .Config.Arguments}} - {{html .}} - {{end}} - - {{if .UserName}}UserName - {{html .UserName}}{{end}} - {{if .ChRoot}}RootDirectory - {{html .ChRoot}}{{end}} - {{if .WorkingDirectory}}WorkingDirectory - {{html .WorkingDirectory}}{{end}} - SessionCreate - <{{bool .SessionCreate}}/> - KeepAlive - <{{bool .KeepAlive}}/> - RunAtLoad - <{{bool .RunAtLoad}}/> - Disabled - - - {{if .StandardOutPath}}StandardOutPath - {{html .StandardOutPath}}{{end}} - {{if .StandardErrorPath}}StandardErrorPath - {{html .StandardErrorPath}}{{end}} - + {{- end}} + KeepAlive + <{{bool .KeepAlive}}/> + Label + {{html .Name}} + ProgramArguments + + {{html .Path}} + {{- if .Config.Arguments}} + {{- range .Config.Arguments}} + {{html .}} + {{- end}} + {{- end}} + + {{- if .ChRoot}} + RootDirectory + {{html .ChRoot}} + {{- end}} + RunAtLoad + <{{bool .RunAtLoad}}/> + SessionCreate + <{{bool .SessionCreate}}/> + {{- if .StandardErrorPath}} + StandardErrorPath + {{html .StandardErrorPath}} + {{- end}} + {{- if .StandardOutPath}} + StandardOutPath + {{html .StandardOutPath}} + {{- end}} + {{- if .UserName}} + UserName + {{html .UserName}} + {{- end}} + {{- if .WorkingDirectory}} + WorkingDirectory + {{html .WorkingDirectory}} + {{- end}} + `