docs: def validate_services_by_name(self, sentry_services):
          """Validate system service status by service name, automatically
             detecting init system based on Ubuntu release codename.
  
          :param sentry_services: dict with sentry keys and svc list values
          :returns: None if successful, Failure string message otherwise
          """
          self.log.debug('Checking status of system services...')
  
          # Point at which systemd became a thing
          systemd_switch = self.ubuntu_releases.index('vivid')
  
          for sentry_unit, services_list in six.iteritems(sentry_services):
              # Get lsb_release codename from unit
              release, ret = self.get_ubuntu_release_from_sentry(sentry_unit)
              if ret:
                  return ret
  
              for service_name in services_list:
                  if (self.ubuntu_releases.index(release) >= systemd_switch or
                          service_name in ['rabbitmq-server', 'apache2',
                                           'memcached']):
                      # init is systemd (or regular sysv)
                      cmd = 'sudo service {} status'.format(service_name)
                      output, code = sentry_unit.run(cmd)
                      service_running = code == 0
                  elif self.ubuntu_releases.index(release) < systemd_switch:
                      # init is upstart
                      cmd = 'sudo status {}'.format(service_name)
                      output, code = sentry_unit.run(cmd)
                      service_running = code == 0 and "start/running" in output
  
                  self.log.debug('{} `{}` returned '
                                 '{}'.format(sentry_unit.info['unit_name'],
                                             cmd, code))
                  if not service_running:
                      return u"command `{}` returned {} {}".format(
                          cmd, output, str(code))
          return None