将节点的api.yaml改为api_node.yaml

This commit is contained in:
刘祥超
2023-08-12 15:27:09 +08:00
parent d1ba141c65
commit 3053157c6e

View File

@@ -116,15 +116,14 @@ func (this *NodeInstaller) Install(dir string, params interface{}, installStatus
// 修改配置文件
{
configFile := dir + "/edge-node/configs/api.yaml"
var configFile = dir + "/edge-node/configs/api_node.yaml"
// sudo之后我们需要修改配置目录才能写入文件
if this.client.sudo {
_, _, _ = this.client.Exec("chown " + this.client.User() + " " + filepath.Dir(configFile))
}
var data = []byte(`rpc:
endpoints: [ ${endpoints} ]
var data = []byte(`rpc.endpoints: [ ${endpoints} ]
nodeId: "${nodeId}"
secret: "${nodeSecret}"`)