alfred: improved readability
This commit is contained in:
parent
e901ceda71
commit
59616e8d77
@ -19,23 +19,27 @@ set -e
|
||||
|
||||
json_init
|
||||
json_add_string "name" "$(uci get 'system.@system[0].hostname')"
|
||||
|
||||
if [ "$(uci -q get 'system.@system[0].share_location')" = 1 ]; then
|
||||
json_add_object "location"
|
||||
json_add_double "latitude" "$(uci get 'system.@system[0].latitude')"
|
||||
json_add_double "longitude" "$(uci get 'system.@system[0].longitude')"
|
||||
json_close_object # location
|
||||
json_add_object "location"
|
||||
json_add_double "latitude" "$(uci get 'system.@system[0].latitude')"
|
||||
json_add_double "longitude" "$(uci get 'system.@system[0].longitude')"
|
||||
json_close_object # location
|
||||
fi
|
||||
|
||||
json_add_object "software"
|
||||
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)"
|
||||
@ -43,9 +47,11 @@ json_add_object "software"
|
||||
json_close_object # fastd
|
||||
fi
|
||||
json_close_object # software
|
||||
|
||||
json_add_object "hardware"
|
||||
json_add_string "model" "$(get_model)"
|
||||
json_close_object # hardware
|
||||
|
||||
json_add_object "network"
|
||||
json_add_string "mac" "$(sysconfig primary_mac)"
|
||||
json_add_array "addresses"
|
||||
|
Loading…
Reference in New Issue
Block a user