From e8d84b0d964f613e51fc982bced6e27bc34313b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 29 Dec 2020 00:11:33 +0100 Subject: [PATCH] installer.sh: Support docker snap instance It's possible to install HA supervised using docker-snap [1], however few paths needs to be adjusted accordingly. In particular the configuration file path is different and so it is the generated systemd dockerd service. [1] https://github.com/docker-snap/docker-snap --- installer.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/installer.sh b/installer.sh index 60cac15..e99c221 100644 --- a/installer.sh +++ b/installer.sh @@ -33,6 +33,11 @@ FILE_INTERFACES="/etc/network/interfaces" FILE_NM_CONF="/etc/NetworkManager/NetworkManager.conf" FILE_NM_CONNECTION="/etc/NetworkManager/system-connections/default" +if [[ "$BINARY_DOCKER" == "/snap/bin/docker" ]]; then + SERVICE_DOCKER="snap.docker.dockerd.service" + FILE_DOCKER_CONF="$(snap run --shell docker -c 'printenv SNAP_DATA')/config/daemon.json" +fi + URL_RAW_BASE="https://raw.githubusercontent.com/home-assistant/supervised-installer/master/files" URL_VERSION="https://version.home-assistant.io/stable.json" URL_BIN_APPARMOR="${URL_RAW_BASE}/hassio-apparmor"