mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-23 07:18:07 +00:00
add list options requested from issue#442
This commit is contained in:
parent
28a3cbfa87
commit
70dadfba28
@ -61,6 +61,7 @@ function helpFunc()
|
|||||||
echo "::: -f, --force Force updating of the hosts files, even if there are no changes"
|
echo "::: -f, --force Force updating of the hosts files, even if there are no changes"
|
||||||
echo "::: -q, --quiet output is less verbose"
|
echo "::: -q, --quiet output is less verbose"
|
||||||
echo "::: -h, --help Show this help dialog"
|
echo "::: -h, --help Show this help dialog"
|
||||||
|
echo "::: -l, --list Display your blacklisted domains"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -173,6 +174,19 @@ function Reload() {
|
|||||||
echo " done!"
|
echo " done!"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function DisplayBlist() {
|
||||||
|
clear
|
||||||
|
echo -e " Displaying Gravity Affected Domains \n"
|
||||||
|
|
||||||
|
GRD="$blacklist"
|
||||||
|
count=1
|
||||||
|
while IFS= read -r RD
|
||||||
|
do
|
||||||
|
echo "${count}: $RD"
|
||||||
|
count=$((count+1))
|
||||||
|
done < "$blacklist"
|
||||||
|
}
|
||||||
|
|
||||||
###################################################
|
###################################################
|
||||||
|
|
||||||
for var in "$@"
|
for var in "$@"
|
||||||
@ -183,6 +197,7 @@ do
|
|||||||
"-f" | "--force" ) force=true;;
|
"-f" | "--force" ) force=true;;
|
||||||
"-q" | "--quiet" ) versbose=false;;
|
"-q" | "--quiet" ) versbose=false;;
|
||||||
"-h" | "--help" ) helpFunc;;
|
"-h" | "--help" ) helpFunc;;
|
||||||
|
"-l" | "--list" ) DisplayBlist;;
|
||||||
* ) HandleOther "$var";;
|
* ) HandleOther "$var";;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
@ -60,6 +60,7 @@ function helpFunc()
|
|||||||
echo "::: -f, --force Force updating of the hosts files, even if there are no changes"
|
echo "::: -f, --force Force updating of the hosts files, even if there are no changes"
|
||||||
echo "::: -q, --quiet output is less verbose"
|
echo "::: -q, --quiet output is less verbose"
|
||||||
echo "::: -h, --help Show this help dialog"
|
echo "::: -h, --help Show this help dialog"
|
||||||
|
echo "::: -l, --list Display your whitelisted domains"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -186,6 +187,19 @@ function Reload() {
|
|||||||
echo " done!"
|
echo " done!"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function DisplayWlist() {
|
||||||
|
clear
|
||||||
|
echo -e " Displaying Gravity Resistant Domains \n"
|
||||||
|
|
||||||
|
GRD="$whitelist"
|
||||||
|
count=1
|
||||||
|
while IFS= read -r RD
|
||||||
|
do
|
||||||
|
echo "${count}: $RD"
|
||||||
|
count=$((count+1))
|
||||||
|
done < "$whitelist"
|
||||||
|
}
|
||||||
|
|
||||||
###################################################
|
###################################################
|
||||||
|
|
||||||
for var in "$@"
|
for var in "$@"
|
||||||
@ -196,6 +210,7 @@ do
|
|||||||
"-f" | "--force" ) force=true;;
|
"-f" | "--force" ) force=true;;
|
||||||
"-q" | "--quiet" ) versbose=false;;
|
"-q" | "--quiet" ) versbose=false;;
|
||||||
"-h" | "--help" ) helpFunc;;
|
"-h" | "--help" ) helpFunc;;
|
||||||
|
"-l" | "--list" ) DisplayWlist;;
|
||||||
* ) HandleOther "$var";;
|
* ) HandleOther "$var";;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user