From 976ae96633cd8e11efa522eba356818d4b15b5a4 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Fri, 23 Oct 2020 16:49:35 +0200 Subject: [PATCH] Revert dns restart logic (#2169) --- supervisor/plugins/dns.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/supervisor/plugins/dns.py b/supervisor/plugins/dns.py index 27ee99e45..58d9ac1ef 100644 --- a/supervisor/plugins/dns.py +++ b/supervisor/plugins/dns.py @@ -150,8 +150,12 @@ class CoreDNS(JsonConfig, CoreSysAttributes): _LOGGER.error("Can't read resolve.tmpl: %s", err) # Run CoreDNS + # If running, restart to update config/hosts + # this get shipped with Supervisor with suppress(CoreDNSError): - if not await self.instance.is_running(): + if await self.instance.is_running(): + await self.restart() + else: await self.start() # Update supervisor