From fce818cf34d8aac94c80e901c5def5915b91f786 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Karsten=20B=C3=B6ddeker?= <freifunk@kb-light.de>
Date: Wed, 28 Dec 2016 17:56:26 +0100
Subject: [PATCH] ffho-status-page: add list of mesh interfaces

---
 .../lib/gluon/status-page/www/cgi-bin/status       | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/ffho/ffho-status-page/luasrc/lib/gluon/status-page/www/cgi-bin/status b/ffho/ffho-status-page/luasrc/lib/gluon/status-page/www/cgi-bin/status
index 5b56da5..8e6e1d4 100755
--- a/ffho/ffho-status-page/luasrc/lib/gluon/status-page/www/cgi-bin/status
+++ b/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>")
 
-- 
GitLab