Add delete mode to adlist command. Might be abetter way to do this

This commit is contained in:
Adam Warner 2017-03-31 22:51:10 +01:00
parent 1f74b1e2fd
commit 153031482f
No known key found for this signature in database
GPG key ID: 7C062498C7FA6E49

View file

@ -329,6 +329,9 @@ CustomizeAdLists() {
sed -i "\\@${args[3]}@s/^http/#http/g" "${list}"
elif [[ "${args[2]}" == "add" ]] ; then
echo "${args[3]}" >> ${list}
elif [[ "${args[2]}" == "del" ]] ; then
var=$(echo "${args[3]}" | sed 's/\//\\\//g')
sed -i "/${var}/Id" "${list}"
else
echo "Not permitted"
return 1