1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00
openmptcprouter-feeds/luci-app-ouad/root/usr/sbin/status_page1.sh
Ycarus (Yannick Chabanois) 6fa256c456 First version for oled
2023-10-07 08:34:48 +02:00

10 lines
412 B
Bash
Executable file

#!/bin/sh
ubus call openmptcprouter status | jsonfilter -e '@.wans[@.multipath!="off"]' | while read data; do
label=$(echo $data | jsonfilter -e '@.label')
latency=$(echo $data | jsonfilter -e '@.latency')
[ -n "$latency" ] && latency="${latency}ms"
whois=$(echo $data | jsonfilter -e '@.whois')
multipath=$(echo $data | jsonfilter -e '@.multipath')
echo "${label}: ${multipath} ${whois} ${latency}"
done