Signed-off-by: Arne Fitzenreiter arne_f@ipfire.org --- src/initscripts/system/unbound | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/initscripts/system/unbound b/src/initscripts/system/unbound index b6b57f1c1..507f589ca 100644 --- a/src/initscripts/system/unbound +++ b/src/initscripts/system/unbound @@ -592,13 +592,13 @@ case "$1" in write_forward_conf write_hosts_conf
+ # Call unbound-control and perform the reload + /usr/sbin/unbound-control -q reload + # Update Safe Search rules if the system is online. if [ -e "/var/ipfire/red/active" ]; then update_safe_search fi - - # Call unbound-control and perform the reload - /usr/sbin/unbound-control -q reload ;;
status)
Signed-off-by: Arne Fitzenreiter arne_f@ipfire.org --- src/initscripts/system/unbound | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/initscripts/system/unbound b/src/initscripts/system/unbound index 507f589ca..7bf2ffc2c 100644 --- a/src/initscripts/system/unbound +++ b/src/initscripts/system/unbound @@ -587,7 +587,7 @@ case "$1" in sleep 1 $0 start ;; - reload|remove-forwarders) + reload|remove-forwarders|update-forwarders) # Update configuration files write_forward_conf write_hosts_conf @@ -595,6 +595,14 @@ case "$1" in # Call unbound-control and perform the reload /usr/sbin/unbound-control -q reload
+ # Dummy Resolve to wait for unbound + resolve "ping.ipfire.org" &>/dev/null + + if [ "$1" = "update-forwarders" ]; then + # Make sure DNS works at this point + fix_time_if_dns_fails + fi + # Update Safe Search rules if the system is online. if [ -e "/var/ipfire/red/active" ]; then update_safe_search @@ -605,9 +613,6 @@ case "$1" in statusproc /usr/sbin/unbound ;;
- update-forwarders) - $0 reload - # Make sure DNS works at this point fix_time_if_dns_fails ;;
Signed-off-by: Arne Fitzenreiter arne_f@ipfire.org --- src/initscripts/system/unbound | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/initscripts/system/unbound b/src/initscripts/system/unbound index 7bf2ffc2c..b3185feab 100644 --- a/src/initscripts/system/unbound +++ b/src/initscripts/system/unbound @@ -534,7 +534,7 @@ update_safe_search() { for domain in ${google_tlds[@]}; do unbound-control local_zone "${domain}" transparent >/dev/null for address in ${addresses}; do - unbound-control local_data: "www.${domain} ${LOCAL_TTL} IN A ${address}" + unbound-control local_data "www.${domain} ${LOCAL_TTL} IN A ${address}" done >/dev/null done
Signed-off-by: Arne Fitzenreiter arne_f@ipfire.org --- config/rootfiles/core/142/filelists/files | 1 + 1 file changed, 1 insertion(+)
diff --git a/config/rootfiles/core/142/filelists/files b/config/rootfiles/core/142/filelists/files index 4d6c69adb..8be29a77c 100644 --- a/config/rootfiles/core/142/filelists/files +++ b/config/rootfiles/core/142/filelists/files @@ -4,6 +4,7 @@ srv/web/ipfire/cgi-bin/credits.cgi var/ipfire/langs etc/rc.d/helper/aws-setup etc/rc.d/helper/azure-setup +etc/rc.d/init.d/unbound etc/suricata/suricata.yaml lib/udev/network-hotplug-bridges opt/pakfire/etc/pakfire.conf