From c423e9cf8e2179049b230a310663262fd59dd835 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Fri, 23 Oct 2020 14:57:42 +0200 Subject: [PATCH] Fix plugin restart (#2166) --- supervisor/plugins/dns.py | 6 ++---- supervisor/plugins/multicast.py | 4 +--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/supervisor/plugins/dns.py b/supervisor/plugins/dns.py index 0e479409c..27ee99e45 100644 --- a/supervisor/plugins/dns.py +++ b/supervisor/plugins/dns.py @@ -147,13 +147,11 @@ class CoreDNS(JsonConfig, CoreSysAttributes): try: self.resolv_template = jinja2.Template(RESOLV_TMPL.read_text()) except OSError as err: - _LOGGER.error("Can't read coredns.tmpl: %s", err) + _LOGGER.error("Can't read resolve.tmpl: %s", err) # Run CoreDNS with suppress(CoreDNSError): - if await self.instance.is_running(): - await self.restart() - else: + if not await self.instance.is_running(): await self.start() # Update supervisor diff --git a/supervisor/plugins/multicast.py b/supervisor/plugins/multicast.py index 213b9d440..66ed5a487 100644 --- a/supervisor/plugins/multicast.py +++ b/supervisor/plugins/multicast.py @@ -96,9 +96,7 @@ class Multicast(JsonConfig, CoreSysAttributes): # Run Multicast plugin with suppress(MulticastError): - if await self.instance.is_running(): - await self.restart() - else: + if not await self.instance.is_running(): await self.start() async def install(self) -> None: