You've already forked CasaOS
mirror of
https://github.com/IceWhaleTech/CasaOS.git
synced 2025-07-15 23:54:17 +02:00
v0.3.7 (#600)
* add send notify function * add shell script * add system notiry * remove disk and test common package * update http status * add share function to common * remove temp path * remove /DATA directory initialization - moved to local-storage (#578) * update goreleaser configuration * wip * change service type to notify for systemd so its status is OK only when service is initialized successfully * update CasaOS-Common to fix runtime error * wip * add send notify function * add shell script * add system notiry * remove disk and test common package * update http status * add share function to common * remove temp path * remove /DATA directory initialization - moved to local-storage (#578) * update goreleaser configuration * wip * change service type to notify for systemd so its status is OK only when service is initialized successfully * update CasaOS-Common to fix runtime error * wip * wip * wip * wip * wip * Utilization interface to supplement disk information * fix upload file * wip * wip * add update url * wip * wip * add change log * update changelog Co-authored-by: LinkLeong <a624669980@163.com>
This commit is contained in:
@ -28,25 +28,29 @@ const (
|
||||
casaosServiceName = "casaos.service"
|
||||
)
|
||||
|
||||
var _logger *Logger
|
||||
var sqliteDB *gorm.DB
|
||||
var (
|
||||
_logger *Logger
|
||||
sqliteDB *gorm.DB
|
||||
)
|
||||
|
||||
var configFlag = ""
|
||||
var dbFlag = ""
|
||||
var (
|
||||
configFlag = ""
|
||||
dbFlag = ""
|
||||
)
|
||||
|
||||
func init() {
|
||||
config.InitSetup(configFlag)
|
||||
config.UpdateSetup()
|
||||
|
||||
if len(dbFlag) == 0 {
|
||||
dbFlag = config.AppInfo.DBPath + "/db"
|
||||
}
|
||||
|
||||
sqliteDB = sqlite.GetDb(dbFlag)
|
||||
//gredis.GetRedisConn(config.RedisInfo),
|
||||
// gredis.GetRedisConn(config.RedisInfo),
|
||||
|
||||
service.MyService = service.NewService(sqliteDB, "")
|
||||
}
|
||||
|
||||
func main() {
|
||||
versionFlag := flag.Bool("v", false, "version")
|
||||
debugFlag := flag.Bool("d", true, "debug")
|
||||
@ -79,7 +83,7 @@ func main() {
|
||||
}
|
||||
|
||||
migrationTools := []interfaces.MigrationTool{
|
||||
NewMigrationToolFor_035(),
|
||||
// nothing to migrate from last version
|
||||
}
|
||||
|
||||
var selectedMigrationTool interfaces.MigrationTool
|
||||
@ -110,8 +114,7 @@ func main() {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
selectedMigrationTool.PostMigrate()
|
||||
_logger.Info("casaos migration ok")
|
||||
//panic(err)
|
||||
|
||||
if err := selectedMigrationTool.PostMigrate(); err != nil {
|
||||
_logger.Error("Migration succeeded, but post-migration failed: %s", err)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user