feat: 优化网站反向代理地址填写 (#1885)

This commit is contained in:
zhengkunwang
2023-08-09 11:40:12 +08:00
committed by GitHub
parent 7e5cdbf953
commit fe705a25ea
3 changed files with 41 additions and 5 deletions

View File

@@ -110,12 +110,13 @@ func (h *HostToolService) GetToolStatus(req request.HostToolReq) (*response.Host
supervisorConfig.ConfigPath = args[cIndex+1]
}
}
} else {
}
if supervisorConfig.ConfigPath == "" {
configPath := "/etc/supervisord.conf"
if !fileOp.Stat(configPath) {
configPath = "/etc/supervisor/supervisord.conf"
if !fileOp.Stat(configPath) {
return nil, buserr.New("ErrConfigNotFound")
if fileOp.Stat(configPath) {
supervisorConfig.ConfigPath = configPath
}
}
}