mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Detect and set best MTU, set some settings before status page
This commit is contained in:
parent
5cd9511df6
commit
910c6f5ee9
7 changed files with 88 additions and 19 deletions
|
@ -4,6 +4,15 @@ START=5
|
|||
|
||||
USE_PROCD=1
|
||||
|
||||
omr_intf_del() {
|
||||
uci -q delete openmptcprouter.$1
|
||||
}
|
||||
omr_intf_set() {
|
||||
config_get multipath "$1" multipath
|
||||
[ -z "$multipath" ] || [ "$multipath" = "off" ] && return
|
||||
uci -q set openmptcprouter.$1=interface
|
||||
}
|
||||
|
||||
start_service() {
|
||||
local scaling_min_freq scaling_max_freq
|
||||
config_load openmptcprouter
|
||||
|
@ -28,6 +37,10 @@ start_service() {
|
|||
# remove sysctl already defined in /etc/sysctl.d/
|
||||
sed -i -e '/tcp_fin_timeout/d' -e '/tcp_keepalive_time/d' -e '/nf_conntrack_max/d' /etc/sysctl.conf
|
||||
sed -i -e '/tcp_fin_timeout/d' -e '/tcp_keepalive_time/d' -e '/nf_conntrack_max/d' /etc/sysctl.d/10-default.conf
|
||||
|
||||
config_foreach omr_intf_del interface
|
||||
config_load network
|
||||
config_foreach omr_intf_set interface
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
|
|
|
@ -21,3 +21,9 @@ if [ "$(uci -q get qos.serverin.target)" = "" ]; then
|
|||
commit qos
|
||||
EOF
|
||||
fi
|
||||
if [ "$(uci -q ucitrack.@network[-1].affects | grep openmptcprouter)" = "" ]; then
|
||||
uci -q batch <<-EOF
|
||||
add_list ucitrack.@network[-1].affects="openmptcprouter"
|
||||
commit ucitrack
|
||||
EOF
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue