Merge pull request #1177 from netbirdio/fix/avoid-config-write-if-datastore-key-exists

Avoid writing config if datastore key exists
This commit is contained in:
pascal-fischer 2023-09-27 15:11:09 +02:00 committed by GitHub
commit 5f499d66b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -148,7 +148,7 @@ var (
return fmt.Errorf("failed to initialize database: %s", err)
}
if key != "" {
if config.DataStoreEncryptionKey != key {
log.Infof("update config with activity store key")
config.DataStoreEncryptionKey = key
err := updateMgmtConfig(mgmtConfig, config)