diff --git a/package/gluon-status-page/files/lib/gluon/status-page/www/cgi-bin/status b/package/gluon-status-page/files/lib/gluon/status-page/www/cgi-bin/status index ea520e22..b7436d27 100755 --- a/package/gluon-status-page/files/lib/gluon/status-page/www/cgi-bin/status +++ b/package/gluon-status-page/files/lib/gluon/status-page/www/cgi-bin/status @@ -73,20 +73,22 @@ io.write("

Neighbours

") local interfaces = util.split(util.trim(util.exec("iw dev | egrep 'type IBSS|type mesh' -B 5 | grep Interface | cut -d' ' -f2"))) -for _, ifname in ipairs(interfaces) do - io.write("

" .. escape_html(ifname) .. "

") - io.write("
")
+if interfaces ~= {} then
+  for _, ifname in ipairs(interfaces) do
+    io.write("

" .. escape_html(ifname) .. "

") + io.write("
")
 
-  for _, line in ipairs(util.split(util.exec("iw dev " .. ifname .. " station dump"))) do
-    local mac = line:match("^Station (.*) %(on ")
-    if mac then
-      io.write("Station " .. mac .. " (on " .. escape_html(ifname) .. ")\n")
-    else
-      io.write(escape_html(line) .. "\n")
+    for _, line in ipairs(util.split(util.exec("iw dev " .. ifname .. " station dump"))) do
+      local mac = line:match("^Station (.*) %(on ")
+      if mac then
+        io.write("Station " .. mac .. " (on " .. escape_html(ifname) .. ")\n")
+      else
+        io.write(escape_html(line) .. "\n")
+      end
     end
-  end
 
-  io.write("
") + io.write("
") + end end local stat, fastd_status = pcall(