mirror of
https://github.com/golang/sys.git
synced 2026-02-08 19:56:04 +03:00
add support for delayed automatic service start
This commit is contained in:
@@ -149,6 +149,12 @@ func (m *Mgr) CreateService(name, exepath string, c Config, args ...string) (*Se
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
if c.DelayedAutoStart == ServiceDelayedAutoStartTrue {
|
||||
err = updateStartUp(h, c.DelayedAutoStart)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
return &Service{Name: name, Handle: h}, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user