add in CustomizeAdlists function

pull/1365/head
Adam Warner 7 years ago
parent 02040cd25d
commit b4bc90fb85
No known key found for this signature in database
GPG Key ID: 7C062498C7FA6E49

@ -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…
Cancel
Save