Add config migration from version 1 to version 2

This commit is contained in:
Ingo Oppermann
2022-07-20 12:27:55 +02:00
parent 24f89aeb1b
commit 00c382262e
3 changed files with 48 additions and 4 deletions

View File

@@ -154,6 +154,12 @@ func (a *api) Reload() error {
}
cfg := store.Get()
if err := cfg.Migrate(); err == nil {
store.Set(cfg)
} else {
return err
}
cfg.Merge()
if len(cfg.Host.Name) == 0 && cfg.Host.Auto {