mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
add ouad
This commit is contained in:
parent
63fe792617
commit
39435ef52b
24 changed files with 5667 additions and 0 deletions
20
luci-app-ouad/root/usr/sbin/netspeed
Executable file
20
luci-app-ouad/root/usr/sbin/netspeed
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#!/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
|
||||
11
luci-app-ouad/root/usr/share/rpcd/acl.d/luci-app-oled.json
Normal file
11
luci-app-ouad/root/usr/share/rpcd/acl.d/luci-app-oled.json
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"luci-app-oled": {
|
||||
"description": "Grant UCI access for luci-app-oled",
|
||||
"read": {
|
||||
"uci": [ "oled" ]
|
||||
},
|
||||
"write": {
|
||||
"uci": [ "oled" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue