Last active
March 15, 2016 09:27
-
-
Save nemesifier/b6cf61d99676f24f20f8 to your computer and use it in GitHub Desktop.
Push OLSR data to django-netjsongraph
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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