@@ -293,33 +293,35 @@ func (thisRef MacOSService) FilePath() string {
293293
294294// FileContent -
295295func (thisRef MacOSService ) FileContent () ([]byte , error ) {
296- plistTemplate := template .Must (template .New ("launchdConfig" ).Parse (
297- `<?xml version='1.0' encoding='UTF-8'?>
298- <!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\" >
299- <plist version='1.0'>
300- <dict>
301- <key>Label</key>
302- <string>{{ .DisplayLabel }}</string>
303-
304- <key>ProgramArguments</key>
305- <array>{{ range $arg := .Args }}
306- <string>{{ $arg }}</string>{{ end }}
307- </array>
308-
309- <key>StandardOutPath</key>
310- <string>{{ .StdOutPath }}</string>
311-
312- <key>StandardErrorPath</key>
313- <string>{{ .StdErrPath }}</string>
314-
315- <key>KeepAlive</key> <{{ .KeepAlive }}/>
316- <key>RunAtLoad</key> <{{ .RunAtLoad }}/>
317-
318- <key>WorkingDirectory</key>
319- <string>{{ .WorkingDirectory }}</string>
320- </dict>
321- </plist>
322- ` ))
296+ plistTemplate := template .Must (template .New ("launchdConfig" ).Parse (`
297+ <?xml version='1.0' encoding='UTF-8'?>
298+ <!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\" >
299+ <plist version='1.0'>
300+ <dict>
301+ <key>Label</key>
302+ <string>{{ .Name }}</string>
303+
304+ <key>ProgramArguments</key>
305+ <array>{{ range $arg := .Args }}
306+ <string>{{ $arg }}</string>{{ end }}
307+ </array>
308+
309+ <key>StandardOutPath</key>
310+ <string>{{ .StdOutPath }}</string>
311+
312+ <key>StandardErrorPath</key>
313+ <string>{{ .StdErrPath }}</string>
314+
315+ <key>KeepAlive</key>
316+ <{{ .KeepAlive }}/>
317+ <key>RunAtLoad</key>
318+ <{{ .RunAtLoad }}/>
319+
320+ <key>WorkingDirectory</key>
321+ <string>{{ .WorkingDirectory }}</string>
322+ </dict>
323+ </plist>
324+ ` ))
323325
324326 var plistTemplateBytes bytes.Buffer
325327 if err := plistTemplate .Execute (& plistTemplateBytes , thisRef .command ); err != nil {
0 commit comments