Added message about TCP

This commit is contained in:
redfast00 2016-10-09 12:30:13 +02:00
parent c15718f693
commit cf5ba27a21
No known key found for this signature in database
GPG key ID: B7DD106EAC545F95

View file

@ -477,20 +477,15 @@ update_repo() {
setCustomProto() { setCustomProto() {
# Set the available protocols into an array so it can be used with a whiptail dialog # Set the available protocols into an array so it can be used with a whiptail dialog
protoArray=() protocol=$(whiptail --title "Protocol" --radiolist \
protoArray+=("udp" "available" "ON") "Choose a protocol. Please only choose TCP if you know why you need TCP." $r $c 2 \
protoArray+=("tcp" "available" "OFF") "UDP" "" ON \
"TCP" "" OFF 3>&1 1>&2 2>&3)
chooseProtoCmd=(whiptail --separate-output --radiolist "Choose A Protocol" $r $c 2) if [ $? -eq 0 ]; then
echo "${chooseProtoCmd[@]}" "${protoArray[@]}" # Convert option into lowercase (UDP->udp)
chooseProtoOptions=$("${chooseProtoCmd[@]}" "${protoArray[@]}" 2>&1 >/dev/tty) pivpnProto="${protocol,,}"
if [[ $? = 0 ]]; then echo "::: Using protocol: $pivpnProto"
for desiredProto in $chooseProtoOptions echo "${pivpnProto}" > /tmp/pivpnPROTO
do
pivpnProto=$desiredProto
echo "::: Using protocol: $pivpnProto"
echo "${pivpnProto}" > /tmp/pivpnPROTO
done
else else
echo "::: Cancel selected, exiting...." echo "::: Cancel selected, exiting...."
exit 1 exit 1