luci-app-passwall2: sync upstream

last commit: e50b2dc101
This commit is contained in:
actions 2024-07-18 12:30:08 +08:00
parent 3e216255a6
commit a34487be30
5 changed files with 9 additions and 5 deletions

View File

@ -5,7 +5,7 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-passwall2 PKG_NAME:=luci-app-passwall2
PKG_VERSION:=1.30-1 PKG_VERSION:=1.30-2
PKG_RELEASE:= PKG_RELEASE:=
PKG_CONFIG_DEPENDS:= \ PKG_CONFIG_DEPENDS:= \

View File

@ -22,7 +22,7 @@ function index()
entry({"admin", "services", appname, "hide"}, call("hide_menu")).leaf = true entry({"admin", "services", appname, "hide"}, call("hide_menu")).leaf = true
local e local e
if uci:get(appname, "@global[0]", "hide_from_luci") ~= "1" then if uci:get(appname, "@global[0]", "hide_from_luci") ~= "1" then
e = entry({"admin", "services", appname}, alias("admin", "services", appname, "settings"), _("Pass Wall"), -1) e = entry({"admin", "services", appname}, alias("admin", "services", appname, "settings"), _("PassWall 2"), -1)
else else
e = entry({"admin", "services", appname}, alias("admin", "services", appname, "settings"), nil, -1) e = entry({"admin", "services", appname}, alias("admin", "services", appname, "settings"), nil, -1)
end end

View File

@ -48,6 +48,7 @@ o:depends("balancing_enable", true)
o = s:option(Flag, "bind_local", translate("Haproxy Port") .. " " .. translate("Bind Local"), translate("When selected, it can only be accessed localhost.")) o = s:option(Flag, "bind_local", translate("Haproxy Port") .. " " .. translate("Bind Local"), translate("When selected, it can only be accessed localhost."))
o.default = "0" o.default = "0"
o:depends("balancing_enable", true)
---- Health Check Type ---- Health Check Type
o = s:option(ListValue, "health_check_type", translate("Health Check Type")) o = s:option(ListValue, "health_check_type", translate("Health Check Type"))

View File

@ -1163,8 +1163,7 @@ function gen_config(var)
elseif w:find("full:") == 1 then elseif w:find("full:") == 1 then
table.insert(domain_table.domain, w:sub(1 + #"full:")) table.insert(domain_table.domain, w:sub(1 + #"full:"))
elseif w:find("domain:") == 1 then elseif w:find("domain:") == 1 then
table.insert(domain_table.domain, w:sub(1 + #"domain:")) table.insert(domain_table.domain_suffix, w:sub(1 + #"domain:"))
table.insert(domain_table.domain_suffix, "." .. w:sub(1 + #"domain:"))
else else
table.insert(domain_table.domain_keyword, w) table.insert(domain_table.domain_keyword, w)
end end

View File

@ -32,7 +32,7 @@ unlock() {
done done
} }
boot() { boot_func() {
local delay=$(uci -q get ${CONFIG}.@global_delay[0].start_delay || echo 1) local delay=$(uci -q get ${CONFIG}.@global_delay[0].start_delay || echo 1)
if [ "$delay" -gt 0 ]; then if [ "$delay" -gt 0 ]; then
$APP_FILE echolog "执行启动延时 $delay 秒后再启动!" $APP_FILE echolog "执行启动延时 $delay 秒后再启动!"
@ -42,6 +42,10 @@ boot() {
touch ${LOCK_FILE_DIR}/${CONFIG}_ready.lock touch ${LOCK_FILE_DIR}/${CONFIG}_ready.lock
} }
boot() {
boot_func >/dev/null 2>&1 &
}
start() { start() {
set_lock set_lock
[ $? == 1 ] && $APP_FILE echolog "脚本已经在运行,不重复运行,退出." && exit 0 [ $? == 1 ] && $APP_FILE echolog "脚本已经在运行,不重复运行,退出." && exit 0