From 4d1af3afcb072e300fcf0327fc3cbcb620e3e94c Mon Sep 17 00:00:00 2001 From: hwdsl2 Date: Mon, 1 Feb 2021 22:38:42 -0600 Subject: [PATCH] Update IKEv2 script - Add an option to list the names of existing IKEv2 clients --- extras/ikev2setup.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/extras/ikev2setup.sh b/extras/ikev2setup.sh index b236f1b..7e4bd0a 100644 --- a/extras/ikev2setup.sh +++ b/extras/ikev2setup.sh @@ -547,10 +547,11 @@ select_menu_option() { echo "Select an option:" echo " 1) Add a new client" echo " 2) Export configuration for an existing client" - echo " 3) Remove IKEv2" - echo " 4) Exit" + echo " 3) List existing clients" + echo " 4) Remove IKEv2" + echo " 5) Exit" read -rp "Option: " selected_option - until [[ "$selected_option" =~ ^[1-4]$ ]]; do + until [[ "$selected_option" =~ ^[1-5]$ ]]; do printf '%s\n' "$selected_option: invalid selection." read -rp "Option: " selected_option done @@ -1268,6 +1269,11 @@ ikev2setup() { exit 0 ;; 3) + echo + list_existing_clients + exit 0 + ;; + 4) check_ipsec_conf confirm_remove_ikev2 delete_ikev2_conf @@ -1276,7 +1282,7 @@ ikev2setup() { print_ikev2_removed_message exit 0 ;; - 4) + *) exit 0 ;; esac