Clean up profiles and move to consolidated configuration system with profile layering

This commit is contained in:
Daniel
2020-03-20 23:05:56 +01:00
parent 543a70422a
commit 36fad7aeec
16 changed files with 937 additions and 1391 deletions

View File

@@ -8,22 +8,37 @@ import (
)
var (
shutdownSignal = make(chan struct{})
module *modules.Module
)
func init() {
modules.Register("profile", nil, start, stop, "core")
module = modules.Register("profiles", prep, start, nil, "core")
}
func start() error {
err := initSpecialProfiles()
func prep() error {
err := registerConfiguration()
if err != nil {
return err
}
err = registerConfigUpdater()
if err != nil {
return err
}
return nil
}
func start() error {
err := registerValidationDBHook()
if err != nil {
return err
}
err = startProfileUpdateChecker()
if err != nil {
return err
}
return initUpdateListener()
}
func stop() error {
close(shutdownSignal)
return nil
}