diff --git a/ipaserver/install/krainstance.py b/ipaserver/install/krainstance.py index a280ee014..a600f5049 100644 --- a/ipaserver/install/krainstance.py +++ b/ipaserver/install/krainstance.py @@ -234,7 +234,10 @@ class KRAInstance(DogtagInstance): os.remove(cfg_file) os.remove(admin_p12_file) - shutil.move(paths.KRA_BACKUP_KEYS_P12, paths.KRACERT_P12) + if config.getboolean( + self.subsystem, 'pki_backup_keys', fallback=True + ): + shutil.move(paths.KRA_BACKUP_KEYS_P12, paths.KRACERT_P12) logger.debug("completed creating KRA instance") def __create_kra_agent(self):