unbound: Add yandex.com to safe search feature
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 12 Jun 2019 16:11:32 +0000 (17:11 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 12 Jun 2019 16:11:32 +0000 (17:11 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/initscripts/system/unbound

index e797079..daaa3d7 100644 (file)
@@ -733,8 +733,12 @@ write_safe_search_conf() {
                done
 
                # Yandex
-               echo "  local-zone: yandex.ru transparent"
-               echo "  local-data: \"yandex.ru A 213.180.193.56\""
+               for domain in yandex.com yandex.ru; do
+                       echo "  local-zone: ${domain} transparent"
+                       for address in $(resolve "familysearch.${domain}"); do
+                               echo "  local-data: \"${domain} ${LOCAL_TTL} IN A ${address}\""
+                       done
+               done
 
                # YouTube
                echo "  local-zone: youtube.com transparent"