Fix plugin restart (#2166)

This commit is contained in:
Pascal Vizeli 2020-10-23 14:57:42 +02:00 committed by GitHub
parent 1f13d6aa91
commit c423e9cf8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 7 deletions

View File

@ -147,13 +147,11 @@ class CoreDNS(JsonConfig, CoreSysAttributes):
try: try:
self.resolv_template = jinja2.Template(RESOLV_TMPL.read_text()) self.resolv_template = jinja2.Template(RESOLV_TMPL.read_text())
except OSError as err: except OSError as err:
_LOGGER.error("Can't read coredns.tmpl: %s", err) _LOGGER.error("Can't read resolve.tmpl: %s", err)
# Run CoreDNS # Run CoreDNS
with suppress(CoreDNSError): with suppress(CoreDNSError):
if await self.instance.is_running(): if not await self.instance.is_running():
await self.restart()
else:
await self.start() await self.start()
# Update supervisor # Update supervisor

View File

@ -96,9 +96,7 @@ class Multicast(JsonConfig, CoreSysAttributes):
# Run Multicast plugin # Run Multicast plugin
with suppress(MulticastError): with suppress(MulticastError):
if await self.instance.is_running(): if not await self.instance.is_running():
await self.restart()
else:
await self.start() await self.start()
async def install(self) -> None: async def install(self) -> None: