From 8edce2ce2c00c0c33a1c1a3ed33046972874ad51 Mon Sep 17 00:00:00 2001 From: Ragnar Rova Date: Sat, 6 Jan 2024 16:51:12 +0100 Subject: [PATCH] Unmask system-resolved if needed Installation on my system (Debian 12.4) failed in the configuration phase of the debian package due to systemd-resolved being masked. This was from a fresh minimal installation of debian bookworm, by just following the home assistant supervised install readme. --- homeassistant-supervised/DEBIAN/postinst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/homeassistant-supervised/DEBIAN/postinst b/homeassistant-supervised/DEBIAN/postinst index 3e5ee72..90f985f 100755 --- a/homeassistant-supervised/DEBIAN/postinst +++ b/homeassistant-supervised/DEBIAN/postinst @@ -31,6 +31,11 @@ if [ "$(stat -c %a /etc/systemd/resolved.conf)" != "644" ]; then chmod 644 /etc/systemd/resolved.conf fi +# Unmask systemd-resolved if needed +if systemctl status systemd-resolved.service | grep -q 'masked'; then + sudo systemctl unmask systemd-resolved.service +fi + # Enable and restart systemd-resolved info "Enable systemd-resolved" systemctl enable systemd-resolved.service> /dev/null 2>&1;