func (sysd *Implementation) Validate(c initd.Component) error { if !strings.HasPrefix(c.Path(), sysd.UnitDir) { return fmt.Errorf("systemd: unit file should be in %v", sysd.UnitDir) } return nil }
func (sysd *Implementation) Reload(c initd.Component) error { _, err := sysd.Exec.Execute("systemctl", "reenable", c.Name()) return err }
func (sysd *Implementation) Install(c initd.Component) error { _, err := sysd.Exec.Execute("systemctl", "enable", "--system", c.Name()) return err }
func (sysd *Implementation) Extend(c initd.Component) error { // unit.d file must be present _, err := sysd.Exec.Execute("systemctl", "edit", c.Name()) return err }
func (sysd *Implementation) Stop(c initd.Component) error { _, err := sysd.Exec.Execute("systemctl", "stop", c.Name()) return err }