1
0
mirror of https://github.com/pi-hole/pi-hole.git synced 2025-04-08 17:05:17 +02:00

Remove no-longer-needed pihole sudoers file ()

This commit is contained in:
Adam Warner 2025-04-06 13:52:37 +01:00 committed by GitHub
commit 7e5d9db6b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -2413,6 +2413,15 @@ main() {
# Migrate existing install to v6.0
migrate_dnsmasq_configs
# Cleanup old v5 sudoers file if it exists
sudoers_file="/etc/sudoers.d/pihole"
if [[ -f "${sudoers_file}" ]]; then
# only remove the file if it contains the Pi-hole header
if grep -q "Pi-hole: A black hole for Internet advertisements" "${sudoers_file}"; then
rm -f "${sudoers_file}"
fi
fi
# Check for and disable systemd-resolved-DNSStubListener before reloading resolved
# DNSStubListener needs to remain in place for installer to download needed files,
# so this change needs to be made after installation is complete,