🐤 Sync 2026-09-08 23:54:39

This commit is contained in:
github-actions[bot] committed 2026-09-08 23:54:39 +08:00
1 parent 4df4ad7d50
commit 6d2e39ca12
18 files changed
+68 -49

No files matched your search

+15 -4
View File
@@ -1378,11 +1378,22 @@ function to_move(app_name,file)
end
function get_version()
local version = sys.exec("opkg list-installed luci-app-passwall 2>/dev/null | awk '{print $3}'")
if not version or #version == 0 then
version = sys.exec("apk list luci-app-passwall 2>/dev/null | awk '/installed/ {print $1}' | cut -d'-' -f4-")
local version
local version_file = CACHE_PATH .. "/passwall_version"
sys.call("mkdir -p " .. CACHE_PATH)
if fs.access(version_file) then
version = fs.readfile(version_file)
else
version = sys.exec("opkg list-installed luci-app-passwall 2>/dev/null | awk '{print $3}'")
if not version or version == "" then
version = sys.exec("apk list luci-app-passwall 2>/dev/null | awk '/installed/ {print $1}' | cut -d'-' -f4-")
end
version = (version or ""):match("^%s*(.-)%s*$")
if version ~= "" then
fs.writefile(version_file, version)
end
end
return (version or ""):gsub("\n", ""):match("^([^-]+)")
return version:match("^([^-]+)") or ""
end
function to_check_self()