From 34ba47e79b3c435f3704be44ed4b3df8c5a71e58 Mon Sep 17 00:00:00 2001 From: hwdsl2 Date: Tue, 4 Jan 2022 23:11:05 -0600 Subject: [PATCH] Update VPN user scripts - Sort VPN usernames when listing users - Cleanup --- extras/add_vpn_user.sh | 2 +- extras/del_vpn_user.sh | 2 +- extras/update_vpn_users.sh | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/extras/add_vpn_user.sh b/extras/add_vpn_user.sh index 6873878..3925798 100755 --- a/extras/add_vpn_user.sh +++ b/extras/add_vpn_user.sh @@ -60,7 +60,7 @@ if [ -z "$VPN_USER" ] || [ -z "$VPN_PASSWORD" ]; then show_intro echo echo "List of existing VPN usernames:" - cut -f1 -d : /etc/ipsec.d/passwd + cut -f1 -d : /etc/ipsec.d/passwd | LC_ALL=C sort echo echo "Enter the VPN username you want to add or update." read -rp "Username: " VPN_USER diff --git a/extras/del_vpn_user.sh b/extras/del_vpn_user.sh index 7aedc0d..e64a4a4 100755 --- a/extras/del_vpn_user.sh +++ b/extras/del_vpn_user.sh @@ -53,7 +53,7 @@ if [ -z "$VPN_USER" ]; then show_intro echo echo "List of existing VPN usernames:" - cut -f1 -d : /etc/ipsec.d/passwd + cut -f1 -d : /etc/ipsec.d/passwd | LC_ALL=C sort echo echo "Enter the VPN username you want to delete." read -rp "Username: " VPN_USER diff --git a/extras/update_vpn_users.sh b/extras/update_vpn_users.sh index aee9531..cd4364b 100755 --- a/extras/update_vpn_users.sh +++ b/extras/update_vpn_users.sh @@ -98,8 +98,6 @@ IPsec/L2TP and IPsec/XAuth ("Cisco IPsec") modes. WARNING: *ALL* existing VPN users will be removed and replaced with the users listed below. -Please double check before continuing! - ================================================== Updated list of VPN users (username | password):