luci-app-passwall: sync with upstream source
This commit is contained in:
parent
a1b1496fed
commit
a7a2bdf603
@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-passwall
|
||||
PKG_VERSION:=3.6
|
||||
PKG_RELEASE:=18
|
||||
PKG_RELEASE:=19
|
||||
PKG_DATE:=20200308
|
||||
|
||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
@ -75,7 +75,7 @@ local chnlist_update = api.uci_get_type("global_rules", "chnlist_update", "1") =
|
||||
<div class="cbi-value-field">
|
||||
<div class="cbi-value-description">
|
||||
<span>【 <%=chnlist_version%> 】</span>
|
||||
<input type="checkbox" name="chnlist_update" value="1" <%=chnroute_update%> />
|
||||
<input type="checkbox" name="chnlist_update" value="1" <%=chnlist_update%> />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -79,7 +79,6 @@ if version then
|
||||
if download_md5 == new_md5 then
|
||||
luci.sys.exec("mv -f /tmp/gfwlist_tmp " .. rule_path .. "/gfwlist.conf")
|
||||
ucic:set(name, ucic:get_first(name, 'global_rules'), "gfwlist_version", new_version)
|
||||
ucic:commit(name)
|
||||
reboot = 1
|
||||
log("更新gfwlist成功...")
|
||||
end
|
||||
@ -105,7 +104,6 @@ if version then
|
||||
if download_md5 == new_md5 then
|
||||
luci.sys.exec("mv -f /tmp/chnroute_tmp " .. rule_path .. "/chnroute")
|
||||
ucic:set(name, ucic:get_first(name, 'global_rules'), "chnroute_version", new_version)
|
||||
ucic:commit(name)
|
||||
reboot = 1
|
||||
log("更新chnroute成功...")
|
||||
end
|
||||
@ -131,7 +129,6 @@ if version then
|
||||
if download_md5 == new_md5 then
|
||||
luci.sys.exec("mv -f /tmp/chnlist_tmp " .. rule_path .. "/chnlist")
|
||||
ucic:set(name, ucic:get_first(name, 'global_rules'), "chnlist_version", new_version)
|
||||
ucic:commit(name)
|
||||
reboot = 1
|
||||
log("更新chnlist成功...")
|
||||
end
|
||||
@ -146,7 +143,8 @@ end
|
||||
ucic:set(name, ucic:get_first(name, 'global_rules'), "gfwlist_update", gfwlist_update)
|
||||
ucic:set(name, ucic:get_first(name, 'global_rules'), "chnroute_update", chnroute_update)
|
||||
ucic:set(name, ucic:get_first(name, 'global_rules'), "chnlist_update", chnlist_update)
|
||||
ucic:commit(name)
|
||||
ucic:save(name)
|
||||
luci.sys.call("uci commit " .. name)
|
||||
|
||||
if reboot == 1 then
|
||||
log("重启服务,应用新的规则。")
|
||||
|
||||
@ -340,7 +340,8 @@ local function truncate_nodes()
|
||||
return false
|
||||
end
|
||||
end)
|
||||
ucic:commit(application)
|
||||
ucic:save(application)
|
||||
luci.sys.call("uci commit " .. application)
|
||||
|
||||
if is_stop == 1 then
|
||||
luci.sys.call("/etc/init.d/" .. application .. " restart > /dev/null 2>&1 &") -- 不加&的话日志会出现的更早
|
||||
@ -417,7 +418,8 @@ local function update_node()
|
||||
ucic:tset(application, section, vv)
|
||||
end
|
||||
end
|
||||
ucic:commit(application)
|
||||
ucic:save(application)
|
||||
luci.sys.call("uci commit " .. application)
|
||||
|
||||
if next(CONFIG) then
|
||||
local nodes = {}
|
||||
@ -429,7 +431,8 @@ local function update_node()
|
||||
for _, config in pairs(CONFIG) do
|
||||
select_node(nodes, config)
|
||||
end
|
||||
ucic:commit(application)
|
||||
ucic:save(application)
|
||||
luci.sys.call("uci commit " .. application)
|
||||
luci.sys.call("/etc/init.d/" .. application .. " restart > /dev/null 2>&1 &") -- 不加&的话日志会出现的更早
|
||||
end
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user