func (sv *Unit) Active() unit.Activation {
	log.WithField("sv", sv).Debugf("sv.Active")

	// based of Systemd transtition table found in https://goo.gl/oEjikJ
	switch sv.Sub() {
	case dead:
		return unit.Inactive
	case failed:
		return unit.Failed
	case reload:
		return unit.Reloading
	case running, exited:
		return unit.Active
	case start, startPre, startPost, autoRestart:
		return unit.Activating
	case stop, stopSigabrt, stopPost, stopSigkill, stopSigterm, finalSigkill, finalSigterm:
		return unit.Deactivating
	default:
		panic("Unknown service sub state")
	}
}
// Active reports activation status of a service
Active reports activation status of a service
// Active reports activation status of a service
func (sv *Unit) Active() unit.Activation {
	log.WithField("sv", sv).Debugf("sv.Active")
	switch sv.Sub() {
	case dead:
		return unit.Inactive
	case failed:
		return unit.Failed
	case reload:
		return unit.Reloading
	case running, exited:
		return unit.Active
	case start, startPre, startPost, autoRestart:
		return unit.Activating
	case stop, stopSigabrt, stopPost, stopSigkill, stopSigterm, finalSigkill, finalSigterm:
		return unit.Deactivating
	default:
		panic("Unknown service sub state")
	}
}
func ( sv * Unit ) Active ( ) unit . Activation { log . WithField ( " " , sv ) . Debugf ( " " ) switch sv . Sub ( ) { case dead : return unit . Inactive case failed : return unit . Failed case reload : return unit . Reloading case running , exited : return unit . Active case start , startPre , startPost , autoRestart : return unit . Activating case stop , stopSigabrt , stopPost , stopSigkill , stopSigterm , finalSigkill , finalSigterm : return unit . Deactivating default : panic ( " " ) } }
Active reports activation status of a service
Active reports activation status of a service
// based of Systemd transtition table found in https://goo.gl/oEjikJ