@name 清除nginx配置 @author hwliang<2021-08-09> @param project: dict<项目信息> @return bool
(self, project)
| 2499 | return True |
| 2500 | |
| 2501 | def clear_nginx_config(self, project): |
| 2502 | ''' |
| 2503 | @name 清除nginx配置 |
| 2504 | @author hwliang<2021-08-09> |
| 2505 | @param project: dict<项目信息> |
| 2506 | @return bool |
| 2507 | ''' |
| 2508 | project_name = project['name'] |
| 2509 | config_file = "{}/nginx/python_{}.conf".format(self._vhost_path, project_name) |
| 2510 | if os.path.exists(config_file): |
| 2511 | os.remove(config_file) |
| 2512 | rewrite_file = "{panel_path}/vhost/rewrite/python_{project_name}.conf".format( |
| 2513 | panel_path=self._panel_path, project_name=project_name) |
| 2514 | if os.path.exists(rewrite_file): |
| 2515 | os.remove(rewrite_file) |
| 2516 | return True |
| 2517 | |
| 2518 | def clear_apache_config(self, project): |
| 2519 | ''' |
no test coverage detected