show CPU Temperature for NanoPi R2S (#5612)

Co-authored-by: Yangbo Wei <467815891@qq.com>
This commit is contained in:
Yangbo 2020-10-07 23:25:41 +08:00 committed by GitHub
parent 0bfbe98823
commit 099439f051
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,2 @@
sed -i "/<%:Load Average%>/i\\\t\t<tr><td width="33%"><%:CPU Temperature%></td><td><%=luci.sys.exec(\"cut -c1-3 /sys/class/thermal/thermal_zone0/temp | awk '{print \$1/10.0}'\")%>℃</td></tr>" /usr/lib/lua/luci/view/admin_status/index.htm
rm /lib/preinit/82_show_temp