From e901ceda7102ac229b438b38f3721ade35d9b67c Mon Sep 17 00:00:00 2001 From: Jan-Philipp Litza Date: Mon, 13 Jan 2014 17:06:47 +0100 Subject: [PATCH] alfred: split up firmware info, include fastd version+status --- .../gluon-alfred/files/lib/gluon/alfred/announce.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/package/gluon-alfred/files/lib/gluon/alfred/announce.sh b/package/gluon-alfred/files/lib/gluon/alfred/announce.sh index cd9bd596..172c7c60 100755 --- a/package/gluon-alfred/files/lib/gluon/alfred/announce.sh +++ b/package/gluon-alfred/files/lib/gluon/alfred/announce.sh @@ -26,13 +26,22 @@ if [ "$(uci -q get 'system.@system[0].share_location')" = 1 ]; then json_close_object # location fi json_add_object "software" - json_add_string "firmware" "gluon $(cat /lib/gluon/release)" + json_add_object "firmware" + json_add_string "base" "gluon" + json_add_string "release" "$(cat /lib/gluon/release)" + json_close_object # firmware if [ -x /usr/sbin/autoupdater ]; then json_add_object "autoupdater" json_add_string "branch" "$(uci -q get autoupdater.settings.branch)" json_add_boolean "enabled" "$(uci -q get autoupdater.settings.enabled)" json_close_object # autoupdater fi + if [ -x /usr/bin/fastd ]; then + json_add_object "fastd" + json_add_string "version" "$(fastd -v | cut -d' ' -f2)" + json_add_boolean "enabled" "$(uci -q get fastd.mesh_vpn.enabled)" + json_close_object # fastd + fi json_close_object # software json_add_object "hardware" json_add_string "model" "$(get_model)"