From 7974ca67ae73cb1746957aac2317fe954d5aa5c8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 19 Jul 2026 08:33:25 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=A4=20Sync=202026-07-19=2008:33:25?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- luci-app-passwall/Makefile | 2 +- .../luasrc/model/cbi/passwall/server/index.lua | 5 +++++ luci-app-passwall/root/etc/config/passwall_server | 2 +- luci-app-passwall/root/etc/init.d/passwall_server | 8 +++++++- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/luci-app-passwall/Makefile b/luci-app-passwall/Makefile index 0a2308b2..b13ef160 100644 --- a/luci-app-passwall/Makefile +++ b/luci-app-passwall/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-passwall PKG_VERSION:=26.7.16 -PKG_RELEASE:=185 +PKG_RELEASE:=186 PKG_PO_VERSION:=$(PKG_VERSION) PKG_CONFIG_DEPENDS:= \ diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/server/index.lua b/luci-app-passwall/luasrc/model/cbi/passwall/server/index.lua index f3a147a5..d9a8b50d 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/server/index.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/server/index.lua @@ -13,6 +13,11 @@ t.addremove = false e = t:option(Flag, "enable", translate("Enable")) e.rmempty = false +e = t:option(Value, "start_delay", translate("Delay Start"), translate("Units:seconds")) +e.default = "90" +e.datatype = "range(0,600)" +e.rmempty = false + local cfgname = "user" t = m:section(TypedSection, cfgname, translate("Users Manager")) t.anonymous = true diff --git a/luci-app-passwall/root/etc/config/passwall_server b/luci-app-passwall/root/etc/config/passwall_server index c9526cb2..f0887226 100644 --- a/luci-app-passwall/root/etc/config/passwall_server +++ b/luci-app-passwall/root/etc/config/passwall_server @@ -1,4 +1,4 @@ config global 'global' option enable '0' - + option start_delay '90' diff --git a/luci-app-passwall/root/etc/init.d/passwall_server b/luci-app-passwall/root/etc/init.d/passwall_server index dd4ed688..f604aadb 100755 --- a/luci-app-passwall/root/etc/init.d/passwall_server +++ b/luci-app-passwall/root/etc/init.d/passwall_server @@ -3,7 +3,13 @@ START=99 boot_func() { - sleep 90 + config_load passwall_server + config_get start_delay global start_delay 90 + case "$start_delay" in + ''|*[!0-9]*) start_delay=90 ;; + *) [ "$start_delay" -le 600 ] 2>/dev/null || start_delay=90 ;; + esac + [ "$start_delay" -gt 0 ] && sleep "$start_delay" restart }