Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Push OLSR data to django-netjsongraph
#!/bin/sh
BASE_URL="http://ninux-graph.netjson.org"
# put your network topology id here
UUID="<uuid>"
# put your network topology key here
KEY="<key>"
# host where OLSR is running
OLSR_HOST="127.0.0.1"
# port on which OLSR is listening, change it according to your configuration
OLSR_PORT="2006"
COLLECTOR_URL="$BASE_URL/api/receive/$UUID/?key=$KEY"
DATA=$(echo "GET /\n\n" | nc $OLSR_HOST $OLSR_PORT)
curl -s -X POST -d "$DATA" --header "Content-Type: text/plain" "$COLLECTOR_URL"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment