From a3d686c44d0c5675596fd5ba26b3912178fdce12 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 28 May 2024 00:26:09 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=B4=20Sync=202024-05-28=2000:26?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- luci-app-passwall/root/usr/share/passwall/rule_update.lua | 5 +---- luci-app-passwall/root/usr/share/passwall/subscribe.lua | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/luci-app-passwall/root/usr/share/passwall/rule_update.lua b/luci-app-passwall/root/usr/share/passwall/rule_update.lua index 4db7e26a..469e4ea0 100755 --- a/luci-app-passwall/root/usr/share/passwall/rule_update.lua +++ b/luci-app-passwall/root/usr/share/passwall/rule_update.lua @@ -466,11 +466,8 @@ luci.sys.call("uci commit " .. name) if reboot == 1 then if arg3 == "cron" then - local f = io.open("/var/lock/" .. name .. ".lock", "r") - if f == nil then + if not nixio.fs.access("/var/lock/" .. name .. ".lock") then luci.sys.call("touch /tmp/lock/" .. name .. "_cron.lock") - else - f:close() end end diff --git a/luci-app-passwall/root/usr/share/passwall/subscribe.lua b/luci-app-passwall/root/usr/share/passwall/subscribe.lua index 8fe66017..edf23b44 100755 --- a/luci-app-passwall/root/usr/share/passwall/subscribe.lua +++ b/luci-app-passwall/root/usr/share/passwall/subscribe.lua @@ -1166,11 +1166,8 @@ local function update_node(manual) end if arg[3] == "cron" then - local f = io.open("/var/lock/" .. appname .. ".lock", "r") - if f == nil then + if not nixio.fs.access("/var/lock/" .. appname .. ".lock") then luci.sys.call("touch /tmp/lock/" .. appname .. "_cron.lock") - else - f:close() end end