mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-11-05 00:49:41 +00:00
Add support for encrypted snapshot files (#354)
* Add support for encrypted files * Update tar.py * Update tar.py * Update tar.py * Update addon.py * Update API.md * Update API.md * Update tar.py * cleanup snapshot * Update API.md * Update const.py * Update const.py * Update validate.py * Update homeassistant.py * Update homeassistant.py * Update validate.py * Update validate.py * Update snapshot.py * Update utils.py * Update snapshot.py * Update utils.py * Update snapshot.py * Update validate.py * Update snapshot.py * Update validate.py * Update const.py * fix lint * Update snapshot.py * Update __init__.py * Update snapshot.py * Update __init__.py * Update __init__.py * Finish snapshot object * Fix struct * cleanup snapshot flow * fix some points * Add API upload * fix lint * Update voluptuous * fix docker * Update snapshots.py * fix versions * fix schema * fix schema * fix api * fix path * Handle import better * fix routing * fix bugs * fix bug * cleanup gz * fix some bugs * fix stage * Fix * fix * protect None password * fix API * handle exception better * fix * fix remove of addons * fix bug * clenaup code * fix none tasks * Encrypt Home-Assistant * fix decrypt * fix binary
This commit is contained in:
@@ -13,7 +13,7 @@ from aiohttp.hdrs import CONTENT_TYPE
|
||||
from .const import (
|
||||
FILE_HASSIO_HOMEASSISTANT, ATTR_IMAGE, ATTR_LAST_VERSION, ATTR_UUID,
|
||||
ATTR_BOOT, ATTR_PASSWORD, ATTR_PORT, ATTR_SSL, ATTR_WATCHDOG,
|
||||
ATTR_STARTUP_TIME, HEADER_HA_ACCESS, CONTENT_TYPE_JSON)
|
||||
ATTR_WAIT_BOOT, HEADER_HA_ACCESS, CONTENT_TYPE_JSON)
|
||||
from .coresys import CoreSysAttributes
|
||||
from .docker.homeassistant import DockerHomeAssistant
|
||||
from .utils import convert_to_ascii
|
||||
@@ -97,14 +97,14 @@ class HomeAssistant(JsonConfig, CoreSysAttributes):
|
||||
self._data[ATTR_WATCHDOG] = value
|
||||
|
||||
@property
|
||||
def startup_time(self):
|
||||
def wait_boot(self):
|
||||
"""Return time to wait for Home-Assistant startup."""
|
||||
return self._data[ATTR_STARTUP_TIME]
|
||||
return self._data[ATTR_WAIT_BOOT]
|
||||
|
||||
@startup_time.setter
|
||||
def startup_time(self, value):
|
||||
@wait_boot.setter
|
||||
def wait_boot(self, value):
|
||||
"""Set time to wait for Home-Assistant startup."""
|
||||
self._data[ATTR_STARTUP_TIME] = value
|
||||
self._data[ATTR_WAIT_BOOT] = value
|
||||
|
||||
@property
|
||||
def version(self):
|
||||
@@ -343,7 +343,7 @@ class HomeAssistant(JsonConfig, CoreSysAttributes):
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
while time.monotonic() - start_time < self.startup_time:
|
||||
while time.monotonic() - start_time < self.wait_boot:
|
||||
if await self._loop.run_in_executor(None, check_port):
|
||||
_LOGGER.info("Detect a running Home-Assistant instance")
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user