mirror of
https://github.com/cloudreve/cloudreve.git
synced 2025-10-28 23:26:01 +08:00
Modify: move aria2 into internal packages / migration version check
This commit is contained in:
26
main.go
26
main.go
@ -1,35 +1,13 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/HFO4/cloudreve/models"
|
||||
"github.com/HFO4/cloudreve/pkg/aria2"
|
||||
"github.com/HFO4/cloudreve/pkg/auth"
|
||||
"github.com/HFO4/cloudreve/pkg/authn"
|
||||
"github.com/HFO4/cloudreve/pkg/cache"
|
||||
"github.com/HFO4/cloudreve/bootstrap"
|
||||
"github.com/HFO4/cloudreve/pkg/conf"
|
||||
"github.com/HFO4/cloudreve/pkg/crontab"
|
||||
"github.com/HFO4/cloudreve/pkg/email"
|
||||
"github.com/HFO4/cloudreve/pkg/task"
|
||||
"github.com/HFO4/cloudreve/routers"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func init() {
|
||||
conf.Init("conf/conf.ini")
|
||||
// Debug 关闭时,切换为生产模式
|
||||
if !conf.SystemConfig.Debug {
|
||||
gin.SetMode(gin.ReleaseMode)
|
||||
}
|
||||
cache.Init()
|
||||
if conf.SystemConfig.Mode == "master" {
|
||||
model.Init()
|
||||
authn.Init()
|
||||
task.Init()
|
||||
aria2.Init()
|
||||
email.Init()
|
||||
crontab.Init()
|
||||
}
|
||||
auth.Init()
|
||||
bootstrap.Init("conf/conf.ini")
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
||||
Reference in New Issue
Block a user