mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Iperf script
This commit is contained in:
parent
6ea9041601
commit
be62bc62b6
1 changed files with 14 additions and 0 deletions
14
openmptcprouter/files/bin/omr-iperf
Executable file
14
openmptcprouter/files/bin/omr-iperf
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
SERVER=$1
|
||||
KEY=$(uci -q get iperf.$SERVER.key)
|
||||
USER=$(uci -q get iperf.$SERVER.user)
|
||||
PASSWORD=$(uci -q get iperf.$SERVER.password)
|
||||
HOST=$(uci -q get iperf.$SERVER.host)
|
||||
PORTS=$(uci -q get iperf.$SERVER.ports | sed 's/,/ /g')
|
||||
PORT="${PORTS%% *}"
|
||||
echo $KEY | base64 -d > /tmp/iperf.pem
|
||||
if [ -n "$PASSWORD" ] && [ -n "$USER" ] && [ -n "$KEY" ]; then
|
||||
IPERF3_PASSWORD=$PASSWORD iperf3 --username $USER --rsa-public-key-path /tmp/iperf.pem -c $HOST -p $PORT
|
||||
else
|
||||
iperf3 -c $HOST -p $PORT
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue