1
0
mirror of https://github.com/pi-hole/pi-hole synced 2025-07-07 15:48:05 +00:00

upd: we can remove all domains in a group.

This commit is contained in:
DjoSmer 2024-03-01 18:24:04 +05:00
parent dbabbf8390
commit e65f35e17e

View File

@ -947,6 +947,7 @@ RemoveCustomWildcardDNSRecord() {
exit 1 exit 1
fi fi
if [[ "${domain}" != "*" ]]; then
validDomain="$(checkDomain "${domain}")" validDomain="$(checkDomain "${domain}")"
if [[ -z "${validDomain}" ]]; then if [[ -z "${validDomain}" ]]; then
echo " ${CROSS} Invalid Domain passed!" echo " ${CROSS} Invalid Domain passed!"
@ -961,6 +962,9 @@ RemoveCustomWildcardDNSRecord() {
if [[ -z "${isEmptyFile}" ]]; then if [[ -z "${isEmptyFile}" ]]; then
rm "$wildcardFilename"; rm "$wildcardFilename";
fi fi
else
rm "$wildcardFilename";
fi
# Restart dnsmasq to update removed custom CNAME records only if $reload not false # Restart dnsmasq to update removed custom CNAME records only if $reload not false
if [[ ! $reload == "false" ]]; then if [[ ! $reload == "false" ]]; then