mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
commit
3000d34656
5 changed files with 17 additions and 12 deletions
|
@ -364,6 +364,7 @@ function wizard_add()
|
|||
ucic:set("sqm",intf,"download",math.ceil(downloadspeed*95/100))
|
||||
ucic:set("qos",intf,"download",math.ceil(downloadspeed*95/100))
|
||||
else
|
||||
ucic:delete("network",intf,"downloadspeed")
|
||||
ucic:set("sqm",intf,"download","0")
|
||||
ucic:set("qos",intf,"download","0")
|
||||
end
|
||||
|
@ -372,13 +373,10 @@ function wizard_add()
|
|||
ucic:set("sqm",intf,"upload",math.ceil(uploadspeed*95/100))
|
||||
ucic:set("qos",intf,"upload",math.ceil(uploadspeed*95/100))
|
||||
else
|
||||
ucic:delete("network",intf,"uploadspeed")
|
||||
ucic:set("sqm",intf,"upload","0")
|
||||
ucic:set("qos",intf,"upload","0")
|
||||
end
|
||||
if downloadspeed ~= "0" and downloadspeed ~= "" and uploadspeed ~= "0" and uploadspeed ~= "" then
|
||||
ucic:set("sqm",intf,"enabled","0")
|
||||
ucic:set("qos",intf,"enabled","0")
|
||||
end
|
||||
|
||||
if sqmenabled == "1" then
|
||||
ucic:set("sqm",intf,"iqdisc_opts","autorate-ingress nat dual-dsthost")
|
||||
|
|
|
@ -121,6 +121,13 @@ if [ "$(uci -q get openmptcprouter.settings.disableintfrename)" = "" ]; then
|
|||
EOF
|
||||
fi
|
||||
|
||||
if [ "$(uci -q get openmptcprouter.settings.tracebox)" = "" ]; then
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
set openmptcprouter.settings.tracebox='0'
|
||||
commit openmptcprouter
|
||||
EOF
|
||||
fi
|
||||
|
||||
sed -i 's/net.ipv4.tcp_retries2=3$/net.ipv4.tcp_retries2=15/' /etc/sysctl.d/zzz_openmptcprouter.conf
|
||||
|
||||
exit 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue