mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-12 14:50:25 +08:00
优化远程安装程序
This commit is contained in:
@@ -77,7 +77,6 @@ func (this *NodeInstaller) Install(dir string, params interface{}, installStatus
|
||||
_, err = this.client.Stat(exePath)
|
||||
if err == nil {
|
||||
_, _, _ = this.client.Exec(exePath + " quit")
|
||||
}
|
||||
|
||||
// 删除可执行文件防止冲突
|
||||
err = this.client.Remove(exePath)
|
||||
@@ -85,6 +84,7 @@ func (this *NodeInstaller) Install(dir string, params interface{}, installStatus
|
||||
return errors.New("remove old file failed: " + err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 解压
|
||||
_, stderr, err := this.client.Exec(dir + "/" + env.HelperName + " -cmd=unzip -zip=\"" + targetZip + "\" -target=\"" + dir + "\"")
|
||||
|
||||
@@ -77,7 +77,6 @@ func (this *NSNodeInstaller) Install(dir string, params interface{}, installStat
|
||||
_, err = this.client.Stat(exePath)
|
||||
if err == nil {
|
||||
_, _, _ = this.client.Exec(exePath + " stop")
|
||||
}
|
||||
|
||||
// 删除可执行文件防止冲突
|
||||
err = this.client.Remove(exePath)
|
||||
@@ -85,6 +84,7 @@ func (this *NSNodeInstaller) Install(dir string, params interface{}, installStat
|
||||
return errors.New("remove old file failed: " + err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 解压
|
||||
_, stderr, err := this.client.Exec(dir + "/" + env.HelperName + " -cmd=unzip -zip=\"" + targetZip + "\" -target=\"" + dir + "\"")
|
||||
|
||||
Reference in New Issue
Block a user