From b6e77fa194fcd8a4857a19f6d83fba96b28ab642 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Mon, 29 Jan 2024 18:56:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8D=95=E4=BD=93=E5=BA=94?= =?UTF-8?q?=E7=94=A8=E5=88=9D=E5=A7=8B=E5=8C=96=E6=A0=87=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/instances/instance.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/internal/instances/instance.go b/internal/instances/instance.go index 1012cb7e..205a9c10 100644 --- a/internal/instances/instance.go +++ b/internal/instances/instance.go @@ -14,6 +14,7 @@ import ( "github.com/TeaOSLab/EdgeCommon/pkg/nodeconfigs" "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs" "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/firewallconfigs" + "github.com/TeaOSLab/EdgeCommon/pkg/systemconfigs" "github.com/iwind/TeaGo" "github.com/iwind/TeaGo/Tea" "github.com/iwind/TeaGo/dbs" @@ -494,6 +495,14 @@ func (this *Instance) SetupDB() error { } } + // 设置未初始化 + { + err := models.SharedSysSettingDAO.UpdateSetting(tx, systemconfigs.SettingCodeStandaloneInstanceInitialized, []byte("0")) + if err != nil { + return err + } + } + return nil } @@ -949,6 +958,11 @@ func (this *Instance) setupDAO(db *dbs.DB) { models.SharedReverseProxyDAO = models.NewReverseProxyDAO() models.SharedReverseProxyDAO.Instance = db } + + { + models.SharedSysSettingDAO = models.NewSysSettingDAO() + models.SharedSysSettingDAO.Instance = db + } } func (this *Instance) unzip(role string, version string) error {