luci-app-openvpn-server:fix start crash in AR9341 (#4540)

just one uci commit in script 
too many commits may crash start in AR9341 routers
This commit is contained in:
lunatickochiya 2020-05-06 00:13:25 +08:00 committed by GitHub
parent 5b88caedf6
commit b80d00eede
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,9 +3,10 @@
uci set network.vpn0="interface"
uci set network.vpn0.ifname="tun0"
uci set network.vpn0.proto="none"
uci commit network;
/etc/init.d/network reload
uci delete firewall.vpn
uci delete firewall.vpnwan
uci delete firewall.vpnlan
uci delete firewall.openvpn
uci add firewall rule
uci rename firewall.@rule[-1]="openvpn"
@ -15,11 +16,6 @@ uci set firewall.@rule[-1].src="wan"
uci set firewall.@rule[-1].proto="tcp udp"
uci set firewall.@rule[-1].dest_port="1194"
uci delete firewall.vpn
uci delete firewall.vpnwan
uci delete firewall.vpnlan
uci commit firewall
uci add firewall zone
uci rename firewall.@zone[-1]="vpn"
uci set firewall.@zone[-1].name="vpn"
@ -36,11 +32,7 @@ uci add firewall forwarding
uci rename firewall.@forwarding[-1]="vpnlan"
uci set firewall.@forwarding[-1].src="vpn"
uci set firewall.@forwarding[-1].dest="lan"
uci commit firewall;
/etc/init.d/firewall restart
/etc/init.d/openvpn enable
/etc/init.d/openvpn stop
uci commit
rm -f /tmp/luci-indexcache
exit 0