mirror of
https://github.com/openwrt/packages.git
synced 2026-01-10 11:44:48 +00:00
unbound: fix hotplug iface and ntp restarts
Unbound is configured to restart on hotplug/iface but this can result in numerous restarts at boot. Unbound also has a restart for NTP. This was observed to generate trouble and even with procd robustness too many crashes might occur (rare). Unbound would not be running. Give more care to /var/lib/unbound/root.key during restarts. Use procd for iface restarts. Check pidof() to wait one more second for Unbound. Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
This commit is contained in:
@@ -20,6 +20,9 @@ PROG=/usr/sbin/unbound
|
||||
##############################################################################
|
||||
|
||||
start_service() {
|
||||
# WAIT! Unbound often takes its time writing closure stats to syslog
|
||||
pidof $PROG && sleep 1
|
||||
|
||||
# complex UCI work
|
||||
unbound_start
|
||||
|
||||
@@ -39,7 +42,8 @@ stop_service() {
|
||||
##############################################################################
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger "dhcp" "network" "unbound"
|
||||
procd_add_reload_trigger "unbound"
|
||||
procd_add_raw_trigger "interface.*" 2000 /etc/init.d/unbound restart
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
|
||||
Reference in New Issue
Block a user