mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
fix typo in autoconf and error in save_config
This commit is contained in:
parent
c31076f70a
commit
d438a20f94
2 changed files with 12 additions and 12 deletions
|
|
@ -140,6 +140,13 @@ class Config(ConfigCaller):
|
|||
if err:
|
||||
self.__logger.error(f"Failed to update instances: {err}")
|
||||
|
||||
# save config to database
|
||||
if "config" in changes:
|
||||
err = self._db.save_config(self.__config, "autoconf", changed=False)
|
||||
if err:
|
||||
success = False
|
||||
self.__logger.error(f"Can't save config in database: {err}, config may not work as expected")
|
||||
|
||||
# save custom configs to database
|
||||
if "custom_configs" in changes:
|
||||
err = self._db.save_custom_configs(custom_configs, "autoconf", changed=False)
|
||||
|
|
@ -147,16 +154,9 @@ class Config(ConfigCaller):
|
|||
success = False
|
||||
self.__logger.error(f"Can't save autoconf custom configs in database: {err}, custom configs may not work as expected")
|
||||
|
||||
# save config to database
|
||||
if "config" in changes:
|
||||
err = self._db.save_config(self.__config, "autoconf")
|
||||
if err:
|
||||
success = False
|
||||
self.__logger.error(f"Can't save config in database: {err}, config may not work as expected")
|
||||
else:
|
||||
# update changes in db
|
||||
ret = self._db.checked_changes(changes, value=True)
|
||||
if ret:
|
||||
self.__logger.error(f"An error occurred when setting the changes to checked in the database : {ret}")
|
||||
# update changes in db
|
||||
ret = self._db.checked_changes(changes, value=True)
|
||||
if ret:
|
||||
self.__logger.error(f"An error occurred when setting the changes to checked in the database : {ret}")
|
||||
|
||||
return success
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ if __name__ == "__main__":
|
|||
# Compute the config
|
||||
if not config_files:
|
||||
logger.info("Computing config ...")
|
||||
config = Configurator(args.settings, args.core, external_plugins, pro_plugins, tmp_config, logger)
|
||||
config = Configurator(args.settings, args.core, external_plugins, pro_plugins, str(Path(args.variables)), logger)
|
||||
config_files = config.get_config()
|
||||
|
||||
bunkerweb_version = Path(sep, "usr", "share", "bunkerweb", "VERSION").read_text().strip()
|
||||
|
|
|
|||
Loading…
Reference in a new issue