mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 10:43:55 +00:00
add in CustomizeAdlists function
This commit is contained in:
parent
02040cd25d
commit
b4bc90fb85
1 changed files with 16 additions and 0 deletions
|
@ -319,6 +319,22 @@ SetWebUILayout(){
|
|||
|
||||
}
|
||||
|
||||
CustomizeAdLists() {
|
||||
|
||||
list = "/etc/pihole/adlists.list"
|
||||
|
||||
if [[ "${args[2]}" == "enable" ]] ; then
|
||||
sed -i "\\@${args[3]}@s/^#http/http/g" "${list}"
|
||||
elif [[ "${args[2]}" == "disable" ]] ; then
|
||||
sed -i "\\@${args[3]}@s/^http/#http/g" "${list}"
|
||||
elif [[ "${args[2]}" == "add" && "${args[3]}" == "user" ]] ; then
|
||||
echo "${args[3]}" >> /etc/pihole/adlists.user
|
||||
else
|
||||
echo "Not permitted"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
SetPrivacyMode(){
|
||||
|
||||
if [[ "${args[2]}" == "true" ]] ; then
|
||||
|
|
Loading…
Reference in a new issue