From 5cc09a65873be9b1908b82389d679bac18e76cf0 Mon Sep 17 00:00:00 2001 From: Matheson Steplock Date: Wed, 23 Mar 2022 01:38:01 +0000 Subject: [PATCH 1/2] Enable and start systemd-resolved --- homeassistant-supervised/DEBIAN/postinst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/homeassistant-supervised/DEBIAN/postinst b/homeassistant-supervised/DEBIAN/postinst index 641e487..ed61811 100755 --- a/homeassistant-supervised/DEBIAN/postinst +++ b/homeassistant-supervised/DEBIAN/postinst @@ -126,6 +126,12 @@ systemctl start hassio-apparmor.service info "Start Home Assistant Supervised" systemctl start hassio-supervisor.service +# Enable and start systemd-resolved +if [ "$(systemctl is-active systemd-resolved)" = 'inactive' ]; then + info "Enable systemd-resolved" + systemctl enable systemd-resolved.service> /dev/null 2>&1; + systemctl start systemd-resolved.service> /dev/null 2>&1; +fi # Install HA CLI info "Installing the 'ha' cli" From a6fa3fd721cc6c6534b0403caa35e1526eeb3375 Mon Sep 17 00:00:00 2001 From: Matheson Steplock Date: Wed, 23 Mar 2022 01:48:59 +0000 Subject: [PATCH 2/2] reorder start --- homeassistant-supervised/DEBIAN/postinst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/homeassistant-supervised/DEBIAN/postinst b/homeassistant-supervised/DEBIAN/postinst index ed61811..c2275b8 100755 --- a/homeassistant-supervised/DEBIAN/postinst +++ b/homeassistant-supervised/DEBIAN/postinst @@ -24,6 +24,13 @@ URL_APPARMOR_PROFILE="https://version.home-assistant.io/apparmor.txt" info "Restarting NetworkManager" systemctl restart "${SERVICE_NM}" +# Enable and start systemd-resolved +if [ "$(systemctl is-active systemd-resolved)" = 'inactive' ]; then + info "Enable systemd-resolved" + systemctl enable systemd-resolved.service> /dev/null 2>&1; + systemctl start systemd-resolved.service> /dev/null 2>&1; +fi + # Restart Docker service info "Restarting docker service" systemctl restart "$SERVICE_DOCKER" @@ -126,13 +133,6 @@ systemctl start hassio-apparmor.service info "Start Home Assistant Supervised" systemctl start hassio-supervisor.service -# Enable and start systemd-resolved -if [ "$(systemctl is-active systemd-resolved)" = 'inactive' ]; then - info "Enable systemd-resolved" - systemctl enable systemd-resolved.service> /dev/null 2>&1; - systemctl start systemd-resolved.service> /dev/null 2>&1; -fi - # Install HA CLI info "Installing the 'ha' cli" chmod a+x "${PREFIX}/bin/ha"