Exemple #1
0
def _rm_web_dir(user):
    # See comments in _rm_home_dir
    try:
        shutil.rmtree(http_dir(user["account_name"]))
    except OSError as e:
        if e.errno != errno.ENOENT:
            raise e
Exemple #2
0
def _add_web_dir(user, dump = None):
    # See comments in _add_home_dir
    http = http_dir(user["account_name"])
    check_call(
        ["sudo", "install", "-d", "--mode=0000", "--group=ocf",
         "--owner=" + user["account_name"], http],
        stdout = sys.stderr
        )