Skip to content

Commit

Permalink
update 05-02 07:46:17
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed May 1, 2022
1 parent 1aee447 commit 48b9457
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 19 deletions.
2 changes: 1 addition & 1 deletion luci-app-dnsfilter/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=luci-app-dnsfilter
PKG_VERSION:=1.0
PKG_RELEASE:=12
PKG_RELEASE:=13

PKG_LICENSE:=GPLv2
PKG_MAINTAINER:=small_5 kiddin9
Expand Down
2 changes: 1 addition & 1 deletion luci-app-dnsfilter/luasrc/controller/dnsfilter.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module("luci.controller.dnsfilter",package.seeall)
module("luci.controller.dnsfilter", package.seeall)

function index()
if not nixio.fs.access("/etc/config/dnsfilter") then
Expand Down
8 changes: 4 additions & 4 deletions luci-app-dnsfilter/luasrc/model/cbi/dnsfilter/base.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,24 +52,24 @@ o.description = translate("Should be enabled when rules addresses are slow to do
o.rmempty = false
o.default = 0

if tmp_rule==1 then
if tmp_rule == 1 then
o = s:option(Button, "delete", translate("Delete All Subscribe Rules"))
o.inputstyle = "reset"
o.description = translate("Delete rules files and delete the subscription link<br/>There is no need to click for modify the subscription link,The script will automatically replace the old rule file")
o.write = function()
SYS.exec("[ -d /etc/dnsfilter/rules ] && rm -rf /etc/dnsfilter/rules")
SYS.exec("grep -wq 'list url' /etc/config/dnsfilter && sed -i '/list url/d' /etc/config/dnsfilter && /etc/init.d/dnsfilter restart 2>&1 &")
luci.http.redirect(luci.dispatcher.build_url("admin","services","dnsfilter","base"))
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "dnsfilter", "base"))
end
end

if luci.sys.call("[ -h /tmp/dnsfilter/url ] || exit 9")==9 then
if luci.sys.call("[ -h /tmp/dnsfilter/url ] || exit 9") == 9 then
if nixio.fs.access("/etc/dnsfilter/rules") then
o = s:option(Button, "delete_1", translate("Delete Subscribe Rules On The Flash"))
o.inputstyle = "reset"
o.write = function()
SYS.exec("rm -rf /etc/dnsfilter/rules")
luci.http.redirect(luci.dispatcher.build_url("admin","services","dnsfilter","base"))
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "dnsfilter", "base"))
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion luci-app-dnsfilter/luasrc/model/cbi/dnsfilter/black.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local conffile = "/etc/dnsfilter/black.list"
f = SimpleForm("custom")
t = f:field(TextValue, "conf")
t.rmempty = true
t.rows=13
t.rows = 13
t.description = translate("Will Always block these Domain")

function t.cfgvalue()
Expand Down
2 changes: 1 addition & 1 deletion luci-app-dnsfilter/luasrc/model/cbi/dnsfilter/ip.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local conffile = "/etc/dnsfilter/ip.list"
f = SimpleForm("custom")
t = f:field(TextValue, "conf")
t.rmempty = true
t.rows=13
t.rows = 13
t.description = translate("Will Always block these IP")

function t.cfgvalue()
Expand Down
11 changes: 0 additions & 11 deletions luci-app-dnsfilter/root/usr/rpcd/acl.d/luci-app-dnsfilter.json

This file was deleted.

0 comments on commit 48b9457

Please sign in to comment.