1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Add interface parameter to omr-speed-test

This commit is contained in:
Ycarus 2018-07-22 22:10:30 +02:00
parent 8eaa0c42be
commit 664fd7c696

View file

@ -1,7 +1,20 @@
#!/bin/sh #!/bin/sh
# vim: set noexpandtab tabstop=4 shiftwidth=4 softtabstop=4 : # vim: set noexpandtab tabstop=4 shiftwidth=4 softtabstop=4 :
INTERFACE="$1"
HOST="proof.ovh.net" HOST="proof.ovh.net"
trap : HUP INT TERM trap : HUP INT TERM
curl http://$HOST/files/10Gio.dat >/dev/null || echo if [ -z "$INTERFACE" ]; then
curl http://$HOST/files/10Gio.dat >/dev/null || echo
else
uci -q batch <<-EOF >/dev/null
add_list dhcp.@dnsmasq[-1].ipset='/$HOST/ss_rules_dst_bypass'
commit dhcp
EOF
curl --interface $INTERFACE http://$HOST/files/10Gio.dat >/dev/null || echo
uci -q batch <<-EOF >/dev/null
del_list dhcp.@dnsmasq[-1].ipset='/$HOST/ss_rules_dst_bypass'
commit dhcp
EOF
fi