diff --git a/etc/rc.d/rc.avahidaemon b/etc/rc.d/rc.avahidaemon index 70cc82b9e..e57fc196e 100755 --- a/etc/rc.d/rc.avahidaemon +++ b/etc/rc.d/rc.avahidaemon @@ -120,11 +120,16 @@ avahid_reload(){ } avahid_update(){ - if check && [[ "$(this allow-interfaces)" != "$BIND" ]]; then - if avahid_running; then + if avahid_running; then + # only restart a running daemon when the computed bind list changed + if check && [[ "$(this allow-interfaces)" != "$BIND" ]]; then log "Updating $DAEMON..." avahid_restart # note we need restart here, not reload in order to update interfaces - else + fi + else + # recover daemon when interfaces are back, even if config already matches computed bind list + if check && [[ -n $BIND ]]; then + log "Recovering $DAEMON..." avahid_start # handle case where avahi-daemon exited because no suitable interfaces fi fi