'Symlink project CNAME domains
Link from HOME/$CNAME_ROOT/<cname> ->
HOME/$WEB_ROOT/<project>
Also give cname -> project link
Link from HOME/public_cname_project/<cname> ->
HOME/<project>/'

def symlink_cnames(self, domain=None):

    if domain:
        domains = [domain]
    else:
        domains = Domain.objects.filter(project=self.project)
    for dom in domains:
        self._log(u'Symlinking    CNAME:    {0}    ->    {1}'.format(dom.domain, self.project.slug))
        symlink = os.path.join(self.CNAME_ROOT, dom.domain)
        run('ln    -nsf    {0}    {1}'.format(self.project_root, symlink))
        project_cname_symlink = os.path.join(self.PROJECT_CNAME_ROOT, dom.domain)
        run(('ln    -nsf    %s    %s' % (self.project.doc_path, project_cname_symlink)))
