Allow more precise deletion by passing ip as parameter

Signed-off-by: Mograine <ghiot.pierre@gmail.com>
This commit is contained in:
Mograine 2019-10-28 13:21:05 +01:00
parent bb8dbe9da5
commit 193ff38ab3

View file

@ -572,8 +572,9 @@ AddCustomDNSAddress() {
}
RemoveCustomDNSAddress() {
host="${args[2]}"
sed -i "/.*${host}/d" "${dnscustomfile}"
ip="${args[2]}"
host="${args[3]}"
sed -i "/${ip} ${host}/d" "${dnscustomfile}"
}
main() {