diff --git a/luasrc/model/cbi/mosdns/whitelist.lua b/luasrc/model/cbi/mosdns/whitelist.lua index 993cfba..462ff93 100644 --- a/luasrc/model/cbi/mosdns/whitelist.lua +++ b/luasrc/model/cbi/mosdns/whitelist.lua @@ -2,12 +2,17 @@ m = Map("mosdns") m.title = translate("MosDNS") m.description = translate("MosDNS is a 'programmable' DNS forwarder.") -s = m:section(TypedSection, "mosdns") +s = m:section(TypedSection, "mosdns", translate("ADblock Whitelist")) s.addremove = false s.anonymous = true +reload_service = s:option( Button, "_reload", translate("Reload Service"), translate("Reload service to apply ADblock whitelist")) +reload_service.write = function() + luci.sys.exec("/etc/init.d/mosdns reload") +end + config = s:option(TextValue, "whitelist") -config.description = translate("ADblock whitelist.") +config.description = translate("ADblock whitelist only apply to 'Def Config' profiles.") config.template = "cbi/tvalue" config.rows = 25 diff --git a/po/zh-cn/mosdns.po b/po/zh-cn/mosdns.po index 2305bb8..91c3956 100644 --- a/po/zh-cn/mosdns.po +++ b/po/zh-cn/mosdns.po @@ -34,12 +34,21 @@ msgstr "启用 DNS 广告过滤" msgid "View the Custom YAML Configuration file used by this MosDNS. You can edit it as you own need." msgstr "注意!此页的更改仅当 'MosDNS 配置文件选择' 为 '自定义配置' 时才会生效" -msgid "ADblock whitelist." -msgstr "广告过滤白名单" +msgid "ADblock whitelist only apply to 'Def Config' profiles" +msgstr "注意!广告过滤白名单仅当 'MosDNS 配置文件选择' 为 '内置预设' 时才会生效" msgid "ADblock whitelist" msgstr "白名单" +msgid "ADblock Whitelist" +msgstr "广告过滤白名单" + +msgid "Reload Service" +msgstr "重载 MosDNS" + +msgid "Reload service to apply ADblock whitelist" +msgstr "重载 MosDNS 服务生效白名单" + msgid "Geodata Update" msgstr "数据库更新" diff --git a/root/etc/init.d/mosdns b/root/etc/init.d/mosdns index 8767469..510207a 100755 --- a/root/etc/init.d/mosdns +++ b/root/etc/init.d/mosdns @@ -47,7 +47,7 @@ reload_others() { reload_service() { stop - sleep 2s + sleep 1 echo "MosDNS is restarted!" start }