mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-26 10:52:57 +02:00
unbound: drop remove-dns-fowarders at red.down
this functions has only reloaded unbound config which is useless at shutting down the red interface. Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Remove DNS forwarders for unbound
|
||||
exec /etc/init.d/unbound remove-forwarders
|
||||
@@ -274,8 +274,6 @@ get_memory_amount() {
|
||||
}
|
||||
|
||||
fix_time_if_dns_fails() {
|
||||
# Sometimes the first try fails so do it twice
|
||||
resolve "ping.ipfire.org" &>/dev/null
|
||||
# If DNS is working, everything is fine
|
||||
if resolve "ping.ipfire.org" &>/dev/null; then
|
||||
return 0
|
||||
@@ -587,7 +585,7 @@ case "$1" in
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
reload|remove-forwarders|update-forwarders)
|
||||
reload|update-forwarders)
|
||||
# Update configuration files
|
||||
write_forward_conf
|
||||
write_hosts_conf
|
||||
@@ -595,10 +593,6 @@ case "$1" in
|
||||
# Call unbound-control and perform the reload
|
||||
/usr/sbin/unbound-control -q reload
|
||||
|
||||
if [ "$1" = "remove-forwarders" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Dummy Resolve to wait for unbound
|
||||
resolve "ping.ipfire.org" &>/dev/null
|
||||
|
||||
@@ -617,16 +611,12 @@ case "$1" in
|
||||
statusproc /usr/sbin/unbound
|
||||
;;
|
||||
|
||||
# Make sure DNS works at this point
|
||||
fix_time_if_dns_fails
|
||||
;;
|
||||
|
||||
resolve)
|
||||
resolve "${2}" || exit $?
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|reload|status|resolve|update-forwarders|remove-forwarders}"
|
||||
echo "Usage: $0 {start|stop|restart|reload|status|resolve|update-forwarders}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user