From 0385eb834ef2204bad67063bf3343145e3b00c70 Mon Sep 17 00:00:00 2001 From: piccinnigius Date: Mon, 28 Jun 2021 16:45:51 +0200 Subject: [PATCH] Added option to show current connected clients --- openvpn-install.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/openvpn-install.sh b/openvpn-install.sh index 806d147..824abbb 100755 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -1312,11 +1312,12 @@ function manageMenu() { echo " 1) Add a new user" echo " 2) Revoke existing user" echo " 3) Remove OpenVPN" - echo " 4) Exit" - until [[ $MENU_OPTION =~ ^[1-4]$ ]]; do - read -rp "Select an option [1-4]: " MENU_OPTION + echo " 4) List current connected users" + echo " 5) Exit" + until [[ $MENU_OPTION =~ ^[1-5]$ ]]; do + read -rp "Select an option [1-5]: " MENU_OPTION done - + case $MENU_OPTION in 1) newClient @@ -1328,6 +1329,9 @@ function manageMenu() { removeOpenVPN ;; 4) + cat /var/log/openvpn/status.log + ;; + 5) exit 0 ;; esac