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:
Adrian Schmutzler 2019-01-27 17:38:22 +01:00
parent 7e8ac80dee
commit 4d55ef39f3
2 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=fff-alfred-monitoring-proxy
PKG_VERSION:=0.0.1
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_BUILD_DIR:=$(BUILD_DIR)/fff-alfred-monitoring-proxy

View File

@ -1,7 +1,7 @@
#!/bin/ash
api_url="https://monitoring.freifunk-franken.de/api/alfred"
api_url="https://monitoring.freifunk-franken.de/api/alfred2"
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