Fix echoing wrong domain when converting wildcard

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
Mcat12 2018-07-08 15:47:18 -04:00
parent 70f2b26c86
commit af5fc6547a
No known key found for this signature in database
GPG Key ID: ABB8FC9789AF524D
1 changed files with 2 additions and 2 deletions

View File

@ -138,7 +138,7 @@ AddDomain() {
bool=true
domain="${1}"
[[ "${wildcard}" == true ]] && domain="((^)|(\\.))$(echo domain | sed "s/\./\\\./g")$"
[[ "${wildcard}" == true ]] && domain="((^)|(\\.))$(echo "${domain}" | sed "s/\./\\\./g")$"
# Is the domain in the list?
# Search only for exactly matching lines
@ -186,7 +186,7 @@ RemoveDomain() {
[[ -z "${type}" ]] && type="--wildcard-only"
domain="${1}"
[[ "${wildcard}" == true ]] && domain="((^)|(\\.))$(echo domain | sed "s/\./\\\./g")$"
[[ "${wildcard}" == true ]] && domain="((^)|(\\.))$(echo "${domain}" | sed "s/\./\\\./g")$"
bool=true
# Is it in the list?