travelmate: update 1.0.2

* add new 'running' status
* rework debug & status output
* LuCI: refine status view
* LuCI: add two missing eap auth variants

Signed-off-by: Dirk Brenken <dev@brenken.org>
This commit is contained in:
Dirk Brenken
2018-01-10 19:42:48 +01:00
parent 84c7ebaeec
commit a196f2bb0e
3 changed files with 95 additions and 80 deletions
+18 -2
View File
@@ -31,14 +31,30 @@ stop_service()
{
local rtfile="$(uci -q get travelmate.global.trm_rtfile)"
rtfile="${rtfile:="/tmp/trm_runtime.json"}"
rtfile="${rtfile:-"/tmp/trm_runtime.json"}"
> "${rtfile}"
rc_procd start_service
}
status()
{
rc_procd "${trm_script}" status
local key keylist value rtfile="$(uci_get travelmate.global.trm_rtfile)"
rtfile="${rtfile:-"/tmp/trm_runtime.json"}"
if [ -s "${rtfile}" ]
then
printf "%s\n" "::: travelmate runtime information"
json_load "$(cat "${rtfile}" 2>/dev/null)"
json_select data
json_get_keys keylist
for key in ${keylist}
do
json_get_var value "${key}"
printf " + %-18s : %s\n" "${key}" "${value}"
done
else
printf "%s\n" "::: no travelmate runtime information available"
fi
}
service_triggers()