mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-12-03 07:00:26 +08:00
实现DNS节点远程安装
This commit is contained in:
@@ -95,12 +95,11 @@ func (this *NodeInstaller) Install(dir string, params interface{}, installStatus
|
||||
|
||||
// 修改配置文件
|
||||
{
|
||||
templateFile := dir + "/edge-node/configs/api.template.yaml"
|
||||
configFile := dir + "/edge-node/configs/api.yaml"
|
||||
data, err := this.client.ReadFile(templateFile)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
var data = []byte(`rpc:
|
||||
endpoints: [ ${endpoints} ]
|
||||
nodeId: "${nodeId}"
|
||||
secret: "${nodeSecret}"`)
|
||||
|
||||
data = bytes.ReplaceAll(data, []byte("${endpoints}"), []byte(nodeParams.QuoteEndpoints()))
|
||||
data = bytes.ReplaceAll(data, []byte("${nodeId}"), []byte(nodeParams.NodeId))
|
||||
|
||||
Reference in New Issue
Block a user