mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-31 19:20:54 +00:00
add in CustomizeAdlists function
This commit is contained in:
parent
02040cd25d
commit
b4bc90fb85
@ -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 New Issue
Block a user