2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-05 04:37:17 +08:00
Files
panel/internal/bootstrap/app.go
2024-12-15 01:43:03 +08:00

35 lines
343 B
Go

package bootstrap
import (
"os"
)
func boot() {
if os.Geteuid() != 0 {
panic("panel must run as root")
}
initConf()
initGlobal()
initLogger()
initOrm()
runMigrate()
bootCrypter()
}
func BootWeb() {
boot()
initValidator()
initSession()
initQueue()
initCron()
initHttp()
select {}
}
func BootCli() {
boot()
initCli()
}