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

Some VPN interfaces default config changes

This commit is contained in:
Ycarus (Yannick Chabanois) 2023-07-14 08:28:20 +02:00
parent e613de8cff
commit 715c0cd0bc
2 changed files with 5 additions and 10 deletions

View file

@ -12,7 +12,6 @@ if [ "$(uci -q get network.omrvpn)" = "" ]; then
set network.omrvpn.leasetime=12h
set network.omrvpn.type=tunnel
set network.omrvpn.txqueuelen=100
set network.omrvpn.metric=9000
commit network
EOF
fi
@ -146,9 +145,11 @@ if [ "$(uci -q get glorytun-udp.vpn.key)" = "" ] && [ "$(uci -q get glorytun.vpn
uci -q commit glorytun-udp
fi
if [ "$(uci -q get network.omrvpn.metric)" = "1200" ]; then
if [ "$(uci -q get network.tun0.metric)" = "1200" ] || [ -z "$(uci -q get network.tun0.metric)" ]; then
uci -q batch <<-EOF >/dev/null
set network.omrvpn.metric=9000
set network.tun0=device
set network.tun0.name='tun0'
set network.tun0.metric=9000
commit network
EOF
fi