Skip to content

Commit

Permalink
Add support for 'AdGuardHome' in script
Browse files Browse the repository at this point in the history
  • Loading branch information
astsu777 committed Aug 14, 2024
1 parent f53a2f2 commit 9974e17
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion local/bin/clear-dns-cache
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#=========================================================================
# Author: Gaetan (gaetan@ictpourtous.com) - Twitter: @astsu777
# Creation: Sun 22 Aug 2021 12:07:59
# Last modified: Sat 07 Jan 2023 08:36:41
# Last modified: Wed 14 Aug 2024 09:00:26
# Version: 1.0
#
# Description: flush local DNS cache
Expand Down Expand Up @@ -37,6 +37,7 @@ elif [ "$(uname)" = "Linux" ]; then
dnsResolver=$(sudo lsof -i :53 -S | awk 'FNR==2 {print $1}')
if [ -z "$dnsResolver" ]; then echo "No DNS cache found" && exit 0; fi
case "$dnsResolver" in
AdGuardHo) sudo /opt/AdGuardHome/AdGuardHome -s restart ;;
systemd-resolve) sudo killall -USR2 systemd-resolved ;;
dnsmasq) sudo killall -USR1 dnsmasq ;;
nscd) sudo systemctl restart nscd.service ;;
Expand Down

0 comments on commit 9974e17

Please sign in to comment.