mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Sync to latest
This commit is contained in:
parent
2e0365edad
commit
dd13942d68
33 changed files with 3539 additions and 3029 deletions
|
|
@ -1,20 +0,0 @@
|
|||
#!/bin/ash
|
||||
IF=$1
|
||||
if [ -z "$IF" ]; then
|
||||
IF=`ls -1 /sys/class/net/ | head -1`
|
||||
fi
|
||||
RXPREV=-1
|
||||
TXPREV=-1
|
||||
echo "Listening $IF..."
|
||||
while [ 1 == 1 ] ; do
|
||||
RX=`cat /sys/class/net/${IF}/statistics/rx_bytes`
|
||||
TX=`cat /sys/class/net/${IF}/statistics/tx_bytes`
|
||||
if [ $RXPREV -ne -1 ] ; then
|
||||
let BWRX=$RX-$RXPREV
|
||||
let BWTX=$TX-$TXPREV
|
||||
echo "$BWRX $BWTX">/tmp/netspeed
|
||||
fi
|
||||
RXPREV=$RX
|
||||
TXPREV=$TX
|
||||
sleep 1
|
||||
done
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
alldata=$(ubus call openmptcprouter status)
|
||||
labels=$(echo $alldata | jsonfilter -e '@.wans[@.multipath!="off"].label')
|
||||
for wan in $labels; do
|
||||
wandata=$(echo $alldata | jsonfilter -e "@.wans[@.label=\"${wan}\"]")
|
||||
status=$(echo $wandata | jsonfilter -e '@.status')
|
||||
signal=$(echo $wandata | jsonfilter -e '@.signal')
|
||||
echo -n "$wan $status "
|
||||
if [ "$signal" != "" ]; then
|
||||
if [ "$signal" -eq "0" ]; then
|
||||
echo -n "0/4"
|
||||
elif [ "$signal" -lt "25" ]; then
|
||||
echo -n "1/4"
|
||||
elif [ "$signal" -lt "50" ]; then
|
||||
echo -n "2/4"
|
||||
elif [ "$signal" -lt "75" ]; then
|
||||
echo -n "3/4"
|
||||
else
|
||||
echo -n "4/4"
|
||||
fi
|
||||
else
|
||||
echo -n "$(echo $wandata | jsonfilter -e '@.state')"
|
||||
fi
|
||||
echo
|
||||
done
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
#!/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
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "router: $(uci -q get openmptcprouter.settings.version)"
|
||||
echo "server: $(uci -q get openmptcprouter.vps.omr_version)"
|
||||
echo "uptime: $(uptime | awk -F, '{sub(".*up ",x,$1);print $1,$2}' | sed 's/ */ /g')"
|
||||
echo "temp: $(awk '{printf("%.1f°C",$1/1e3)}' /sys/class/thermal/thermal_zone0/temp)"
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
routerid=$(uci -q get rtty.@rtty[0].id | cut -c-9)
|
||||
vpsip=$(curl https://55860.com/modules/addons/flowpacket/api.php?routeid=${routerid} | jsonfilter -e '@.data.dedicatedip')
|
||||
[ -n "$vpsip" ] && {
|
||||
vpsdata=$(curl https://55860.com/modules/addons/flowpacket/getWay.php?routeid=${vpsip})
|
||||
user=$(echo ${vpsdata} | jsonfilter -r '@.email')
|
||||
data=$(echo ${vpsdata} | jsonfilter -r '@.data')
|
||||
nextduedate=$(echo ${vpsdata} | jsonfilter -r '@.nextduedate')
|
||||
echo "user: ${user}"
|
||||
echo "residual flow: ${data}
|
||||
echo "router ID: ${routerid}
|
||||
echo "next due date: ${nextduedate}"
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
public_ip=$(uci -q get openmptcprouter.omr.detected_public_ipv4 | tr -d "\n")
|
||||
if [ -n "$public_ip" ]; then
|
||||
echo "IP: ${public_ip}"
|
||||
else
|
||||
echo "Waiting for server..."
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue