autocore: index.html fs.read method

This commit is contained in:
coolsnowwolf 2020-02-16 23:04:59 +08:00
parent 61aa48c7cc
commit 95fc2438ac
2 changed files with 2 additions and 8 deletions

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=autocore
PKG_VERSION:=1
PKG_RELEASE:=28
PKG_RELEASE:=29
include $(INCLUDE_DIR)/package.mk

View File

@ -52,13 +52,7 @@
local user_info = tonumber(luci.sys.exec("cat /proc/net/arp | grep '0x2' | wc -l")) or 0
local cpu_usage
if fs.readfile("/tmp/cpuusage") then
cpu_usage = luci.sys.exec("cat /tmp/cpuusage")
else
cpu_usage = "6.6%"
end
local cpu_usage = fs.readfile("/tmp/cpuusage") or "6.6%"
luci.sys.exec("/sbin/getcpu &")