mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-24 00:00:14 +00:00
Merge branch 'development' into promoTweaksTheSecond
# Conflicts: # advanced/Scripts/blacklist.sh # advanced/Scripts/whitelist.sh
This commit is contained in:
commit
9ab6df0e54
10 changed files with 117 additions and 116 deletions
|
@ -10,18 +10,19 @@
|
|||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
helpFunc()
|
||||
{
|
||||
echo "::: Immediately blacklists one or more domains in the hosts file"
|
||||
echo ":::"
|
||||
echo ":::"
|
||||
echo "::: Usage: pihole -b domain1 [domain2 ...]"
|
||||
echo "::: Options:"
|
||||
echo "::: -d, --delmode Remove domains from the blacklist"
|
||||
echo "::: -nr, --noreload Update blacklist without refreshing dnsmasq"
|
||||
echo "::: -q, --quiet output is less verbose"
|
||||
echo "::: -h, --help Show this help dialog"
|
||||
echo "::: -l, --list Display your blacklisted domains"
|
||||
helpFunc() {
|
||||
cat << EOM
|
||||
::: Immediately blacklists one or more domains in the hosts file
|
||||
:::
|
||||
:::
|
||||
::: Usage: pihole -b domain1 [domain2 ...]
|
||||
::: Options:
|
||||
::: -d, --delmode Remove domains from the blacklist
|
||||
::: -nr, --noreload Update blacklist without refreshing dnsmasq
|
||||
::: -q, --quiet output is less verbose
|
||||
::: -h, --help Show this help dialog
|
||||
::: -l, --list Display your blacklisted domains
|
||||
EOM
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
@ -51,7 +52,7 @@ HandleOther(){
|
|||
fi
|
||||
}
|
||||
|
||||
PopBlacklistFile(){
|
||||
PopBlacklistFile() {
|
||||
#check blacklist file exists, and if not, create it
|
||||
if [[ ! -f ${blacklist} ]];then
|
||||
touch ${blacklist}
|
||||
|
@ -65,7 +66,7 @@ PopBlacklistFile(){
|
|||
done
|
||||
}
|
||||
|
||||
AddDomain(){
|
||||
AddDomain() {
|
||||
#| sed 's/\./\\./g'
|
||||
bool=false
|
||||
grep -Ex -q "$1" ${blacklist} || bool=true
|
||||
|
@ -83,7 +84,7 @@ AddDomain(){
|
|||
fi
|
||||
}
|
||||
|
||||
RemoveDomain(){
|
||||
RemoveDomain() {
|
||||
|
||||
bool=false
|
||||
grep -Ex -q "$1" ${blacklist} || bool=true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue