mirror of
https://github.com/pi-hole/pi-hole
synced 2024-11-19 06:38:17 +00:00
Require exact match
Updated to require an exact match to reduce false-positives, as suggested by DL6ER. Signed-off-by: Ryan Knapper <ryanknapper@gmail.com>
This commit is contained in:
parent
f2b3752f3d
commit
5ecfc58e5f
@ -346,7 +346,7 @@ CustomizeAdLists() {
|
|||||||
elif [[ "${args[2]}" == "disable" ]]; then
|
elif [[ "${args[2]}" == "disable" ]]; then
|
||||||
sed -i "\\@${args[3]}@s/^http/#http/g" "${list}"
|
sed -i "\\@${args[3]}@s/^http/#http/g" "${list}"
|
||||||
elif [[ "${args[2]}" == "add" ]]; then
|
elif [[ "${args[2]}" == "add" ]]; then
|
||||||
if [[ $(grep -c "${args[3]}" "${list}") -eq 0 ]] ; then
|
if [[ $(grep -c "^${args[3]}$" "${list}") -eq 0 ]] ; then
|
||||||
echo "${args[3]}" >> ${list}
|
echo "${args[3]}" >> ${list}
|
||||||
fi
|
fi
|
||||||
elif [[ "${args[2]}" == "del" ]]; then
|
elif [[ "${args[2]}" == "del" ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user