From 77b7adee4998d8e257b08df57cab10ed0638b3de Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Thu, 26 Dec 2024 10:19:40 +0100 Subject: [PATCH] Fix OpenVPN multi process --- openmptcprouter/files/etc/uci-defaults/2020-omr-vpn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openmptcprouter/files/etc/uci-defaults/2020-omr-vpn b/openmptcprouter/files/etc/uci-defaults/2020-omr-vpn index 513eed4911..0374a69771 100755 --- a/openmptcprouter/files/etc/uci-defaults/2020-omr-vpn +++ b/openmptcprouter/files/etc/uci-defaults/2020-omr-vpn @@ -182,9 +182,9 @@ if [ "$NBCPU" -gt 1 ] && [ -z "$(uci -q get openvpn.omr2)" ]; then set openvpn.omr$c.disable_dco=1 set openvpn.omr$c.ping_restart=60 set openvpn.omr$c.tun_mtu=1420 - del_list firewall.zone_vpn.device=tun$((c-1)) - add_list firewall.zone_vpn.device=tun$((c-1)) EOF + [ -z "$(uci -q get firewall.zone_vpn.device | grep tun$((c-1)))" ] && add_list firewall.zone_vpn.device=tun$((c-1)) + done uci -q commit openvpn uci -q commit firewall