mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 10:43:55 +00:00
Add missing sed anchors when deleting lines.
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
761c1cd305
commit
a9e761ec13
1 changed files with 2 additions and 2 deletions
|
@ -716,7 +716,7 @@ RemoveCustomDNSAddress() {
|
||||||
host="${args[3]}"
|
host="${args[3]}"
|
||||||
|
|
||||||
if valid_ip "${ip}" || valid_ip6 "${ip}" ; then
|
if valid_ip "${ip}" || valid_ip6 "${ip}" ; then
|
||||||
sed -i "/${ip} ${host}/d" "${dnscustomfile}"
|
sed -i "/^${ip} ${host}$/d" "${dnscustomfile}"
|
||||||
else
|
else
|
||||||
echo -e " ${CROSS} Invalid IP has been passed"
|
echo -e " ${CROSS} Invalid IP has been passed"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -748,7 +748,7 @@ RemoveCustomCNAMERecord() {
|
||||||
if [[ -n "${validDomain}" ]]; then
|
if [[ -n "${validDomain}" ]]; then
|
||||||
validTarget="$(checkDomain "${target}")"
|
validTarget="$(checkDomain "${target}")"
|
||||||
if [[ -n "${validDomain}" ]]; then
|
if [[ -n "${validDomain}" ]]; then
|
||||||
sed -i "/cname=${validDomain},${validTarget}/d" "${dnscustomcnamefile}"
|
sed -i "/cname=${validDomain},${validTarget}$/d" "${dnscustomcnamefile}"
|
||||||
else
|
else
|
||||||
echo " ${CROSS} Invalid Target Passed!"
|
echo " ${CROSS} Invalid Target Passed!"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in a new issue