#!/bin/bash set -e echo "๐Ÿงน Stopping and disabling AdGuardHome..." systemctl stop AdGuardHome || true systemctl disable AdGuardHome || true rm -f /etc/systemd/system/AdGuardHome.service rm -rf /opt/AdGuardHome rm -f /usr/bin/AdGuardHome echo "๐Ÿ“ฆ Installing Unbound..." apt update apt install -y unbound curl echo "๐ŸŒ Fetching root hints..." curl -o /var/lib/unbound/root.hints https://www.internic.net/domain/named.cache echo "๐Ÿ” Setting up hardened Unbound config..." cat >/etc/unbound/unbound.conf <