diff options
author | DL6ER <dl6er@dl6er.de> | 2021-05-23 13:11:04 +0300 |
---|---|---|
committer | DL6ER <dl6er@dl6er.de> | 2021-05-23 13:11:04 +0300 |
commit | a9e761ec1336284108baf12e908a2124059cef9f (patch) | |
tree | 8ebaefd6e3691b0967d86bc9287460e16aa1ef31 /advanced/Scripts/webpage.sh | |
parent | 761c1cd3059e4394d4fac7abaff1b25635066a5c (diff) |
Add missing sed anchors when deleting lines.
Signed-off-by: DL6ER <dl6er@dl6er.de>
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 8ef4d940..315236a3 100755 --- a/advanced/Scripts/webpage.sh +++ b/advanced/Scripts/webpage.sh @@ -716,7 +716,7 @@ RemoveCustomDNSAddress() { host="${args[3]}" if valid_ip "${ip}" || valid_ip6 "${ip}" ; then - sed -i "/${ip} ${host}/d" "${dnscustomfile}" + sed -i "/^${ip} ${host}$/d" "${dnscustomfile}" else echo -e " ${CROSS} Invalid IP has been passed" exit 1 @@ -748,7 +748,7 @@ RemoveCustomCNAMERecord() { if [[ -n "${validDomain}" ]]; then validTarget="$(checkDomain "${target}")" if [[ -n "${validDomain}" ]]; then - sed -i "/cname=${validDomain},${validTarget}/d" "${dnscustomcnamefile}" + sed -i "/cname=${validDomain},${validTarget}$/d" "${dnscustomcnamefile}" else echo " ${CROSS} Invalid Target Passed!" exit 1 |