Update resolved.conf (#328)

This commit is contained in:
Matheson Steplock 2023-10-16 03:29:15 -04:00 committed by GitHub
parent 5256c521f0
commit ba6a9d341c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 42 additions and 7 deletions

View file

@ -24,13 +24,19 @@ URL_APPARMOR_PROFILE="https://version.home-assistant.io/apparmor.txt"
info "Restarting NetworkManager" info "Restarting NetworkManager"
systemctl restart "${SERVICE_NM}" systemctl restart "${SERVICE_NM}"
# Enable and start systemd-resolved # Set permissions of /etc/systemd/resolved.conf
if [ "$(systemctl is-active systemd-resolved)" = 'inactive' ]; then # check if file has correct permissions
info "Enable systemd-resolved" if [ "$(stat -c %a /etc/systemd/resolved.conf)" != "644" ]; then
systemctl enable systemd-resolved.service> /dev/null 2>&1; info "Setting permissions of /etc/systemd/resolved.conf"
systemctl start systemd-resolved.service chmod 644 /etc/systemd/resolved.conf
fi fi
# Enable and restart systemd-resolved
info "Enable systemd-resolved"
systemctl enable systemd-resolved.service> /dev/null 2>&1;
info "Restarting systemd-resolved"
systemctl restart systemd-resolved.service
# Check and fix systemd-journal-gatewayd socket location # Check and fix systemd-journal-gatewayd socket location
if [ ! -S "/run/systemd-journal-gatewayd.sock" ]; then if [ ! -S "/run/systemd-journal-gatewayd.sock" ]; then
info "Set up systemd-journal-gatewayd socket file" info "Set up systemd-journal-gatewayd socket file"

View file

@ -64,3 +64,6 @@ dpkg-divert --package homeassistant-supervised --add --rename \
dpkg-divert --package homeassistant-supervised --add --rename \ dpkg-divert --package homeassistant-supervised --add --rename \
--divert /etc/network/interfaces.real /etc/network/interfaces --divert /etc/network/interfaces.real /etc/network/interfaces
dpkg-divert --package homeassistant-supervised --add --rename \
--divert /etc/systemd/resolved.conf.real /etc/systemd/resolved.conf

View file

@ -16,6 +16,7 @@ connection.llmnr=2
[connectivity] [connectivity]
uri=http://checkonline.home-assistant.io/online.txt uri=http://checkonline.home-assistant.io/online.txt
interval=600
[device] [device]
wifi.scan-rand-mac-address=no wifi.scan-rand-mac-address=no

View file

@ -0,0 +1,25 @@
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See resolved.conf(5) for details
[Resolve]
#DNS=
#FallbackDNS=1.1.1.1 8.8.8.8 1.0.0.1 8.8.4.4 2606:4700:4700::1111 2001:4860:4860::8888 2606:4700:4700::1001 2001:4860:4860::8844
#Domains=
DNSSEC=no
DNSOverTLS=no
#MulticastDNS=yes
#LLMNR=yes
#Cache=yes
DNSStubListener=no
#ReadEtcHosts=yes
#ResolveUnicastSingleLabel=no

View file

@ -1,8 +1,8 @@
[Unit] [Unit]
Description=Hass.io supervisor Description=Hass.io supervisor
Requires=docker.service dbus.service Requires=docker.service dbus.service
Wants=network-online.target hassio-apparmor.service time-sync.target systemd-journal-gatewayd.socket Wants=network-online.target hassio-apparmor.service time-sync.target systemd-journal-gatewayd.socket systemd-resolved.service
After=docker.service dbus.service network-online.target hassio-apparmor.service time-sync.target systemd-journal-gatewayd.socket After=docker.service dbus.service network-online.target hassio-apparmor.service time-sync.target systemd-journal-gatewayd.socket systemd-resolved.service
StartLimitIntervalSec=60 StartLimitIntervalSec=60
StartLimitBurst=5 StartLimitBurst=5
ConditionPathExists=/run/dbus/system_bus_socket ConditionPathExists=/run/dbus/system_bus_socket