]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
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 e797079c4f1f3afa8f2e32083e91bbbe9794d39f..daaa3d705d6a52ced932af8c6a12699d89dcd058 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"