mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-20 20:00:16 +00:00
Use radiolist to select a VPN
This commit is contained in:
parent
5cea5bddf8
commit
800fd91353
1 changed files with 11 additions and 7 deletions
|
@ -225,7 +225,7 @@ askAboutExistingInstall(){
|
||||||
"${opt3a}" "${opt3b}" 3>&2 2>&1 1>&3) || \
|
"${opt3a}" "${opt3b}" 3>&2 2>&1 1>&3) || \
|
||||||
{ echo "::: Cancel selected. Exiting"; exit 1; }
|
{ echo "::: Cancel selected. Exiting"; exit 1; }
|
||||||
|
|
||||||
echo "::: ${opt1a} option selected."
|
echo "::: ${UpdateCmd} option selected."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -252,8 +252,7 @@ distroCheck(){
|
||||||
Debian|Raspbian|Ubuntu)
|
Debian|Raspbian|Ubuntu)
|
||||||
case ${OSCN} in
|
case ${OSCN} in
|
||||||
buster|bionic)
|
buster|bionic)
|
||||||
# shellcheck disable=SC2104
|
:
|
||||||
break
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
maybeOSSupport
|
maybeOSSupport
|
||||||
|
@ -883,11 +882,16 @@ askWhichVPN(){
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if (whiptail --backtitle "Setup PiVPN" --title "Installation mode" --yesno "WireGuard is a new kind of VPN that provides near-istantaneous connection speed, high performance, modern cryptography.\\n\\nIt's the recommended choice expecially if you use mobile devices where WireGuard is easier on battery than OpenVPN.\\n\\nOpenVPN is still available if you need the traditional, flexible, trusted VPN protocol. Or if you need features like TCP and custom search domain.\\n\\nChoose 'Yes' to use WireGuard or 'No' to use OpenVPN." ${r} ${c});
|
chooseVPNCmd=(whiptail --backtitle "Setup PiVPN" --title "Installation mode" --separate-output --radiolist "WireGuard is a new kind of VPN that provides near-istantaneous connection speed, high performance, modern cryptography.\\n\\nIt's the recommended choice expecially if you use mobile devices where WireGuard is easier on battery than OpenVPN.\\n\\nOpenVPN is still available if you need the traditional, flexible, trusted VPN protocol. Or if you need features like TCP and custom search domain.\\n\\nChoose a VPN (press space to select):" "${r}" "${c}" 2)
|
||||||
then
|
VPNChooseOptions=(WireGuard "" on
|
||||||
VPN="wireguard"
|
OpenVPN "" off)
|
||||||
|
|
||||||
|
if VPN=$("${chooseVPNCmd[@]}" "${VPNChooseOptions[@]}" 2>&1 >/dev/tty) ; then
|
||||||
|
echo "::: Using VPN: $VPN"
|
||||||
|
VPN="${VPN,,}"
|
||||||
else
|
else
|
||||||
VPN="openvpn"
|
echo "::: Cancel selected, exiting...."
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue