From 6a821ab49ac11819fcba014149ac25e0f89a2e30 Mon Sep 17 00:00:00 2001 From: bol-van Date: Tue, 19 Oct 2021 12:37:36 +0300 Subject: [PATCH] ipset: kill mDNSResponder only if killall exist --- ipset/def.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ipset/def.sh b/ipset/def.sh index fe0512b..5b6516d 100644 --- a/ipset/def.sh +++ b/ipset/def.sh @@ -152,6 +152,8 @@ flush_dns_cache() if exists killall; then killall -HUP dnsmasq 2>/dev/null + # MacOS + killall -HUP mDNSResponder 2>/dev/null elif exists pkill; then pkill -HUP ^dnsmasq$ else @@ -166,8 +168,6 @@ flush_dns_cache() systemd-resolve --flush-caches fi - # MacOS - killall -HUP mDNSResponder 2>/dev/null } dnstest() {