mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-09 18:26:30 +00:00
Fix plugin restart (#2166)
This commit is contained in:
parent
1f13d6aa91
commit
c423e9cf8e
@ -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
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user