1
0
mirror of synced 2024-11-22 21:16:02 +03:00

Update IKEv2 script

- Improve Libreswan version test
This commit is contained in:
hwdsl2 2022-01-29 14:12:50 -06:00
parent 14af993d6a
commit 2270d66e02

View File

@ -120,21 +120,18 @@ Error: Your must first set up the IPsec VPN server before setting up IKEv2.
EOF EOF
exit 1 exit 1
fi fi
case $swan_ver in }
3.2[35679]|3.3[12]|4.*)
true check_swan_ver() {
;; if ! printf '%s\n%s' "3.23" "$swan_ver" | sort -C -V; then
*)
cat 1>&2 <<EOF cat 1>&2 <<EOF
Error: Libreswan version '$swan_ver' is not supported. Error: Libreswan version '$swan_ver' is not supported.
This script requires one of these versions: This script requires Libreswan 3.23 or newer.
3.23, 3.25-3.27, 3.29, 3.31-3.32 or 4.x
To update Libreswan, run: To update Libreswan, run:
wget https://git.io/vpnupgrade -O vpnup.sh && sudo sh vpnup.sh wget https://git.io/vpnupgrade -O vpnup.sh && sudo sh vpnup.sh
EOF EOF
exit 1 exit 1
;; fi
esac
} }
check_utils_exist() { check_utils_exist() {
@ -1212,6 +1209,7 @@ ikev2setup() {
check_container check_container
check_os check_os
check_libreswan check_libreswan
check_swan_ver
check_utils_exist check_utils_exist
use_defaults=0 use_defaults=0