Update resolved.conf (#328)
This commit is contained in:
parent
5256c521f0
commit
ba6a9d341c
5 changed files with 42 additions and 7 deletions
|
@ -24,12 +24,18 @@ 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
|
||||
# Set permissions of /etc/systemd/resolved.conf
|
||||
# check if file has correct permissions
|
||||
if [ "$(stat -c %a /etc/systemd/resolved.conf)" != "644" ]; then
|
||||
info "Setting permissions of /etc/systemd/resolved.conf"
|
||||
chmod 644 /etc/systemd/resolved.conf
|
||||
fi
|
||||
|
||||
# Enable and restart systemd-resolved
|
||||
info "Enable systemd-resolved"
|
||||
systemctl enable systemd-resolved.service> /dev/null 2>&1;
|
||||
systemctl start systemd-resolved.service
|
||||
fi
|
||||
info "Restarting systemd-resolved"
|
||||
systemctl restart systemd-resolved.service
|
||||
|
||||
# Check and fix systemd-journal-gatewayd socket location
|
||||
if [ ! -S "/run/systemd-journal-gatewayd.sock" ]; then
|
||||
|
|
|
@ -64,3 +64,6 @@ dpkg-divert --package homeassistant-supervised --add --rename \
|
|||
|
||||
dpkg-divert --package homeassistant-supervised --add --rename \
|
||||
--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
|
|
@ -16,6 +16,7 @@ connection.llmnr=2
|
|||
|
||||
[connectivity]
|
||||
uri=http://checkonline.home-assistant.io/online.txt
|
||||
interval=600
|
||||
|
||||
[device]
|
||||
wifi.scan-rand-mac-address=no
|
25
homeassistant-supervised/etc/systemd/resolved.conf
Normal file
25
homeassistant-supervised/etc/systemd/resolved.conf
Normal 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
|
|
@ -1,8 +1,8 @@
|
|||
[Unit]
|
||||
Description=Hass.io supervisor
|
||||
Requires=docker.service dbus.service
|
||||
Wants=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
|
||||
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 systemd-resolved.service
|
||||
StartLimitIntervalSec=60
|
||||
StartLimitBurst=5
|
||||
ConditionPathExists=/run/dbus/system_bus_socket
|
||||
|
|
Loading…
Reference in a new issue