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

Add MLVPN package

This commit is contained in:
Ycarus 2018-06-06 17:57:59 +02:00
parent a20b172cd8
commit cf95f2d836
5 changed files with 185 additions and 0 deletions

View file

@ -0,0 +1,30 @@
#!/bin/sh
uci -q batch <<-EOF >/dev/null
delete ucitrack.@mlvpn[-1]
add ucitrack mlvpn
set ucitrack.@mlvpn[-1].init=mlvpn
commit ucitrack
EOF
if [ "$(uci -q get network.omrvpn)" = "" ] && [ "$(uci -q get network.mlvpn)" = "" ]; then
uci -q batch <<-EOF >/dev/null
delete network.mlvpn=interface
set network.mlvpn=interface
set network.mlvpn.ifname=mlvpn0
set network.mlvpn.proto=dhcp
set network.mlvpn.ip4table=vpn
set network.mlvpn.multipath=off
set network.mlvpn.leasetime=12h
set network.mlvpn.mtu=1440
commit network
EOF
fi
if [ "$(uci get firewall.@zone[2].network | grep omrvpn)" = "" ] && [ "$(uci get firewall.@zone[2].network | grep mlvpn)" = "" ]; then
uci -q batch <<-EOF >/dev/null
add_list firewall.@zone[2].network='mlvpn'
EOF
fi
rm -f /tmp/luci-indexcache
exit 0