mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-10 03:09:08 +08:00
luci-app-adguardhome: fix version detection
Reported-by: AmadeusGhost <amadeus@project-openwrt.eu.org> Signed-off-by: Tianling Shen <cnsztl@project-openwrt.eu.org>
This commit is contained in:
parent
807b8507b2
commit
4eb4fd5582
@ -37,7 +37,7 @@ else
|
||||
local version=uci:get("AdGuardHome","AdGuardHome","version")
|
||||
local testtime=fs.stat(binpath,"mtime")
|
||||
if testtime~=tonumber(binmtime) or version==nil then
|
||||
local tmp=luci.sys.exec(binpath.." --version | grep -m 1 -E ' [0-9.]+' -o ")
|
||||
local tmp=luci.sys.exec(binpath.." --version | grep -m 1 -E 'v[0-9.]+' -o ")
|
||||
version=string.sub(tmp, 1)
|
||||
if version=="" then version="core error" end
|
||||
uci:set("AdGuardHome","AdGuardHome","version",version)
|
||||
|
Loading…
x
Reference in New Issue
Block a user