enhance(upgrader): restart main proc manually and gracefully

This commit is contained in:
Jacky 2024-07-27 10:59:23 +08:00
parent 31bbab71c9
commit e72e8cef57
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D
3 changed files with 7 additions and 12 deletions

View file

@ -7,6 +7,7 @@ import (
"github.com/0xJacky/Nginx-UI/internal/helper"
"github.com/0xJacky/Nginx-UI/internal/logger"
"github.com/0xJacky/Nginx-UI/settings"
"github.com/jpillora/overseer"
"github.com/minio/selfupdate"
"github.com/pkg/errors"
"io"
@ -252,5 +253,8 @@ func (u *Upgrader) PerformCoreUpgrade(tarPath string) (err error) {
return err
}
// gracefully restart
overseer.Restart()
return
}