%
local uci = require "luci.model.uci".cursor()
function get_status(section)
local port = uci:get("ssr_python_pro_server",section,"port")
if port and port ~= "" then
local status = luci.sys.call("netstat -an | grep '" .. port .. "' >/dev/null")==0
if status then
return ' ✓ '
else
return ' X '
end
end
end
%>
<%+cbi/valueheader%>
<%=get_status(section)%>
<%+cbi/valuefooter%>