Merge pull request #7 from inconshreveable/arguments

add support for program arguments in sysv/upstart
This commit is contained in:
Daniel Theophanes
2015-03-07 08:31:56 -08:00
+4 -2
View File
@@ -191,10 +191,12 @@ func (s *linuxService) Install() error {
Display string
Description string
Path string
Arguments []string
}{
s.DisplayName,
s.Description,
path,
s.Config.Arguments,
}
err = flavor.Template().Execute(f, to)
@@ -321,7 +323,7 @@ const systemVScript = `#!/bin/sh
# Description: {{.Description}}
### END INIT INFO
cmd="{{.Path}}"
cmd="{{.Path}}{{range .Arguments}} {{.|cmd}}{{end}}"
name=$(basename $0)
pid_file="/var/run/$name.pid"
@@ -422,7 +424,7 @@ pre-start script
end script
# Start
exec {{.Path}}
exec {{.Path}}{{range .Arguments}} {{.|cmd}}{{end}}
`
const systemdScript = `[Unit]