@classmethod
    def detectversionfromcmd(cls):
        try:
            status, result = cmdresult(['a2query', '-v'])
        except Exception:
            status = -1
        if status == 0 and result[:3] == '2.4':
            return cls.APACHEVER24
        return cls.APACHEVER22
Detect the apache2 version using the 'a2query' command.
dataset/ETHPy150Open coreemu/core/daemon/core/services/utility.py/HttpService.detectversionfromcmd