luci: update luci
This commit is contained in:
@@ -1,27 +0,0 @@
|
|||||||
--
|
|
||||||
-- Copyright (C) 2018-2020 Ruilin Peng (Nick) <pymumu@gmail.com>.
|
|
||||||
--
|
|
||||||
-- smartdns is free software: you can redistribute it and/or modify
|
|
||||||
-- it under the terms of the GNU General Public License as published by
|
|
||||||
-- the Free Software Foundation, either version 3 of the License, or
|
|
||||||
-- (at your option) any later version.
|
|
||||||
--
|
|
||||||
-- smartdns is distributed in the hope that it will be useful,
|
|
||||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
-- GNU General Public License for more details.
|
|
||||||
--
|
|
||||||
-- You should have received a copy of the GNU General Public License
|
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
module("luci.controller.smartdns", package.seeall)
|
|
||||||
|
|
||||||
function index()
|
|
||||||
if not nixio.fs.access("/etc/config/smartdns") then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local page
|
|
||||||
page = entry({"admin", "services", "smartdns"}, view("smartdns/smartdns"), _("SmartDNS"), 60)
|
|
||||||
page.dependent = true
|
|
||||||
end
|
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"admin/services/smartdns": {
|
||||||
|
"title": "SmartDNS",
|
||||||
|
"action": {
|
||||||
|
"type": "view",
|
||||||
|
"path": "smartdns/smartdns"
|
||||||
|
},
|
||||||
|
"depends": {
|
||||||
|
"uci": { "smartdns": true }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,18 +4,20 @@
|
|||||||
"read": {
|
"read": {
|
||||||
"file": {
|
"file": {
|
||||||
"/etc/smartdns/*": [ "read" ],
|
"/etc/smartdns/*": [ "read" ],
|
||||||
"/usr/sbin/iptables": [ "exec" ],
|
"/usr/sbin/iptables -t nat -nL PREROUTING": [ "exec" ],
|
||||||
"/usr/sbin/ip6tables": [ "exec" ],
|
"/usr/sbin/ip6tables -t nat -nL PREROUTING": [ "exec" ],
|
||||||
"/usr/sbin/smartdns": [ "exec" ]
|
"/usr/sbin/smartdns": [ "exec" ]
|
||||||
},
|
},
|
||||||
"ubus": {
|
"ubus": {
|
||||||
"service": [ "list" ]
|
"service": [ "list" ]
|
||||||
}
|
},
|
||||||
|
"uci": [ "smartdns" ]
|
||||||
},
|
},
|
||||||
"write": {
|
"write": {
|
||||||
"file": {
|
"file": {
|
||||||
"/etc/smartdns/*": [ "write" ]
|
"/etc/smartdns/*": [ "write" ]
|
||||||
}
|
},
|
||||||
|
"uci": [ "smartdns" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -253,7 +253,7 @@ return L.view.extend({
|
|||||||
|
|
||||||
// dns server group;
|
// dns server group;
|
||||||
o = s.taboption("seconddns", form.Value, "seconddns_server_group", _("Server Group"),
|
o = s.taboption("seconddns", form.Value, "seconddns_server_group", _("Server Group"),
|
||||||
_("Query DNS through specific dns server group, such as office, home."));
|
_("Query DNS through specific dns server group, such as office, home."));
|
||||||
o.rmempty = true;
|
o.rmempty = true;
|
||||||
o.placeholder = "default";
|
o.placeholder = "default";
|
||||||
o.datatype = "hostname";
|
o.datatype = "hostname";
|
||||||
@@ -305,8 +305,7 @@ return L.view.extend({
|
|||||||
|
|
||||||
// custom settings;
|
// custom settings;
|
||||||
o = s.taboption("custom", form.TextValue, "custom_conf",
|
o = s.taboption("custom", form.TextValue, "custom_conf",
|
||||||
_(""),
|
"", _("smartdns custom settings"));
|
||||||
_("smartdns custom settings"));
|
|
||||||
|
|
||||||
o.rows = 20;
|
o.rows = 20;
|
||||||
o.cfgvalue = function (section_id) {
|
o.cfgvalue = function (section_id) {
|
||||||
@@ -491,4 +490,3 @@ return L.view.extend({
|
|||||||
return m.render();
|
return m.render();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -53,17 +53,15 @@ build()
|
|||||||
cd $ROOT/
|
cd $ROOT/
|
||||||
build_tool
|
build_tool
|
||||||
|
|
||||||
mkdir $ROOT/root/usr/lib/lua/ -p
|
mkdir $ROOT/root/usr/lib/lua/luci -p
|
||||||
mkdir $ROOT/root/usr/lib/lua/luci/controller/ -p
|
|
||||||
mkdir $ROOT/root/usr/share/rpcd/acl.d/ -p
|
mkdir $ROOT/root/usr/share/rpcd/acl.d/ -p
|
||||||
cp $ROOT/files/luci/controller/* $ROOT/root/usr/lib/lua/luci/controller/ -avf
|
|
||||||
cp $ROOT/files/luci/i18n $ROOT/root/usr/lib/lua/luci/ -avf
|
cp $ROOT/files/luci/i18n $ROOT/root/usr/lib/lua/luci/ -avf
|
||||||
|
|
||||||
#Generate Language
|
#Generate Language
|
||||||
$PO2LMO $ROOT/files/luci/i18n/smartdns.zh-cn.po $ROOT/root/usr/lib/lua/luci/i18n/smartdns.zh-cn.lmo
|
$PO2LMO $ROOT/files/luci/i18n/smartdns.zh-cn.po $ROOT/root/usr/lib/lua/luci/i18n/smartdns.zh-cn.lmo
|
||||||
rm $ROOT/root/usr/lib/lua/luci/i18n/smartdns.zh-cn.po
|
rm $ROOT/root/usr/lib/lua/luci/i18n/smartdns.zh-cn.po
|
||||||
|
|
||||||
cp $ROOT/files/usr $ROOT/root/ -avf
|
cp $ROOT/files/root/* $ROOT/root/ -avf
|
||||||
INST_SIZE="`du -sb $ROOT/root/ | awk '{print $1}'`"
|
INST_SIZE="`du -sb $ROOT/root/ | awk '{print $1}'`"
|
||||||
|
|
||||||
sed -i "s/^Architecture.*/Architecture: all/g" $ROOT/control/control
|
sed -i "s/^Architecture.*/Architecture: all/g" $ROOT/control/control
|
||||||
|
|||||||
Reference in New Issue
Block a user