@name 清除nginx配置 @author hwliang<2021-08-09> @param project_find: dict<项目信息> @return bool
(self, project_find)
| 1408 | return True |
| 1409 | |
| 1410 | def clear_nginx_config(self, project_find): |
| 1411 | ''' |
| 1412 | @name 清除nginx配置 |
| 1413 | @author hwliang<2021-08-09> |
| 1414 | @param project_find: dict<项目信息> |
| 1415 | @return bool |
| 1416 | ''' |
| 1417 | project_name = project_find['name'] |
| 1418 | config_file = "{}/nginx/java_{}.conf".format(self._vhost_path, project_name) |
| 1419 | if os.path.exists(config_file): |
| 1420 | os.remove(config_file) |
| 1421 | rewrite_file = "{panel_path}/vhost/rewrite/java_{project_name}.conf".format( |
| 1422 | panel_path = self._panel_path, project_name = project_name |
| 1423 | ) |
| 1424 | if os.path.exists(rewrite_file): |
| 1425 | os.remove(rewrite_file) |
| 1426 | return True |
| 1427 | |
| 1428 | def clear_apache_config(self, project_find): |
| 1429 | ''' |
no test coverage detected