MCPcopy Create free account
hub / github.com/aaPanel/BaoTa / clear_nginx_config

Method clear_nginx_config

class/projectModel/javaModel.py:1410–1426  ·  view source on GitHub ↗

@name 清除nginx配置 @author hwliang<2021-08-09> @param project_find: dict<项目信息> @return bool

(self, project_find)

Source from the content-addressed store, hash-verified

1408 return True
1409
1410 def clear_nginx_config(self, project_find):
1411 ''&#x27;
1412 @name 清除nginx配置
1413 @author hwliang<2021-08-09>
1414 @param project_find: dict<项目信息>
1415 @return bool
1416 ''&#x27;
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 ''&#x27;

Callers 2

clear_configMethod · 0.95
_multi_clear_configMethod · 0.95

Calls 3

formatMethod · 0.45
existsMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected