fix(db) EE-2425 http-disabled flag does not work (#6447)

Co-authored-by: Simon Meng <simon.meng@portainer.io>
pull/6476/head
cong meng 3 years ago committed by GitHub
parent 48c2f127f8
commit 4bd3f61ce6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -107,11 +107,6 @@ func initDataStore(flags *portainer.CLIFlags, secretKey []byte, fileService port
if isNew {
// from MigrateData
store.VersionService.StoreDBVersion(portainer.DBVersion)
err := updateSettingsFromFlags(store, flags)
if err != nil {
log.Fatalf("Failed updating settings from flags: %v", err)
}
} else {
storedVersion, err := store.VersionService.DBVersion()
if err != nil {
@ -125,6 +120,11 @@ func initDataStore(flags *portainer.CLIFlags, secretKey []byte, fileService port
}
}
err = updateSettingsFromFlags(store, flags)
if err != nil {
log.Fatalf("Failed updating settings from flags: %v", err)
}
// this is for the db restore functionality - needs more tests.
go func() {
<-shutdownCtx.Done()

Loading…
Cancel
Save