mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 18:35:51 +02:00
enhance(upgrader): gracefully replace the old exe with the new exe
This commit is contained in:
parent
7ef4fec896
commit
f5a0a9ed50
13 changed files with 304 additions and 233 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue