mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Remove scanlist(), now in query.sh
Signed-off-by: Rob Gill <rrobgill@protonmail.com>
This commit is contained in:
parent
45a8eda49b
commit
2255d05664
1 changed files with 0 additions and 20 deletions
20
pihole
20
pihole
|
@ -86,26 +86,6 @@ updateGravityFunc() {
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# Scan an array of files for matching strings
|
|
||||||
scanList(){
|
|
||||||
# Escape full stops
|
|
||||||
local domain="${1//./\\.}" lists="${2}" type="${3:-}"
|
|
||||||
|
|
||||||
# Prevent grep from printing file path
|
|
||||||
cd "/etc/pihole" || exit 1
|
|
||||||
|
|
||||||
# Prevent grep -i matching slowly: http://bit.ly/2xFXtUX
|
|
||||||
export LC_CTYPE=C
|
|
||||||
|
|
||||||
# /dev/null forces filename to be printed when only one list has been generated
|
|
||||||
# shellcheck disable=SC2086
|
|
||||||
case "${type}" in
|
|
||||||
"exact" ) grep -i -E -l "(^|\\s)${domain}($|\\s|#)" ${lists} /dev/null;;
|
|
||||||
"wc" ) grep -i -o -m 1 "/${domain}/" ${lists};;
|
|
||||||
* ) grep -i "${domain}" ${lists} /dev/null;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
# Print each subdomain
|
# Print each subdomain
|
||||||
# e.g: foo.bar.baz.com = "foo.bar.baz.com bar.baz.com baz.com com"
|
# e.g: foo.bar.baz.com = "foo.bar.baz.com bar.baz.com baz.com com"
|
||||||
processWildcards() {
|
processWildcards() {
|
||||||
|
|
Loading…
Reference in a new issue