From 9c29bd627e9b22ca6f16841989fbb0ccb5c89c77 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Sat, 21 Apr 2018 23:55:33 +0100 Subject: [PATCH] fix user blacklisting --- gravity.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gravity.sh b/gravity.sh index 44889a60..4583208c 100755 --- a/gravity.sh +++ b/gravity.sh @@ -535,11 +535,10 @@ gravity_ParseUserDomains() { if [[ ! -f "${blacklistFile}" ]]; then return 0 fi - - mv "${blacklistFile}" "${blackList}.tmp" + # Copy the file over as /etc/pihole/black.list so dnsmasq can use it - mv "${blackList}.tmp" "${blackList}" 2> /dev/null || \ - echo -e "\\n ${CROSS} Unable to move ${blackList##*/}.tmp to ${piholeDir}" + cp "${blacklistFile}" "${blackList}" 2> /dev/null || \ + echo -e "\\n ${CROSS} Unable to move ${blacklistFile##*/} to ${piholeDir}" } # Trap Ctrl-C