You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
585 B
Go
16 lines
585 B
Go
package db
|
|
|
|
import (
|
|
"path"
|
|
|
|
"github.com/1Panel-dev/1Panel/core/global"
|
|
"github.com/1Panel-dev/1Panel/core/utils/common"
|
|
)
|
|
|
|
func Init() {
|
|
global.DB = common.LoadDBConnByPath(path.Join(global.CONF.Base.InstallDir, "1panel/db/core.db"), "core")
|
|
global.TaskDB = common.LoadDBConnByPath(path.Join(global.CONF.Base.InstallDir, "1panel/db/task.db"), "task")
|
|
global.AgentDB = common.LoadDBConnByPath(path.Join(global.CONF.Base.InstallDir, "1panel/db/agent.db"), "agent")
|
|
global.AlertDB = common.LoadDBConnByPath(path.Join(global.CONF.Base.InstallDir, "1panel/db/alert.db"), "alert")
|
|
}
|