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)
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)
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"])