From 5665c3bdf9c5b63a443bf6d03392284193deb6d8 Mon Sep 17 00:00:00 2001 From: James White Date: Tue, 3 Aug 2021 13:25:46 +0100 Subject: [PATCH] stubby: Add multi WAN support for procd trigger Signed-off-by: James White (cherry picked from commit 1ad5e3f88ccfed8979c95b461a3ba566270a49f8) --- net/stubby/Makefile | 2 +- net/stubby/files/stubby.init | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/net/stubby/Makefile b/net/stubby/Makefile index ed0de7cb65..79d5ebc6c8 100644 --- a/net/stubby/Makefile +++ b/net/stubby/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=stubby PKG_VERSION:=0.4.0 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/getdnsapi/$(PKG_NAME) diff --git a/net/stubby/files/stubby.init b/net/stubby/files/stubby.init index d08997caf0..26cf170ede 100755 --- a/net/stubby/files/stubby.init +++ b/net/stubby/files/stubby.init @@ -266,9 +266,12 @@ service_triggers() trigger="$(uci_get stubby global trigger)" delay="$(uci_get stubby global triggerdelay "2")" - if [ "$trigger" != "none" ] && [ "$trigger" != "timed" ]; then - PROCD_RELOAD_DELAY=$((${delay:-2} * 1000)) - procd_add_interface_trigger "interface.*.up" "$trigger" "$stubby_init" start - fi + PROCD_RELOAD_DELAY=$((${delay:-2} * 1000)) + + for trigger_item in $trigger + do + procd_add_interface_trigger "interface.*.up" "$trigger_item" "$stubby_init" start + done + procd_add_reload_trigger "stubby" }