From f15db57ea55875feb96ca3cdc6741dfd31f98fec Mon Sep 17 00:00:00 2001 From: hwdsl2 Date: Thu, 30 Apr 2020 00:12:56 -0500 Subject: [PATCH] Fix upgrade bug - Fixed an issue where the upgrade script could break the IKEv2 section of /etc/ipsec.conf for users who manually added IKEv2 --- extras/vpnupgrade.sh | 2 +- extras/vpnupgrade_centos.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extras/vpnupgrade.sh b/extras/vpnupgrade.sh index d33fbee..8a9a4c3 100644 --- a/extras/vpnupgrade.sh +++ b/extras/vpnupgrade.sh @@ -275,7 +275,7 @@ fi if [ "$SWAN_VER" = "3.29" ] || [ "$SWAN_VER" = "3.31" ]; then sed -i "/ikev2=never/d" /etc/ipsec.conf - sed -i "/dpdaction=clear/a \ ikev2=never" /etc/ipsec.conf + sed -i "/conn shared/a \ ikev2=never" /etc/ipsec.conf fi # Restart IPsec service diff --git a/extras/vpnupgrade_centos.sh b/extras/vpnupgrade_centos.sh index 46365a1..4ffd9eb 100644 --- a/extras/vpnupgrade_centos.sh +++ b/extras/vpnupgrade_centos.sh @@ -280,7 +280,7 @@ fi if [ "$SWAN_VER" = "3.29" ] || [ "$SWAN_VER" = "3.31" ]; then sed -i "/ikev2=never/d" /etc/ipsec.conf - sed -i "/dpdaction=clear/a \ ikev2=never" /etc/ipsec.conf + sed -i "/conn shared/a \ ikev2=never" /etc/ipsec.conf fi # Restart IPsec service