code: func (p *Plugin) Init() error {
  	p.Log.Debugf("Initializing process manager plugin")
  
  	templatePath, err := p.getPMConfig()
  	if err != nil {
  		return err
  	}
  
  	if templatePath != "" {
  		if p.tReader, err = template.NewTemplateReader(templatePath, p.Log); err != nil {
  			return nil
  		}
  		templates, err := p.tReader.GetAllTemplates()
  		if err != nil {
  			return err
  		}
  		for _, tmp := range templates {
  			pr := p.NewProcessFromTemplate(tmp)
  			if pr == nil {
  				continue
  			}
  			if tmp.POptions != nil && tmp.POptions.RunOnStartup {
  				if err = pr.Start(); err != nil {
  					p.Log.Errorf("failed to start template process %s: %v", tmp.Name, err)
  					continue
  				}
  			}
  		}
  	}
  
  	return nil
  }
docs: // Init reads plugin config file for process template path. If exists, plugin initializes template reader, reads
  // all existing templates and initializes them. Those marked as 'run on startup' are immediately started