1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-15 03:51:51 +00:00
openmptcprouter-feeds/omr-6in4/files/etc/uci-defaults/9010-omr-6in4

43 lines
1 KiB
Text
Raw Normal View History

2018-04-27 14:52:12 +00:00
#!/bin/sh
. /lib/functions.sh
if [ "$(uci -q show network | grep omr6in4)" = "" ]; then
2019-04-18 07:11:57 +00:00
uci -q batch <<-EOF >/dev/null
2018-04-27 14:52:12 +00:00
set network.omr6in4=interface
set network.omr6in4.proto=6in4
set network.omr6in4.ip4table=vpn
set network.omr6in4.multipath=off
2018-06-07 20:43:16 +00:00
set network.omr6in4.ipaddr=10.255.255.2
set network.omr6in4.peeraddr=10.255.255.1
2020-05-01 09:08:31 +00:00
set network.omr6in4.gateway=fd80::a00:1
set network.omr6in4.ip6addr='fd80::a00:2/128'
set network.omr6in4.auto='0'
2018-07-03 13:11:54 +00:00
commit network
EOF
fi
2018-07-05 16:30:51 +00:00
if [ "$(uci -q get ucitrack.@network[-1].affects | grep omr6in4)" = "" ]; then
2019-04-18 07:11:57 +00:00
uci -q batch <<-EOF >/dev/null
2018-07-05 16:30:51 +00:00
add_list ucitrack.@network[-1].affects=omr6in4
commit ucitrack
EOF
fi
2018-07-03 13:11:54 +00:00
if [ "$(uci -q get network.omr6in4.ip6addr)" = "" ]; then
2019-04-18 07:11:57 +00:00
uci -q batch <<-EOF >/dev/null
2020-05-01 09:08:31 +00:00
set network.omr6in4.ip6addr=fd80::a00:2
2018-04-27 14:52:12 +00:00
commit network
2018-06-09 17:29:02 +00:00
EOF
fi
if [ "$(uci -q get firewall.zone_vpn.network | grep omr6in4)" = "" ]; then
2019-04-18 07:11:57 +00:00
uci -q batch <<-EOF >/dev/null
2018-06-07 14:53:08 +00:00
add_list firewall.zone_vpn.network=omr6in4
commit firewall
2018-04-27 14:52:12 +00:00
EOF
fi
2018-07-05 16:30:51 +00:00
rm -f /tmp/luci-indexcache
2018-04-27 14:52:12 +00:00
exit 0