Check all certificates available in acme in the host
            and sync them with the webfaction certificates

def sync_certificates(self, subdomains=None):
        """ Check all certificates available in acme in the host
            and sync them with the webfaction certificates
        """
        result = run(".acme.sh/acme.sh --list", quiet=True)
        logger.info("Syncing Webfaction certificates")
        for acme_certificate_description in result.split('\n')[1:]:
            main_domain = acme_certificate_description.split()[0]
            if subdomains and main_domain not in subdomains:
                continue
            if exists(os.path.join("~/.acme.sh/", main_domain)):
                certificate_cer = self.get_remote_content(
                    os.path.join("~/.acme.sh/", main_domain, main_domain + ".cer")
                )
                certificate_key = self.get_remote_content(
                    os.path.join("~/.acme.sh/", main_domain, main_domain + ".key")
                )
                certificate_ca = self.get_remote_content(
                    os.path.join("~/.acme.sh/", main_domain, "ca.cer")
                )
                certificate_name = self.slugify(main_domain)

                certificate = self._certificates.get(certificate_name)
                if (certificate is None
                    or certificate['certificate'] != certificate_cer
                    or certificate['private_key'] != certificate_key
                    or certificate['intermediates'] != certificate_ca):
                    new_certificate = dict(
                        name=certificate_name,
                        certificate=certificate_cer,
                        private_key=certificate_key,
                        intermediates=certificate_ca,
                    )
                    if certificate is None:
                        logger.info("Creating new certificate for %s" % main_domain)
                        self.api.create_certificate(new_certificate)
                    else:
                        logger.info("Updating certificate for %s" % main_domain)
                        self.api.update_certificate(new_certificate)
                    self._certificates[certificate_name] = new_certificate