Пример #1
0
def copy_init_d_script():
    if (assembly.get_dist() == 'centos'):
        init_script = "nginx_default_centos.sh"
    else:
        init_script = "nginx_default.sh"
    fs.copy("configs/" + init_script, "/etc/init.d/nginx", True, True)
    system.chmod("/etc/init.d/nginx", "a+x", True)
Пример #2
0
def copy_init_d_script():
    if(assembly.get_dist() == 'centos'):
        init_script = "nginx_default_centos.sh"
    else:
        init_script = "nginx_default.sh"
    fs.copy("configs/"+init_script, "/etc/init.d/nginx", True, True)
    system.chmod("/etc/init.d/nginx", "a+x", True)
Пример #3
0
def change_configs():
    fs.copy("nginx.conf", "/etc/nginx/nginx.conf", True, True)
    if os.path.exists("/etc/nginx/configs"):
        system.sudo(["rm", "-rf", "/etc/nginx/configs"])
    system.sudo(["mkdir", "/etc/nginx/configs"])
Пример #4
0
def change_configs():
    fs.copy("nginx.conf", "/etc/nginx/nginx.conf", True, True)
    if os.path.exists("/etc/nginx/configs"):
        system.sudo(["rm", "-rf", "/etc/nginx/configs"])
    system.sudo(["mkdir", "/etc/nginx/configs"])