|
|
|
@ -1269,16 +1269,16 @@ check_service_active() {
|
|
|
|
|
# Resolved needs to remain in place for installer to download needed files
|
|
|
|
|
# so this change needs to be made after installation is complete, but before resarting dnsmasq/ftl
|
|
|
|
|
disable_resolved_stublistener() {
|
|
|
|
|
# Check if Systemd-resolved's DNSSTub listener is enabled and active on port 53
|
|
|
|
|
# Check if Systemd-resolved's DNSStubListener is enabled and active on port 53
|
|
|
|
|
if check_service_active "systemd-resolved"; then
|
|
|
|
|
# Check if DNSStubListener is enabled
|
|
|
|
|
if ( grep '#DNSStubListener=yes' /etc/systemd/resolved.conf &> /dev/null ); then
|
|
|
|
|
if ( grep -E '#?DNSStubListener=yes' /etc/systemd/resolved.conf &> /dev/null ); then
|
|
|
|
|
# Disable the DNSStubListener to unbind it from port 53
|
|
|
|
|
# Note that this breaks dns functionality on host until dnsmasq/ftl are up and running
|
|
|
|
|
echo -e "Disabling systemd-resolved DNSStubListener"
|
|
|
|
|
# Make a backup of the original /etc/systemd/resolved.conf
|
|
|
|
|
# (This will need to be restored on uninstallation)
|
|
|
|
|
sed -i.orig 's/#DNSStubListener=yes/DNSStubListener=no/g' /etc/systemd/resolved.conf
|
|
|
|
|
sed -r -i.orig 's/#?DNSStubListener=yes/DNSStubListener=no/g' /etc/systemd/resolved.conf
|
|
|
|
|
systemctl restart systemd-resolved
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|