add support for delayed automatic service start

This commit is contained in:
utkarsh-extc
2019-07-23 15:40:34 +05:30
committed by GitHub
parent a9b5334b0f
commit 2baf3a60a8

View File

@@ -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
}