diff options
author | Adam Warner <me@adamwarner.co.uk> | 2022-02-05 00:16:02 +0300 |
---|---|---|
committer | Adam Warner <me@adamwarner.co.uk> | 2022-02-05 00:16:02 +0300 |
commit | 08999bf315daf7f2d65bca06e205e9147f6375be (patch) | |
tree | 14a995c7c538d412eb4e1154f7fc4886bfa164d1 /advanced/Scripts/webpage.sh | |
parent | 2bd670a3ddf123697ce6d423c8fd876e505715b8 (diff) |
Use case insensitive deletion when removing custom CNAME/DNS records in case of manual entries with mixed case having been added
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
Diffstat (limited to 'advanced/Scripts/webpage.sh')
-rwxr-xr-x | advanced/Scripts/webpage.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/advanced/Scripts/webpage.sh b/advanced/Scripts/webpage.sh index 23b4f402..aa4795dd 100755 --- a/advanced/Scripts/webpage.sh +++ b/advanced/Scripts/webpage.sh @@ -739,7 +739,7 @@ RemoveCustomDNSAddress() { validHost="$(checkDomain "${host}")" if [[ -n "${validHost}" ]]; then if valid_ip "${ip}" || valid_ip6 "${ip}" ; then - sed -i "/^${ip} ${validHost}$/d" "${dnscustomfile}" + sed -i "/^${ip} ${validHost}$/Id" "${dnscustomfile}" else echo -e " ${CROSS} Invalid IP has been passed" exit 1 @@ -792,7 +792,7 @@ RemoveCustomCNAMERecord() { if [[ -n "${validDomain}" ]]; then validTarget="$(checkDomain "${target}")" if [[ -n "${validTarget}" ]]; then - sed -i "/cname=${validDomain},${validTarget}$/d" "${dnscustomcnamefile}" + sed -i "/cname=${validDomain},${validTarget}$/Id" "${dnscustomcnamefile}" else echo " ${CROSS} Invalid Target Passed!" exit 1 |