def create_hisdir():
    subd = 1
    dirname = dirhis.format(subd=subd)
    parent = os.path.abspath((dirname + '/..'))
    content = glob.glob((parent + '/??'))
    ok = True
    for subd in subdomains:
        dirname = dirhis.format(subd=subd)
        if (dirname in content):
            if os.path.isdir(dirname):
                command = f'fusermount -u {dirname}'
                try:
                    os.system(command)
                except:
                    pass
            else:
                ok = False
        else:
            os.makedirs(dirname)
    if (not ok):
        print(f'{parent} needs to be cleaned')
        try:
            os.rename(f'{parent}', f'{dirtrash}/')
        except:
            abort()
        for subd in subdomains:
            dirname = dirhis.format(subd=subd)
            os.makedirs(dirname)
        print(f'{parent} has been cleaned', flush=True)
    else:
        print(f'{parent} is sound')
def create_hisdir():
    subd = 1
    dirname = dirhis.format(subd=subd)
    parent = os.path.abspath((dirname + '/..'))
    content = glob.glob((parent + '/??'))
    ok = True
    for subd in subdomains:
        dirname = dirhis.format(subd=subd)
        if (dirname in content):
            if os.path.isdir(dirname):
                command = f'fusermount -u {dirname}'
                try:
                    os.system(command)
                except:
                    pass
            else:
                ok = False
        else:
            os.makedirs(dirname)
    if (not ok):
        print(f'{parent} needs to be cleaned')
        try:
            os.rename(f'{parent}', f'{dirtrash}/')
        except:
            abort()
        for subd in subdomains:
            dirname = dirhis.format(subd=subd)
            os.makedirs(dirname)
        print(f'{parent} has been cleaned', flush=True)
    else:
        print(f'{parent} is sound')