diff --git a/extras/add_vpn_user.sh b/extras/add_vpn_user.sh index aadad2a..35ee3da 100644 --- a/extras/add_vpn_user.sh +++ b/extras/add_vpn_user.sh @@ -84,7 +84,7 @@ Write these down. You'll need them to connect! EOF -printf "Do you wish to continue? [y/N] " +printf "Do you want to continue? [y/N] " read -r response case $response in [yY][eE][sS]|[yY]) @@ -93,9 +93,7 @@ case $response in echo ;; *) - echo - echo "Aborting. No changes were made." - echo + echo "Abort. No changes were made." exit 1 ;; esac diff --git a/extras/del_vpn_user.sh b/extras/del_vpn_user.sh index ee0249e..f76fbb8 100644 --- a/extras/del_vpn_user.sh +++ b/extras/del_vpn_user.sh @@ -63,7 +63,6 @@ if [ "$(grep -c "^\"$VPN_USER\" " /etc/ppp/chap-secrets)" = "0" ] \ cat 1>&2 <<'EOF' Error: The specified VPN user does not exist in /etc/ppp/chap-secrets and/or /etc/ipsec.d/passwd. - Aborting. No changes were made. EOF exit 1 fi @@ -73,7 +72,6 @@ if [ "$(grep -c -v -e '^#' -e '^[[:space:]]*$' /etc/ppp/chap-secrets)" = "1" ] \ cat 1>&2 <<'EOF' Error: Cannot delete the only VPN user from /etc/ppp/chap-secrets and/or /etc/ipsec.d/passwd. - Aborting. No changes were made. EOF exit 1 fi @@ -97,7 +95,7 @@ Username: $VPN_USER EOF -printf "Do you wish to continue? [y/N] " +printf "Do you want to continue? [y/N] " read -r response case $response in [yY][eE][sS]|[yY]) @@ -106,9 +104,7 @@ case $response in echo ;; *) - echo - echo "Aborting. No changes were made." - echo + echo "Abort. No changes were made." exit 1 ;; esac diff --git a/extras/ikev2setup.sh b/extras/ikev2setup.sh index e1633bb..a080c25 100644 --- a/extras/ikev2setup.sh +++ b/extras/ikev2setup.sh @@ -70,8 +70,8 @@ EOF exit 1 fi -command -v certutil >/dev/null 2>&1 || { echo >&2 "Error: Command 'certutil' not found. Aborting."; exit 1; } -command -v pk12util >/dev/null 2>&1 || { echo >&2 "Error: Command 'pk12util' not found. Aborting."; exit 1; } +command -v certutil >/dev/null 2>&1 || { echo >&2 "Error: Command 'certutil' not found. Abort."; exit 1; } +command -v pk12util >/dev/null 2>&1 || { echo >&2 "Error: Command 'pk12util' not found. Abort."; exit 1; } clear @@ -85,7 +85,7 @@ You can use the default options and just press enter if you are OK with them. EOF echo "Do you want IKEv2 VPN clients to connect to this server using a DNS name," -printf "e.g. vpn.example.com, instead of its IP address [y/N]? " +printf "e.g. vpn.example.com, instead of its IP address? [y/N] " read -r response case $response in [yY][eE][sS]|[yY]) @@ -108,11 +108,11 @@ if [ "$use_dns_name" = "1" ]; then else public_ip=$(dig @resolver1.opendns.com -t A -4 myip.opendns.com +short) [ -z "$public_ip" ] && public_ip=$(wget -t 3 -T 15 -qO- http://ipv4.icanhazip.com) - read -rp "Enter the IPv4 address of this VPN server [$public_ip]: " server_addr + read -rp "Enter the IPv4 address of this VPN server: [$public_ip] " server_addr [ -z "$server_addr" ] && server_addr="$public_ip" until check_ip "$server_addr"; do echo "Invalid IP address." - read -rp "Enter the IPv4 address of this VPN server [$public_ip]: " server_addr + read -rp "Enter the IPv4 address of this VPN server: [$public_ip] " server_addr [ -z "$server_addr" ] && server_addr="$public_ip" done fi @@ -141,7 +141,7 @@ fi mobike_enable=0 if [ "$mobike_support" = "1" ]; then echo - printf "Do you want to enable MOBIKE support [Y/n]? " + printf "Do you want to enable MOBIKE support? [Y/n] " read -r response case $response in [yY][eE][sS]|[yY]|'') @@ -153,15 +153,38 @@ if [ "$mobike_support" = "1" ]; then esac fi -echo -printf "We are ready to set up IKEv2 now. Continue [y/N]? " +cat <