From 153031482f77c8ee4757093c8c5b94b3f8afc6f6 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Fri, 31 Mar 2017 22:51:10 +0100 Subject: [PATCH] Add delete mode to adlist command. Might be abetter way to do this --- advanced/Scripts/webpage.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/advanced/Scripts/webpage.sh b/advanced/Scripts/webpage.sh index 974dbdb5..f604a00f 100755 --- a/advanced/Scripts/webpage.sh +++ b/advanced/Scripts/webpage.sh @@ -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