From c839bd8892d8bbf7b7e68a9e05c2ca9d1b72ac9e Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Tue, 4 Feb 2014 13:15:18 +0100 Subject: [PATCH] statusscript --- .../lib/gluon/status-page/www/cgi-bin/status | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100755 package/gluon-status-page/files/lib/gluon/status-page/www/cgi-bin/status 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 new file mode 100755 index 00000000..dd30ae57 --- /dev/null +++ b/package/gluon-status-page/files/lib/gluon/status-page/www/cgi-bin/status @@ -0,0 +1,60 @@ +#!/bin/sh + +linknodes() { + PREFIX=$(uci get network.local_node_route6.target | cut -d: -f 1-4) + sed 's#\([0-9a-f]\{2\}\):\([0-9a-f]\{2\}\):\([0-9a-f]\{2\}\):\([0-9a-f]\{2\}\):\([0-9a-f]\{2\}\):\([0-9a-f]\{2\}\)#&#g' +} + +echo Content-type: text/html +echo "" + +cat < + + + $(cat /proc/sys/kernel/hostname) + + +EOF + +echo "

$(cat /proc/sys/kernel/hostname)

" + +echo "
"
+
+echo "Firmware release: $(cat /lib/gluon/release)"
+echo
+
+uptime | sed 's/^ \+//'
+echo
+
+ip address show dev br-client
+echo
+
+free -m
+echo
+
+df /rom /overlay
+
+echo "
" + +echo "

Neighbours

" + + +iw dev | grep IBSS -B 4 | grep Interface | cut -d' ' -f2 | while read if +do + echo "

$if

" + echo "
"
+  
+  iw dev $if link
+
+  echo 
+  
+  iw dev $if station dump | linknodes
+
+  echo "
" +done + +cat < + +EOF