1
0
mirror of synced 2024-11-23 05:26:02 +03:00

Update IKEv2 script

- Add an option to list the names of existing IKEv2 clients
This commit is contained in:
hwdsl2 2021-02-01 22:38:42 -06:00
parent 954b2acb7c
commit 4d1af3afcb

View File

@ -547,10 +547,11 @@ select_menu_option() {
echo "Select an option:" echo "Select an option:"
echo " 1) Add a new client" echo " 1) Add a new client"
echo " 2) Export configuration for an existing client" echo " 2) Export configuration for an existing client"
echo " 3) Remove IKEv2" echo " 3) List existing clients"
echo " 4) Exit" echo " 4) Remove IKEv2"
echo " 5) Exit"
read -rp "Option: " selected_option read -rp "Option: " selected_option
until [[ "$selected_option" =~ ^[1-4]$ ]]; do until [[ "$selected_option" =~ ^[1-5]$ ]]; do
printf '%s\n' "$selected_option: invalid selection." printf '%s\n' "$selected_option: invalid selection."
read -rp "Option: " selected_option read -rp "Option: " selected_option
done done
@ -1268,6 +1269,11 @@ ikev2setup() {
exit 0 exit 0
;; ;;
3) 3)
echo
list_existing_clients
exit 0
;;
4)
check_ipsec_conf check_ipsec_conf
confirm_remove_ikev2 confirm_remove_ikev2
delete_ikev2_conf delete_ikev2_conf
@ -1276,7 +1282,7 @@ ikev2setup() {
print_ikev2_removed_message print_ikev2_removed_message
exit 0 exit 0
;; ;;
4) *)
exit 0 exit 0
;; ;;
esac esac