|
|
@ -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()
|
|
|
|