config parsing on run command

This commit is contained in:
A.Unger
2021-04-19 13:32:38 +02:00
parent a349bc3477
commit 6e4de0abd3
+1
View File
@@ -194,6 +194,7 @@ func Start(o ...Option) error {
// Start indicates the Service Controller to start a new supervised service as an OS thread.
func (s *Service) Start(name string, reply *int) error {
swap := deepcopy.Copy(s.cfg)
swap.(*ociscfg.Config).Mode = ociscfg.UNSUPERVISED
if _, ok := s.ServicesRegistry[name]; ok {
*reply = 0
s.serviceToken[name] = append(s.serviceToken[name], s.Supervisor.Add(s.ServicesRegistry[name](swap.(*ociscfg.Config))))