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 { if isNew {
// from MigrateData // from MigrateData
store.VersionService.StoreDBVersion(portainer.DBVersion) store.VersionService.StoreDBVersion(portainer.DBVersion)
err := updateSettingsFromFlags(store, flags)
if err != nil {
log.Fatalf("Failed updating settings from flags: %v", err)
}
} else { } else {
storedVersion, err := store.VersionService.DBVersion() storedVersion, err := store.VersionService.DBVersion()
if err != nil { 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. // this is for the db restore functionality - needs more tests.
go func() { go func() {
<-shutdownCtx.Done() <-shutdownCtx.Done()

Loading…
Cancel
Save