mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-03 23:20:26 +08:00
优化远程安装程序
This commit is contained in:
@@ -77,12 +77,12 @@ 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)
|
||||
if err != nil && err != os.ErrNotExist {
|
||||
return errors.New("remove old file failed: " + err.Error())
|
||||
// 删除可执行文件防止冲突
|
||||
err = this.client.Remove(exePath)
|
||||
if err != nil && err != os.ErrNotExist {
|
||||
return errors.New("remove old file failed: " + err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -77,12 +77,12 @@ 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)
|
||||
if err != nil && err != os.ErrNotExist {
|
||||
return errors.New("remove old file failed: " + err.Error())
|
||||
// 删除可执行文件防止冲突
|
||||
err = this.client.Remove(exePath)
|
||||
if err != nil && err != os.ErrNotExist {
|
||||
return errors.New("remove old file failed: " + err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user