forked from freifunk-franken/firmware
alfred-monitoring-proxy: Switch to alfred2
By using the alfred2 mechanism of the Monitoring, we get rid of the embracing {"64":...} key-value construct. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Reviewed-by: Christian Dresel <fff@chrisi01.de> Reviewed-by: Fabian Bläse <fabian@blaese.de>
This commit is contained in:
parent
7e8ac80dee
commit
4d55ef39f3
|
@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-alfred-monitoring-proxy
|
PKG_NAME:=fff-alfred-monitoring-proxy
|
||||||
PKG_VERSION:=0.0.1
|
PKG_VERSION:=0.0.1
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/fff-alfred-monitoring-proxy
|
PKG_BUILD_DIR:=$(BUILD_DIR)/fff-alfred-monitoring-proxy
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/ash
|
#!/bin/ash
|
||||||
|
|
||||||
api_url="https://monitoring.freifunk-franken.de/api/alfred"
|
api_url="https://monitoring.freifunk-franken.de/api/alfred2"
|
||||||
fetch_id="64"
|
fetch_id="64"
|
||||||
|
|
||||||
(echo -n "{\"$fetch_id\": "; alfred-json -r "$fetch_id"; echo -n "}") | \
|
/bin/alfred-json -r "$fetch_id" | \
|
||||||
curl -k -v -H "Content-type: application/json; charset=UTF-8" -X POST --data "@-" $api_url
|
curl -k -v -H "Content-type: application/json; charset=UTF-8" -X POST --data "@-" $api_url
|
||||||
|
|
Loading…
Reference in New Issue