diff --git a/service.go b/service.go index bcc1d0d..26299bd 100644 --- a/service.go +++ b/service.go @@ -69,9 +69,10 @@ import ( // Config provides the setup for a Service. The Name field is required. type Config struct { - Name string // Required name of the service. No spaces suggested. - DisplayName string // Display name, spaces allowed. - Description string // Long description of service. + Name string // Required name of the service. No spaces suggested. + DisplayName string // Display name, spaces allowed. + Description string // Long description of service. + Dependencies []string // Array of service dependencies. UserName string // Run as username. Arguments []string // Run with arguments. diff --git a/service_windows.go b/service_windows.go index 7b7d692..d93a917 100644 --- a/service_windows.go +++ b/service_windows.go @@ -195,6 +195,7 @@ func (ws *windowsService) Install() error { StartType: mgr.StartAutomatic, ServiceStartName: ws.UserName, Password: ws.Option.string("Password", ""), + Dependencies: ws.Dependencies, }) if err != nil { return err