mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 12:40:25 +08:00
fix: restart panel after update
This commit is contained in:
@@ -26,7 +26,7 @@ func initConf() {
|
||||
|
||||
func initGlobal() {
|
||||
app.Root = app.Conf.MustString("app.root")
|
||||
app.Version = "2.3.0"
|
||||
app.Version = "2.3.2"
|
||||
app.Locale = app.Conf.MustString("app.locale")
|
||||
|
||||
// 初始化时区
|
||||
|
||||
@@ -18,6 +18,7 @@ import (
|
||||
"github.com/TheTNB/panel/internal/http/request"
|
||||
"github.com/TheTNB/panel/pkg/io"
|
||||
"github.com/TheTNB/panel/pkg/shell"
|
||||
"github.com/TheTNB/panel/pkg/tools"
|
||||
"github.com/TheTNB/panel/pkg/types"
|
||||
)
|
||||
|
||||
@@ -280,9 +281,9 @@ func (r *settingRepo) UpdatePanel(version, url, checksum string) error {
|
||||
color.Greenln("升级完成")
|
||||
|
||||
_, _ = shell.Execf("systemctl daemon-reload")
|
||||
_, _ = shell.Execf("systemctl restart panel")
|
||||
_ = io.Remove("/tmp/panel-storage.zip")
|
||||
_ = io.Remove(filepath.Join(app.Root, "panel/config.example.yml"))
|
||||
tools.RestartPanel()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ let messageReactive: MessageReactive | null = null
|
||||
|
||||
const getVersions = () => {
|
||||
info.updateInfo().then((res: any) => {
|
||||
versions.value = res.data.reverse()
|
||||
versions.value = res.data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user