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
This commit is contained in:
Marco Trevisan (Treviño) 2020-12-29 00:11:33 +01:00
parent d798325220
commit e8d84b0d96

View file

@ -33,6 +33,11 @@ FILE_INTERFACES="/etc/network/interfaces"
FILE_NM_CONF="/etc/NetworkManager/NetworkManager.conf" FILE_NM_CONF="/etc/NetworkManager/NetworkManager.conf"
FILE_NM_CONNECTION="/etc/NetworkManager/system-connections/default" 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_RAW_BASE="https://raw.githubusercontent.com/home-assistant/supervised-installer/master/files"
URL_VERSION="https://version.home-assistant.io/stable.json" URL_VERSION="https://version.home-assistant.io/stable.json"
URL_BIN_APPARMOR="${URL_RAW_BASE}/hassio-apparmor" URL_BIN_APPARMOR="${URL_RAW_BASE}/hassio-apparmor"