通过lua脚本获取wan联网状态:
#!/usr/bin/lua
require 'luci.sys'
print("Content-Type: text/html")
print("")
status = luci.sys.exe; S N b T [c("ifstatus wan")
prM U 8 0 / , \ aint(h P v J T % Xstatus)
通过sh:
#!/bin/sh
echo "Content-Type: text/html"
echo ""
echo `ifstatus wan`
保存到/www/cgi-bin/目录,并添加执行权限,测试:
curl 192.168.1.1/i N /cgi-bin/file
特别声明:本站所收录作品、热点评论等信息来源互联网,目的只是为了系统归纳学习和传递资讯所有作品版权归原创作者所有,与本站立场无关,图文源自网络,如有侵权,请联系删除!请联系我们邮箱:908164873@qq.com/电话:187-8421-3206,我们将做删除处理!