WIP creates valid userspace plist on os x
This commit is contained in:
parent
ae809d5d5e
commit
fb4f0c5a69
|
@ -9,15 +9,15 @@
|
|||
{{- if .Interpreter }}
|
||||
<string>{{ .Interpreter }}</string>
|
||||
{{- end }}
|
||||
<string>{{ .Exec }}</string>
|
||||
<string>{{ .Local }}/opt/{{ .Name }}/{{ .Exec }}</string>
|
||||
{{- if .Argv }}
|
||||
{{- range $arg := .Argv }}
|
||||
<string>{{ $arg }}</string>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
</array>
|
||||
<key>EnvironmentVariables</key>
|
||||
{{- if .Envs }}
|
||||
<key>EnvironmentVariables</key>
|
||||
<dict>
|
||||
{{- range $key, $value := .Envs }}
|
||||
<key>{{ $key }}</key>
|
||||
|
|
|
@ -59,5 +59,10 @@ func Install(c *Config) error {
|
|||
return err
|
||||
}
|
||||
|
||||
err = os.MkdirAll(c.LogDir, 0750)
|
||||
if nil != err {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ func usage() {
|
|||
}
|
||||
|
||||
func main() {
|
||||
fmt.Println("Watchdog " + GitVersion)
|
||||
for i := range os.Args {
|
||||
switch {
|
||||
case strings.HasSuffix(os.Args[i], "version"):
|
||||
|
|
Loading…
Reference in New Issue