소스 검색

ffho-status-page: add list of mesh interfaces

Karsten Böddeker 7 년 전
부모
커밋
fce818cf34
1개의 변경된 파일14개의 추가작업 그리고 0개의 파일을 삭제
  1. 14 0
      ffho/ffho-status-page/luasrc/lib/gluon/status-page/www/cgi-bin/status

+ 14 - 0
ffho/ffho-status-page/luasrc/lib/gluon/status-page/www/cgi-bin/status

@@ -153,6 +153,20 @@ for _, ifname in ipairs(interfaces) do
   io.write("</pre>")
 end
 
+io.write("<h2>Mesh Interfaces</h2>")
+io.write("<pre>")
+local iface = false
+for _, line in ipairs(util.split(util.exec("batctl if"))) do
+  if not line:match("^primary0") then
+    io.write(line)
+	iface = true
+  end
+end
+if not iface then
+  io.write("none")
+end
+io.write("</pre>")
+
 io.write("<h2>VPN status</h2>")
 io.write("<pre>")