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