1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-12 10:31:51 +00:00

Less output for uci defaults

This commit is contained in:
Ycarus 2019-04-18 09:11:57 +02:00
parent 8a014cf520
commit 7b8c43a449
6 changed files with 33 additions and 33 deletions

View file

@ -6,7 +6,7 @@ uci -q batch <<-EOF
commit ucitrack
EOF
if [ "$(uci -q get qos.serverin)" = "" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
set qos.serverin=classify
set qos.serverin.target='Priority'
set qos.serverout=classify
@ -15,52 +15,52 @@ if [ "$(uci -q get qos.serverin)" = "" ]; then
EOF
fi
if [ "$(uci -q get qos.serverin.target)" = "" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
set qos.serverin.target='Priority'
set qos.serverout.target='Priority'
commit qos
EOF
fi
if [ "$(uci -q ucitrack.@network[-1].affects | grep openmptcprouter)" = "" ]; then
uci -q batch <<-EOF
if [ "$(uci -q get ucitrack.@network[-1].affects | grep openmptcprouter)" = "" ]; then
uci -q batch <<-EOF >/dev/null
add_list ucitrack.@network[-1].affects="openmptcprouter"
commit ucitrack
EOF
fi
if [ "$(uci -q get openmptcprouter.vps)" != "server" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
set openmptcprouter.vps=server
commit openmptcprouter
EOF
fi
if [ "$(uci -q get openmptcprouter.vps.master)" = "" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
set openmptcprouter.vps.master=1
set openmptcprouter.vps.backup=0
commit openmptcprouter
EOF
fi
if [ "$(uci -q get openmptcprouter.omr)" != "router" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
set openmptcprouter.omr=router
commit openmptcprouter
EOF
fi
if [ "$(uci -q get openmptcprouter.settings.master)" = "dynamic" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
set openmptcprouter.settings=settings
set openmptcprouter.settings.master='change'
commit openmptcprouter
EOF
fi
if [ "$(uci -q get openmptcprouter.vps.port)" = "" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
set openmptcprouter.vps.port='65500'
commit openmptcprouter
EOF
fi
if [ "$(uci -q get openmptcprouter.settings.disable_ipv6)" = "" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
set openmptcprouter.settings.disable_ipv6='1'
commit openmptcprouter
EOF

View file

@ -1,12 +1,12 @@
#!/bin/sh
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
delete ucitrack.@macvlan[-1]
add ucitrack macvlan
set ucitrack.@macvlan[-1].init=macvlan
commit ucitrack
EOF
if [ "$(uci -q get ucitrack.@network[-1].affects | grep macvlan)" = "" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
add_list ucitrack.@network[-1].affects=macvlan
commit ucitrack
EOF

View file

@ -1,6 +1,6 @@
#!/bin/sh
if [ "$(uci -q show network.globals | grep mptcp_path_manager)" = "" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
set network.globals.multipath='enable'
set network.globals.mptcp_path_manager='fullmesh'
set network.globals.mptcp_scheduler='default'
@ -12,55 +12,55 @@ if [ "$(uci -q show network.globals | grep mptcp_path_manager)" = "" ]; then
EOF
fi
if [ "$(uci -q get network.globals.congestion)" != "bbr" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
set network.globals.congestion=bbr
commit network
EOF
fi
if [ "$(uci -q get network.globals.mptcp_syn_retries)" != "1" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
set network.globals.mptcp_syn_retries=1
commit network
EOF
fi
if [ "$(uci -q get network.globals.mptcp_checksum)" != "0" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
set network.globals.mptcp_checksum=0
commit network
EOF
fi
if [ "$(uci -q get network.globals.mptcp_checksum)" = "enable" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
set network.globals.mptcp_checksum=1
EOF
fi
if [ "$(uci -q get network.globals.mptcp_checksum)" = "disable" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
set network.globals.mptcp_checksum=0
EOF
fi
if [ "$(uci -q get network.globals.mptcp_debug)" != "0" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
set network.globals.mptcp_debug=0
EOF
fi
if [ "$(uci -q show network.globals | grep mptcp_fullmesh)" = "" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
set network.globals.mptcp_fullmesh_num_subflows=1
set network.globals.mptcp_fullmesh_create_on_err=1
set network.globals.mptcp_ndiffports_num_subflows=1
commit network
EOF
fi
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
delete ucitrack.@mptcp[-1]
add ucitrack mptcp
set ucitrack.@mptcp[-1].init=mptcp
commit ucitrack
EOF
if [ "$(uci -q get ucitrack.@network[-1].affects | grep mptcp)" = "" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
add_list ucitrack.@network[-1].affects=mptcp
commit ucitrack
EOF

View file

@ -3,7 +3,7 @@
. /lib/functions.sh
if [ "$(uci -q show network | grep omr6in4)" = "" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
set network.omr6in4=interface
set network.omr6in4.proto=6in4
set network.omr6in4.ip4table=vpn
@ -17,7 +17,7 @@ if [ "$(uci -q show network | grep omr6in4)" = "" ]; then
fi
if [ "$(uci -q get ucitrack.@network[-1].affects | grep omr6in4)" = "" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
add_list ucitrack.@network[-1].affects=omr6in4
commit ucitrack
EOF
@ -25,14 +25,14 @@ fi
if [ "$(uci -q get network.omr6in4.ip6addr)" = "" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
set network.omr6in4.ip6addr=fe80::a00:2
commit network
EOF
fi
if [ "$(uci -q get firewall.zone_vpn.network | grep omr6in4)" = "" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
add_list firewall.zone_vpn.network=omr6in4
commit firewall
EOF

View file

@ -1,12 +1,12 @@
#!/bin/sh
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
delete ucitrack.@omr-quota[-1]
add ucitrack omr-quota
set ucitrack.@omr-quota[-1].init="omr-quota"
commit ucitrack
EOF
if [ "$(uci -q get ucitrack.@network[-1].affects | grep omr-quota)" = "" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
add_list ucitrack.@network[-1].affects="omr-quota"
commit ucitrack
EOF

View file

@ -1,30 +1,30 @@
#!/bin/sh
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
delete ucitrack.@omr-tracker[-1]
add ucitrack omr-tracker
set ucitrack.@omr-tracker[-1].init="omr-tracker"
commit ucitrack
EOF
if [ "$(uci -q get ucitrack.@network[-1].affects | grep omr-tracker)" = "" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
add_list ucitrack.@network[-1].affects="omr-tracker"
commit ucitrack
EOF
fi
if [ "$(uci -q get ucitrack.@shadowsocks-libev[-1].affects | grep omr-tracker)" = "" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
add_list ucitrack.@shadowsocks-libev[-1].affects="omr-tracker"
commit ucitrack
EOF
fi
if [ "$(uci -q get omr-tracker.defaults.interval_tries)" = "" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
set omr-tracker.defaults.interval_tries=1
commit omr-tracker
EOF
fi
if [ "$(uci -q get omr-tracker.shadowsocks.hosts | grep '23.96.52.53')" != "" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
del_list omr-tracker.shadowsocks.hosts='23.96.52.53'
del_list omr-tracker.shadowsocks.hosts='104.40.211.35'
del_list omr-tracker.shadowsocks.hosts='80.67.169.12'