replace batctl-calls with gluon.mesh

This commit is contained in:
Christof Schulze 2016-04-28 17:59:07 +02:00
parent e2f2b9b062
commit 0fe5bebe20
2 changed files with 4 additions and 2 deletions

View File

@ -8,6 +8,7 @@ badrequest() {
echo 'Access-Control-Allow-Origin: *'
batctl if | cut -d: -f1 | grep -qxF "$QUERY_STRING" || badrequest
#batctl if | cut -d: -f1 | grep -qxF "$QUERY_STRING" || badrequest
lua -e 'mesh = require(gluon.mesh); for interface, _ in ipairs(mesh.interfaces()) do print(interface .. "\n"); end;' | grep -qxF "$QUERY_STRING" || badrequest
exec /usr/bin/gluon-neighbour-info -s neighbour -i "$QUERY_STRING" -d ff02::2:1001 -p 1001 -r nodeinfo

View File

@ -8,7 +8,8 @@ badrequest() {
echo 'Access-Control-Allow-Origin: *'
batctl if | cut -d: -f1 | grep -qxF "$QUERY_STRING" || badrequest
#batctl if | cut -d: -f1 | grep -qxF "$QUERY_STRING" || badrequest
lua -e 'mesh = require(gluon.mesh); for interface, _ in ipairs(mesh.interfaces()) do print(interface .. "\n"); end;' | grep -qxF "$QUERY_STRING" || badrequest
CMD="exec /lib/gluon/status-page/providers/stations '$QUERY_STRING'"