autoconf - fix missing configs update for DockerController

This commit is contained in:
bunkerity 2022-07-21 17:04:27 +02:00
parent 22398d5678
commit 324feb593d
No known key found for this signature in database
GPG Key ID: 3D80806F12602A7C
2 changed files with 5 additions and 5 deletions

View File

@ -60,7 +60,7 @@ class Config(ApiCaller, ConfigCaller) :
return True
if services != self.__services :
return True
if configs is not None and configs != self.__configs :
if not configs is None and configs != self.__configs :
return True
return False

View File

@ -93,14 +93,14 @@ class DockerController(Controller, ConfigCaller) :
result = search(r"^CUSTOM_CONF_(SERVER_HTTP|MODSEC|MODSEC_CRS)_(.+)$ ", real_variable)
if result is None :
continue
type = result.group(1).lower().replace("_", "-")
name = result.group(2)
configs[type][server_name + "/" + name] = value
cfg_type = result.group(1).lower().replace("_", "-")
cfg_name = result.group(2)
configs[cfg_type][server_name + "/" + cfg_name] = value
return configs
def apply_config(self) :
self._config.stop_scheduler()
ret = self._config.apply(self._instances, self._services)
ret = self._config.apply(self._instances, self._services, configs=self._configs)
self._config.start_scheduler()
return ret