enhance(upgrader): gracefully replace the old exe with the new exe

This commit is contained in:
Jacky 2024-07-21 23:16:28 +08:00
parent 7ef4fec896
commit f5a0a9ed50
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D
13 changed files with 304 additions and 233 deletions

View file

@ -139,9 +139,8 @@ func PerformCoreUpgrade(c *gin.Context) {
return
}
_ = os.Remove(u.ExPath)
// bye, overseer will restart nginx-ui
err = u.PerformCoreUpgrade(u.ExPath, tarName)
err = u.PerformCoreUpgrade(tarName)
if err != nil {
_ = ws.WriteJSON(CoreUpgradeResp{
Status: UpgradeStatusError,