From b9ae01d819938efc487cc49e865b11544bd5b85f Mon Sep 17 00:00:00 2001 From: DL6ER Date: Wed, 25 Oct 2017 17:46:24 +0200 Subject: [PATCH] Send SIGHUP to pihole-FTL when restarting/reloading dnsmasq Signed-off-by: DL6ER --- pihole | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pihole b/pihole index 80cdefe7..ef0279c5 100755 --- a/pihole +++ b/pihole @@ -200,7 +200,7 @@ Options: # Scan Wildcards if [[ -e "${wildcardlist}" ]]; then - # Determine all subdomains, domain and TLDs + # Determine all subdomains, domain and TLDs mapfile -t wildcards <<< "$(processWildcards "${domainQuery}")" for match in "${wildcards[@]}"; do @@ -346,6 +346,9 @@ restartDNS() { svc="service dnsmasq ${svcOption}" fi + # Send signal to FTL to have it re-parse the gravity files + killall -s SIGHUP pihole-FTL + # Print output to Terminal, but not to Web Admin str="${svcOption^}ing DNS service" [[ -t 1 ]] && echo -ne " ${INFO} ${str}..." @@ -483,7 +486,7 @@ statusFunc() { # Determine if Pi-hole's addn-hosts configs are commented out addnConfigs=$(grep -i "addn-hosts=/" /etc/dnsmasq.d/01-pihole.conf) - + if [[ "${addnConfigs}" =~ "#" ]]; then # A config is commented out case "${1}" in