From bd482566f479bdc62e85964a0ec9af4a34294860 Mon Sep 17 00:00:00 2001 From: Dirk Brenken Date: Fri, 9 Jun 2017 20:18:23 +0200 Subject: [PATCH] luci-app-adblock: sync with adblock 2.7.1 * "Save & Reply" now distinguish between normal and manual/backup mode and triggers an appropriate reload or a start action Signed-off-by: Dirk Brenken --- .../luasrc/model/cbi/adblock/overview_tab.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua b/applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua index fe269656f..38086c9eb 100644 --- a/applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua +++ b/applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua @@ -17,7 +17,13 @@ m = Map("adblock", translate("Adblock"), .. "see online documentation", "https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md")) function m.on_after_commit(self) - luci.sys.call("/etc/init.d/adblock reload >/dev/null 2>&1") + function e3.validate(self, value) + if value == "0" then + luci.sys.call("/etc/init.d/adblock reload >/dev/null 2>&1") + else + luci.sys.call("/etc/init.d/adblock start >/dev/null 2>&1") + end + end luci.http.redirect(luci.dispatcher.build_url("admin", "services", "adblock")) end -- 2.25.1