mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-24 09:36:31 +00:00
Don't reset dns container (#1417)
* Don't reset dns container * Ignore more exception * Fix handling
This commit is contained in:
parent
a481ad73f3
commit
26f8c1df92
@ -121,14 +121,12 @@ class CoreDNS(JsonConfig, CoreSysAttributes):
|
||||
# Start DNS forwarder
|
||||
self.sys_create_task(self.forwarder.start(self.sys_docker.network.dns))
|
||||
|
||||
# Reset container configuration
|
||||
if await self.instance.is_running():
|
||||
with suppress(DockerAPIError):
|
||||
await self.instance.stop()
|
||||
|
||||
# Run CoreDNS
|
||||
with suppress(CoreDNSError):
|
||||
await self.start()
|
||||
if await self.instance.is_running():
|
||||
await self.restart()
|
||||
else:
|
||||
await self.start()
|
||||
|
||||
async def unload(self) -> None:
|
||||
"""Unload DNS forwarder."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user