From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH 2/3] backup.pl: Remove the previous code for adding legacty provider to n2n Date: Wed, 07 Jun 2023 16:21:49 +0200 Message-ID: <20230607142150.18407-2-adolf.belka@ipfire.org> In-Reply-To: <20230607142150.18407-1-adolf.belka@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8879812156479147802==" List-Id: --===============8879812156479147802== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable - This code is no longer needed with the code in the ovpnmain.cgi patch in th= is patch set. Tested-by: Adolf Belka Signed-off-by: Adolf Belka --- config/backup/backup.pl | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/config/backup/backup.pl b/config/backup/backup.pl index 8d990c0f1..60138a58a 100644 --- a/config/backup/backup.pl +++ b/config/backup/backup.pl @@ -190,21 +190,6 @@ restore_backup() { # Update OpenVPN CRL /etc/fcron.daily/openvpn-crl-updater =09 - # Update OpenVPN N2N Client Configs - ## Add providers legacy default line to n2n client config files - # Check if ovpnconfig exists and is not empty - if [ -s /var/ipfire/ovpn/ovpnconfig ]; then - # Identify all n2n connections - for y in $(awk -F',' '/net/ { print $3 }' /var/ipfire/ovpn/ovpnconfi= g); do - # Add the legacy option to all N2N client conf files if it does = not already exist - if [ $(grep -c "Open VPN Client Config" /var/ipfire/ovpn/n2nconf/${y}/${y= }.conf) -eq 1 ] ; then - if [ $(grep -c "providers legacy default" /var/ipfire/ovpn/n2nconf/${y}/= ${y}.conf) -eq 0 ] ; then - echo "providers legacy default" >> /var/ipfire/ovpn/n2nconf/${y}/${y}.c= onf - fi - fi - done - fi - return 0 } =20 --=20 2.40.1 --===============8879812156479147802==--