From 7b6d98287507bf3db6c92b1ea42c2c4bd4e12b47 Mon Sep 17 00:00:00 2001 From: hwdsl2 Date: Wed, 22 Sep 2021 00:03:20 -0500 Subject: [PATCH] Improve VPN setup - Remove IKEv2 script when uninstalling --- extras/vpnuninstall.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/extras/vpnuninstall.sh b/extras/vpnuninstall.sh index fab8374..dbbcfb0 100755 --- a/extras/vpnuninstall.sh +++ b/extras/vpnuninstall.sh @@ -163,6 +163,14 @@ remove_xl2tpd() { fi } +remove_ikev2_script() { + bigecho "Removing IKEv2 script..." + if [ "$(readlink -f /usr/bin/ikev2.sh 2>/dev/null)" = "/opt/src/ikev2.sh" ]; then + /bin/rm -f /usr/bin/ikev2.sh + fi + /bin/rm -f /opt/src/ikev2.sh +} + update_sysctl() { if grep -qs "hwdsl2 VPN script" /etc/sysctl.conf; then bigecho "Updating sysctl settings..." @@ -273,6 +281,7 @@ remove_vpn() { stop_services remove_ipsec remove_xl2tpd + remove_ikev2_script update_sysctl update_rclocal update_iptables_rules