1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-21 01:09:17 +08:00

15 lines
446 B
Go

package db
import (
"path"
"github.com/1Panel-dev/1Panel/agent/global"
"github.com/1Panel-dev/1Panel/agent/utils/common"
)
func Init() {
global.DB = common.LoadDBConnByPath(path.Join(global.CONF.System.DbPath, "agent.db"), "agent")
global.TaskDB = common.LoadDBConnByPath(path.Join(global.CONF.System.DbPath, "task.db"), "task")
global.MonitorDB = common.LoadDBConnByPath(path.Join(global.CONF.System.DbPath, "monitor.db"), "monitor")
}